xref: /OK3568_Linux_fs/yocto/poky/documentation/ref-manual/variables.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun******************
4*4882a593SmuzhiyunVariables Glossary
5*4882a593Smuzhiyun******************
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunThis chapter lists common variables used in the OpenEmbedded build
8*4882a593Smuzhiyunsystem and gives an overview of their function and contents.
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun:term:`A <ABIEXTENSION>` :term:`B` :term:`C <CACHE>`
11*4882a593Smuzhiyun:term:`D` :term:`E <EFI_PROVIDER>` :term:`F <FEATURE_PACKAGES>`
12*4882a593Smuzhiyun:term:`G <GCCPIE>` :term:`H <HOMEPAGE>` :term:`I <ICECC_DISABLED>`
13*4882a593Smuzhiyun:term:`K <KARCH>` :term:`L <LABELS>` :term:`M <MACHINE>`
14*4882a593Smuzhiyun:term:`N <NATIVELSBSTRING>` :term:`O <OBJCOPY>` :term:`P`
15*4882a593Smuzhiyun:term:`R <RANLIB>` :term:`S` :term:`T`
16*4882a593Smuzhiyun:term:`U <UBOOT_CONFIG>` :term:`V <VOLATILE_LOG_DIR>`
17*4882a593Smuzhiyun:term:`W <WARN_QA>` :term:`X <XSERVER>`
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun.. glossary::
20*4882a593Smuzhiyun   :sorted:
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun   :term:`ABIEXTENSION`
23*4882a593Smuzhiyun      Extension to the Application Binary Interface (ABI) field of the GNU
24*4882a593Smuzhiyun      canonical architecture name (e.g. "eabi").
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun      ABI extensions are set in the machine include files. For example, the
27*4882a593Smuzhiyun      ``meta/conf/machine/include/arm/arch-arm.inc`` file sets the
28*4882a593Smuzhiyun      following extension::
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun         ABIEXTENSION = "eabi"
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun   :term:`ALLOW_EMPTY`
33*4882a593Smuzhiyun      Specifies whether to produce an output package even if it is empty.
34*4882a593Smuzhiyun      By default, BitBake does not produce empty packages. This default
35*4882a593Smuzhiyun      behavior can cause issues when there is an
36*4882a593Smuzhiyun      :term:`RDEPENDS` or some other hard runtime
37*4882a593Smuzhiyun      requirement on the existence of the package.
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun      Like all package-controlling variables, you must always use them in
40*4882a593Smuzhiyun      conjunction with a package name override, as in::
41*4882a593Smuzhiyun
42*4882a593Smuzhiyun         ALLOW_EMPTY:${PN} = "1"
43*4882a593Smuzhiyun         ALLOW_EMPTY:${PN}-dev = "1"
44*4882a593Smuzhiyun         ALLOW_EMPTY:${PN}-staticdev = "1"
45*4882a593Smuzhiyun
46*4882a593Smuzhiyun   :term:`ALTERNATIVE`
47*4882a593Smuzhiyun      Lists commands in a package that need an alternative binary naming
48*4882a593Smuzhiyun      scheme. Sometimes the same command is provided in multiple packages.
49*4882a593Smuzhiyun      When this occurs, the OpenEmbedded build system needs to use the
50*4882a593Smuzhiyun      alternatives system to create a different binary naming scheme so the
51*4882a593Smuzhiyun      commands can co-exist.
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun      To use the variable, list out the package's commands that are also
54*4882a593Smuzhiyun      provided by another package. For example, if the ``busybox`` package
55*4882a593Smuzhiyun      has four such commands, you identify them as follows::
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun         ALTERNATIVE:busybox = "sh sed test bracket"
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun      For more information on the alternatives system, see the
60*4882a593Smuzhiyun      ":ref:`ref-classes-update-alternatives`"
61*4882a593Smuzhiyun      section.
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun   :term:`ALTERNATIVE_LINK_NAME`
64*4882a593Smuzhiyun      Used by the alternatives system to map duplicated commands to actual
65*4882a593Smuzhiyun      locations. For example, if the ``bracket`` command provided by the
66*4882a593Smuzhiyun      ``busybox`` package is duplicated through another package, you must
67*4882a593Smuzhiyun      use the :term:`ALTERNATIVE_LINK_NAME` variable to specify the actual
68*4882a593Smuzhiyun      location::
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun         ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/["
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun      In this example, the binary for the ``bracket`` command (i.e. ``[``)
73*4882a593Smuzhiyun      from the ``busybox`` package resides in ``/usr/bin/``.
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun      .. note::
76*4882a593Smuzhiyun
77*4882a593Smuzhiyun         If :term:`ALTERNATIVE_LINK_NAME` is not defined, it defaults to ``${bindir}/name``.
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun      For more information on the alternatives system, see the
80*4882a593Smuzhiyun      ":ref:`ref-classes-update-alternatives`"
81*4882a593Smuzhiyun      section.
82*4882a593Smuzhiyun
83*4882a593Smuzhiyun   :term:`ALTERNATIVE_PRIORITY`
84*4882a593Smuzhiyun      Used by the alternatives system to create default priorities for
85*4882a593Smuzhiyun      duplicated commands. You can use the variable to create a single
86*4882a593Smuzhiyun      default regardless of the command name or package, a default for
87*4882a593Smuzhiyun      specific duplicated commands regardless of the package, or a default
88*4882a593Smuzhiyun      for specific commands tied to particular packages. Here are the
89*4882a593Smuzhiyun      available syntax forms::
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun         ALTERNATIVE_PRIORITY = "priority"
92*4882a593Smuzhiyun         ALTERNATIVE_PRIORITY[name] = "priority"
93*4882a593Smuzhiyun         ALTERNATIVE_PRIORITY_pkg[name] = "priority"
94*4882a593Smuzhiyun
95*4882a593Smuzhiyun      For more information on the alternatives system, see the
96*4882a593Smuzhiyun      ":ref:`ref-classes-update-alternatives`"
97*4882a593Smuzhiyun      section.
98*4882a593Smuzhiyun
99*4882a593Smuzhiyun   :term:`ALTERNATIVE_TARGET`
100*4882a593Smuzhiyun      Used by the alternatives system to create default link locations for
101*4882a593Smuzhiyun      duplicated commands. You can use the variable to create a single
102*4882a593Smuzhiyun      default location for all duplicated commands regardless of the
103*4882a593Smuzhiyun      command name or package, a default for specific duplicated commands
104*4882a593Smuzhiyun      regardless of the package, or a default for specific commands tied to
105*4882a593Smuzhiyun      particular packages. Here are the available syntax forms::
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun         ALTERNATIVE_TARGET = "target"
108*4882a593Smuzhiyun         ALTERNATIVE_TARGET[name] = "target"
109*4882a593Smuzhiyun         ALTERNATIVE_TARGET_pkg[name] = "target"
110*4882a593Smuzhiyun
111*4882a593Smuzhiyun      .. note::
112*4882a593Smuzhiyun
113*4882a593Smuzhiyun         If :term:`ALTERNATIVE_TARGET` is not defined, it inherits the value
114*4882a593Smuzhiyun         from the :term:`ALTERNATIVE_LINK_NAME` variable.
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun         If :term:`ALTERNATIVE_LINK_NAME` and :term:`ALTERNATIVE_TARGET` are the
117*4882a593Smuzhiyun         same, the target for :term:`ALTERNATIVE_TARGET` has "``.{BPN}``"
118*4882a593Smuzhiyun         appended to it.
119*4882a593Smuzhiyun
120*4882a593Smuzhiyun         Finally, if the file referenced has not been renamed, the
121*4882a593Smuzhiyun         alternatives system will rename it to avoid the need to rename
122*4882a593Smuzhiyun         alternative files in the :ref:`ref-tasks-install`
123*4882a593Smuzhiyun         task while retaining support for the command if necessary.
124*4882a593Smuzhiyun
125*4882a593Smuzhiyun      For more information on the alternatives system, see the
126*4882a593Smuzhiyun      ":ref:`ref-classes-update-alternatives`" section.
127*4882a593Smuzhiyun
128*4882a593Smuzhiyun   :term:`ANY_OF_DISTRO_FEATURES`
129*4882a593Smuzhiyun      When inheriting the
130*4882a593Smuzhiyun      :ref:`features_check <ref-classes-features_check>`
131*4882a593Smuzhiyun      class, this variable identifies a list of distribution features where
132*4882a593Smuzhiyun      at least one must be enabled in the current configuration in order
133*4882a593Smuzhiyun      for the OpenEmbedded build system to build the recipe. In other words,
134*4882a593Smuzhiyun      if none of the features listed in :term:`ANY_OF_DISTRO_FEATURES`
135*4882a593Smuzhiyun      appear in :term:`DISTRO_FEATURES` within the current configuration, then
136*4882a593Smuzhiyun      the recipe will be skipped, and if the build system attempts to build
137*4882a593Smuzhiyun      the recipe then an error will be triggered.
138*4882a593Smuzhiyun
139*4882a593Smuzhiyun
140*4882a593Smuzhiyun   :term:`APPEND`
141*4882a593Smuzhiyun      An override list of append strings for each target specified with
142*4882a593Smuzhiyun      :term:`LABELS`.
143*4882a593Smuzhiyun
144*4882a593Smuzhiyun      See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
145*4882a593Smuzhiyun      information on how this variable is used.
146*4882a593Smuzhiyun
147*4882a593Smuzhiyun   :term:`AR`
148*4882a593Smuzhiyun      The minimal command and arguments used to run ``ar``.
149*4882a593Smuzhiyun
150*4882a593Smuzhiyun   :term:`ARCHIVER_MODE`
151*4882a593Smuzhiyun      When used with the :ref:`archiver <ref-classes-archiver>` class,
152*4882a593Smuzhiyun      determines the type of information used to create a released archive.
153*4882a593Smuzhiyun      You can use this variable to create archives of patched source,
154*4882a593Smuzhiyun      original source, configured source, and so forth by employing the
155*4882a593Smuzhiyun      following variable flags (varflags)::
156*4882a593Smuzhiyun
157*4882a593Smuzhiyun         ARCHIVER_MODE[src] = "original"                   # Uses original (unpacked) source files.
158*4882a593Smuzhiyun         ARCHIVER_MODE[src] = "patched"                    # Uses patched source files. This is the default.
159*4882a593Smuzhiyun         ARCHIVER_MODE[src] = "configured"                 # Uses configured source files.
160*4882a593Smuzhiyun         ARCHIVER_MODE[diff] = "1"                         # Uses patches between do_unpack and do_patch.
161*4882a593Smuzhiyun         ARCHIVER_MODE[diff-exclude] ?= "file file ..."    # Lists files and directories to exclude from diff.
162*4882a593Smuzhiyun         ARCHIVER_MODE[dumpdata] = "1"                     # Uses environment data.
163*4882a593Smuzhiyun         ARCHIVER_MODE[recipe] = "1"                       # Uses recipe and include files.
164*4882a593Smuzhiyun         ARCHIVER_MODE[srpm] = "1"                         # Uses RPM package files.
165*4882a593Smuzhiyun
166*4882a593Smuzhiyun      For information on how the variable works, see the
167*4882a593Smuzhiyun      ``meta/classes/archiver.bbclass`` file in the :term:`Source Directory`.
168*4882a593Smuzhiyun
169*4882a593Smuzhiyun   :term:`AS`
170*4882a593Smuzhiyun      Minimal command and arguments needed to run the assembler.
171*4882a593Smuzhiyun
172*4882a593Smuzhiyun   :term:`ASSUME_PROVIDED`
173*4882a593Smuzhiyun      Lists recipe names (:term:`PN` values) BitBake does not
174*4882a593Smuzhiyun      attempt to build. Instead, BitBake assumes these recipes have already
175*4882a593Smuzhiyun      been built.
176*4882a593Smuzhiyun
177*4882a593Smuzhiyun      In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native
178*4882a593Smuzhiyun      tools that should not be built. An example is ``git-native``, which
179*4882a593Smuzhiyun      when specified, allows for the Git binary from the host to be used
180*4882a593Smuzhiyun      rather than building ``git-native``.
181*4882a593Smuzhiyun
182*4882a593Smuzhiyun   :term:`ASSUME_SHLIBS`
183*4882a593Smuzhiyun      Provides additional ``shlibs`` provider mapping information, which
184*4882a593Smuzhiyun      adds to or overwrites the information provided automatically by the
185*4882a593Smuzhiyun      system. Separate multiple entries using spaces.
186*4882a593Smuzhiyun
187*4882a593Smuzhiyun      As an example, use the following form to add an ``shlib`` provider of
188*4882a593Smuzhiyun      shlibname in packagename with the optional version::
189*4882a593Smuzhiyun
190*4882a593Smuzhiyun         shlibname:packagename[_version]
191*4882a593Smuzhiyun
192*4882a593Smuzhiyun      Here is an example that adds a shared library named ``libEGL.so.1``
193*4882a593Smuzhiyun      as being provided by the ``libegl-implementation`` package::
194*4882a593Smuzhiyun
195*4882a593Smuzhiyun         ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation"
196*4882a593Smuzhiyun
197*4882a593Smuzhiyun   :term:`AUTHOR`
198*4882a593Smuzhiyun      The email address used to contact the original author or authors in
199*4882a593Smuzhiyun      order to send patches and forward bugs.
200*4882a593Smuzhiyun
201*4882a593Smuzhiyun   :term:`AUTO_LIBNAME_PKGS`
202*4882a593Smuzhiyun      When the :ref:`debian <ref-classes-debian>` class is inherited,
203*4882a593Smuzhiyun      which is the default behavior, :term:`AUTO_LIBNAME_PKGS` specifies which
204*4882a593Smuzhiyun      packages should be checked for libraries and renamed according to
205*4882a593Smuzhiyun      Debian library package naming.
206*4882a593Smuzhiyun
207*4882a593Smuzhiyun      The default value is "${PACKAGES}", which causes the debian class to
208*4882a593Smuzhiyun      act on all packages that are explicitly generated by the recipe.
209*4882a593Smuzhiyun
210*4882a593Smuzhiyun   :term:`AUTOREV`
211*4882a593Smuzhiyun      When :term:`SRCREV` is set to the value of this variable, it specifies to
212*4882a593Smuzhiyun      use the latest source revision in the repository. Here is an example::
213*4882a593Smuzhiyun
214*4882a593Smuzhiyun         SRCREV = "${AUTOREV}"
215*4882a593Smuzhiyun
216*4882a593Smuzhiyun      If you use the previous statement to retrieve the latest version of
217*4882a593Smuzhiyun      software, you need to be sure :term:`PV` contains
218*4882a593Smuzhiyun      ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you
219*4882a593Smuzhiyun      have a kernel recipe that inherits the
220*4882a593Smuzhiyun      :ref:`kernel <ref-classes-kernel>` class and you use the previous
221*4882a593Smuzhiyun      statement. In this example, ``${SRCPV}`` does not automatically get
222*4882a593Smuzhiyun      into :term:`PV`. Consequently, you need to change :term:`PV` in your recipe
223*4882a593Smuzhiyun      so that it does contain ``${SRCPV}``.
224*4882a593Smuzhiyun
225*4882a593Smuzhiyun      For more information see the
226*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
227*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
228*4882a593Smuzhiyun
229*4882a593Smuzhiyun   :term:`AUTO_SYSLINUXMENU`
230*4882a593Smuzhiyun      Enables creating an automatic menu for the syslinux bootloader. You
231*4882a593Smuzhiyun      must set this variable in your recipe. The
232*4882a593Smuzhiyun      :ref:`syslinux <ref-classes-syslinux>` class checks this variable.
233*4882a593Smuzhiyun
234*4882a593Smuzhiyun   :term:`AVAILTUNES`
235*4882a593Smuzhiyun      The list of defined CPU and Application Binary Interface (ABI)
236*4882a593Smuzhiyun      tunings (i.e. "tunes") available for use by the OpenEmbedded build
237*4882a593Smuzhiyun      system.
238*4882a593Smuzhiyun
239*4882a593Smuzhiyun      The list simply presents the tunes that are available. Not all tunes
240*4882a593Smuzhiyun      may be compatible with a particular machine configuration, or with
241*4882a593Smuzhiyun      each other in a
242*4882a593Smuzhiyun      :ref:`Multilib <dev-manual/common-tasks:combining multiple versions of library files into one image>`
243*4882a593Smuzhiyun      configuration.
244*4882a593Smuzhiyun
245*4882a593Smuzhiyun      To add a tune to the list, be sure to append it with spaces using the
246*4882a593Smuzhiyun      "+=" BitBake operator. Do not simply replace the list by using the
247*4882a593Smuzhiyun      "=" operator. See the
248*4882a593Smuzhiyun      ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:basic syntax`" section in the BitBake
249*4882a593Smuzhiyun      User Manual for more information.
250*4882a593Smuzhiyun
251*4882a593Smuzhiyun   :term:`AZ_SAS`
252*4882a593Smuzhiyun      Azure Storage Shared Access Signature, when using the
253*4882a593Smuzhiyun      :ref:`Azure Storage fetcher (az://) <bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
254*4882a593Smuzhiyun      This variable can be defined to be used by the fetcher to authenticate
255*4882a593Smuzhiyun      and gain access to non-public artifacts.
256*4882a593Smuzhiyun      ::
257*4882a593Smuzhiyun
258*4882a593Smuzhiyun         AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>""
259*4882a593Smuzhiyun
260*4882a593Smuzhiyun      For more information see Microsoft's Azure Storage documentation at
261*4882a593Smuzhiyun      https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
262*4882a593Smuzhiyun
263*4882a593Smuzhiyun   :term:`B`
264*4882a593Smuzhiyun      The directory within the :term:`Build Directory` in
265*4882a593Smuzhiyun      which the OpenEmbedded build system places generated objects during a
266*4882a593Smuzhiyun      recipe's build process. By default, this directory is the same as the
267*4882a593Smuzhiyun      :term:`S` directory, which is defined as::
268*4882a593Smuzhiyun
269*4882a593Smuzhiyun         S = "${WORKDIR}/${BP}"
270*4882a593Smuzhiyun
271*4882a593Smuzhiyun      You can separate the (:term:`S`) directory and the directory pointed to
272*4882a593Smuzhiyun      by the :term:`B` variable. Most Autotools-based recipes support
273*4882a593Smuzhiyun      separating these directories. The build system defaults to using
274*4882a593Smuzhiyun      separate directories for ``gcc`` and some kernel recipes.
275*4882a593Smuzhiyun
276*4882a593Smuzhiyun   :term:`BAD_RECOMMENDATIONS`
277*4882a593Smuzhiyun      Lists "recommended-only" packages to not install. Recommended-only
278*4882a593Smuzhiyun      packages are packages installed only through the
279*4882a593Smuzhiyun      :term:`RRECOMMENDS` variable. You can prevent any
280*4882a593Smuzhiyun      of these "recommended" packages from being installed by listing them
281*4882a593Smuzhiyun      with the :term:`BAD_RECOMMENDATIONS` variable::
282*4882a593Smuzhiyun
283*4882a593Smuzhiyun         BAD_RECOMMENDATIONS = "package_name package_name package_name ..."
284*4882a593Smuzhiyun
285*4882a593Smuzhiyun      You can set this variable globally in your ``local.conf`` file or you
286*4882a593Smuzhiyun      can attach it to a specific image recipe by using the recipe name
287*4882a593Smuzhiyun      override::
288*4882a593Smuzhiyun
289*4882a593Smuzhiyun         BAD_RECOMMENDATIONS:pn-target_image = "package_name"
290*4882a593Smuzhiyun
291*4882a593Smuzhiyun      It is important to realize that if you choose to not install packages
292*4882a593Smuzhiyun      using this variable and some other packages are dependent on them
293*4882a593Smuzhiyun      (i.e. listed in a recipe's :term:`RDEPENDS`
294*4882a593Smuzhiyun      variable), the OpenEmbedded build system ignores your request and
295*4882a593Smuzhiyun      will install the packages to avoid dependency errors.
296*4882a593Smuzhiyun
297*4882a593Smuzhiyun      This variable is supported only when using the IPK and RPM
298*4882a593Smuzhiyun      packaging backends. DEB is not supported.
299*4882a593Smuzhiyun
300*4882a593Smuzhiyun      See the :term:`NO_RECOMMENDATIONS` and the
301*4882a593Smuzhiyun      :term:`PACKAGE_EXCLUDE` variables for related
302*4882a593Smuzhiyun      information.
303*4882a593Smuzhiyun
304*4882a593Smuzhiyun   :term:`BASE_LIB`
305*4882a593Smuzhiyun      The library directory name for the CPU or Application Binary
306*4882a593Smuzhiyun      Interface (ABI) tune. The :term:`BASE_LIB` applies only in the Multilib
307*4882a593Smuzhiyun      context. See the ":ref:`dev-manual/common-tasks:combining multiple versions of library files into one image`"
308*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual for information
309*4882a593Smuzhiyun      on Multilib.
310*4882a593Smuzhiyun
311*4882a593Smuzhiyun      The :term:`BASE_LIB` variable is defined in the machine include files in
312*4882a593Smuzhiyun      the :term:`Source Directory`. If Multilib is not
313*4882a593Smuzhiyun      being used, the value defaults to "lib".
314*4882a593Smuzhiyun
315*4882a593Smuzhiyun   :term:`BASE_WORKDIR`
316*4882a593Smuzhiyun      Points to the base of the work directory for all recipes. The default
317*4882a593Smuzhiyun      value is "${TMPDIR}/work".
318*4882a593Smuzhiyun
319*4882a593Smuzhiyun   :term:`BB_ALLOWED_NETWORKS`
320*4882a593Smuzhiyun      Specifies a space-delimited list of hosts that the fetcher is allowed
321*4882a593Smuzhiyun      to use to obtain the required source code. Following are
322*4882a593Smuzhiyun      considerations surrounding this variable:
323*4882a593Smuzhiyun
324*4882a593Smuzhiyun      -  This host list is only used if :term:`BB_NO_NETWORK` is either not set
325*4882a593Smuzhiyun         or set to "0".
326*4882a593Smuzhiyun
327*4882a593Smuzhiyun      -  There is limited support for wildcard matching against the beginning of
328*4882a593Smuzhiyun         host names. For example, the following setting matches
329*4882a593Smuzhiyun         ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``.
330*4882a593Smuzhiyun         ::
331*4882a593Smuzhiyun
332*4882a593Smuzhiyun            BB_ALLOWED_NETWORKS = "*.gnu.org"
333*4882a593Smuzhiyun
334*4882a593Smuzhiyun         .. note::
335*4882a593Smuzhiyun
336*4882a593Smuzhiyun            The use of the "``*``" character only works at the beginning of
337*4882a593Smuzhiyun            a host name and it must be isolated from the remainder of the
338*4882a593Smuzhiyun            host name. You cannot use the wildcard character in any other
339*4882a593Smuzhiyun            location of the name or combined with the front part of the
340*4882a593Smuzhiyun            name.
341*4882a593Smuzhiyun
342*4882a593Smuzhiyun            For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar``
343*4882a593Smuzhiyun            is not.
344*4882a593Smuzhiyun
345*4882a593Smuzhiyun      -  Mirrors not in the host list are skipped and logged in debug.
346*4882a593Smuzhiyun
347*4882a593Smuzhiyun      -  Attempts to access networks not in the host list cause a failure.
348*4882a593Smuzhiyun
349*4882a593Smuzhiyun      Using :term:`BB_ALLOWED_NETWORKS` in conjunction with
350*4882a593Smuzhiyun      :term:`PREMIRRORS` is very useful. Adding the host
351*4882a593Smuzhiyun      you want to use to :term:`PREMIRRORS` results in the source code being
352*4882a593Smuzhiyun      fetched from an allowed location and avoids raising an error when a
353*4882a593Smuzhiyun      host that is not allowed is in a :term:`SRC_URI`
354*4882a593Smuzhiyun      statement. This is because the fetcher does not attempt to use the
355*4882a593Smuzhiyun      host listed in :term:`SRC_URI` after a successful fetch from the
356*4882a593Smuzhiyun      :term:`PREMIRRORS` occurs.
357*4882a593Smuzhiyun
358*4882a593Smuzhiyun   :term:`BB_DANGLINGAPPENDS_WARNONLY`
359*4882a593Smuzhiyun      Defines how BitBake handles situations where an append file
360*4882a593Smuzhiyun      (``.bbappend``) has no corresponding recipe file (``.bb``). This
361*4882a593Smuzhiyun      condition often occurs when layers get out of sync (e.g. ``oe-core``
362*4882a593Smuzhiyun      bumps a recipe version and the old recipe no longer exists and the
363*4882a593Smuzhiyun      other layer has not been updated to the new version of the recipe
364*4882a593Smuzhiyun      yet).
365*4882a593Smuzhiyun
366*4882a593Smuzhiyun      The default fatal behavior is safest because it is the sane reaction
367*4882a593Smuzhiyun      given something is out of sync. It is important to realize when your
368*4882a593Smuzhiyun      changes are no longer being applied.
369*4882a593Smuzhiyun
370*4882a593Smuzhiyun      You can change the default behavior by setting this variable to "1",
371*4882a593Smuzhiyun      "yes", or "true" in your ``local.conf`` file, which is located in the
372*4882a593Smuzhiyun      :term:`Build Directory`: Here is an example::
373*4882a593Smuzhiyun
374*4882a593Smuzhiyun         BB_DANGLINGAPPENDS_WARNONLY = "1"
375*4882a593Smuzhiyun
376*4882a593Smuzhiyun   :term:`BB_DISKMON_DIRS`
377*4882a593Smuzhiyun      Monitors disk space and available inodes during the build and allows
378*4882a593Smuzhiyun      you to control the build based on these parameters.
379*4882a593Smuzhiyun
380*4882a593Smuzhiyun      Disk space monitoring is disabled by default. To enable monitoring,
381*4882a593Smuzhiyun      add the :term:`BB_DISKMON_DIRS` variable to your ``conf/local.conf`` file
382*4882a593Smuzhiyun      found in the :term:`Build Directory`. Use the
383*4882a593Smuzhiyun      following form:
384*4882a593Smuzhiyun
385*4882a593Smuzhiyun      .. code-block:: none
386*4882a593Smuzhiyun
387*4882a593Smuzhiyun         BB_DISKMON_DIRS = "action,dir,threshold [...]"
388*4882a593Smuzhiyun
389*4882a593Smuzhiyun         where:
390*4882a593Smuzhiyun
391*4882a593Smuzhiyun            action is:
392*4882a593Smuzhiyun               ABORT:     Immediately stop the build when
393*4882a593Smuzhiyun                          a threshold is broken.
394*4882a593Smuzhiyun               STOPTASKS: Stop the build after the currently
395*4882a593Smuzhiyun                          executing tasks have finished when
396*4882a593Smuzhiyun                          a threshold is broken.
397*4882a593Smuzhiyun               WARN:      Issue a warning but continue the
398*4882a593Smuzhiyun                          build when a threshold is broken.
399*4882a593Smuzhiyun                          Subsequent warnings are issued as
400*4882a593Smuzhiyun                          defined by the BB_DISKMON_WARNINTERVAL
401*4882a593Smuzhiyun                          variable, which must be defined in
402*4882a593Smuzhiyun                          the conf/local.conf file.
403*4882a593Smuzhiyun
404*4882a593Smuzhiyun            dir is:
405*4882a593Smuzhiyun               Any directory you choose. You can specify one or
406*4882a593Smuzhiyun               more directories to monitor by separating the
407*4882a593Smuzhiyun               groupings with a space.  If two directories are
408*4882a593Smuzhiyun               on the same device, only the first directory
409*4882a593Smuzhiyun               is monitored.
410*4882a593Smuzhiyun
411*4882a593Smuzhiyun            threshold is:
412*4882a593Smuzhiyun               Either the minimum available disk space,
413*4882a593Smuzhiyun               the minimum number of free inodes, or
414*4882a593Smuzhiyun               both.  You must specify at least one.  To
415*4882a593Smuzhiyun               omit one or the other, simply omit the value.
416*4882a593Smuzhiyun               Specify the threshold using G, M, K for Gbytes,
417*4882a593Smuzhiyun               Mbytes, and Kbytes, respectively. If you do
418*4882a593Smuzhiyun               not specify G, M, or K, Kbytes is assumed by
419*4882a593Smuzhiyun               default.  Do not use GB, MB, or KB.
420*4882a593Smuzhiyun
421*4882a593Smuzhiyun      Here are some examples::
422*4882a593Smuzhiyun
423*4882a593Smuzhiyun         BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
424*4882a593Smuzhiyun         BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
425*4882a593Smuzhiyun         BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
426*4882a593Smuzhiyun
427*4882a593Smuzhiyun      The first example works only if you also provide the
428*4882a593Smuzhiyun      :term:`BB_DISKMON_WARNINTERVAL`
429*4882a593Smuzhiyun      variable in the ``conf/local.conf``. This example causes the build
430*4882a593Smuzhiyun      system to immediately stop when either the disk space in
431*4882a593Smuzhiyun      ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops
432*4882a593Smuzhiyun      below 100 Kbytes. Because two directories are provided with the
433*4882a593Smuzhiyun      variable, the build system also issue a warning when the disk space
434*4882a593Smuzhiyun      in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number
435*4882a593Smuzhiyun      of free inodes drops below 100 Kbytes. Subsequent warnings are issued
436*4882a593Smuzhiyun      during intervals as defined by the :term:`BB_DISKMON_WARNINTERVAL`
437*4882a593Smuzhiyun      variable.
438*4882a593Smuzhiyun
439*4882a593Smuzhiyun      The second example stops the build after all currently executing
440*4882a593Smuzhiyun      tasks complete when the minimum disk space in the ``${TMPDIR}``
441*4882a593Smuzhiyun      directory drops below 1 Gbyte. No disk monitoring occurs for the free
442*4882a593Smuzhiyun      inodes in this case.
443*4882a593Smuzhiyun
444*4882a593Smuzhiyun      The final example immediately stops the build when the number of
445*4882a593Smuzhiyun      free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
446*4882a593Smuzhiyun      disk space monitoring for the directory itself occurs in this case.
447*4882a593Smuzhiyun
448*4882a593Smuzhiyun   :term:`BB_DISKMON_WARNINTERVAL`
449*4882a593Smuzhiyun      Defines the disk space and free inode warning intervals. To set these
450*4882a593Smuzhiyun      intervals, define the variable in your ``conf/local.conf`` file in
451*4882a593Smuzhiyun      the :term:`Build Directory`.
452*4882a593Smuzhiyun
453*4882a593Smuzhiyun      If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you
454*4882a593Smuzhiyun      must also use the :term:`BB_DISKMON_DIRS`
455*4882a593Smuzhiyun      variable and define its action as "WARN". During the build,
456*4882a593Smuzhiyun      subsequent warnings are issued each time disk space or number of free
457*4882a593Smuzhiyun      inodes further reduces by the respective interval.
458*4882a593Smuzhiyun
459*4882a593Smuzhiyun      If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you
460*4882a593Smuzhiyun      do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk
461*4882a593Smuzhiyun      monitoring interval defaults to the following::
462*4882a593Smuzhiyun
463*4882a593Smuzhiyun         BB_DISKMON_WARNINTERVAL = "50M,5K"
464*4882a593Smuzhiyun
465*4882a593Smuzhiyun      When specifying the variable in your configuration file, use the
466*4882a593Smuzhiyun      following form:
467*4882a593Smuzhiyun
468*4882a593Smuzhiyun      .. code-block:: none
469*4882a593Smuzhiyun
470*4882a593Smuzhiyun         BB_DISKMON_WARNINTERVAL = "disk_space_interval,disk_inode_interval"
471*4882a593Smuzhiyun
472*4882a593Smuzhiyun         where:
473*4882a593Smuzhiyun
474*4882a593Smuzhiyun            disk_space_interval is:
475*4882a593Smuzhiyun               An interval of memory expressed in either
476*4882a593Smuzhiyun               G, M, or K for Gbytes, Mbytes, or Kbytes,
477*4882a593Smuzhiyun               respectively. You cannot use GB, MB, or KB.
478*4882a593Smuzhiyun
479*4882a593Smuzhiyun            disk_inode_interval is:
480*4882a593Smuzhiyun               An interval of free inodes expressed in either
481*4882a593Smuzhiyun               G, M, or K for Gbytes, Mbytes, or Kbytes,
482*4882a593Smuzhiyun               respectively. You cannot use GB, MB, or KB.
483*4882a593Smuzhiyun
484*4882a593Smuzhiyun      Here is an example::
485*4882a593Smuzhiyun
486*4882a593Smuzhiyun         BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
487*4882a593Smuzhiyun         BB_DISKMON_WARNINTERVAL = "50M,5K"
488*4882a593Smuzhiyun
489*4882a593Smuzhiyun      These variables cause the
490*4882a593Smuzhiyun      OpenEmbedded build system to issue subsequent warnings each time the
491*4882a593Smuzhiyun      available disk space further reduces by 50 Mbytes or the number of
492*4882a593Smuzhiyun      free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}``
493*4882a593Smuzhiyun      directory. Subsequent warnings based on the interval occur each time
494*4882a593Smuzhiyun      a respective interval is reached beyond the initial warning (i.e. 1
495*4882a593Smuzhiyun      Gbytes and 100 Kbytes).
496*4882a593Smuzhiyun
497*4882a593Smuzhiyun   :term:`BB_GENERATE_MIRROR_TARBALLS`
498*4882a593Smuzhiyun      Causes tarballs of the source control repositories (e.g. Git
499*4882a593Smuzhiyun      repositories), including metadata, to be placed in the
500*4882a593Smuzhiyun      :term:`DL_DIR` directory.
501*4882a593Smuzhiyun
502*4882a593Smuzhiyun      For performance reasons, creating and placing tarballs of these
503*4882a593Smuzhiyun      repositories is not the default action by the OpenEmbedded build
504*4882a593Smuzhiyun      system.
505*4882a593Smuzhiyun      ::
506*4882a593Smuzhiyun
507*4882a593Smuzhiyun         BB_GENERATE_MIRROR_TARBALLS = "1"
508*4882a593Smuzhiyun
509*4882a593Smuzhiyun      Set this variable in your
510*4882a593Smuzhiyun      ``local.conf`` file in the :term:`Build Directory`.
511*4882a593Smuzhiyun
512*4882a593Smuzhiyun      Once you have the tarballs containing your source files, you can
513*4882a593Smuzhiyun      clean up your :term:`DL_DIR` directory by deleting any Git or other
514*4882a593Smuzhiyun      source control work directories.
515*4882a593Smuzhiyun
516*4882a593Smuzhiyun   :term:`BB_NUMBER_THREADS`
517*4882a593Smuzhiyun      The maximum number of tasks BitBake should run in parallel at any one
518*4882a593Smuzhiyun      time. The OpenEmbedded build system automatically configures this
519*4882a593Smuzhiyun      variable to be equal to the number of cores on the build system. For
520*4882a593Smuzhiyun      example, a system with a dual core processor that also uses
521*4882a593Smuzhiyun      hyper-threading causes the :term:`BB_NUMBER_THREADS` variable to default
522*4882a593Smuzhiyun      to "4".
523*4882a593Smuzhiyun
524*4882a593Smuzhiyun      For single socket systems (i.e. one CPU), you should not have to
525*4882a593Smuzhiyun      override this variable to gain optimal parallelism during builds.
526*4882a593Smuzhiyun      However, if you have very large systems that employ multiple physical
527*4882a593Smuzhiyun      CPUs, you might want to make sure the :term:`BB_NUMBER_THREADS` variable
528*4882a593Smuzhiyun      is not set higher than "20".
529*4882a593Smuzhiyun
530*4882a593Smuzhiyun      For more information on speeding up builds, see the
531*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:speeding up a build`"
532*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
533*4882a593Smuzhiyun
534*4882a593Smuzhiyun   :term:`BB_SERVER_TIMEOUT`
535*4882a593Smuzhiyun      Specifies the time (in seconds) after which to unload the BitBake
536*4882a593Smuzhiyun      server due to inactivity. Set :term:`BB_SERVER_TIMEOUT` to determine how
537*4882a593Smuzhiyun      long the BitBake server stays resident between invocations.
538*4882a593Smuzhiyun
539*4882a593Smuzhiyun      For example, the following statement in your ``local.conf`` file
540*4882a593Smuzhiyun      instructs the server to be unloaded after 20 seconds of inactivity::
541*4882a593Smuzhiyun
542*4882a593Smuzhiyun         BB_SERVER_TIMEOUT = "20"
543*4882a593Smuzhiyun
544*4882a593Smuzhiyun      If you want the server to never be unloaded,
545*4882a593Smuzhiyun      set :term:`BB_SERVER_TIMEOUT` to "-1".
546*4882a593Smuzhiyun
547*4882a593Smuzhiyun   :term:`BBCLASSEXTEND`
548*4882a593Smuzhiyun      Allows you to extend a recipe so that it builds variants of the
549*4882a593Smuzhiyun      software. There are common variants for recipes as "natives" like
550*4882a593Smuzhiyun      ``quilt-native``, which is a copy of Quilt built to run on the build
551*4882a593Smuzhiyun      system; "crosses" such as ``gcc-cross``, which is a compiler built to
552*4882a593Smuzhiyun      run on the build machine but produces binaries that run on the target
553*4882a593Smuzhiyun      :term:`MACHINE`; "nativesdk", which targets the SDK
554*4882a593Smuzhiyun      machine instead of :term:`MACHINE`; and "mulitlibs" in the form
555*4882a593Smuzhiyun      "``multilib:``\ multilib_name".
556*4882a593Smuzhiyun
557*4882a593Smuzhiyun      To build a different variant of the recipe with a minimal amount of
558*4882a593Smuzhiyun      code, it usually is as simple as adding the following to your recipe::
559*4882a593Smuzhiyun
560*4882a593Smuzhiyun         BBCLASSEXTEND =+ "native nativesdk"
561*4882a593Smuzhiyun         BBCLASSEXTEND =+ "multilib:multilib_name"
562*4882a593Smuzhiyun
563*4882a593Smuzhiyun      .. note::
564*4882a593Smuzhiyun
565*4882a593Smuzhiyun         Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe
566*4882a593Smuzhiyun         variants by rewriting variable values and applying overrides such
567*4882a593Smuzhiyun         as ``:class-native``. For example, to generate a native version of
568*4882a593Smuzhiyun         a recipe, a :term:`DEPENDS` on "foo" is rewritten
569*4882a593Smuzhiyun         to a :term:`DEPENDS` on "foo-native".
570*4882a593Smuzhiyun
571*4882a593Smuzhiyun         Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once.
572*4882a593Smuzhiyun         Parsing once adds some limitations. For example, it is not
573*4882a593Smuzhiyun         possible to include a different file depending on the variant,
574*4882a593Smuzhiyun         since ``include`` statements are processed when the recipe is
575*4882a593Smuzhiyun         parsed.
576*4882a593Smuzhiyun
577*4882a593Smuzhiyun   :term:`BBFILE_COLLECTIONS`
578*4882a593Smuzhiyun      Lists the names of configured layers. These names are used to find
579*4882a593Smuzhiyun      the other ``BBFILE_*`` variables. Typically, each layer will append
580*4882a593Smuzhiyun      its name to this variable in its ``conf/layer.conf`` file.
581*4882a593Smuzhiyun
582*4882a593Smuzhiyun   :term:`BBFILE_PATTERN`
583*4882a593Smuzhiyun      Variable that expands to match files from
584*4882a593Smuzhiyun      :term:`BBFILES` in a particular layer. This variable
585*4882a593Smuzhiyun      is used in the ``conf/layer.conf`` file and must be suffixed with the
586*4882a593Smuzhiyun      name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``).
587*4882a593Smuzhiyun
588*4882a593Smuzhiyun   :term:`BBFILE_PRIORITY`
589*4882a593Smuzhiyun      Assigns the priority for recipe files in each layer.
590*4882a593Smuzhiyun
591*4882a593Smuzhiyun      This variable is useful in situations where the same recipe appears
592*4882a593Smuzhiyun      in more than one layer. Setting this variable allows you to
593*4882a593Smuzhiyun      prioritize a layer against other layers that contain the same recipe
594*4882a593Smuzhiyun      - effectively letting you control the precedence for the multiple
595*4882a593Smuzhiyun      layers. The precedence established through this variable stands
596*4882a593Smuzhiyun      regardless of a recipe's version (:term:`PV` variable). For
597*4882a593Smuzhiyun      example, a layer that has a recipe with a higher :term:`PV` value but for
598*4882a593Smuzhiyun      which the :term:`BBFILE_PRIORITY` is set to have a lower precedence still
599*4882a593Smuzhiyun      has a lower precedence.
600*4882a593Smuzhiyun
601*4882a593Smuzhiyun      A larger value for the :term:`BBFILE_PRIORITY` variable results in a
602*4882a593Smuzhiyun      higher precedence. For example, the value 6 has a higher precedence
603*4882a593Smuzhiyun      than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable
604*4882a593Smuzhiyun      is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable
605*4882a593Smuzhiyun      for more information. The default priority, if unspecified for a
606*4882a593Smuzhiyun      layer with no dependencies, is the lowest defined priority + 1 (or 1
607*4882a593Smuzhiyun      if no priorities are defined).
608*4882a593Smuzhiyun
609*4882a593Smuzhiyun      .. tip::
610*4882a593Smuzhiyun
611*4882a593Smuzhiyun         You can use the command ``bitbake-layers show-layers``
612*4882a593Smuzhiyun         to list all configured layers along with their priorities.
613*4882a593Smuzhiyun
614*4882a593Smuzhiyun   :term:`BBFILES`
615*4882a593Smuzhiyun      A space-separated list of recipe files BitBake uses to build
616*4882a593Smuzhiyun      software.
617*4882a593Smuzhiyun
618*4882a593Smuzhiyun      When specifying recipe files, you can pattern match using Python's
619*4882a593Smuzhiyun      `glob <https://docs.python.org/3/library/glob.html>`_ syntax.
620*4882a593Smuzhiyun      For details on the syntax, see the documentation by following the
621*4882a593Smuzhiyun      previous link.
622*4882a593Smuzhiyun
623*4882a593Smuzhiyun   :term:`BBFILES_DYNAMIC`
624*4882a593Smuzhiyun      Activates content when identified layers are present. You identify
625*4882a593Smuzhiyun      the layers by the collections that the layers define.
626*4882a593Smuzhiyun
627*4882a593Smuzhiyun      Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files
628*4882a593Smuzhiyun      whose corresponding ``.bb`` file is in a layer that attempts to
629*4882a593Smuzhiyun      modify other layers through ``.bbappend`` but does not want to
630*4882a593Smuzhiyun      introduce a hard dependency on those other layers.
631*4882a593Smuzhiyun
632*4882a593Smuzhiyun      Use the following form for :term:`BBFILES_DYNAMIC`:
633*4882a593Smuzhiyun      ``collection_name:filename_pattern``.
634*4882a593Smuzhiyun
635*4882a593Smuzhiyun      The following example identifies two collection names and two
636*4882a593Smuzhiyun      filename patterns::
637*4882a593Smuzhiyun
638*4882a593Smuzhiyun         BBFILES_DYNAMIC += " \
639*4882a593Smuzhiyun            clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
640*4882a593Smuzhiyun            core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
641*4882a593Smuzhiyun            "
642*4882a593Smuzhiyun
643*4882a593Smuzhiyun      This next example shows an error message that occurs because invalid
644*4882a593Smuzhiyun      entries are found, which cause parsing to fail:
645*4882a593Smuzhiyun
646*4882a593Smuzhiyun      .. code-block:: none
647*4882a593Smuzhiyun
648*4882a593Smuzhiyun         ERROR: BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:
649*4882a593Smuzhiyun             /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
650*4882a593Smuzhiyun             /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
651*4882a593Smuzhiyun
652*4882a593Smuzhiyun   :term:`BBINCLUDELOGS`
653*4882a593Smuzhiyun      Variable that controls how BitBake displays logs on build failure.
654*4882a593Smuzhiyun
655*4882a593Smuzhiyun   :term:`BBINCLUDELOGS_LINES`
656*4882a593Smuzhiyun      If :term:`BBINCLUDELOGS` is set, specifies the
657*4882a593Smuzhiyun      maximum number of lines from the task log file to print when
658*4882a593Smuzhiyun      reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`,
659*4882a593Smuzhiyun      the entire log is printed.
660*4882a593Smuzhiyun
661*4882a593Smuzhiyun   :term:`BBLAYERS`
662*4882a593Smuzhiyun      Lists the layers to enable during the build. This variable is defined
663*4882a593Smuzhiyun      in the ``bblayers.conf`` configuration file in the :term:`Build Directory`.
664*4882a593Smuzhiyun      Here is an example::
665*4882a593Smuzhiyun
666*4882a593Smuzhiyun         BBLAYERS = " \
667*4882a593Smuzhiyun             /home/scottrif/poky/meta \
668*4882a593Smuzhiyun             /home/scottrif/poky/meta-poky \
669*4882a593Smuzhiyun             /home/scottrif/poky/meta-yocto-bsp \
670*4882a593Smuzhiyun             /home/scottrif/poky/meta-mykernel \
671*4882a593Smuzhiyun             "
672*4882a593Smuzhiyun
673*4882a593Smuzhiyun      This example enables four layers, one of which is a custom,
674*4882a593Smuzhiyun      user-defined layer named ``meta-mykernel``.
675*4882a593Smuzhiyun
676*4882a593Smuzhiyun   :term:`BBMASK`
677*4882a593Smuzhiyun      Prevents BitBake from processing recipes and recipe append files.
678*4882a593Smuzhiyun
679*4882a593Smuzhiyun      You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and
680*4882a593Smuzhiyun      ``.bbappend`` files. BitBake ignores any recipe or recipe append
681*4882a593Smuzhiyun      files that match any of the expressions. It is as if BitBake does not
682*4882a593Smuzhiyun      see them at all. Consequently, matching files are not parsed or
683*4882a593Smuzhiyun      otherwise used by BitBake.
684*4882a593Smuzhiyun
685*4882a593Smuzhiyun      The values you provide are passed to Python's regular expression
686*4882a593Smuzhiyun      compiler. Consequently, the syntax follows Python's Regular
687*4882a593Smuzhiyun      Expression (re) syntax. The expressions are compared against the full
688*4882a593Smuzhiyun      paths to the files. For complete syntax information, see Python's
689*4882a593Smuzhiyun      documentation at https://docs.python.org/3/library/re.html#regular-expression-syntax.
690*4882a593Smuzhiyun
691*4882a593Smuzhiyun      The following example uses a complete regular expression to tell
692*4882a593Smuzhiyun      BitBake to ignore all recipe and recipe append files in the
693*4882a593Smuzhiyun      ``meta-ti/recipes-misc/`` directory::
694*4882a593Smuzhiyun
695*4882a593Smuzhiyun         BBMASK = "meta-ti/recipes-misc/"
696*4882a593Smuzhiyun
697*4882a593Smuzhiyun      If you want to mask out multiple directories or recipes, you can
698*4882a593Smuzhiyun      specify multiple regular expression fragments. This next example
699*4882a593Smuzhiyun      masks out multiple directories and individual recipes::
700*4882a593Smuzhiyun
701*4882a593Smuzhiyun         BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
702*4882a593Smuzhiyun         BBMASK += "/meta-oe/recipes-support/"
703*4882a593Smuzhiyun         BBMASK += "/meta-foo/.*/openldap"
704*4882a593Smuzhiyun         BBMASK += "opencv.*\.bbappend"
705*4882a593Smuzhiyun         BBMASK += "lzma"
706*4882a593Smuzhiyun
707*4882a593Smuzhiyun      .. note::
708*4882a593Smuzhiyun
709*4882a593Smuzhiyun         When specifying a directory name, use the trailing slash character
710*4882a593Smuzhiyun         to ensure you match just that directory name.
711*4882a593Smuzhiyun
712*4882a593Smuzhiyun   :term:`BBMULTICONFIG`
713*4882a593Smuzhiyun      Specifies each additional separate configuration when you are
714*4882a593Smuzhiyun      building targets with multiple configurations. Use this variable in
715*4882a593Smuzhiyun      your ``conf/local.conf`` configuration file. Specify a
716*4882a593Smuzhiyun      multiconfigname for each configuration file you are using. For
717*4882a593Smuzhiyun      example, the following line specifies three configuration files::
718*4882a593Smuzhiyun
719*4882a593Smuzhiyun         BBMULTICONFIG = "configA configB configC"
720*4882a593Smuzhiyun
721*4882a593Smuzhiyun      Each configuration file you
722*4882a593Smuzhiyun      use must reside in the :term:`Build Directory`
723*4882a593Smuzhiyun      ``conf/multiconfig`` directory (e.g.
724*4882a593Smuzhiyun      ``build_directory/conf/multiconfig/configA.conf``).
725*4882a593Smuzhiyun
726*4882a593Smuzhiyun      For information on how to use :term:`BBMULTICONFIG` in an environment
727*4882a593Smuzhiyun      that supports building targets with multiple configurations, see the
728*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:building images for multiple targets using multiple configurations`"
729*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
730*4882a593Smuzhiyun
731*4882a593Smuzhiyun   :term:`BBPATH`
732*4882a593Smuzhiyun      Used by BitBake to locate ``.bbclass`` and configuration files. This
733*4882a593Smuzhiyun      variable is analogous to the ``PATH`` variable.
734*4882a593Smuzhiyun
735*4882a593Smuzhiyun      .. note::
736*4882a593Smuzhiyun
737*4882a593Smuzhiyun         If you run BitBake from a directory outside of the
738*4882a593Smuzhiyun         :term:`Build Directory`, you must be sure to set :term:`BBPATH`
739*4882a593Smuzhiyun         to point to the Build Directory. Set the variable as you would any
740*4882a593Smuzhiyun         environment variable and then run BitBake::
741*4882a593Smuzhiyun
742*4882a593Smuzhiyun                 $ BBPATH = "build_directory"
743*4882a593Smuzhiyun                 $ export BBPATH
744*4882a593Smuzhiyun                 $ bitbake target
745*4882a593Smuzhiyun
746*4882a593Smuzhiyun
747*4882a593Smuzhiyun   :term:`BBSERVER`
748*4882a593Smuzhiyun      If defined in the BitBake environment, :term:`BBSERVER` points to the
749*4882a593Smuzhiyun      BitBake remote server.
750*4882a593Smuzhiyun
751*4882a593Smuzhiyun      Use the following format to export the variable to the BitBake
752*4882a593Smuzhiyun      environment::
753*4882a593Smuzhiyun
754*4882a593Smuzhiyun         export BBSERVER=localhost:$port
755*4882a593Smuzhiyun
756*4882a593Smuzhiyun      By default, :term:`BBSERVER` also appears in :term:`BB_BASEHASH_IGNORE_VARS`.
757*4882a593Smuzhiyun      Consequently, :term:`BBSERVER` is excluded from checksum and dependency
758*4882a593Smuzhiyun      data.
759*4882a593Smuzhiyun
760*4882a593Smuzhiyun   :term:`BINCONFIG`
761*4882a593Smuzhiyun      When inheriting the
762*4882a593Smuzhiyun      :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class,
763*4882a593Smuzhiyun      this variable specifies binary configuration scripts to disable in
764*4882a593Smuzhiyun      favor of using ``pkg-config`` to query the information. The
765*4882a593Smuzhiyun      :ref:`binconfig-disabled <ref-classes-binconfig-disabled>` class will modify the specified scripts to
766*4882a593Smuzhiyun      return an error so that calls to them can be easily found and
767*4882a593Smuzhiyun      replaced.
768*4882a593Smuzhiyun
769*4882a593Smuzhiyun      To add multiple scripts, separate them by spaces. Here is an example
770*4882a593Smuzhiyun      from the ``libpng`` recipe::
771*4882a593Smuzhiyun
772*4882a593Smuzhiyun         BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
773*4882a593Smuzhiyun
774*4882a593Smuzhiyun   :term:`BINCONFIG_GLOB`
775*4882a593Smuzhiyun      When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
776*4882a593Smuzhiyun      this variable specifies a wildcard for configuration scripts that
777*4882a593Smuzhiyun      need editing. The scripts are edited to correct any paths that have
778*4882a593Smuzhiyun      been set up during compilation so that they are correct for use when
779*4882a593Smuzhiyun      installed into the sysroot and called by the build processes of other
780*4882a593Smuzhiyun      recipes.
781*4882a593Smuzhiyun
782*4882a593Smuzhiyun      .. note::
783*4882a593Smuzhiyun
784*4882a593Smuzhiyun         The :term:`BINCONFIG_GLOB` variable uses
785*4882a593Smuzhiyun         `shell globbing <https://tldp.org/LDP/abs/html/globbingref.html>`__,
786*4882a593Smuzhiyun         which is recognition and expansion of wildcards during pattern
787*4882a593Smuzhiyun         matching. Shell globbing is very similar to
788*4882a593Smuzhiyun         `fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__
789*4882a593Smuzhiyun         and `glob <https://docs.python.org/3/library/glob.html>`__.
790*4882a593Smuzhiyun
791*4882a593Smuzhiyun      For more information on how this variable works, see
792*4882a593Smuzhiyun      ``meta/classes/binconfig.bbclass`` in the :term:`Source Directory`.
793*4882a593Smuzhiyun      You can also find general
794*4882a593Smuzhiyun      information on the class in the
795*4882a593Smuzhiyun      ":ref:`ref-classes-binconfig`" section.
796*4882a593Smuzhiyun
797*4882a593Smuzhiyun   :term:`BP`
798*4882a593Smuzhiyun      The base recipe name and version but without any special recipe name
799*4882a593Smuzhiyun      suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is
800*4882a593Smuzhiyun      comprised of the following::
801*4882a593Smuzhiyun
802*4882a593Smuzhiyun         ${BPN}-${PV}
803*4882a593Smuzhiyun
804*4882a593Smuzhiyun   :term:`BPN`
805*4882a593Smuzhiyun      This variable is a version of the :term:`PN` variable with
806*4882a593Smuzhiyun      common prefixes and suffixes removed, such as ``nativesdk-``,
807*4882a593Smuzhiyun      ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``.
808*4882a593Smuzhiyun      The exact lists of prefixes and suffixes removed are specified by the
809*4882a593Smuzhiyun      :term:`MLPREFIX` and
810*4882a593Smuzhiyun      :term:`SPECIAL_PKGSUFFIX` variables,
811*4882a593Smuzhiyun      respectively.
812*4882a593Smuzhiyun
813*4882a593Smuzhiyun   :term:`BUGTRACKER`
814*4882a593Smuzhiyun      Specifies a URL for an upstream bug tracking website for a recipe.
815*4882a593Smuzhiyun      The OpenEmbedded build system does not use this variable. Rather, the
816*4882a593Smuzhiyun      variable is a useful pointer in case a bug in the software being
817*4882a593Smuzhiyun      built needs to be manually reported.
818*4882a593Smuzhiyun
819*4882a593Smuzhiyun   :term:`BUILD_ARCH`
820*4882a593Smuzhiyun      Specifies the architecture of the build host (e.g. ``i686``). The
821*4882a593Smuzhiyun      OpenEmbedded build system sets the value of :term:`BUILD_ARCH` from the
822*4882a593Smuzhiyun      machine name reported by the ``uname`` command.
823*4882a593Smuzhiyun
824*4882a593Smuzhiyun   :term:`BUILD_AS_ARCH`
825*4882a593Smuzhiyun      Specifies the architecture-specific assembler flags for the build
826*4882a593Smuzhiyun      host. By default, the value of :term:`BUILD_AS_ARCH` is empty.
827*4882a593Smuzhiyun
828*4882a593Smuzhiyun   :term:`BUILD_CC_ARCH`
829*4882a593Smuzhiyun      Specifies the architecture-specific C compiler flags for the build
830*4882a593Smuzhiyun      host. By default, the value of :term:`BUILD_CC_ARCH` is empty.
831*4882a593Smuzhiyun
832*4882a593Smuzhiyun   :term:`BUILD_CCLD`
833*4882a593Smuzhiyun      Specifies the linker command to be used for the build host when the C
834*4882a593Smuzhiyun      compiler is being used as the linker. By default, :term:`BUILD_CCLD`
835*4882a593Smuzhiyun      points to GCC and passes as arguments the value of
836*4882a593Smuzhiyun      :term:`BUILD_CC_ARCH`, assuming
837*4882a593Smuzhiyun      :term:`BUILD_CC_ARCH` is set.
838*4882a593Smuzhiyun
839*4882a593Smuzhiyun   :term:`BUILD_CFLAGS`
840*4882a593Smuzhiyun      Specifies the flags to pass to the C compiler when building for the
841*4882a593Smuzhiyun      build host. When building in the ``-native`` context,
842*4882a593Smuzhiyun      :term:`CFLAGS` is set to the value of this variable by
843*4882a593Smuzhiyun      default.
844*4882a593Smuzhiyun
845*4882a593Smuzhiyun   :term:`BUILD_CPPFLAGS`
846*4882a593Smuzhiyun      Specifies the flags to pass to the C preprocessor (i.e. to both the C
847*4882a593Smuzhiyun      and the C++ compilers) when building for the build host. When
848*4882a593Smuzhiyun      building in the ``-native`` context, :term:`CPPFLAGS`
849*4882a593Smuzhiyun      is set to the value of this variable by default.
850*4882a593Smuzhiyun
851*4882a593Smuzhiyun   :term:`BUILD_CXXFLAGS`
852*4882a593Smuzhiyun      Specifies the flags to pass to the C++ compiler when building for the
853*4882a593Smuzhiyun      build host. When building in the ``-native`` context,
854*4882a593Smuzhiyun      :term:`CXXFLAGS` is set to the value of this variable
855*4882a593Smuzhiyun      by default.
856*4882a593Smuzhiyun
857*4882a593Smuzhiyun   :term:`BUILD_FC`
858*4882a593Smuzhiyun      Specifies the Fortran compiler command for the build host. By
859*4882a593Smuzhiyun      default, :term:`BUILD_FC` points to Gfortran and passes as arguments the
860*4882a593Smuzhiyun      value of :term:`BUILD_CC_ARCH`, assuming
861*4882a593Smuzhiyun      :term:`BUILD_CC_ARCH` is set.
862*4882a593Smuzhiyun
863*4882a593Smuzhiyun   :term:`BUILD_LD`
864*4882a593Smuzhiyun      Specifies the linker command for the build host. By default,
865*4882a593Smuzhiyun      :term:`BUILD_LD` points to the GNU linker (ld) and passes as arguments
866*4882a593Smuzhiyun      the value of :term:`BUILD_LD_ARCH`, assuming
867*4882a593Smuzhiyun      :term:`BUILD_LD_ARCH` is set.
868*4882a593Smuzhiyun
869*4882a593Smuzhiyun   :term:`BUILD_LD_ARCH`
870*4882a593Smuzhiyun      Specifies architecture-specific linker flags for the build host. By
871*4882a593Smuzhiyun      default, the value of :term:`BUILD_LD_ARCH` is empty.
872*4882a593Smuzhiyun
873*4882a593Smuzhiyun   :term:`BUILD_LDFLAGS`
874*4882a593Smuzhiyun      Specifies the flags to pass to the linker when building for the build
875*4882a593Smuzhiyun      host. When building in the ``-native`` context,
876*4882a593Smuzhiyun      :term:`LDFLAGS` is set to the value of this variable
877*4882a593Smuzhiyun      by default.
878*4882a593Smuzhiyun
879*4882a593Smuzhiyun   :term:`BUILD_OPTIMIZATION`
880*4882a593Smuzhiyun      Specifies the optimization flags passed to the C compiler when
881*4882a593Smuzhiyun      building for the build host or the SDK. The flags are passed through
882*4882a593Smuzhiyun      the :term:`BUILD_CFLAGS` and
883*4882a593Smuzhiyun      :term:`BUILDSDK_CFLAGS` default values.
884*4882a593Smuzhiyun
885*4882a593Smuzhiyun      The default value of the :term:`BUILD_OPTIMIZATION` variable is "-O2
886*4882a593Smuzhiyun      -pipe".
887*4882a593Smuzhiyun
888*4882a593Smuzhiyun   :term:`BUILD_OS`
889*4882a593Smuzhiyun      Specifies the operating system in use on the build host (e.g.
890*4882a593Smuzhiyun      "linux"). The OpenEmbedded build system sets the value of
891*4882a593Smuzhiyun      :term:`BUILD_OS` from the OS reported by the ``uname`` command - the
892*4882a593Smuzhiyun      first word, converted to lower-case characters.
893*4882a593Smuzhiyun
894*4882a593Smuzhiyun   :term:`BUILD_PREFIX`
895*4882a593Smuzhiyun      The toolchain binary prefix used for native recipes. The OpenEmbedded
896*4882a593Smuzhiyun      build system uses the :term:`BUILD_PREFIX` value to set the
897*4882a593Smuzhiyun      :term:`TARGET_PREFIX` when building for
898*4882a593Smuzhiyun      ``native`` recipes.
899*4882a593Smuzhiyun
900*4882a593Smuzhiyun   :term:`BUILD_STRIP`
901*4882a593Smuzhiyun      Specifies the command to be used to strip debugging symbols from
902*4882a593Smuzhiyun      binaries produced for the build host. By default, :term:`BUILD_STRIP`
903*4882a593Smuzhiyun      points to
904*4882a593Smuzhiyun      ``${``\ :term:`BUILD_PREFIX`\ ``}strip``.
905*4882a593Smuzhiyun
906*4882a593Smuzhiyun   :term:`BUILD_SYS`
907*4882a593Smuzhiyun      Specifies the system, including the architecture and the operating
908*4882a593Smuzhiyun      system, to use when building for the build host (i.e. when building
909*4882a593Smuzhiyun      ``native`` recipes).
910*4882a593Smuzhiyun
911*4882a593Smuzhiyun      The OpenEmbedded build system automatically sets this variable based
912*4882a593Smuzhiyun      on :term:`BUILD_ARCH`,
913*4882a593Smuzhiyun      :term:`BUILD_VENDOR`, and
914*4882a593Smuzhiyun      :term:`BUILD_OS`. You do not need to set the
915*4882a593Smuzhiyun      :term:`BUILD_SYS` variable yourself.
916*4882a593Smuzhiyun
917*4882a593Smuzhiyun   :term:`BUILD_VENDOR`
918*4882a593Smuzhiyun      Specifies the vendor name to use when building for the build host.
919*4882a593Smuzhiyun      The default value is an empty string ("").
920*4882a593Smuzhiyun
921*4882a593Smuzhiyun   :term:`BUILDDIR`
922*4882a593Smuzhiyun      Points to the location of the :term:`Build Directory`.
923*4882a593Smuzhiyun      You can define this directory indirectly through the
924*4882a593Smuzhiyun      :ref:`structure-core-script` script by passing in a Build
925*4882a593Smuzhiyun      Directory path when you run the script. If you run the script and do
926*4882a593Smuzhiyun      not provide a Build Directory path, the :term:`BUILDDIR` defaults to
927*4882a593Smuzhiyun      ``build`` in the current directory.
928*4882a593Smuzhiyun
929*4882a593Smuzhiyun   :term:`BUILDHISTORY_COMMIT`
930*4882a593Smuzhiyun      When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
931*4882a593Smuzhiyun      class, this variable specifies whether or not to commit the build
932*4882a593Smuzhiyun      history output in a local Git repository. If set to "1", this local
933*4882a593Smuzhiyun      repository will be maintained automatically by the :ref:`buildhistory <ref-classes-buildhistory>`
934*4882a593Smuzhiyun      class and a commit will be created on every build for changes to each
935*4882a593Smuzhiyun      top-level subdirectory of the build history output (images, packages,
936*4882a593Smuzhiyun      and sdk). If you want to track changes to build history over time,
937*4882a593Smuzhiyun      you should set this value to "1".
938*4882a593Smuzhiyun
939*4882a593Smuzhiyun      By default, the :ref:`buildhistory <ref-classes-buildhistory>` class does not commit the build
940*4882a593Smuzhiyun      history output in a local Git repository::
941*4882a593Smuzhiyun
942*4882a593Smuzhiyun         BUILDHISTORY_COMMIT ?= "0"
943*4882a593Smuzhiyun
944*4882a593Smuzhiyun   :term:`BUILDHISTORY_COMMIT_AUTHOR`
945*4882a593Smuzhiyun      When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
946*4882a593Smuzhiyun      class, this variable specifies the author to use for each Git commit.
947*4882a593Smuzhiyun      In order for the :term:`BUILDHISTORY_COMMIT_AUTHOR` variable to work, the
948*4882a593Smuzhiyun      :term:`BUILDHISTORY_COMMIT` variable must
949*4882a593Smuzhiyun      be set to "1".
950*4882a593Smuzhiyun
951*4882a593Smuzhiyun      Git requires that the value you provide for the
952*4882a593Smuzhiyun      :term:`BUILDHISTORY_COMMIT_AUTHOR` variable takes the form of "name
953*4882a593Smuzhiyun      email@host". Providing an email address or host that is not valid
954*4882a593Smuzhiyun      does not produce an error.
955*4882a593Smuzhiyun
956*4882a593Smuzhiyun      By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
957*4882a593Smuzhiyun
958*4882a593Smuzhiyun         BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
959*4882a593Smuzhiyun
960*4882a593Smuzhiyun   :term:`BUILDHISTORY_DIR`
961*4882a593Smuzhiyun      When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
962*4882a593Smuzhiyun      class, this variable specifies the directory in which build history
963*4882a593Smuzhiyun      information is kept. For more information on how the variable works,
964*4882a593Smuzhiyun      see the :ref:`ref-classes-buildhistory` class.
965*4882a593Smuzhiyun
966*4882a593Smuzhiyun      By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the directory as follows::
967*4882a593Smuzhiyun
968*4882a593Smuzhiyun         BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
969*4882a593Smuzhiyun
970*4882a593Smuzhiyun   :term:`BUILDHISTORY_FEATURES`
971*4882a593Smuzhiyun      When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
972*4882a593Smuzhiyun      class, this variable specifies the build history features to be
973*4882a593Smuzhiyun      enabled. For more information on how build history works, see the
974*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:maintaining build output quality`"
975*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
976*4882a593Smuzhiyun
977*4882a593Smuzhiyun      You can specify these features in the form of a space-separated list:
978*4882a593Smuzhiyun
979*4882a593Smuzhiyun      -  *image:* Analysis of the contents of images, which includes the
980*4882a593Smuzhiyun         list of installed packages among other things.
981*4882a593Smuzhiyun
982*4882a593Smuzhiyun      -  *package:* Analysis of the contents of individual packages.
983*4882a593Smuzhiyun
984*4882a593Smuzhiyun      -  *sdk:* Analysis of the contents of the software development kit
985*4882a593Smuzhiyun         (SDK).
986*4882a593Smuzhiyun
987*4882a593Smuzhiyun      -  *task:* Save output file signatures for
988*4882a593Smuzhiyun         :ref:`shared state <overview-manual/concepts:shared state cache>`
989*4882a593Smuzhiyun         (sstate) tasks.
990*4882a593Smuzhiyun         This saves one file per task and lists the SHA-256 checksums for
991*4882a593Smuzhiyun         each file staged (i.e. the output of the task).
992*4882a593Smuzhiyun
993*4882a593Smuzhiyun      By default, the :ref:`buildhistory <ref-classes-buildhistory>` class enables the following
994*4882a593Smuzhiyun      features::
995*4882a593Smuzhiyun
996*4882a593Smuzhiyun         BUILDHISTORY_FEATURES ?= "image package sdk"
997*4882a593Smuzhiyun
998*4882a593Smuzhiyun   :term:`BUILDHISTORY_IMAGE_FILES`
999*4882a593Smuzhiyun      When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1000*4882a593Smuzhiyun      class, this variable specifies a list of paths to files copied from
1001*4882a593Smuzhiyun      the image contents into the build history directory under an
1002*4882a593Smuzhiyun      "image-files" directory in the directory for the image, so that you
1003*4882a593Smuzhiyun      can track the contents of each file. The default is to copy
1004*4882a593Smuzhiyun      ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for
1005*4882a593Smuzhiyun      changes in user and group entries. You can modify the list to include
1006*4882a593Smuzhiyun      any file. Specifying an invalid path does not produce an error.
1007*4882a593Smuzhiyun      Consequently, you can include files that might not always be present.
1008*4882a593Smuzhiyun
1009*4882a593Smuzhiyun      By default, the :ref:`buildhistory <ref-classes-buildhistory>` class provides paths to the
1010*4882a593Smuzhiyun      following files::
1011*4882a593Smuzhiyun
1012*4882a593Smuzhiyun         BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
1013*4882a593Smuzhiyun
1014*4882a593Smuzhiyun   :term:`BUILDHISTORY_PATH_PREFIX_STRIP`
1015*4882a593Smuzhiyun      When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1016*4882a593Smuzhiyun      class, this variable specifies a common path prefix that should be
1017*4882a593Smuzhiyun      stripped off the beginning of paths in the task signature list when the
1018*4882a593Smuzhiyun      ``task`` feature is active in :term:`BUILDHISTORY_FEATURES`. This can be
1019*4882a593Smuzhiyun      useful when build history is populated from multiple sources that may not
1020*4882a593Smuzhiyun      all use the same top level directory.
1021*4882a593Smuzhiyun
1022*4882a593Smuzhiyun      By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
1023*4882a593Smuzhiyun
1024*4882a593Smuzhiyun         BUILDHISTORY_PATH_PREFIX_STRIP ?= ""
1025*4882a593Smuzhiyun
1026*4882a593Smuzhiyun      In this case, no prefixes will be stripped.
1027*4882a593Smuzhiyun
1028*4882a593Smuzhiyun   :term:`BUILDHISTORY_PUSH_REPO`
1029*4882a593Smuzhiyun      When inheriting the :ref:`buildhistory <ref-classes-buildhistory>`
1030*4882a593Smuzhiyun      class, this variable optionally specifies a remote repository to
1031*4882a593Smuzhiyun      which build history pushes Git changes. In order for
1032*4882a593Smuzhiyun      :term:`BUILDHISTORY_PUSH_REPO` to work,
1033*4882a593Smuzhiyun      :term:`BUILDHISTORY_COMMIT` must be set to
1034*4882a593Smuzhiyun      "1".
1035*4882a593Smuzhiyun
1036*4882a593Smuzhiyun      The repository should correspond to a remote address that specifies a
1037*4882a593Smuzhiyun      repository as understood by Git, or alternatively to a remote name
1038*4882a593Smuzhiyun      that you have set up manually using ``git remote`` within the local
1039*4882a593Smuzhiyun      repository.
1040*4882a593Smuzhiyun
1041*4882a593Smuzhiyun      By default, the :ref:`buildhistory <ref-classes-buildhistory>` class sets the variable as follows::
1042*4882a593Smuzhiyun
1043*4882a593Smuzhiyun         BUILDHISTORY_PUSH_REPO ?= ""
1044*4882a593Smuzhiyun
1045*4882a593Smuzhiyun   :term:`BUILDSDK_CFLAGS`
1046*4882a593Smuzhiyun      Specifies the flags to pass to the C compiler when building for the
1047*4882a593Smuzhiyun      SDK. When building in the ``nativesdk-`` context,
1048*4882a593Smuzhiyun      :term:`CFLAGS` is set to the value of this variable by
1049*4882a593Smuzhiyun      default.
1050*4882a593Smuzhiyun
1051*4882a593Smuzhiyun   :term:`BUILDSDK_CPPFLAGS`
1052*4882a593Smuzhiyun      Specifies the flags to pass to the C pre-processor (i.e. to both the
1053*4882a593Smuzhiyun      C and the C++ compilers) when building for the SDK. When building in
1054*4882a593Smuzhiyun      the ``nativesdk-`` context, :term:`CPPFLAGS` is set
1055*4882a593Smuzhiyun      to the value of this variable by default.
1056*4882a593Smuzhiyun
1057*4882a593Smuzhiyun   :term:`BUILDSDK_CXXFLAGS`
1058*4882a593Smuzhiyun      Specifies the flags to pass to the C++ compiler when building for the
1059*4882a593Smuzhiyun      SDK. When building in the ``nativesdk-`` context,
1060*4882a593Smuzhiyun      :term:`CXXFLAGS` is set to the value of this variable
1061*4882a593Smuzhiyun      by default.
1062*4882a593Smuzhiyun
1063*4882a593Smuzhiyun   :term:`BUILDSDK_LDFLAGS`
1064*4882a593Smuzhiyun      Specifies the flags to pass to the linker when building for the SDK.
1065*4882a593Smuzhiyun      When building in the ``nativesdk-`` context,
1066*4882a593Smuzhiyun      :term:`LDFLAGS` is set to the value of this variable
1067*4882a593Smuzhiyun      by default.
1068*4882a593Smuzhiyun
1069*4882a593Smuzhiyun   :term:`BUILDSTATS_BASE`
1070*4882a593Smuzhiyun      Points to the location of the directory that holds build statistics
1071*4882a593Smuzhiyun      when you use and enable the
1072*4882a593Smuzhiyun      :ref:`buildstats <ref-classes-buildstats>` class. The
1073*4882a593Smuzhiyun      :term:`BUILDSTATS_BASE` directory defaults to
1074*4882a593Smuzhiyun      ``${``\ :term:`TMPDIR`\ ``}/buildstats/``.
1075*4882a593Smuzhiyun
1076*4882a593Smuzhiyun   :term:`BUSYBOX_SPLIT_SUID`
1077*4882a593Smuzhiyun      For the BusyBox recipe, specifies whether to split the output
1078*4882a593Smuzhiyun      executable file into two parts: one for features that require
1079*4882a593Smuzhiyun      ``setuid root``, and one for the remaining features (i.e. those that
1080*4882a593Smuzhiyun      do not require ``setuid root``).
1081*4882a593Smuzhiyun
1082*4882a593Smuzhiyun      The :term:`BUSYBOX_SPLIT_SUID` variable defaults to "1", which results in
1083*4882a593Smuzhiyun      splitting the output executable file. Set the variable to "0" to get
1084*4882a593Smuzhiyun      a single output executable file.
1085*4882a593Smuzhiyun
1086*4882a593Smuzhiyun   :term:`CACHE`
1087*4882a593Smuzhiyun      Specifies the directory BitBake uses to store a cache of the
1088*4882a593Smuzhiyun      :term:`Metadata` so it does not need to be parsed every time
1089*4882a593Smuzhiyun      BitBake is started.
1090*4882a593Smuzhiyun
1091*4882a593Smuzhiyun   :term:`CC`
1092*4882a593Smuzhiyun      The minimal command and arguments used to run the C compiler.
1093*4882a593Smuzhiyun
1094*4882a593Smuzhiyun   :term:`CFLAGS`
1095*4882a593Smuzhiyun      Specifies the flags to pass to the C compiler. This variable is
1096*4882a593Smuzhiyun      exported to an environment variable and thus made visible to the
1097*4882a593Smuzhiyun      software being built during the compilation step.
1098*4882a593Smuzhiyun
1099*4882a593Smuzhiyun      Default initialization for :term:`CFLAGS` varies depending on what is
1100*4882a593Smuzhiyun      being built:
1101*4882a593Smuzhiyun
1102*4882a593Smuzhiyun      -  :term:`TARGET_CFLAGS` when building for the
1103*4882a593Smuzhiyun         target
1104*4882a593Smuzhiyun
1105*4882a593Smuzhiyun      -  :term:`BUILD_CFLAGS` when building for the
1106*4882a593Smuzhiyun         build host (i.e. ``-native``)
1107*4882a593Smuzhiyun
1108*4882a593Smuzhiyun      -  :term:`BUILDSDK_CFLAGS` when building for
1109*4882a593Smuzhiyun         an SDK (i.e. ``nativesdk-``)
1110*4882a593Smuzhiyun
1111*4882a593Smuzhiyun   :term:`CLASSOVERRIDE`
1112*4882a593Smuzhiyun      An internal variable specifying the special class override that
1113*4882a593Smuzhiyun      should currently apply (e.g. "class-target", "class-native", and so
1114*4882a593Smuzhiyun      forth). The classes that use this variable (e.g.
1115*4882a593Smuzhiyun      :ref:`native <ref-classes-native>`,
1116*4882a593Smuzhiyun      :ref:`nativesdk <ref-classes-nativesdk>`, and so forth) set the
1117*4882a593Smuzhiyun      variable to appropriate values.
1118*4882a593Smuzhiyun
1119*4882a593Smuzhiyun      .. note::
1120*4882a593Smuzhiyun
1121*4882a593Smuzhiyun         :term:`CLASSOVERRIDE` gets its default "class-target" value from the
1122*4882a593Smuzhiyun         ``bitbake.conf`` file.
1123*4882a593Smuzhiyun
1124*4882a593Smuzhiyun      As an example, the following override allows you to install extra
1125*4882a593Smuzhiyun      files, but only when building for the target::
1126*4882a593Smuzhiyun
1127*4882a593Smuzhiyun         do_install:append:class-target() {
1128*4882a593Smuzhiyun             install my-extra-file ${D}${sysconfdir}
1129*4882a593Smuzhiyun         }
1130*4882a593Smuzhiyun
1131*4882a593Smuzhiyun      Here is an example where ``FOO`` is set to
1132*4882a593Smuzhiyun      "native" when building for the build host, and to "other" when not
1133*4882a593Smuzhiyun      building for the build host::
1134*4882a593Smuzhiyun
1135*4882a593Smuzhiyun         FOO:class-native = "native"
1136*4882a593Smuzhiyun         FOO = "other"
1137*4882a593Smuzhiyun
1138*4882a593Smuzhiyun      The underlying mechanism behind :term:`CLASSOVERRIDE` is simply
1139*4882a593Smuzhiyun      that it is included in the default value of
1140*4882a593Smuzhiyun      :term:`OVERRIDES`.
1141*4882a593Smuzhiyun
1142*4882a593Smuzhiyun   :term:`CLEANBROKEN`
1143*4882a593Smuzhiyun      If set to "1" within a recipe, :term:`CLEANBROKEN` specifies that the
1144*4882a593Smuzhiyun      ``make clean`` command does not work for the software being built.
1145*4882a593Smuzhiyun      Consequently, the OpenEmbedded build system will not try to run
1146*4882a593Smuzhiyun      ``make clean`` during the :ref:`ref-tasks-configure`
1147*4882a593Smuzhiyun      task, which is the default behavior.
1148*4882a593Smuzhiyun
1149*4882a593Smuzhiyun   :term:`COMBINED_FEATURES`
1150*4882a593Smuzhiyun      Provides a list of hardware features that are enabled in both
1151*4882a593Smuzhiyun      :term:`MACHINE_FEATURES` and
1152*4882a593Smuzhiyun      :term:`DISTRO_FEATURES`. This select list of
1153*4882a593Smuzhiyun      features contains features that make sense to be controlled both at
1154*4882a593Smuzhiyun      the machine and distribution configuration level. For example, the
1155*4882a593Smuzhiyun      "bluetooth" feature requires hardware support but should also be
1156*4882a593Smuzhiyun      optional at the distribution level, in case the hardware supports
1157*4882a593Smuzhiyun      Bluetooth but you do not ever intend to use it.
1158*4882a593Smuzhiyun
1159*4882a593Smuzhiyun   :term:`COMMON_LICENSE_DIR`
1160*4882a593Smuzhiyun      Points to ``meta/files/common-licenses`` in the
1161*4882a593Smuzhiyun      :term:`Source Directory`, which is where generic license
1162*4882a593Smuzhiyun      files reside.
1163*4882a593Smuzhiyun
1164*4882a593Smuzhiyun   :term:`COMPATIBLE_HOST`
1165*4882a593Smuzhiyun      A regular expression that resolves to one or more hosts (when the
1166*4882a593Smuzhiyun      recipe is native) or one or more targets (when the recipe is
1167*4882a593Smuzhiyun      non-native) with which a recipe is compatible. The regular expression
1168*4882a593Smuzhiyun      is matched against :term:`HOST_SYS`. You can use the
1169*4882a593Smuzhiyun      variable to stop recipes from being built for classes of systems with
1170*4882a593Smuzhiyun      which the recipes are not compatible. Stopping these builds is
1171*4882a593Smuzhiyun      particularly useful with kernels. The variable also helps to increase
1172*4882a593Smuzhiyun      parsing speed since the build system skips parsing recipes not
1173*4882a593Smuzhiyun      compatible with the current system.
1174*4882a593Smuzhiyun
1175*4882a593Smuzhiyun   :term:`COMPATIBLE_MACHINE`
1176*4882a593Smuzhiyun      A regular expression that resolves to one or more target machines
1177*4882a593Smuzhiyun      with which a recipe is compatible. The regular expression is matched
1178*4882a593Smuzhiyun      against :term:`MACHINEOVERRIDES`. You can use
1179*4882a593Smuzhiyun      the variable to stop recipes from being built for machines with which
1180*4882a593Smuzhiyun      the recipes are not compatible. Stopping these builds is particularly
1181*4882a593Smuzhiyun      useful with kernels. The variable also helps to increase parsing
1182*4882a593Smuzhiyun      speed since the build system skips parsing recipes not compatible
1183*4882a593Smuzhiyun      with the current machine.
1184*4882a593Smuzhiyun
1185*4882a593Smuzhiyun   :term:`COMPLEMENTARY_GLOB`
1186*4882a593Smuzhiyun      Defines wildcards to match when installing a list of complementary
1187*4882a593Smuzhiyun      packages for all the packages explicitly (or implicitly) installed in
1188*4882a593Smuzhiyun      an image.
1189*4882a593Smuzhiyun
1190*4882a593Smuzhiyun      .. note::
1191*4882a593Smuzhiyun
1192*4882a593Smuzhiyun         The :term:`COMPLEMENTARY_GLOB` variable uses Unix filename pattern matching
1193*4882a593Smuzhiyun         (`fnmatch <https://docs.python.org/3/library/fnmatch.html#module-fnmatch>`__),
1194*4882a593Smuzhiyun         which is similar to the Unix style pathname pattern expansion
1195*4882a593Smuzhiyun         (`glob <https://docs.python.org/3/library/glob.html>`__).
1196*4882a593Smuzhiyun
1197*4882a593Smuzhiyun      The resulting list of complementary packages is associated with an
1198*4882a593Smuzhiyun      item that can be added to
1199*4882a593Smuzhiyun      :term:`IMAGE_FEATURES`. An example usage of
1200*4882a593Smuzhiyun      this is the "dev-pkgs" item that when added to :term:`IMAGE_FEATURES`
1201*4882a593Smuzhiyun      will install -dev packages (containing headers and other development
1202*4882a593Smuzhiyun      files) for every package in the image.
1203*4882a593Smuzhiyun
1204*4882a593Smuzhiyun      To add a new feature item pointing to a wildcard, use a variable flag
1205*4882a593Smuzhiyun      to specify the feature item name and use the value to specify the
1206*4882a593Smuzhiyun      wildcard. Here is an example::
1207*4882a593Smuzhiyun
1208*4882a593Smuzhiyun         COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1209*4882a593Smuzhiyun
1210*4882a593Smuzhiyun   :term:`COMPONENTS_DIR`
1211*4882a593Smuzhiyun      Stores sysroot components for each recipe. The OpenEmbedded build
1212*4882a593Smuzhiyun      system uses :term:`COMPONENTS_DIR` when constructing recipe-specific
1213*4882a593Smuzhiyun      sysroots for other recipes.
1214*4882a593Smuzhiyun
1215*4882a593Smuzhiyun      The default is
1216*4882a593Smuzhiyun      "``${``\ :term:`STAGING_DIR`\ ``}-components``."
1217*4882a593Smuzhiyun      (i.e.
1218*4882a593Smuzhiyun      "``${``\ :term:`TMPDIR`\ ``}/sysroots-components``").
1219*4882a593Smuzhiyun
1220*4882a593Smuzhiyun   :term:`CONF_VERSION`
1221*4882a593Smuzhiyun      Tracks the version of the local configuration file (i.e.
1222*4882a593Smuzhiyun      ``local.conf``). The value for :term:`CONF_VERSION` increments each time
1223*4882a593Smuzhiyun      ``build/conf/`` compatibility changes.
1224*4882a593Smuzhiyun
1225*4882a593Smuzhiyun   :term:`CONFFILES`
1226*4882a593Smuzhiyun      Identifies editable or configurable files that are part of a package.
1227*4882a593Smuzhiyun      If the Package Management System (PMS) is being used to update
1228*4882a593Smuzhiyun      packages on the target system, it is possible that configuration
1229*4882a593Smuzhiyun      files you have changed after the original installation and that you
1230*4882a593Smuzhiyun      now want to remain unchanged are overwritten. In other words,
1231*4882a593Smuzhiyun      editable files might exist in the package that you do not want reset
1232*4882a593Smuzhiyun      as part of the package update process. You can use the :term:`CONFFILES`
1233*4882a593Smuzhiyun      variable to list the files in the package that you wish to prevent
1234*4882a593Smuzhiyun      the PMS from overwriting during this update process.
1235*4882a593Smuzhiyun
1236*4882a593Smuzhiyun      To use the :term:`CONFFILES` variable, provide a package name override
1237*4882a593Smuzhiyun      that identifies the resulting package. Then, provide a
1238*4882a593Smuzhiyun      space-separated list of files. Here is an example::
1239*4882a593Smuzhiyun
1240*4882a593Smuzhiyun         CONFFILES:${PN} += "${sysconfdir}/file1 \
1241*4882a593Smuzhiyun             ${sysconfdir}/file2 ${sysconfdir}/file3"
1242*4882a593Smuzhiyun
1243*4882a593Smuzhiyun      There is a relationship between the :term:`CONFFILES` and :term:`FILES`
1244*4882a593Smuzhiyun      variables. The files listed within :term:`CONFFILES` must be a subset of
1245*4882a593Smuzhiyun      the files listed within :term:`FILES`. Because the configuration files
1246*4882a593Smuzhiyun      you provide with :term:`CONFFILES` are simply being identified so that
1247*4882a593Smuzhiyun      the PMS will not overwrite them, it makes sense that the files must
1248*4882a593Smuzhiyun      already be included as part of the package through the :term:`FILES`
1249*4882a593Smuzhiyun      variable.
1250*4882a593Smuzhiyun
1251*4882a593Smuzhiyun      .. note::
1252*4882a593Smuzhiyun
1253*4882a593Smuzhiyun         When specifying paths as part of the :term:`CONFFILES` variable, it is
1254*4882a593Smuzhiyun         good practice to use appropriate path variables.
1255*4882a593Smuzhiyun         For example, ``${sysconfdir}`` rather than ``/etc`` or ``${bindir}``
1256*4882a593Smuzhiyun         rather than ``/usr/bin``. You can find a list of these variables at
1257*4882a593Smuzhiyun         the top of the ``meta/conf/bitbake.conf`` file in the
1258*4882a593Smuzhiyun         :term:`Source Directory`.
1259*4882a593Smuzhiyun
1260*4882a593Smuzhiyun   :term:`CONFIG_INITRAMFS_SOURCE`
1261*4882a593Smuzhiyun      Identifies the initial RAM filesystem (initramfs) source files. The
1262*4882a593Smuzhiyun      OpenEmbedded build system receives and uses this kernel Kconfig
1263*4882a593Smuzhiyun      variable as an environment variable. By default, the variable is set
1264*4882a593Smuzhiyun      to null ("").
1265*4882a593Smuzhiyun
1266*4882a593Smuzhiyun      The :term:`CONFIG_INITRAMFS_SOURCE` can be either a single cpio archive
1267*4882a593Smuzhiyun      with a ``.cpio`` suffix or a space-separated list of directories and
1268*4882a593Smuzhiyun      files for building the initramfs image. A cpio archive should contain
1269*4882a593Smuzhiyun      a filesystem archive to be used as an initramfs image. Directories
1270*4882a593Smuzhiyun      should contain a filesystem layout to be included in the initramfs
1271*4882a593Smuzhiyun      image. Files should contain entries according to the format described
1272*4882a593Smuzhiyun      by the ``usr/gen_init_cpio`` program in the kernel tree.
1273*4882a593Smuzhiyun
1274*4882a593Smuzhiyun      If you specify multiple directories and files, the initramfs image
1275*4882a593Smuzhiyun      will be the aggregate of all of them.
1276*4882a593Smuzhiyun
1277*4882a593Smuzhiyun      For information on creating an initramfs, see the
1278*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
1279*4882a593Smuzhiyun      in the Yocto Project Development Tasks Manual.
1280*4882a593Smuzhiyun
1281*4882a593Smuzhiyun   :term:`CONFIG_SITE`
1282*4882a593Smuzhiyun      A list of files that contains ``autoconf`` test results relevant to
1283*4882a593Smuzhiyun      the current build. This variable is used by the Autotools utilities
1284*4882a593Smuzhiyun      when running ``configure``.
1285*4882a593Smuzhiyun
1286*4882a593Smuzhiyun   :term:`CONFIGURE_FLAGS`
1287*4882a593Smuzhiyun      The minimal arguments for GNU configure.
1288*4882a593Smuzhiyun
1289*4882a593Smuzhiyun   :term:`CONFLICT_DISTRO_FEATURES`
1290*4882a593Smuzhiyun      When inheriting the
1291*4882a593Smuzhiyun      :ref:`features_check <ref-classes-features_check>`
1292*4882a593Smuzhiyun      class, this variable identifies distribution features that would be
1293*4882a593Smuzhiyun      in conflict should the recipe be built. In other words, if the
1294*4882a593Smuzhiyun      :term:`CONFLICT_DISTRO_FEATURES` variable lists a feature that also
1295*4882a593Smuzhiyun      appears in :term:`DISTRO_FEATURES` within the current configuration, then
1296*4882a593Smuzhiyun      the recipe will be skipped, and if the build system attempts to build
1297*4882a593Smuzhiyun      the recipe then an error will be triggered.
1298*4882a593Smuzhiyun
1299*4882a593Smuzhiyun   :term:`COPY_LIC_DIRS`
1300*4882a593Smuzhiyun      If set to "1" along with the
1301*4882a593Smuzhiyun      :term:`COPY_LIC_MANIFEST` variable, the
1302*4882a593Smuzhiyun      OpenEmbedded build system copies into the image the license files,
1303*4882a593Smuzhiyun      which are located in ``/usr/share/common-licenses``, for each
1304*4882a593Smuzhiyun      package. The license files are placed in directories within the image
1305*4882a593Smuzhiyun      itself during build time.
1306*4882a593Smuzhiyun
1307*4882a593Smuzhiyun      .. note::
1308*4882a593Smuzhiyun
1309*4882a593Smuzhiyun         The :term:`COPY_LIC_DIRS` does not offer a path for adding licenses for
1310*4882a593Smuzhiyun         newly installed packages to an image, which might be most suitable for
1311*4882a593Smuzhiyun         read-only filesystems that cannot be upgraded. See the
1312*4882a593Smuzhiyun         :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
1313*4882a593Smuzhiyun         You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
1314*4882a593Smuzhiyun         section in the Yocto Project Development Tasks Manual for
1315*4882a593Smuzhiyun         information on providing license text.
1316*4882a593Smuzhiyun
1317*4882a593Smuzhiyun   :term:`COPY_LIC_MANIFEST`
1318*4882a593Smuzhiyun      If set to "1", the OpenEmbedded build system copies the license
1319*4882a593Smuzhiyun      manifest for the image to
1320*4882a593Smuzhiyun      ``/usr/share/common-licenses/license.manifest`` within the image
1321*4882a593Smuzhiyun      itself during build time.
1322*4882a593Smuzhiyun
1323*4882a593Smuzhiyun      .. note::
1324*4882a593Smuzhiyun
1325*4882a593Smuzhiyun         The :term:`COPY_LIC_MANIFEST` does not offer a path for adding licenses for
1326*4882a593Smuzhiyun         newly installed packages to an image, which might be most suitable for
1327*4882a593Smuzhiyun         read-only filesystems that cannot be upgraded. See the
1328*4882a593Smuzhiyun         :term:`LICENSE_CREATE_PACKAGE` variable for additional information.
1329*4882a593Smuzhiyun         You can also reference the ":ref:`dev-manual/common-tasks:providing license text`"
1330*4882a593Smuzhiyun         section in the Yocto Project Development Tasks Manual for
1331*4882a593Smuzhiyun         information on providing license text.
1332*4882a593Smuzhiyun
1333*4882a593Smuzhiyun   :term:`COPYLEFT_LICENSE_EXCLUDE`
1334*4882a593Smuzhiyun      A space-separated list of licenses to exclude from the source
1335*4882a593Smuzhiyun      archived by the :ref:`archiver <ref-classes-archiver>` class. In
1336*4882a593Smuzhiyun      other words, if a license in a recipe's
1337*4882a593Smuzhiyun      :term:`LICENSE` value is in the value of
1338*4882a593Smuzhiyun      :term:`COPYLEFT_LICENSE_EXCLUDE`, then its source is not archived by the
1339*4882a593Smuzhiyun      class.
1340*4882a593Smuzhiyun
1341*4882a593Smuzhiyun      .. note::
1342*4882a593Smuzhiyun
1343*4882a593Smuzhiyun         The :term:`COPYLEFT_LICENSE_EXCLUDE` variable takes precedence over the
1344*4882a593Smuzhiyun         :term:`COPYLEFT_LICENSE_INCLUDE` variable.
1345*4882a593Smuzhiyun
1346*4882a593Smuzhiyun      The default value, which is "CLOSED Proprietary", for
1347*4882a593Smuzhiyun      :term:`COPYLEFT_LICENSE_EXCLUDE` is set by the
1348*4882a593Smuzhiyun      :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
1349*4882a593Smuzhiyun      is inherited by the :ref:`archiver <ref-classes-archiver>` class.
1350*4882a593Smuzhiyun
1351*4882a593Smuzhiyun   :term:`COPYLEFT_LICENSE_INCLUDE`
1352*4882a593Smuzhiyun      A space-separated list of licenses to include in the source archived
1353*4882a593Smuzhiyun      by the :ref:`archiver <ref-classes-archiver>` class. In other
1354*4882a593Smuzhiyun      words, if a license in a recipe's :term:`LICENSE`
1355*4882a593Smuzhiyun      value is in the value of :term:`COPYLEFT_LICENSE_INCLUDE`, then its
1356*4882a593Smuzhiyun      source is archived by the class.
1357*4882a593Smuzhiyun
1358*4882a593Smuzhiyun      The default value is set by the
1359*4882a593Smuzhiyun      :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
1360*4882a593Smuzhiyun      is inherited by the :ref:`archiver <ref-classes-archiver>` class. The default value includes
1361*4882a593Smuzhiyun      "GPL*", "LGPL*", and "AGPL*".
1362*4882a593Smuzhiyun
1363*4882a593Smuzhiyun   :term:`COPYLEFT_PN_EXCLUDE`
1364*4882a593Smuzhiyun      A list of recipes to exclude in the source archived by the
1365*4882a593Smuzhiyun      :ref:`archiver <ref-classes-archiver>` class. The
1366*4882a593Smuzhiyun      :term:`COPYLEFT_PN_EXCLUDE` variable overrides the license inclusion and
1367*4882a593Smuzhiyun      exclusion caused through the
1368*4882a593Smuzhiyun      :term:`COPYLEFT_LICENSE_INCLUDE` and
1369*4882a593Smuzhiyun      :term:`COPYLEFT_LICENSE_EXCLUDE`
1370*4882a593Smuzhiyun      variables, respectively.
1371*4882a593Smuzhiyun
1372*4882a593Smuzhiyun      The default value, which is "" indicating to not explicitly exclude
1373*4882a593Smuzhiyun      any recipes by name, for :term:`COPYLEFT_PN_EXCLUDE` is set by the
1374*4882a593Smuzhiyun      :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
1375*4882a593Smuzhiyun      is inherited by the :ref:`archiver <ref-classes-archiver>` class.
1376*4882a593Smuzhiyun
1377*4882a593Smuzhiyun   :term:`COPYLEFT_PN_INCLUDE`
1378*4882a593Smuzhiyun      A list of recipes to include in the source archived by the
1379*4882a593Smuzhiyun      :ref:`archiver <ref-classes-archiver>` class. The
1380*4882a593Smuzhiyun      :term:`COPYLEFT_PN_INCLUDE` variable overrides the license inclusion and
1381*4882a593Smuzhiyun      exclusion caused through the
1382*4882a593Smuzhiyun      :term:`COPYLEFT_LICENSE_INCLUDE` and
1383*4882a593Smuzhiyun      :term:`COPYLEFT_LICENSE_EXCLUDE`
1384*4882a593Smuzhiyun      variables, respectively.
1385*4882a593Smuzhiyun
1386*4882a593Smuzhiyun      The default value, which is "" indicating to not explicitly include
1387*4882a593Smuzhiyun      any recipes by name, for :term:`COPYLEFT_PN_INCLUDE` is set by the
1388*4882a593Smuzhiyun      :ref:`copyleft_filter <ref-classes-copyleft_filter>` class, which
1389*4882a593Smuzhiyun      is inherited by the :ref:`archiver <ref-classes-archiver>` class.
1390*4882a593Smuzhiyun
1391*4882a593Smuzhiyun   :term:`COPYLEFT_RECIPE_TYPES`
1392*4882a593Smuzhiyun      A space-separated list of recipe types to include in the source
1393*4882a593Smuzhiyun      archived by the :ref:`archiver <ref-classes-archiver>` class.
1394*4882a593Smuzhiyun      Recipe types are ``target``, ``native``, ``nativesdk``, ``cross``,
1395*4882a593Smuzhiyun      ``crosssdk``, and ``cross-canadian``.
1396*4882a593Smuzhiyun
1397*4882a593Smuzhiyun      The default value, which is "target*", for :term:`COPYLEFT_RECIPE_TYPES`
1398*4882a593Smuzhiyun      is set by the :ref:`copyleft_filter <ref-classes-copyleft_filter>`
1399*4882a593Smuzhiyun      class, which is inherited by the :ref:`archiver <ref-classes-archiver>` class.
1400*4882a593Smuzhiyun
1401*4882a593Smuzhiyun   :term:`CORE_IMAGE_EXTRA_INSTALL`
1402*4882a593Smuzhiyun      Specifies the list of packages to be added to the image. You should
1403*4882a593Smuzhiyun      only set this variable in the ``local.conf`` configuration file found
1404*4882a593Smuzhiyun      in the :term:`Build Directory`.
1405*4882a593Smuzhiyun
1406*4882a593Smuzhiyun      This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer
1407*4882a593Smuzhiyun      supported.
1408*4882a593Smuzhiyun
1409*4882a593Smuzhiyun   :term:`COREBASE`
1410*4882a593Smuzhiyun      Specifies the parent directory of the OpenEmbedded-Core Metadata
1411*4882a593Smuzhiyun      layer (i.e. ``meta``).
1412*4882a593Smuzhiyun
1413*4882a593Smuzhiyun      It is an important distinction that :term:`COREBASE` points to the parent
1414*4882a593Smuzhiyun      of this layer and not the layer itself. Consider an example where you
1415*4882a593Smuzhiyun      have cloned the Poky Git repository and retained the ``poky`` name
1416*4882a593Smuzhiyun      for your local copy of the repository. In this case, :term:`COREBASE`
1417*4882a593Smuzhiyun      points to the ``poky`` folder because it is the parent directory of
1418*4882a593Smuzhiyun      the ``poky/meta`` layer.
1419*4882a593Smuzhiyun
1420*4882a593Smuzhiyun   :term:`COREBASE_FILES`
1421*4882a593Smuzhiyun      Lists files from the :term:`COREBASE` directory that
1422*4882a593Smuzhiyun      should be copied other than the layers listed in the
1423*4882a593Smuzhiyun      ``bblayers.conf`` file. The :term:`COREBASE_FILES` variable allows
1424*4882a593Smuzhiyun      to copy metadata from the OpenEmbedded build system
1425*4882a593Smuzhiyun      into the extensible SDK.
1426*4882a593Smuzhiyun
1427*4882a593Smuzhiyun      Explicitly listing files in :term:`COREBASE` is needed because it
1428*4882a593Smuzhiyun      typically contains build directories and other files that should not
1429*4882a593Smuzhiyun      normally be copied into the extensible SDK. Consequently, the value
1430*4882a593Smuzhiyun      of :term:`COREBASE_FILES` is used in order to only copy the files that
1431*4882a593Smuzhiyun      are actually needed.
1432*4882a593Smuzhiyun
1433*4882a593Smuzhiyun   :term:`CPP`
1434*4882a593Smuzhiyun      The minimal command and arguments used to run the C preprocessor.
1435*4882a593Smuzhiyun
1436*4882a593Smuzhiyun   :term:`CPPFLAGS`
1437*4882a593Smuzhiyun      Specifies the flags to pass to the C pre-processor (i.e. to both the
1438*4882a593Smuzhiyun      C and the C++ compilers). This variable is exported to an environment
1439*4882a593Smuzhiyun      variable and thus made visible to the software being built during the
1440*4882a593Smuzhiyun      compilation step.
1441*4882a593Smuzhiyun
1442*4882a593Smuzhiyun      Default initialization for :term:`CPPFLAGS` varies depending on what is
1443*4882a593Smuzhiyun      being built:
1444*4882a593Smuzhiyun
1445*4882a593Smuzhiyun      -  :term:`TARGET_CPPFLAGS` when building for
1446*4882a593Smuzhiyun         the target
1447*4882a593Smuzhiyun
1448*4882a593Smuzhiyun      -  :term:`BUILD_CPPFLAGS` when building for the
1449*4882a593Smuzhiyun         build host (i.e. ``-native``)
1450*4882a593Smuzhiyun
1451*4882a593Smuzhiyun      -  :term:`BUILDSDK_CPPFLAGS` when building
1452*4882a593Smuzhiyun         for an SDK (i.e. ``nativesdk-``)
1453*4882a593Smuzhiyun
1454*4882a593Smuzhiyun   :term:`CROSS_COMPILE`
1455*4882a593Smuzhiyun      The toolchain binary prefix for the target tools. The
1456*4882a593Smuzhiyun      :term:`CROSS_COMPILE` variable is the same as the
1457*4882a593Smuzhiyun      :term:`TARGET_PREFIX` variable.
1458*4882a593Smuzhiyun
1459*4882a593Smuzhiyun      .. note::
1460*4882a593Smuzhiyun
1461*4882a593Smuzhiyun         The OpenEmbedded build system sets the :term:`CROSS_COMPILE`
1462*4882a593Smuzhiyun         variable only in certain contexts (e.g. when building for kernel
1463*4882a593Smuzhiyun         and kernel module recipes).
1464*4882a593Smuzhiyun
1465*4882a593Smuzhiyun   :term:`CVE_CHECK_IGNORE`
1466*4882a593Smuzhiyun      The list of CVE IDs which are ignored. Here is
1467*4882a593Smuzhiyun      an example from the :oe_layerindex:`Python3 recipe</layerindex/recipe/23823>`::
1468*4882a593Smuzhiyun
1469*4882a593Smuzhiyun         # This is windows only issue.
1470*4882a593Smuzhiyun         CVE_CHECK_IGNORE += "CVE-2020-15523"
1471*4882a593Smuzhiyun
1472*4882a593Smuzhiyun   :term:`CVE_CHECK_SHOW_WARNINGS`
1473*4882a593Smuzhiyun      Specifies whether or not the :ref:`cve-check <ref-classes-cve-check>`
1474*4882a593Smuzhiyun      class should generate warning messages on the console when unpatched
1475*4882a593Smuzhiyun      CVEs are found. The default is "1", but you may wish to set it to "0" if
1476*4882a593Smuzhiyun      you are already examining/processing the logs after the build has
1477*4882a593Smuzhiyun      completed and thus do not need the warning messages.
1478*4882a593Smuzhiyun
1479*4882a593Smuzhiyun   :term:`CVE_CHECK_SKIP_RECIPE`
1480*4882a593Smuzhiyun      The list of package names (:term:`PN`) for which
1481*4882a593Smuzhiyun      CVEs (Common Vulnerabilities and Exposures) are ignored.
1482*4882a593Smuzhiyun
1483*4882a593Smuzhiyun   :term:`CVE_DB_UPDATE_INTERVAL`
1484*4882a593Smuzhiyun      Specifies the CVE database update interval in seconds, as used by
1485*4882a593Smuzhiyun      ``cve-update-db-native``. The default value is "86400" i.e. once a day
1486*4882a593Smuzhiyun      (24*60*60). If the value is set to "0" then the update will be forced
1487*4882a593Smuzhiyun      every time. Alternatively, a negative value e.g. "-1" will disable
1488*4882a593Smuzhiyun      updates entirely.
1489*4882a593Smuzhiyun
1490*4882a593Smuzhiyun   :term:`CVE_PRODUCT`
1491*4882a593Smuzhiyun      In a recipe, defines the name used to match the recipe name
1492*4882a593Smuzhiyun      against the name in the upstream `NIST CVE database <https://nvd.nist.gov/>`__.
1493*4882a593Smuzhiyun
1494*4882a593Smuzhiyun      The default is ${:term:`BPN`} (except for recipes that inherit the
1495*4882a593Smuzhiyun      :ref:`pypi <ref-classes-pypi>` class where it is set based upon
1496*4882a593Smuzhiyun      :term:`PYPI_PACKAGE`). If it does not match the name in the NIST CVE
1497*4882a593Smuzhiyun      database or matches with multiple entries in the database, the default
1498*4882a593Smuzhiyun      value needs to be changed.
1499*4882a593Smuzhiyun
1500*4882a593Smuzhiyun      Here is an example from the :oe_layerindex:`Berkeley DB recipe </layerindex/recipe/544>`::
1501*4882a593Smuzhiyun
1502*4882a593Smuzhiyun         CVE_PRODUCT = "oracle_berkeley_db berkeley_db"
1503*4882a593Smuzhiyun
1504*4882a593Smuzhiyun      Sometimes the product name is not specific enough, for example
1505*4882a593Smuzhiyun      "tar" has been matching CVEs for the GNU ``tar`` package and also
1506*4882a593Smuzhiyun      the ``node-tar`` node.js extension. To avoid this problem, use the
1507*4882a593Smuzhiyun      vendor name as a prefix. The syntax for this is::
1508*4882a593Smuzhiyun
1509*4882a593Smuzhiyun         CVE_PRODUCT = "vendor:package"
1510*4882a593Smuzhiyun
1511*4882a593Smuzhiyun   :term:`CVE_VERSION`
1512*4882a593Smuzhiyun      In a recipe, defines the version used to match the recipe version
1513*4882a593Smuzhiyun      against the version in the `NIST CVE database <https://nvd.nist.gov/>`__
1514*4882a593Smuzhiyun      when usign :ref:`cve-check <ref-classes-cve-check>`.
1515*4882a593Smuzhiyun
1516*4882a593Smuzhiyun      The default is ${:term:`PV`} but if recipes use custom version numbers
1517*4882a593Smuzhiyun      which do not map to upstream software component release versions and the versions
1518*4882a593Smuzhiyun      used in the CVE database, then this variable can be used to set the
1519*4882a593Smuzhiyun      version number for :ref:`cve-check <ref-classes-cve-check>`. Example::
1520*4882a593Smuzhiyun
1521*4882a593Smuzhiyun          CVE_VERSION = "2.39"
1522*4882a593Smuzhiyun
1523*4882a593Smuzhiyun   :term:`CVSDIR`
1524*4882a593Smuzhiyun      The directory in which files checked out under the CVS system are
1525*4882a593Smuzhiyun      stored.
1526*4882a593Smuzhiyun
1527*4882a593Smuzhiyun   :term:`CXX`
1528*4882a593Smuzhiyun      The minimal command and arguments used to run the C++ compiler.
1529*4882a593Smuzhiyun
1530*4882a593Smuzhiyun   :term:`CXXFLAGS`
1531*4882a593Smuzhiyun      Specifies the flags to pass to the C++ compiler. This variable is
1532*4882a593Smuzhiyun      exported to an environment variable and thus made visible to the
1533*4882a593Smuzhiyun      software being built during the compilation step.
1534*4882a593Smuzhiyun
1535*4882a593Smuzhiyun      Default initialization for :term:`CXXFLAGS` varies depending on what is
1536*4882a593Smuzhiyun      being built:
1537*4882a593Smuzhiyun
1538*4882a593Smuzhiyun      -  :term:`TARGET_CXXFLAGS` when building for
1539*4882a593Smuzhiyun         the target
1540*4882a593Smuzhiyun
1541*4882a593Smuzhiyun      -  :term:`BUILD_CXXFLAGS` when building for the
1542*4882a593Smuzhiyun         build host (i.e. ``-native``)
1543*4882a593Smuzhiyun
1544*4882a593Smuzhiyun      -  :term:`BUILDSDK_CXXFLAGS` when building
1545*4882a593Smuzhiyun         for an SDK (i.e. ``nativesdk-``)
1546*4882a593Smuzhiyun
1547*4882a593Smuzhiyun   :term:`D`
1548*4882a593Smuzhiyun      The destination directory. The location in the :term:`Build Directory`
1549*4882a593Smuzhiyun      where components are installed by the
1550*4882a593Smuzhiyun      :ref:`ref-tasks-install` task. This location defaults
1551*4882a593Smuzhiyun      to::
1552*4882a593Smuzhiyun
1553*4882a593Smuzhiyun         ${WORKDIR}/image
1554*4882a593Smuzhiyun
1555*4882a593Smuzhiyun      .. note::
1556*4882a593Smuzhiyun
1557*4882a593Smuzhiyun         Tasks that read from or write to this directory should run under
1558*4882a593Smuzhiyun         :ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`.
1559*4882a593Smuzhiyun
1560*4882a593Smuzhiyun   :term:`DATE`
1561*4882a593Smuzhiyun      The date the build was started. Dates appear using the year, month,
1562*4882a593Smuzhiyun      and day (YMD) format (e.g. "20150209" for February 9th, 2015).
1563*4882a593Smuzhiyun
1564*4882a593Smuzhiyun   :term:`DATETIME`
1565*4882a593Smuzhiyun      The date and time on which the current build started. The format is
1566*4882a593Smuzhiyun      suitable for timestamps.
1567*4882a593Smuzhiyun
1568*4882a593Smuzhiyun   :term:`DEBIAN_NOAUTONAME`
1569*4882a593Smuzhiyun      When the :ref:`debian <ref-classes-debian>` class is inherited,
1570*4882a593Smuzhiyun      which is the default behavior, :term:`DEBIAN_NOAUTONAME` specifies a
1571*4882a593Smuzhiyun      particular package should not be renamed according to Debian library
1572*4882a593Smuzhiyun      package naming. You must use the package name as an override when you
1573*4882a593Smuzhiyun      set this variable. Here is an example from the ``fontconfig`` recipe::
1574*4882a593Smuzhiyun
1575*4882a593Smuzhiyun         DEBIAN_NOAUTONAME:fontconfig-utils = "1"
1576*4882a593Smuzhiyun
1577*4882a593Smuzhiyun   :term:`DEBIANNAME`
1578*4882a593Smuzhiyun      When the :ref:`debian <ref-classes-debian>` class is inherited,
1579*4882a593Smuzhiyun      which is the default behavior, :term:`DEBIANNAME` allows you to override
1580*4882a593Smuzhiyun      the library name for an individual package. Overriding the library
1581*4882a593Smuzhiyun      name in these cases is rare. You must use the package name as an
1582*4882a593Smuzhiyun      override when you set this variable. Here is an example from the
1583*4882a593Smuzhiyun      ``dbus`` recipe::
1584*4882a593Smuzhiyun
1585*4882a593Smuzhiyun         DEBIANNAME:${PN} = "dbus-1"
1586*4882a593Smuzhiyun
1587*4882a593Smuzhiyun   :term:`DEBUG_BUILD`
1588*4882a593Smuzhiyun      Specifies to build packages with debugging information. This
1589*4882a593Smuzhiyun      influences the value of the :term:`SELECTED_OPTIMIZATION` variable.
1590*4882a593Smuzhiyun
1591*4882a593Smuzhiyun   :term:`DEBUG_OPTIMIZATION`
1592*4882a593Smuzhiyun      The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
1593*4882a593Smuzhiyun      compiling a system for debugging. This variable defaults to "-O
1594*4882a593Smuzhiyun      -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1595*4882a593Smuzhiyun
1596*4882a593Smuzhiyun   :term:`DEBUG_PREFIX_MAP`
1597*4882a593Smuzhiyun      Allows to set C compiler options, such as ``-fdebug-prefix-map``,
1598*4882a593Smuzhiyun      ``-fmacro-prefix-map``, and ``-ffile-prefix-map``, which allow to
1599*4882a593Smuzhiyun      replace build-time paths by install-time ones in the debugging sections
1600*4882a593Smuzhiyun      of binaries.  This makes compiler output files location independent,
1601*4882a593Smuzhiyun      at the cost of having to pass an extra command to tell the debugger
1602*4882a593Smuzhiyun      where source files are.
1603*4882a593Smuzhiyun
1604*4882a593Smuzhiyun      This is used by the Yocto Project to guarantee
1605*4882a593Smuzhiyun      :doc:`/test-manual/reproducible-builds` even when the source code of
1606*4882a593Smuzhiyun      a package uses the ``__FILE__`` or ``assert()`` macros. See the
1607*4882a593Smuzhiyun      `reproducible-builds.org <https://reproducible-builds.org/docs/build-path/>`__
1608*4882a593Smuzhiyun      website for details.
1609*4882a593Smuzhiyun
1610*4882a593Smuzhiyun      This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1611*4882a593Smuzhiyun      not intended to be user-configurable.
1612*4882a593Smuzhiyun
1613*4882a593Smuzhiyun   :term:`DEFAULT_PREFERENCE`
1614*4882a593Smuzhiyun      Specifies a weak bias for recipe selection priority.
1615*4882a593Smuzhiyun
1616*4882a593Smuzhiyun      The most common usage of this is variable is to set it to "-1" within
1617*4882a593Smuzhiyun      a recipe for a development version of a piece of software. Using the
1618*4882a593Smuzhiyun      variable in this way causes the stable version of the recipe to build
1619*4882a593Smuzhiyun      by default in the absence of :term:`PREFERRED_VERSION` being used to
1620*4882a593Smuzhiyun      build the development version.
1621*4882a593Smuzhiyun
1622*4882a593Smuzhiyun      .. note::
1623*4882a593Smuzhiyun
1624*4882a593Smuzhiyun         The bias provided by :term:`DEFAULT_PREFERENCE` is weak and is overridden
1625*4882a593Smuzhiyun         by :term:`BBFILE_PRIORITY` if that variable is different between two
1626*4882a593Smuzhiyun         layers that contain different versions of the same recipe.
1627*4882a593Smuzhiyun
1628*4882a593Smuzhiyun   :term:`DEFAULTTUNE`
1629*4882a593Smuzhiyun      The default CPU and Application Binary Interface (ABI) tunings (i.e.
1630*4882a593Smuzhiyun      the "tune") used by the OpenEmbedded build system. The
1631*4882a593Smuzhiyun      :term:`DEFAULTTUNE` helps define
1632*4882a593Smuzhiyun      :term:`TUNE_FEATURES`.
1633*4882a593Smuzhiyun
1634*4882a593Smuzhiyun      The default tune is either implicitly or explicitly set by the
1635*4882a593Smuzhiyun      machine (:term:`MACHINE`). However, you can override
1636*4882a593Smuzhiyun      the setting using available tunes as defined with
1637*4882a593Smuzhiyun      :term:`AVAILTUNES`.
1638*4882a593Smuzhiyun
1639*4882a593Smuzhiyun   :term:`DEPENDS`
1640*4882a593Smuzhiyun      Lists a recipe's build-time dependencies. These are dependencies on
1641*4882a593Smuzhiyun      other recipes whose contents (e.g. headers and shared libraries) are
1642*4882a593Smuzhiyun      needed by the recipe at build time.
1643*4882a593Smuzhiyun
1644*4882a593Smuzhiyun      As an example, consider a recipe ``foo`` that contains the following
1645*4882a593Smuzhiyun      assignment::
1646*4882a593Smuzhiyun
1647*4882a593Smuzhiyun          DEPENDS = "bar"
1648*4882a593Smuzhiyun
1649*4882a593Smuzhiyun      The practical effect of the previous
1650*4882a593Smuzhiyun      assignment is that all files installed by bar will be available in
1651*4882a593Smuzhiyun      the appropriate staging sysroot, given by the
1652*4882a593Smuzhiyun      :term:`STAGING_DIR* <STAGING_DIR>` variables, by the time the
1653*4882a593Smuzhiyun      :ref:`ref-tasks-configure` task for ``foo`` runs.
1654*4882a593Smuzhiyun      This mechanism is implemented by having ``do_configure`` depend on
1655*4882a593Smuzhiyun      the :ref:`ref-tasks-populate_sysroot` task of
1656*4882a593Smuzhiyun      each recipe listed in :term:`DEPENDS`, through a
1657*4882a593Smuzhiyun      ``[``\ :ref:`deptask <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ``]``
1658*4882a593Smuzhiyun      declaration in the :ref:`base <ref-classes-base>` class.
1659*4882a593Smuzhiyun
1660*4882a593Smuzhiyun      .. note::
1661*4882a593Smuzhiyun
1662*4882a593Smuzhiyun         It seldom is necessary to reference, for example, :term:`STAGING_DIR_HOST`
1663*4882a593Smuzhiyun         explicitly. The standard classes and build-related variables are
1664*4882a593Smuzhiyun         configured to automatically use the appropriate staging sysroots.
1665*4882a593Smuzhiyun
1666*4882a593Smuzhiyun      As another example, :term:`DEPENDS` can also be used to add utilities
1667*4882a593Smuzhiyun      that run on the build machine during the build. For example, a recipe
1668*4882a593Smuzhiyun      that makes use of a code generator built by the recipe ``codegen``
1669*4882a593Smuzhiyun      might have the following::
1670*4882a593Smuzhiyun
1671*4882a593Smuzhiyun         DEPENDS = "codegen-native"
1672*4882a593Smuzhiyun
1673*4882a593Smuzhiyun      For more
1674*4882a593Smuzhiyun      information, see the :ref:`native <ref-classes-native>` class and
1675*4882a593Smuzhiyun      the :term:`EXTRANATIVEPATH` variable.
1676*4882a593Smuzhiyun
1677*4882a593Smuzhiyun      .. note::
1678*4882a593Smuzhiyun
1679*4882a593Smuzhiyun         -  :term:`DEPENDS` is a list of recipe names. Or, to be more precise,
1680*4882a593Smuzhiyun            it is a list of :term:`PROVIDES` names, which
1681*4882a593Smuzhiyun            usually match recipe names. Putting a package name such as
1682*4882a593Smuzhiyun            "foo-dev" in :term:`DEPENDS` does not make sense. Use "foo"
1683*4882a593Smuzhiyun            instead, as this will put files from all the packages that make
1684*4882a593Smuzhiyun            up ``foo``, which includes those from ``foo-dev``, into the
1685*4882a593Smuzhiyun            sysroot.
1686*4882a593Smuzhiyun
1687*4882a593Smuzhiyun         -  One recipe having another recipe in :term:`DEPENDS` does not by
1688*4882a593Smuzhiyun            itself add any runtime dependencies between the packages
1689*4882a593Smuzhiyun            produced by the two recipes. However, as explained in the
1690*4882a593Smuzhiyun            ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
1691*4882a593Smuzhiyun            section in the Yocto Project Overview and Concepts Manual,
1692*4882a593Smuzhiyun            runtime dependencies will often be added automatically, meaning
1693*4882a593Smuzhiyun            :term:`DEPENDS` alone is sufficient for most recipes.
1694*4882a593Smuzhiyun
1695*4882a593Smuzhiyun         -  Counterintuitively, :term:`DEPENDS` is often necessary even for
1696*4882a593Smuzhiyun            recipes that install precompiled components. For example, if
1697*4882a593Smuzhiyun            ``libfoo`` is a precompiled library that links against
1698*4882a593Smuzhiyun            ``libbar``, then linking against ``libfoo`` requires both
1699*4882a593Smuzhiyun            ``libfoo`` and ``libbar`` to be available in the sysroot.
1700*4882a593Smuzhiyun            Without a :term:`DEPENDS` from the recipe that installs ``libfoo``
1701*4882a593Smuzhiyun            to the recipe that installs ``libbar``, other recipes might
1702*4882a593Smuzhiyun            fail to link against ``libfoo``.
1703*4882a593Smuzhiyun
1704*4882a593Smuzhiyun      For information on runtime dependencies, see the
1705*4882a593Smuzhiyun      :term:`RDEPENDS` variable. You can also see the
1706*4882a593Smuzhiyun      ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
1707*4882a593Smuzhiyun      ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
1708*4882a593Smuzhiyun      BitBake User Manual for additional information on tasks and
1709*4882a593Smuzhiyun      dependencies.
1710*4882a593Smuzhiyun
1711*4882a593Smuzhiyun   :term:`DEPLOY_DIR`
1712*4882a593Smuzhiyun      Points to the general area that the OpenEmbedded build system uses to
1713*4882a593Smuzhiyun      place images, packages, SDKs, and other output files that are ready
1714*4882a593Smuzhiyun      to be used outside of the build system. By default, this directory
1715*4882a593Smuzhiyun      resides within the :term:`Build Directory` as
1716*4882a593Smuzhiyun      ``${TMPDIR}/deploy``.
1717*4882a593Smuzhiyun
1718*4882a593Smuzhiyun      For more information on the structure of the Build Directory, see
1719*4882a593Smuzhiyun      ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section.
1720*4882a593Smuzhiyun      For more detail on the contents of the ``deploy`` directory, see the
1721*4882a593Smuzhiyun      ":ref:`overview-manual/concepts:images`",
1722*4882a593Smuzhiyun      ":ref:`overview-manual/concepts:package feeds`", and
1723*4882a593Smuzhiyun      ":ref:`overview-manual/concepts:application development sdk`" sections all in the
1724*4882a593Smuzhiyun      Yocto Project Overview and Concepts Manual.
1725*4882a593Smuzhiyun
1726*4882a593Smuzhiyun   :term:`DEPLOY_DIR_DEB`
1727*4882a593Smuzhiyun      Points to the area that the OpenEmbedded build system uses to place
1728*4882a593Smuzhiyun      Debian packages that are ready to be used outside of the build
1729*4882a593Smuzhiyun      system. This variable applies only when
1730*4882a593Smuzhiyun      :term:`PACKAGE_CLASSES` contains
1731*4882a593Smuzhiyun      "package_deb".
1732*4882a593Smuzhiyun
1733*4882a593Smuzhiyun      The BitBake configuration file initially defines the
1734*4882a593Smuzhiyun      :term:`DEPLOY_DIR_DEB` variable as a sub-folder of
1735*4882a593Smuzhiyun      :term:`DEPLOY_DIR`::
1736*4882a593Smuzhiyun
1737*4882a593Smuzhiyun         DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
1738*4882a593Smuzhiyun
1739*4882a593Smuzhiyun      The :ref:`package_deb <ref-classes-package_deb>` class uses the
1740*4882a593Smuzhiyun      :term:`DEPLOY_DIR_DEB` variable to make sure the
1741*4882a593Smuzhiyun      :ref:`ref-tasks-package_write_deb` task
1742*4882a593Smuzhiyun      writes Debian packages into the appropriate folder. For more
1743*4882a593Smuzhiyun      information on how packaging works, see the
1744*4882a593Smuzhiyun      ":ref:`overview-manual/concepts:package feeds`" section
1745*4882a593Smuzhiyun      in the Yocto Project Overview and Concepts Manual.
1746*4882a593Smuzhiyun
1747*4882a593Smuzhiyun   :term:`DEPLOY_DIR_IMAGE`
1748*4882a593Smuzhiyun      Points to the area that the OpenEmbedded build system uses to place
1749*4882a593Smuzhiyun      images and other associated output files that are ready to be
1750*4882a593Smuzhiyun      deployed onto the target machine. The directory is machine-specific
1751*4882a593Smuzhiyun      as it contains the ``${MACHINE}`` name. By default, this directory
1752*4882a593Smuzhiyun      resides within the :term:`Build Directory` as
1753*4882a593Smuzhiyun      ``${DEPLOY_DIR}/images/${MACHINE}/``.
1754*4882a593Smuzhiyun
1755*4882a593Smuzhiyun      It must not be used directly in recipes when deploying files. Instead,
1756*4882a593Smuzhiyun      it's only useful when a recipe needs to "read" a file already deployed
1757*4882a593Smuzhiyun      by a dependency. So, it should be filled with the contents of
1758*4882a593Smuzhiyun      :term:`DEPLOYDIR` by the :ref:`deploy <ref-classes-deploy>` class or
1759*4882a593Smuzhiyun      with the contents of :term:`IMGDEPLOYDIR` by the :ref:`image
1760*4882a593Smuzhiyun      <ref-classes-image>` class.
1761*4882a593Smuzhiyun
1762*4882a593Smuzhiyun      For more information on the structure of the Build Directory, see
1763*4882a593Smuzhiyun      ":ref:`ref-manual/structure:the build directory - \`\`build/\`\``" section.
1764*4882a593Smuzhiyun      For more detail on the contents of the ``deploy`` directory, see the
1765*4882a593Smuzhiyun      ":ref:`overview-manual/concepts:images`" and
1766*4882a593Smuzhiyun      ":ref:`overview-manual/concepts:application development sdk`" sections both in
1767*4882a593Smuzhiyun      the Yocto Project Overview and Concepts Manual.
1768*4882a593Smuzhiyun
1769*4882a593Smuzhiyun   :term:`DEPLOY_DIR_IPK`
1770*4882a593Smuzhiyun      Points to the area that the OpenEmbedded build system uses to place
1771*4882a593Smuzhiyun      IPK packages that are ready to be used outside of the build system.
1772*4882a593Smuzhiyun      This variable applies only when
1773*4882a593Smuzhiyun      :term:`PACKAGE_CLASSES` contains
1774*4882a593Smuzhiyun      "package_ipk".
1775*4882a593Smuzhiyun
1776*4882a593Smuzhiyun      The BitBake configuration file initially defines this variable as a
1777*4882a593Smuzhiyun      sub-folder of :term:`DEPLOY_DIR`::
1778*4882a593Smuzhiyun
1779*4882a593Smuzhiyun         DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
1780*4882a593Smuzhiyun
1781*4882a593Smuzhiyun      The :ref:`package_ipk <ref-classes-package_ipk>` class uses the
1782*4882a593Smuzhiyun      :term:`DEPLOY_DIR_IPK` variable to make sure the
1783*4882a593Smuzhiyun      :ref:`ref-tasks-package_write_ipk` task
1784*4882a593Smuzhiyun      writes IPK packages into the appropriate folder. For more information
1785*4882a593Smuzhiyun      on how packaging works, see the
1786*4882a593Smuzhiyun      ":ref:`overview-manual/concepts:package feeds`" section
1787*4882a593Smuzhiyun      in the Yocto Project Overview and Concepts Manual.
1788*4882a593Smuzhiyun
1789*4882a593Smuzhiyun   :term:`DEPLOY_DIR_RPM`
1790*4882a593Smuzhiyun      Points to the area that the OpenEmbedded build system uses to place
1791*4882a593Smuzhiyun      RPM packages that are ready to be used outside of the build system.
1792*4882a593Smuzhiyun      This variable applies only when
1793*4882a593Smuzhiyun      :term:`PACKAGE_CLASSES` contains
1794*4882a593Smuzhiyun      "package_rpm".
1795*4882a593Smuzhiyun
1796*4882a593Smuzhiyun      The BitBake configuration file initially defines this variable as a
1797*4882a593Smuzhiyun      sub-folder of :term:`DEPLOY_DIR`::
1798*4882a593Smuzhiyun
1799*4882a593Smuzhiyun         DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
1800*4882a593Smuzhiyun
1801*4882a593Smuzhiyun      The :ref:`package_rpm <ref-classes-package_rpm>` class uses the
1802*4882a593Smuzhiyun      :term:`DEPLOY_DIR_RPM` variable to make sure the
1803*4882a593Smuzhiyun      :ref:`ref-tasks-package_write_rpm` task
1804*4882a593Smuzhiyun      writes RPM packages into the appropriate folder. For more information
1805*4882a593Smuzhiyun      on how packaging works, see the
1806*4882a593Smuzhiyun      ":ref:`overview-manual/concepts:package feeds`" section
1807*4882a593Smuzhiyun      in the Yocto Project Overview and Concepts Manual.
1808*4882a593Smuzhiyun
1809*4882a593Smuzhiyun   :term:`DEPLOY_DIR_TAR`
1810*4882a593Smuzhiyun      Points to the area that the OpenEmbedded build system uses to place
1811*4882a593Smuzhiyun      tarballs that are ready to be used outside of the build system. This
1812*4882a593Smuzhiyun      variable applies only when
1813*4882a593Smuzhiyun      :term:`PACKAGE_CLASSES` contains
1814*4882a593Smuzhiyun      "package_tar".
1815*4882a593Smuzhiyun
1816*4882a593Smuzhiyun      The BitBake configuration file initially defines this variable as a
1817*4882a593Smuzhiyun      sub-folder of :term:`DEPLOY_DIR`::
1818*4882a593Smuzhiyun
1819*4882a593Smuzhiyun         DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
1820*4882a593Smuzhiyun
1821*4882a593Smuzhiyun      The :ref:`package_tar <ref-classes-package_tar>` class uses the
1822*4882a593Smuzhiyun      :term:`DEPLOY_DIR_TAR` variable to make sure the
1823*4882a593Smuzhiyun      :ref:`ref-tasks-package_write_tar` task
1824*4882a593Smuzhiyun      writes TAR packages into the appropriate folder. For more information
1825*4882a593Smuzhiyun      on how packaging works, see the
1826*4882a593Smuzhiyun      ":ref:`overview-manual/concepts:package feeds`" section
1827*4882a593Smuzhiyun      in the Yocto Project Overview and Concepts Manual.
1828*4882a593Smuzhiyun
1829*4882a593Smuzhiyun   :term:`DEPLOYDIR`
1830*4882a593Smuzhiyun      When inheriting the :ref:`deploy <ref-classes-deploy>` class, the
1831*4882a593Smuzhiyun      :term:`DEPLOYDIR` points to a temporary work area for deployed files that
1832*4882a593Smuzhiyun      is set in the :ref:`deploy <ref-classes-deploy>` class as follows::
1833*4882a593Smuzhiyun
1834*4882a593Smuzhiyun         DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
1835*4882a593Smuzhiyun
1836*4882a593Smuzhiyun      Recipes inheriting the :ref:`deploy <ref-classes-deploy>` class should copy files to be
1837*4882a593Smuzhiyun      deployed into :term:`DEPLOYDIR`, and the class will take care of copying
1838*4882a593Smuzhiyun      them into :term:`DEPLOY_DIR_IMAGE`
1839*4882a593Smuzhiyun      afterwards.
1840*4882a593Smuzhiyun
1841*4882a593Smuzhiyun   :term:`DESCRIPTION`
1842*4882a593Smuzhiyun      The package description used by package managers. If not set,
1843*4882a593Smuzhiyun      :term:`DESCRIPTION` takes the value of the :term:`SUMMARY`
1844*4882a593Smuzhiyun      variable.
1845*4882a593Smuzhiyun
1846*4882a593Smuzhiyun   :term:`DISTRO`
1847*4882a593Smuzhiyun      The short name of the distribution. For information on the long name
1848*4882a593Smuzhiyun      of the distribution, see the :term:`DISTRO_NAME`
1849*4882a593Smuzhiyun      variable.
1850*4882a593Smuzhiyun
1851*4882a593Smuzhiyun      The :term:`DISTRO` variable corresponds to a distribution configuration
1852*4882a593Smuzhiyun      file whose root name is the same as the variable's argument and whose
1853*4882a593Smuzhiyun      filename extension is ``.conf``. For example, the distribution
1854*4882a593Smuzhiyun      configuration file for the Poky distribution is named ``poky.conf``
1855*4882a593Smuzhiyun      and resides in the ``meta-poky/conf/distro`` directory of the
1856*4882a593Smuzhiyun      :term:`Source Directory`.
1857*4882a593Smuzhiyun
1858*4882a593Smuzhiyun      Within that ``poky.conf`` file, the :term:`DISTRO` variable is set as
1859*4882a593Smuzhiyun      follows::
1860*4882a593Smuzhiyun
1861*4882a593Smuzhiyun         DISTRO = "poky"
1862*4882a593Smuzhiyun
1863*4882a593Smuzhiyun      Distribution configuration files are located in a ``conf/distro``
1864*4882a593Smuzhiyun      directory within the :term:`Metadata` that contains the
1865*4882a593Smuzhiyun      distribution configuration. The value for :term:`DISTRO` must not contain
1866*4882a593Smuzhiyun      spaces, and is typically all lower-case.
1867*4882a593Smuzhiyun
1868*4882a593Smuzhiyun      .. note::
1869*4882a593Smuzhiyun
1870*4882a593Smuzhiyun         If the :term:`DISTRO` variable is blank, a set of default configurations
1871*4882a593Smuzhiyun         are used, which are specified within
1872*4882a593Smuzhiyun         ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
1873*4882a593Smuzhiyun
1874*4882a593Smuzhiyun   :term:`DISTRO_CODENAME`
1875*4882a593Smuzhiyun      Specifies a codename for the distribution being built.
1876*4882a593Smuzhiyun
1877*4882a593Smuzhiyun   :term:`DISTRO_EXTRA_RDEPENDS`
1878*4882a593Smuzhiyun      Specifies a list of distro-specific packages to add to all images.
1879*4882a593Smuzhiyun      This variable takes effect through ``packagegroup-base`` so the
1880*4882a593Smuzhiyun      variable only really applies to the more full-featured images that
1881*4882a593Smuzhiyun      include ``packagegroup-base``. You can use this variable to keep
1882*4882a593Smuzhiyun      distro policy out of generic images. As with all other distro
1883*4882a593Smuzhiyun      variables, you set this variable in the distro ``.conf`` file.
1884*4882a593Smuzhiyun
1885*4882a593Smuzhiyun   :term:`DISTRO_EXTRA_RRECOMMENDS`
1886*4882a593Smuzhiyun      Specifies a list of distro-specific packages to add to all images if
1887*4882a593Smuzhiyun      the packages exist. The packages might not exist or be empty (e.g.
1888*4882a593Smuzhiyun      kernel modules). The list of packages are automatically installed but
1889*4882a593Smuzhiyun      you can remove them.
1890*4882a593Smuzhiyun
1891*4882a593Smuzhiyun   :term:`DISTRO_FEATURES`
1892*4882a593Smuzhiyun      The software support you want in your distribution for various
1893*4882a593Smuzhiyun      features. You define your distribution features in the distribution
1894*4882a593Smuzhiyun      configuration file.
1895*4882a593Smuzhiyun
1896*4882a593Smuzhiyun      In most cases, the presence or absence of a feature in
1897*4882a593Smuzhiyun      :term:`DISTRO_FEATURES` is translated to the appropriate option supplied
1898*4882a593Smuzhiyun      to the configure script during the
1899*4882a593Smuzhiyun      :ref:`ref-tasks-configure` task for recipes that
1900*4882a593Smuzhiyun      optionally support the feature. For example, specifying "x11" in
1901*4882a593Smuzhiyun      :term:`DISTRO_FEATURES`, causes every piece of software built for the
1902*4882a593Smuzhiyun      target that can optionally support X11 to have its X11 support
1903*4882a593Smuzhiyun      enabled.
1904*4882a593Smuzhiyun
1905*4882a593Smuzhiyun      Two more examples are Bluetooth and NFS support. For a more complete
1906*4882a593Smuzhiyun      list of features that ships with the Yocto Project and that you can
1907*4882a593Smuzhiyun      provide with this variable, see the ":ref:`ref-features-distro`" section.
1908*4882a593Smuzhiyun
1909*4882a593Smuzhiyun   :term:`DISTRO_FEATURES_BACKFILL`
1910*4882a593Smuzhiyun      Features to be added to :term:`DISTRO_FEATURES` if not also present in
1911*4882a593Smuzhiyun      :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`.
1912*4882a593Smuzhiyun
1913*4882a593Smuzhiyun      This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1914*4882a593Smuzhiyun      not intended to be user-configurable. It is best to just reference
1915*4882a593Smuzhiyun      the variable to see which distro features are being backfilled for
1916*4882a593Smuzhiyun      all distro configurations. See the ":ref:`ref-features-backfill`" section
1917*4882a593Smuzhiyun      for more information.
1918*4882a593Smuzhiyun
1919*4882a593Smuzhiyun   :term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`
1920*4882a593Smuzhiyun      Features from :term:`DISTRO_FEATURES_BACKFILL` that should not be
1921*4882a593Smuzhiyun      backfilled (i.e. added to :term:`DISTRO_FEATURES`) during the build. See
1922*4882a593Smuzhiyun      the ":ref:`ref-features-backfill`" section for more information.
1923*4882a593Smuzhiyun
1924*4882a593Smuzhiyun   :term:`DISTRO_FEATURES_DEFAULT`
1925*4882a593Smuzhiyun      A convenience variable that gives you the default list of distro
1926*4882a593Smuzhiyun      features with the exception of any features specific to the C library
1927*4882a593Smuzhiyun      (``libc``).
1928*4882a593Smuzhiyun
1929*4882a593Smuzhiyun      When creating a custom distribution, you might find it useful to be
1930*4882a593Smuzhiyun      able to reuse the default
1931*4882a593Smuzhiyun      :term:`DISTRO_FEATURES` options without the
1932*4882a593Smuzhiyun      need to write out the full set. Here is an example that uses
1933*4882a593Smuzhiyun      :term:`DISTRO_FEATURES_DEFAULT` from a custom distro configuration file::
1934*4882a593Smuzhiyun
1935*4882a593Smuzhiyun         DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature"
1936*4882a593Smuzhiyun
1937*4882a593Smuzhiyun   :term:`DISTRO_FEATURES_FILTER_NATIVE`
1938*4882a593Smuzhiyun      Specifies a list of features that if present in the target
1939*4882a593Smuzhiyun      :term:`DISTRO_FEATURES` value should be
1940*4882a593Smuzhiyun      included in :term:`DISTRO_FEATURES` when building native recipes. This
1941*4882a593Smuzhiyun      variable is used in addition to the features filtered using the
1942*4882a593Smuzhiyun      :term:`DISTRO_FEATURES_NATIVE`
1943*4882a593Smuzhiyun      variable.
1944*4882a593Smuzhiyun
1945*4882a593Smuzhiyun   :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
1946*4882a593Smuzhiyun      Specifies a list of features that if present in the target
1947*4882a593Smuzhiyun      :term:`DISTRO_FEATURES` value should be
1948*4882a593Smuzhiyun      included in :term:`DISTRO_FEATURES` when building nativesdk recipes. This
1949*4882a593Smuzhiyun      variable is used in addition to the features filtered using the
1950*4882a593Smuzhiyun      :term:`DISTRO_FEATURES_NATIVESDK`
1951*4882a593Smuzhiyun      variable.
1952*4882a593Smuzhiyun
1953*4882a593Smuzhiyun   :term:`DISTRO_FEATURES_NATIVE`
1954*4882a593Smuzhiyun      Specifies a list of features that should be included in
1955*4882a593Smuzhiyun      :term:`DISTRO_FEATURES` when building native
1956*4882a593Smuzhiyun      recipes. This variable is used in addition to the features filtered
1957*4882a593Smuzhiyun      using the
1958*4882a593Smuzhiyun      :term:`DISTRO_FEATURES_FILTER_NATIVE`
1959*4882a593Smuzhiyun      variable.
1960*4882a593Smuzhiyun
1961*4882a593Smuzhiyun   :term:`DISTRO_FEATURES_NATIVESDK`
1962*4882a593Smuzhiyun      Specifies a list of features that should be included in
1963*4882a593Smuzhiyun      :term:`DISTRO_FEATURES` when building
1964*4882a593Smuzhiyun      nativesdk recipes. This variable is used in addition to the features
1965*4882a593Smuzhiyun      filtered using the
1966*4882a593Smuzhiyun      :term:`DISTRO_FEATURES_FILTER_NATIVESDK`
1967*4882a593Smuzhiyun      variable.
1968*4882a593Smuzhiyun
1969*4882a593Smuzhiyun   :term:`DISTRO_NAME`
1970*4882a593Smuzhiyun      The long name of the distribution. For information on the short name
1971*4882a593Smuzhiyun      of the distribution, see the :term:`DISTRO` variable.
1972*4882a593Smuzhiyun
1973*4882a593Smuzhiyun      The :term:`DISTRO_NAME` variable corresponds to a distribution
1974*4882a593Smuzhiyun      configuration file whose root name is the same as the variable's
1975*4882a593Smuzhiyun      argument and whose filename extension is ``.conf``. For example, the
1976*4882a593Smuzhiyun      distribution configuration file for the Poky distribution is named
1977*4882a593Smuzhiyun      ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory
1978*4882a593Smuzhiyun      of the :term:`Source Directory`.
1979*4882a593Smuzhiyun
1980*4882a593Smuzhiyun      Within that ``poky.conf`` file, the :term:`DISTRO_NAME` variable is set
1981*4882a593Smuzhiyun      as follows::
1982*4882a593Smuzhiyun
1983*4882a593Smuzhiyun         DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
1984*4882a593Smuzhiyun
1985*4882a593Smuzhiyun      Distribution configuration files are located in a ``conf/distro``
1986*4882a593Smuzhiyun      directory within the :term:`Metadata` that contains the
1987*4882a593Smuzhiyun      distribution configuration.
1988*4882a593Smuzhiyun
1989*4882a593Smuzhiyun      .. note::
1990*4882a593Smuzhiyun
1991*4882a593Smuzhiyun         If the :term:`DISTRO_NAME` variable is blank, a set of default
1992*4882a593Smuzhiyun         configurations are used, which are specified within
1993*4882a593Smuzhiyun         ``meta/conf/distro/defaultsetup.conf`` also in the Source Directory.
1994*4882a593Smuzhiyun
1995*4882a593Smuzhiyun   :term:`DISTRO_VERSION`
1996*4882a593Smuzhiyun      The version of the distribution.
1997*4882a593Smuzhiyun
1998*4882a593Smuzhiyun   :term:`DISTROOVERRIDES`
1999*4882a593Smuzhiyun      A colon-separated list of overrides specific to the current
2000*4882a593Smuzhiyun      distribution. By default, this list includes the value of
2001*4882a593Smuzhiyun      :term:`DISTRO`.
2002*4882a593Smuzhiyun
2003*4882a593Smuzhiyun      You can extend :term:`DISTROOVERRIDES` to add extra overrides that should
2004*4882a593Smuzhiyun      apply to the distribution.
2005*4882a593Smuzhiyun
2006*4882a593Smuzhiyun      The underlying mechanism behind :term:`DISTROOVERRIDES` is simply that it
2007*4882a593Smuzhiyun      is included in the default value of
2008*4882a593Smuzhiyun      :term:`OVERRIDES`.
2009*4882a593Smuzhiyun
2010*4882a593Smuzhiyun   :term:`DL_DIR`
2011*4882a593Smuzhiyun      The central download directory used by the build process to store
2012*4882a593Smuzhiyun      downloads. By default, :term:`DL_DIR` gets files suitable for mirroring
2013*4882a593Smuzhiyun      for everything except Git repositories. If you want tarballs of Git
2014*4882a593Smuzhiyun      repositories, use the
2015*4882a593Smuzhiyun      :term:`BB_GENERATE_MIRROR_TARBALLS`
2016*4882a593Smuzhiyun      variable.
2017*4882a593Smuzhiyun
2018*4882a593Smuzhiyun      You can set this directory by defining the :term:`DL_DIR` variable in the
2019*4882a593Smuzhiyun      ``conf/local.conf`` file. This directory is self-maintaining and you
2020*4882a593Smuzhiyun      should not have to touch it. By default, the directory is
2021*4882a593Smuzhiyun      ``downloads`` in the :term:`Build Directory`.
2022*4882a593Smuzhiyun      ::
2023*4882a593Smuzhiyun
2024*4882a593Smuzhiyun         #DL_DIR ?= "${TOPDIR}/downloads"
2025*4882a593Smuzhiyun
2026*4882a593Smuzhiyun      To specify a different download directory,
2027*4882a593Smuzhiyun      simply remove the comment from the line and provide your directory.
2028*4882a593Smuzhiyun
2029*4882a593Smuzhiyun      During a first build, the system downloads many different source code
2030*4882a593Smuzhiyun      tarballs from various upstream projects. Downloading can take a
2031*4882a593Smuzhiyun      while, particularly if your network connection is slow. Tarballs are
2032*4882a593Smuzhiyun      all stored in the directory defined by :term:`DL_DIR` and the build
2033*4882a593Smuzhiyun      system looks there first to find source tarballs.
2034*4882a593Smuzhiyun
2035*4882a593Smuzhiyun      .. note::
2036*4882a593Smuzhiyun
2037*4882a593Smuzhiyun         When wiping and rebuilding, you can preserve this directory to
2038*4882a593Smuzhiyun         speed up this part of subsequent builds.
2039*4882a593Smuzhiyun
2040*4882a593Smuzhiyun      You can safely share this directory between multiple builds on the
2041*4882a593Smuzhiyun      same development machine. For additional information on how the build
2042*4882a593Smuzhiyun      process gets source files when working behind a firewall or proxy
2043*4882a593Smuzhiyun      server, see this specific question in the ":doc:`faq`"
2044*4882a593Smuzhiyun      chapter. You can also refer to the
2045*4882a593Smuzhiyun      ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`"
2046*4882a593Smuzhiyun      Wiki page.
2047*4882a593Smuzhiyun
2048*4882a593Smuzhiyun   :term:`DOC_COMPRESS`
2049*4882a593Smuzhiyun      When inheriting the :ref:`compress_doc <ref-classes-compress_doc>`
2050*4882a593Smuzhiyun      class, this variable sets the compression policy used when the
2051*4882a593Smuzhiyun      OpenEmbedded build system compresses man pages and info pages. By
2052*4882a593Smuzhiyun      default, the compression method used is gz (gzip). Other policies
2053*4882a593Smuzhiyun      available are xz and bz2.
2054*4882a593Smuzhiyun
2055*4882a593Smuzhiyun      For information on policies and on how to use this variable, see the
2056*4882a593Smuzhiyun      comments in the ``meta/classes/compress_doc.bbclass`` file.
2057*4882a593Smuzhiyun
2058*4882a593Smuzhiyun   :term:`EFI_PROVIDER`
2059*4882a593Smuzhiyun      When building bootable images (i.e. where ``hddimg``, ``iso``, or
2060*4882a593Smuzhiyun      ``wic.vmdk`` is in :term:`IMAGE_FSTYPES`), the
2061*4882a593Smuzhiyun      :term:`EFI_PROVIDER` variable specifies the EFI bootloader to use. The
2062*4882a593Smuzhiyun      default is "grub-efi", but "systemd-boot" can be used instead.
2063*4882a593Smuzhiyun
2064*4882a593Smuzhiyun      See the :ref:`systemd-boot <ref-classes-systemd-boot>` and
2065*4882a593Smuzhiyun      :ref:`image-live <ref-classes-image-live>` classes for more
2066*4882a593Smuzhiyun      information.
2067*4882a593Smuzhiyun
2068*4882a593Smuzhiyun   :term:`ENABLE_BINARY_LOCALE_GENERATION`
2069*4882a593Smuzhiyun      Variable that controls which locales for ``glibc`` are generated
2070*4882a593Smuzhiyun      during the build (useful if the target device has 64Mbytes of RAM or
2071*4882a593Smuzhiyun      less).
2072*4882a593Smuzhiyun
2073*4882a593Smuzhiyun   :term:`ERR_REPORT_DIR`
2074*4882a593Smuzhiyun      When used with the :ref:`report-error <ref-classes-report-error>`
2075*4882a593Smuzhiyun      class, specifies the path used for storing the debug files created by
2076*4882a593Smuzhiyun      the :ref:`error reporting
2077*4882a593Smuzhiyun      tool <dev-manual/common-tasks:using the error reporting tool>`, which
2078*4882a593Smuzhiyun      allows you to submit build errors you encounter to a central
2079*4882a593Smuzhiyun      database. By default, the value of this variable is
2080*4882a593Smuzhiyun      ``${``\ :term:`LOG_DIR`\ ``}/error-report``.
2081*4882a593Smuzhiyun
2082*4882a593Smuzhiyun      You can set :term:`ERR_REPORT_DIR` to the path you want the error
2083*4882a593Smuzhiyun      reporting tool to store the debug files as follows in your
2084*4882a593Smuzhiyun      ``local.conf`` file::
2085*4882a593Smuzhiyun
2086*4882a593Smuzhiyun         ERR_REPORT_DIR = "path"
2087*4882a593Smuzhiyun
2088*4882a593Smuzhiyun   :term:`ERROR_QA`
2089*4882a593Smuzhiyun      Specifies the quality assurance checks whose failures are reported as
2090*4882a593Smuzhiyun      errors by the OpenEmbedded build system. You set this variable in
2091*4882a593Smuzhiyun      your distribution configuration file. For a list of the checks you
2092*4882a593Smuzhiyun      can control with this variable, see the
2093*4882a593Smuzhiyun      ":ref:`ref-classes-insane`" section.
2094*4882a593Smuzhiyun
2095*4882a593Smuzhiyun   :term:`ESDK_CLASS_INHERIT_DISABLE`
2096*4882a593Smuzhiyun      A list of classes to remove from the :term:`INHERIT`
2097*4882a593Smuzhiyun      value globally within the extensible SDK configuration. The
2098*4882a593Smuzhiyun      :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class sets the
2099*4882a593Smuzhiyun      default value::
2100*4882a593Smuzhiyun
2101*4882a593Smuzhiyun         ESDK_CLASS_INHERIT_DISABLE ?= "buildhistory icecc"
2102*4882a593Smuzhiyun
2103*4882a593Smuzhiyun      Some classes are not generally applicable within the extensible SDK
2104*4882a593Smuzhiyun      context. You can use this variable to disable those classes.
2105*4882a593Smuzhiyun
2106*4882a593Smuzhiyun      For additional information on how to customize the extensible SDK's
2107*4882a593Smuzhiyun      configuration, see the
2108*4882a593Smuzhiyun      ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2109*4882a593Smuzhiyun      section in the Yocto Project Application Development and the
2110*4882a593Smuzhiyun      Extensible Software Development Kit (eSDK) manual.
2111*4882a593Smuzhiyun
2112*4882a593Smuzhiyun   :term:`ESDK_LOCALCONF_ALLOW`
2113*4882a593Smuzhiyun      A list of variables allowed through from the OpenEmbedded build
2114*4882a593Smuzhiyun      system configuration into the extensible SDK configuration. By
2115*4882a593Smuzhiyun      default, the list of variables is empty and is set in the
2116*4882a593Smuzhiyun      :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class.
2117*4882a593Smuzhiyun
2118*4882a593Smuzhiyun      This list overrides the variables specified using the
2119*4882a593Smuzhiyun      :term:`ESDK_LOCALCONF_REMOVE` variable as well as
2120*4882a593Smuzhiyun      other variables automatically added due to the "/" character
2121*4882a593Smuzhiyun      being found at the start of the
2122*4882a593Smuzhiyun      value, which is usually indicative of being a path and thus might not
2123*4882a593Smuzhiyun      be valid on the system where the SDK is installed.
2124*4882a593Smuzhiyun
2125*4882a593Smuzhiyun      For additional information on how to customize the extensible SDK's
2126*4882a593Smuzhiyun      configuration, see the
2127*4882a593Smuzhiyun      ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2128*4882a593Smuzhiyun      section in the Yocto Project Application Development and the
2129*4882a593Smuzhiyun      Extensible Software Development Kit (eSDK) manual.
2130*4882a593Smuzhiyun
2131*4882a593Smuzhiyun   :term:`ESDK_LOCALCONF_REMOVE`
2132*4882a593Smuzhiyun      A list of variables not allowed through from the OpenEmbedded build
2133*4882a593Smuzhiyun      system configuration into the extensible SDK configuration. Usually,
2134*4882a593Smuzhiyun      these are variables that are specific to the machine on which the
2135*4882a593Smuzhiyun      build system is running and thus would be potentially problematic
2136*4882a593Smuzhiyun      within the extensible SDK.
2137*4882a593Smuzhiyun
2138*4882a593Smuzhiyun      By default, :term:`ESDK_LOCALCONF_REMOVE` is set in the
2139*4882a593Smuzhiyun      :ref:`populate-sdk-ext <ref-classes-populate-sdk-*>` class and
2140*4882a593Smuzhiyun      excludes the following variables:
2141*4882a593Smuzhiyun
2142*4882a593Smuzhiyun      - :term:`CONF_VERSION`
2143*4882a593Smuzhiyun      - :term:`BB_NUMBER_THREADS`
2144*4882a593Smuzhiyun      - :term:`BB_NUMBER_PARSE_THREADS`
2145*4882a593Smuzhiyun      - :term:`PARALLEL_MAKE`
2146*4882a593Smuzhiyun      - :term:`PRSERV_HOST`
2147*4882a593Smuzhiyun      - :term:`SSTATE_MIRRORS` :term:`DL_DIR`
2148*4882a593Smuzhiyun      - :term:`SSTATE_DIR` :term:`TMPDIR`
2149*4882a593Smuzhiyun      - :term:`BB_SERVER_TIMEOUT`
2150*4882a593Smuzhiyun
2151*4882a593Smuzhiyun      For additional information on how to customize the extensible SDK's
2152*4882a593Smuzhiyun      configuration, see the
2153*4882a593Smuzhiyun      ":ref:`sdk-manual/appendix-customizing:configuring the extensible sdk`"
2154*4882a593Smuzhiyun      section in the Yocto Project Application Development and the
2155*4882a593Smuzhiyun      Extensible Software Development Kit (eSDK) manual.
2156*4882a593Smuzhiyun
2157*4882a593Smuzhiyun   :term:`EXCLUDE_FROM_SHLIBS`
2158*4882a593Smuzhiyun      Triggers the OpenEmbedded build system's shared libraries resolver to
2159*4882a593Smuzhiyun      exclude an entire package when scanning for shared libraries.
2160*4882a593Smuzhiyun
2161*4882a593Smuzhiyun      .. note::
2162*4882a593Smuzhiyun
2163*4882a593Smuzhiyun         The shared libraries resolver's functionality results in part from
2164*4882a593Smuzhiyun         the internal function ``package_do_shlibs``, which is part of the
2165*4882a593Smuzhiyun         :ref:`ref-tasks-package` task. You should be aware that the shared
2166*4882a593Smuzhiyun         libraries resolver might implicitly define some dependencies between
2167*4882a593Smuzhiyun         packages.
2168*4882a593Smuzhiyun
2169*4882a593Smuzhiyun      The :term:`EXCLUDE_FROM_SHLIBS` variable is similar to the
2170*4882a593Smuzhiyun      :term:`PRIVATE_LIBS` variable, which excludes a
2171*4882a593Smuzhiyun      package's particular libraries only and not the whole package.
2172*4882a593Smuzhiyun
2173*4882a593Smuzhiyun      Use the :term:`EXCLUDE_FROM_SHLIBS` variable by setting it to "1" for a
2174*4882a593Smuzhiyun      particular package::
2175*4882a593Smuzhiyun
2176*4882a593Smuzhiyun         EXCLUDE_FROM_SHLIBS = "1"
2177*4882a593Smuzhiyun
2178*4882a593Smuzhiyun   :term:`EXCLUDE_FROM_WORLD`
2179*4882a593Smuzhiyun      Directs BitBake to exclude a recipe from world builds (i.e.
2180*4882a593Smuzhiyun      ``bitbake world``). During world builds, BitBake locates, parses and
2181*4882a593Smuzhiyun      builds all recipes found in every layer exposed in the
2182*4882a593Smuzhiyun      ``bblayers.conf`` configuration file.
2183*4882a593Smuzhiyun
2184*4882a593Smuzhiyun      To exclude a recipe from a world build using this variable, set the
2185*4882a593Smuzhiyun      variable to "1" in the recipe.
2186*4882a593Smuzhiyun
2187*4882a593Smuzhiyun      .. note::
2188*4882a593Smuzhiyun
2189*4882a593Smuzhiyun         Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a
2190*4882a593Smuzhiyun         world build in order to satisfy dependencies of other recipes. Adding
2191*4882a593Smuzhiyun         a recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not
2192*4882a593Smuzhiyun         explicitly added to the list of build targets in a world build.
2193*4882a593Smuzhiyun
2194*4882a593Smuzhiyun   :term:`EXTENDPE`
2195*4882a593Smuzhiyun      Used with file and pathnames to create a prefix for a recipe's
2196*4882a593Smuzhiyun      version based on the recipe's :term:`PE` value. If :term:`PE`
2197*4882a593Smuzhiyun      is set and greater than zero for a recipe, :term:`EXTENDPE` becomes that
2198*4882a593Smuzhiyun      value (e.g if :term:`PE` is equal to "1" then :term:`EXTENDPE` becomes "1").
2199*4882a593Smuzhiyun      If a recipe's :term:`PE` is not set (the default) or is equal to zero,
2200*4882a593Smuzhiyun      :term:`EXTENDPE` becomes "".
2201*4882a593Smuzhiyun
2202*4882a593Smuzhiyun      See the :term:`STAMP` variable for an example.
2203*4882a593Smuzhiyun
2204*4882a593Smuzhiyun   :term:`EXTENDPKGV`
2205*4882a593Smuzhiyun      The full package version specification as it appears on the final
2206*4882a593Smuzhiyun      packages produced by a recipe. The variable's value is normally used
2207*4882a593Smuzhiyun      to fix a runtime dependency to the exact same version of another
2208*4882a593Smuzhiyun      package in the same recipe::
2209*4882a593Smuzhiyun
2210*4882a593Smuzhiyun         RDEPENDS:${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
2211*4882a593Smuzhiyun
2212*4882a593Smuzhiyun      The dependency relationships are intended to force the package
2213*4882a593Smuzhiyun      manager to upgrade these types of packages in lock-step.
2214*4882a593Smuzhiyun
2215*4882a593Smuzhiyun   :term:`EXTERNAL_KERNEL_TOOLS`
2216*4882a593Smuzhiyun      When set, the :term:`EXTERNAL_KERNEL_TOOLS` variable indicates that these
2217*4882a593Smuzhiyun      tools are not in the source tree.
2218*4882a593Smuzhiyun
2219*4882a593Smuzhiyun      When kernel tools are available in the tree, they are preferred over
2220*4882a593Smuzhiyun      any externally installed tools. Setting the :term:`EXTERNAL_KERNEL_TOOLS`
2221*4882a593Smuzhiyun      variable tells the OpenEmbedded build system to prefer the installed
2222*4882a593Smuzhiyun      external tools. See the
2223*4882a593Smuzhiyun      :ref:`kernel-yocto <ref-classes-kernel-yocto>` class in
2224*4882a593Smuzhiyun      ``meta/classes`` to see how the variable is used.
2225*4882a593Smuzhiyun
2226*4882a593Smuzhiyun   :term:`EXTERNALSRC`
2227*4882a593Smuzhiyun      When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2228*4882a593Smuzhiyun      class, this variable points to the source tree, which is outside of
2229*4882a593Smuzhiyun      the OpenEmbedded build system. When set, this variable sets the
2230*4882a593Smuzhiyun      :term:`S` variable, which is what the OpenEmbedded build
2231*4882a593Smuzhiyun      system uses to locate unpacked recipe source code.
2232*4882a593Smuzhiyun
2233*4882a593Smuzhiyun      See the ":ref:`ref-classes-externalsrc`" section for details. You
2234*4882a593Smuzhiyun      can also find information on how to use this variable in the
2235*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:building software from an external source`"
2236*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
2237*4882a593Smuzhiyun
2238*4882a593Smuzhiyun   :term:`EXTERNALSRC_BUILD`
2239*4882a593Smuzhiyun      When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
2240*4882a593Smuzhiyun      class, this variable points to the directory in which the recipe's
2241*4882a593Smuzhiyun      source code is built, which is outside of the OpenEmbedded build
2242*4882a593Smuzhiyun      system. When set, this variable sets the :term:`B` variable,
2243*4882a593Smuzhiyun      which is what the OpenEmbedded build system uses to locate the Build
2244*4882a593Smuzhiyun      Directory.
2245*4882a593Smuzhiyun
2246*4882a593Smuzhiyun      See the ":ref:`ref-classes-externalsrc`" section for details. You
2247*4882a593Smuzhiyun      can also find information on how to use this variable in the
2248*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:building software from an external source`"
2249*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
2250*4882a593Smuzhiyun
2251*4882a593Smuzhiyun   :term:`EXTRA_AUTORECONF`
2252*4882a593Smuzhiyun      For recipes inheriting the :ref:`autotools <ref-classes-autotools>`
2253*4882a593Smuzhiyun      class, you can use :term:`EXTRA_AUTORECONF` to specify extra options to
2254*4882a593Smuzhiyun      pass to the ``autoreconf`` command that is executed during the
2255*4882a593Smuzhiyun      :ref:`ref-tasks-configure` task.
2256*4882a593Smuzhiyun
2257*4882a593Smuzhiyun      The default value is "--exclude=autopoint".
2258*4882a593Smuzhiyun
2259*4882a593Smuzhiyun   :term:`EXTRA_IMAGE_FEATURES`
2260*4882a593Smuzhiyun      A list of additional features to include in an image. When listing
2261*4882a593Smuzhiyun      more than one feature, separate them with a space.
2262*4882a593Smuzhiyun
2263*4882a593Smuzhiyun      Typically, you configure this variable in your ``local.conf`` file,
2264*4882a593Smuzhiyun      which is found in the :term:`Build Directory`.
2265*4882a593Smuzhiyun      Although you can use this variable from within a recipe, best
2266*4882a593Smuzhiyun      practices dictate that you do not.
2267*4882a593Smuzhiyun
2268*4882a593Smuzhiyun      .. note::
2269*4882a593Smuzhiyun
2270*4882a593Smuzhiyun         To enable primary features from within the image recipe, use the
2271*4882a593Smuzhiyun         :term:`IMAGE_FEATURES` variable.
2272*4882a593Smuzhiyun
2273*4882a593Smuzhiyun      Here are some examples of features you can add:
2274*4882a593Smuzhiyun
2275*4882a593Smuzhiyun        - "dbg-pkgs" - Adds -dbg packages for all installed packages including
2276*4882a593Smuzhiyun          symbol information for debugging and profiling.
2277*4882a593Smuzhiyun
2278*4882a593Smuzhiyun        - "debug-tweaks" - Makes an image suitable for debugging. For example, allows root logins without passwords and
2279*4882a593Smuzhiyun          enables post-installation logging. See the 'allow-empty-password' and
2280*4882a593Smuzhiyun          'post-install-logging' features in the ":ref:`ref-features-image`"
2281*4882a593Smuzhiyun          section for more information.
2282*4882a593Smuzhiyun        - "dev-pkgs" - Adds -dev packages for all installed packages. This is
2283*4882a593Smuzhiyun          useful if you want to develop against the libraries in the image.
2284*4882a593Smuzhiyun        - "read-only-rootfs" - Creates an image whose root filesystem is
2285*4882a593Smuzhiyun          read-only. See the
2286*4882a593Smuzhiyun          ":ref:`dev-manual/common-tasks:creating a read-only root filesystem`"
2287*4882a593Smuzhiyun          section in the Yocto Project Development Tasks Manual for more
2288*4882a593Smuzhiyun          information
2289*4882a593Smuzhiyun        - "tools-debug" - Adds debugging tools such as gdb and strace.
2290*4882a593Smuzhiyun        - "tools-sdk" - Adds development tools such as gcc, make,
2291*4882a593Smuzhiyun          pkgconfig and so forth.
2292*4882a593Smuzhiyun        - "tools-testapps" - Adds useful testing tools
2293*4882a593Smuzhiyun          such as ts_print, aplay, arecord and so forth.
2294*4882a593Smuzhiyun
2295*4882a593Smuzhiyun      For a complete list of image features that ships with the Yocto
2296*4882a593Smuzhiyun      Project, see the ":ref:`ref-features-image`" section.
2297*4882a593Smuzhiyun
2298*4882a593Smuzhiyun      For an example that shows how to customize your image by using this
2299*4882a593Smuzhiyun      variable, see the ":ref:`dev-manual/common-tasks:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``"
2300*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
2301*4882a593Smuzhiyun
2302*4882a593Smuzhiyun   :term:`EXTRA_IMAGECMD`
2303*4882a593Smuzhiyun      Specifies additional options for the image creation command that has
2304*4882a593Smuzhiyun      been specified in :term:`IMAGE_CMD`. When setting
2305*4882a593Smuzhiyun      this variable, use an override for the associated image type. Here is
2306*4882a593Smuzhiyun      an example::
2307*4882a593Smuzhiyun
2308*4882a593Smuzhiyun         EXTRA_IMAGECMD:ext3 ?= "-i 4096"
2309*4882a593Smuzhiyun
2310*4882a593Smuzhiyun   :term:`EXTRA_IMAGEDEPENDS`
2311*4882a593Smuzhiyun      A list of recipes to build that do not provide packages for
2312*4882a593Smuzhiyun      installing into the root filesystem.
2313*4882a593Smuzhiyun
2314*4882a593Smuzhiyun      Sometimes a recipe is required to build the final image but is not
2315*4882a593Smuzhiyun      needed in the root filesystem. You can use the :term:`EXTRA_IMAGEDEPENDS`
2316*4882a593Smuzhiyun      variable to list these recipes and thus specify the dependencies. A
2317*4882a593Smuzhiyun      typical example is a required bootloader in a machine configuration.
2318*4882a593Smuzhiyun
2319*4882a593Smuzhiyun      .. note::
2320*4882a593Smuzhiyun
2321*4882a593Smuzhiyun         To add packages to the root filesystem, see the various
2322*4882a593Smuzhiyun         :term:`RDEPENDS` and :term:`RRECOMMENDS` variables.
2323*4882a593Smuzhiyun
2324*4882a593Smuzhiyun   :term:`EXTRA_OECMAKE`
2325*4882a593Smuzhiyun      Additional `CMake <https://cmake.org/overview/>`__ options. See the
2326*4882a593Smuzhiyun      :ref:`cmake <ref-classes-cmake>` class for additional information.
2327*4882a593Smuzhiyun
2328*4882a593Smuzhiyun   :term:`EXTRA_OECONF`
2329*4882a593Smuzhiyun      Additional ``configure`` script options. See
2330*4882a593Smuzhiyun      :term:`PACKAGECONFIG_CONFARGS` for
2331*4882a593Smuzhiyun      additional information on passing configure script options.
2332*4882a593Smuzhiyun
2333*4882a593Smuzhiyun   :term:`EXTRA_OEMAKE`
2334*4882a593Smuzhiyun      Additional GNU ``make`` options.
2335*4882a593Smuzhiyun
2336*4882a593Smuzhiyun      Because the :term:`EXTRA_OEMAKE` defaults to "", you need to set the
2337*4882a593Smuzhiyun      variable to specify any required GNU options.
2338*4882a593Smuzhiyun
2339*4882a593Smuzhiyun      :term:`PARALLEL_MAKE` and
2340*4882a593Smuzhiyun      :term:`PARALLEL_MAKEINST` also make use of
2341*4882a593Smuzhiyun      :term:`EXTRA_OEMAKE` to pass the required flags.
2342*4882a593Smuzhiyun
2343*4882a593Smuzhiyun   :term:`EXTRA_OESCONS`
2344*4882a593Smuzhiyun      When inheriting the :ref:`scons <ref-classes-scons>` class, this
2345*4882a593Smuzhiyun      variable specifies additional configuration options you want to pass
2346*4882a593Smuzhiyun      to the ``scons`` command line.
2347*4882a593Smuzhiyun
2348*4882a593Smuzhiyun   :term:`EXTRA_USERS_PARAMS`
2349*4882a593Smuzhiyun      When inheriting the :ref:`extrausers <ref-classes-extrausers>`
2350*4882a593Smuzhiyun      class, this variable provides image level user and group operations.
2351*4882a593Smuzhiyun      This is a more global method of providing user and group
2352*4882a593Smuzhiyun      configuration as compared to using the
2353*4882a593Smuzhiyun      :ref:`useradd <ref-classes-useradd>` class, which ties user and
2354*4882a593Smuzhiyun      group configurations to a specific recipe.
2355*4882a593Smuzhiyun
2356*4882a593Smuzhiyun      The set list of commands you can configure using the
2357*4882a593Smuzhiyun      :term:`EXTRA_USERS_PARAMS` is shown in the :ref:`extrausers <ref-classes-extrausers>` class. These
2358*4882a593Smuzhiyun      commands map to the normal Unix commands of the same names::
2359*4882a593Smuzhiyun
2360*4882a593Smuzhiyun         # EXTRA_USERS_PARAMS = "\
2361*4882a593Smuzhiyun         # useradd -p '' tester; \
2362*4882a593Smuzhiyun         # groupadd developers; \
2363*4882a593Smuzhiyun         # userdel nobody; \
2364*4882a593Smuzhiyun         # groupdel -g video; \
2365*4882a593Smuzhiyun         # groupmod -g 1020 developers; \
2366*4882a593Smuzhiyun         # usermod -s /bin/sh tester; \
2367*4882a593Smuzhiyun         # "
2368*4882a593Smuzhiyun
2369*4882a593Smuzhiyun      Hardcoded passwords are supported via the ``-p`` parameters for
2370*4882a593Smuzhiyun      ``useradd`` or ``usermod``, but only hashed.
2371*4882a593Smuzhiyun
2372*4882a593Smuzhiyun      Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns
2373*4882a593Smuzhiyun      passwords. First on host, create the (escaped) password hash::
2374*4882a593Smuzhiyun
2375*4882a593Smuzhiyun         printf "%q" $(mkpasswd -m sha256crypt tester01)
2376*4882a593Smuzhiyun
2377*4882a593Smuzhiyun      The resulting hash is set to a variable and used in ``useradd`` command parameters::
2378*4882a593Smuzhiyun
2379*4882a593Smuzhiyun         inherit extrausers
2380*4882a593Smuzhiyun         PASSWD = "\$X\$ABC123\$A-Long-Hash"
2381*4882a593Smuzhiyun         EXTRA_USERS_PARAMS = "\
2382*4882a593Smuzhiyun             useradd -p '${PASSWD}' tester-jim; \
2383*4882a593Smuzhiyun             useradd -p '${PASSWD}' tester-sue; \
2384*4882a593Smuzhiyun             "
2385*4882a593Smuzhiyun
2386*4882a593Smuzhiyun      Finally, here is an example that sets the root password::
2387*4882a593Smuzhiyun
2388*4882a593Smuzhiyun         inherit extrausers
2389*4882a593Smuzhiyun         EXTRA_USERS_PARAMS = "\
2390*4882a593Smuzhiyun             usermod -p '${PASSWD}' root; \
2391*4882a593Smuzhiyun             "
2392*4882a593Smuzhiyun
2393*4882a593Smuzhiyun      .. note::
2394*4882a593Smuzhiyun
2395*4882a593Smuzhiyun         From a security perspective, hardcoding a default password is not
2396*4882a593Smuzhiyun         generally a good idea or even legal in some jurisdictions. It is
2397*4882a593Smuzhiyun         recommended that you do not do this if you are building a production
2398*4882a593Smuzhiyun         image.
2399*4882a593Smuzhiyun
2400*4882a593Smuzhiyun      Additionally there is a special ``passwd-expire`` command that will
2401*4882a593Smuzhiyun      cause the password for a user to be expired and thus force changing it
2402*4882a593Smuzhiyun      on first login, for example::
2403*4882a593Smuzhiyun
2404*4882a593Smuzhiyun         EXTRA_USERS_PARAMS += " useradd myuser; passwd-expire myuser;"
2405*4882a593Smuzhiyun
2406*4882a593Smuzhiyun      .. note::
2407*4882a593Smuzhiyun
2408*4882a593Smuzhiyun         At present, ``passwd-expire`` may only work for remote logins when
2409*4882a593Smuzhiyun         using OpenSSH and not dropbear as an SSH server.
2410*4882a593Smuzhiyun
2411*4882a593Smuzhiyun   :term:`EXTRANATIVEPATH`
2412*4882a593Smuzhiyun      A list of subdirectories of
2413*4882a593Smuzhiyun      ``${``\ :term:`STAGING_BINDIR_NATIVE`\ ``}``
2414*4882a593Smuzhiyun      added to the beginning of the environment variable ``PATH``. As an
2415*4882a593Smuzhiyun      example, the following prepends
2416*4882a593Smuzhiyun      "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to
2417*4882a593Smuzhiyun      ``PATH``::
2418*4882a593Smuzhiyun
2419*4882a593Smuzhiyun         EXTRANATIVEPATH = "foo bar"
2420*4882a593Smuzhiyun
2421*4882a593Smuzhiyun   :term:`FEATURE_PACKAGES`
2422*4882a593Smuzhiyun      Defines one or more packages to include in an image when a specific
2423*4882a593Smuzhiyun      item is included in :term:`IMAGE_FEATURES`.
2424*4882a593Smuzhiyun      When setting the value, :term:`FEATURE_PACKAGES` should have the name of
2425*4882a593Smuzhiyun      the feature item as an override. Here is an example::
2426*4882a593Smuzhiyun
2427*4882a593Smuzhiyun         FEATURE_PACKAGES_widget = "package1 package2"
2428*4882a593Smuzhiyun
2429*4882a593Smuzhiyun      In this example, if "widget" were added to :term:`IMAGE_FEATURES`,
2430*4882a593Smuzhiyun      package1 and package2 would be included in the image.
2431*4882a593Smuzhiyun
2432*4882a593Smuzhiyun      .. note::
2433*4882a593Smuzhiyun
2434*4882a593Smuzhiyun         Packages installed by features defined through :term:`FEATURE_PACKAGES`
2435*4882a593Smuzhiyun         are often package groups. While similarly named, you should not
2436*4882a593Smuzhiyun         confuse the :term:`FEATURE_PACKAGES` variable with package groups, which
2437*4882a593Smuzhiyun         are discussed elsewhere in the documentation.
2438*4882a593Smuzhiyun
2439*4882a593Smuzhiyun   :term:`FEED_DEPLOYDIR_BASE_URI`
2440*4882a593Smuzhiyun      Points to the base URL of the server and location within the
2441*4882a593Smuzhiyun      document-root that provides the metadata and packages required by
2442*4882a593Smuzhiyun      OPKG to support runtime package management of IPK packages. You set
2443*4882a593Smuzhiyun      this variable in your ``local.conf`` file.
2444*4882a593Smuzhiyun
2445*4882a593Smuzhiyun      Consider the following example::
2446*4882a593Smuzhiyun
2447*4882a593Smuzhiyun         FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
2448*4882a593Smuzhiyun
2449*4882a593Smuzhiyun      This example assumes you are serving
2450*4882a593Smuzhiyun      your packages over HTTP and your databases are located in a directory
2451*4882a593Smuzhiyun      named ``BOARD-dir``, which is underneath your HTTP server's
2452*4882a593Smuzhiyun      document-root. In this case, the OpenEmbedded build system generates
2453*4882a593Smuzhiyun      a set of configuration files for you in your target that work with
2454*4882a593Smuzhiyun      the feed.
2455*4882a593Smuzhiyun
2456*4882a593Smuzhiyun   :term:`FILES`
2457*4882a593Smuzhiyun      The list of files and directories that are placed in a package. The
2458*4882a593Smuzhiyun      :term:`PACKAGES` variable lists the packages
2459*4882a593Smuzhiyun      generated by a recipe.
2460*4882a593Smuzhiyun
2461*4882a593Smuzhiyun      To use the :term:`FILES` variable, provide a package name override that
2462*4882a593Smuzhiyun      identifies the resulting package. Then, provide a space-separated
2463*4882a593Smuzhiyun      list of files or paths that identify the files you want included as
2464*4882a593Smuzhiyun      part of the resulting package. Here is an example::
2465*4882a593Smuzhiyun
2466*4882a593Smuzhiyun         FILES:${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile"
2467*4882a593Smuzhiyun
2468*4882a593Smuzhiyun      .. note::
2469*4882a593Smuzhiyun
2470*4882a593Smuzhiyun         -  When specifying files or paths, you can pattern match using
2471*4882a593Smuzhiyun            Python's
2472*4882a593Smuzhiyun            `glob <https://docs.python.org/3/library/glob.html>`_
2473*4882a593Smuzhiyun            syntax. For details on the syntax, see the documentation by
2474*4882a593Smuzhiyun            following the previous link.
2475*4882a593Smuzhiyun
2476*4882a593Smuzhiyun         -  When specifying paths as part of the :term:`FILES` variable, it is
2477*4882a593Smuzhiyun            good practice to use appropriate path variables. For example,
2478*4882a593Smuzhiyun            use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}``
2479*4882a593Smuzhiyun            rather than ``/usr/bin``. You can find a list of these
2480*4882a593Smuzhiyun            variables at the top of the ``meta/conf/bitbake.conf`` file in
2481*4882a593Smuzhiyun            the :term:`Source Directory`. You will also
2482*4882a593Smuzhiyun            find the default values of the various ``FILES:*`` variables in
2483*4882a593Smuzhiyun            this file.
2484*4882a593Smuzhiyun
2485*4882a593Smuzhiyun      If some of the files you provide with the :term:`FILES` variable are
2486*4882a593Smuzhiyun      editable and you know they should not be overwritten during the
2487*4882a593Smuzhiyun      package update process by the Package Management System (PMS), you
2488*4882a593Smuzhiyun      can identify these files so that the PMS will not overwrite them. See
2489*4882a593Smuzhiyun      the :term:`CONFFILES` variable for information on
2490*4882a593Smuzhiyun      how to identify these files to the PMS.
2491*4882a593Smuzhiyun
2492*4882a593Smuzhiyun   :term:`FILES_SOLIBSDEV`
2493*4882a593Smuzhiyun      Defines the file specification to match
2494*4882a593Smuzhiyun      :term:`SOLIBSDEV`. In other words,
2495*4882a593Smuzhiyun      :term:`FILES_SOLIBSDEV` defines the full path name of the development
2496*4882a593Smuzhiyun      symbolic link (symlink) for shared libraries on the target platform.
2497*4882a593Smuzhiyun
2498*4882a593Smuzhiyun      The following statement from the ``bitbake.conf`` shows how it is
2499*4882a593Smuzhiyun      set::
2500*4882a593Smuzhiyun
2501*4882a593Smuzhiyun         FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
2502*4882a593Smuzhiyun
2503*4882a593Smuzhiyun   :term:`FILESEXTRAPATHS`
2504*4882a593Smuzhiyun      Extends the search path the OpenEmbedded build system uses when
2505*4882a593Smuzhiyun      looking for files and patches as it processes recipes and append
2506*4882a593Smuzhiyun      files. The default directories BitBake uses when it processes recipes
2507*4882a593Smuzhiyun      are initially defined by the :term:`FILESPATH`
2508*4882a593Smuzhiyun      variable. You can extend :term:`FILESPATH` variable by using
2509*4882a593Smuzhiyun      :term:`FILESEXTRAPATHS`.
2510*4882a593Smuzhiyun
2511*4882a593Smuzhiyun      Best practices dictate that you accomplish this by using
2512*4882a593Smuzhiyun      :term:`FILESEXTRAPATHS` from within a ``.bbappend`` file and that you
2513*4882a593Smuzhiyun      prepend paths as follows::
2514*4882a593Smuzhiyun
2515*4882a593Smuzhiyun         FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
2516*4882a593Smuzhiyun
2517*4882a593Smuzhiyun      In the above example, the build system first
2518*4882a593Smuzhiyun      looks for files in a directory that has the same name as the
2519*4882a593Smuzhiyun      corresponding append file.
2520*4882a593Smuzhiyun
2521*4882a593Smuzhiyun      .. note::
2522*4882a593Smuzhiyun
2523*4882a593Smuzhiyun         When extending :term:`FILESEXTRAPATHS`, be sure to use the immediate
2524*4882a593Smuzhiyun         expansion (``:=``) operator. Immediate expansion makes sure that
2525*4882a593Smuzhiyun         BitBake evaluates :term:`THISDIR` at the time the
2526*4882a593Smuzhiyun         directive is encountered rather than at some later time when
2527*4882a593Smuzhiyun         expansion might result in a directory that does not contain the
2528*4882a593Smuzhiyun         files you need.
2529*4882a593Smuzhiyun
2530*4882a593Smuzhiyun         Also, include the trailing separating colon character if you are
2531*4882a593Smuzhiyun         prepending. The trailing colon character is necessary because you
2532*4882a593Smuzhiyun         are directing BitBake to extend the path by prepending directories
2533*4882a593Smuzhiyun         to the search path.
2534*4882a593Smuzhiyun
2535*4882a593Smuzhiyun      Here is another common use::
2536*4882a593Smuzhiyun
2537*4882a593Smuzhiyun         FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
2538*4882a593Smuzhiyun
2539*4882a593Smuzhiyun      In this example, the build system extends the
2540*4882a593Smuzhiyun      :term:`FILESPATH` variable to include a directory named ``files`` that is
2541*4882a593Smuzhiyun      in the same directory as the corresponding append file.
2542*4882a593Smuzhiyun
2543*4882a593Smuzhiyun      This next example specifically adds three paths::
2544*4882a593Smuzhiyun
2545*4882a593Smuzhiyun         FILESEXTRAPATHS:prepend := "path_1:path_2:path_3:"
2546*4882a593Smuzhiyun
2547*4882a593Smuzhiyun      A final example shows how you can extend the search path and include
2548*4882a593Smuzhiyun      a :term:`MACHINE`-specific override, which is useful
2549*4882a593Smuzhiyun      in a BSP layer::
2550*4882a593Smuzhiyun
2551*4882a593Smuzhiyun          FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:"
2552*4882a593Smuzhiyun
2553*4882a593Smuzhiyun      The previous statement appears in the
2554*4882a593Smuzhiyun      ``linux-yocto-dev.bbappend`` file, which is found in the
2555*4882a593Smuzhiyun      :ref:`overview-manual/development-environment:yocto project source repositories` in
2556*4882a593Smuzhiyun      ``meta-intel/common/recipes-kernel/linux``. Here, the machine
2557*4882a593Smuzhiyun      override is a special :term:`PACKAGE_ARCH`
2558*4882a593Smuzhiyun      definition for multiple ``meta-intel`` machines.
2559*4882a593Smuzhiyun
2560*4882a593Smuzhiyun      .. note::
2561*4882a593Smuzhiyun
2562*4882a593Smuzhiyun         For a layer that supports a single BSP, the override could just be
2563*4882a593Smuzhiyun         the value of :term:`MACHINE`.
2564*4882a593Smuzhiyun
2565*4882a593Smuzhiyun      By prepending paths in ``.bbappend`` files, you allow multiple append
2566*4882a593Smuzhiyun      files that reside in different layers but are used for the same
2567*4882a593Smuzhiyun      recipe to correctly extend the path.
2568*4882a593Smuzhiyun
2569*4882a593Smuzhiyun   :term:`FILESOVERRIDES`
2570*4882a593Smuzhiyun      A subset of :term:`OVERRIDES` used by the
2571*4882a593Smuzhiyun      OpenEmbedded build system for creating
2572*4882a593Smuzhiyun      :term:`FILESPATH`. The :term:`FILESOVERRIDES` variable
2573*4882a593Smuzhiyun      uses overrides to automatically extend the
2574*4882a593Smuzhiyun      :term:`FILESPATH` variable. For an example of how
2575*4882a593Smuzhiyun      that works, see the :term:`FILESPATH` variable
2576*4882a593Smuzhiyun      description. Additionally, you find more information on how overrides
2577*4882a593Smuzhiyun      are handled in the
2578*4882a593Smuzhiyun      ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
2579*4882a593Smuzhiyun      section of the BitBake User Manual.
2580*4882a593Smuzhiyun
2581*4882a593Smuzhiyun      By default, the :term:`FILESOVERRIDES` variable is defined as::
2582*4882a593Smuzhiyun
2583*4882a593Smuzhiyun         FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2584*4882a593Smuzhiyun
2585*4882a593Smuzhiyun      .. note::
2586*4882a593Smuzhiyun
2587*4882a593Smuzhiyun         Do not hand-edit the :term:`FILESOVERRIDES` variable. The values match up
2588*4882a593Smuzhiyun         with expected overrides and are used in an expected manner by the
2589*4882a593Smuzhiyun         build system.
2590*4882a593Smuzhiyun
2591*4882a593Smuzhiyun   :term:`FILESPATH`
2592*4882a593Smuzhiyun      The default set of directories the OpenEmbedded build system uses
2593*4882a593Smuzhiyun      when searching for patches and files.
2594*4882a593Smuzhiyun
2595*4882a593Smuzhiyun      During the build process, BitBake searches each directory in
2596*4882a593Smuzhiyun      :term:`FILESPATH` in the specified order when looking for files and
2597*4882a593Smuzhiyun      patches specified by each ``file://`` URI in a recipe's
2598*4882a593Smuzhiyun      :term:`SRC_URI` statements.
2599*4882a593Smuzhiyun
2600*4882a593Smuzhiyun      The default value for the :term:`FILESPATH` variable is defined in the
2601*4882a593Smuzhiyun      :ref:`ref-classes-base` class found in ``meta/classes`` in the
2602*4882a593Smuzhiyun      :term:`Source Directory`::
2603*4882a593Smuzhiyun
2604*4882a593Smuzhiyun         FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
2605*4882a593Smuzhiyun             "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
2606*4882a593Smuzhiyun
2607*4882a593Smuzhiyun      The
2608*4882a593Smuzhiyun      :term:`FILESPATH` variable is automatically extended using the overrides
2609*4882a593Smuzhiyun      from the :term:`FILESOVERRIDES` variable.
2610*4882a593Smuzhiyun
2611*4882a593Smuzhiyun      .. note::
2612*4882a593Smuzhiyun
2613*4882a593Smuzhiyun         -  Do not hand-edit the :term:`FILESPATH` variable. If you want the
2614*4882a593Smuzhiyun            build system to look in directories other than the defaults,
2615*4882a593Smuzhiyun            extend the :term:`FILESPATH` variable by using the
2616*4882a593Smuzhiyun            :term:`FILESEXTRAPATHS` variable.
2617*4882a593Smuzhiyun
2618*4882a593Smuzhiyun         -  Be aware that the default :term:`FILESPATH` directories do not map
2619*4882a593Smuzhiyun            to directories in custom layers where append files
2620*4882a593Smuzhiyun            (``.bbappend``) are used. If you want the build system to find
2621*4882a593Smuzhiyun            patches or files that reside with your append files, you need
2622*4882a593Smuzhiyun            to extend the :term:`FILESPATH` variable by using the
2623*4882a593Smuzhiyun            :term:`FILESEXTRAPATHS` variable.
2624*4882a593Smuzhiyun
2625*4882a593Smuzhiyun      You can take advantage of this searching behavior in useful ways. For
2626*4882a593Smuzhiyun      example, consider a case where there is the following directory structure
2627*4882a593Smuzhiyun      for general and machine-specific configurations::
2628*4882a593Smuzhiyun
2629*4882a593Smuzhiyun         files/defconfig
2630*4882a593Smuzhiyun         files/MACHINEA/defconfig
2631*4882a593Smuzhiyun         files/MACHINEB/defconfig
2632*4882a593Smuzhiyun
2633*4882a593Smuzhiyun      Also in the example, the :term:`SRC_URI` statement contains
2634*4882a593Smuzhiyun      "file://defconfig". Given this scenario, you can set
2635*4882a593Smuzhiyun      :term:`MACHINE` to "MACHINEA" and cause the build
2636*4882a593Smuzhiyun      system to use files from ``files/MACHINEA``. Set :term:`MACHINE` to
2637*4882a593Smuzhiyun      "MACHINEB" and the build system uses files from ``files/MACHINEB``.
2638*4882a593Smuzhiyun      Finally, for any machine other than "MACHINEA" and "MACHINEB", the
2639*4882a593Smuzhiyun      build system uses files from ``files/defconfig``.
2640*4882a593Smuzhiyun
2641*4882a593Smuzhiyun      You can find out more about the patching process in the
2642*4882a593Smuzhiyun      ":ref:`overview-manual/concepts:patching`" section
2643*4882a593Smuzhiyun      in the Yocto Project Overview and Concepts Manual and the
2644*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:patching code`" section in
2645*4882a593Smuzhiyun      the Yocto Project Development Tasks Manual. See the
2646*4882a593Smuzhiyun      :ref:`ref-tasks-patch` task as well.
2647*4882a593Smuzhiyun
2648*4882a593Smuzhiyun   :term:`FILESYSTEM_PERMS_TABLES`
2649*4882a593Smuzhiyun      Allows you to define your own file permissions settings table as part
2650*4882a593Smuzhiyun      of your configuration for the packaging process. For example, suppose
2651*4882a593Smuzhiyun      you need a consistent set of custom permissions for a set of groups
2652*4882a593Smuzhiyun      and users across an entire work project. It is best to do this in the
2653*4882a593Smuzhiyun      packages themselves but this is not always possible.
2654*4882a593Smuzhiyun
2655*4882a593Smuzhiyun      By default, the OpenEmbedded build system uses the ``fs-perms.txt``,
2656*4882a593Smuzhiyun      which is located in the ``meta/files`` folder in the :term:`Source Directory`.
2657*4882a593Smuzhiyun      If you create your own file
2658*4882a593Smuzhiyun      permissions setting table, you should place it in your layer or the
2659*4882a593Smuzhiyun      distro's layer.
2660*4882a593Smuzhiyun
2661*4882a593Smuzhiyun      You define the :term:`FILESYSTEM_PERMS_TABLES` variable in the
2662*4882a593Smuzhiyun      ``conf/local.conf`` file, which is found in the :term:`Build Directory`,
2663*4882a593Smuzhiyun      to point to your custom
2664*4882a593Smuzhiyun      ``fs-perms.txt``. You can specify more than a single file permissions
2665*4882a593Smuzhiyun      setting table. The paths you specify to these files must be defined
2666*4882a593Smuzhiyun      within the :term:`BBPATH` variable.
2667*4882a593Smuzhiyun
2668*4882a593Smuzhiyun      For guidance on how to create your own file permissions settings
2669*4882a593Smuzhiyun      table file, examine the existing ``fs-perms.txt``.
2670*4882a593Smuzhiyun
2671*4882a593Smuzhiyun   :term:`FIT_DESC`
2672*4882a593Smuzhiyun      Specifies the description string encoded into a fitImage. The default
2673*4882a593Smuzhiyun      value is set by the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2674*4882a593Smuzhiyun      class as follows::
2675*4882a593Smuzhiyun
2676*4882a593Smuzhiyun         FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
2677*4882a593Smuzhiyun
2678*4882a593Smuzhiyun   :term:`FIT_GENERATE_KEYS`
2679*4882a593Smuzhiyun      Decides whether to generate the keys for signing fitImage if they
2680*4882a593Smuzhiyun      don't already exist. The keys are created in :term:`UBOOT_SIGN_KEYDIR`.
2681*4882a593Smuzhiyun      The default value is 0.
2682*4882a593Smuzhiyun
2683*4882a593Smuzhiyun   :term:`FIT_HASH_ALG`
2684*4882a593Smuzhiyun      Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256.
2685*4882a593Smuzhiyun
2686*4882a593Smuzhiyun   :term:`FIT_KERNEL_COMP_ALG`
2687*4882a593Smuzhiyun      Compression algorithm to use for the kernel image inside the FIT Image.
2688*4882a593Smuzhiyun      At present, the only supported values are "gzip" (default) or "none"
2689*4882a593Smuzhiyun      If you set this variable to anything other than "none" you may also need
2690*4882a593Smuzhiyun      to set :term:`FIT_KERNEL_COMP_ALG_EXTENSION`.
2691*4882a593Smuzhiyun
2692*4882a593Smuzhiyun   :term:`FIT_KERNEL_COMP_ALG_EXTENSION`
2693*4882a593Smuzhiyun      File extension corresponding to :term:`FIT_KERNEL_COMP_ALG`. The default
2694*4882a593Smuzhiyun      value is ".gz".
2695*4882a593Smuzhiyun
2696*4882a593Smuzhiyun   :term:`FIT_KEY_GENRSA_ARGS`
2697*4882a593Smuzhiyun      Arguments to openssl genrsa for generating RSA private key for signing
2698*4882a593Smuzhiyun      fitImage. The default value is "-F4". i.e. the public exponent 65537 to
2699*4882a593Smuzhiyun      use.
2700*4882a593Smuzhiyun
2701*4882a593Smuzhiyun   :term:`FIT_KEY_REQ_ARGS`
2702*4882a593Smuzhiyun      Arguments to openssl req for generating certificate for signing fitImage.
2703*4882a593Smuzhiyun      The default value is "-batch -new". batch for non interactive mode
2704*4882a593Smuzhiyun      and new for generating new keys.
2705*4882a593Smuzhiyun
2706*4882a593Smuzhiyun   :term:`FIT_KEY_SIGN_PKCS`
2707*4882a593Smuzhiyun      Format for public key certificate used in signing fitImage.
2708*4882a593Smuzhiyun      The default value is "x509".
2709*4882a593Smuzhiyun
2710*4882a593Smuzhiyun   :term:`FIT_SIGN_ALG`
2711*4882a593Smuzhiyun      Specifies the signature algorithm used in creating the FIT Image.
2712*4882a593Smuzhiyun      For e.g. rsa2048.
2713*4882a593Smuzhiyun
2714*4882a593Smuzhiyun   :term:`FIT_SIGN_INDIVIDUAL`
2715*4882a593Smuzhiyun      If set to "1", then the :ref:`kernel-fitimage <ref-classes-kernel-fitimage>`
2716*4882a593Smuzhiyun      class will sign the kernel, dtb and ramdisk images individually in addition
2717*4882a593Smuzhiyun      to signing the fitImage itself. This could be useful if you are
2718*4882a593Smuzhiyun      intending to verify signatures in another context than booting via
2719*4882a593Smuzhiyun      U-Boot.
2720*4882a593Smuzhiyun
2721*4882a593Smuzhiyun   :term:`FIT_SIGN_NUMBITS`
2722*4882a593Smuzhiyun      Size of private key in number of bits used in fitImage. The default
2723*4882a593Smuzhiyun      value is "2048".
2724*4882a593Smuzhiyun
2725*4882a593Smuzhiyun   :term:`FONT_EXTRA_RDEPENDS`
2726*4882a593Smuzhiyun      When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2727*4882a593Smuzhiyun      this variable specifies the runtime dependencies for font packages.
2728*4882a593Smuzhiyun      By default, the :term:`FONT_EXTRA_RDEPENDS` is set to "fontconfig-utils".
2729*4882a593Smuzhiyun
2730*4882a593Smuzhiyun   :term:`FONT_PACKAGES`
2731*4882a593Smuzhiyun      When inheriting the :ref:`fontcache <ref-classes-fontcache>` class,
2732*4882a593Smuzhiyun      this variable identifies packages containing font files that need to
2733*4882a593Smuzhiyun      be cached by Fontconfig. By default, the :ref:`fontcache <ref-classes-fontcache>` class assumes
2734*4882a593Smuzhiyun      that fonts are in the recipe's main package (i.e.
2735*4882a593Smuzhiyun      ``${``\ :term:`PN`\ ``}``). Use this variable if fonts you
2736*4882a593Smuzhiyun      need are in a package other than that main package.
2737*4882a593Smuzhiyun
2738*4882a593Smuzhiyun   :term:`FORCE_RO_REMOVE`
2739*4882a593Smuzhiyun      Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED``
2740*4882a593Smuzhiyun      during the generation of the root filesystem.
2741*4882a593Smuzhiyun
2742*4882a593Smuzhiyun      Set the variable to "1" to force the removal of these packages.
2743*4882a593Smuzhiyun
2744*4882a593Smuzhiyun   :term:`FULL_OPTIMIZATION`
2745*4882a593Smuzhiyun      The options to pass in :term:`TARGET_CFLAGS` and :term:`CFLAGS` when
2746*4882a593Smuzhiyun      compiling an optimized system. This variable defaults to "-O2 -pipe
2747*4882a593Smuzhiyun      ${DEBUG_FLAGS}".
2748*4882a593Smuzhiyun
2749*4882a593Smuzhiyun   :term:`GCCPIE`
2750*4882a593Smuzhiyun      Enables Position Independent Executables (PIE) within the GNU C
2751*4882a593Smuzhiyun      Compiler (GCC). Enabling PIE in the GCC makes Return Oriented
2752*4882a593Smuzhiyun      Programming (ROP) attacks much more difficult to execute.
2753*4882a593Smuzhiyun
2754*4882a593Smuzhiyun      By default the ``security_flags.inc`` file enables PIE by setting the
2755*4882a593Smuzhiyun      variable as follows::
2756*4882a593Smuzhiyun
2757*4882a593Smuzhiyun         GCCPIE ?= "--enable-default-pie"
2758*4882a593Smuzhiyun
2759*4882a593Smuzhiyun   :term:`GCCVERSION`
2760*4882a593Smuzhiyun      Specifies the default version of the GNU C Compiler (GCC) used for
2761*4882a593Smuzhiyun      compilation. By default, :term:`GCCVERSION` is set to "8.x" in the
2762*4882a593Smuzhiyun      ``meta/conf/distro/include/tcmode-default.inc`` include file::
2763*4882a593Smuzhiyun
2764*4882a593Smuzhiyun         GCCVERSION ?= "8.%"
2765*4882a593Smuzhiyun
2766*4882a593Smuzhiyun      You can override this value by setting it in a
2767*4882a593Smuzhiyun      configuration file such as the ``local.conf``.
2768*4882a593Smuzhiyun
2769*4882a593Smuzhiyun   :term:`GDB`
2770*4882a593Smuzhiyun      The minimal command and arguments to run the GNU Debugger.
2771*4882a593Smuzhiyun
2772*4882a593Smuzhiyun   :term:`GIR_EXTRA_LIBS_PATH`
2773*4882a593Smuzhiyun      Allows to specify an extra search path for ``.so`` files
2774*4882a593Smuzhiyun      in GLib related recipes using GObject introspection,
2775*4882a593Smuzhiyun      and which do not compile without this setting.
2776*4882a593Smuzhiyun      See the ":ref:`dev-manual/common-tasks:enabling gobject introspection support`"
2777*4882a593Smuzhiyun      section for details.
2778*4882a593Smuzhiyun
2779*4882a593Smuzhiyun   :term:`GITDIR`
2780*4882a593Smuzhiyun      The directory in which a local copy of a Git repository is stored
2781*4882a593Smuzhiyun      when it is cloned.
2782*4882a593Smuzhiyun
2783*4882a593Smuzhiyun   :term:`GLIBC_GENERATE_LOCALES`
2784*4882a593Smuzhiyun      Specifies the list of GLIBC locales to generate should you not wish
2785*4882a593Smuzhiyun      to generate all LIBC locals, which can be time consuming.
2786*4882a593Smuzhiyun
2787*4882a593Smuzhiyun      .. note::
2788*4882a593Smuzhiyun
2789*4882a593Smuzhiyun         If you specifically remove the locale ``en_US.UTF-8``, you must set
2790*4882a593Smuzhiyun         :term:`IMAGE_LINGUAS` appropriately.
2791*4882a593Smuzhiyun
2792*4882a593Smuzhiyun      You can set :term:`GLIBC_GENERATE_LOCALES` in your ``local.conf`` file.
2793*4882a593Smuzhiyun      By default, all locales are generated.
2794*4882a593Smuzhiyun      ::
2795*4882a593Smuzhiyun
2796*4882a593Smuzhiyun         GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
2797*4882a593Smuzhiyun
2798*4882a593Smuzhiyun   :term:`GROUPADD_PARAM`
2799*4882a593Smuzhiyun      When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2800*4882a593Smuzhiyun      this variable specifies for a package what parameters should be
2801*4882a593Smuzhiyun      passed to the ``groupadd`` command if you wish to add a group to the
2802*4882a593Smuzhiyun      system when the package is installed.
2803*4882a593Smuzhiyun
2804*4882a593Smuzhiyun      Here is an example from the ``dbus`` recipe::
2805*4882a593Smuzhiyun
2806*4882a593Smuzhiyun         GROUPADD_PARAM:${PN} = "-r netdev"
2807*4882a593Smuzhiyun
2808*4882a593Smuzhiyun      For information on the standard Linux shell command
2809*4882a593Smuzhiyun      ``groupadd``, see https://linux.die.net/man/8/groupadd.
2810*4882a593Smuzhiyun
2811*4882a593Smuzhiyun   :term:`GROUPMEMS_PARAM`
2812*4882a593Smuzhiyun      When inheriting the :ref:`useradd <ref-classes-useradd>` class,
2813*4882a593Smuzhiyun      this variable specifies for a package what parameters should be
2814*4882a593Smuzhiyun      passed to the ``groupmems`` command if you wish to modify the members
2815*4882a593Smuzhiyun      of a group when the package is installed.
2816*4882a593Smuzhiyun
2817*4882a593Smuzhiyun      For information on the standard Linux shell command ``groupmems``,
2818*4882a593Smuzhiyun      see https://linux.die.net/man/8/groupmems.
2819*4882a593Smuzhiyun
2820*4882a593Smuzhiyun   :term:`GRUB_GFXSERIAL`
2821*4882a593Smuzhiyun      Configures the GNU GRand Unified Bootloader (GRUB) to have graphics
2822*4882a593Smuzhiyun      and serial in the boot menu. Set this variable to "1" in your
2823*4882a593Smuzhiyun      ``local.conf`` or distribution configuration file to enable graphics
2824*4882a593Smuzhiyun      and serial in the menu.
2825*4882a593Smuzhiyun
2826*4882a593Smuzhiyun      See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
2827*4882a593Smuzhiyun      information on how this variable is used.
2828*4882a593Smuzhiyun
2829*4882a593Smuzhiyun   :term:`GRUB_OPTS`
2830*4882a593Smuzhiyun      Additional options to add to the GNU GRand Unified Bootloader (GRUB)
2831*4882a593Smuzhiyun      configuration. Use a semi-colon character (``;``) to separate
2832*4882a593Smuzhiyun      multiple options.
2833*4882a593Smuzhiyun
2834*4882a593Smuzhiyun      The :term:`GRUB_OPTS` variable is optional. See the
2835*4882a593Smuzhiyun      :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2836*4882a593Smuzhiyun      on how this variable is used.
2837*4882a593Smuzhiyun
2838*4882a593Smuzhiyun   :term:`GRUB_TIMEOUT`
2839*4882a593Smuzhiyun      Specifies the timeout before executing the default ``LABEL`` in the
2840*4882a593Smuzhiyun      GNU GRand Unified Bootloader (GRUB).
2841*4882a593Smuzhiyun
2842*4882a593Smuzhiyun      The :term:`GRUB_TIMEOUT` variable is optional. See the
2843*4882a593Smuzhiyun      :ref:`grub-efi <ref-classes-grub-efi>` class for more information
2844*4882a593Smuzhiyun      on how this variable is used.
2845*4882a593Smuzhiyun
2846*4882a593Smuzhiyun   :term:`GTKIMMODULES_PACKAGES`
2847*4882a593Smuzhiyun      When inheriting the
2848*4882a593Smuzhiyun      :ref:`gtk-immodules-cache <ref-classes-gtk-immodules-cache>` class,
2849*4882a593Smuzhiyun      this variable specifies the packages that contain the GTK+ input
2850*4882a593Smuzhiyun      method modules being installed when the modules are in packages other
2851*4882a593Smuzhiyun      than the main package.
2852*4882a593Smuzhiyun
2853*4882a593Smuzhiyun   :term:`HOMEPAGE`
2854*4882a593Smuzhiyun      Website where more information about the software the recipe is
2855*4882a593Smuzhiyun      building can be found.
2856*4882a593Smuzhiyun
2857*4882a593Smuzhiyun   :term:`HOST_ARCH`
2858*4882a593Smuzhiyun      The name of the target architecture, which is normally the same as
2859*4882a593Smuzhiyun      :term:`TARGET_ARCH`. The OpenEmbedded build system
2860*4882a593Smuzhiyun      supports many architectures. Here is an example list of architectures
2861*4882a593Smuzhiyun      supported. This list is by no means complete as the architecture is
2862*4882a593Smuzhiyun      configurable:
2863*4882a593Smuzhiyun
2864*4882a593Smuzhiyun      - arm
2865*4882a593Smuzhiyun      - i586
2866*4882a593Smuzhiyun      - x86_64
2867*4882a593Smuzhiyun      - powerpc
2868*4882a593Smuzhiyun      - powerpc64
2869*4882a593Smuzhiyun      - mips
2870*4882a593Smuzhiyun      - mipsel
2871*4882a593Smuzhiyun
2872*4882a593Smuzhiyun   :term:`HOST_CC_ARCH`
2873*4882a593Smuzhiyun      Specifies architecture-specific compiler flags that are passed to the
2874*4882a593Smuzhiyun      C compiler.
2875*4882a593Smuzhiyun
2876*4882a593Smuzhiyun      Default initialization for :term:`HOST_CC_ARCH` varies depending on what
2877*4882a593Smuzhiyun      is being built:
2878*4882a593Smuzhiyun
2879*4882a593Smuzhiyun      -  :term:`TARGET_CC_ARCH` when building for the
2880*4882a593Smuzhiyun         target
2881*4882a593Smuzhiyun
2882*4882a593Smuzhiyun      -  :term:`BUILD_CC_ARCH` when building for the build host (i.e.
2883*4882a593Smuzhiyun         ``-native``)
2884*4882a593Smuzhiyun
2885*4882a593Smuzhiyun      -  ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e.
2886*4882a593Smuzhiyun         ``nativesdk-``)
2887*4882a593Smuzhiyun
2888*4882a593Smuzhiyun   :term:`HOST_OS`
2889*4882a593Smuzhiyun      Specifies the name of the target operating system, which is normally
2890*4882a593Smuzhiyun      the same as the :term:`TARGET_OS`. The variable can
2891*4882a593Smuzhiyun      be set to "linux" for ``glibc``-based systems and to "linux-musl" for
2892*4882a593Smuzhiyun      ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and
2893*4882a593Smuzhiyun      "linux-musleabi" values possible.
2894*4882a593Smuzhiyun
2895*4882a593Smuzhiyun   :term:`HOST_PREFIX`
2896*4882a593Smuzhiyun      Specifies the prefix for the cross-compile toolchain. :term:`HOST_PREFIX`
2897*4882a593Smuzhiyun      is normally the same as :term:`TARGET_PREFIX`.
2898*4882a593Smuzhiyun
2899*4882a593Smuzhiyun   :term:`HOST_SYS`
2900*4882a593Smuzhiyun      Specifies the system, including the architecture and the operating
2901*4882a593Smuzhiyun      system, for which the build is occurring in the context of the
2902*4882a593Smuzhiyun      current recipe.
2903*4882a593Smuzhiyun
2904*4882a593Smuzhiyun      The OpenEmbedded build system automatically sets this variable based
2905*4882a593Smuzhiyun      on :term:`HOST_ARCH`,
2906*4882a593Smuzhiyun      :term:`HOST_VENDOR`, and
2907*4882a593Smuzhiyun      :term:`HOST_OS` variables.
2908*4882a593Smuzhiyun
2909*4882a593Smuzhiyun      .. note::
2910*4882a593Smuzhiyun
2911*4882a593Smuzhiyun         You do not need to set the variable yourself.
2912*4882a593Smuzhiyun
2913*4882a593Smuzhiyun      Consider these two examples:
2914*4882a593Smuzhiyun
2915*4882a593Smuzhiyun      -  Given a native recipe on a 32-bit x86 machine running Linux, the
2916*4882a593Smuzhiyun         value is "i686-linux".
2917*4882a593Smuzhiyun
2918*4882a593Smuzhiyun      -  Given a recipe being built for a little-endian MIPS target running
2919*4882a593Smuzhiyun         Linux, the value might be "mipsel-linux".
2920*4882a593Smuzhiyun
2921*4882a593Smuzhiyun   :term:`HOST_VENDOR`
2922*4882a593Smuzhiyun      Specifies the name of the vendor. :term:`HOST_VENDOR` is normally the
2923*4882a593Smuzhiyun      same as :term:`TARGET_VENDOR`.
2924*4882a593Smuzhiyun
2925*4882a593Smuzhiyun   :term:`HOSTTOOLS`
2926*4882a593Smuzhiyun      A space-separated list (filter) of tools on the build host that
2927*4882a593Smuzhiyun      should be allowed to be called from within build tasks. Using this
2928*4882a593Smuzhiyun      filter helps reduce the possibility of host contamination. If a tool
2929*4882a593Smuzhiyun      specified in the value of :term:`HOSTTOOLS` is not found on the build
2930*4882a593Smuzhiyun      host, the OpenEmbedded build system produces an error and the build
2931*4882a593Smuzhiyun      is not started.
2932*4882a593Smuzhiyun
2933*4882a593Smuzhiyun      For additional information, see
2934*4882a593Smuzhiyun      :term:`HOSTTOOLS_NONFATAL`.
2935*4882a593Smuzhiyun
2936*4882a593Smuzhiyun   :term:`HOSTTOOLS_NONFATAL`
2937*4882a593Smuzhiyun      A space-separated list (filter) of tools on the build host that
2938*4882a593Smuzhiyun      should be allowed to be called from within build tasks. Using this
2939*4882a593Smuzhiyun      filter helps reduce the possibility of host contamination. Unlike
2940*4882a593Smuzhiyun      :term:`HOSTTOOLS`, the OpenEmbedded build system
2941*4882a593Smuzhiyun      does not produce an error if a tool specified in the value of
2942*4882a593Smuzhiyun      :term:`HOSTTOOLS_NONFATAL` is not found on the build host. Thus, you can
2943*4882a593Smuzhiyun      use :term:`HOSTTOOLS_NONFATAL` to filter optional host tools.
2944*4882a593Smuzhiyun
2945*4882a593Smuzhiyun   :term:`ICECC_CLASS_DISABLE`
2946*4882a593Smuzhiyun      Identifies user classes that you do not want the Icecream distributed
2947*4882a593Smuzhiyun      compile support to consider. This variable is used by the
2948*4882a593Smuzhiyun      :ref:`icecc <ref-classes-icecc>` class. You set this variable in
2949*4882a593Smuzhiyun      your ``local.conf`` file.
2950*4882a593Smuzhiyun
2951*4882a593Smuzhiyun      When you list classes using this variable, the recipes inheriting
2952*4882a593Smuzhiyun      those classes will not benefit from distributed compilation across
2953*4882a593Smuzhiyun      remote hosts. Instead they will be built locally.
2954*4882a593Smuzhiyun
2955*4882a593Smuzhiyun   :term:`ICECC_DISABLED`
2956*4882a593Smuzhiyun      Disables or enables the ``icecc`` (Icecream) function. For more
2957*4882a593Smuzhiyun      information on this function and best practices for using this
2958*4882a593Smuzhiyun      variable, see the ":ref:`ref-classes-icecc`"
2959*4882a593Smuzhiyun      section.
2960*4882a593Smuzhiyun
2961*4882a593Smuzhiyun      Setting this variable to "1" in your ``local.conf`` disables the
2962*4882a593Smuzhiyun      function::
2963*4882a593Smuzhiyun
2964*4882a593Smuzhiyun         ICECC_DISABLED ??= "1"
2965*4882a593Smuzhiyun
2966*4882a593Smuzhiyun      To enable the function, set the variable as follows::
2967*4882a593Smuzhiyun
2968*4882a593Smuzhiyun         ICECC_DISABLED = ""
2969*4882a593Smuzhiyun
2970*4882a593Smuzhiyun   :term:`ICECC_ENV_EXEC`
2971*4882a593Smuzhiyun      Points to the ``icecc-create-env`` script that you provide. This
2972*4882a593Smuzhiyun      variable is used by the :ref:`icecc <ref-classes-icecc>` class. You
2973*4882a593Smuzhiyun      set this variable in your ``local.conf`` file.
2974*4882a593Smuzhiyun
2975*4882a593Smuzhiyun      If you do not point to a script that you provide, the OpenEmbedded
2976*4882a593Smuzhiyun      build system uses the default script provided by the
2977*4882a593Smuzhiyun      ``icecc-create-env.bb`` recipe, which is a modified version and not
2978*4882a593Smuzhiyun      the one that comes with ``icecc``.
2979*4882a593Smuzhiyun
2980*4882a593Smuzhiyun   :term:`ICECC_PARALLEL_MAKE`
2981*4882a593Smuzhiyun      Extra options passed to the ``make`` command during the
2982*4882a593Smuzhiyun      :ref:`ref-tasks-compile` task that specify parallel
2983*4882a593Smuzhiyun      compilation. This variable usually takes the form of "-j x", where x
2984*4882a593Smuzhiyun      represents the maximum number of parallel threads ``make`` can run.
2985*4882a593Smuzhiyun
2986*4882a593Smuzhiyun      .. note::
2987*4882a593Smuzhiyun
2988*4882a593Smuzhiyun         The options passed affect builds on all enabled machines on the
2989*4882a593Smuzhiyun         network, which are machines running the ``iceccd`` daemon.
2990*4882a593Smuzhiyun
2991*4882a593Smuzhiyun      If your enabled machines support multiple cores, coming up with the
2992*4882a593Smuzhiyun      maximum number of parallel threads that gives you the best
2993*4882a593Smuzhiyun      performance could take some experimentation since machine speed,
2994*4882a593Smuzhiyun      network lag, available memory, and existing machine loads can all
2995*4882a593Smuzhiyun      affect build time. Consequently, unlike the
2996*4882a593Smuzhiyun      :term:`PARALLEL_MAKE` variable, there is no
2997*4882a593Smuzhiyun      rule-of-thumb for setting :term:`ICECC_PARALLEL_MAKE` to achieve optimal
2998*4882a593Smuzhiyun      performance.
2999*4882a593Smuzhiyun
3000*4882a593Smuzhiyun      If you do not set :term:`ICECC_PARALLEL_MAKE`, the build system does not
3001*4882a593Smuzhiyun      use it (i.e. the system does not detect and assign the number of
3002*4882a593Smuzhiyun      cores as is done with :term:`PARALLEL_MAKE`).
3003*4882a593Smuzhiyun
3004*4882a593Smuzhiyun   :term:`ICECC_PATH`
3005*4882a593Smuzhiyun      The location of the ``icecc`` binary. You can set this variable in
3006*4882a593Smuzhiyun      your ``local.conf`` file. If your ``local.conf`` file does not define
3007*4882a593Smuzhiyun      this variable, the :ref:`icecc <ref-classes-icecc>` class attempts
3008*4882a593Smuzhiyun      to define it by locating ``icecc`` using ``which``.
3009*4882a593Smuzhiyun
3010*4882a593Smuzhiyun   :term:`ICECC_RECIPE_DISABLE`
3011*4882a593Smuzhiyun      Identifies user recipes that you do not want the Icecream distributed
3012*4882a593Smuzhiyun      compile support to consider. This variable is used by the
3013*4882a593Smuzhiyun      :ref:`icecc <ref-classes-icecc>` class. You set this variable in
3014*4882a593Smuzhiyun      your ``local.conf`` file.
3015*4882a593Smuzhiyun
3016*4882a593Smuzhiyun      When you list recipes using this variable, you are excluding them
3017*4882a593Smuzhiyun      from distributed compilation across remote hosts. Instead they will
3018*4882a593Smuzhiyun      be built locally.
3019*4882a593Smuzhiyun
3020*4882a593Smuzhiyun   :term:`ICECC_RECIPE_ENABLE`
3021*4882a593Smuzhiyun      Identifies user recipes that use an empty
3022*4882a593Smuzhiyun      :term:`PARALLEL_MAKE` variable that you want to
3023*4882a593Smuzhiyun      force remote distributed compilation on using the Icecream
3024*4882a593Smuzhiyun      distributed compile support. This variable is used by the
3025*4882a593Smuzhiyun      :ref:`icecc <ref-classes-icecc>` class. You set this variable in
3026*4882a593Smuzhiyun      your ``local.conf`` file.
3027*4882a593Smuzhiyun
3028*4882a593Smuzhiyun   :term:`IMAGE_BASENAME`
3029*4882a593Smuzhiyun      The base name of image output files. This variable defaults to the
3030*4882a593Smuzhiyun      recipe name (``${``\ :term:`PN`\ ``}``).
3031*4882a593Smuzhiyun
3032*4882a593Smuzhiyun   :term:`IMAGE_BOOT_FILES`
3033*4882a593Smuzhiyun      A space-separated list of files installed into the boot partition
3034*4882a593Smuzhiyun      when preparing an image using the Wic tool with the
3035*4882a593Smuzhiyun      ``bootimg-partition`` source plugin. By default,
3036*4882a593Smuzhiyun      the files are
3037*4882a593Smuzhiyun      installed under the same name as the source files. To change the
3038*4882a593Smuzhiyun      installed name, separate it from the original name with a semi-colon
3039*4882a593Smuzhiyun      (;). Source files need to be located in
3040*4882a593Smuzhiyun      :term:`DEPLOY_DIR_IMAGE`. Here are two
3041*4882a593Smuzhiyun      examples::
3042*4882a593Smuzhiyun
3043*4882a593Smuzhiyun         IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
3044*4882a593Smuzhiyun         IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
3045*4882a593Smuzhiyun
3046*4882a593Smuzhiyun      Alternatively, source files can be picked up using a glob pattern. In
3047*4882a593Smuzhiyun      this case, the destination file must have the same name as the base
3048*4882a593Smuzhiyun      name of the source file path. To install files into a directory
3049*4882a593Smuzhiyun      within the target location, pass its name after a semi-colon (;).
3050*4882a593Smuzhiyun      Here are two examples::
3051*4882a593Smuzhiyun
3052*4882a593Smuzhiyun         IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
3053*4882a593Smuzhiyun         IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
3054*4882a593Smuzhiyun
3055*4882a593Smuzhiyun      The first example
3056*4882a593Smuzhiyun      installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles``
3057*4882a593Smuzhiyun      into the root of the target partition. The second example installs
3058*4882a593Smuzhiyun      the same files into a ``boot`` directory within the target partition.
3059*4882a593Smuzhiyun
3060*4882a593Smuzhiyun      You can find information on how to use the Wic tool in the
3061*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
3062*4882a593Smuzhiyun      section of the Yocto Project Development Tasks Manual. Reference
3063*4882a593Smuzhiyun      material for Wic is located in the
3064*4882a593Smuzhiyun      ":doc:`/ref-manual/kickstart`" chapter.
3065*4882a593Smuzhiyun
3066*4882a593Smuzhiyun   :term:`IMAGE_CLASSES`
3067*4882a593Smuzhiyun      A list of classes that all images should inherit. You typically use
3068*4882a593Smuzhiyun      this variable to specify the list of classes that register the
3069*4882a593Smuzhiyun      different types of images the OpenEmbedded build system creates.
3070*4882a593Smuzhiyun
3071*4882a593Smuzhiyun      The default value for :term:`IMAGE_CLASSES` is ``image_types``. You can
3072*4882a593Smuzhiyun      set this variable in your ``local.conf`` or in a distribution
3073*4882a593Smuzhiyun      configuration file.
3074*4882a593Smuzhiyun
3075*4882a593Smuzhiyun      For more information, see ``meta/classes/image_types.bbclass`` in the
3076*4882a593Smuzhiyun      :term:`Source Directory`.
3077*4882a593Smuzhiyun
3078*4882a593Smuzhiyun   :term:`IMAGE_CMD`
3079*4882a593Smuzhiyun      Specifies the command to create the image file for a specific image
3080*4882a593Smuzhiyun      type, which corresponds to the value set in
3081*4882a593Smuzhiyun      :term:`IMAGE_FSTYPES`, (e.g. ``ext3``,
3082*4882a593Smuzhiyun      ``btrfs``, and so forth). When setting this variable, you should use
3083*4882a593Smuzhiyun      an override for the associated type. Here is an example::
3084*4882a593Smuzhiyun
3085*4882a593Smuzhiyun         IMAGE_CMD:jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime \
3086*4882a593Smuzhiyun             --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 \
3087*4882a593Smuzhiyun             ${EXTRA_IMAGECMD}"
3088*4882a593Smuzhiyun
3089*4882a593Smuzhiyun      You typically do not need to set this variable unless you are adding
3090*4882a593Smuzhiyun      support for a new image type. For more examples on how to set this
3091*4882a593Smuzhiyun      variable, see the :ref:`image_types <ref-classes-image_types>`
3092*4882a593Smuzhiyun      class file, which is ``meta/classes/image_types.bbclass``.
3093*4882a593Smuzhiyun
3094*4882a593Smuzhiyun   :term:`IMAGE_DEVICE_TABLES`
3095*4882a593Smuzhiyun      Specifies one or more files that contain custom device tables that
3096*4882a593Smuzhiyun      are passed to the ``makedevs`` command as part of creating an image.
3097*4882a593Smuzhiyun      These files list basic device nodes that should be created under
3098*4882a593Smuzhiyun      ``/dev`` within the image. If :term:`IMAGE_DEVICE_TABLES` is not set,
3099*4882a593Smuzhiyun      ``files/device_table-minimal.txt`` is used, which is located by
3100*4882a593Smuzhiyun      :term:`BBPATH`. For details on how you should write
3101*4882a593Smuzhiyun      device table files, see ``meta/files/device_table-minimal.txt`` as an
3102*4882a593Smuzhiyun      example.
3103*4882a593Smuzhiyun
3104*4882a593Smuzhiyun   :term:`IMAGE_EFI_BOOT_FILES`
3105*4882a593Smuzhiyun      A space-separated list of files installed into the boot partition
3106*4882a593Smuzhiyun      when preparing an image using the Wic tool with the
3107*4882a593Smuzhiyun      ``bootimg-efi`` source plugin. By default,
3108*4882a593Smuzhiyun      the files are
3109*4882a593Smuzhiyun      installed under the same name as the source files. To change the
3110*4882a593Smuzhiyun      installed name, separate it from the original name with a semi-colon
3111*4882a593Smuzhiyun      (;). Source files need to be located in
3112*4882a593Smuzhiyun      :term:`DEPLOY_DIR_IMAGE`. Here are two
3113*4882a593Smuzhiyun      examples::
3114*4882a593Smuzhiyun
3115*4882a593Smuzhiyun         IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE};bz2"
3116*4882a593Smuzhiyun         IMAGE_EFI_BOOT_FILES = "${KERNEL_IMAGETYPE} microcode.cpio"
3117*4882a593Smuzhiyun
3118*4882a593Smuzhiyun      Alternatively, source files can be picked up using a glob pattern. In
3119*4882a593Smuzhiyun      this case, the destination file must have the same name as the base
3120*4882a593Smuzhiyun      name of the source file path. To install files into a directory
3121*4882a593Smuzhiyun      within the target location, pass its name after a semi-colon (;).
3122*4882a593Smuzhiyun      Here are two examples::
3123*4882a593Smuzhiyun
3124*4882a593Smuzhiyun         IMAGE_EFI_BOOT_FILES = "boot/loader/*"
3125*4882a593Smuzhiyun         IMAGE_EFI_BOOT_FILES = "boot/loader/*;boot/"
3126*4882a593Smuzhiyun
3127*4882a593Smuzhiyun      The first example
3128*4882a593Smuzhiyun      installs all files from ``${DEPLOY_DIR_IMAGE}/boot/loader/``
3129*4882a593Smuzhiyun      into the root of the target partition. The second example installs
3130*4882a593Smuzhiyun      the same files into a ``boot`` directory within the target partition.
3131*4882a593Smuzhiyun
3132*4882a593Smuzhiyun      You can find information on how to use the Wic tool in the
3133*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
3134*4882a593Smuzhiyun      section of the Yocto Project Development Tasks Manual. Reference
3135*4882a593Smuzhiyun      material for Wic is located in the
3136*4882a593Smuzhiyun      ":doc:`/ref-manual/kickstart`" chapter.
3137*4882a593Smuzhiyun
3138*4882a593Smuzhiyun   :term:`IMAGE_FEATURES`
3139*4882a593Smuzhiyun      The primary list of features to include in an image. Typically, you
3140*4882a593Smuzhiyun      configure this variable in an image recipe. Although you can use this
3141*4882a593Smuzhiyun      variable from your ``local.conf`` file, which is found in the
3142*4882a593Smuzhiyun      :term:`Build Directory`, best practices dictate that you do
3143*4882a593Smuzhiyun      not.
3144*4882a593Smuzhiyun
3145*4882a593Smuzhiyun      .. note::
3146*4882a593Smuzhiyun
3147*4882a593Smuzhiyun         To enable extra features from outside the image recipe, use the
3148*4882a593Smuzhiyun         :term:`EXTRA_IMAGE_FEATURES` variable.
3149*4882a593Smuzhiyun
3150*4882a593Smuzhiyun      For a list of image features that ships with the Yocto Project, see
3151*4882a593Smuzhiyun      the ":ref:`ref-features-image`" section.
3152*4882a593Smuzhiyun
3153*4882a593Smuzhiyun      For an example that shows how to customize your image by using this
3154*4882a593Smuzhiyun      variable, see the ":ref:`dev-manual/common-tasks:customizing images using custom \`\`image_features\`\` and \`\`extra_image_features\`\``"
3155*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
3156*4882a593Smuzhiyun
3157*4882a593Smuzhiyun   :term:`IMAGE_FSTYPES`
3158*4882a593Smuzhiyun      Specifies the formats the OpenEmbedded build system uses during the
3159*4882a593Smuzhiyun      build when creating the root filesystem. For example, setting
3160*4882a593Smuzhiyun      :term:`IMAGE_FSTYPES` as follows causes the build system to create root
3161*4882a593Smuzhiyun      filesystems using two formats: ``.ext3`` and ``.tar.bz2``::
3162*4882a593Smuzhiyun
3163*4882a593Smuzhiyun         IMAGE_FSTYPES = "ext3 tar.bz2"
3164*4882a593Smuzhiyun
3165*4882a593Smuzhiyun      For the complete list of supported image formats from which you can
3166*4882a593Smuzhiyun      choose, see :term:`IMAGE_TYPES`.
3167*4882a593Smuzhiyun
3168*4882a593Smuzhiyun      .. note::
3169*4882a593Smuzhiyun
3170*4882a593Smuzhiyun         -  If an image recipe uses the "inherit image" line and you are
3171*4882a593Smuzhiyun            setting :term:`IMAGE_FSTYPES` inside the recipe, you must set
3172*4882a593Smuzhiyun            :term:`IMAGE_FSTYPES` prior to using the "inherit image" line.
3173*4882a593Smuzhiyun
3174*4882a593Smuzhiyun         -  Due to the way the OpenEmbedded build system processes this
3175*4882a593Smuzhiyun            variable, you cannot update its contents by using ``:append``
3176*4882a593Smuzhiyun            or ``:prepend``. You must use the ``+=`` operator to add one or
3177*4882a593Smuzhiyun            more options to the :term:`IMAGE_FSTYPES` variable.
3178*4882a593Smuzhiyun
3179*4882a593Smuzhiyun   :term:`IMAGE_INSTALL`
3180*4882a593Smuzhiyun      Used by recipes to specify the packages to install into an image
3181*4882a593Smuzhiyun      through the :ref:`image <ref-classes-image>` class. Use the
3182*4882a593Smuzhiyun      :term:`IMAGE_INSTALL` variable with care to avoid ordering issues.
3183*4882a593Smuzhiyun
3184*4882a593Smuzhiyun      Image recipes set :term:`IMAGE_INSTALL` to specify the packages to
3185*4882a593Smuzhiyun      install into an image through :ref:`ref-classes-image`. Additionally,
3186*4882a593Smuzhiyun      there are "helper" classes such as the
3187*4882a593Smuzhiyun      :ref:`core-image <ref-classes-core-image>` class which can
3188*4882a593Smuzhiyun      take lists used with :term:`IMAGE_FEATURES` and turn them into
3189*4882a593Smuzhiyun      auto-generated entries in :term:`IMAGE_INSTALL` in addition to its
3190*4882a593Smuzhiyun      default contents.
3191*4882a593Smuzhiyun
3192*4882a593Smuzhiyun      When you use this variable, it is best to use it as follows::
3193*4882a593Smuzhiyun
3194*4882a593Smuzhiyun         IMAGE_INSTALL:append = " package-name"
3195*4882a593Smuzhiyun
3196*4882a593Smuzhiyun      Be sure to include the space
3197*4882a593Smuzhiyun      between the quotation character and the start of the package name or
3198*4882a593Smuzhiyun      names.
3199*4882a593Smuzhiyun
3200*4882a593Smuzhiyun      .. note::
3201*4882a593Smuzhiyun
3202*4882a593Smuzhiyun         -  When working with a
3203*4882a593Smuzhiyun            :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
3204*4882a593Smuzhiyun            image, do not use the :term:`IMAGE_INSTALL` variable to specify
3205*4882a593Smuzhiyun            packages for installation. Instead, use the
3206*4882a593Smuzhiyun            :term:`PACKAGE_INSTALL` variable, which
3207*4882a593Smuzhiyun            allows the initial RAM filesystem (initramfs) recipe to use a
3208*4882a593Smuzhiyun            fixed set of packages and not be affected by :term:`IMAGE_INSTALL`.
3209*4882a593Smuzhiyun            For information on creating an initramfs, see the
3210*4882a593Smuzhiyun            ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`"
3211*4882a593Smuzhiyun            section in the Yocto Project Development Tasks Manual.
3212*4882a593Smuzhiyun
3213*4882a593Smuzhiyun         -  Using :term:`IMAGE_INSTALL` with the
3214*4882a593Smuzhiyun            :ref:`+= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:appending (+=) and prepending (=+) with spaces>`
3215*4882a593Smuzhiyun            BitBake operator within the ``/conf/local.conf`` file or from
3216*4882a593Smuzhiyun            within an image recipe is not recommended. Use of this operator
3217*4882a593Smuzhiyun            in these ways can cause ordering issues. Since
3218*4882a593Smuzhiyun            :ref:`ref-classes-core-image` sets :term:`IMAGE_INSTALL` to a default
3219*4882a593Smuzhiyun            value using the
3220*4882a593Smuzhiyun            :ref:`?= <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:setting a default value (?=)>`
3221*4882a593Smuzhiyun            operator, using a ``+=`` operation against :term:`IMAGE_INSTALL`
3222*4882a593Smuzhiyun            results in unexpected behavior when used within
3223*4882a593Smuzhiyun            ``conf/local.conf``. Furthermore, the same operation from
3224*4882a593Smuzhiyun            within an image recipe may or may not succeed depending on the
3225*4882a593Smuzhiyun            specific situation. In both these cases, the behavior is
3226*4882a593Smuzhiyun            contrary to how most users expect the ``+=`` operator to work.
3227*4882a593Smuzhiyun
3228*4882a593Smuzhiyun   :term:`IMAGE_LINGUAS`
3229*4882a593Smuzhiyun      Specifies the list of locales to install into the image during the
3230*4882a593Smuzhiyun      root filesystem construction process. The OpenEmbedded build system
3231*4882a593Smuzhiyun      automatically splits locale files, which are used for localization,
3232*4882a593Smuzhiyun      into separate packages. Setting the :term:`IMAGE_LINGUAS` variable
3233*4882a593Smuzhiyun      ensures that any locale packages that correspond to packages already
3234*4882a593Smuzhiyun      selected for installation into the image are also installed. Here is
3235*4882a593Smuzhiyun      an example::
3236*4882a593Smuzhiyun
3237*4882a593Smuzhiyun         IMAGE_LINGUAS = "pt-br de-de"
3238*4882a593Smuzhiyun
3239*4882a593Smuzhiyun      In this example, the build system ensures any Brazilian Portuguese
3240*4882a593Smuzhiyun      and German locale files that correspond to packages in the image are
3241*4882a593Smuzhiyun      installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as
3242*4882a593Smuzhiyun      ``*-locale-pt`` and ``*-locale-de``, since some software packages
3243*4882a593Smuzhiyun      only provide locale files by language and not by country-specific
3244*4882a593Smuzhiyun      language).
3245*4882a593Smuzhiyun
3246*4882a593Smuzhiyun      See the :term:`GLIBC_GENERATE_LOCALES`
3247*4882a593Smuzhiyun      variable for information on generating GLIBC locales.
3248*4882a593Smuzhiyun
3249*4882a593Smuzhiyun
3250*4882a593Smuzhiyun   :term:`IMAGE_LINK_NAME`
3251*4882a593Smuzhiyun      The name of the output image symlink (which does not include
3252*4882a593Smuzhiyun      the version part as :term:`IMAGE_NAME` does). The default value
3253*4882a593Smuzhiyun      is derived using the :term:`IMAGE_BASENAME` and :term:`MACHINE`
3254*4882a593Smuzhiyun      variables::
3255*4882a593Smuzhiyun
3256*4882a593Smuzhiyun         IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}"
3257*4882a593Smuzhiyun
3258*4882a593Smuzhiyun
3259*4882a593Smuzhiyun   :term:`IMAGE_MANIFEST`
3260*4882a593Smuzhiyun      The manifest file for the image. This file lists all the installed
3261*4882a593Smuzhiyun      packages that make up the image. The file contains package
3262*4882a593Smuzhiyun      information on a line-per-package basis as follows::
3263*4882a593Smuzhiyun
3264*4882a593Smuzhiyun          packagename packagearch version
3265*4882a593Smuzhiyun
3266*4882a593Smuzhiyun      The :ref:`rootfs-postcommands <ref-classes-rootfs*>` class defines the manifest
3267*4882a593Smuzhiyun      file as follows::
3268*4882a593Smuzhiyun
3269*4882a593Smuzhiyun         IMAGE_MANIFEST ="${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
3270*4882a593Smuzhiyun
3271*4882a593Smuzhiyun      The location is
3272*4882a593Smuzhiyun      derived using the :term:`IMGDEPLOYDIR`
3273*4882a593Smuzhiyun      and :term:`IMAGE_NAME` variables. You can find
3274*4882a593Smuzhiyun      information on how the image is created in the ":ref:`overview-manual/concepts:image generation`"
3275*4882a593Smuzhiyun      section in the Yocto Project Overview and Concepts Manual.
3276*4882a593Smuzhiyun
3277*4882a593Smuzhiyun   :term:`IMAGE_NAME`
3278*4882a593Smuzhiyun      The name of the output image files minus the extension. This variable
3279*4882a593Smuzhiyun      is derived using the :term:`IMAGE_BASENAME`,
3280*4882a593Smuzhiyun      :term:`MACHINE`, and :term:`IMAGE_VERSION_SUFFIX`
3281*4882a593Smuzhiyun      variables::
3282*4882a593Smuzhiyun
3283*4882a593Smuzhiyun         IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3284*4882a593Smuzhiyun
3285*4882a593Smuzhiyun   :term:`IMAGE_NAME_SUFFIX`
3286*4882a593Smuzhiyun      Suffix used for the image output filename - defaults to ``".rootfs"``
3287*4882a593Smuzhiyun      to distinguish the image file from other files created during image
3288*4882a593Smuzhiyun      building; however if this suffix is redundant or not desired you can
3289*4882a593Smuzhiyun      clear the value of this variable (set the value to ""). For example,
3290*4882a593Smuzhiyun      this is typically cleared in initramfs image recipes.
3291*4882a593Smuzhiyun
3292*4882a593Smuzhiyun   :term:`IMAGE_OVERHEAD_FACTOR`
3293*4882a593Smuzhiyun      Defines a multiplier that the build system applies to the initial
3294*4882a593Smuzhiyun      image size for cases when the multiplier times the returned disk
3295*4882a593Smuzhiyun      usage value for the image is greater than the sum of
3296*4882a593Smuzhiyun      :term:`IMAGE_ROOTFS_SIZE` and :term:`IMAGE_ROOTFS_EXTRA_SPACE`. The result of
3297*4882a593Smuzhiyun      the multiplier applied to the initial image size creates free disk
3298*4882a593Smuzhiyun      space in the image as overhead. By default, the build process uses a
3299*4882a593Smuzhiyun      multiplier of 1.3 for this variable. This default value results in
3300*4882a593Smuzhiyun      30% free disk space added to the image when this method is used to
3301*4882a593Smuzhiyun      determine the final generated image size. You should be aware that
3302*4882a593Smuzhiyun      post install scripts and the package management system uses disk
3303*4882a593Smuzhiyun      space inside this overhead area. Consequently, the multiplier does
3304*4882a593Smuzhiyun      not produce an image with all the theoretical free disk space. See
3305*4882a593Smuzhiyun      :term:`IMAGE_ROOTFS_SIZE` for information on how the build system
3306*4882a593Smuzhiyun      determines the overall image size.
3307*4882a593Smuzhiyun
3308*4882a593Smuzhiyun      The default 30% free disk space typically gives the image enough room
3309*4882a593Smuzhiyun      to boot and allows for basic post installs while still leaving a
3310*4882a593Smuzhiyun      small amount of free disk space. If 30% free space is inadequate, you
3311*4882a593Smuzhiyun      can increase the default value. For example, the following setting
3312*4882a593Smuzhiyun      gives you 50% free space added to the image::
3313*4882a593Smuzhiyun
3314*4882a593Smuzhiyun         IMAGE_OVERHEAD_FACTOR = "1.5"
3315*4882a593Smuzhiyun
3316*4882a593Smuzhiyun      Alternatively, you can ensure a specific amount of free disk space is
3317*4882a593Smuzhiyun      added to the image by using the :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3318*4882a593Smuzhiyun      variable.
3319*4882a593Smuzhiyun
3320*4882a593Smuzhiyun   :term:`IMAGE_PKGTYPE`
3321*4882a593Smuzhiyun      Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
3322*4882a593Smuzhiyun      OpenEmbedded build system. The variable is defined appropriately by
3323*4882a593Smuzhiyun      the :ref:`package_deb <ref-classes-package_deb>`,
3324*4882a593Smuzhiyun      :ref:`package_rpm <ref-classes-package_rpm>`,
3325*4882a593Smuzhiyun      :ref:`package_ipk <ref-classes-package_ipk>`, or
3326*4882a593Smuzhiyun      :ref:`package_tar <ref-classes-package_tar>` class.
3327*4882a593Smuzhiyun
3328*4882a593Smuzhiyun      .. note::
3329*4882a593Smuzhiyun
3330*4882a593Smuzhiyun         The ``package_tar`` class is broken and is not supported. It is
3331*4882a593Smuzhiyun         recommended that you do not use it.
3332*4882a593Smuzhiyun
3333*4882a593Smuzhiyun      The :ref:`populate_sdk_* <ref-classes-populate-sdk-*>` and
3334*4882a593Smuzhiyun      :ref:`image <ref-classes-image>` classes use the :term:`IMAGE_PKGTYPE`
3335*4882a593Smuzhiyun      for packaging up images and SDKs.
3336*4882a593Smuzhiyun
3337*4882a593Smuzhiyun      You should not set the :term:`IMAGE_PKGTYPE` manually. Rather, the
3338*4882a593Smuzhiyun      variable is set indirectly through the appropriate
3339*4882a593Smuzhiyun      :ref:`package_* <ref-classes-package>` class using the
3340*4882a593Smuzhiyun      :term:`PACKAGE_CLASSES` variable. The
3341*4882a593Smuzhiyun      OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
3342*4882a593Smuzhiyun      or IPK) that appears with the variable
3343*4882a593Smuzhiyun
3344*4882a593Smuzhiyun      .. note::
3345*4882a593Smuzhiyun
3346*4882a593Smuzhiyun         Files using the ``.tar`` format are never used as a substitute
3347*4882a593Smuzhiyun         packaging format for DEB, RPM, and IPK formatted files for your image
3348*4882a593Smuzhiyun         or SDK.
3349*4882a593Smuzhiyun
3350*4882a593Smuzhiyun   :term:`IMAGE_POSTPROCESS_COMMAND`
3351*4882a593Smuzhiyun      Specifies a list of functions to call once the OpenEmbedded build
3352*4882a593Smuzhiyun      system creates the final image output files. You can specify
3353*4882a593Smuzhiyun      functions separated by semicolons::
3354*4882a593Smuzhiyun
3355*4882a593Smuzhiyun         IMAGE_POSTPROCESS_COMMAND += "function; ... "
3356*4882a593Smuzhiyun
3357*4882a593Smuzhiyun      If you need to pass the root filesystem path to a command within the
3358*4882a593Smuzhiyun      function, you can use ``${IMAGE_ROOTFS}``, which points to the
3359*4882a593Smuzhiyun      directory that becomes the root filesystem image. See the
3360*4882a593Smuzhiyun      :term:`IMAGE_ROOTFS` variable for more
3361*4882a593Smuzhiyun      information.
3362*4882a593Smuzhiyun
3363*4882a593Smuzhiyun   :term:`IMAGE_PREPROCESS_COMMAND`
3364*4882a593Smuzhiyun      Specifies a list of functions to call before the OpenEmbedded build
3365*4882a593Smuzhiyun      system creates the final image output files. You can specify
3366*4882a593Smuzhiyun      functions separated by semicolons::
3367*4882a593Smuzhiyun
3368*4882a593Smuzhiyun         IMAGE_PREPROCESS_COMMAND += "function; ... "
3369*4882a593Smuzhiyun
3370*4882a593Smuzhiyun      If you need to pass the root filesystem path to a command within the
3371*4882a593Smuzhiyun      function, you can use ``${IMAGE_ROOTFS}``, which points to the
3372*4882a593Smuzhiyun      directory that becomes the root filesystem image. See the
3373*4882a593Smuzhiyun      :term:`IMAGE_ROOTFS` variable for more
3374*4882a593Smuzhiyun      information.
3375*4882a593Smuzhiyun
3376*4882a593Smuzhiyun   :term:`IMAGE_ROOTFS`
3377*4882a593Smuzhiyun      The location of the root filesystem while it is under construction
3378*4882a593Smuzhiyun      (i.e. during the :ref:`ref-tasks-rootfs` task). This
3379*4882a593Smuzhiyun      variable is not configurable. Do not change it.
3380*4882a593Smuzhiyun
3381*4882a593Smuzhiyun   :term:`IMAGE_ROOTFS_ALIGNMENT`
3382*4882a593Smuzhiyun      Specifies the alignment for the output image file in Kbytes. If the
3383*4882a593Smuzhiyun      size of the image is not a multiple of this value, then the size is
3384*4882a593Smuzhiyun      rounded up to the nearest multiple of the value. The default value is
3385*4882a593Smuzhiyun      "1". See :term:`IMAGE_ROOTFS_SIZE` for
3386*4882a593Smuzhiyun      additional information.
3387*4882a593Smuzhiyun
3388*4882a593Smuzhiyun   :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3389*4882a593Smuzhiyun      Defines additional free disk space created in the image in Kbytes. By
3390*4882a593Smuzhiyun      default, this variable is set to "0". This free disk space is added
3391*4882a593Smuzhiyun      to the image after the build system determines the image size as
3392*4882a593Smuzhiyun      described in :term:`IMAGE_ROOTFS_SIZE`.
3393*4882a593Smuzhiyun
3394*4882a593Smuzhiyun      This variable is particularly useful when you want to ensure that a
3395*4882a593Smuzhiyun      specific amount of free disk space is available on a device after an
3396*4882a593Smuzhiyun      image is installed and running. For example, to be sure 5 Gbytes of
3397*4882a593Smuzhiyun      free disk space is available, set the variable as follows::
3398*4882a593Smuzhiyun
3399*4882a593Smuzhiyun         IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3400*4882a593Smuzhiyun
3401*4882a593Smuzhiyun      For example, the Yocto Project Build Appliance specifically requests
3402*4882a593Smuzhiyun      40 Gbytes of extra space with the line::
3403*4882a593Smuzhiyun
3404*4882a593Smuzhiyun         IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3405*4882a593Smuzhiyun
3406*4882a593Smuzhiyun   :term:`IMAGE_ROOTFS_SIZE`
3407*4882a593Smuzhiyun      Defines the size in Kbytes for the generated image. The OpenEmbedded
3408*4882a593Smuzhiyun      build system determines the final size for the generated image using
3409*4882a593Smuzhiyun      an algorithm that takes into account the initial disk space used for
3410*4882a593Smuzhiyun      the generated image, a requested size for the image, and requested
3411*4882a593Smuzhiyun      additional free disk space to be added to the image. Programatically,
3412*4882a593Smuzhiyun      the build system determines the final size of the generated image as
3413*4882a593Smuzhiyun      follows::
3414*4882a593Smuzhiyun
3415*4882a593Smuzhiyun         if (image-du * overhead) < rootfs-size:
3416*4882a593Smuzhiyun             internal-rootfs-size = rootfs-size + xspace
3417*4882a593Smuzhiyun         else:
3418*4882a593Smuzhiyun             internal-rootfs-size = (image-du * overhead) + xspace
3419*4882a593Smuzhiyun         where:
3420*4882a593Smuzhiyun             image-du = Returned value of the du command on the image.
3421*4882a593Smuzhiyun             overhead = IMAGE_OVERHEAD_FACTOR
3422*4882a593Smuzhiyun             rootfs-size = IMAGE_ROOTFS_SIZE
3423*4882a593Smuzhiyun             internal-rootfs-size = Initial root filesystem size before any modifications.
3424*4882a593Smuzhiyun             xspace = IMAGE_ROOTFS_EXTRA_SPACE
3425*4882a593Smuzhiyun
3426*4882a593Smuzhiyun      See the :term:`IMAGE_OVERHEAD_FACTOR`
3427*4882a593Smuzhiyun      and :term:`IMAGE_ROOTFS_EXTRA_SPACE`
3428*4882a593Smuzhiyun      variables for related information.
3429*4882a593Smuzhiyun
3430*4882a593Smuzhiyun   :term:`IMAGE_TYPEDEP`
3431*4882a593Smuzhiyun      Specifies a dependency from one image type on another. Here is an
3432*4882a593Smuzhiyun      example from the :ref:`image-live <ref-classes-image-live>` class::
3433*4882a593Smuzhiyun
3434*4882a593Smuzhiyun         IMAGE_TYPEDEP:live = "ext3"
3435*4882a593Smuzhiyun
3436*4882a593Smuzhiyun      In the previous example, the variable ensures that when "live" is
3437*4882a593Smuzhiyun      listed with the :term:`IMAGE_FSTYPES` variable,
3438*4882a593Smuzhiyun      the OpenEmbedded build system produces an ``ext3`` image first since
3439*4882a593Smuzhiyun      one of the components of the live image is an ``ext3`` formatted
3440*4882a593Smuzhiyun      partition containing the root filesystem.
3441*4882a593Smuzhiyun
3442*4882a593Smuzhiyun   :term:`IMAGE_TYPES`
3443*4882a593Smuzhiyun      Specifies the complete list of supported image types by default:
3444*4882a593Smuzhiyun
3445*4882a593Smuzhiyun      - btrfs
3446*4882a593Smuzhiyun      - container
3447*4882a593Smuzhiyun      - cpio
3448*4882a593Smuzhiyun      - cpio.gz
3449*4882a593Smuzhiyun      - cpio.lz4
3450*4882a593Smuzhiyun      - cpio.lzma
3451*4882a593Smuzhiyun      - cpio.xz
3452*4882a593Smuzhiyun      - cramfs
3453*4882a593Smuzhiyun      - erofs
3454*4882a593Smuzhiyun      - erofs-lz4
3455*4882a593Smuzhiyun      - erofs-lz4hc
3456*4882a593Smuzhiyun      - ext2
3457*4882a593Smuzhiyun      - ext2.bz2
3458*4882a593Smuzhiyun      - ext2.gz
3459*4882a593Smuzhiyun      - ext2.lzma
3460*4882a593Smuzhiyun      - ext3
3461*4882a593Smuzhiyun      - ext3.gz
3462*4882a593Smuzhiyun      - ext4
3463*4882a593Smuzhiyun      - ext4.gz
3464*4882a593Smuzhiyun      - f2fs
3465*4882a593Smuzhiyun      - hddimg
3466*4882a593Smuzhiyun      - iso
3467*4882a593Smuzhiyun      - jffs2
3468*4882a593Smuzhiyun      - jffs2.sum
3469*4882a593Smuzhiyun      - multiubi
3470*4882a593Smuzhiyun      - squashfs
3471*4882a593Smuzhiyun      - squashfs-lz4
3472*4882a593Smuzhiyun      - squashfs-lzo
3473*4882a593Smuzhiyun      - squashfs-xz
3474*4882a593Smuzhiyun      - tar
3475*4882a593Smuzhiyun      - tar.bz2
3476*4882a593Smuzhiyun      - tar.gz
3477*4882a593Smuzhiyun      - tar.lz4
3478*4882a593Smuzhiyun      - tar.xz
3479*4882a593Smuzhiyun      - tar.zst
3480*4882a593Smuzhiyun      - ubi
3481*4882a593Smuzhiyun      - ubifs
3482*4882a593Smuzhiyun      - wic
3483*4882a593Smuzhiyun      - wic.bz2
3484*4882a593Smuzhiyun      - wic.gz
3485*4882a593Smuzhiyun      - wic.lzma
3486*4882a593Smuzhiyun
3487*4882a593Smuzhiyun      For more information about these types of images, see
3488*4882a593Smuzhiyun      ``meta/classes/image_types*.bbclass`` in the :term:`Source Directory`.
3489*4882a593Smuzhiyun
3490*4882a593Smuzhiyun   :term:`IMAGE_VERSION_SUFFIX`
3491*4882a593Smuzhiyun      Version suffix that is part of the default :term:`IMAGE_NAME` and
3492*4882a593Smuzhiyun      :term:`KERNEL_ARTIFACT_NAME` values.
3493*4882a593Smuzhiyun      Defaults to ``"-${DATETIME}"``, however you could set this to a
3494*4882a593Smuzhiyun      version string that comes from your external build environment if
3495*4882a593Smuzhiyun      desired, and this suffix would then be used consistently across
3496*4882a593Smuzhiyun      the build artifacts.
3497*4882a593Smuzhiyun
3498*4882a593Smuzhiyun   :term:`IMGDEPLOYDIR`
3499*4882a593Smuzhiyun      When inheriting the :ref:`image <ref-classes-image>` class directly or
3500*4882a593Smuzhiyun      through the :ref:`core-image <ref-classes-core-image>` class, the
3501*4882a593Smuzhiyun      :term:`IMGDEPLOYDIR` points to a temporary work area for deployed files
3502*4882a593Smuzhiyun      that is set in the ``image`` class as follows::
3503*4882a593Smuzhiyun
3504*4882a593Smuzhiyun         IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete"
3505*4882a593Smuzhiyun
3506*4882a593Smuzhiyun      Recipes inheriting the ``image`` class should copy files to be
3507*4882a593Smuzhiyun      deployed into :term:`IMGDEPLOYDIR`, and the class will take care of
3508*4882a593Smuzhiyun      copying them into :term:`DEPLOY_DIR_IMAGE` afterwards.
3509*4882a593Smuzhiyun
3510*4882a593Smuzhiyun   :term:`INC_PR`
3511*4882a593Smuzhiyun      Helps define the recipe revision for recipes that share a common
3512*4882a593Smuzhiyun      ``include`` file. You can think of this variable as part of the
3513*4882a593Smuzhiyun      recipe revision as set from within an include file.
3514*4882a593Smuzhiyun
3515*4882a593Smuzhiyun      Suppose, for example, you have a set of recipes that are used across
3516*4882a593Smuzhiyun      several projects. And, within each of those recipes the revision (its
3517*4882a593Smuzhiyun      :term:`PR` value) is set accordingly. In this case, when
3518*4882a593Smuzhiyun      the revision of those recipes changes, the burden is on you to find
3519*4882a593Smuzhiyun      all those recipes and be sure that they get changed to reflect the
3520*4882a593Smuzhiyun      updated version of the recipe. In this scenario, it can get
3521*4882a593Smuzhiyun      complicated when recipes that are used in many places and provide
3522*4882a593Smuzhiyun      common functionality are upgraded to a new revision.
3523*4882a593Smuzhiyun
3524*4882a593Smuzhiyun      A more efficient way of dealing with this situation is to set the
3525*4882a593Smuzhiyun      :term:`INC_PR` variable inside the ``include`` files that the recipes
3526*4882a593Smuzhiyun      share and then expand the :term:`INC_PR` variable within the recipes to
3527*4882a593Smuzhiyun      help define the recipe revision.
3528*4882a593Smuzhiyun
3529*4882a593Smuzhiyun      The following provides an example that shows how to use the
3530*4882a593Smuzhiyun      :term:`INC_PR` variable given a common ``include`` file that defines the
3531*4882a593Smuzhiyun      variable. Once the variable is defined in the ``include`` file, you
3532*4882a593Smuzhiyun      can use the variable to set the :term:`PR` values in each recipe. You
3533*4882a593Smuzhiyun      will notice that when you set a recipe's :term:`PR` you can provide more
3534*4882a593Smuzhiyun      granular revisioning by appending values to the :term:`INC_PR` variable::
3535*4882a593Smuzhiyun
3536*4882a593Smuzhiyun         recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
3537*4882a593Smuzhiyun         recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
3538*4882a593Smuzhiyun         recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
3539*4882a593Smuzhiyun         recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
3540*4882a593Smuzhiyun
3541*4882a593Smuzhiyun      The
3542*4882a593Smuzhiyun      first line of the example establishes the baseline revision to be
3543*4882a593Smuzhiyun      used for all recipes that use the ``include`` file. The remaining
3544*4882a593Smuzhiyun      lines in the example are from individual recipes and show how the
3545*4882a593Smuzhiyun      :term:`PR` value is set.
3546*4882a593Smuzhiyun
3547*4882a593Smuzhiyun   :term:`INCOMPATIBLE_LICENSE`
3548*4882a593Smuzhiyun      Specifies a space-separated list of license names (as they would
3549*4882a593Smuzhiyun      appear in :term:`LICENSE`) that should be excluded
3550*4882a593Smuzhiyun      from the build. Recipes that provide no alternatives to listed
3551*4882a593Smuzhiyun      incompatible licenses are not built. Packages that are individually
3552*4882a593Smuzhiyun      licensed with the specified incompatible licenses will be deleted.
3553*4882a593Smuzhiyun
3554*4882a593Smuzhiyun      There is some support for wildcards in this variable's value,
3555*4882a593Smuzhiyun      however it is restricted to specific licenses. Currently only
3556*4882a593Smuzhiyun      these wildcards are allowed and expand as follows:
3557*4882a593Smuzhiyun
3558*4882a593Smuzhiyun      - ``AGPL-3.0*"``: ``AGPL-3.0-only``, ``AGPL-3.0-or-later``
3559*4882a593Smuzhiyun      - ``GPL-3.0*``: ``GPL-3.0-only``, ``GPL-3.0-or-later``
3560*4882a593Smuzhiyun      - ``LGPL-3.0*``: ``LGPL-3.0-only``, ``LGPL-3.0-or-later``
3561*4882a593Smuzhiyun
3562*4882a593Smuzhiyun      .. note::
3563*4882a593Smuzhiyun
3564*4882a593Smuzhiyun         This functionality is only regularly tested using the following
3565*4882a593Smuzhiyun         setting::
3566*4882a593Smuzhiyun
3567*4882a593Smuzhiyun                 INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0* AGPL-3.0*"
3568*4882a593Smuzhiyun
3569*4882a593Smuzhiyun
3570*4882a593Smuzhiyun         Although you can use other settings, you might be required to
3571*4882a593Smuzhiyun         remove dependencies on or provide alternatives to components that
3572*4882a593Smuzhiyun         are required to produce a functional system image.
3573*4882a593Smuzhiyun
3574*4882a593Smuzhiyun   :term:`INHERIT`
3575*4882a593Smuzhiyun      Causes the named class or classes to be inherited globally. Anonymous
3576*4882a593Smuzhiyun      functions in the class or classes are not executed for the base
3577*4882a593Smuzhiyun      configuration and in each individual recipe. The OpenEmbedded build
3578*4882a593Smuzhiyun      system ignores changes to :term:`INHERIT` in individual recipes.
3579*4882a593Smuzhiyun
3580*4882a593Smuzhiyun      For more information on :term:`INHERIT`, see the
3581*4882a593Smuzhiyun      :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
3582*4882a593Smuzhiyun      section in the Bitbake User Manual.
3583*4882a593Smuzhiyun
3584*4882a593Smuzhiyun   :term:`INHERIT_DISTRO`
3585*4882a593Smuzhiyun      Lists classes that will be inherited at the distribution level. It is
3586*4882a593Smuzhiyun      unlikely that you want to edit this variable.
3587*4882a593Smuzhiyun
3588*4882a593Smuzhiyun      The default value of the variable is set as follows in the
3589*4882a593Smuzhiyun      ``meta/conf/distro/defaultsetup.conf`` file::
3590*4882a593Smuzhiyun
3591*4882a593Smuzhiyun         INHERIT_DISTRO ?= "debian devshell sstate license"
3592*4882a593Smuzhiyun
3593*4882a593Smuzhiyun   :term:`INHIBIT_DEFAULT_DEPS`
3594*4882a593Smuzhiyun      Prevents the default dependencies, namely the C compiler and standard
3595*4882a593Smuzhiyun      C library (libc), from being added to :term:`DEPENDS`.
3596*4882a593Smuzhiyun      This variable is usually used within recipes that do not require any
3597*4882a593Smuzhiyun      compilation using the C compiler.
3598*4882a593Smuzhiyun
3599*4882a593Smuzhiyun      Set the variable to "1" to prevent the default dependencies from
3600*4882a593Smuzhiyun      being added.
3601*4882a593Smuzhiyun
3602*4882a593Smuzhiyun   :term:`INHIBIT_PACKAGE_DEBUG_SPLIT`
3603*4882a593Smuzhiyun      Prevents the OpenEmbedded build system from splitting out debug
3604*4882a593Smuzhiyun      information during packaging. By default, the build system splits out
3605*4882a593Smuzhiyun      debugging information during the
3606*4882a593Smuzhiyun      :ref:`ref-tasks-package` task. For more information on
3607*4882a593Smuzhiyun      how debug information is split out, see the
3608*4882a593Smuzhiyun      :term:`PACKAGE_DEBUG_SPLIT_STYLE`
3609*4882a593Smuzhiyun      variable.
3610*4882a593Smuzhiyun
3611*4882a593Smuzhiyun      To prevent the build system from splitting out debug information
3612*4882a593Smuzhiyun      during packaging, set the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable as
3613*4882a593Smuzhiyun      follows::
3614*4882a593Smuzhiyun
3615*4882a593Smuzhiyun         INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
3616*4882a593Smuzhiyun
3617*4882a593Smuzhiyun   :term:`INHIBIT_PACKAGE_STRIP`
3618*4882a593Smuzhiyun      If set to "1", causes the build to not strip binaries in resulting
3619*4882a593Smuzhiyun      packages and prevents the ``-dbg`` package from containing the source
3620*4882a593Smuzhiyun      files.
3621*4882a593Smuzhiyun
3622*4882a593Smuzhiyun      By default, the OpenEmbedded build system strips binaries and puts
3623*4882a593Smuzhiyun      the debugging symbols into ``${``\ :term:`PN`\ ``}-dbg``.
3624*4882a593Smuzhiyun      Consequently, you should not set :term:`INHIBIT_PACKAGE_STRIP` when you
3625*4882a593Smuzhiyun      plan to debug in general.
3626*4882a593Smuzhiyun
3627*4882a593Smuzhiyun   :term:`INHIBIT_SYSROOT_STRIP`
3628*4882a593Smuzhiyun      If set to "1", causes the build to not strip binaries in the
3629*4882a593Smuzhiyun      resulting sysroot.
3630*4882a593Smuzhiyun
3631*4882a593Smuzhiyun      By default, the OpenEmbedded build system strips binaries in the
3632*4882a593Smuzhiyun      resulting sysroot. When you specifically set the
3633*4882a593Smuzhiyun      :term:`INHIBIT_SYSROOT_STRIP` variable to "1" in your recipe, you inhibit
3634*4882a593Smuzhiyun      this stripping.
3635*4882a593Smuzhiyun
3636*4882a593Smuzhiyun      If you want to use this variable, include the
3637*4882a593Smuzhiyun      :ref:`staging <ref-classes-staging>` class. This class uses a
3638*4882a593Smuzhiyun      ``sys_strip()`` function to test for the variable and acts
3639*4882a593Smuzhiyun      accordingly.
3640*4882a593Smuzhiyun
3641*4882a593Smuzhiyun      .. note::
3642*4882a593Smuzhiyun
3643*4882a593Smuzhiyun         Use of the :term:`INHIBIT_SYSROOT_STRIP` variable occurs in rare and
3644*4882a593Smuzhiyun         special circumstances. For example, suppose you are building
3645*4882a593Smuzhiyun         bare-metal firmware by using an external GCC toolchain. Furthermore,
3646*4882a593Smuzhiyun         even if the toolchain's binaries are strippable, there are other files
3647*4882a593Smuzhiyun         needed for the build that are not strippable.
3648*4882a593Smuzhiyun
3649*4882a593Smuzhiyun   :term:`INITRAMFS_DEPLOY_DIR_IMAGE`
3650*4882a593Smuzhiyun      Indicates the deploy directory used by ``do_bundle_initramfs`` where the
3651*4882a593Smuzhiyun      :term:`INITRAMFS_IMAGE` will be fetched from.
3652*4882a593Smuzhiyun      This variable is set by default to ``${DEPLOY_DIR_IMAGE}`` in the
3653*4882a593Smuzhiyun      :ref:`kernel <ref-classes-kernel>` class and it's only meant to be changed
3654*4882a593Smuzhiyun      when building an initramfs image from a separate multiconfig via :term:`INITRAMFS_MULTICONFIG`.
3655*4882a593Smuzhiyun
3656*4882a593Smuzhiyun   :term:`INITRAMFS_FSTYPES`
3657*4882a593Smuzhiyun      Defines the format for the output image of an initial RAM filesystem
3658*4882a593Smuzhiyun      (initramfs), which is used during boot. Supported formats are the
3659*4882a593Smuzhiyun      same as those supported by the
3660*4882a593Smuzhiyun      :term:`IMAGE_FSTYPES` variable.
3661*4882a593Smuzhiyun
3662*4882a593Smuzhiyun      The default value of this variable, which is set in the
3663*4882a593Smuzhiyun      ``meta/conf/bitbake.conf`` configuration file in the
3664*4882a593Smuzhiyun      :term:`Source Directory`, is "cpio.gz". The Linux kernel's
3665*4882a593Smuzhiyun      initramfs mechanism, as opposed to the initial RAM filesystem
3666*4882a593Smuzhiyun      `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects
3667*4882a593Smuzhiyun      an optionally compressed cpio archive.
3668*4882a593Smuzhiyun
3669*4882a593Smuzhiyun   :term:`INITRAMFS_IMAGE`
3670*4882a593Smuzhiyun      Specifies the :term:`PROVIDES` name of an image
3671*4882a593Smuzhiyun      recipe that is used to build an initial RAM filesystem (initramfs)
3672*4882a593Smuzhiyun      image. In other words, the :term:`INITRAMFS_IMAGE` variable causes an
3673*4882a593Smuzhiyun      additional recipe to be built as a dependency to whatever root
3674*4882a593Smuzhiyun      filesystem recipe you might be using (e.g. ``core-image-sato``). The
3675*4882a593Smuzhiyun      initramfs image recipe you provide should set
3676*4882a593Smuzhiyun      :term:`IMAGE_FSTYPES` to
3677*4882a593Smuzhiyun      :term:`INITRAMFS_FSTYPES`.
3678*4882a593Smuzhiyun
3679*4882a593Smuzhiyun      An initramfs image provides a temporary root filesystem used for
3680*4882a593Smuzhiyun      early system initialization (e.g. loading of modules needed to locate
3681*4882a593Smuzhiyun      and mount the "real" root filesystem).
3682*4882a593Smuzhiyun
3683*4882a593Smuzhiyun      .. note::
3684*4882a593Smuzhiyun
3685*4882a593Smuzhiyun         See the ``meta/recipes-core/images/core-image-minimal-initramfs.bb``
3686*4882a593Smuzhiyun         recipe in the :term:`Source Directory`
3687*4882a593Smuzhiyun         for an example initramfs recipe. To select this sample recipe as
3688*4882a593Smuzhiyun         the one built to provide the initramfs image, set :term:`INITRAMFS_IMAGE`
3689*4882a593Smuzhiyun         to "core-image-minimal-initramfs".
3690*4882a593Smuzhiyun
3691*4882a593Smuzhiyun      You can also find more information by referencing the
3692*4882a593Smuzhiyun      ``meta-poky/conf/local.conf.sample.extended`` configuration file in
3693*4882a593Smuzhiyun      the Source Directory, the :ref:`image <ref-classes-image>` class,
3694*4882a593Smuzhiyun      and the :ref:`kernel <ref-classes-kernel>` class to see how to use
3695*4882a593Smuzhiyun      the :term:`INITRAMFS_IMAGE` variable.
3696*4882a593Smuzhiyun
3697*4882a593Smuzhiyun      If :term:`INITRAMFS_IMAGE` is empty, which is the default, then no
3698*4882a593Smuzhiyun      initramfs image is built.
3699*4882a593Smuzhiyun
3700*4882a593Smuzhiyun      For more information, you can also see the
3701*4882a593Smuzhiyun      :term:`INITRAMFS_IMAGE_BUNDLE`
3702*4882a593Smuzhiyun      variable, which allows the generated image to be bundled inside the
3703*4882a593Smuzhiyun      kernel image. Additionally, for information on creating an initramfs
3704*4882a593Smuzhiyun      image, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
3705*4882a593Smuzhiyun      in the Yocto Project Development Tasks Manual.
3706*4882a593Smuzhiyun
3707*4882a593Smuzhiyun   :term:`INITRAMFS_IMAGE_BUNDLE`
3708*4882a593Smuzhiyun      Controls whether or not the image recipe specified by
3709*4882a593Smuzhiyun      :term:`INITRAMFS_IMAGE` is run through an
3710*4882a593Smuzhiyun      extra pass
3711*4882a593Smuzhiyun      (:ref:`ref-tasks-bundle_initramfs`) during
3712*4882a593Smuzhiyun      kernel compilation in order to build a single binary that contains
3713*4882a593Smuzhiyun      both the kernel image and the initial RAM filesystem (initramfs)
3714*4882a593Smuzhiyun      image. This makes use of the
3715*4882a593Smuzhiyun      :term:`CONFIG_INITRAMFS_SOURCE` kernel
3716*4882a593Smuzhiyun      feature.
3717*4882a593Smuzhiyun
3718*4882a593Smuzhiyun      .. note::
3719*4882a593Smuzhiyun
3720*4882a593Smuzhiyun         Bundling the initramfs with the kernel conflates the code in the
3721*4882a593Smuzhiyun         initramfs with the GPLv2 licensed Linux kernel binary. Thus only GPLv2
3722*4882a593Smuzhiyun         compatible software may be part of a bundled initramfs.
3723*4882a593Smuzhiyun
3724*4882a593Smuzhiyun      .. note::
3725*4882a593Smuzhiyun
3726*4882a593Smuzhiyun         Using an extra compilation pass to bundle the initramfs avoids a
3727*4882a593Smuzhiyun         circular dependency between the kernel recipe and the initramfs
3728*4882a593Smuzhiyun         recipe should the initramfs include kernel modules. Should that be
3729*4882a593Smuzhiyun         the case, the initramfs recipe depends on the kernel for the
3730*4882a593Smuzhiyun         kernel modules, and the kernel depends on the initramfs recipe
3731*4882a593Smuzhiyun         since the initramfs is bundled inside the kernel image.
3732*4882a593Smuzhiyun
3733*4882a593Smuzhiyun      The combined binary is deposited into the ``tmp/deploy`` directory,
3734*4882a593Smuzhiyun      which is part of the :term:`Build Directory`.
3735*4882a593Smuzhiyun
3736*4882a593Smuzhiyun      Setting the variable to "1" in a configuration file causes the
3737*4882a593Smuzhiyun      OpenEmbedded build system to generate a kernel image with the
3738*4882a593Smuzhiyun      initramfs specified in :term:`INITRAMFS_IMAGE` bundled within::
3739*4882a593Smuzhiyun
3740*4882a593Smuzhiyun         INITRAMFS_IMAGE_BUNDLE = "1"
3741*4882a593Smuzhiyun
3742*4882a593Smuzhiyun      By default, the
3743*4882a593Smuzhiyun      :ref:`kernel <ref-classes-kernel>` class sets this variable to a
3744*4882a593Smuzhiyun      null string as follows::
3745*4882a593Smuzhiyun
3746*4882a593Smuzhiyun         INITRAMFS_IMAGE_BUNDLE ?= ""
3747*4882a593Smuzhiyun
3748*4882a593Smuzhiyun      .. note::
3749*4882a593Smuzhiyun
3750*4882a593Smuzhiyun         You must set the :term:`INITRAMFS_IMAGE_BUNDLE` variable in a
3751*4882a593Smuzhiyun         configuration file. You cannot set the variable in a recipe file.
3752*4882a593Smuzhiyun
3753*4882a593Smuzhiyun      See the
3754*4882a593Smuzhiyun      :yocto_git:`local.conf.sample.extended </poky/tree/meta-poky/conf/local.conf.sample.extended>`
3755*4882a593Smuzhiyun      file for additional information. Also, for information on creating an
3756*4882a593Smuzhiyun      initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
3757*4882a593Smuzhiyun      in the Yocto Project Development Tasks Manual.
3758*4882a593Smuzhiyun
3759*4882a593Smuzhiyun   :term:`INITRAMFS_LINK_NAME`
3760*4882a593Smuzhiyun      The link name of the initial RAM filesystem image. This variable is
3761*4882a593Smuzhiyun      set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3762*4882a593Smuzhiyun      follows::
3763*4882a593Smuzhiyun
3764*4882a593Smuzhiyun         INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
3765*4882a593Smuzhiyun
3766*4882a593Smuzhiyun      The value of the
3767*4882a593Smuzhiyun      ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
3768*4882a593Smuzhiyun      file, has the following value::
3769*4882a593Smuzhiyun
3770*4882a593Smuzhiyun         KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
3771*4882a593Smuzhiyun
3772*4882a593Smuzhiyun      See the :term:`MACHINE` variable for additional
3773*4882a593Smuzhiyun      information.
3774*4882a593Smuzhiyun
3775*4882a593Smuzhiyun   :term:`INITRAMFS_MULTICONFIG`
3776*4882a593Smuzhiyun      Defines the multiconfig to create a multiconfig dependency to be used by the :ref:`kernel <ref-classes-kernel>` class.
3777*4882a593Smuzhiyun
3778*4882a593Smuzhiyun      This allows the kernel to bundle an :term:`INITRAMFS_IMAGE` coming from
3779*4882a593Smuzhiyun      a separate multiconfig, this is meant to be used in addition to :term:`INITRAMFS_DEPLOY_DIR_IMAGE`.
3780*4882a593Smuzhiyun
3781*4882a593Smuzhiyun      For more information on how to bundle an initramfs image from a separate
3782*4882a593Smuzhiyun      multiconfig see the ":ref:`dev-manual/common-tasks:Bundling an Initramfs Image From a Separate Multiconfig`"
3783*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
3784*4882a593Smuzhiyun
3785*4882a593Smuzhiyun   :term:`INITRAMFS_NAME`
3786*4882a593Smuzhiyun      The base name of the initial RAM filesystem image. This variable is
3787*4882a593Smuzhiyun      set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3788*4882a593Smuzhiyun      follows::
3789*4882a593Smuzhiyun
3790*4882a593Smuzhiyun         INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
3791*4882a593Smuzhiyun
3792*4882a593Smuzhiyun      The value of the :term:`KERNEL_ARTIFACT_NAME`
3793*4882a593Smuzhiyun      variable, which is set in the same file, has the following value::
3794*4882a593Smuzhiyun
3795*4882a593Smuzhiyun         KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3796*4882a593Smuzhiyun
3797*4882a593Smuzhiyun   :term:`INITRD`
3798*4882a593Smuzhiyun      Indicates list of filesystem images to concatenate and use as an
3799*4882a593Smuzhiyun      initial RAM disk (``initrd``).
3800*4882a593Smuzhiyun
3801*4882a593Smuzhiyun      The :term:`INITRD` variable is an optional variable used with the
3802*4882a593Smuzhiyun      :ref:`image-live <ref-classes-image-live>` class.
3803*4882a593Smuzhiyun
3804*4882a593Smuzhiyun   :term:`INITRD_IMAGE`
3805*4882a593Smuzhiyun      When building a "live" bootable image (i.e. when
3806*4882a593Smuzhiyun      :term:`IMAGE_FSTYPES` contains "live"),
3807*4882a593Smuzhiyun      :term:`INITRD_IMAGE` specifies the image recipe that should be built to
3808*4882a593Smuzhiyun      provide the initial RAM disk image. The default value is
3809*4882a593Smuzhiyun      "core-image-minimal-initramfs".
3810*4882a593Smuzhiyun
3811*4882a593Smuzhiyun      See the :ref:`image-live <ref-classes-image-live>` class for more
3812*4882a593Smuzhiyun      information.
3813*4882a593Smuzhiyun
3814*4882a593Smuzhiyun   :term:`INITSCRIPT_NAME`
3815*4882a593Smuzhiyun      The filename of the initialization script as installed to
3816*4882a593Smuzhiyun      ``${sysconfdir}/init.d``.
3817*4882a593Smuzhiyun
3818*4882a593Smuzhiyun      This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
3819*4882a593Smuzhiyun      The variable is mandatory.
3820*4882a593Smuzhiyun
3821*4882a593Smuzhiyun   :term:`INITSCRIPT_PACKAGES`
3822*4882a593Smuzhiyun      A list of the packages that contain initscripts. If multiple packages
3823*4882a593Smuzhiyun      are specified, you need to append the package name to the other
3824*4882a593Smuzhiyun      ``INITSCRIPT_*`` as an override.
3825*4882a593Smuzhiyun
3826*4882a593Smuzhiyun      This variable is used in recipes when using :ref:`ref-classes-update-rc.d`.
3827*4882a593Smuzhiyun      The variable is optional and defaults to the :term:`PN`
3828*4882a593Smuzhiyun      variable.
3829*4882a593Smuzhiyun
3830*4882a593Smuzhiyun   :term:`INITSCRIPT_PARAMS`
3831*4882a593Smuzhiyun      Specifies the options to pass to ``update-rc.d``. Here is an example::
3832*4882a593Smuzhiyun
3833*4882a593Smuzhiyun         INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
3834*4882a593Smuzhiyun
3835*4882a593Smuzhiyun      In this example, the script has a runlevel of 99, starts the script
3836*4882a593Smuzhiyun      in initlevels 2 and 5, and stops the script in levels 0, 1 and 6.
3837*4882a593Smuzhiyun
3838*4882a593Smuzhiyun      The variable's default value is "defaults", which is set in the
3839*4882a593Smuzhiyun      :ref:`update-rc.d <ref-classes-update-rc.d>` class.
3840*4882a593Smuzhiyun
3841*4882a593Smuzhiyun      The value in :term:`INITSCRIPT_PARAMS` is passed through to the
3842*4882a593Smuzhiyun      ``update-rc.d`` command. For more information on valid parameters,
3843*4882a593Smuzhiyun      please see the ``update-rc.d`` manual page at
3844*4882a593Smuzhiyun      https://manpages.debian.org/buster/init-system-helpers/update-rc.d.8.en.html
3845*4882a593Smuzhiyun
3846*4882a593Smuzhiyun   :term:`INSANE_SKIP`
3847*4882a593Smuzhiyun      Specifies the QA checks to skip for a specific package within a
3848*4882a593Smuzhiyun      recipe. For example, to skip the check for symbolic link ``.so``
3849*4882a593Smuzhiyun      files in the main package of a recipe, add the following to the
3850*4882a593Smuzhiyun      recipe. The package name override must be used, which in this example
3851*4882a593Smuzhiyun      is ``${PN}``::
3852*4882a593Smuzhiyun
3853*4882a593Smuzhiyun         INSANE_SKIP:${PN} += "dev-so"
3854*4882a593Smuzhiyun
3855*4882a593Smuzhiyun      See the ":ref:`ref-classes-insane`" section for a
3856*4882a593Smuzhiyun      list of the valid QA checks you can specify using this variable.
3857*4882a593Smuzhiyun
3858*4882a593Smuzhiyun   :term:`INSTALL_TIMEZONE_FILE`
3859*4882a593Smuzhiyun      By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file.
3860*4882a593Smuzhiyun      Set the :term:`INSTALL_TIMEZONE_FILE` variable to "0" at the
3861*4882a593Smuzhiyun      configuration level to disable this behavior.
3862*4882a593Smuzhiyun
3863*4882a593Smuzhiyun   :term:`IPK_FEED_URIS`
3864*4882a593Smuzhiyun      When the IPK backend is in use and package management is enabled on
3865*4882a593Smuzhiyun      the target, you can use this variable to set up ``opkg`` in the
3866*4882a593Smuzhiyun      target image to point to package feeds on a nominated server. Once
3867*4882a593Smuzhiyun      the feed is established, you can perform installations or upgrades
3868*4882a593Smuzhiyun      using the package manager at runtime.
3869*4882a593Smuzhiyun
3870*4882a593Smuzhiyun   :term:`KARCH`
3871*4882a593Smuzhiyun      Defines the kernel architecture used when assembling the
3872*4882a593Smuzhiyun      configuration. Architectures supported for this release are:
3873*4882a593Smuzhiyun
3874*4882a593Smuzhiyun      - powerpc
3875*4882a593Smuzhiyun      - i386
3876*4882a593Smuzhiyun      - x86_64
3877*4882a593Smuzhiyun      - arm
3878*4882a593Smuzhiyun      - qemu
3879*4882a593Smuzhiyun      - mips
3880*4882a593Smuzhiyun
3881*4882a593Smuzhiyun      You define the :term:`KARCH` variable in the :ref:`kernel-dev/advanced:bsp descriptions`.
3882*4882a593Smuzhiyun
3883*4882a593Smuzhiyun   :term:`KBRANCH`
3884*4882a593Smuzhiyun      A regular expression used by the build process to explicitly identify
3885*4882a593Smuzhiyun      the kernel branch that is validated, patched, and configured during a
3886*4882a593Smuzhiyun      build. You must set this variable to ensure the exact kernel branch
3887*4882a593Smuzhiyun      you want is being used by the build process.
3888*4882a593Smuzhiyun
3889*4882a593Smuzhiyun      Values for this variable are set in the kernel's recipe file and the
3890*4882a593Smuzhiyun      kernel's append file. For example, if you are using the
3891*4882a593Smuzhiyun      ``linux-yocto_4.12`` kernel, the kernel recipe file is the
3892*4882a593Smuzhiyun      ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. :term:`KBRANCH`
3893*4882a593Smuzhiyun      is set as follows in that kernel recipe file::
3894*4882a593Smuzhiyun
3895*4882a593Smuzhiyun         KBRANCH ?= "standard/base"
3896*4882a593Smuzhiyun
3897*4882a593Smuzhiyun      This variable is also used from the kernel's append file to identify
3898*4882a593Smuzhiyun      the kernel branch specific to a particular machine or target
3899*4882a593Smuzhiyun      hardware. Continuing with the previous kernel example, the kernel's
3900*4882a593Smuzhiyun      append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the
3901*4882a593Smuzhiyun      BSP layer for a given machine. For example, the append file for the
3902*4882a593Smuzhiyun      Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
3903*4882a593Smuzhiyun      machines (``meta-yocto-bsp``) is named
3904*4882a593Smuzhiyun      ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
3905*4882a593Smuzhiyun      Here are the related statements from that append file::
3906*4882a593Smuzhiyun
3907*4882a593Smuzhiyun         KBRANCH:genericx86 = "standard/base"
3908*4882a593Smuzhiyun         KBRANCH:genericx86-64 = "standard/base"
3909*4882a593Smuzhiyun         KBRANCH:edgerouter = "standard/edgerouter"
3910*4882a593Smuzhiyun         KBRANCH:beaglebone = "standard/beaglebone"
3911*4882a593Smuzhiyun
3912*4882a593Smuzhiyun      The :term:`KBRANCH` statements
3913*4882a593Smuzhiyun      identify the kernel branch to use when building for each supported
3914*4882a593Smuzhiyun      BSP.
3915*4882a593Smuzhiyun
3916*4882a593Smuzhiyun   :term:`KBUILD_DEFCONFIG`
3917*4882a593Smuzhiyun      When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3918*4882a593Smuzhiyun      class, specifies an "in-tree" kernel configuration file for use
3919*4882a593Smuzhiyun      during a kernel build.
3920*4882a593Smuzhiyun
3921*4882a593Smuzhiyun      Typically, when using a ``defconfig`` to configure a kernel during a
3922*4882a593Smuzhiyun      build, you place the file in your layer in the same manner as you
3923*4882a593Smuzhiyun      would place patch files and configuration fragment files (i.e.
3924*4882a593Smuzhiyun      "out-of-tree"). However, if you want to use a ``defconfig`` file that
3925*4882a593Smuzhiyun      is part of the kernel tree (i.e. "in-tree"), you can use the
3926*4882a593Smuzhiyun      :term:`KBUILD_DEFCONFIG` variable and append the
3927*4882a593Smuzhiyun      :term:`KMACHINE` variable to point to the
3928*4882a593Smuzhiyun      ``defconfig`` file.
3929*4882a593Smuzhiyun
3930*4882a593Smuzhiyun      To use the variable, set it in the append file for your kernel recipe
3931*4882a593Smuzhiyun      using the following form::
3932*4882a593Smuzhiyun
3933*4882a593Smuzhiyun         KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file
3934*4882a593Smuzhiyun
3935*4882a593Smuzhiyun      Here is an example from a "raspberrypi2" :term:`KMACHINE` build that uses
3936*4882a593Smuzhiyun      a ``defconfig`` file named "bcm2709_defconfig"::
3937*4882a593Smuzhiyun
3938*4882a593Smuzhiyun         KBUILD_DEFCONFIG:raspberrypi2 = "bcm2709_defconfig"
3939*4882a593Smuzhiyun
3940*4882a593Smuzhiyun      As an alternative, you can use the following within your append file::
3941*4882a593Smuzhiyun
3942*4882a593Smuzhiyun         KBUILD_DEFCONFIG:pn-linux-yocto ?= "defconfig_file"
3943*4882a593Smuzhiyun
3944*4882a593Smuzhiyun      For more
3945*4882a593Smuzhiyun      information on how to use the :term:`KBUILD_DEFCONFIG` variable, see the
3946*4882a593Smuzhiyun      ":ref:`kernel-dev/common:using an "in-tree" \`\`defconfig\`\` file`"
3947*4882a593Smuzhiyun      section in the Yocto Project Linux Kernel Development Manual.
3948*4882a593Smuzhiyun
3949*4882a593Smuzhiyun   :term:`KCONFIG_MODE`
3950*4882a593Smuzhiyun      When used with the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
3951*4882a593Smuzhiyun      class, specifies the kernel configuration values to use for options
3952*4882a593Smuzhiyun      not specified in the provided ``defconfig`` file. Valid options are::
3953*4882a593Smuzhiyun
3954*4882a593Smuzhiyun         KCONFIG_MODE = "alldefconfig"
3955*4882a593Smuzhiyun         KCONFIG_MODE = "allnoconfig"
3956*4882a593Smuzhiyun
3957*4882a593Smuzhiyun      In ``alldefconfig`` mode the options not explicitly specified will be
3958*4882a593Smuzhiyun      assigned their Kconfig default value. In ``allnoconfig`` mode the
3959*4882a593Smuzhiyun      options not explicitly specified will be disabled in the kernel
3960*4882a593Smuzhiyun      config.
3961*4882a593Smuzhiyun
3962*4882a593Smuzhiyun      In case :term:`KCONFIG_MODE` is not set the behaviour will depend on where
3963*4882a593Smuzhiyun      the ``defconfig`` file is coming from. An "in-tree" ``defconfig`` file
3964*4882a593Smuzhiyun      will be handled in ``alldefconfig`` mode, a ``defconfig`` file placed
3965*4882a593Smuzhiyun      in ``${WORKDIR}`` through a meta-layer will be handled in
3966*4882a593Smuzhiyun      ``allnoconfig`` mode.
3967*4882a593Smuzhiyun
3968*4882a593Smuzhiyun      An "in-tree" ``defconfig`` file can be selected via the
3969*4882a593Smuzhiyun      :term:`KBUILD_DEFCONFIG` variable. :term:`KCONFIG_MODE` does not need to
3970*4882a593Smuzhiyun      be explicitly set.
3971*4882a593Smuzhiyun
3972*4882a593Smuzhiyun      A ``defconfig`` file compatible with ``allnoconfig`` mode can be
3973*4882a593Smuzhiyun      generated by copying the ``.config`` file from a working Linux kernel
3974*4882a593Smuzhiyun      build, renaming it to ``defconfig`` and placing it into the Linux
3975*4882a593Smuzhiyun      kernel ``${WORKDIR}`` through your meta-layer. :term:`KCONFIG_MODE` does
3976*4882a593Smuzhiyun      not need to be explicitly set.
3977*4882a593Smuzhiyun
3978*4882a593Smuzhiyun      A ``defconfig`` file compatible with ``alldefconfig`` mode can be
3979*4882a593Smuzhiyun      generated using the
3980*4882a593Smuzhiyun      :ref:`ref-tasks-savedefconfig`
3981*4882a593Smuzhiyun      task and placed into the Linux kernel ``${WORKDIR}`` through your
3982*4882a593Smuzhiyun      meta-layer. Explicitely set :term:`KCONFIG_MODE`::
3983*4882a593Smuzhiyun
3984*4882a593Smuzhiyun         KCONFIG_MODE = "alldefconfig"
3985*4882a593Smuzhiyun
3986*4882a593Smuzhiyun
3987*4882a593Smuzhiyun   :term:`KERNEL_ALT_IMAGETYPE`
3988*4882a593Smuzhiyun      Specifies an alternate kernel image type for creation in addition to
3989*4882a593Smuzhiyun      the kernel image type specified using the
3990*4882a593Smuzhiyun      :term:`KERNEL_IMAGETYPE` variable.
3991*4882a593Smuzhiyun
3992*4882a593Smuzhiyun   :term:`KERNEL_ARTIFACT_NAME`
3993*4882a593Smuzhiyun      Specifies the name of all of the build artifacts. You can change the
3994*4882a593Smuzhiyun      name of the artifacts by changing the :term:`KERNEL_ARTIFACT_NAME`
3995*4882a593Smuzhiyun      variable.
3996*4882a593Smuzhiyun
3997*4882a593Smuzhiyun      The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the
3998*4882a593Smuzhiyun      ``meta/classes/kernel-artifact-names.bbclass`` file, has the
3999*4882a593Smuzhiyun      following default value::
4000*4882a593Smuzhiyun
4001*4882a593Smuzhiyun         KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4002*4882a593Smuzhiyun
4003*4882a593Smuzhiyun      See the :term:`PKGE`, :term:`PKGV`, :term:`PKGR`, :term:`MACHINE`
4004*4882a593Smuzhiyun      and :term:`IMAGE_VERSION_SUFFIX` variables for additional information.
4005*4882a593Smuzhiyun
4006*4882a593Smuzhiyun   :term:`KERNEL_CLASSES`
4007*4882a593Smuzhiyun      A list of classes defining kernel image types that the
4008*4882a593Smuzhiyun      :ref:`kernel <ref-classes-kernel>` class should inherit. You
4009*4882a593Smuzhiyun      typically append this variable to enable extended image types. An
4010*4882a593Smuzhiyun      example is the "kernel-fitimage", which enables fitImage support and
4011*4882a593Smuzhiyun      resides in ``meta/classes/kernel-fitimage.bbclass``. You can register
4012*4882a593Smuzhiyun      custom kernel image types with the :ref:`kernel <ref-classes-kernel>` class using this
4013*4882a593Smuzhiyun      variable.
4014*4882a593Smuzhiyun
4015*4882a593Smuzhiyun   :term:`KERNEL_DEBUG_TIMESTAMPS`
4016*4882a593Smuzhiyun      If set to "1", enables timestamping functionality during building
4017*4882a593Smuzhiyun      the kernel. The default is "0" to disable this for reproducibility
4018*4882a593Smuzhiyun      reasons.
4019*4882a593Smuzhiyun
4020*4882a593Smuzhiyun   :term:`KERNEL_DEVICETREE`
4021*4882a593Smuzhiyun      Specifies the name of the generated Linux kernel device tree (i.e.
4022*4882a593Smuzhiyun      the ``.dtb``) file.
4023*4882a593Smuzhiyun
4024*4882a593Smuzhiyun      .. note::
4025*4882a593Smuzhiyun
4026*4882a593Smuzhiyun         There is legacy support for specifying the full path to the device
4027*4882a593Smuzhiyun         tree. However, providing just the ``.dtb`` file is preferred.
4028*4882a593Smuzhiyun
4029*4882a593Smuzhiyun      In order to use this variable, the
4030*4882a593Smuzhiyun      :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
4031*4882a593Smuzhiyun      be inherited.
4032*4882a593Smuzhiyun
4033*4882a593Smuzhiyun   :term:`KERNEL_DTB_LINK_NAME`
4034*4882a593Smuzhiyun      The link name of the kernel device tree binary (DTB). This variable
4035*4882a593Smuzhiyun      is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
4036*4882a593Smuzhiyun      follows::
4037*4882a593Smuzhiyun
4038*4882a593Smuzhiyun         KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4039*4882a593Smuzhiyun
4040*4882a593Smuzhiyun      The
4041*4882a593Smuzhiyun      value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in
4042*4882a593Smuzhiyun      the same file, has the following value::
4043*4882a593Smuzhiyun
4044*4882a593Smuzhiyun         KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4045*4882a593Smuzhiyun
4046*4882a593Smuzhiyun      See the :term:`MACHINE` variable for additional
4047*4882a593Smuzhiyun      information.
4048*4882a593Smuzhiyun
4049*4882a593Smuzhiyun   :term:`KERNEL_DTB_NAME`
4050*4882a593Smuzhiyun      The base name of the kernel device tree binary (DTB). This variable
4051*4882a593Smuzhiyun      is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
4052*4882a593Smuzhiyun      follows::
4053*4882a593Smuzhiyun
4054*4882a593Smuzhiyun         KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4055*4882a593Smuzhiyun
4056*4882a593Smuzhiyun      The value of the :term:`KERNEL_ARTIFACT_NAME`
4057*4882a593Smuzhiyun      variable, which is set in the same file, has the following value::
4058*4882a593Smuzhiyun
4059*4882a593Smuzhiyun         KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4060*4882a593Smuzhiyun
4061*4882a593Smuzhiyun   :term:`KERNEL_DTC_FLAGS`
4062*4882a593Smuzhiyun      Specifies the ``dtc`` flags that are passed to the Linux kernel build
4063*4882a593Smuzhiyun      system when generating the device trees (via ``DTC_FLAGS`` environment
4064*4882a593Smuzhiyun      variable).
4065*4882a593Smuzhiyun
4066*4882a593Smuzhiyun      In order to use this variable, the
4067*4882a593Smuzhiyun      :ref:`kernel-devicetree <ref-classes-kernel-devicetree>` class must
4068*4882a593Smuzhiyun      be inherited.
4069*4882a593Smuzhiyun
4070*4882a593Smuzhiyun   :term:`KERNEL_EXTRA_ARGS`
4071*4882a593Smuzhiyun      Specifies additional ``make`` command-line arguments the OpenEmbedded
4072*4882a593Smuzhiyun      build system passes on when compiling the kernel.
4073*4882a593Smuzhiyun
4074*4882a593Smuzhiyun   :term:`KERNEL_FEATURES`
4075*4882a593Smuzhiyun      Includes additional kernel metadata. In the OpenEmbedded build
4076*4882a593Smuzhiyun      system, the default Board Support Packages (BSPs)
4077*4882a593Smuzhiyun      :term:`Metadata` is provided through the
4078*4882a593Smuzhiyun      :term:`KMACHINE` and :term:`KBRANCH`
4079*4882a593Smuzhiyun      variables. You can use the :term:`KERNEL_FEATURES` variable from within
4080*4882a593Smuzhiyun      the kernel recipe or kernel append file to further add metadata for
4081*4882a593Smuzhiyun      all BSPs or specific BSPs.
4082*4882a593Smuzhiyun
4083*4882a593Smuzhiyun      The metadata you add through this variable includes config fragments
4084*4882a593Smuzhiyun      and features descriptions, which usually includes patches as well as
4085*4882a593Smuzhiyun      config fragments. You typically override the :term:`KERNEL_FEATURES`
4086*4882a593Smuzhiyun      variable for a specific machine. In this way, you can provide
4087*4882a593Smuzhiyun      validated, but optional, sets of kernel configurations and features.
4088*4882a593Smuzhiyun
4089*4882a593Smuzhiyun      For example, the following example from the ``linux-yocto-rt_4.12``
4090*4882a593Smuzhiyun      kernel recipe adds "netfilter" and "taskstats" features to all BSPs
4091*4882a593Smuzhiyun      as well as "virtio" configurations to all QEMU machines. The last two
4092*4882a593Smuzhiyun      statements add specific configurations to targeted machine types::
4093*4882a593Smuzhiyun
4094*4882a593Smuzhiyun         KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
4095*4882a593Smuzhiyun         KERNEL_FEATURES:append = "${KERNEL_EXTRA_FEATURES}"
4096*4882a593Smuzhiyun         KERNEL_FEATURES:append:qemuall = "cfg/virtio.scc"
4097*4882a593Smuzhiyun         KERNEL_FEATURES:append:qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
4098*4882a593Smuzhiyun         KERNEL_FEATURES:append:qemux86-64 = "cfg/sound.scc"
4099*4882a593Smuzhiyun
4100*4882a593Smuzhiyun   :term:`KERNEL_FIT_LINK_NAME`
4101*4882a593Smuzhiyun      The link name of the kernel flattened image tree (FIT) image. This
4102*4882a593Smuzhiyun      variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
4103*4882a593Smuzhiyun      file as follows::
4104*4882a593Smuzhiyun
4105*4882a593Smuzhiyun         KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4106*4882a593Smuzhiyun
4107*4882a593Smuzhiyun      The value of the
4108*4882a593Smuzhiyun      ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
4109*4882a593Smuzhiyun      file, has the following value::
4110*4882a593Smuzhiyun
4111*4882a593Smuzhiyun         KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4112*4882a593Smuzhiyun
4113*4882a593Smuzhiyun      See the :term:`MACHINE` variable for additional
4114*4882a593Smuzhiyun      information.
4115*4882a593Smuzhiyun
4116*4882a593Smuzhiyun   :term:`KERNEL_FIT_NAME`
4117*4882a593Smuzhiyun      The base name of the kernel flattened image tree (FIT) image. This
4118*4882a593Smuzhiyun      variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
4119*4882a593Smuzhiyun      file as follows::
4120*4882a593Smuzhiyun
4121*4882a593Smuzhiyun         KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4122*4882a593Smuzhiyun
4123*4882a593Smuzhiyun      The value of the :term:`KERNEL_ARTIFACT_NAME`
4124*4882a593Smuzhiyun      variable, which is set in the same file, has the following value::
4125*4882a593Smuzhiyun
4126*4882a593Smuzhiyun         KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4127*4882a593Smuzhiyun
4128*4882a593Smuzhiyun   :term:`KERNEL_IMAGE_LINK_NAME`
4129*4882a593Smuzhiyun      The link name for the kernel image. This variable is set in the
4130*4882a593Smuzhiyun      ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
4131*4882a593Smuzhiyun
4132*4882a593Smuzhiyun         KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4133*4882a593Smuzhiyun
4134*4882a593Smuzhiyun      The value of
4135*4882a593Smuzhiyun      the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
4136*4882a593Smuzhiyun      file, has the following value::
4137*4882a593Smuzhiyun
4138*4882a593Smuzhiyun         KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4139*4882a593Smuzhiyun
4140*4882a593Smuzhiyun      See the :term:`MACHINE` variable for additional
4141*4882a593Smuzhiyun      information.
4142*4882a593Smuzhiyun
4143*4882a593Smuzhiyun   :term:`KERNEL_IMAGE_MAXSIZE`
4144*4882a593Smuzhiyun      Specifies the maximum size of the kernel image file in kilobytes. If
4145*4882a593Smuzhiyun      :term:`KERNEL_IMAGE_MAXSIZE` is set, the size of the kernel image file is
4146*4882a593Smuzhiyun      checked against the set value during the
4147*4882a593Smuzhiyun      :ref:`ref-tasks-sizecheck` task. The task fails if
4148*4882a593Smuzhiyun      the kernel image file is larger than the setting.
4149*4882a593Smuzhiyun
4150*4882a593Smuzhiyun      :term:`KERNEL_IMAGE_MAXSIZE` is useful for target devices that have a
4151*4882a593Smuzhiyun      limited amount of space in which the kernel image must be stored.
4152*4882a593Smuzhiyun
4153*4882a593Smuzhiyun      By default, this variable is not set, which means the size of the
4154*4882a593Smuzhiyun      kernel image is not checked.
4155*4882a593Smuzhiyun
4156*4882a593Smuzhiyun   :term:`KERNEL_IMAGE_NAME`
4157*4882a593Smuzhiyun      The base name of the kernel image. This variable is set in the
4158*4882a593Smuzhiyun      ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
4159*4882a593Smuzhiyun
4160*4882a593Smuzhiyun         KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4161*4882a593Smuzhiyun
4162*4882a593Smuzhiyun      The value of the
4163*4882a593Smuzhiyun      :term:`KERNEL_ARTIFACT_NAME` variable,
4164*4882a593Smuzhiyun      which is set in the same file, has the following value::
4165*4882a593Smuzhiyun
4166*4882a593Smuzhiyun         KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4167*4882a593Smuzhiyun
4168*4882a593Smuzhiyun   :term:`KERNEL_IMAGETYPE`
4169*4882a593Smuzhiyun      The type of kernel to build for a device, usually set by the machine
4170*4882a593Smuzhiyun      configuration files and defaults to "zImage". This variable is used
4171*4882a593Smuzhiyun      when building the kernel and is passed to ``make`` as the target to
4172*4882a593Smuzhiyun      build.
4173*4882a593Smuzhiyun
4174*4882a593Smuzhiyun      If you want to build an alternate kernel image type in addition to that
4175*4882a593Smuzhiyun      specified by :term:`KERNEL_IMAGETYPE`, use the :term:`KERNEL_ALT_IMAGETYPE`
4176*4882a593Smuzhiyun      variable.
4177*4882a593Smuzhiyun
4178*4882a593Smuzhiyun   :term:`KERNEL_MODULE_AUTOLOAD`
4179*4882a593Smuzhiyun      Lists kernel modules that need to be auto-loaded during boot.
4180*4882a593Smuzhiyun
4181*4882a593Smuzhiyun      .. note::
4182*4882a593Smuzhiyun
4183*4882a593Smuzhiyun         This variable replaces the deprecated :term:`module_autoload`
4184*4882a593Smuzhiyun         variable.
4185*4882a593Smuzhiyun
4186*4882a593Smuzhiyun      You can use the :term:`KERNEL_MODULE_AUTOLOAD` variable anywhere that it
4187*4882a593Smuzhiyun      can be recognized by the kernel recipe or by an out-of-tree kernel
4188*4882a593Smuzhiyun      module recipe (e.g. a machine configuration file, a distribution
4189*4882a593Smuzhiyun      configuration file, an append file for the recipe, or the recipe
4190*4882a593Smuzhiyun      itself).
4191*4882a593Smuzhiyun
4192*4882a593Smuzhiyun      Specify it as follows::
4193*4882a593Smuzhiyun
4194*4882a593Smuzhiyun         KERNEL_MODULE_AUTOLOAD += "module_name1 module_name2 module_name3"
4195*4882a593Smuzhiyun
4196*4882a593Smuzhiyun      Including :term:`KERNEL_MODULE_AUTOLOAD` causes the OpenEmbedded build
4197*4882a593Smuzhiyun      system to populate the ``/etc/modules-load.d/modname.conf`` file with
4198*4882a593Smuzhiyun      the list of modules to be auto-loaded on boot. The modules appear
4199*4882a593Smuzhiyun      one-per-line in the file. Here is an example of the most common use
4200*4882a593Smuzhiyun      case::
4201*4882a593Smuzhiyun
4202*4882a593Smuzhiyun         KERNEL_MODULE_AUTOLOAD += "module_name"
4203*4882a593Smuzhiyun
4204*4882a593Smuzhiyun      For information on how to populate the ``modname.conf`` file with
4205*4882a593Smuzhiyun      ``modprobe.d`` syntax lines, see the :term:`KERNEL_MODULE_PROBECONF` variable.
4206*4882a593Smuzhiyun
4207*4882a593Smuzhiyun   :term:`KERNEL_MODULE_PROBECONF`
4208*4882a593Smuzhiyun      Provides a list of modules for which the OpenEmbedded build system
4209*4882a593Smuzhiyun      expects to find ``module_conf_``\ modname values that specify
4210*4882a593Smuzhiyun      configuration for each of the modules. For information on how to
4211*4882a593Smuzhiyun      provide those module configurations, see the
4212*4882a593Smuzhiyun      :term:`module_conf_* <module_conf>` variable.
4213*4882a593Smuzhiyun
4214*4882a593Smuzhiyun   :term:`KERNEL_PATH`
4215*4882a593Smuzhiyun      The location of the kernel sources. This variable is set to the value
4216*4882a593Smuzhiyun      of the :term:`STAGING_KERNEL_DIR` within
4217*4882a593Smuzhiyun      the :ref:`module <ref-classes-module>` class. For information on
4218*4882a593Smuzhiyun      how this variable is used, see the
4219*4882a593Smuzhiyun      ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
4220*4882a593Smuzhiyun      section in the Yocto Project Linux Kernel Development Manual.
4221*4882a593Smuzhiyun
4222*4882a593Smuzhiyun      To help maximize compatibility with out-of-tree drivers used to build
4223*4882a593Smuzhiyun      modules, the OpenEmbedded build system also recognizes and uses the
4224*4882a593Smuzhiyun      :term:`KERNEL_SRC` variable, which is identical to
4225*4882a593Smuzhiyun      the :term:`KERNEL_PATH` variable. Both variables are common variables
4226*4882a593Smuzhiyun      used by external Makefiles to point to the kernel source directory.
4227*4882a593Smuzhiyun
4228*4882a593Smuzhiyun   :term:`KERNEL_SRC`
4229*4882a593Smuzhiyun      The location of the kernel sources. This variable is set to the value
4230*4882a593Smuzhiyun      of the :term:`STAGING_KERNEL_DIR` within
4231*4882a593Smuzhiyun      the :ref:`module <ref-classes-module>` class. For information on
4232*4882a593Smuzhiyun      how this variable is used, see the
4233*4882a593Smuzhiyun      ":ref:`kernel-dev/common:incorporating out-of-tree modules`"
4234*4882a593Smuzhiyun      section in the Yocto Project Linux Kernel Development Manual.
4235*4882a593Smuzhiyun
4236*4882a593Smuzhiyun      To help maximize compatibility with out-of-tree drivers used to build
4237*4882a593Smuzhiyun      modules, the OpenEmbedded build system also recognizes and uses the
4238*4882a593Smuzhiyun      :term:`KERNEL_PATH` variable, which is identical
4239*4882a593Smuzhiyun      to the :term:`KERNEL_SRC` variable. Both variables are common variables
4240*4882a593Smuzhiyun      used by external Makefiles to point to the kernel source directory.
4241*4882a593Smuzhiyun
4242*4882a593Smuzhiyun   :term:`KERNEL_VERSION`
4243*4882a593Smuzhiyun      Specifies the version of the kernel as extracted from ``version.h``
4244*4882a593Smuzhiyun      or ``utsrelease.h`` within the kernel sources. Effects of setting
4245*4882a593Smuzhiyun      this variable do not take effect until the kernel has been
4246*4882a593Smuzhiyun      configured. Consequently, attempting to refer to this variable in
4247*4882a593Smuzhiyun      contexts prior to configuration will not work.
4248*4882a593Smuzhiyun
4249*4882a593Smuzhiyun   :term:`KERNELDEPMODDEPEND`
4250*4882a593Smuzhiyun      Specifies whether the data referenced through
4251*4882a593Smuzhiyun      :term:`PKGDATA_DIR` is needed or not.
4252*4882a593Smuzhiyun      :term:`KERNELDEPMODDEPEND` does not control whether or not that data
4253*4882a593Smuzhiyun      exists, but simply whether or not it is used. If you do not need to
4254*4882a593Smuzhiyun      use the data, set the :term:`KERNELDEPMODDEPEND` variable in your
4255*4882a593Smuzhiyun      ``initramfs`` recipe. Setting the variable there when the data is not
4256*4882a593Smuzhiyun      needed avoids a potential dependency loop.
4257*4882a593Smuzhiyun
4258*4882a593Smuzhiyun   :term:`KFEATURE_DESCRIPTION`
4259*4882a593Smuzhiyun      Provides a short description of a configuration fragment. You use
4260*4882a593Smuzhiyun      this variable in the ``.scc`` file that describes a configuration
4261*4882a593Smuzhiyun      fragment file. Here is the variable used in a file named ``smp.scc``
4262*4882a593Smuzhiyun      to describe SMP being enabled::
4263*4882a593Smuzhiyun
4264*4882a593Smuzhiyun          define KFEATURE_DESCRIPTION "Enable SMP"
4265*4882a593Smuzhiyun
4266*4882a593Smuzhiyun   :term:`KMACHINE`
4267*4882a593Smuzhiyun      The machine as known by the kernel. Sometimes the machine name used
4268*4882a593Smuzhiyun      by the kernel does not match the machine name used by the
4269*4882a593Smuzhiyun      OpenEmbedded build system. For example, the machine name that the
4270*4882a593Smuzhiyun      OpenEmbedded build system understands as ``core2-32-intel-common``
4271*4882a593Smuzhiyun      goes by a different name in the Linux Yocto kernel. The kernel
4272*4882a593Smuzhiyun      understands that machine as ``intel-core2-32``. For cases like these,
4273*4882a593Smuzhiyun      the :term:`KMACHINE` variable maps the kernel machine name to the
4274*4882a593Smuzhiyun      OpenEmbedded build system machine name.
4275*4882a593Smuzhiyun
4276*4882a593Smuzhiyun      These mappings between different names occur in the Yocto Linux
4277*4882a593Smuzhiyun      Kernel's ``meta`` branch. As an example take a look in the
4278*4882a593Smuzhiyun      ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file::
4279*4882a593Smuzhiyun
4280*4882a593Smuzhiyun         LINUX_VERSION:core2-32-intel-common = "3.19.0"
4281*4882a593Smuzhiyun         COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}"
4282*4882a593Smuzhiyun         SRCREV_meta:core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974"
4283*4882a593Smuzhiyun         SRCREV_machine:core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711"
4284*4882a593Smuzhiyun         KMACHINE:core2-32-intel-common = "intel-core2-32"
4285*4882a593Smuzhiyun         KBRANCH:core2-32-intel-common = "standard/base"
4286*4882a593Smuzhiyun         KERNEL_FEATURES:append:core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}"
4287*4882a593Smuzhiyun
4288*4882a593Smuzhiyun      The :term:`KMACHINE` statement says
4289*4882a593Smuzhiyun      that the kernel understands the machine name as "intel-core2-32".
4290*4882a593Smuzhiyun      However, the OpenEmbedded build system understands the machine as
4291*4882a593Smuzhiyun      "core2-32-intel-common".
4292*4882a593Smuzhiyun
4293*4882a593Smuzhiyun   :term:`KTYPE`
4294*4882a593Smuzhiyun      Defines the kernel type to be used in assembling the configuration.
4295*4882a593Smuzhiyun      The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
4296*4882a593Smuzhiyun      kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
4297*4882a593Smuzhiyun      section in the
4298*4882a593Smuzhiyun      Yocto Project Linux Kernel Development Manual for more information on
4299*4882a593Smuzhiyun      kernel types.
4300*4882a593Smuzhiyun
4301*4882a593Smuzhiyun      You define the :term:`KTYPE` variable in the
4302*4882a593Smuzhiyun      :ref:`kernel-dev/advanced:bsp descriptions`. The
4303*4882a593Smuzhiyun      value you use must match the value used for the
4304*4882a593Smuzhiyun      :term:`LINUX_KERNEL_TYPE` value used by the
4305*4882a593Smuzhiyun      kernel recipe.
4306*4882a593Smuzhiyun
4307*4882a593Smuzhiyun   :term:`LABELS`
4308*4882a593Smuzhiyun      Provides a list of targets for automatic configuration.
4309*4882a593Smuzhiyun
4310*4882a593Smuzhiyun      See the :ref:`grub-efi <ref-classes-grub-efi>` class for more
4311*4882a593Smuzhiyun      information on how this variable is used.
4312*4882a593Smuzhiyun
4313*4882a593Smuzhiyun   :term:`LAYERDEPENDS`
4314*4882a593Smuzhiyun      Lists the layers, separated by spaces, on which this recipe depends.
4315*4882a593Smuzhiyun      Optionally, you can specify a specific layer version for a dependency
4316*4882a593Smuzhiyun      by adding it to the end of the layer name. Here is an example::
4317*4882a593Smuzhiyun
4318*4882a593Smuzhiyun         LAYERDEPENDS_mylayer = "anotherlayer (=3)"
4319*4882a593Smuzhiyun
4320*4882a593Smuzhiyun      In this previous example,
4321*4882a593Smuzhiyun      version 3 of "anotherlayer" is compared against
4322*4882a593Smuzhiyun      :term:`LAYERVERSION`\ ``_anotherlayer``.
4323*4882a593Smuzhiyun
4324*4882a593Smuzhiyun      An error is produced if any dependency is missing or the version
4325*4882a593Smuzhiyun      numbers (if specified) do not match exactly. This variable is used in
4326*4882a593Smuzhiyun      the ``conf/layer.conf`` file and must be suffixed with the name of
4327*4882a593Smuzhiyun      the specific layer (e.g. ``LAYERDEPENDS_mylayer``).
4328*4882a593Smuzhiyun
4329*4882a593Smuzhiyun   :term:`LAYERDIR`
4330*4882a593Smuzhiyun      When used inside the ``layer.conf`` configuration file, this variable
4331*4882a593Smuzhiyun      provides the path of the current layer. This variable is not
4332*4882a593Smuzhiyun      available outside of ``layer.conf`` and references are expanded
4333*4882a593Smuzhiyun      immediately when parsing of the file completes.
4334*4882a593Smuzhiyun
4335*4882a593Smuzhiyun   :term:`LAYERRECOMMENDS`
4336*4882a593Smuzhiyun      Lists the layers, separated by spaces, recommended for use with this
4337*4882a593Smuzhiyun      layer.
4338*4882a593Smuzhiyun
4339*4882a593Smuzhiyun      Optionally, you can specify a specific layer version for a
4340*4882a593Smuzhiyun      recommendation by adding the version to the end of the layer name.
4341*4882a593Smuzhiyun      Here is an example::
4342*4882a593Smuzhiyun
4343*4882a593Smuzhiyun         LAYERRECOMMENDS_mylayer = "anotherlayer (=3)"
4344*4882a593Smuzhiyun
4345*4882a593Smuzhiyun      In this previous example, version 3 of "anotherlayer" is compared
4346*4882a593Smuzhiyun      against ``LAYERVERSION_anotherlayer``.
4347*4882a593Smuzhiyun
4348*4882a593Smuzhiyun      This variable is used in the ``conf/layer.conf`` file and must be
4349*4882a593Smuzhiyun      suffixed with the name of the specific layer (e.g.
4350*4882a593Smuzhiyun      ``LAYERRECOMMENDS_mylayer``).
4351*4882a593Smuzhiyun
4352*4882a593Smuzhiyun   :term:`LAYERSERIES_COMPAT`
4353*4882a593Smuzhiyun      Lists the versions of the :term:`OpenEmbedded-Core (OE-Core)` for which
4354*4882a593Smuzhiyun      a layer is compatible. Using the :term:`LAYERSERIES_COMPAT` variable
4355*4882a593Smuzhiyun      allows the layer maintainer to indicate which combinations of the
4356*4882a593Smuzhiyun      layer and OE-Core can be expected to work. The variable gives the
4357*4882a593Smuzhiyun      system a way to detect when a layer has not been tested with new
4358*4882a593Smuzhiyun      releases of OE-Core (e.g. the layer is not maintained).
4359*4882a593Smuzhiyun
4360*4882a593Smuzhiyun      To specify the OE-Core versions for which a layer is compatible, use
4361*4882a593Smuzhiyun      this variable in your layer's ``conf/layer.conf`` configuration file.
4362*4882a593Smuzhiyun      For the list, use the Yocto Project
4363*4882a593Smuzhiyun      :yocto_wiki:`Release Name </Releases>` (e.g.
4364*4882a593Smuzhiyun      &DISTRO_NAME_NO_CAP;). To specify multiple OE-Core versions for the
4365*4882a593Smuzhiyun      layer, use a space-separated list::
4366*4882a593Smuzhiyun
4367*4882a593Smuzhiyun         LAYERSERIES_COMPAT_layer_root_name = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;"
4368*4882a593Smuzhiyun
4369*4882a593Smuzhiyun      .. note::
4370*4882a593Smuzhiyun
4371*4882a593Smuzhiyun         Setting :term:`LAYERSERIES_COMPAT` is required by the Yocto Project
4372*4882a593Smuzhiyun         Compatible version 2 standard.
4373*4882a593Smuzhiyun         The OpenEmbedded build system produces a warning if the variable
4374*4882a593Smuzhiyun         is not set for any given layer.
4375*4882a593Smuzhiyun
4376*4882a593Smuzhiyun      See the ":ref:`dev-manual/common-tasks:creating your own layer`"
4377*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
4378*4882a593Smuzhiyun
4379*4882a593Smuzhiyun   :term:`LAYERVERSION`
4380*4882a593Smuzhiyun      Optionally specifies the version of a layer as a single number. You
4381*4882a593Smuzhiyun      can use this within :term:`LAYERDEPENDS` for
4382*4882a593Smuzhiyun      another layer in order to depend on a specific version of the layer.
4383*4882a593Smuzhiyun      This variable is used in the ``conf/layer.conf`` file and must be
4384*4882a593Smuzhiyun      suffixed with the name of the specific layer (e.g.
4385*4882a593Smuzhiyun      ``LAYERVERSION_mylayer``).
4386*4882a593Smuzhiyun
4387*4882a593Smuzhiyun   :term:`LD`
4388*4882a593Smuzhiyun      The minimal command and arguments used to run the linker.
4389*4882a593Smuzhiyun
4390*4882a593Smuzhiyun   :term:`LDFLAGS`
4391*4882a593Smuzhiyun      Specifies the flags to pass to the linker. This variable is exported
4392*4882a593Smuzhiyun      to an environment variable and thus made visible to the software
4393*4882a593Smuzhiyun      being built during the compilation step.
4394*4882a593Smuzhiyun
4395*4882a593Smuzhiyun      Default initialization for :term:`LDFLAGS` varies depending on what is
4396*4882a593Smuzhiyun      being built:
4397*4882a593Smuzhiyun
4398*4882a593Smuzhiyun      -  :term:`TARGET_LDFLAGS` when building for the
4399*4882a593Smuzhiyun         target
4400*4882a593Smuzhiyun
4401*4882a593Smuzhiyun      -  :term:`BUILD_LDFLAGS` when building for the
4402*4882a593Smuzhiyun         build host (i.e. ``-native``)
4403*4882a593Smuzhiyun
4404*4882a593Smuzhiyun      -  :term:`BUILDSDK_LDFLAGS` when building for
4405*4882a593Smuzhiyun         an SDK (i.e. ``nativesdk-``)
4406*4882a593Smuzhiyun
4407*4882a593Smuzhiyun   :term:`LEAD_SONAME`
4408*4882a593Smuzhiyun      Specifies the lead (or primary) compiled library file (i.e. ``.so``)
4409*4882a593Smuzhiyun      that the :ref:`debian <ref-classes-debian>` class applies its
4410*4882a593Smuzhiyun      naming policy to given a recipe that packages multiple libraries.
4411*4882a593Smuzhiyun
4412*4882a593Smuzhiyun      This variable works in conjunction with the :ref:`debian <ref-classes-debian>` class.
4413*4882a593Smuzhiyun
4414*4882a593Smuzhiyun   :term:`LIC_FILES_CHKSUM`
4415*4882a593Smuzhiyun      Checksums of the license text in the recipe source code.
4416*4882a593Smuzhiyun
4417*4882a593Smuzhiyun      This variable tracks changes in license text of the source code
4418*4882a593Smuzhiyun      files. If the license text is changed, it will trigger a build
4419*4882a593Smuzhiyun      failure, which gives the developer an opportunity to review any
4420*4882a593Smuzhiyun      license change.
4421*4882a593Smuzhiyun
4422*4882a593Smuzhiyun      This variable must be defined for all recipes (unless
4423*4882a593Smuzhiyun      :term:`LICENSE` is set to "CLOSED").
4424*4882a593Smuzhiyun
4425*4882a593Smuzhiyun      For more information, see the ":ref:`dev-manual/common-tasks:tracking license changes`"
4426*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
4427*4882a593Smuzhiyun
4428*4882a593Smuzhiyun   :term:`LICENSE`
4429*4882a593Smuzhiyun      The list of source licenses for the recipe. Follow these rules:
4430*4882a593Smuzhiyun
4431*4882a593Smuzhiyun      -  Do not use spaces within individual license names.
4432*4882a593Smuzhiyun
4433*4882a593Smuzhiyun      -  Separate license names using \| (pipe) when there is a choice
4434*4882a593Smuzhiyun         between licenses.
4435*4882a593Smuzhiyun
4436*4882a593Smuzhiyun      -  Separate license names using & (ampersand) when there are
4437*4882a593Smuzhiyun         multiple licenses for different parts of the source.
4438*4882a593Smuzhiyun
4439*4882a593Smuzhiyun      -  You can use spaces between license names.
4440*4882a593Smuzhiyun
4441*4882a593Smuzhiyun      -  For standard licenses, use the names of the files in
4442*4882a593Smuzhiyun         ``meta/files/common-licenses/`` or the
4443*4882a593Smuzhiyun         :term:`SPDXLICENSEMAP` flag names defined in
4444*4882a593Smuzhiyun         ``meta/conf/licenses.conf``.
4445*4882a593Smuzhiyun
4446*4882a593Smuzhiyun      Here are some examples::
4447*4882a593Smuzhiyun
4448*4882a593Smuzhiyun         LICENSE = "LGPL-2.1-only | GPL-3.0-only"
4449*4882a593Smuzhiyun         LICENSE = "MPL-1.0 & LGPL-2.1-only"
4450*4882a593Smuzhiyun         LICENSE = "GPL-2.0-or-later"
4451*4882a593Smuzhiyun
4452*4882a593Smuzhiyun      The first example is from the
4453*4882a593Smuzhiyun      recipes for Qt, which the user may choose to distribute under either
4454*4882a593Smuzhiyun      the LGPL version 2.1 or GPL version 3. The second example is from
4455*4882a593Smuzhiyun      Cairo where two licenses cover different parts of the source code.
4456*4882a593Smuzhiyun      The final example is from ``sysstat``, which presents a single
4457*4882a593Smuzhiyun      license.
4458*4882a593Smuzhiyun
4459*4882a593Smuzhiyun      You can also specify licenses on a per-package basis to handle
4460*4882a593Smuzhiyun      situations where components of the output have different licenses.
4461*4882a593Smuzhiyun      For example, a piece of software whose code is licensed under GPLv2
4462*4882a593Smuzhiyun      but has accompanying documentation licensed under the GNU Free
4463*4882a593Smuzhiyun      Documentation License 1.2 could be specified as follows::
4464*4882a593Smuzhiyun
4465*4882a593Smuzhiyun         LICENSE = "GFDL-1.2 & GPL-2.0-only"
4466*4882a593Smuzhiyun         LICENSE:${PN} = "GPL-2.0.only"
4467*4882a593Smuzhiyun         LICENSE:${PN}-doc = "GFDL-1.2"
4468*4882a593Smuzhiyun
4469*4882a593Smuzhiyun   :term:`LICENSE_CREATE_PACKAGE`
4470*4882a593Smuzhiyun      Setting :term:`LICENSE_CREATE_PACKAGE` to "1" causes the OpenEmbedded
4471*4882a593Smuzhiyun      build system to create an extra package (i.e.
4472*4882a593Smuzhiyun      ``${``\ :term:`PN`\ ``}-lic``) for each recipe and to add
4473*4882a593Smuzhiyun      those packages to the
4474*4882a593Smuzhiyun      :term:`RRECOMMENDS`\ ``:${PN}``.
4475*4882a593Smuzhiyun
4476*4882a593Smuzhiyun      The ``${PN}-lic`` package installs a directory in
4477*4882a593Smuzhiyun      ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base
4478*4882a593Smuzhiyun      name, and installs files in that directory that contain license and
4479*4882a593Smuzhiyun      copyright information (i.e. copies of the appropriate license files
4480*4882a593Smuzhiyun      from ``meta/common-licenses`` that match the licenses specified in
4481*4882a593Smuzhiyun      the :term:`LICENSE` variable of the recipe metadata
4482*4882a593Smuzhiyun      and copies of files marked in
4483*4882a593Smuzhiyun      :term:`LIC_FILES_CHKSUM` as containing
4484*4882a593Smuzhiyun      license text).
4485*4882a593Smuzhiyun
4486*4882a593Smuzhiyun      For related information on providing license text, see the
4487*4882a593Smuzhiyun      :term:`COPY_LIC_DIRS` variable, the
4488*4882a593Smuzhiyun      :term:`COPY_LIC_MANIFEST` variable, and the
4489*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:providing license text`"
4490*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
4491*4882a593Smuzhiyun
4492*4882a593Smuzhiyun   :term:`LICENSE_FLAGS`
4493*4882a593Smuzhiyun      Specifies additional flags for a recipe you must allow through
4494*4882a593Smuzhiyun      :term:`LICENSE_FLAGS_ACCEPTED` in
4495*4882a593Smuzhiyun      order for the recipe to be built. When providing multiple flags,
4496*4882a593Smuzhiyun      separate them with spaces.
4497*4882a593Smuzhiyun
4498*4882a593Smuzhiyun      This value is independent of :term:`LICENSE` and is
4499*4882a593Smuzhiyun      typically used to mark recipes that might require additional licenses
4500*4882a593Smuzhiyun      in order to be used in a commercial product. For more information,
4501*4882a593Smuzhiyun      see the
4502*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
4503*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
4504*4882a593Smuzhiyun
4505*4882a593Smuzhiyun   :term:`LICENSE_FLAGS_ACCEPTED`
4506*4882a593Smuzhiyun      Lists license flags that when specified in
4507*4882a593Smuzhiyun      :term:`LICENSE_FLAGS` within a recipe should not
4508*4882a593Smuzhiyun      prevent that recipe from being built.  For more information, see the
4509*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:enabling commercially licensed recipes`"
4510*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
4511*4882a593Smuzhiyun
4512*4882a593Smuzhiyun   :term:`LICENSE_PATH`
4513*4882a593Smuzhiyun      Path to additional licenses used during the build. By default, the
4514*4882a593Smuzhiyun      OpenEmbedded build system uses :term:`COMMON_LICENSE_DIR` to define the
4515*4882a593Smuzhiyun      directory that holds common license text used during the build. The
4516*4882a593Smuzhiyun      :term:`LICENSE_PATH` variable allows you to extend that location to other
4517*4882a593Smuzhiyun      areas that have additional licenses::
4518*4882a593Smuzhiyun
4519*4882a593Smuzhiyun         LICENSE_PATH += "path-to-additional-common-licenses"
4520*4882a593Smuzhiyun
4521*4882a593Smuzhiyun   :term:`LINUX_KERNEL_TYPE`
4522*4882a593Smuzhiyun      Defines the kernel type to be used in assembling the configuration.
4523*4882a593Smuzhiyun      The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
4524*4882a593Smuzhiyun      kernel types. See the ":ref:`kernel-dev/advanced:kernel types`"
4525*4882a593Smuzhiyun      section in the
4526*4882a593Smuzhiyun      Yocto Project Linux Kernel Development Manual for more information on
4527*4882a593Smuzhiyun      kernel types.
4528*4882a593Smuzhiyun
4529*4882a593Smuzhiyun      If you do not specify a :term:`LINUX_KERNEL_TYPE`, it defaults to
4530*4882a593Smuzhiyun      "standard". Together with :term:`KMACHINE`, the
4531*4882a593Smuzhiyun      :term:`LINUX_KERNEL_TYPE` variable defines the search arguments used by
4532*4882a593Smuzhiyun      the kernel tools to find the appropriate description within the
4533*4882a593Smuzhiyun      kernel :term:`Metadata` with which to build out the sources
4534*4882a593Smuzhiyun      and configuration.
4535*4882a593Smuzhiyun
4536*4882a593Smuzhiyun   :term:`LINUX_VERSION`
4537*4882a593Smuzhiyun      The Linux version from ``kernel.org`` on which the Linux kernel image
4538*4882a593Smuzhiyun      being built using the OpenEmbedded build system is based. You define
4539*4882a593Smuzhiyun      this variable in the kernel recipe. For example, the
4540*4882a593Smuzhiyun      ``linux-yocto-3.4.bb`` kernel recipe found in
4541*4882a593Smuzhiyun      ``meta/recipes-kernel/linux`` defines the variables as follows::
4542*4882a593Smuzhiyun
4543*4882a593Smuzhiyun         LINUX_VERSION ?= "3.4.24"
4544*4882a593Smuzhiyun
4545*4882a593Smuzhiyun      The :term:`LINUX_VERSION` variable is used to define :term:`PV`
4546*4882a593Smuzhiyun      for the recipe::
4547*4882a593Smuzhiyun
4548*4882a593Smuzhiyun         PV = "${LINUX_VERSION}+git${SRCPV}"
4549*4882a593Smuzhiyun
4550*4882a593Smuzhiyun   :term:`LINUX_VERSION_EXTENSION`
4551*4882a593Smuzhiyun      A string extension compiled into the version string of the Linux
4552*4882a593Smuzhiyun      kernel built with the OpenEmbedded build system. You define this
4553*4882a593Smuzhiyun      variable in the kernel recipe. For example, the linux-yocto kernel
4554*4882a593Smuzhiyun      recipes all define the variable as follows::
4555*4882a593Smuzhiyun
4556*4882a593Smuzhiyun         LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
4557*4882a593Smuzhiyun
4558*4882a593Smuzhiyun      Defining this variable essentially sets the Linux kernel
4559*4882a593Smuzhiyun      configuration item ``CONFIG_LOCALVERSION``, which is visible through
4560*4882a593Smuzhiyun      the ``uname`` command. Here is an example that shows the extension
4561*4882a593Smuzhiyun      assuming it was set as previously shown::
4562*4882a593Smuzhiyun
4563*4882a593Smuzhiyun         $ uname -r
4564*4882a593Smuzhiyun         3.7.0-rc8-custom
4565*4882a593Smuzhiyun
4566*4882a593Smuzhiyun   :term:`LOG_DIR`
4567*4882a593Smuzhiyun      Specifies the directory to which the OpenEmbedded build system writes
4568*4882a593Smuzhiyun      overall log files. The default directory is ``${TMPDIR}/log``.
4569*4882a593Smuzhiyun
4570*4882a593Smuzhiyun      For the directory containing logs specific to each task, see the
4571*4882a593Smuzhiyun      :term:`T` variable.
4572*4882a593Smuzhiyun
4573*4882a593Smuzhiyun   :term:`MACHINE`
4574*4882a593Smuzhiyun      Specifies the target device for which the image is built. You define
4575*4882a593Smuzhiyun      :term:`MACHINE` in the ``local.conf`` file found in the
4576*4882a593Smuzhiyun      :term:`Build Directory`. By default, :term:`MACHINE` is set to
4577*4882a593Smuzhiyun      "qemux86", which is an x86-based architecture machine to be emulated
4578*4882a593Smuzhiyun      using QEMU::
4579*4882a593Smuzhiyun
4580*4882a593Smuzhiyun         MACHINE ?= "qemux86"
4581*4882a593Smuzhiyun
4582*4882a593Smuzhiyun      The variable corresponds to a machine configuration file of the same
4583*4882a593Smuzhiyun      name, through which machine-specific configurations are set. Thus,
4584*4882a593Smuzhiyun      when :term:`MACHINE` is set to "qemux86", the corresponding
4585*4882a593Smuzhiyun      ``qemux86.conf`` machine configuration file can be found in
4586*4882a593Smuzhiyun      the :term:`Source Directory` in
4587*4882a593Smuzhiyun      ``meta/conf/machine``.
4588*4882a593Smuzhiyun
4589*4882a593Smuzhiyun      The list of machines supported by the Yocto Project as shipped
4590*4882a593Smuzhiyun      include the following::
4591*4882a593Smuzhiyun
4592*4882a593Smuzhiyun         MACHINE ?= "qemuarm"
4593*4882a593Smuzhiyun         MACHINE ?= "qemuarm64"
4594*4882a593Smuzhiyun         MACHINE ?= "qemumips"
4595*4882a593Smuzhiyun         MACHINE ?= "qemumips64"
4596*4882a593Smuzhiyun         MACHINE ?= "qemuppc"
4597*4882a593Smuzhiyun         MACHINE ?= "qemux86"
4598*4882a593Smuzhiyun         MACHINE ?= "qemux86-64"
4599*4882a593Smuzhiyun         MACHINE ?= "genericx86"
4600*4882a593Smuzhiyun         MACHINE ?= "genericx86-64"
4601*4882a593Smuzhiyun         MACHINE ?= "beaglebone"
4602*4882a593Smuzhiyun         MACHINE ?= "edgerouter"
4603*4882a593Smuzhiyun
4604*4882a593Smuzhiyun      The last five are Yocto Project reference hardware
4605*4882a593Smuzhiyun      boards, which are provided in the ``meta-yocto-bsp`` layer.
4606*4882a593Smuzhiyun
4607*4882a593Smuzhiyun      .. note::
4608*4882a593Smuzhiyun
4609*4882a593Smuzhiyun         Adding additional Board Support Package (BSP) layers to your
4610*4882a593Smuzhiyun         configuration adds new possible settings for :term:`MACHINE`.
4611*4882a593Smuzhiyun
4612*4882a593Smuzhiyun   :term:`MACHINE_ARCH`
4613*4882a593Smuzhiyun      Specifies the name of the machine-specific architecture. This
4614*4882a593Smuzhiyun      variable is set automatically from :term:`MACHINE` or
4615*4882a593Smuzhiyun      :term:`TUNE_PKGARCH`. You should not hand-edit
4616*4882a593Smuzhiyun      the :term:`MACHINE_ARCH` variable.
4617*4882a593Smuzhiyun
4618*4882a593Smuzhiyun   :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
4619*4882a593Smuzhiyun      A list of required machine-specific packages to install as part of
4620*4882a593Smuzhiyun      the image being built. The build process depends on these packages
4621*4882a593Smuzhiyun      being present. Furthermore, because this is a "machine-essential"
4622*4882a593Smuzhiyun      variable, the list of packages are essential for the machine to boot.
4623*4882a593Smuzhiyun      The impact of this variable affects images based on
4624*4882a593Smuzhiyun      ``packagegroup-core-boot``, including the ``core-image-minimal``
4625*4882a593Smuzhiyun      image.
4626*4882a593Smuzhiyun
4627*4882a593Smuzhiyun      This variable is similar to the
4628*4882a593Smuzhiyun      :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` variable with the exception
4629*4882a593Smuzhiyun      that the image being built has a build dependency on the variable's
4630*4882a593Smuzhiyun      list of packages. In other words, the image will not build if a file
4631*4882a593Smuzhiyun      in this list is not found.
4632*4882a593Smuzhiyun
4633*4882a593Smuzhiyun      As an example, suppose the machine for which you are building
4634*4882a593Smuzhiyun      requires ``example-init`` to be run during boot to initialize the
4635*4882a593Smuzhiyun      hardware. In this case, you would use the following in the machine's
4636*4882a593Smuzhiyun      ``.conf`` configuration file::
4637*4882a593Smuzhiyun
4638*4882a593Smuzhiyun         MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
4639*4882a593Smuzhiyun
4640*4882a593Smuzhiyun   :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
4641*4882a593Smuzhiyun      A list of recommended machine-specific packages to install as part of
4642*4882a593Smuzhiyun      the image being built. The build process does not depend on these
4643*4882a593Smuzhiyun      packages being present. However, because this is a
4644*4882a593Smuzhiyun      "machine-essential" variable, the list of packages are essential for
4645*4882a593Smuzhiyun      the machine to boot. The impact of this variable affects images based
4646*4882a593Smuzhiyun      on ``packagegroup-core-boot``, including the ``core-image-minimal``
4647*4882a593Smuzhiyun      image.
4648*4882a593Smuzhiyun
4649*4882a593Smuzhiyun      This variable is similar to the :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
4650*4882a593Smuzhiyun      variable with the exception that the image being built does not have
4651*4882a593Smuzhiyun      a build dependency on the variable's list of packages. In other
4652*4882a593Smuzhiyun      words, the image will still build if a package in this list is not
4653*4882a593Smuzhiyun      found. Typically, this variable is used to handle essential kernel
4654*4882a593Smuzhiyun      modules, whose functionality may be selected to be built into the
4655*4882a593Smuzhiyun      kernel rather than as a module, in which case a package will not be
4656*4882a593Smuzhiyun      produced.
4657*4882a593Smuzhiyun
4658*4882a593Smuzhiyun      Consider an example where you have a custom kernel where a specific
4659*4882a593Smuzhiyun      touchscreen driver is required for the machine to be usable. However,
4660*4882a593Smuzhiyun      the driver can be built as a module or into the kernel depending on
4661*4882a593Smuzhiyun      the kernel configuration. If the driver is built as a module, you
4662*4882a593Smuzhiyun      want it to be installed. But, when the driver is built into the
4663*4882a593Smuzhiyun      kernel, you still want the build to succeed. This variable sets up a
4664*4882a593Smuzhiyun      "recommends" relationship so that in the latter case, the build will
4665*4882a593Smuzhiyun      not fail due to the missing package. To accomplish this, assuming the
4666*4882a593Smuzhiyun      package for the module was called ``kernel-module-ab123``, you would
4667*4882a593Smuzhiyun      use the following in the machine's ``.conf`` configuration file::
4668*4882a593Smuzhiyun
4669*4882a593Smuzhiyun         MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
4670*4882a593Smuzhiyun
4671*4882a593Smuzhiyun      .. note::
4672*4882a593Smuzhiyun
4673*4882a593Smuzhiyun         In this example, the ``kernel-module-ab123`` recipe needs to
4674*4882a593Smuzhiyun         explicitly set its :term:`PACKAGES` variable to ensure that BitBake
4675*4882a593Smuzhiyun         does not use the kernel recipe's :term:`PACKAGES_DYNAMIC` variable to
4676*4882a593Smuzhiyun         satisfy the dependency.
4677*4882a593Smuzhiyun
4678*4882a593Smuzhiyun      Some examples of these machine essentials are flash, screen,
4679*4882a593Smuzhiyun      keyboard, mouse, or touchscreen drivers (depending on the machine).
4680*4882a593Smuzhiyun
4681*4882a593Smuzhiyun   :term:`MACHINE_EXTRA_RDEPENDS`
4682*4882a593Smuzhiyun      A list of machine-specific packages to install as part of the image
4683*4882a593Smuzhiyun      being built that are not essential for the machine to boot. However,
4684*4882a593Smuzhiyun      the build process for more fully-featured images depends on the
4685*4882a593Smuzhiyun      packages being present.
4686*4882a593Smuzhiyun
4687*4882a593Smuzhiyun      This variable affects all images based on ``packagegroup-base``,
4688*4882a593Smuzhiyun      which does not include the ``core-image-minimal`` or
4689*4882a593Smuzhiyun      ``core-image-full-cmdline`` images.
4690*4882a593Smuzhiyun
4691*4882a593Smuzhiyun      The variable is similar to the :term:`MACHINE_EXTRA_RRECOMMENDS` variable
4692*4882a593Smuzhiyun      with the exception that the image being built has a build dependency
4693*4882a593Smuzhiyun      on the variable's list of packages. In other words, the image will
4694*4882a593Smuzhiyun      not build if a file in this list is not found.
4695*4882a593Smuzhiyun
4696*4882a593Smuzhiyun      An example is a machine that has WiFi capability but is not essential
4697*4882a593Smuzhiyun      for the machine to boot the image. However, if you are building a
4698*4882a593Smuzhiyun      more fully-featured image, you want to enable the WiFi. The package
4699*4882a593Smuzhiyun      containing the firmware for the WiFi hardware is always expected to
4700*4882a593Smuzhiyun      exist, so it is acceptable for the build process to depend upon
4701*4882a593Smuzhiyun      finding the package. In this case, assuming the package for the
4702*4882a593Smuzhiyun      firmware was called ``wifidriver-firmware``, you would use the
4703*4882a593Smuzhiyun      following in the ``.conf`` file for the machine::
4704*4882a593Smuzhiyun
4705*4882a593Smuzhiyun         MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
4706*4882a593Smuzhiyun
4707*4882a593Smuzhiyun   :term:`MACHINE_EXTRA_RRECOMMENDS`
4708*4882a593Smuzhiyun      A list of machine-specific packages to install as part of the image
4709*4882a593Smuzhiyun      being built that are not essential for booting the machine. The image
4710*4882a593Smuzhiyun      being built has no build dependency on this list of packages.
4711*4882a593Smuzhiyun
4712*4882a593Smuzhiyun      This variable affects only images based on ``packagegroup-base``,
4713*4882a593Smuzhiyun      which does not include the ``core-image-minimal`` or
4714*4882a593Smuzhiyun      ``core-image-full-cmdline`` images.
4715*4882a593Smuzhiyun
4716*4882a593Smuzhiyun      This variable is similar to the :term:`MACHINE_EXTRA_RDEPENDS` variable
4717*4882a593Smuzhiyun      with the exception that the image being built does not have a build
4718*4882a593Smuzhiyun      dependency on the variable's list of packages. In other words, the
4719*4882a593Smuzhiyun      image will build if a file in this list is not found.
4720*4882a593Smuzhiyun
4721*4882a593Smuzhiyun      An example is a machine that has WiFi capability but is not essential
4722*4882a593Smuzhiyun      For the machine to boot the image. However, if you are building a
4723*4882a593Smuzhiyun      more fully-featured image, you want to enable WiFi. In this case, the
4724*4882a593Smuzhiyun      package containing the WiFi kernel module will not be produced if the
4725*4882a593Smuzhiyun      WiFi driver is built into the kernel, in which case you still want
4726*4882a593Smuzhiyun      the build to succeed instead of failing as a result of the package
4727*4882a593Smuzhiyun      not being found. To accomplish this, assuming the package for the
4728*4882a593Smuzhiyun      module was called ``kernel-module-examplewifi``, you would use the
4729*4882a593Smuzhiyun      following in the ``.conf`` file for the machine::
4730*4882a593Smuzhiyun
4731*4882a593Smuzhiyun         MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
4732*4882a593Smuzhiyun
4733*4882a593Smuzhiyun   :term:`MACHINE_FEATURES`
4734*4882a593Smuzhiyun      Specifies the list of hardware features the
4735*4882a593Smuzhiyun      :term:`MACHINE` is capable of supporting. For related
4736*4882a593Smuzhiyun      information on enabling features, see the
4737*4882a593Smuzhiyun      :term:`DISTRO_FEATURES`,
4738*4882a593Smuzhiyun      :term:`COMBINED_FEATURES`, and
4739*4882a593Smuzhiyun      :term:`IMAGE_FEATURES` variables.
4740*4882a593Smuzhiyun
4741*4882a593Smuzhiyun      For a list of hardware features supported by the Yocto Project as
4742*4882a593Smuzhiyun      shipped, see the ":ref:`ref-features-machine`" section.
4743*4882a593Smuzhiyun
4744*4882a593Smuzhiyun   :term:`MACHINE_FEATURES_BACKFILL`
4745*4882a593Smuzhiyun      Features to be added to :term:`MACHINE_FEATURES` if not also present in
4746*4882a593Smuzhiyun      :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`.
4747*4882a593Smuzhiyun
4748*4882a593Smuzhiyun      This variable is set in the ``meta/conf/bitbake.conf`` file. It is
4749*4882a593Smuzhiyun      not intended to be user-configurable. It is best to just reference
4750*4882a593Smuzhiyun      the variable to see which machine features are being backfilled for
4751*4882a593Smuzhiyun      all machine configurations. See the ":ref:`ref-features-backfill`"
4752*4882a593Smuzhiyun      section for more information.
4753*4882a593Smuzhiyun
4754*4882a593Smuzhiyun   :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED`
4755*4882a593Smuzhiyun      Features from :term:`MACHINE_FEATURES_BACKFILL` that should not be
4756*4882a593Smuzhiyun      backfilled (i.e. added to :term:`MACHINE_FEATURES`) during the build. See
4757*4882a593Smuzhiyun      the ":ref:`ref-features-backfill`" section for more information.
4758*4882a593Smuzhiyun
4759*4882a593Smuzhiyun   :term:`MACHINEOVERRIDES`
4760*4882a593Smuzhiyun      A colon-separated list of overrides that apply to the current
4761*4882a593Smuzhiyun      machine. By default, this list includes the value of
4762*4882a593Smuzhiyun      :term:`MACHINE`.
4763*4882a593Smuzhiyun
4764*4882a593Smuzhiyun      You can extend :term:`MACHINEOVERRIDES` to add extra overrides that
4765*4882a593Smuzhiyun      should apply to a machine. For example, all machines emulated in QEMU
4766*4882a593Smuzhiyun      (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named
4767*4882a593Smuzhiyun      ``meta/conf/machine/include/qemu.inc`` that prepends the following
4768*4882a593Smuzhiyun      override to :term:`MACHINEOVERRIDES`::
4769*4882a593Smuzhiyun
4770*4882a593Smuzhiyun         MACHINEOVERRIDES =. "qemuall:"
4771*4882a593Smuzhiyun
4772*4882a593Smuzhiyun      This
4773*4882a593Smuzhiyun      override allows variables to be overridden for all machines emulated
4774*4882a593Smuzhiyun      in QEMU, like in the following example from the ``connman-conf``
4775*4882a593Smuzhiyun      recipe::
4776*4882a593Smuzhiyun
4777*4882a593Smuzhiyun         SRC_URI:append:qemuall = " file://wired.config \
4778*4882a593Smuzhiyun             file://wired-setup \
4779*4882a593Smuzhiyun             "
4780*4882a593Smuzhiyun
4781*4882a593Smuzhiyun      The underlying mechanism behind
4782*4882a593Smuzhiyun      :term:`MACHINEOVERRIDES` is simply that it is included in the default
4783*4882a593Smuzhiyun      value of :term:`OVERRIDES`.
4784*4882a593Smuzhiyun
4785*4882a593Smuzhiyun   :term:`MAINTAINER`
4786*4882a593Smuzhiyun      The email address of the distribution maintainer.
4787*4882a593Smuzhiyun
4788*4882a593Smuzhiyun   :term:`METADATA_BRANCH`
4789*4882a593Smuzhiyun      The branch currently checked out for the OpenEmbedded-Core layer (path
4790*4882a593Smuzhiyun      determined by :term:`COREBASE`).
4791*4882a593Smuzhiyun
4792*4882a593Smuzhiyun   :term:`METADATA_REVISION`
4793*4882a593Smuzhiyun      The revision currently checked out for the OpenEmbedded-Core layer (path
4794*4882a593Smuzhiyun      determined by :term:`COREBASE`).
4795*4882a593Smuzhiyun
4796*4882a593Smuzhiyun   :term:`MIRRORS`
4797*4882a593Smuzhiyun      Specifies additional paths from which the OpenEmbedded build system
4798*4882a593Smuzhiyun      gets source code. When the build system searches for source code, it
4799*4882a593Smuzhiyun      first tries the local download directory. If that location fails, the
4800*4882a593Smuzhiyun      build system tries locations defined by
4801*4882a593Smuzhiyun      :term:`PREMIRRORS`, the upstream source, and then
4802*4882a593Smuzhiyun      locations specified by :term:`MIRRORS` in that order.
4803*4882a593Smuzhiyun
4804*4882a593Smuzhiyun      Assuming your distribution (:term:`DISTRO`) is "poky",
4805*4882a593Smuzhiyun      the default value for :term:`MIRRORS` is defined in the
4806*4882a593Smuzhiyun      ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
4807*4882a593Smuzhiyun
4808*4882a593Smuzhiyun   :term:`MLPREFIX`
4809*4882a593Smuzhiyun      Specifies a prefix has been added to :term:`PN` to create a
4810*4882a593Smuzhiyun      special version of a recipe or package (i.e. a Multilib version). The
4811*4882a593Smuzhiyun      variable is used in places where the prefix needs to be added to or
4812*4882a593Smuzhiyun      removed from a the name (e.g. the :term:`BPN` variable).
4813*4882a593Smuzhiyun      :term:`MLPREFIX` gets set when a prefix has been added to :term:`PN`.
4814*4882a593Smuzhiyun
4815*4882a593Smuzhiyun      .. note::
4816*4882a593Smuzhiyun
4817*4882a593Smuzhiyun         The "ML" in :term:`MLPREFIX` stands for "MultiLib". This representation is
4818*4882a593Smuzhiyun         historical and comes from a time when ``nativesdk`` was a suffix
4819*4882a593Smuzhiyun         rather than a prefix on the recipe name. When ``nativesdk`` was turned
4820*4882a593Smuzhiyun         into a prefix, it made sense to set :term:`MLPREFIX` for it as well.
4821*4882a593Smuzhiyun
4822*4882a593Smuzhiyun      To help understand when :term:`MLPREFIX` might be needed, consider when
4823*4882a593Smuzhiyun      :term:`BBCLASSEXTEND` is used to provide a
4824*4882a593Smuzhiyun      ``nativesdk`` version of a recipe in addition to the target version.
4825*4882a593Smuzhiyun      If that recipe declares build-time dependencies on tasks in other
4826*4882a593Smuzhiyun      recipes by using :term:`DEPENDS`, then a dependency on
4827*4882a593Smuzhiyun      "foo" will automatically get rewritten to a dependency on
4828*4882a593Smuzhiyun      "nativesdk-foo". However, dependencies like the following will not
4829*4882a593Smuzhiyun      get rewritten automatically::
4830*4882a593Smuzhiyun
4831*4882a593Smuzhiyun         do_foo[depends] += "recipe:do_foo"
4832*4882a593Smuzhiyun
4833*4882a593Smuzhiyun      If you want such a dependency to also get transformed, you can do the
4834*4882a593Smuzhiyun      following::
4835*4882a593Smuzhiyun
4836*4882a593Smuzhiyun         do_foo[depends] += "${MLPREFIX}recipe:do_foo"
4837*4882a593Smuzhiyun
4838*4882a593Smuzhiyun   :term:`module_autoload`
4839*4882a593Smuzhiyun      This variable has been replaced by the :term:`KERNEL_MODULE_AUTOLOAD`
4840*4882a593Smuzhiyun      variable. You should replace all occurrences of :term:`module_autoload`
4841*4882a593Smuzhiyun      with additions to :term:`KERNEL_MODULE_AUTOLOAD`, for example::
4842*4882a593Smuzhiyun
4843*4882a593Smuzhiyun         module_autoload_rfcomm = "rfcomm"
4844*4882a593Smuzhiyun
4845*4882a593Smuzhiyun      should now be replaced with::
4846*4882a593Smuzhiyun
4847*4882a593Smuzhiyun         KERNEL_MODULE_AUTOLOAD += "rfcomm"
4848*4882a593Smuzhiyun
4849*4882a593Smuzhiyun      See the :term:`KERNEL_MODULE_AUTOLOAD` variable for more information.
4850*4882a593Smuzhiyun
4851*4882a593Smuzhiyun   :term:`module_conf`
4852*4882a593Smuzhiyun      Specifies `modprobe.d <https://linux.die.net/man/5/modprobe.d>`_
4853*4882a593Smuzhiyun      syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf``
4854*4882a593Smuzhiyun      file.
4855*4882a593Smuzhiyun
4856*4882a593Smuzhiyun      You can use this variable anywhere that it can be recognized by the
4857*4882a593Smuzhiyun      kernel recipe or out-of-tree kernel module recipe (e.g. a machine
4858*4882a593Smuzhiyun      configuration file, a distribution configuration file, an append file
4859*4882a593Smuzhiyun      for the recipe, or the recipe itself). If you use this variable, you
4860*4882a593Smuzhiyun      must also be sure to list the module name in the
4861*4882a593Smuzhiyun      :term:`KERNEL_MODULE_PROBECONF`
4862*4882a593Smuzhiyun      variable.
4863*4882a593Smuzhiyun
4864*4882a593Smuzhiyun      Here is the general syntax::
4865*4882a593Smuzhiyun
4866*4882a593Smuzhiyun         module_conf_module_name = "modprobe.d-syntax"
4867*4882a593Smuzhiyun
4868*4882a593Smuzhiyun      You must use the kernel module name override.
4869*4882a593Smuzhiyun
4870*4882a593Smuzhiyun      Run ``man modprobe.d`` in the shell to find out more information on
4871*4882a593Smuzhiyun      the exact syntax you want to provide with :term:`module_conf`.
4872*4882a593Smuzhiyun
4873*4882a593Smuzhiyun      Including :term:`module_conf` causes the OpenEmbedded build system to
4874*4882a593Smuzhiyun      populate the ``/etc/modprobe.d/modname.conf`` file with
4875*4882a593Smuzhiyun      ``modprobe.d`` syntax lines. Here is an example that adds the options
4876*4882a593Smuzhiyun      ``arg1`` and ``arg2`` to a module named ``mymodule``::
4877*4882a593Smuzhiyun
4878*4882a593Smuzhiyun         module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
4879*4882a593Smuzhiyun
4880*4882a593Smuzhiyun      For information on how to specify kernel modules to auto-load on
4881*4882a593Smuzhiyun      boot, see the :term:`KERNEL_MODULE_AUTOLOAD` variable.
4882*4882a593Smuzhiyun
4883*4882a593Smuzhiyun   :term:`MODULE_TARBALL_DEPLOY`
4884*4882a593Smuzhiyun      Controls creation of the ``modules-*.tgz`` file. Set this variable to
4885*4882a593Smuzhiyun      "0" to disable creation of this file, which contains all of the
4886*4882a593Smuzhiyun      kernel modules resulting from a kernel build.
4887*4882a593Smuzhiyun
4888*4882a593Smuzhiyun   :term:`MODULE_TARBALL_LINK_NAME`
4889*4882a593Smuzhiyun      The link name of the kernel module tarball. This variable is set in
4890*4882a593Smuzhiyun      the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
4891*4882a593Smuzhiyun
4892*4882a593Smuzhiyun         MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
4893*4882a593Smuzhiyun
4894*4882a593Smuzhiyun      The value
4895*4882a593Smuzhiyun      of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the
4896*4882a593Smuzhiyun      same file, has the following value::
4897*4882a593Smuzhiyun
4898*4882a593Smuzhiyun         KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
4899*4882a593Smuzhiyun
4900*4882a593Smuzhiyun      See the :term:`MACHINE` variable for additional information.
4901*4882a593Smuzhiyun
4902*4882a593Smuzhiyun   :term:`MODULE_TARBALL_NAME`
4903*4882a593Smuzhiyun      The base name of the kernel module tarball. This variable is set in
4904*4882a593Smuzhiyun      the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
4905*4882a593Smuzhiyun
4906*4882a593Smuzhiyun         MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
4907*4882a593Smuzhiyun
4908*4882a593Smuzhiyun      The value of the :term:`KERNEL_ARTIFACT_NAME` variable,
4909*4882a593Smuzhiyun      which is set in the same file, has the following value::
4910*4882a593Smuzhiyun
4911*4882a593Smuzhiyun         KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4912*4882a593Smuzhiyun
4913*4882a593Smuzhiyun   :term:`MULTIMACH_TARGET_SYS`
4914*4882a593Smuzhiyun      Uniquely identifies the type of the target system for which packages
4915*4882a593Smuzhiyun      are being built. This variable allows output for different types of
4916*4882a593Smuzhiyun      target systems to be put into different subdirectories of the same
4917*4882a593Smuzhiyun      output directory.
4918*4882a593Smuzhiyun
4919*4882a593Smuzhiyun      The default value of this variable is::
4920*4882a593Smuzhiyun
4921*4882a593Smuzhiyun         ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
4922*4882a593Smuzhiyun
4923*4882a593Smuzhiyun      Some classes (e.g.
4924*4882a593Smuzhiyun      :ref:`cross-canadian <ref-classes-cross-canadian>`) modify the
4925*4882a593Smuzhiyun      :term:`MULTIMACH_TARGET_SYS` value.
4926*4882a593Smuzhiyun
4927*4882a593Smuzhiyun      See the :term:`STAMP` variable for an example. See the
4928*4882a593Smuzhiyun      :term:`STAGING_DIR_TARGET` variable for more information.
4929*4882a593Smuzhiyun
4930*4882a593Smuzhiyun   :term:`NATIVELSBSTRING`
4931*4882a593Smuzhiyun      A string identifying the host distribution. Strings consist of the
4932*4882a593Smuzhiyun      host distributor ID followed by the release, as reported by the
4933*4882a593Smuzhiyun      ``lsb_release`` tool or as read from ``/etc/lsb-release``. For
4934*4882a593Smuzhiyun      example, when running a build on Ubuntu 12.10, the value is
4935*4882a593Smuzhiyun      "Ubuntu-12.10". If this information is unable to be determined, the
4936*4882a593Smuzhiyun      value resolves to "Unknown".
4937*4882a593Smuzhiyun
4938*4882a593Smuzhiyun      This variable is used by default to isolate native shared state
4939*4882a593Smuzhiyun      packages for different distributions (e.g. to avoid problems with
4940*4882a593Smuzhiyun      ``glibc`` version incompatibilities). Additionally, the variable is
4941*4882a593Smuzhiyun      checked against
4942*4882a593Smuzhiyun      :term:`SANITY_TESTED_DISTROS` if that
4943*4882a593Smuzhiyun      variable is set.
4944*4882a593Smuzhiyun
4945*4882a593Smuzhiyun   :term:`NM`
4946*4882a593Smuzhiyun      The minimal command and arguments to run ``nm``.
4947*4882a593Smuzhiyun
4948*4882a593Smuzhiyun   :term:`NO_GENERIC_LICENSE`
4949*4882a593Smuzhiyun      Avoids QA errors when you use a non-common, non-CLOSED license in a
4950*4882a593Smuzhiyun      recipe. There are packages, such as the linux-firmware package, with many
4951*4882a593Smuzhiyun      licenses that are not in any way common. Also, new licenses are added
4952*4882a593Smuzhiyun      occasionally to avoid introducing a lot of common license files,
4953*4882a593Smuzhiyun      which are only applicable to a specific package.
4954*4882a593Smuzhiyun      :term:`NO_GENERIC_LICENSE` is used to allow copying a license that does
4955*4882a593Smuzhiyun      not exist in common licenses.
4956*4882a593Smuzhiyun
4957*4882a593Smuzhiyun      The following example shows how to add :term:`NO_GENERIC_LICENSE` to a
4958*4882a593Smuzhiyun      recipe::
4959*4882a593Smuzhiyun
4960*4882a593Smuzhiyun         NO_GENERIC_LICENSE[license_name] = "license_file_in_fetched_source"
4961*4882a593Smuzhiyun
4962*4882a593Smuzhiyun      Here is an example that
4963*4882a593Smuzhiyun      uses the ``LICENSE.Abilis.txt`` file as the license from the fetched
4964*4882a593Smuzhiyun      source::
4965*4882a593Smuzhiyun
4966*4882a593Smuzhiyun         NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
4967*4882a593Smuzhiyun
4968*4882a593Smuzhiyun   :term:`NO_RECOMMENDATIONS`
4969*4882a593Smuzhiyun      Prevents installation of all "recommended-only" packages.
4970*4882a593Smuzhiyun      Recommended-only packages are packages installed only through the
4971*4882a593Smuzhiyun      :term:`RRECOMMENDS` variable). Setting the
4972*4882a593Smuzhiyun      :term:`NO_RECOMMENDATIONS` variable to "1" turns this feature on::
4973*4882a593Smuzhiyun
4974*4882a593Smuzhiyun         NO_RECOMMENDATIONS = "1"
4975*4882a593Smuzhiyun
4976*4882a593Smuzhiyun      You can set this variable globally in your ``local.conf`` file or you
4977*4882a593Smuzhiyun      can attach it to a specific image recipe by using the recipe name
4978*4882a593Smuzhiyun      override::
4979*4882a593Smuzhiyun
4980*4882a593Smuzhiyun         NO_RECOMMENDATIONS:pn-target_image = "1"
4981*4882a593Smuzhiyun
4982*4882a593Smuzhiyun      It is important to realize that if you choose to not install packages
4983*4882a593Smuzhiyun      using this variable and some other packages are dependent on them
4984*4882a593Smuzhiyun      (i.e. listed in a recipe's :term:`RDEPENDS`
4985*4882a593Smuzhiyun      variable), the OpenEmbedded build system ignores your request and
4986*4882a593Smuzhiyun      will install the packages to avoid dependency errors.
4987*4882a593Smuzhiyun
4988*4882a593Smuzhiyun      .. note::
4989*4882a593Smuzhiyun
4990*4882a593Smuzhiyun         Some recommended packages might be required for certain system
4991*4882a593Smuzhiyun         functionality, such as kernel modules. It is up to you to add
4992*4882a593Smuzhiyun         packages with the :term:`IMAGE_INSTALL` variable.
4993*4882a593Smuzhiyun
4994*4882a593Smuzhiyun      This variable is only supported when using the IPK and RPM
4995*4882a593Smuzhiyun      packaging backends. DEB is not supported.
4996*4882a593Smuzhiyun
4997*4882a593Smuzhiyun      See the :term:`BAD_RECOMMENDATIONS` and
4998*4882a593Smuzhiyun      the :term:`PACKAGE_EXCLUDE` variables for
4999*4882a593Smuzhiyun      related information.
5000*4882a593Smuzhiyun
5001*4882a593Smuzhiyun   :term:`NOAUTOPACKAGEDEBUG`
5002*4882a593Smuzhiyun      Disables auto package from splitting ``.debug`` files. If a recipe
5003*4882a593Smuzhiyun      requires ``FILES:${PN}-dbg`` to be set manually, the
5004*4882a593Smuzhiyun      :term:`NOAUTOPACKAGEDEBUG` can be defined allowing you to define the
5005*4882a593Smuzhiyun      content of the debug package. For example::
5006*4882a593Smuzhiyun
5007*4882a593Smuzhiyun         NOAUTOPACKAGEDEBUG = "1"
5008*4882a593Smuzhiyun         FILES:${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
5009*4882a593Smuzhiyun         FILES:${PN}-dbg = "/usr/src/debug/"
5010*4882a593Smuzhiyun         FILES:${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
5011*4882a593Smuzhiyun
5012*4882a593Smuzhiyun   :term:`NON_MULTILIB_RECIPES`
5013*4882a593Smuzhiyun      A list of recipes that should not be built for multilib. OE-Core's
5014*4882a593Smuzhiyun      ``multilib.conf`` file defines a reasonable starting point for this
5015*4882a593Smuzhiyun      list with::
5016*4882a593Smuzhiyun
5017*4882a593Smuzhiyun         NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
5018*4882a593Smuzhiyun
5019*4882a593Smuzhiyun   :term:`OBJCOPY`
5020*4882a593Smuzhiyun      The minimal command and arguments to run ``objcopy``.
5021*4882a593Smuzhiyun
5022*4882a593Smuzhiyun   :term:`OBJDUMP`
5023*4882a593Smuzhiyun      The minimal command and arguments to run ``objdump``.
5024*4882a593Smuzhiyun
5025*4882a593Smuzhiyun   :term:`OE_BINCONFIG_EXTRA_MANGLE`
5026*4882a593Smuzhiyun      When inheriting the :ref:`binconfig <ref-classes-binconfig>` class,
5027*4882a593Smuzhiyun      this variable specifies additional arguments passed to the "sed"
5028*4882a593Smuzhiyun      command. The sed command alters any paths in configuration scripts
5029*4882a593Smuzhiyun      that have been set up during compilation. Inheriting this class
5030*4882a593Smuzhiyun      results in all paths in these scripts being changed to point into the
5031*4882a593Smuzhiyun      ``sysroots/`` directory so that all builds that use the script will
5032*4882a593Smuzhiyun      use the correct directories for the cross compiling layout.
5033*4882a593Smuzhiyun
5034*4882a593Smuzhiyun      See the ``meta/classes/binconfig.bbclass`` in the
5035*4882a593Smuzhiyun      :term:`Source Directory` for details on how this class
5036*4882a593Smuzhiyun      applies these additional sed command arguments.
5037*4882a593Smuzhiyun
5038*4882a593Smuzhiyun   :term:`OE_IMPORTS`
5039*4882a593Smuzhiyun      An internal variable used to tell the OpenEmbedded build system what
5040*4882a593Smuzhiyun      Python modules to import for every Python function run by the system.
5041*4882a593Smuzhiyun
5042*4882a593Smuzhiyun      .. note::
5043*4882a593Smuzhiyun
5044*4882a593Smuzhiyun         Do not set this variable. It is for internal use only.
5045*4882a593Smuzhiyun
5046*4882a593Smuzhiyun   :term:`OE_INIT_ENV_SCRIPT`
5047*4882a593Smuzhiyun      The name of the build environment setup script for the purposes of
5048*4882a593Smuzhiyun      setting up the environment within the extensible SDK. The default
5049*4882a593Smuzhiyun      value is "oe-init-build-env".
5050*4882a593Smuzhiyun
5051*4882a593Smuzhiyun      If you use a custom script to set up your build environment, set the
5052*4882a593Smuzhiyun      :term:`OE_INIT_ENV_SCRIPT` variable to its name.
5053*4882a593Smuzhiyun
5054*4882a593Smuzhiyun   :term:`OE_TERMINAL`
5055*4882a593Smuzhiyun      Controls how the OpenEmbedded build system spawns interactive
5056*4882a593Smuzhiyun      terminals on the host development system (e.g. using the BitBake
5057*4882a593Smuzhiyun      command with the ``-c devshell`` command-line option). For more
5058*4882a593Smuzhiyun      information, see the ":ref:`dev-manual/common-tasks:using a development shell`" section in
5059*4882a593Smuzhiyun      the Yocto Project Development Tasks Manual.
5060*4882a593Smuzhiyun
5061*4882a593Smuzhiyun      You can use the following values for the :term:`OE_TERMINAL` variable:
5062*4882a593Smuzhiyun
5063*4882a593Smuzhiyun      - auto
5064*4882a593Smuzhiyun      - gnome
5065*4882a593Smuzhiyun      - xfce
5066*4882a593Smuzhiyun      - rxvt
5067*4882a593Smuzhiyun      - screen
5068*4882a593Smuzhiyun      - konsole
5069*4882a593Smuzhiyun      - none
5070*4882a593Smuzhiyun
5071*4882a593Smuzhiyun   :term:`OEROOT`
5072*4882a593Smuzhiyun      The directory from which the top-level build environment setup script
5073*4882a593Smuzhiyun      is sourced. The Yocto Project provides a top-level build environment
5074*4882a593Smuzhiyun      setup script: :ref:`structure-core-script`. When you run this
5075*4882a593Smuzhiyun      script, the :term:`OEROOT` variable resolves to the directory that
5076*4882a593Smuzhiyun      contains the script.
5077*4882a593Smuzhiyun
5078*4882a593Smuzhiyun      For additional information on how this variable is used, see the
5079*4882a593Smuzhiyun      initialization script.
5080*4882a593Smuzhiyun
5081*4882a593Smuzhiyun   :term:`OLDEST_KERNEL`
5082*4882a593Smuzhiyun      Declares the oldest version of the Linux kernel that the produced
5083*4882a593Smuzhiyun      binaries must support. This variable is passed into the build of the
5084*4882a593Smuzhiyun      Embedded GNU C Library (``glibc``).
5085*4882a593Smuzhiyun
5086*4882a593Smuzhiyun      The default for this variable comes from the
5087*4882a593Smuzhiyun      ``meta/conf/bitbake.conf`` configuration file. You can override this
5088*4882a593Smuzhiyun      default by setting the variable in a custom distribution
5089*4882a593Smuzhiyun      configuration file.
5090*4882a593Smuzhiyun
5091*4882a593Smuzhiyun   :term:`OVERRIDES`
5092*4882a593Smuzhiyun      A colon-separated list of overrides that currently apply. Overrides
5093*4882a593Smuzhiyun      are a BitBake mechanism that allows variables to be selectively
5094*4882a593Smuzhiyun      overridden at the end of parsing. The set of overrides in
5095*4882a593Smuzhiyun      :term:`OVERRIDES` represents the "state" during building, which includes
5096*4882a593Smuzhiyun      the current recipe being built, the machine for which it is being
5097*4882a593Smuzhiyun      built, and so forth.
5098*4882a593Smuzhiyun
5099*4882a593Smuzhiyun      As an example, if the string "an-override" appears as an element in
5100*4882a593Smuzhiyun      the colon-separated list in :term:`OVERRIDES`, then the following
5101*4882a593Smuzhiyun      assignment will override ``FOO`` with the value "overridden" at the
5102*4882a593Smuzhiyun      end of parsing::
5103*4882a593Smuzhiyun
5104*4882a593Smuzhiyun         FOO:an-override = "overridden"
5105*4882a593Smuzhiyun
5106*4882a593Smuzhiyun      See the
5107*4882a593Smuzhiyun      ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax (overrides)`"
5108*4882a593Smuzhiyun      section in the BitBake User Manual for more information on the
5109*4882a593Smuzhiyun      overrides mechanism.
5110*4882a593Smuzhiyun
5111*4882a593Smuzhiyun      The default value of :term:`OVERRIDES` includes the values of the
5112*4882a593Smuzhiyun      :term:`CLASSOVERRIDE`,
5113*4882a593Smuzhiyun      :term:`MACHINEOVERRIDES`, and
5114*4882a593Smuzhiyun      :term:`DISTROOVERRIDES` variables. Another
5115*4882a593Smuzhiyun      important override included by default is ``pn-${PN}``. This override
5116*4882a593Smuzhiyun      allows variables to be set for a single recipe within configuration
5117*4882a593Smuzhiyun      (``.conf``) files. Here is an example::
5118*4882a593Smuzhiyun
5119*4882a593Smuzhiyun         FOO:pn-myrecipe = "myrecipe-specific value"
5120*4882a593Smuzhiyun
5121*4882a593Smuzhiyun      .. note::
5122*4882a593Smuzhiyun
5123*4882a593Smuzhiyun         An easy way to see what overrides apply is to search for :term:`OVERRIDES`
5124*4882a593Smuzhiyun         in the output of the ``bitbake -e`` command. See the
5125*4882a593Smuzhiyun         ":ref:`dev-manual/common-tasks:viewing variable values`" section in the Yocto
5126*4882a593Smuzhiyun         Project Development Tasks Manual for more information.
5127*4882a593Smuzhiyun
5128*4882a593Smuzhiyun   :term:`P`
5129*4882a593Smuzhiyun      The recipe name and version. :term:`P` is comprised of the following::
5130*4882a593Smuzhiyun
5131*4882a593Smuzhiyun         ${PN}-${PV}
5132*4882a593Smuzhiyun
5133*4882a593Smuzhiyun   :term:`PACKAGE_ADD_METADATA`
5134*4882a593Smuzhiyun      This variable defines additional metadata to add to packages.
5135*4882a593Smuzhiyun
5136*4882a593Smuzhiyun      You may find you need to inject additional metadata into packages.
5137*4882a593Smuzhiyun      This variable allows you to do that by setting the injected data as
5138*4882a593Smuzhiyun      the value. Multiple fields can be added by splitting the content with
5139*4882a593Smuzhiyun      the literal separator "\n".
5140*4882a593Smuzhiyun
5141*4882a593Smuzhiyun      The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable
5142*4882a593Smuzhiyun      to do package type specific settings. It can also be made package
5143*4882a593Smuzhiyun      specific by using the package name as a suffix.
5144*4882a593Smuzhiyun
5145*4882a593Smuzhiyun      You can find out more about applying this variable in the
5146*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:adding custom metadata to packages`"
5147*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
5148*4882a593Smuzhiyun
5149*4882a593Smuzhiyun   :term:`PACKAGE_ARCH`
5150*4882a593Smuzhiyun      The architecture of the resulting package or packages.
5151*4882a593Smuzhiyun
5152*4882a593Smuzhiyun      By default, the value of this variable is set to
5153*4882a593Smuzhiyun      :term:`TUNE_PKGARCH` when building for the
5154*4882a593Smuzhiyun      target, :term:`BUILD_ARCH` when building for the
5155*4882a593Smuzhiyun      build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the
5156*4882a593Smuzhiyun      SDK.
5157*4882a593Smuzhiyun
5158*4882a593Smuzhiyun      .. note::
5159*4882a593Smuzhiyun
5160*4882a593Smuzhiyun         See :term:`SDK_ARCH` for more information.
5161*4882a593Smuzhiyun
5162*4882a593Smuzhiyun      However, if your recipe's output packages are built specific to the
5163*4882a593Smuzhiyun      target machine rather than generally for the architecture of the
5164*4882a593Smuzhiyun      machine, you should set :term:`PACKAGE_ARCH` to the value of
5165*4882a593Smuzhiyun      :term:`MACHINE_ARCH` in the recipe as follows::
5166*4882a593Smuzhiyun
5167*4882a593Smuzhiyun         PACKAGE_ARCH = "${MACHINE_ARCH}"
5168*4882a593Smuzhiyun
5169*4882a593Smuzhiyun   :term:`PACKAGE_ARCHS`
5170*4882a593Smuzhiyun      Specifies a list of architectures compatible with the target machine.
5171*4882a593Smuzhiyun      This variable is set automatically and should not normally be
5172*4882a593Smuzhiyun      hand-edited. Entries are separated using spaces and listed in order
5173*4882a593Smuzhiyun      of priority. The default value for :term:`PACKAGE_ARCHS` is "all any
5174*4882a593Smuzhiyun      noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
5175*4882a593Smuzhiyun
5176*4882a593Smuzhiyun   :term:`PACKAGE_BEFORE_PN`
5177*4882a593Smuzhiyun      Enables easily adding packages to :term:`PACKAGES` before ``${PN}`` so
5178*4882a593Smuzhiyun      that those added packages can pick up files that would normally be
5179*4882a593Smuzhiyun      included in the default package.
5180*4882a593Smuzhiyun
5181*4882a593Smuzhiyun   :term:`PACKAGE_CLASSES`
5182*4882a593Smuzhiyun      This variable, which is set in the ``local.conf`` configuration file
5183*4882a593Smuzhiyun      found in the ``conf`` folder of the
5184*4882a593Smuzhiyun      :term:`Build Directory`, specifies the package manager the
5185*4882a593Smuzhiyun      OpenEmbedded build system uses when packaging data.
5186*4882a593Smuzhiyun
5187*4882a593Smuzhiyun      You can provide one or more of the following arguments for the
5188*4882a593Smuzhiyun      variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk
5189*4882a593Smuzhiyun      package_tar"
5190*4882a593Smuzhiyun
5191*4882a593Smuzhiyun      .. note::
5192*4882a593Smuzhiyun
5193*4882a593Smuzhiyun         While it is a legal option, the ``package_tar``
5194*4882a593Smuzhiyun         class has limited functionality due to no support for package
5195*4882a593Smuzhiyun         dependencies by that backend. Therefore, it is recommended that
5196*4882a593Smuzhiyun         you do not use it.
5197*4882a593Smuzhiyun
5198*4882a593Smuzhiyun      The build system uses only the first argument in the list as the
5199*4882a593Smuzhiyun      package manager when creating your image or SDK. However, packages
5200*4882a593Smuzhiyun      will be created using any additional packaging classes you specify.
5201*4882a593Smuzhiyun      For example, if you use the following in your ``local.conf`` file::
5202*4882a593Smuzhiyun
5203*4882a593Smuzhiyun         PACKAGE_CLASSES ?= "package_ipk"
5204*4882a593Smuzhiyun
5205*4882a593Smuzhiyun      The OpenEmbedded build system uses
5206*4882a593Smuzhiyun      the IPK package manager to create your image or SDK.
5207*4882a593Smuzhiyun
5208*4882a593Smuzhiyun      For information on packaging and build performance effects as a
5209*4882a593Smuzhiyun      result of the package manager in use, see the
5210*4882a593Smuzhiyun      ":ref:`ref-classes-package`" section.
5211*4882a593Smuzhiyun
5212*4882a593Smuzhiyun   :term:`PACKAGE_DEBUG_SPLIT_STYLE`
5213*4882a593Smuzhiyun      Determines how to split up and package debug and source information
5214*4882a593Smuzhiyun      when creating debugging packages to be used with the GNU Project
5215*4882a593Smuzhiyun      Debugger (GDB). In general, based on the value of this variable,
5216*4882a593Smuzhiyun      you can combine the source and debug info in a single package,
5217*4882a593Smuzhiyun      you can break out the source into a separate package that can be
5218*4882a593Smuzhiyun      installed independently, or you can choose to not have the source
5219*4882a593Smuzhiyun      packaged at all.
5220*4882a593Smuzhiyun
5221*4882a593Smuzhiyun      The possible values of :term:`PACKAGE_DEBUG_SPLIT_STYLE` variable:
5222*4882a593Smuzhiyun
5223*4882a593Smuzhiyun      -  "``.debug``": All debugging and source info is placed in a single
5224*4882a593Smuzhiyun         ``*-dbg`` package; debug symbol files are placed next to the
5225*4882a593Smuzhiyun         binary in a ``.debug`` directory so that, if a binary is installed
5226*4882a593Smuzhiyun         into ``/bin``, the corresponding debug symbol file is installed
5227*4882a593Smuzhiyun         in ``/bin/.debug``. Source files are installed in the same ``*-dbg``
5228*4882a593Smuzhiyun         package under ``/usr/src/debug``.
5229*4882a593Smuzhiyun
5230*4882a593Smuzhiyun      -  "``debug-file-directory``": As above, all debugging and source info
5231*4882a593Smuzhiyun         is placed in a single ``*-dbg`` package; debug symbol files are
5232*4882a593Smuzhiyun         placed entirely under the directory ``/usr/lib/debug`` and separated
5233*4882a593Smuzhiyun         by the path from where the binary is installed, so that if a binary
5234*4882a593Smuzhiyun         is installed in ``/bin``, the corresponding debug symbols are installed
5235*4882a593Smuzhiyun         in ``/usr/lib/debug/bin``, and so on. As above, source is installed
5236*4882a593Smuzhiyun         in the same package under ``/usr/src/debug``.
5237*4882a593Smuzhiyun
5238*4882a593Smuzhiyun      -  "``debug-with-srcpkg``": Debugging info is placed in the standard
5239*4882a593Smuzhiyun         ``*-dbg`` package as with the ``.debug`` value, while source is
5240*4882a593Smuzhiyun         placed in a separate ``*-src`` package, which can be installed
5241*4882a593Smuzhiyun         independently.  This is the default setting for this variable,
5242*4882a593Smuzhiyun         as defined in Poky's ``bitbake.conf`` file.
5243*4882a593Smuzhiyun
5244*4882a593Smuzhiyun      -  "``debug-without-src``": The same behavior as with the ``.debug``
5245*4882a593Smuzhiyun         setting, but no source is packaged at all.
5246*4882a593Smuzhiyun
5247*4882a593Smuzhiyun      .. note::
5248*4882a593Smuzhiyun
5249*4882a593Smuzhiyun         Much of the above package splitting can be overridden via
5250*4882a593Smuzhiyun         use of the :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` variable.
5251*4882a593Smuzhiyun
5252*4882a593Smuzhiyun      You can find out more about debugging using GDB by reading the
5253*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:debugging with the gnu project debugger (gdb) remotely`" section
5254*4882a593Smuzhiyun      in the Yocto Project Development Tasks Manual.
5255*4882a593Smuzhiyun
5256*4882a593Smuzhiyun   :term:`PACKAGE_EXCLUDE`
5257*4882a593Smuzhiyun      Lists packages that should not be installed into an image. For
5258*4882a593Smuzhiyun      example::
5259*4882a593Smuzhiyun
5260*4882a593Smuzhiyun         PACKAGE_EXCLUDE = "package_name package_name package_name ..."
5261*4882a593Smuzhiyun
5262*4882a593Smuzhiyun      You can set this variable globally in your ``local.conf`` file or you
5263*4882a593Smuzhiyun      can attach it to a specific image recipe by using the recipe name
5264*4882a593Smuzhiyun      override::
5265*4882a593Smuzhiyun
5266*4882a593Smuzhiyun         PACKAGE_EXCLUDE:pn-target_image = "package_name"
5267*4882a593Smuzhiyun
5268*4882a593Smuzhiyun      If you choose to not install a package using this variable and some
5269*4882a593Smuzhiyun      other package is dependent on it (i.e. listed in a recipe's
5270*4882a593Smuzhiyun      :term:`RDEPENDS` variable), the OpenEmbedded build
5271*4882a593Smuzhiyun      system generates a fatal installation error. Because the build system
5272*4882a593Smuzhiyun      halts the process with a fatal error, you can use the variable with
5273*4882a593Smuzhiyun      an iterative development process to remove specific components from a
5274*4882a593Smuzhiyun      system.
5275*4882a593Smuzhiyun
5276*4882a593Smuzhiyun      This variable is supported only when using the IPK and RPM
5277*4882a593Smuzhiyun      packaging backends. DEB is not supported.
5278*4882a593Smuzhiyun
5279*4882a593Smuzhiyun      See the :term:`NO_RECOMMENDATIONS` and the
5280*4882a593Smuzhiyun      :term:`BAD_RECOMMENDATIONS` variables for
5281*4882a593Smuzhiyun      related information.
5282*4882a593Smuzhiyun
5283*4882a593Smuzhiyun   :term:`PACKAGE_EXCLUDE_COMPLEMENTARY`
5284*4882a593Smuzhiyun      Prevents specific packages from being installed when you are
5285*4882a593Smuzhiyun      installing complementary packages.
5286*4882a593Smuzhiyun
5287*4882a593Smuzhiyun      You might find that you want to prevent installing certain packages
5288*4882a593Smuzhiyun      when you are installing complementary packages. For example, if you
5289*4882a593Smuzhiyun      are using :term:`IMAGE_FEATURES` to install
5290*4882a593Smuzhiyun      ``dev-pkgs``, you might not want to install all packages from a
5291*4882a593Smuzhiyun      particular multilib. If you find yourself in this situation, you can
5292*4882a593Smuzhiyun      use the :term:`PACKAGE_EXCLUDE_COMPLEMENTARY` variable to specify regular
5293*4882a593Smuzhiyun      expressions to match the packages you want to exclude.
5294*4882a593Smuzhiyun
5295*4882a593Smuzhiyun   :term:`PACKAGE_EXTRA_ARCHS`
5296*4882a593Smuzhiyun      Specifies the list of architectures compatible with the device CPU.
5297*4882a593Smuzhiyun      This variable is useful when you build for several different devices
5298*4882a593Smuzhiyun      that use miscellaneous processors such as XScale and ARM926-EJS.
5299*4882a593Smuzhiyun
5300*4882a593Smuzhiyun   :term:`PACKAGE_FEED_ARCHS`
5301*4882a593Smuzhiyun      Optionally specifies the package architectures used as part of the
5302*4882a593Smuzhiyun      package feed URIs during the build. When used, the
5303*4882a593Smuzhiyun      :term:`PACKAGE_FEED_ARCHS` variable is appended to the final package feed
5304*4882a593Smuzhiyun      URI, which is constructed using the
5305*4882a593Smuzhiyun      :term:`PACKAGE_FEED_URIS` and
5306*4882a593Smuzhiyun      :term:`PACKAGE_FEED_BASE_PATHS`
5307*4882a593Smuzhiyun      variables.
5308*4882a593Smuzhiyun
5309*4882a593Smuzhiyun      .. note::
5310*4882a593Smuzhiyun
5311*4882a593Smuzhiyun         You can use the :term:`PACKAGE_FEED_ARCHS`
5312*4882a593Smuzhiyun         variable to allow specific package architectures. If you do
5313*4882a593Smuzhiyun         not need to allow specific architectures, which is a common
5314*4882a593Smuzhiyun         case, you can omit this variable. Omitting the variable results in
5315*4882a593Smuzhiyun         all available architectures for the current machine being included
5316*4882a593Smuzhiyun         into remote package feeds.
5317*4882a593Smuzhiyun
5318*4882a593Smuzhiyun      Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5319*4882a593Smuzhiyun      :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
5320*4882a593Smuzhiyun      defined in your ``local.conf`` file::
5321*4882a593Smuzhiyun
5322*4882a593Smuzhiyun         PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5323*4882a593Smuzhiyun                              https://example.com/packagerepos/updates"
5324*4882a593Smuzhiyun         PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5325*4882a593Smuzhiyun         PACKAGE_FEED_ARCHS = "all core2-64"
5326*4882a593Smuzhiyun
5327*4882a593Smuzhiyun      Given these settings, the resulting package feeds are as follows:
5328*4882a593Smuzhiyun
5329*4882a593Smuzhiyun      .. code-block:: none
5330*4882a593Smuzhiyun
5331*4882a593Smuzhiyun         https://example.com/packagerepos/release/rpm/all
5332*4882a593Smuzhiyun         https://example.com/packagerepos/release/rpm/core2-64
5333*4882a593Smuzhiyun         https://example.com/packagerepos/release/rpm-dev/all
5334*4882a593Smuzhiyun         https://example.com/packagerepos/release/rpm-dev/core2-64
5335*4882a593Smuzhiyun         https://example.com/packagerepos/updates/rpm/all
5336*4882a593Smuzhiyun         https://example.com/packagerepos/updates/rpm/core2-64
5337*4882a593Smuzhiyun         https://example.com/packagerepos/updates/rpm-dev/all
5338*4882a593Smuzhiyun         https://example.com/packagerepos/updates/rpm-dev/core2-64
5339*4882a593Smuzhiyun
5340*4882a593Smuzhiyun   :term:`PACKAGE_FEED_BASE_PATHS`
5341*4882a593Smuzhiyun      Specifies the base path used when constructing package feed URIs. The
5342*4882a593Smuzhiyun      :term:`PACKAGE_FEED_BASE_PATHS` variable makes up the middle portion of a
5343*4882a593Smuzhiyun      package feed URI used by the OpenEmbedded build system. The base path
5344*4882a593Smuzhiyun      lies between the :term:`PACKAGE_FEED_URIS`
5345*4882a593Smuzhiyun      and :term:`PACKAGE_FEED_ARCHS` variables.
5346*4882a593Smuzhiyun
5347*4882a593Smuzhiyun      Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5348*4882a593Smuzhiyun      :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
5349*4882a593Smuzhiyun      defined in your ``local.conf`` file::
5350*4882a593Smuzhiyun
5351*4882a593Smuzhiyun         PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5352*4882a593Smuzhiyun                              https://example.com/packagerepos/updates"
5353*4882a593Smuzhiyun         PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5354*4882a593Smuzhiyun         PACKAGE_FEED_ARCHS = "all core2-64"
5355*4882a593Smuzhiyun
5356*4882a593Smuzhiyun      Given these settings, the resulting package feeds are as follows:
5357*4882a593Smuzhiyun
5358*4882a593Smuzhiyun      .. code-block:: none
5359*4882a593Smuzhiyun
5360*4882a593Smuzhiyun         https://example.com/packagerepos/release/rpm/all
5361*4882a593Smuzhiyun         https://example.com/packagerepos/release/rpm/core2-64
5362*4882a593Smuzhiyun         https://example.com/packagerepos/release/rpm-dev/all
5363*4882a593Smuzhiyun         https://example.com/packagerepos/release/rpm-dev/core2-64
5364*4882a593Smuzhiyun         https://example.com/packagerepos/updates/rpm/all
5365*4882a593Smuzhiyun         https://example.com/packagerepos/updates/rpm/core2-64
5366*4882a593Smuzhiyun         https://example.com/packagerepos/updates/rpm-dev/all
5367*4882a593Smuzhiyun         https://example.com/packagerepos/updates/rpm-dev/core2-64
5368*4882a593Smuzhiyun
5369*4882a593Smuzhiyun   :term:`PACKAGE_FEED_URIS`
5370*4882a593Smuzhiyun      Specifies the front portion of the package feed URI used by the
5371*4882a593Smuzhiyun      OpenEmbedded build system. Each final package feed URI is comprised
5372*4882a593Smuzhiyun      of :term:`PACKAGE_FEED_URIS`,
5373*4882a593Smuzhiyun      :term:`PACKAGE_FEED_BASE_PATHS`, and
5374*4882a593Smuzhiyun      :term:`PACKAGE_FEED_ARCHS` variables.
5375*4882a593Smuzhiyun
5376*4882a593Smuzhiyun      Consider the following example where the :term:`PACKAGE_FEED_URIS`,
5377*4882a593Smuzhiyun      :term:`PACKAGE_FEED_BASE_PATHS`, and :term:`PACKAGE_FEED_ARCHS` variables are
5378*4882a593Smuzhiyun      defined in your ``local.conf`` file::
5379*4882a593Smuzhiyun
5380*4882a593Smuzhiyun         PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
5381*4882a593Smuzhiyun                              https://example.com/packagerepos/updates"
5382*4882a593Smuzhiyun         PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
5383*4882a593Smuzhiyun         PACKAGE_FEED_ARCHS = "all core2-64"
5384*4882a593Smuzhiyun
5385*4882a593Smuzhiyun      Given these settings, the resulting package feeds are as follows:
5386*4882a593Smuzhiyun
5387*4882a593Smuzhiyun      .. code-block:: none
5388*4882a593Smuzhiyun
5389*4882a593Smuzhiyun         https://example.com/packagerepos/release/rpm/all
5390*4882a593Smuzhiyun         https://example.com/packagerepos/release/rpm/core2-64
5391*4882a593Smuzhiyun         https://example.com/packagerepos/release/rpm-dev/all
5392*4882a593Smuzhiyun         https://example.com/packagerepos/release/rpm-dev/core2-64
5393*4882a593Smuzhiyun         https://example.com/packagerepos/updates/rpm/all
5394*4882a593Smuzhiyun         https://example.com/packagerepos/updates/rpm/core2-64
5395*4882a593Smuzhiyun         https://example.com/packagerepos/updates/rpm-dev/all
5396*4882a593Smuzhiyun         https://example.com/packagerepos/updates/rpm-dev/core2-64
5397*4882a593Smuzhiyun
5398*4882a593Smuzhiyun   :term:`PACKAGE_INSTALL`
5399*4882a593Smuzhiyun      The final list of packages passed to the package manager for
5400*4882a593Smuzhiyun      installation into the image.
5401*4882a593Smuzhiyun
5402*4882a593Smuzhiyun      Because the package manager controls actual installation of all
5403*4882a593Smuzhiyun      packages, the list of packages passed using :term:`PACKAGE_INSTALL` is
5404*4882a593Smuzhiyun      not the final list of packages that are actually installed. This
5405*4882a593Smuzhiyun      variable is internal to the image construction code. Consequently, in
5406*4882a593Smuzhiyun      general, you should use the
5407*4882a593Smuzhiyun      :term:`IMAGE_INSTALL` variable to specify
5408*4882a593Smuzhiyun      packages for installation. The exception to this is when working with
5409*4882a593Smuzhiyun      the :ref:`core-image-minimal-initramfs <ref-manual/images:images>`
5410*4882a593Smuzhiyun      image. When working with an initial RAM filesystem (initramfs) image,
5411*4882a593Smuzhiyun      use the :term:`PACKAGE_INSTALL` variable. For information on creating an
5412*4882a593Smuzhiyun      initramfs, see the ":ref:`dev-manual/common-tasks:building an initial ram filesystem (initramfs) image`" section
5413*4882a593Smuzhiyun      in the Yocto Project Development Tasks Manual.
5414*4882a593Smuzhiyun
5415*4882a593Smuzhiyun   :term:`PACKAGE_INSTALL_ATTEMPTONLY`
5416*4882a593Smuzhiyun      Specifies a list of packages the OpenEmbedded build system attempts
5417*4882a593Smuzhiyun      to install when creating an image. If a listed package fails to
5418*4882a593Smuzhiyun      install, the build system does not generate an error. This variable
5419*4882a593Smuzhiyun      is generally not user-defined.
5420*4882a593Smuzhiyun
5421*4882a593Smuzhiyun   :term:`PACKAGE_PREPROCESS_FUNCS`
5422*4882a593Smuzhiyun      Specifies a list of functions run to pre-process the
5423*4882a593Smuzhiyun      :term:`PKGD` directory prior to splitting the files out
5424*4882a593Smuzhiyun      to individual packages.
5425*4882a593Smuzhiyun
5426*4882a593Smuzhiyun   :term:`PACKAGE_WRITE_DEPS`
5427*4882a593Smuzhiyun      Specifies a list of dependencies for post-installation and
5428*4882a593Smuzhiyun      pre-installation scripts on native/cross tools. If your
5429*4882a593Smuzhiyun      post-installation or pre-installation script can execute at root filesystem
5430*4882a593Smuzhiyun      creation time rather than on the target but depends on a native tool
5431*4882a593Smuzhiyun      in order to execute, you need to list the tools in
5432*4882a593Smuzhiyun      :term:`PACKAGE_WRITE_DEPS`.
5433*4882a593Smuzhiyun
5434*4882a593Smuzhiyun      For information on running post-installation scripts, see the
5435*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:post-installation scripts`"
5436*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
5437*4882a593Smuzhiyun
5438*4882a593Smuzhiyun   :term:`PACKAGECONFIG`
5439*4882a593Smuzhiyun      This variable provides a means of enabling or disabling features of a
5440*4882a593Smuzhiyun      recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in
5441*4882a593Smuzhiyun      recipes when you specify features and then arguments that define
5442*4882a593Smuzhiyun      feature behaviors. Here is the basic block structure (broken over
5443*4882a593Smuzhiyun      multiple lines for readability)::
5444*4882a593Smuzhiyun
5445*4882a593Smuzhiyun         PACKAGECONFIG ??= "f1 f2 f3 ..."
5446*4882a593Smuzhiyun         PACKAGECONFIG[f1] = "\
5447*4882a593Smuzhiyun             --with-f1, \
5448*4882a593Smuzhiyun             --without-f1, \
5449*4882a593Smuzhiyun             build-deps-for-f1, \
5450*4882a593Smuzhiyun             runtime-deps-for-f1, \
5451*4882a593Smuzhiyun             runtime-recommends-for-f1, \
5452*4882a593Smuzhiyun             packageconfig-conflicts-for-f1"
5453*4882a593Smuzhiyun         PACKAGECONFIG[f2] = "\
5454*4882a593Smuzhiyun              ... and so on and so on ...
5455*4882a593Smuzhiyun
5456*4882a593Smuzhiyun      The :term:`PACKAGECONFIG` variable itself specifies a space-separated
5457*4882a593Smuzhiyun      list of the features to enable. Following the features, you can
5458*4882a593Smuzhiyun      determine the behavior of each feature by providing up to six
5459*4882a593Smuzhiyun      order-dependent arguments, which are separated by commas. You can
5460*4882a593Smuzhiyun      omit any argument you like but must retain the separating commas. The
5461*4882a593Smuzhiyun      order is important and specifies the following:
5462*4882a593Smuzhiyun
5463*4882a593Smuzhiyun      1. Extra arguments that should be added to the configure script
5464*4882a593Smuzhiyun         argument list (:term:`EXTRA_OECONF` or
5465*4882a593Smuzhiyun         :term:`PACKAGECONFIG_CONFARGS`) if
5466*4882a593Smuzhiyun         the feature is enabled.
5467*4882a593Smuzhiyun
5468*4882a593Smuzhiyun      2. Extra arguments that should be added to :term:`EXTRA_OECONF` or
5469*4882a593Smuzhiyun         :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled.
5470*4882a593Smuzhiyun
5471*4882a593Smuzhiyun      3. Additional build dependencies (:term:`DEPENDS`)
5472*4882a593Smuzhiyun         that should be added if the feature is enabled.
5473*4882a593Smuzhiyun
5474*4882a593Smuzhiyun      4. Additional runtime dependencies (:term:`RDEPENDS`)
5475*4882a593Smuzhiyun         that should be added if the feature is enabled.
5476*4882a593Smuzhiyun
5477*4882a593Smuzhiyun      5. Additional runtime recommendations
5478*4882a593Smuzhiyun         (:term:`RRECOMMENDS`) that should be added if
5479*4882a593Smuzhiyun         the feature is enabled.
5480*4882a593Smuzhiyun
5481*4882a593Smuzhiyun      6. Any conflicting (that is, mutually exclusive) :term:`PACKAGECONFIG`
5482*4882a593Smuzhiyun         settings for this feature.
5483*4882a593Smuzhiyun
5484*4882a593Smuzhiyun      Consider the following :term:`PACKAGECONFIG` block taken from the
5485*4882a593Smuzhiyun      ``librsvg`` recipe. In this example the feature is ``gtk``, which has
5486*4882a593Smuzhiyun      three arguments that determine the feature's behavior.
5487*4882a593Smuzhiyun      ::
5488*4882a593Smuzhiyun
5489*4882a593Smuzhiyun         PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
5490*4882a593Smuzhiyun
5491*4882a593Smuzhiyun      The
5492*4882a593Smuzhiyun      ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is
5493*4882a593Smuzhiyun      enabled. In this case, ``--with-gtk3`` is added to the configure
5494*4882a593Smuzhiyun      script argument list and ``gtk+3`` is added to :term:`DEPENDS`. On the
5495*4882a593Smuzhiyun      other hand, if the feature is disabled say through a ``.bbappend``
5496*4882a593Smuzhiyun      file in another layer, then the second argument ``--without-gtk3`` is
5497*4882a593Smuzhiyun      added to the configure script instead.
5498*4882a593Smuzhiyun
5499*4882a593Smuzhiyun      The basic :term:`PACKAGECONFIG` structure previously described holds true
5500*4882a593Smuzhiyun      regardless of whether you are creating a block or changing a block.
5501*4882a593Smuzhiyun      When creating a block, use the structure inside your recipe.
5502*4882a593Smuzhiyun
5503*4882a593Smuzhiyun      If you want to change an existing :term:`PACKAGECONFIG` block, you can do
5504*4882a593Smuzhiyun      so one of two ways:
5505*4882a593Smuzhiyun
5506*4882a593Smuzhiyun      -  *Append file:* Create an append file named
5507*4882a593Smuzhiyun         ``recipename.bbappend`` in your layer and override the value of
5508*4882a593Smuzhiyun         :term:`PACKAGECONFIG`. You can either completely override the
5509*4882a593Smuzhiyun         variable::
5510*4882a593Smuzhiyun
5511*4882a593Smuzhiyun            PACKAGECONFIG = "f4 f5"
5512*4882a593Smuzhiyun
5513*4882a593Smuzhiyun         Or, you can just append the variable::
5514*4882a593Smuzhiyun
5515*4882a593Smuzhiyun            PACKAGECONFIG:append = " f4"
5516*4882a593Smuzhiyun
5517*4882a593Smuzhiyun      -  *Configuration file:* This method is identical to changing the
5518*4882a593Smuzhiyun         block through an append file except you edit your ``local.conf``
5519*4882a593Smuzhiyun         or ``mydistro.conf`` file. As with append files previously
5520*4882a593Smuzhiyun         described, you can either completely override the variable::
5521*4882a593Smuzhiyun
5522*4882a593Smuzhiyun            PACKAGECONFIG:pn-recipename = "f4 f5"
5523*4882a593Smuzhiyun
5524*4882a593Smuzhiyun         Or, you can just amend the variable::
5525*4882a593Smuzhiyun
5526*4882a593Smuzhiyun            PACKAGECONFIG:append:pn-recipename = " f4"
5527*4882a593Smuzhiyun
5528*4882a593Smuzhiyun   :term:`PACKAGECONFIG_CONFARGS`
5529*4882a593Smuzhiyun      A space-separated list of configuration options generated from the
5530*4882a593Smuzhiyun      :term:`PACKAGECONFIG` setting.
5531*4882a593Smuzhiyun
5532*4882a593Smuzhiyun      Classes such as :ref:`autotools <ref-classes-autotools>` and
5533*4882a593Smuzhiyun      :ref:`cmake <ref-classes-cmake>` use :term:`PACKAGECONFIG_CONFARGS` to
5534*4882a593Smuzhiyun      pass :term:`PACKAGECONFIG` options to ``configure`` and ``cmake``,
5535*4882a593Smuzhiyun      respectively. If you are using :term:`PACKAGECONFIG` but not a class that
5536*4882a593Smuzhiyun      handles the ``do_configure`` task, then you need to use
5537*4882a593Smuzhiyun      :term:`PACKAGECONFIG_CONFARGS` appropriately.
5538*4882a593Smuzhiyun
5539*4882a593Smuzhiyun   :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY`
5540*4882a593Smuzhiyun      For recipes inheriting the
5541*4882a593Smuzhiyun      :ref:`packagegroup <ref-classes-packagegroup>` class, setting
5542*4882a593Smuzhiyun      :term:`PACKAGEGROUP_DISABLE_COMPLEMENTARY` to "1" specifies that the
5543*4882a593Smuzhiyun      normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth)
5544*4882a593Smuzhiyun      should not be automatically created by the ``packagegroup`` recipe,
5545*4882a593Smuzhiyun      which is the default behavior.
5546*4882a593Smuzhiyun
5547*4882a593Smuzhiyun   :term:`PACKAGES`
5548*4882a593Smuzhiyun      The list of packages the recipe creates. The default value is the
5549*4882a593Smuzhiyun      following::
5550*4882a593Smuzhiyun
5551*4882a593Smuzhiyun         ${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
5552*4882a593Smuzhiyun
5553*4882a593Smuzhiyun      During packaging, the :ref:`ref-tasks-package` task
5554*4882a593Smuzhiyun      goes through :term:`PACKAGES` and uses the :term:`FILES`
5555*4882a593Smuzhiyun      variable corresponding to each package to assign files to the
5556*4882a593Smuzhiyun      package. If a file matches the :term:`FILES` variable for more than one
5557*4882a593Smuzhiyun      package in :term:`PACKAGES`, it will be assigned to the earliest
5558*4882a593Smuzhiyun      (leftmost) package.
5559*4882a593Smuzhiyun
5560*4882a593Smuzhiyun      Packages in the variable's list that are empty (i.e. where none of
5561*4882a593Smuzhiyun      the patterns in ``FILES:``\ pkg match any files installed by the
5562*4882a593Smuzhiyun      :ref:`ref-tasks-install` task) are not generated,
5563*4882a593Smuzhiyun      unless generation is forced through the
5564*4882a593Smuzhiyun      :term:`ALLOW_EMPTY` variable.
5565*4882a593Smuzhiyun
5566*4882a593Smuzhiyun   :term:`PACKAGES_DYNAMIC`
5567*4882a593Smuzhiyun      A promise that your recipe satisfies runtime dependencies for
5568*4882a593Smuzhiyun      optional modules that are found in other recipes.
5569*4882a593Smuzhiyun      :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it
5570*4882a593Smuzhiyun      only states that they should be satisfied. For example, if a hard,
5571*4882a593Smuzhiyun      runtime dependency (:term:`RDEPENDS`) of another
5572*4882a593Smuzhiyun      package is satisfied at build time through the :term:`PACKAGES_DYNAMIC`
5573*4882a593Smuzhiyun      variable, but a package with the module name is never actually
5574*4882a593Smuzhiyun      produced, then the other package will be broken. Thus, if you attempt
5575*4882a593Smuzhiyun      to include that package in an image, you will get a dependency
5576*4882a593Smuzhiyun      failure from the packaging system during the
5577*4882a593Smuzhiyun      :ref:`ref-tasks-rootfs` task.
5578*4882a593Smuzhiyun
5579*4882a593Smuzhiyun      Typically, if there is a chance that such a situation can occur and
5580*4882a593Smuzhiyun      the package that is not created is valid without the dependency being
5581*4882a593Smuzhiyun      satisfied, then you should use :term:`RRECOMMENDS`
5582*4882a593Smuzhiyun      (a soft runtime dependency) instead of :term:`RDEPENDS`.
5583*4882a593Smuzhiyun
5584*4882a593Smuzhiyun      For an example of how to use the :term:`PACKAGES_DYNAMIC` variable when
5585*4882a593Smuzhiyun      you are splitting packages, see the
5586*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:handling optional module packaging`"
5587*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
5588*4882a593Smuzhiyun
5589*4882a593Smuzhiyun   :term:`PACKAGESPLITFUNCS`
5590*4882a593Smuzhiyun      Specifies a list of functions run to perform additional splitting of
5591*4882a593Smuzhiyun      files into individual packages. Recipes can either prepend to this
5592*4882a593Smuzhiyun      variable or prepend to the ``populate_packages`` function in order to
5593*4882a593Smuzhiyun      perform additional package splitting. In either case, the function
5594*4882a593Smuzhiyun      should set :term:`PACKAGES`,
5595*4882a593Smuzhiyun      :term:`FILES`, :term:`RDEPENDS` and
5596*4882a593Smuzhiyun      other packaging variables appropriately in order to perform the
5597*4882a593Smuzhiyun      desired splitting.
5598*4882a593Smuzhiyun
5599*4882a593Smuzhiyun   :term:`PARALLEL_MAKE`
5600*4882a593Smuzhiyun      Extra options passed to the ``make`` command during the
5601*4882a593Smuzhiyun      :ref:`ref-tasks-compile` task in order to specify
5602*4882a593Smuzhiyun      parallel compilation on the local build host. This variable is
5603*4882a593Smuzhiyun      usually in the form "-j x", where x represents the maximum number of
5604*4882a593Smuzhiyun      parallel threads ``make`` can run.
5605*4882a593Smuzhiyun
5606*4882a593Smuzhiyun      .. note::
5607*4882a593Smuzhiyun
5608*4882a593Smuzhiyun         In order for :term:`PARALLEL_MAKE` to be effective, ``make`` must be
5609*4882a593Smuzhiyun         called with ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy way to ensure
5610*4882a593Smuzhiyun         this is to use the ``oe_runmake`` function.
5611*4882a593Smuzhiyun
5612*4882a593Smuzhiyun      By default, the OpenEmbedded build system automatically sets this
5613*4882a593Smuzhiyun      variable to be equal to the number of cores the build system uses.
5614*4882a593Smuzhiyun
5615*4882a593Smuzhiyun      .. note::
5616*4882a593Smuzhiyun
5617*4882a593Smuzhiyun         If the software being built experiences dependency issues during
5618*4882a593Smuzhiyun         the ``do_compile`` task that result in race conditions, you can clear
5619*4882a593Smuzhiyun         the :term:`PARALLEL_MAKE` variable within the recipe as a workaround. For
5620*4882a593Smuzhiyun         information on addressing race conditions, see the
5621*4882a593Smuzhiyun         ":ref:`dev-manual/common-tasks:debugging parallel make races`"
5622*4882a593Smuzhiyun         section in the Yocto Project Development Tasks Manual.
5623*4882a593Smuzhiyun
5624*4882a593Smuzhiyun      For single socket systems (i.e. one CPU), you should not have to
5625*4882a593Smuzhiyun      override this variable to gain optimal parallelism during builds.
5626*4882a593Smuzhiyun      However, if you have very large systems that employ multiple physical
5627*4882a593Smuzhiyun      CPUs, you might want to make sure the :term:`PARALLEL_MAKE` variable is
5628*4882a593Smuzhiyun      not set higher than "-j 20".
5629*4882a593Smuzhiyun
5630*4882a593Smuzhiyun      For more information on speeding up builds, see the
5631*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:speeding up a build`"
5632*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
5633*4882a593Smuzhiyun
5634*4882a593Smuzhiyun   :term:`PARALLEL_MAKEINST`
5635*4882a593Smuzhiyun      Extra options passed to the ``make install`` command during the
5636*4882a593Smuzhiyun      :ref:`ref-tasks-install` task in order to specify
5637*4882a593Smuzhiyun      parallel installation. This variable defaults to the value of
5638*4882a593Smuzhiyun      :term:`PARALLEL_MAKE`.
5639*4882a593Smuzhiyun
5640*4882a593Smuzhiyun      .. note::
5641*4882a593Smuzhiyun
5642*4882a593Smuzhiyun         In order for :term:`PARALLEL_MAKEINST` to be effective, ``make`` must
5643*4882a593Smuzhiyun         be called with
5644*4882a593Smuzhiyun         ``${``\ :term:`EXTRA_OEMAKE`\ ``}``. An easy
5645*4882a593Smuzhiyun         way to ensure this is to use the ``oe_runmake`` function.
5646*4882a593Smuzhiyun
5647*4882a593Smuzhiyun         If the software being built experiences dependency issues during
5648*4882a593Smuzhiyun         the ``do_install`` task that result in race conditions, you can
5649*4882a593Smuzhiyun         clear the :term:`PARALLEL_MAKEINST` variable within the recipe as a
5650*4882a593Smuzhiyun         workaround. For information on addressing race conditions, see the
5651*4882a593Smuzhiyun         ":ref:`dev-manual/common-tasks:debugging parallel make races`"
5652*4882a593Smuzhiyun         section in the Yocto Project Development Tasks Manual.
5653*4882a593Smuzhiyun
5654*4882a593Smuzhiyun   :term:`PATCHRESOLVE`
5655*4882a593Smuzhiyun      Determines the action to take when a patch fails. You can set this
5656*4882a593Smuzhiyun      variable to one of two values: "noop" and "user".
5657*4882a593Smuzhiyun
5658*4882a593Smuzhiyun      The default value of "noop" causes the build to simply fail when the
5659*4882a593Smuzhiyun      OpenEmbedded build system cannot successfully apply a patch. Setting
5660*4882a593Smuzhiyun      the value to "user" causes the build system to launch a shell and
5661*4882a593Smuzhiyun      places you in the right location so that you can manually resolve the
5662*4882a593Smuzhiyun      conflicts.
5663*4882a593Smuzhiyun
5664*4882a593Smuzhiyun      Set this variable in your ``local.conf`` file.
5665*4882a593Smuzhiyun
5666*4882a593Smuzhiyun   :term:`PATCHTOOL`
5667*4882a593Smuzhiyun      Specifies the utility used to apply patches for a recipe during the
5668*4882a593Smuzhiyun      :ref:`ref-tasks-patch` task. You can specify one of
5669*4882a593Smuzhiyun      three utilities: "patch", "quilt", or "git". The default utility used
5670*4882a593Smuzhiyun      is "quilt" except for the quilt-native recipe itself. Because the
5671*4882a593Smuzhiyun      quilt tool is not available at the time quilt-native is being
5672*4882a593Smuzhiyun      patched, it uses "patch".
5673*4882a593Smuzhiyun
5674*4882a593Smuzhiyun      If you wish to use an alternative patching tool, set the variable in
5675*4882a593Smuzhiyun      the recipe using one of the following::
5676*4882a593Smuzhiyun
5677*4882a593Smuzhiyun         PATCHTOOL = "patch"
5678*4882a593Smuzhiyun         PATCHTOOL = "quilt"
5679*4882a593Smuzhiyun         PATCHTOOL = "git"
5680*4882a593Smuzhiyun
5681*4882a593Smuzhiyun   :term:`PE`
5682*4882a593Smuzhiyun      The epoch of the recipe. By default, this variable is unset. The
5683*4882a593Smuzhiyun      variable is used to make upgrades possible when the versioning scheme
5684*4882a593Smuzhiyun      changes in some backwards incompatible way.
5685*4882a593Smuzhiyun
5686*4882a593Smuzhiyun      :term:`PE` is the default value of the :term:`PKGE` variable.
5687*4882a593Smuzhiyun
5688*4882a593Smuzhiyun   :term:`PEP517_BUILD_API`
5689*4882a593Smuzhiyun      When used by recipes that inherit the :ref:`python_pep517
5690*4882a593Smuzhiyun      <ref-classes-python_pep517>` class, specifies the entry point to the
5691*4882a593Smuzhiyun      PEP-517 compliant build API (such as ``flit_core.buildapi``).
5692*4882a593Smuzhiyun
5693*4882a593Smuzhiyun   :term:`PEP517_WHEEL_PATH`
5694*4882a593Smuzhiyun      When used by recipes that inherit the
5695*4882a593Smuzhiyun      :ref:`python_pep517 <ref-classes-python_pep517>` class,
5696*4882a593Smuzhiyun      denotes the path to ``dist/`` (short for distribution) where the
5697*4882a593Smuzhiyun      binary archive ``wheel`` is built.
5698*4882a593Smuzhiyun
5699*4882a593Smuzhiyun   :term:`PF`
5700*4882a593Smuzhiyun      Specifies the recipe or package name and includes all version and
5701*4882a593Smuzhiyun      revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and
5702*4882a593Smuzhiyun      ``bash-4.2-r1/``). This variable is comprised of the following:
5703*4882a593Smuzhiyun      ${:term:`PN`}-${:term:`EXTENDPE`}${:term:`PV`}-${:term:`PR`}
5704*4882a593Smuzhiyun
5705*4882a593Smuzhiyun   :term:`PIXBUF_PACKAGES`
5706*4882a593Smuzhiyun      When inheriting the :ref:`pixbufcache <ref-classes-pixbufcache>`
5707*4882a593Smuzhiyun      class, this variable identifies packages that contain the pixbuf
5708*4882a593Smuzhiyun      loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache``
5709*4882a593Smuzhiyun      class assumes that the loaders are in the recipe's main package (i.e.
5710*4882a593Smuzhiyun      ``${``\ :term:`PN`\ ``}``). Use this variable if the
5711*4882a593Smuzhiyun      loaders you need are in a package other than that main package.
5712*4882a593Smuzhiyun
5713*4882a593Smuzhiyun   :term:`PKG`
5714*4882a593Smuzhiyun      The name of the resulting package created by the OpenEmbedded build
5715*4882a593Smuzhiyun      system.
5716*4882a593Smuzhiyun
5717*4882a593Smuzhiyun      .. note::
5718*4882a593Smuzhiyun
5719*4882a593Smuzhiyun         When using the :term:`PKG` variable, you must use a package name override.
5720*4882a593Smuzhiyun
5721*4882a593Smuzhiyun      For example, when the :ref:`debian <ref-classes-debian>` class
5722*4882a593Smuzhiyun      renames the output package, it does so by setting
5723*4882a593Smuzhiyun      ``PKG:packagename``.
5724*4882a593Smuzhiyun
5725*4882a593Smuzhiyun   :term:`PKG_CONFIG_PATH`
5726*4882a593Smuzhiyun      The path to ``pkg-config`` files for the current build context.
5727*4882a593Smuzhiyun      ``pkg-config`` reads this variable from the environment.
5728*4882a593Smuzhiyun
5729*4882a593Smuzhiyun   :term:`PKGD`
5730*4882a593Smuzhiyun      Points to the destination directory for files to be packaged before
5731*4882a593Smuzhiyun      they are split into individual packages. This directory defaults to
5732*4882a593Smuzhiyun      the following::
5733*4882a593Smuzhiyun
5734*4882a593Smuzhiyun         ${WORKDIR}/package
5735*4882a593Smuzhiyun
5736*4882a593Smuzhiyun      Do not change this default.
5737*4882a593Smuzhiyun
5738*4882a593Smuzhiyun   :term:`PKGDATA_DIR`
5739*4882a593Smuzhiyun      Points to a shared, global-state directory that holds data generated
5740*4882a593Smuzhiyun      during the packaging process. During the packaging process, the
5741*4882a593Smuzhiyun      :ref:`ref-tasks-packagedata` task packages data
5742*4882a593Smuzhiyun      for each recipe and installs it into this temporary, shared area.
5743*4882a593Smuzhiyun      This directory defaults to the following, which you should not
5744*4882a593Smuzhiyun      change::
5745*4882a593Smuzhiyun
5746*4882a593Smuzhiyun         ${STAGING_DIR_HOST}/pkgdata
5747*4882a593Smuzhiyun
5748*4882a593Smuzhiyun      For examples of how this data is used, see the
5749*4882a593Smuzhiyun      ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
5750*4882a593Smuzhiyun      section in the Yocto Project Overview and Concepts Manual and the
5751*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:viewing package information with \`\`oe-pkgdata-util\`\``"
5752*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual. For more
5753*4882a593Smuzhiyun      information on the shared, global-state directory, see
5754*4882a593Smuzhiyun      :term:`STAGING_DIR_HOST`.
5755*4882a593Smuzhiyun
5756*4882a593Smuzhiyun   :term:`PKGDEST`
5757*4882a593Smuzhiyun      Points to the parent directory for files to be packaged after they
5758*4882a593Smuzhiyun      have been split into individual packages. This directory defaults to
5759*4882a593Smuzhiyun      the following::
5760*4882a593Smuzhiyun
5761*4882a593Smuzhiyun         ${WORKDIR}/packages-split
5762*4882a593Smuzhiyun
5763*4882a593Smuzhiyun      Under this directory, the build system creates directories for each
5764*4882a593Smuzhiyun      package specified in :term:`PACKAGES`. Do not change
5765*4882a593Smuzhiyun      this default.
5766*4882a593Smuzhiyun
5767*4882a593Smuzhiyun   :term:`PKGDESTWORK`
5768*4882a593Smuzhiyun      Points to a temporary work area where the
5769*4882a593Smuzhiyun      :ref:`ref-tasks-package` task saves package metadata.
5770*4882a593Smuzhiyun      The :term:`PKGDESTWORK` location defaults to the following::
5771*4882a593Smuzhiyun
5772*4882a593Smuzhiyun         ${WORKDIR}/pkgdata
5773*4882a593Smuzhiyun
5774*4882a593Smuzhiyun      Do not change this default.
5775*4882a593Smuzhiyun
5776*4882a593Smuzhiyun      The :ref:`ref-tasks-packagedata` task copies the
5777*4882a593Smuzhiyun      package metadata from :term:`PKGDESTWORK` to
5778*4882a593Smuzhiyun      :term:`PKGDATA_DIR` to make it available globally.
5779*4882a593Smuzhiyun
5780*4882a593Smuzhiyun   :term:`PKGE`
5781*4882a593Smuzhiyun      The epoch of the package(s) built by the recipe. By default, :term:`PKGE`
5782*4882a593Smuzhiyun      is set to :term:`PE`.
5783*4882a593Smuzhiyun
5784*4882a593Smuzhiyun   :term:`PKGR`
5785*4882a593Smuzhiyun      The revision of the package(s) built by the recipe. By default,
5786*4882a593Smuzhiyun      :term:`PKGR` is set to :term:`PR`.
5787*4882a593Smuzhiyun
5788*4882a593Smuzhiyun   :term:`PKGV`
5789*4882a593Smuzhiyun      The version of the package(s) built by the recipe. By default,
5790*4882a593Smuzhiyun      :term:`PKGV` is set to :term:`PV`.
5791*4882a593Smuzhiyun
5792*4882a593Smuzhiyun   :term:`PN`
5793*4882a593Smuzhiyun      This variable can have two separate functions depending on the
5794*4882a593Smuzhiyun      context: a recipe name or a resulting package name.
5795*4882a593Smuzhiyun
5796*4882a593Smuzhiyun      :term:`PN` refers to a recipe name in the context of a file used by the
5797*4882a593Smuzhiyun      OpenEmbedded build system as input to create a package. The name is
5798*4882a593Smuzhiyun      normally extracted from the recipe file name. For example, if the
5799*4882a593Smuzhiyun      recipe is named ``expat_2.0.1.bb``, then the default value of :term:`PN`
5800*4882a593Smuzhiyun      will be "expat".
5801*4882a593Smuzhiyun
5802*4882a593Smuzhiyun      The variable refers to a package name in the context of a file
5803*4882a593Smuzhiyun      created or produced by the OpenEmbedded build system.
5804*4882a593Smuzhiyun
5805*4882a593Smuzhiyun      If applicable, the :term:`PN` variable also contains any special suffix
5806*4882a593Smuzhiyun      or prefix. For example, using ``bash`` to build packages for the
5807*4882a593Smuzhiyun      native machine, :term:`PN` is ``bash-native``. Using ``bash`` to build
5808*4882a593Smuzhiyun      packages for the target and for Multilib, :term:`PN` would be ``bash``
5809*4882a593Smuzhiyun      and ``lib64-bash``, respectively.
5810*4882a593Smuzhiyun
5811*4882a593Smuzhiyun   :term:`POPULATE_SDK_POST_HOST_COMMAND`
5812*4882a593Smuzhiyun      Specifies a list of functions to call once the OpenEmbedded build
5813*4882a593Smuzhiyun      system has created the host part of the SDK. You can specify
5814*4882a593Smuzhiyun      functions separated by semicolons::
5815*4882a593Smuzhiyun
5816*4882a593Smuzhiyun          POPULATE_SDK_POST_HOST_COMMAND += "function; ... "
5817*4882a593Smuzhiyun
5818*4882a593Smuzhiyun      If you need to pass the SDK path to a command within a function, you
5819*4882a593Smuzhiyun      can use ``${SDK_DIR}``, which points to the parent directory used by
5820*4882a593Smuzhiyun      the OpenEmbedded build system when creating SDK output. See the
5821*4882a593Smuzhiyun      :term:`SDK_DIR` variable for more information.
5822*4882a593Smuzhiyun
5823*4882a593Smuzhiyun   :term:`POPULATE_SDK_POST_TARGET_COMMAND`
5824*4882a593Smuzhiyun      Specifies a list of functions to call once the OpenEmbedded build
5825*4882a593Smuzhiyun      system has created the target part of the SDK. You can specify
5826*4882a593Smuzhiyun      functions separated by semicolons::
5827*4882a593Smuzhiyun
5828*4882a593Smuzhiyun         POPULATE_SDK_POST_TARGET_COMMAND += "function; ... "
5829*4882a593Smuzhiyun
5830*4882a593Smuzhiyun      If you need to pass the SDK path to a command within a function, you
5831*4882a593Smuzhiyun      can use ``${SDK_DIR}``, which points to the parent directory used by
5832*4882a593Smuzhiyun      the OpenEmbedded build system when creating SDK output. See the
5833*4882a593Smuzhiyun      :term:`SDK_DIR` variable for more information.
5834*4882a593Smuzhiyun
5835*4882a593Smuzhiyun   :term:`PR`
5836*4882a593Smuzhiyun      The revision of the recipe. The default value for this variable is
5837*4882a593Smuzhiyun      "r0". Subsequent revisions of the recipe conventionally have the
5838*4882a593Smuzhiyun      values "r1", "r2", and so forth. When :term:`PV` increases,
5839*4882a593Smuzhiyun      :term:`PR` is conventionally reset to "r0".
5840*4882a593Smuzhiyun
5841*4882a593Smuzhiyun      .. note::
5842*4882a593Smuzhiyun
5843*4882a593Smuzhiyun         The OpenEmbedded build system does not need the aid of :term:`PR`
5844*4882a593Smuzhiyun         to know when to rebuild a recipe. The build system uses the task
5845*4882a593Smuzhiyun         :ref:`input checksums <overview-manual/concepts:checksums (signatures)>` along with the
5846*4882a593Smuzhiyun         :ref:`stamp <structure-build-tmp-stamps>` and
5847*4882a593Smuzhiyun         :ref:`overview-manual/concepts:shared state cache`
5848*4882a593Smuzhiyun         mechanisms.
5849*4882a593Smuzhiyun
5850*4882a593Smuzhiyun      The :term:`PR` variable primarily becomes significant when a package
5851*4882a593Smuzhiyun      manager dynamically installs packages on an already built image. In
5852*4882a593Smuzhiyun      this case, :term:`PR`, which is the default value of
5853*4882a593Smuzhiyun      :term:`PKGR`, helps the package manager distinguish which
5854*4882a593Smuzhiyun      package is the most recent one in cases where many packages have the
5855*4882a593Smuzhiyun      same :term:`PV` (i.e. :term:`PKGV`). A component having many packages with
5856*4882a593Smuzhiyun      the same :term:`PV` usually means that the packages all install the same
5857*4882a593Smuzhiyun      upstream version, but with later (:term:`PR`) version packages including
5858*4882a593Smuzhiyun      packaging fixes.
5859*4882a593Smuzhiyun
5860*4882a593Smuzhiyun      .. note::
5861*4882a593Smuzhiyun
5862*4882a593Smuzhiyun         :term:`PR` does not need to be increased for changes that do not change the
5863*4882a593Smuzhiyun         package contents or metadata.
5864*4882a593Smuzhiyun
5865*4882a593Smuzhiyun      Because manually managing :term:`PR` can be cumbersome and error-prone,
5866*4882a593Smuzhiyun      an automated solution exists. See the
5867*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:working with a pr service`" section
5868*4882a593Smuzhiyun      in the Yocto Project Development Tasks Manual for more information.
5869*4882a593Smuzhiyun
5870*4882a593Smuzhiyun   :term:`PREFERRED_PROVIDER`
5871*4882a593Smuzhiyun      If multiple recipes provide the same item, this variable determines
5872*4882a593Smuzhiyun      which recipe is preferred and thus provides the item (i.e. the
5873*4882a593Smuzhiyun      preferred provider). You should always suffix this variable with the
5874*4882a593Smuzhiyun      name of the provided item. And, you should define the variable using
5875*4882a593Smuzhiyun      the preferred recipe's name (:term:`PN`). Here is a common
5876*4882a593Smuzhiyun      example::
5877*4882a593Smuzhiyun
5878*4882a593Smuzhiyun         PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
5879*4882a593Smuzhiyun
5880*4882a593Smuzhiyun      In the previous example, multiple recipes are providing "virtual/kernel".
5881*4882a593Smuzhiyun      The :term:`PREFERRED_PROVIDER` variable is set with the name (:term:`PN`) of
5882*4882a593Smuzhiyun      the recipe you prefer to provide "virtual/kernel".
5883*4882a593Smuzhiyun
5884*4882a593Smuzhiyun      Following are more examples::
5885*4882a593Smuzhiyun
5886*4882a593Smuzhiyun         PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
5887*4882a593Smuzhiyun         PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
5888*4882a593Smuzhiyun
5889*4882a593Smuzhiyun      For more
5890*4882a593Smuzhiyun      information, see the ":ref:`dev-manual/common-tasks:using virtual providers`"
5891*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
5892*4882a593Smuzhiyun
5893*4882a593Smuzhiyun      .. note::
5894*4882a593Smuzhiyun
5895*4882a593Smuzhiyun         If you use a ``virtual/\*`` item with :term:`PREFERRED_PROVIDER`, then any
5896*4882a593Smuzhiyun         recipe that :term:`PROVIDES` that item but is not selected (defined)
5897*4882a593Smuzhiyun         by :term:`PREFERRED_PROVIDER` is prevented from building, which is usually
5898*4882a593Smuzhiyun         desirable since this mechanism is designed to select between mutually
5899*4882a593Smuzhiyun         exclusive alternative providers.
5900*4882a593Smuzhiyun
5901*4882a593Smuzhiyun   :term:`PREFERRED_VERSION`
5902*4882a593Smuzhiyun      If there are multiple versions of a recipe available, this variable
5903*4882a593Smuzhiyun      determines which version should be given preference. You must always
5904*4882a593Smuzhiyun      suffix the variable with the :term:`PN` you want to select (`python` in
5905*4882a593Smuzhiyun      the first example below), and you should specify the :term:`PV`
5906*4882a593Smuzhiyun      accordingly (`3.4.0` in the example).
5907*4882a593Smuzhiyun
5908*4882a593Smuzhiyun      The :term:`PREFERRED_VERSION` variable supports limited wildcard use
5909*4882a593Smuzhiyun      through the "``%``" character. You can use the character to match any
5910*4882a593Smuzhiyun      number of characters, which can be useful when specifying versions
5911*4882a593Smuzhiyun      that contain long revision numbers that potentially change. Here are
5912*4882a593Smuzhiyun      two examples::
5913*4882a593Smuzhiyun
5914*4882a593Smuzhiyun         PREFERRED_VERSION_python = "3.4.0"
5915*4882a593Smuzhiyun         PREFERRED_VERSION_linux-yocto = "5.0%"
5916*4882a593Smuzhiyun
5917*4882a593Smuzhiyun      .. note::
5918*4882a593Smuzhiyun
5919*4882a593Smuzhiyun         The use of the "%" character is limited in that it only works at the end of the
5920*4882a593Smuzhiyun         string. You cannot use the wildcard character in any other
5921*4882a593Smuzhiyun         location of the string.
5922*4882a593Smuzhiyun
5923*4882a593Smuzhiyun      The specified version is matched against :term:`PV`, which
5924*4882a593Smuzhiyun      does not necessarily match the version part of the recipe's filename.
5925*4882a593Smuzhiyun      For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb``
5926*4882a593Smuzhiyun      where ``foo_git.bb`` contains the following assignment::
5927*4882a593Smuzhiyun
5928*4882a593Smuzhiyun         PV = "1.1+git${SRCPV}"
5929*4882a593Smuzhiyun
5930*4882a593Smuzhiyun      In this case, the correct way to select
5931*4882a593Smuzhiyun      ``foo_git.bb`` is by using an assignment such as the following::
5932*4882a593Smuzhiyun
5933*4882a593Smuzhiyun         PREFERRED_VERSION_foo = "1.1+git%"
5934*4882a593Smuzhiyun
5935*4882a593Smuzhiyun      Compare that previous example
5936*4882a593Smuzhiyun      against the following incorrect example, which does not work::
5937*4882a593Smuzhiyun
5938*4882a593Smuzhiyun         PREFERRED_VERSION_foo = "git"
5939*4882a593Smuzhiyun
5940*4882a593Smuzhiyun      Sometimes the :term:`PREFERRED_VERSION` variable can be set by
5941*4882a593Smuzhiyun      configuration files in a way that is hard to change. You can use
5942*4882a593Smuzhiyun      :term:`OVERRIDES` to set a machine-specific
5943*4882a593Smuzhiyun      override. Here is an example::
5944*4882a593Smuzhiyun
5945*4882a593Smuzhiyun         PREFERRED_VERSION_linux-yocto:qemux86 = "5.0%"
5946*4882a593Smuzhiyun
5947*4882a593Smuzhiyun      Although not recommended, worst case, you can also use the
5948*4882a593Smuzhiyun      "forcevariable" override, which is the strongest override possible.
5949*4882a593Smuzhiyun      Here is an example::
5950*4882a593Smuzhiyun
5951*4882a593Smuzhiyun         PREFERRED_VERSION_linux-yocto:forcevariable = "5.0%"
5952*4882a593Smuzhiyun
5953*4882a593Smuzhiyun      .. note::
5954*4882a593Smuzhiyun
5955*4882a593Smuzhiyun         The ``:forcevariable`` override is not handled specially. This override
5956*4882a593Smuzhiyun         only works because the default value of :term:`OVERRIDES` includes "forcevariable".
5957*4882a593Smuzhiyun
5958*4882a593Smuzhiyun      If a recipe with the specified version is not available, a warning
5959*4882a593Smuzhiyun      message will be shown. See :term:`REQUIRED_VERSION` if you want this
5960*4882a593Smuzhiyun      to be an error instead.
5961*4882a593Smuzhiyun
5962*4882a593Smuzhiyun   :term:`PREMIRRORS`
5963*4882a593Smuzhiyun      Specifies additional paths from which the OpenEmbedded build system
5964*4882a593Smuzhiyun      gets source code. When the build system searches for source code, it
5965*4882a593Smuzhiyun      first tries the local download directory. If that location fails, the
5966*4882a593Smuzhiyun      build system tries locations defined by :term:`PREMIRRORS`, the upstream
5967*4882a593Smuzhiyun      source, and then locations specified by
5968*4882a593Smuzhiyun      :term:`MIRRORS` in that order.
5969*4882a593Smuzhiyun
5970*4882a593Smuzhiyun      Assuming your distribution (:term:`DISTRO`) is "poky",
5971*4882a593Smuzhiyun      the default value for :term:`PREMIRRORS` is defined in the
5972*4882a593Smuzhiyun      ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
5973*4882a593Smuzhiyun
5974*4882a593Smuzhiyun      Typically, you could add a specific server for the build system to
5975*4882a593Smuzhiyun      attempt before any others by adding something like the following to
5976*4882a593Smuzhiyun      the ``local.conf`` configuration file in the
5977*4882a593Smuzhiyun      :term:`Build Directory`::
5978*4882a593Smuzhiyun
5979*4882a593Smuzhiyun         PREMIRRORS:prepend = "\
5980*4882a593Smuzhiyun             git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
5981*4882a593Smuzhiyun             ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
5982*4882a593Smuzhiyun             http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
5983*4882a593Smuzhiyun             https://.*/.* &YOCTO_DL_URL;/mirror/sources/"
5984*4882a593Smuzhiyun
5985*4882a593Smuzhiyun      These changes cause the
5986*4882a593Smuzhiyun      build system to intercept Git, FTP, HTTP, and HTTPS requests and
5987*4882a593Smuzhiyun      direct them to the ``http://`` sources mirror. You can use
5988*4882a593Smuzhiyun      ``file://`` URLs to point to local directories or network shares as
5989*4882a593Smuzhiyun      well.
5990*4882a593Smuzhiyun
5991*4882a593Smuzhiyun   :term:`PRIORITY`
5992*4882a593Smuzhiyun      Indicates the importance of a package.
5993*4882a593Smuzhiyun
5994*4882a593Smuzhiyun      :term:`PRIORITY` is considered to be part of the distribution policy
5995*4882a593Smuzhiyun      because the importance of any given recipe depends on the purpose for
5996*4882a593Smuzhiyun      which the distribution is being produced. Thus, :term:`PRIORITY` is not
5997*4882a593Smuzhiyun      normally set within recipes.
5998*4882a593Smuzhiyun
5999*4882a593Smuzhiyun      You can set :term:`PRIORITY` to "required", "standard", "extra", and
6000*4882a593Smuzhiyun      "optional", which is the default.
6001*4882a593Smuzhiyun
6002*4882a593Smuzhiyun   :term:`PRIVATE_LIBS`
6003*4882a593Smuzhiyun      Specifies libraries installed within a recipe that should be ignored
6004*4882a593Smuzhiyun      by the OpenEmbedded build system's shared library resolver. This
6005*4882a593Smuzhiyun      variable is typically used when software being built by a recipe has
6006*4882a593Smuzhiyun      its own private versions of a library normally provided by another
6007*4882a593Smuzhiyun      recipe. In this case, you would not want the package containing the
6008*4882a593Smuzhiyun      private libraries to be set as a dependency on other unrelated
6009*4882a593Smuzhiyun      packages that should instead depend on the package providing the
6010*4882a593Smuzhiyun      standard version of the library.
6011*4882a593Smuzhiyun
6012*4882a593Smuzhiyun      Libraries specified in this variable should be specified by their
6013*4882a593Smuzhiyun      file name. For example, from the Firefox recipe in meta-browser::
6014*4882a593Smuzhiyun
6015*4882a593Smuzhiyun         PRIVATE_LIBS = "libmozjs.so \
6016*4882a593Smuzhiyun                         libxpcom.so \
6017*4882a593Smuzhiyun                         libnspr4.so \
6018*4882a593Smuzhiyun                         libxul.so \
6019*4882a593Smuzhiyun                         libmozalloc.so \
6020*4882a593Smuzhiyun                         libplc4.so \
6021*4882a593Smuzhiyun                         libplds4.so"
6022*4882a593Smuzhiyun
6023*4882a593Smuzhiyun      For more information, see the
6024*4882a593Smuzhiyun      ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
6025*4882a593Smuzhiyun      section in the Yocto Project Overview and Concepts Manual.
6026*4882a593Smuzhiyun
6027*4882a593Smuzhiyun   :term:`PROVIDES`
6028*4882a593Smuzhiyun      A list of aliases by which a particular recipe can be known. By
6029*4882a593Smuzhiyun      default, a recipe's own :term:`PN` is implicitly already in its
6030*4882a593Smuzhiyun      :term:`PROVIDES` list and therefore does not need to mention that it
6031*4882a593Smuzhiyun      provides itself. If a recipe uses :term:`PROVIDES`, the additional
6032*4882a593Smuzhiyun      aliases are synonyms for the recipe and can be useful for satisfying
6033*4882a593Smuzhiyun      dependencies of other recipes during the build as specified by
6034*4882a593Smuzhiyun      :term:`DEPENDS`.
6035*4882a593Smuzhiyun
6036*4882a593Smuzhiyun      Consider the following example :term:`PROVIDES` statement from the recipe
6037*4882a593Smuzhiyun      file ``eudev_3.2.9.bb``::
6038*4882a593Smuzhiyun
6039*4882a593Smuzhiyun         PROVIDES += "udev"
6040*4882a593Smuzhiyun
6041*4882a593Smuzhiyun      The :term:`PROVIDES` statement
6042*4882a593Smuzhiyun      results in the "eudev" recipe also being available as simply "udev".
6043*4882a593Smuzhiyun
6044*4882a593Smuzhiyun      .. note::
6045*4882a593Smuzhiyun
6046*4882a593Smuzhiyun         A recipe's own recipe name (:term:`PN`) is always implicitly prepended
6047*4882a593Smuzhiyun         to `PROVIDES`, so while using "+=" in the above example may not be
6048*4882a593Smuzhiyun         strictly necessary it is recommended to avoid confusion.
6049*4882a593Smuzhiyun
6050*4882a593Smuzhiyun      In addition to providing recipes under alternate names, the
6051*4882a593Smuzhiyun      :term:`PROVIDES` mechanism is also used to implement virtual targets. A
6052*4882a593Smuzhiyun      virtual target is a name that corresponds to some particular
6053*4882a593Smuzhiyun      functionality (e.g. a Linux kernel). Recipes that provide the
6054*4882a593Smuzhiyun      functionality in question list the virtual target in :term:`PROVIDES`.
6055*4882a593Smuzhiyun      Recipes that depend on the functionality in question can include the
6056*4882a593Smuzhiyun      virtual target in :term:`DEPENDS` to leave the choice of provider open.
6057*4882a593Smuzhiyun
6058*4882a593Smuzhiyun      Conventionally, virtual targets have names on the form
6059*4882a593Smuzhiyun      "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
6060*4882a593Smuzhiyun      of the name and has no syntactical significance.
6061*4882a593Smuzhiyun
6062*4882a593Smuzhiyun      The :term:`PREFERRED_PROVIDER` variable is
6063*4882a593Smuzhiyun      used to select which particular recipe provides a virtual target.
6064*4882a593Smuzhiyun
6065*4882a593Smuzhiyun      .. note::
6066*4882a593Smuzhiyun
6067*4882a593Smuzhiyun         A corresponding mechanism for virtual runtime dependencies
6068*4882a593Smuzhiyun         (packages) exists. However, the mechanism does not depend on any
6069*4882a593Smuzhiyun         special functionality beyond ordinary variable assignments. For
6070*4882a593Smuzhiyun         example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of
6071*4882a593Smuzhiyun         the component that manages the ``/dev`` directory.
6072*4882a593Smuzhiyun
6073*4882a593Smuzhiyun         Setting the "preferred provider" for runtime dependencies is as
6074*4882a593Smuzhiyun         simple as using the following assignment in a configuration file::
6075*4882a593Smuzhiyun
6076*4882a593Smuzhiyun                 VIRTUAL-RUNTIME_dev_manager = "udev"
6077*4882a593Smuzhiyun
6078*4882a593Smuzhiyun
6079*4882a593Smuzhiyun   :term:`PRSERV_HOST`
6080*4882a593Smuzhiyun      The network based :term:`PR` service host and port.
6081*4882a593Smuzhiyun
6082*4882a593Smuzhiyun      The ``conf/local.conf.sample.extended`` configuration file in the
6083*4882a593Smuzhiyun      :term:`Source Directory` shows how the
6084*4882a593Smuzhiyun      :term:`PRSERV_HOST` variable is set::
6085*4882a593Smuzhiyun
6086*4882a593Smuzhiyun         PRSERV_HOST = "localhost:0"
6087*4882a593Smuzhiyun
6088*4882a593Smuzhiyun      You must
6089*4882a593Smuzhiyun      set the variable if you want to automatically start a local :ref:`PR
6090*4882a593Smuzhiyun      service <dev-manual/common-tasks:working with a pr service>`. You can
6091*4882a593Smuzhiyun      set :term:`PRSERV_HOST` to other values to use a remote PR service.
6092*4882a593Smuzhiyun
6093*4882a593Smuzhiyun
6094*4882a593Smuzhiyun   :term:`PSEUDO_IGNORE_PATHS`
6095*4882a593Smuzhiyun      A comma-separated (without spaces) list of path prefixes that should be ignored
6096*4882a593Smuzhiyun      by pseudo when monitoring and recording file operations, in order to avoid
6097*4882a593Smuzhiyun      problems with files being written to outside of the pseudo context and
6098*4882a593Smuzhiyun      reduce pseudo's overhead. A path is ignored if it matches any prefix in the list
6099*4882a593Smuzhiyun      and can include partial directory (or file) names.
6100*4882a593Smuzhiyun
6101*4882a593Smuzhiyun
6102*4882a593Smuzhiyun   :term:`PTEST_ENABLED`
6103*4882a593Smuzhiyun      Specifies whether or not :ref:`Package
6104*4882a593Smuzhiyun      Test <dev-manual/common-tasks:testing packages with ptest>` (ptest)
6105*4882a593Smuzhiyun      functionality is enabled when building a recipe. You should not set
6106*4882a593Smuzhiyun      this variable directly. Enabling and disabling building Package Tests
6107*4882a593Smuzhiyun      at build time should be done by adding "ptest" to (or removing it
6108*4882a593Smuzhiyun      from) :term:`DISTRO_FEATURES`.
6109*4882a593Smuzhiyun
6110*4882a593Smuzhiyun   :term:`PV`
6111*4882a593Smuzhiyun      The version of the recipe. The version is normally extracted from the
6112*4882a593Smuzhiyun      recipe filename. For example, if the recipe is named
6113*4882a593Smuzhiyun      ``expat_2.0.1.bb``, then the default value of :term:`PV` will be "2.0.1".
6114*4882a593Smuzhiyun      :term:`PV` is generally not overridden within a recipe unless it is
6115*4882a593Smuzhiyun      building an unstable (i.e. development) version from a source code
6116*4882a593Smuzhiyun      repository (e.g. Git or Subversion).
6117*4882a593Smuzhiyun
6118*4882a593Smuzhiyun      :term:`PV` is the default value of the :term:`PKGV` variable.
6119*4882a593Smuzhiyun
6120*4882a593Smuzhiyun   :term:`PYPI_PACKAGE`
6121*4882a593Smuzhiyun      When inheriting the :ref:`pypi <ref-classes-pypi>` class, specifies the
6122*4882a593Smuzhiyun      `PyPI <https://pypi.org/>`__ package name to be built. The default value
6123*4882a593Smuzhiyun      is set based upon :term:`BPN` (stripping any "python-" or "python3-"
6124*4882a593Smuzhiyun      prefix off if present), however for some packages it will need to be set
6125*4882a593Smuzhiyun      explicitly if that will not match the package name (e.g. where the
6126*4882a593Smuzhiyun      package name has a prefix, underscores, uppercase letters etc.)
6127*4882a593Smuzhiyun
6128*4882a593Smuzhiyun   :term:`PYTHON_ABI`
6129*4882a593Smuzhiyun      When used by recipes that inherit the
6130*4882a593Smuzhiyun      :ref:`setuptools3 <ref-classes-setuptools3>` class, denotes the
6131*4882a593Smuzhiyun      Application Binary Interface (ABI) currently in use for Python. By
6132*4882a593Smuzhiyun      default, the ABI is "m". You do not have to set this variable as the
6133*4882a593Smuzhiyun      OpenEmbedded build system sets it for you.
6134*4882a593Smuzhiyun
6135*4882a593Smuzhiyun      The OpenEmbedded build system uses the ABI to construct directory
6136*4882a593Smuzhiyun      names used when installing the Python headers and libraries in
6137*4882a593Smuzhiyun      sysroot (e.g. ``.../python3.3m/...``).
6138*4882a593Smuzhiyun
6139*4882a593Smuzhiyun   :term:`PYTHON_PN`
6140*4882a593Smuzhiyun      When used by recipes that inherit the
6141*4882a593Smuzhiyun      :ref:`setuptools3 <ref-classes-setuptools3>` classe, specifies the
6142*4882a593Smuzhiyun      major Python version being built. For Python 3.x, :term:`PYTHON_PN` would
6143*4882a593Smuzhiyun      be "python3". You do not have to set this variable as the
6144*4882a593Smuzhiyun      OpenEmbedded build system automatically sets it for you.
6145*4882a593Smuzhiyun
6146*4882a593Smuzhiyun      The variable allows recipes to use common infrastructure such as the
6147*4882a593Smuzhiyun      following::
6148*4882a593Smuzhiyun
6149*4882a593Smuzhiyun         DEPENDS += "${PYTHON_PN}-native"
6150*4882a593Smuzhiyun
6151*4882a593Smuzhiyun      In the previous example,
6152*4882a593Smuzhiyun      the version of the dependency is :term:`PYTHON_PN`.
6153*4882a593Smuzhiyun
6154*4882a593Smuzhiyun   :term:`QA_EMPTY_DIRS`
6155*4882a593Smuzhiyun      Specifies a list of directories that are expected to be empty when
6156*4882a593Smuzhiyun      packaging; if ``empty-dirs`` appears in :term:`ERROR_QA` or
6157*4882a593Smuzhiyun      :term:`WARN_QA` these will be checked and an error or warning
6158*4882a593Smuzhiyun      (respectively) will be produced.
6159*4882a593Smuzhiyun
6160*4882a593Smuzhiyun      The default :term:`QA_EMPTY_DIRS` value is set in
6161*4882a593Smuzhiyun      :ref:`insane.bbclass <ref-classes-insane>`.
6162*4882a593Smuzhiyun
6163*4882a593Smuzhiyun   :term:`QA_EMPTY_DIRS_RECOMMENDATION`
6164*4882a593Smuzhiyun      Specifies a recommendation for why a directory must be empty,
6165*4882a593Smuzhiyun      which will be included in the error message if a specific directory
6166*4882a593Smuzhiyun      is found to contain files. Must be overridden with the directory
6167*4882a593Smuzhiyun      path to match on.
6168*4882a593Smuzhiyun
6169*4882a593Smuzhiyun      If no recommendation is specified for a directory, then the default
6170*4882a593Smuzhiyun      "but it is expected to be empty" will be used.
6171*4882a593Smuzhiyun
6172*4882a593Smuzhiyun      An example message shows if files were present in '/dev'::
6173*4882a593Smuzhiyun
6174*4882a593Smuzhiyun         QA_EMPTY_DIRS_RECOMMENDATION:/dev = "but all devices must be created at runtime"
6175*4882a593Smuzhiyun
6176*4882a593Smuzhiyun   :term:`RANLIB`
6177*4882a593Smuzhiyun      The minimal command and arguments to run ``ranlib``.
6178*4882a593Smuzhiyun
6179*4882a593Smuzhiyun   :term:`RCONFLICTS`
6180*4882a593Smuzhiyun      The list of packages that conflict with packages. Note that packages
6181*4882a593Smuzhiyun      will not be installed if conflicting packages are not first removed.
6182*4882a593Smuzhiyun
6183*4882a593Smuzhiyun      Like all package-controlling variables, you must always use them in
6184*4882a593Smuzhiyun      conjunction with a package name override. Here is an example::
6185*4882a593Smuzhiyun
6186*4882a593Smuzhiyun         RCONFLICTS:${PN} = "another_conflicting_package_name"
6187*4882a593Smuzhiyun
6188*4882a593Smuzhiyun      BitBake, which the OpenEmbedded build system uses, supports
6189*4882a593Smuzhiyun      specifying versioned dependencies. Although the syntax varies
6190*4882a593Smuzhiyun      depending on the packaging format, BitBake hides these differences
6191*4882a593Smuzhiyun      from you. Here is the general syntax to specify versions with the
6192*4882a593Smuzhiyun      :term:`RCONFLICTS` variable::
6193*4882a593Smuzhiyun
6194*4882a593Smuzhiyun         RCONFLICTS:${PN} = "package (operator version)"
6195*4882a593Smuzhiyun
6196*4882a593Smuzhiyun      For ``operator``, you can specify the following:
6197*4882a593Smuzhiyun
6198*4882a593Smuzhiyun      - =
6199*4882a593Smuzhiyun      - <
6200*4882a593Smuzhiyun      - >
6201*4882a593Smuzhiyun      - <=
6202*4882a593Smuzhiyun      - >=
6203*4882a593Smuzhiyun
6204*4882a593Smuzhiyun      For example, the following sets up a dependency on version 1.2 or
6205*4882a593Smuzhiyun      greater of the package ``foo``::
6206*4882a593Smuzhiyun
6207*4882a593Smuzhiyun         RCONFLICTS:${PN} = "foo (>= 1.2)"
6208*4882a593Smuzhiyun
6209*4882a593Smuzhiyun   :term:`RDEPENDS`
6210*4882a593Smuzhiyun      Lists runtime dependencies of a package. These dependencies are other
6211*4882a593Smuzhiyun      packages that must be installed in order for the package to function
6212*4882a593Smuzhiyun      correctly. As an example, the following assignment declares that the
6213*4882a593Smuzhiyun      package ``foo`` needs the packages ``bar`` and ``baz`` to be
6214*4882a593Smuzhiyun      installed::
6215*4882a593Smuzhiyun
6216*4882a593Smuzhiyun         RDEPENDS:foo = "bar baz"
6217*4882a593Smuzhiyun
6218*4882a593Smuzhiyun      The most common types of package
6219*4882a593Smuzhiyun      runtime dependencies are automatically detected and added. Therefore,
6220*4882a593Smuzhiyun      most recipes do not need to set :term:`RDEPENDS`. For more information,
6221*4882a593Smuzhiyun      see the
6222*4882a593Smuzhiyun      ":ref:`overview-manual/concepts:automatically added runtime dependencies`"
6223*4882a593Smuzhiyun      section in the Yocto Project Overview and Concepts Manual.
6224*4882a593Smuzhiyun
6225*4882a593Smuzhiyun      The practical effect of the above :term:`RDEPENDS` assignment is that
6226*4882a593Smuzhiyun      ``bar`` and ``baz`` will be declared as dependencies inside the
6227*4882a593Smuzhiyun      package ``foo`` when it is written out by one of the
6228*4882a593Smuzhiyun      :ref:`do_package_write_\* <ref-tasks-package_write_deb>` tasks.
6229*4882a593Smuzhiyun      Exactly how this is done depends on which package format is used,
6230*4882a593Smuzhiyun      which is determined by
6231*4882a593Smuzhiyun      :term:`PACKAGE_CLASSES`. When the
6232*4882a593Smuzhiyun      corresponding package manager installs the package, it will know to
6233*4882a593Smuzhiyun      also install the packages on which it depends.
6234*4882a593Smuzhiyun
6235*4882a593Smuzhiyun      To ensure that the packages ``bar`` and ``baz`` get built, the
6236*4882a593Smuzhiyun      previous :term:`RDEPENDS` assignment also causes a task dependency to be
6237*4882a593Smuzhiyun      added. This dependency is from the recipe's
6238*4882a593Smuzhiyun      :ref:`ref-tasks-build` (not to be confused with
6239*4882a593Smuzhiyun      :ref:`ref-tasks-compile`) task to the
6240*4882a593Smuzhiyun      ``do_package_write_*`` task of the recipes that build ``bar`` and
6241*4882a593Smuzhiyun      ``baz``.
6242*4882a593Smuzhiyun
6243*4882a593Smuzhiyun      The names of the packages you list within :term:`RDEPENDS` must be the
6244*4882a593Smuzhiyun      names of other packages - they cannot be recipe names. Although
6245*4882a593Smuzhiyun      package names and recipe names usually match, the important point
6246*4882a593Smuzhiyun      here is that you are providing package names within the :term:`RDEPENDS`
6247*4882a593Smuzhiyun      variable. For an example of the default list of packages created from
6248*4882a593Smuzhiyun      a recipe, see the :term:`PACKAGES` variable.
6249*4882a593Smuzhiyun
6250*4882a593Smuzhiyun      Because the :term:`RDEPENDS` variable applies to packages being built,
6251*4882a593Smuzhiyun      you should always use the variable in a form with an attached package
6252*4882a593Smuzhiyun      name (remember that a single recipe can build multiple packages). For
6253*4882a593Smuzhiyun      example, suppose you are building a development package that depends
6254*4882a593Smuzhiyun      on the ``perl`` package. In this case, you would use the following
6255*4882a593Smuzhiyun      :term:`RDEPENDS` statement::
6256*4882a593Smuzhiyun
6257*4882a593Smuzhiyun         RDEPENDS:${PN}-dev += "perl"
6258*4882a593Smuzhiyun
6259*4882a593Smuzhiyun      In the example,
6260*4882a593Smuzhiyun      the development package depends on the ``perl`` package. Thus, the
6261*4882a593Smuzhiyun      :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part of
6262*4882a593Smuzhiyun      the variable.
6263*4882a593Smuzhiyun
6264*4882a593Smuzhiyun      .. note::
6265*4882a593Smuzhiyun
6266*4882a593Smuzhiyun         ``RDEPENDS:${PN}-dev`` includes ``${``\ :term:`PN`\ ``}``
6267*4882a593Smuzhiyun         by default. This default is set in the BitBake configuration file
6268*4882a593Smuzhiyun         (``meta/conf/bitbake.conf``). Be careful not to accidentally remove
6269*4882a593Smuzhiyun         ``${PN}`` when modifying ``RDEPENDS:${PN}-dev``. Use the "+=" operator
6270*4882a593Smuzhiyun         rather than the "=" operator.
6271*4882a593Smuzhiyun
6272*4882a593Smuzhiyun      The package names you use with :term:`RDEPENDS` must appear as they would
6273*4882a593Smuzhiyun      in the :term:`PACKAGES` variable. The :term:`PKG` variable
6274*4882a593Smuzhiyun      allows a different name to be used for the final package (e.g. the
6275*4882a593Smuzhiyun      :ref:`debian <ref-classes-debian>` class uses this to rename
6276*4882a593Smuzhiyun      packages), but this final package name cannot be used with
6277*4882a593Smuzhiyun      :term:`RDEPENDS`, which makes sense as :term:`RDEPENDS` is meant to be
6278*4882a593Smuzhiyun      independent of the package format used.
6279*4882a593Smuzhiyun
6280*4882a593Smuzhiyun      BitBake, which the OpenEmbedded build system uses, supports
6281*4882a593Smuzhiyun      specifying versioned dependencies. Although the syntax varies
6282*4882a593Smuzhiyun      depending on the packaging format, BitBake hides these differences
6283*4882a593Smuzhiyun      from you. Here is the general syntax to specify versions with the
6284*4882a593Smuzhiyun      :term:`RDEPENDS` variable::
6285*4882a593Smuzhiyun
6286*4882a593Smuzhiyun         RDEPENDS:${PN} = "package (operator version)"
6287*4882a593Smuzhiyun
6288*4882a593Smuzhiyun      For ``operator``, you can specify the following:
6289*4882a593Smuzhiyun
6290*4882a593Smuzhiyun      - =
6291*4882a593Smuzhiyun      - <
6292*4882a593Smuzhiyun      - >
6293*4882a593Smuzhiyun      - <=
6294*4882a593Smuzhiyun      - >=
6295*4882a593Smuzhiyun
6296*4882a593Smuzhiyun      For version, provide the version number.
6297*4882a593Smuzhiyun
6298*4882a593Smuzhiyun      .. note::
6299*4882a593Smuzhiyun
6300*4882a593Smuzhiyun         You can use :term:`EXTENDPKGV` to provide a full package version
6301*4882a593Smuzhiyun         specification.
6302*4882a593Smuzhiyun
6303*4882a593Smuzhiyun      For example, the following sets up a dependency on version 1.2 or
6304*4882a593Smuzhiyun      greater of the package ``foo``::
6305*4882a593Smuzhiyun
6306*4882a593Smuzhiyun         RDEPENDS:${PN} = "foo (>= 1.2)"
6307*4882a593Smuzhiyun
6308*4882a593Smuzhiyun      For information on build-time dependencies, see the
6309*4882a593Smuzhiyun      :term:`DEPENDS` variable. You can also see the
6310*4882a593Smuzhiyun      ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
6311*4882a593Smuzhiyun      ":ref:`bitbake:bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
6312*4882a593Smuzhiyun      BitBake User Manual for additional information on tasks and
6313*4882a593Smuzhiyun      dependencies.
6314*4882a593Smuzhiyun
6315*4882a593Smuzhiyun   :term:`RECIPE_NO_UPDATE_REASON`
6316*4882a593Smuzhiyun      If a recipe should not be replaced by a more recent upstream version,
6317*4882a593Smuzhiyun      putting the reason why in this variable in a recipe allows
6318*4882a593Smuzhiyun      ``devtool check-upgrade-status`` command to display it, as explained
6319*4882a593Smuzhiyun      in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`"
6320*4882a593Smuzhiyun      section.
6321*4882a593Smuzhiyun
6322*4882a593Smuzhiyun   :term:`REQUIRED_DISTRO_FEATURES`
6323*4882a593Smuzhiyun      When inheriting the
6324*4882a593Smuzhiyun      :ref:`features_check <ref-classes-features_check>`
6325*4882a593Smuzhiyun      class, this variable identifies distribution features that must exist
6326*4882a593Smuzhiyun      in the current configuration in order for the OpenEmbedded build
6327*4882a593Smuzhiyun      system to build the recipe. In other words, if the
6328*4882a593Smuzhiyun      :term:`REQUIRED_DISTRO_FEATURES` variable lists a feature that does not
6329*4882a593Smuzhiyun      appear in :term:`DISTRO_FEATURES` within the current configuration, then
6330*4882a593Smuzhiyun      the recipe will be skipped, and if the build system attempts to build
6331*4882a593Smuzhiyun      the recipe then an error will be triggered.
6332*4882a593Smuzhiyun
6333*4882a593Smuzhiyun   :term:`REQUIRED_VERSION`
6334*4882a593Smuzhiyun      If there are multiple versions of a recipe available, this variable
6335*4882a593Smuzhiyun      determines which version should be given preference.
6336*4882a593Smuzhiyun      :term:`REQUIRED_VERSION` works in exactly the same manner as
6337*4882a593Smuzhiyun      :term:`PREFERRED_VERSION`, except that if the specified version is not
6338*4882a593Smuzhiyun      available then an error message is shown and the build fails
6339*4882a593Smuzhiyun      immediately.
6340*4882a593Smuzhiyun
6341*4882a593Smuzhiyun      If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set
6342*4882a593Smuzhiyun      for the same recipe, the :term:`REQUIRED_VERSION` value applies.
6343*4882a593Smuzhiyun
6344*4882a593Smuzhiyun   :term:`RM_WORK_EXCLUDE`
6345*4882a593Smuzhiyun      With ``rm_work`` enabled, this variable specifies a list of recipes
6346*4882a593Smuzhiyun      whose work directories should not be removed. See the
6347*4882a593Smuzhiyun      ":ref:`ref-classes-rm-work`" section for more
6348*4882a593Smuzhiyun      details.
6349*4882a593Smuzhiyun
6350*4882a593Smuzhiyun   :term:`ROOT_HOME`
6351*4882a593Smuzhiyun      Defines the root home directory. By default, this directory is set as
6352*4882a593Smuzhiyun      follows in the BitBake configuration file::
6353*4882a593Smuzhiyun
6354*4882a593Smuzhiyun         ROOT_HOME ??= "/home/root"
6355*4882a593Smuzhiyun
6356*4882a593Smuzhiyun      .. note::
6357*4882a593Smuzhiyun
6358*4882a593Smuzhiyun         This default value is likely used because some embedded solutions
6359*4882a593Smuzhiyun         prefer to have a read-only root filesystem and prefer to keep
6360*4882a593Smuzhiyun         writeable data in one place.
6361*4882a593Smuzhiyun
6362*4882a593Smuzhiyun      You can override the default by setting the variable in any layer or
6363*4882a593Smuzhiyun      in the ``local.conf`` file. Because the default is set using a "weak"
6364*4882a593Smuzhiyun      assignment (i.e. "??="), you can use either of the following forms to
6365*4882a593Smuzhiyun      define your override::
6366*4882a593Smuzhiyun
6367*4882a593Smuzhiyun         ROOT_HOME = "/root"
6368*4882a593Smuzhiyun         ROOT_HOME ?= "/root"
6369*4882a593Smuzhiyun
6370*4882a593Smuzhiyun      These
6371*4882a593Smuzhiyun      override examples use ``/root``, which is probably the most commonly
6372*4882a593Smuzhiyun      used override.
6373*4882a593Smuzhiyun
6374*4882a593Smuzhiyun   :term:`ROOTFS`
6375*4882a593Smuzhiyun      Indicates a filesystem image to include as the root filesystem.
6376*4882a593Smuzhiyun
6377*4882a593Smuzhiyun      The :term:`ROOTFS` variable is an optional variable used with the
6378*4882a593Smuzhiyun      :ref:`image-live <ref-classes-image-live>` class.
6379*4882a593Smuzhiyun
6380*4882a593Smuzhiyun   :term:`ROOTFS_POSTINSTALL_COMMAND`
6381*4882a593Smuzhiyun      Specifies a list of functions to call after the OpenEmbedded build
6382*4882a593Smuzhiyun      system has installed packages. You can specify functions separated by
6383*4882a593Smuzhiyun      semicolons::
6384*4882a593Smuzhiyun
6385*4882a593Smuzhiyun         ROOTFS_POSTINSTALL_COMMAND += "function; ... "
6386*4882a593Smuzhiyun
6387*4882a593Smuzhiyun      If you need to pass the root filesystem path to a command within a
6388*4882a593Smuzhiyun      function, you can use ``${IMAGE_ROOTFS}``, which points to the
6389*4882a593Smuzhiyun      directory that becomes the root filesystem image. See the
6390*4882a593Smuzhiyun      :term:`IMAGE_ROOTFS` variable for more
6391*4882a593Smuzhiyun      information.
6392*4882a593Smuzhiyun
6393*4882a593Smuzhiyun   :term:`ROOTFS_POSTPROCESS_COMMAND`
6394*4882a593Smuzhiyun      Specifies a list of functions to call once the OpenEmbedded build
6395*4882a593Smuzhiyun      system has created the root filesystem. You can specify functions
6396*4882a593Smuzhiyun      separated by semicolons::
6397*4882a593Smuzhiyun
6398*4882a593Smuzhiyun         ROOTFS_POSTPROCESS_COMMAND += "function; ... "
6399*4882a593Smuzhiyun
6400*4882a593Smuzhiyun      If you need to pass the root filesystem path to a command within a
6401*4882a593Smuzhiyun      function, you can use ``${IMAGE_ROOTFS}``, which points to the
6402*4882a593Smuzhiyun      directory that becomes the root filesystem image. See the
6403*4882a593Smuzhiyun      :term:`IMAGE_ROOTFS` variable for more
6404*4882a593Smuzhiyun      information.
6405*4882a593Smuzhiyun
6406*4882a593Smuzhiyun   :term:`ROOTFS_POSTUNINSTALL_COMMAND`
6407*4882a593Smuzhiyun      Specifies a list of functions to call after the OpenEmbedded build
6408*4882a593Smuzhiyun      system has removed unnecessary packages. When runtime package
6409*4882a593Smuzhiyun      management is disabled in the image, several packages are removed
6410*4882a593Smuzhiyun      including ``base-passwd``, ``shadow``, and ``update-alternatives``.
6411*4882a593Smuzhiyun      You can specify functions separated by semicolons::
6412*4882a593Smuzhiyun
6413*4882a593Smuzhiyun         ROOTFS_POSTUNINSTALL_COMMAND += "function; ... "
6414*4882a593Smuzhiyun
6415*4882a593Smuzhiyun      If you need to pass the root filesystem path to a command within a
6416*4882a593Smuzhiyun      function, you can use ``${IMAGE_ROOTFS}``, which points to the
6417*4882a593Smuzhiyun      directory that becomes the root filesystem image. See the
6418*4882a593Smuzhiyun      :term:`IMAGE_ROOTFS` variable for more
6419*4882a593Smuzhiyun      information.
6420*4882a593Smuzhiyun
6421*4882a593Smuzhiyun   :term:`ROOTFS_PREPROCESS_COMMAND`
6422*4882a593Smuzhiyun      Specifies a list of functions to call before the OpenEmbedded build
6423*4882a593Smuzhiyun      system has created the root filesystem. You can specify functions
6424*4882a593Smuzhiyun      separated by semicolons::
6425*4882a593Smuzhiyun
6426*4882a593Smuzhiyun         ROOTFS_PREPROCESS_COMMAND += "function; ... "
6427*4882a593Smuzhiyun
6428*4882a593Smuzhiyun      If you need to pass the root filesystem path to a command within a
6429*4882a593Smuzhiyun      function, you can use ``${IMAGE_ROOTFS}``, which points to the
6430*4882a593Smuzhiyun      directory that becomes the root filesystem image. See the
6431*4882a593Smuzhiyun      :term:`IMAGE_ROOTFS` variable for more
6432*4882a593Smuzhiyun      information.
6433*4882a593Smuzhiyun
6434*4882a593Smuzhiyun   :term:`RPROVIDES`
6435*4882a593Smuzhiyun      A list of package name aliases that a package also provides. These
6436*4882a593Smuzhiyun      aliases are useful for satisfying runtime dependencies of other
6437*4882a593Smuzhiyun      packages both during the build and on the target (as specified by
6438*4882a593Smuzhiyun      :term:`RDEPENDS`).
6439*4882a593Smuzhiyun
6440*4882a593Smuzhiyun      .. note::
6441*4882a593Smuzhiyun
6442*4882a593Smuzhiyun         A package's own name is implicitly already in its :term:`RPROVIDES` list.
6443*4882a593Smuzhiyun
6444*4882a593Smuzhiyun      As with all package-controlling variables, you must always use the
6445*4882a593Smuzhiyun      variable in conjunction with a package name override. Here is an
6446*4882a593Smuzhiyun      example::
6447*4882a593Smuzhiyun
6448*4882a593Smuzhiyun         RPROVIDES:${PN} = "widget-abi-2"
6449*4882a593Smuzhiyun
6450*4882a593Smuzhiyun   :term:`RRECOMMENDS`
6451*4882a593Smuzhiyun      A list of packages that extends the usability of a package being
6452*4882a593Smuzhiyun      built. The package being built does not depend on this list of
6453*4882a593Smuzhiyun      packages in order to successfully build, but rather uses them for
6454*4882a593Smuzhiyun      extended usability. To specify runtime dependencies for packages, see
6455*4882a593Smuzhiyun      the :term:`RDEPENDS` variable.
6456*4882a593Smuzhiyun
6457*4882a593Smuzhiyun      The package manager will automatically install the :term:`RRECOMMENDS`
6458*4882a593Smuzhiyun      list of packages when installing the built package. However, you can
6459*4882a593Smuzhiyun      prevent listed packages from being installed by using the
6460*4882a593Smuzhiyun      :term:`BAD_RECOMMENDATIONS`,
6461*4882a593Smuzhiyun      :term:`NO_RECOMMENDATIONS`, and
6462*4882a593Smuzhiyun      :term:`PACKAGE_EXCLUDE` variables.
6463*4882a593Smuzhiyun
6464*4882a593Smuzhiyun      Packages specified in :term:`RRECOMMENDS` need not actually be produced.
6465*4882a593Smuzhiyun      However, there must be a recipe providing each package, either
6466*4882a593Smuzhiyun      through the :term:`PACKAGES` or
6467*4882a593Smuzhiyun      :term:`PACKAGES_DYNAMIC` variables or the
6468*4882a593Smuzhiyun      :term:`RPROVIDES` variable, or an error will occur
6469*4882a593Smuzhiyun      during the build. If such a recipe does exist and the package is not
6470*4882a593Smuzhiyun      produced, the build continues without error.
6471*4882a593Smuzhiyun
6472*4882a593Smuzhiyun      Because the :term:`RRECOMMENDS` variable applies to packages being built,
6473*4882a593Smuzhiyun      you should always attach an override to the variable to specify the
6474*4882a593Smuzhiyun      particular package whose usability is being extended. For example,
6475*4882a593Smuzhiyun      suppose you are building a development package that is extended to
6476*4882a593Smuzhiyun      support wireless functionality. In this case, you would use the
6477*4882a593Smuzhiyun      following::
6478*4882a593Smuzhiyun
6479*4882a593Smuzhiyun         RRECOMMENDS:${PN}-dev += "wireless_package_name"
6480*4882a593Smuzhiyun
6481*4882a593Smuzhiyun      In the
6482*4882a593Smuzhiyun      example, the package name (``${PN}-dev``) must appear as it would in
6483*4882a593Smuzhiyun      the :term:`PACKAGES` namespace before any renaming of the output package
6484*4882a593Smuzhiyun      by classes such as :ref:`ref-classes-debian`.
6485*4882a593Smuzhiyun
6486*4882a593Smuzhiyun      BitBake, which the OpenEmbedded build system uses, supports
6487*4882a593Smuzhiyun      specifying versioned recommends. Although the syntax varies depending
6488*4882a593Smuzhiyun      on the packaging format, BitBake hides these differences from you.
6489*4882a593Smuzhiyun      Here is the general syntax to specify versions with the
6490*4882a593Smuzhiyun      :term:`RRECOMMENDS` variable::
6491*4882a593Smuzhiyun
6492*4882a593Smuzhiyun         RRECOMMENDS:${PN} = "package (operator version)"
6493*4882a593Smuzhiyun
6494*4882a593Smuzhiyun      For ``operator``, you can specify the following:
6495*4882a593Smuzhiyun
6496*4882a593Smuzhiyun      - =
6497*4882a593Smuzhiyun      - <
6498*4882a593Smuzhiyun      - >
6499*4882a593Smuzhiyun      - <=
6500*4882a593Smuzhiyun      - >=
6501*4882a593Smuzhiyun
6502*4882a593Smuzhiyun      For example, the following sets up a recommend on version 1.2 or
6503*4882a593Smuzhiyun      greater of the package ``foo``::
6504*4882a593Smuzhiyun
6505*4882a593Smuzhiyun         RRECOMMENDS:${PN} = "foo (>= 1.2)"
6506*4882a593Smuzhiyun
6507*4882a593Smuzhiyun   :term:`RREPLACES`
6508*4882a593Smuzhiyun      A list of packages replaced by a package. The package manager uses
6509*4882a593Smuzhiyun      this variable to determine which package should be installed to
6510*4882a593Smuzhiyun      replace other package(s) during an upgrade. In order to also have the
6511*4882a593Smuzhiyun      other package(s) removed at the same time, you must add the name of
6512*4882a593Smuzhiyun      the other package to the :term:`RCONFLICTS` variable.
6513*4882a593Smuzhiyun
6514*4882a593Smuzhiyun      As with all package-controlling variables, you must use this variable
6515*4882a593Smuzhiyun      in conjunction with a package name override. Here is an example::
6516*4882a593Smuzhiyun
6517*4882a593Smuzhiyun         RREPLACES:${PN} = "other_package_being_replaced"
6518*4882a593Smuzhiyun
6519*4882a593Smuzhiyun      BitBake, which the OpenEmbedded build system uses, supports
6520*4882a593Smuzhiyun      specifying versioned replacements. Although the syntax varies
6521*4882a593Smuzhiyun      depending on the packaging format, BitBake hides these differences
6522*4882a593Smuzhiyun      from you. Here is the general syntax to specify versions with the
6523*4882a593Smuzhiyun      :term:`RREPLACES` variable::
6524*4882a593Smuzhiyun
6525*4882a593Smuzhiyun         RREPLACES:${PN} = "package (operator version)"
6526*4882a593Smuzhiyun
6527*4882a593Smuzhiyun      For ``operator``, you can specify the following:
6528*4882a593Smuzhiyun
6529*4882a593Smuzhiyun      - =
6530*4882a593Smuzhiyun      - <
6531*4882a593Smuzhiyun      - >
6532*4882a593Smuzhiyun      - <=
6533*4882a593Smuzhiyun      - >=
6534*4882a593Smuzhiyun
6535*4882a593Smuzhiyun      For example, the following sets up a replacement using version 1.2
6536*4882a593Smuzhiyun      or greater of the package ``foo``::
6537*4882a593Smuzhiyun
6538*4882a593Smuzhiyun          RREPLACES:${PN} = "foo (>= 1.2)"
6539*4882a593Smuzhiyun
6540*4882a593Smuzhiyun   :term:`RSUGGESTS`
6541*4882a593Smuzhiyun      A list of additional packages that you can suggest for installation
6542*4882a593Smuzhiyun      by the package manager at the time a package is installed. Not all
6543*4882a593Smuzhiyun      package managers support this functionality.
6544*4882a593Smuzhiyun
6545*4882a593Smuzhiyun      As with all package-controlling variables, you must always use this
6546*4882a593Smuzhiyun      variable in conjunction with a package name override. Here is an
6547*4882a593Smuzhiyun      example::
6548*4882a593Smuzhiyun
6549*4882a593Smuzhiyun         RSUGGESTS:${PN} = "useful_package another_package"
6550*4882a593Smuzhiyun
6551*4882a593Smuzhiyun   :term:`S`
6552*4882a593Smuzhiyun      The location in the :term:`Build Directory` where
6553*4882a593Smuzhiyun      unpacked recipe source code resides. By default, this directory is
6554*4882a593Smuzhiyun      ``${``\ :term:`WORKDIR`\ ``}/${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``,
6555*4882a593Smuzhiyun      where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe
6556*4882a593Smuzhiyun      version. If the source tarball extracts the code to a directory named
6557*4882a593Smuzhiyun      anything other than ``${BPN}-${PV}``, or if the source code is
6558*4882a593Smuzhiyun      fetched from an SCM such as Git or Subversion, then you must set
6559*4882a593Smuzhiyun      :term:`S` in the recipe so that the OpenEmbedded build system knows where
6560*4882a593Smuzhiyun      to find the unpacked source.
6561*4882a593Smuzhiyun
6562*4882a593Smuzhiyun      As an example, assume a :term:`Source Directory`
6563*4882a593Smuzhiyun      top-level folder named ``poky`` and a default Build Directory at
6564*4882a593Smuzhiyun      ``poky/build``. In this case, the work directory the build system
6565*4882a593Smuzhiyun      uses to keep the unpacked recipe for ``db`` is the following::
6566*4882a593Smuzhiyun
6567*4882a593Smuzhiyun         poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
6568*4882a593Smuzhiyun
6569*4882a593Smuzhiyun      The unpacked source code resides in the ``db-5.1.19`` folder.
6570*4882a593Smuzhiyun
6571*4882a593Smuzhiyun      This next example assumes a Git repository. By default, Git
6572*4882a593Smuzhiyun      repositories are cloned to ``${WORKDIR}/git`` during
6573*4882a593Smuzhiyun      :ref:`ref-tasks-fetch`. Since this path is different
6574*4882a593Smuzhiyun      from the default value of :term:`S`, you must set it specifically so the
6575*4882a593Smuzhiyun      source can be located::
6576*4882a593Smuzhiyun
6577*4882a593Smuzhiyun         SRC_URI = "git://path/to/repo.git;branch=main"
6578*4882a593Smuzhiyun         S = "${WORKDIR}/git"
6579*4882a593Smuzhiyun
6580*4882a593Smuzhiyun   :term:`SANITY_REQUIRED_UTILITIES`
6581*4882a593Smuzhiyun      Specifies a list of command-line utilities that should be checked for
6582*4882a593Smuzhiyun      during the initial sanity checking process when running BitBake. If
6583*4882a593Smuzhiyun      any of the utilities are not installed on the build host, then
6584*4882a593Smuzhiyun      BitBake immediately exits with an error.
6585*4882a593Smuzhiyun
6586*4882a593Smuzhiyun   :term:`SANITY_TESTED_DISTROS`
6587*4882a593Smuzhiyun      A list of the host distribution identifiers that the build system has
6588*4882a593Smuzhiyun      been tested against. Identifiers consist of the host distributor ID
6589*4882a593Smuzhiyun      followed by the release, as reported by the ``lsb_release`` tool or
6590*4882a593Smuzhiyun      as read from ``/etc/lsb-release``. Separate the list items with
6591*4882a593Smuzhiyun      explicit newline characters (``\n``). If :term:`SANITY_TESTED_DISTROS` is
6592*4882a593Smuzhiyun      not empty and the current value of
6593*4882a593Smuzhiyun      :term:`NATIVELSBSTRING` does not appear in the
6594*4882a593Smuzhiyun      list, then the build system reports a warning that indicates the
6595*4882a593Smuzhiyun      current host distribution has not been tested as a build host.
6596*4882a593Smuzhiyun
6597*4882a593Smuzhiyun   :term:`SDK_ARCH`
6598*4882a593Smuzhiyun      The target architecture for the SDK. Typically, you do not directly
6599*4882a593Smuzhiyun      set this variable. Instead, use :term:`SDKMACHINE`.
6600*4882a593Smuzhiyun
6601*4882a593Smuzhiyun   :term:`SDK_CUSTOM_TEMPLATECONF`
6602*4882a593Smuzhiyun      When building the extensible SDK, if :term:`SDK_CUSTOM_TEMPLATECONF` is set to
6603*4882a593Smuzhiyun      "1" and a ``conf/templateconf.conf`` file exists in the build directory
6604*4882a593Smuzhiyun      (:term:`TOPDIR`) then this will be copied into the SDK.
6605*4882a593Smuzhiyun
6606*4882a593Smuzhiyun   :term:`SDK_DEPLOY`
6607*4882a593Smuzhiyun      The directory set up and used by the
6608*4882a593Smuzhiyun      :ref:`populate_sdk_base <ref-classes-populate-sdk>` class to which
6609*4882a593Smuzhiyun      the SDK is deployed. The ``populate_sdk_base`` class defines
6610*4882a593Smuzhiyun      :term:`SDK_DEPLOY` as follows::
6611*4882a593Smuzhiyun
6612*4882a593Smuzhiyun         SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
6613*4882a593Smuzhiyun
6614*4882a593Smuzhiyun   :term:`SDK_DIR`
6615*4882a593Smuzhiyun      The parent directory used by the OpenEmbedded build system when
6616*4882a593Smuzhiyun      creating SDK output. The
6617*4882a593Smuzhiyun      :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class defines
6618*4882a593Smuzhiyun      the variable as follows::
6619*4882a593Smuzhiyun
6620*4882a593Smuzhiyun         SDK_DIR = "${WORKDIR}/sdk"
6621*4882a593Smuzhiyun
6622*4882a593Smuzhiyun      .. note::
6623*4882a593Smuzhiyun
6624*4882a593Smuzhiyun         The :term:`SDK_DIR` directory is a temporary directory as it is part of
6625*4882a593Smuzhiyun         :term:`WORKDIR`. The final output directory is :term:`SDK_DEPLOY`.
6626*4882a593Smuzhiyun
6627*4882a593Smuzhiyun   :term:`SDK_EXT_TYPE`
6628*4882a593Smuzhiyun      Controls whether or not shared state artifacts are copied into the
6629*4882a593Smuzhiyun      extensible SDK. The default value of "full" copies all of the
6630*4882a593Smuzhiyun      required shared state artifacts into the extensible SDK. The value
6631*4882a593Smuzhiyun      "minimal" leaves these artifacts out of the SDK.
6632*4882a593Smuzhiyun
6633*4882a593Smuzhiyun      .. note::
6634*4882a593Smuzhiyun
6635*4882a593Smuzhiyun         If you set the variable to "minimal", you need to ensure
6636*4882a593Smuzhiyun         :term:`SSTATE_MIRRORS` is set in the SDK's configuration to enable the
6637*4882a593Smuzhiyun         artifacts to be fetched as needed.
6638*4882a593Smuzhiyun
6639*4882a593Smuzhiyun   :term:`SDK_HOST_MANIFEST`
6640*4882a593Smuzhiyun      The manifest file for the host part of the SDK. This file lists all
6641*4882a593Smuzhiyun      the installed packages that make up the host part of the SDK. The
6642*4882a593Smuzhiyun      file contains package information on a line-per-package basis as
6643*4882a593Smuzhiyun      follows::
6644*4882a593Smuzhiyun
6645*4882a593Smuzhiyun         packagename packagearch version
6646*4882a593Smuzhiyun
6647*4882a593Smuzhiyun      The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
6648*4882a593Smuzhiyun      defines the manifest file as follows::
6649*4882a593Smuzhiyun
6650*4882a593Smuzhiyun         SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
6651*4882a593Smuzhiyun
6652*4882a593Smuzhiyun      The location is derived using the :term:`SDK_DEPLOY` and
6653*4882a593Smuzhiyun      :term:`TOOLCHAIN_OUTPUTNAME` variables.
6654*4882a593Smuzhiyun
6655*4882a593Smuzhiyun   :term:`SDK_INCLUDE_PKGDATA`
6656*4882a593Smuzhiyun      When set to "1", specifies to include the packagedata for all recipes
6657*4882a593Smuzhiyun      in the "world" target in the extensible SDK. Including this data
6658*4882a593Smuzhiyun      allows the ``devtool search`` command to find these recipes in search
6659*4882a593Smuzhiyun      results, as well as allows the ``devtool add`` command to map
6660*4882a593Smuzhiyun      dependencies more effectively.
6661*4882a593Smuzhiyun
6662*4882a593Smuzhiyun      .. note::
6663*4882a593Smuzhiyun
6664*4882a593Smuzhiyun         Enabling the :term:`SDK_INCLUDE_PKGDATA`
6665*4882a593Smuzhiyun         variable significantly increases build time because all of world
6666*4882a593Smuzhiyun         needs to be built. Enabling the variable also slightly increases
6667*4882a593Smuzhiyun         the size of the extensible SDK.
6668*4882a593Smuzhiyun
6669*4882a593Smuzhiyun   :term:`SDK_INCLUDE_TOOLCHAIN`
6670*4882a593Smuzhiyun      When set to "1", specifies to include the toolchain in the extensible
6671*4882a593Smuzhiyun      SDK. Including the toolchain is useful particularly when
6672*4882a593Smuzhiyun      :term:`SDK_EXT_TYPE` is set to "minimal" to keep
6673*4882a593Smuzhiyun      the SDK reasonably small but you still want to provide a usable
6674*4882a593Smuzhiyun      toolchain. For example, suppose you want to use the toolchain from an
6675*4882a593Smuzhiyun      IDE or from other tools and you do not want to perform additional
6676*4882a593Smuzhiyun      steps to install the toolchain.
6677*4882a593Smuzhiyun
6678*4882a593Smuzhiyun      The :term:`SDK_INCLUDE_TOOLCHAIN` variable defaults to "0" if
6679*4882a593Smuzhiyun      :term:`SDK_EXT_TYPE` is set to "minimal", and defaults to "1" if
6680*4882a593Smuzhiyun      :term:`SDK_EXT_TYPE` is set to "full".
6681*4882a593Smuzhiyun
6682*4882a593Smuzhiyun   :term:`SDK_NAME`
6683*4882a593Smuzhiyun      The base name for SDK output files. The name is derived from the
6684*4882a593Smuzhiyun      :term:`DISTRO`, :term:`TCLIBC`,
6685*4882a593Smuzhiyun      :term:`SDK_ARCH`,
6686*4882a593Smuzhiyun      :term:`IMAGE_BASENAME`, and
6687*4882a593Smuzhiyun      :term:`TUNE_PKGARCH` variables::
6688*4882a593Smuzhiyun
6689*4882a593Smuzhiyun         SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
6690*4882a593Smuzhiyun
6691*4882a593Smuzhiyun   :term:`SDK_OS`
6692*4882a593Smuzhiyun      Specifies the operating system for which the SDK will be built. The
6693*4882a593Smuzhiyun      default value is the value of :term:`BUILD_OS`.
6694*4882a593Smuzhiyun
6695*4882a593Smuzhiyun   :term:`SDK_OUTPUT`
6696*4882a593Smuzhiyun      The location used by the OpenEmbedded build system when creating SDK
6697*4882a593Smuzhiyun      output. The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
6698*4882a593Smuzhiyun      class defines the variable as follows::
6699*4882a593Smuzhiyun
6700*4882a593Smuzhiyun         SDK_DIR = "${WORKDIR}/sdk"
6701*4882a593Smuzhiyun         SDK_OUTPUT = "${SDK_DIR}/image"
6702*4882a593Smuzhiyun         SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
6703*4882a593Smuzhiyun
6704*4882a593Smuzhiyun      .. note::
6705*4882a593Smuzhiyun
6706*4882a593Smuzhiyun         The :term:`SDK_OUTPUT` directory is a temporary directory as it is part of
6707*4882a593Smuzhiyun         :term:`WORKDIR` by way of :term:`SDK_DIR`. The final output directory is
6708*4882a593Smuzhiyun         :term:`SDK_DEPLOY`.
6709*4882a593Smuzhiyun
6710*4882a593Smuzhiyun   :term:`SDK_PACKAGE_ARCHS`
6711*4882a593Smuzhiyun      Specifies a list of architectures compatible with the SDK machine.
6712*4882a593Smuzhiyun      This variable is set automatically and should not normally be
6713*4882a593Smuzhiyun      hand-edited. Entries are separated using spaces and listed in order
6714*4882a593Smuzhiyun      of priority. The default value for :term:`SDK_PACKAGE_ARCHS` is "all any
6715*4882a593Smuzhiyun      noarch ${SDK_ARCH}-${SDKPKGSUFFIX}".
6716*4882a593Smuzhiyun
6717*4882a593Smuzhiyun   :term:`SDK_POSTPROCESS_COMMAND`
6718*4882a593Smuzhiyun      Specifies a list of functions to call once the OpenEmbedded build
6719*4882a593Smuzhiyun      system creates the SDK. You can specify functions separated by
6720*4882a593Smuzhiyun      semicolons: SDK_POSTPROCESS_COMMAND += "function; ... "
6721*4882a593Smuzhiyun
6722*4882a593Smuzhiyun      If you need to pass an SDK path to a command within a function, you
6723*4882a593Smuzhiyun      can use ``${SDK_DIR}``, which points to the parent directory used by
6724*4882a593Smuzhiyun      the OpenEmbedded build system when creating SDK output. See the
6725*4882a593Smuzhiyun      :term:`SDK_DIR` variable for more information.
6726*4882a593Smuzhiyun
6727*4882a593Smuzhiyun   :term:`SDK_PREFIX`
6728*4882a593Smuzhiyun      The toolchain binary prefix used for ``nativesdk`` recipes. The
6729*4882a593Smuzhiyun      OpenEmbedded build system uses the :term:`SDK_PREFIX` value to set the
6730*4882a593Smuzhiyun      :term:`TARGET_PREFIX` when building
6731*4882a593Smuzhiyun      ``nativesdk`` recipes. The default value is "${SDK_SYS}-".
6732*4882a593Smuzhiyun
6733*4882a593Smuzhiyun   :term:`SDK_RECRDEP_TASKS`
6734*4882a593Smuzhiyun      A list of shared state tasks added to the extensible SDK. By default,
6735*4882a593Smuzhiyun      the following tasks are added:
6736*4882a593Smuzhiyun
6737*4882a593Smuzhiyun      - do_populate_lic
6738*4882a593Smuzhiyun      - do_package_qa
6739*4882a593Smuzhiyun      - do_populate_sysroot
6740*4882a593Smuzhiyun      - do_deploy
6741*4882a593Smuzhiyun
6742*4882a593Smuzhiyun      Despite the default value of "" for the
6743*4882a593Smuzhiyun      :term:`SDK_RECRDEP_TASKS` variable, the above four tasks are always added
6744*4882a593Smuzhiyun      to the SDK. To specify tasks beyond these four, you need to use the
6745*4882a593Smuzhiyun      :term:`SDK_RECRDEP_TASKS` variable (e.g. you are defining additional
6746*4882a593Smuzhiyun      tasks that are needed in order to build
6747*4882a593Smuzhiyun      :term:`SDK_TARGETS`).
6748*4882a593Smuzhiyun
6749*4882a593Smuzhiyun   :term:`SDK_SYS`
6750*4882a593Smuzhiyun      Specifies the system, including the architecture and the operating
6751*4882a593Smuzhiyun      system, for which the SDK will be built.
6752*4882a593Smuzhiyun
6753*4882a593Smuzhiyun      The OpenEmbedded build system automatically sets this variable based
6754*4882a593Smuzhiyun      on :term:`SDK_ARCH`,
6755*4882a593Smuzhiyun      :term:`SDK_VENDOR`, and
6756*4882a593Smuzhiyun      :term:`SDK_OS`. You do not need to set the :term:`SDK_SYS`
6757*4882a593Smuzhiyun      variable yourself.
6758*4882a593Smuzhiyun
6759*4882a593Smuzhiyun   :term:`SDK_TARGET_MANIFEST`
6760*4882a593Smuzhiyun      The manifest file for the target part of the SDK. This file lists all
6761*4882a593Smuzhiyun      the installed packages that make up the target part of the SDK. The
6762*4882a593Smuzhiyun      file contains package information on a line-per-package basis as
6763*4882a593Smuzhiyun      follows::
6764*4882a593Smuzhiyun
6765*4882a593Smuzhiyun         packagename packagearch version
6766*4882a593Smuzhiyun
6767*4882a593Smuzhiyun      The :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class
6768*4882a593Smuzhiyun      defines the manifest file as follows::
6769*4882a593Smuzhiyun
6770*4882a593Smuzhiyun         SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
6771*4882a593Smuzhiyun
6772*4882a593Smuzhiyun      The location is derived using the :term:`SDK_DEPLOY` and
6773*4882a593Smuzhiyun      :term:`TOOLCHAIN_OUTPUTNAME` variables.
6774*4882a593Smuzhiyun
6775*4882a593Smuzhiyun   :term:`SDK_TARGETS`
6776*4882a593Smuzhiyun      A list of targets to install from shared state as part of the
6777*4882a593Smuzhiyun      standard or extensible SDK installation. The default value is "${PN}"
6778*4882a593Smuzhiyun      (i.e. the image from which the SDK is built).
6779*4882a593Smuzhiyun
6780*4882a593Smuzhiyun      The :term:`SDK_TARGETS` variable is an internal variable and typically
6781*4882a593Smuzhiyun      would not be changed.
6782*4882a593Smuzhiyun
6783*4882a593Smuzhiyun   :term:`SDK_TITLE`
6784*4882a593Smuzhiyun      The title to be printed when running the SDK installer. By default,
6785*4882a593Smuzhiyun      this title is based on the :term:`DISTRO_NAME` or
6786*4882a593Smuzhiyun      :term:`DISTRO` variable and is set in the
6787*4882a593Smuzhiyun      :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
6788*4882a593Smuzhiyun      follows::
6789*4882a593Smuzhiyun
6790*4882a593Smuzhiyun         SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
6791*4882a593Smuzhiyun
6792*4882a593Smuzhiyun      For the default distribution "poky",
6793*4882a593Smuzhiyun      :term:`SDK_TITLE` is set to "Poky (Yocto Project Reference Distro)".
6794*4882a593Smuzhiyun
6795*4882a593Smuzhiyun      For information on how to change this default title, see the
6796*4882a593Smuzhiyun      ":ref:`sdk-manual/appendix-customizing:changing the extensible sdk installer title`"
6797*4882a593Smuzhiyun      section in the Yocto Project Application Development and the
6798*4882a593Smuzhiyun      Extensible Software Development Kit (eSDK) manual.
6799*4882a593Smuzhiyun
6800*4882a593Smuzhiyun   :term:`SDK_UPDATE_URL`
6801*4882a593Smuzhiyun      An optional URL for an update server for the extensible SDK. If set,
6802*4882a593Smuzhiyun      the value is used as the default update server when running
6803*4882a593Smuzhiyun      ``devtool sdk-update`` within the extensible SDK.
6804*4882a593Smuzhiyun
6805*4882a593Smuzhiyun   :term:`SDK_VENDOR`
6806*4882a593Smuzhiyun      Specifies the name of the SDK vendor.
6807*4882a593Smuzhiyun
6808*4882a593Smuzhiyun   :term:`SDK_VERSION`
6809*4882a593Smuzhiyun      Specifies the version of the SDK. The Poky distribution configuration file
6810*4882a593Smuzhiyun      (``/meta-poky/conf/distro/poky.conf``) sets the default
6811*4882a593Smuzhiyun      :term:`SDK_VERSION` as follows::
6812*4882a593Smuzhiyun
6813*4882a593Smuzhiyun         SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}"
6814*4882a593Smuzhiyun
6815*4882a593Smuzhiyun      For additional information, see the
6816*4882a593Smuzhiyun      :term:`DISTRO_VERSION` and
6817*4882a593Smuzhiyun      :term:`METADATA_REVISION` variables.
6818*4882a593Smuzhiyun
6819*4882a593Smuzhiyun   :term:`SDKEXTPATH`
6820*4882a593Smuzhiyun      The default installation directory for the Extensible SDK. By
6821*4882a593Smuzhiyun      default, this directory is based on the :term:`DISTRO`
6822*4882a593Smuzhiyun      variable and is set in the
6823*4882a593Smuzhiyun      :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class as
6824*4882a593Smuzhiyun      follows::
6825*4882a593Smuzhiyun
6826*4882a593Smuzhiyun         SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
6827*4882a593Smuzhiyun
6828*4882a593Smuzhiyun      For the
6829*4882a593Smuzhiyun      default distribution "poky", the :term:`SDKEXTPATH` is set to "poky_sdk".
6830*4882a593Smuzhiyun
6831*4882a593Smuzhiyun      For information on how to change this default directory, see the
6832*4882a593Smuzhiyun      ":ref:`sdk-manual/appendix-customizing:changing the default sdk installation directory`"
6833*4882a593Smuzhiyun      section in the Yocto Project Application Development and the
6834*4882a593Smuzhiyun      Extensible Software Development Kit (eSDK) manual.
6835*4882a593Smuzhiyun
6836*4882a593Smuzhiyun   :term:`SDKIMAGE_FEATURES`
6837*4882a593Smuzhiyun      Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to
6838*4882a593Smuzhiyun      the SDK generated from an image using the following command::
6839*4882a593Smuzhiyun
6840*4882a593Smuzhiyun         $ bitbake -c populate_sdk imagename
6841*4882a593Smuzhiyun
6842*4882a593Smuzhiyun   :term:`SDKMACHINE`
6843*4882a593Smuzhiyun      The machine for which the SDK is built. In other words, the SDK is built
6844*4882a593Smuzhiyun      such that it runs on the target you specify with the :term:`SDKMACHINE`
6845*4882a593Smuzhiyun      value. The value points to a corresponding ``.conf`` file under
6846*4882a593Smuzhiyun      ``conf/machine-sdk/`` in the enabled layers, for example ``aarch64``,
6847*4882a593Smuzhiyun      ``i586``, ``i686``, ``ppc64``, ``ppc64le``, and ``x86_64`` are
6848*4882a593Smuzhiyun      :oe_git:`available in OpenEmbedded-Core </openembedded-core/tree/meta/conf/machine-sdk>`.
6849*4882a593Smuzhiyun
6850*4882a593Smuzhiyun      The variable defaults to :term:`BUILD_ARCH` so that SDKs are built for the
6851*4882a593Smuzhiyun      architecture of the build machine.
6852*4882a593Smuzhiyun
6853*4882a593Smuzhiyun      .. note::
6854*4882a593Smuzhiyun
6855*4882a593Smuzhiyun         You cannot set the :term:`SDKMACHINE`
6856*4882a593Smuzhiyun         variable in your distribution configuration file. If you do, the
6857*4882a593Smuzhiyun         configuration will not take effect.
6858*4882a593Smuzhiyun
6859*4882a593Smuzhiyun   :term:`SDKPATH`
6860*4882a593Smuzhiyun      Defines the path offered to the user for installation of the SDK that
6861*4882a593Smuzhiyun      is generated by the OpenEmbedded build system. The path appears as
6862*4882a593Smuzhiyun      the default location for installing the SDK when you run the SDK's
6863*4882a593Smuzhiyun      installation script. You can override the offered path when you run
6864*4882a593Smuzhiyun      the script.
6865*4882a593Smuzhiyun
6866*4882a593Smuzhiyun   :term:`SDKTARGETSYSROOT`
6867*4882a593Smuzhiyun      The full path to the sysroot used for cross-compilation within an SDK
6868*4882a593Smuzhiyun      as it will be when installed into the default
6869*4882a593Smuzhiyun      :term:`SDKPATH`.
6870*4882a593Smuzhiyun
6871*4882a593Smuzhiyun   :term:`SECTION`
6872*4882a593Smuzhiyun      The section in which packages should be categorized. Package
6873*4882a593Smuzhiyun      management utilities can make use of this variable.
6874*4882a593Smuzhiyun
6875*4882a593Smuzhiyun   :term:`SELECTED_OPTIMIZATION`
6876*4882a593Smuzhiyun      Specifies the optimization flags passed to the C compiler when
6877*4882a593Smuzhiyun      building for the target. The flags are passed through the default
6878*4882a593Smuzhiyun      value of the :term:`TARGET_CFLAGS` variable.
6879*4882a593Smuzhiyun
6880*4882a593Smuzhiyun      The :term:`SELECTED_OPTIMIZATION` variable takes the value of
6881*4882a593Smuzhiyun      :term:`FULL_OPTIMIZATION` unless :term:`DEBUG_BUILD` = "1", in which
6882*4882a593Smuzhiyun      case the value of :term:`DEBUG_OPTIMIZATION` is used.
6883*4882a593Smuzhiyun
6884*4882a593Smuzhiyun   :term:`SERIAL_CONSOLE`
6885*4882a593Smuzhiyun      Defines a serial console (TTY) to enable using
6886*4882a593Smuzhiyun      `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6887*4882a593Smuzhiyun      value that specifies the baud rate followed by the TTY device name
6888*4882a593Smuzhiyun      separated by a space. You cannot specify more than one TTY device::
6889*4882a593Smuzhiyun
6890*4882a593Smuzhiyun         SERIAL_CONSOLE = "115200 ttyS0"
6891*4882a593Smuzhiyun
6892*4882a593Smuzhiyun      .. note::
6893*4882a593Smuzhiyun
6894*4882a593Smuzhiyun         The :term:`SERIAL_CONSOLE` variable is deprecated. Please use the
6895*4882a593Smuzhiyun         :term:`SERIAL_CONSOLES` variable.
6896*4882a593Smuzhiyun
6897*4882a593Smuzhiyun   :term:`SERIAL_CONSOLES`
6898*4882a593Smuzhiyun      Defines a serial console (TTY) to enable using
6899*4882a593Smuzhiyun      `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6900*4882a593Smuzhiyun      value that specifies the baud rate followed by the TTY device name
6901*4882a593Smuzhiyun      separated by a semicolon. Use spaces to separate multiple devices::
6902*4882a593Smuzhiyun
6903*4882a593Smuzhiyun         SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
6904*4882a593Smuzhiyun
6905*4882a593Smuzhiyun   :term:`SERIAL_CONSOLES_CHECK`
6906*4882a593Smuzhiyun      Specifies serial consoles, which must be listed in
6907*4882a593Smuzhiyun      :term:`SERIAL_CONSOLES`, to check against
6908*4882a593Smuzhiyun      ``/proc/console`` before enabling them using getty. This variable
6909*4882a593Smuzhiyun      allows aliasing in the format: <device>:<alias>. If a device was
6910*4882a593Smuzhiyun      listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in
6911*4882a593Smuzhiyun      ``/proc/console``, you would do the following::
6912*4882a593Smuzhiyun
6913*4882a593Smuzhiyun         SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0"
6914*4882a593Smuzhiyun
6915*4882a593Smuzhiyun      This variable is currently only supported with SysVinit (i.e. not
6916*4882a593Smuzhiyun      with systemd). Note that :term:`SERIAL_CONSOLES_CHECK` also requires
6917*4882a593Smuzhiyun      ``/etc/inittab`` to be writable when used with SysVinit. This makes it
6918*4882a593Smuzhiyun      incompatible with customizations such as the following::
6919*4882a593Smuzhiyun
6920*4882a593Smuzhiyun         EXTRA_IMAGE_FEATURES += "read-only-rootfs"
6921*4882a593Smuzhiyun
6922*4882a593Smuzhiyun   :term:`SETUPTOOLS_BUILD_ARGS`
6923*4882a593Smuzhiyun      When used by recipes that inherit the
6924*4882a593Smuzhiyun      :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
6925*4882a593Smuzhiyun      be used to specify additional arguments to be passed to ``setup.py build``
6926*4882a593Smuzhiyun      in the ``setuptools3_do_compile()`` task.
6927*4882a593Smuzhiyun
6928*4882a593Smuzhiyun   :term:`SETUPTOOLS_INSTALL_ARGS`
6929*4882a593Smuzhiyun      When used by recipes that inherit the
6930*4882a593Smuzhiyun      :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable can
6931*4882a593Smuzhiyun      be used to specify additional arguments to be passed to ``setup.py install``
6932*4882a593Smuzhiyun      in the ``setuptools3_do_install()`` task.
6933*4882a593Smuzhiyun
6934*4882a593Smuzhiyun   :term:`SETUPTOOLS_SETUP_PATH`
6935*4882a593Smuzhiyun      When used by recipes that inherit the
6936*4882a593Smuzhiyun      :ref:`setuptools3 <ref-classes-setuptools3>` class, this variable should
6937*4882a593Smuzhiyun      be used to specify the directory in which the ``setup.py`` file is
6938*4882a593Smuzhiyun      located if it is not at the root of the source tree (as specified by
6939*4882a593Smuzhiyun      :term:`S`). For example, in a recipe where the sources are fetched from
6940*4882a593Smuzhiyun      a Git repository and ``setup.py`` is in a ``python/pythonmodule``
6941*4882a593Smuzhiyun      subdirectory, you would have this::
6942*4882a593Smuzhiyun
6943*4882a593Smuzhiyun         S = "${WORKDIR}/git"
6944*4882a593Smuzhiyun         SETUPTOOLS_SETUP_PATH = "${S}/python/pythonmodule"
6945*4882a593Smuzhiyun
6946*4882a593Smuzhiyun   :term:`SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS`
6947*4882a593Smuzhiyun      A list of recipe dependencies that should not be used to determine
6948*4882a593Smuzhiyun      signatures of tasks from one recipe when they depend on tasks from
6949*4882a593Smuzhiyun      another recipe. For example::
6950*4882a593Smuzhiyun
6951*4882a593Smuzhiyun         SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
6952*4882a593Smuzhiyun
6953*4882a593Smuzhiyun      In the previous example, ``intone`` depends on ``mplayer2``.
6954*4882a593Smuzhiyun
6955*4882a593Smuzhiyun      You can use the special token ``"*"`` on the left-hand side of the
6956*4882a593Smuzhiyun      dependency to match all recipes except the one on the right-hand
6957*4882a593Smuzhiyun      side. Here is an example::
6958*4882a593Smuzhiyun
6959*4882a593Smuzhiyun         SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
6960*4882a593Smuzhiyun
6961*4882a593Smuzhiyun      In the previous example, all recipes except ``quilt-native`` ignore
6962*4882a593Smuzhiyun      task signatures from the ``quilt-native`` recipe when determining
6963*4882a593Smuzhiyun      their task signatures.
6964*4882a593Smuzhiyun
6965*4882a593Smuzhiyun      Use of this variable is one mechanism to remove dependencies that
6966*4882a593Smuzhiyun      affect task signatures and thus force rebuilds when a recipe changes.
6967*4882a593Smuzhiyun
6968*4882a593Smuzhiyun      .. note::
6969*4882a593Smuzhiyun
6970*4882a593Smuzhiyun         If you add an inappropriate dependency for a recipe relationship,
6971*4882a593Smuzhiyun         the software might break during runtime if the interface of the
6972*4882a593Smuzhiyun         second recipe was changed after the first recipe had been built.
6973*4882a593Smuzhiyun
6974*4882a593Smuzhiyun   :term:`SIGGEN_EXCLUDERECIPES_ABISAFE`
6975*4882a593Smuzhiyun      A list of recipes that are completely stable and will never change.
6976*4882a593Smuzhiyun      The ABI for the recipes in the list are presented by output from the
6977*4882a593Smuzhiyun      tasks run to build the recipe. Use of this variable is one way to
6978*4882a593Smuzhiyun      remove dependencies from one recipe on another that affect task
6979*4882a593Smuzhiyun      signatures and thus force rebuilds when the recipe changes.
6980*4882a593Smuzhiyun
6981*4882a593Smuzhiyun      .. note::
6982*4882a593Smuzhiyun
6983*4882a593Smuzhiyun         If you add an inappropriate variable to this list, the software
6984*4882a593Smuzhiyun         might break at runtime if the interface of the recipe was changed
6985*4882a593Smuzhiyun         after the other had been built.
6986*4882a593Smuzhiyun
6987*4882a593Smuzhiyun   :term:`SITEINFO_BITS`
6988*4882a593Smuzhiyun      Specifies the number of bits for the target system CPU. The value
6989*4882a593Smuzhiyun      should be either "32" or "64".
6990*4882a593Smuzhiyun
6991*4882a593Smuzhiyun   :term:`SITEINFO_ENDIANNESS`
6992*4882a593Smuzhiyun      Specifies the endian byte order of the target system. The value
6993*4882a593Smuzhiyun      should be either "le" for little-endian or "be" for big-endian.
6994*4882a593Smuzhiyun
6995*4882a593Smuzhiyun   :term:`SKIP_FILEDEPS`
6996*4882a593Smuzhiyun      Enables removal of all files from the "Provides" section of an RPM
6997*4882a593Smuzhiyun      package. Removal of these files is required for packages containing
6998*4882a593Smuzhiyun      prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``.
6999*4882a593Smuzhiyun
7000*4882a593Smuzhiyun      To enable file removal, set the variable to "1" in your
7001*4882a593Smuzhiyun      ``conf/local.conf`` configuration file in your:
7002*4882a593Smuzhiyun      :term:`Build Directory`.
7003*4882a593Smuzhiyun      ::
7004*4882a593Smuzhiyun
7005*4882a593Smuzhiyun         SKIP_FILEDEPS = "1"
7006*4882a593Smuzhiyun
7007*4882a593Smuzhiyun   :term:`SKIP_RECIPE`
7008*4882a593Smuzhiyun      Used to prevent the OpenEmbedded build system from building a given
7009*4882a593Smuzhiyun      recipe. Specify the :term:`PN` value as a variable flag (``varflag``)
7010*4882a593Smuzhiyun      and provide a reason, which will be reported when attempting to
7011*4882a593Smuzhiyun      build the recipe.
7012*4882a593Smuzhiyun
7013*4882a593Smuzhiyun      To prevent a recipe from being built, use the :term:`SKIP_RECIPE`
7014*4882a593Smuzhiyun      variable in your ``local.conf`` file or distribution configuration.
7015*4882a593Smuzhiyun      Here is an example which prevents ``myrecipe`` from being built::
7016*4882a593Smuzhiyun
7017*4882a593Smuzhiyun         SKIP_RECIPE[myrecipe] = "Not supported by our organization."
7018*4882a593Smuzhiyun
7019*4882a593Smuzhiyun   :term:`SOC_FAMILY`
7020*4882a593Smuzhiyun      Groups together machines based upon the same family of SOC (System On
7021*4882a593Smuzhiyun      Chip). You typically set this variable in a common ``.inc`` file that
7022*4882a593Smuzhiyun      you include in the configuration files of all the machines.
7023*4882a593Smuzhiyun
7024*4882a593Smuzhiyun      .. note::
7025*4882a593Smuzhiyun
7026*4882a593Smuzhiyun         You must include ``conf/machine/include/soc-family.inc`` for this
7027*4882a593Smuzhiyun         variable to appear in :term:`MACHINEOVERRIDES`.
7028*4882a593Smuzhiyun
7029*4882a593Smuzhiyun   :term:`SOLIBS`
7030*4882a593Smuzhiyun      Defines the suffix for shared libraries used on the target platform.
7031*4882a593Smuzhiyun      By default, this suffix is ".so.*" for all Linux-based systems and is
7032*4882a593Smuzhiyun      defined in the ``meta/conf/bitbake.conf`` configuration file.
7033*4882a593Smuzhiyun
7034*4882a593Smuzhiyun      You will see this variable referenced in the default values of
7035*4882a593Smuzhiyun      ``FILES:${PN}``.
7036*4882a593Smuzhiyun
7037*4882a593Smuzhiyun   :term:`SOLIBSDEV`
7038*4882a593Smuzhiyun      Defines the suffix for the development symbolic link (symlink) for
7039*4882a593Smuzhiyun      shared libraries on the target platform. By default, this suffix is
7040*4882a593Smuzhiyun      ".so" for Linux-based systems and is defined in the
7041*4882a593Smuzhiyun      ``meta/conf/bitbake.conf`` configuration file.
7042*4882a593Smuzhiyun
7043*4882a593Smuzhiyun      You will see this variable referenced in the default values of
7044*4882a593Smuzhiyun      ``FILES:${PN}-dev``.
7045*4882a593Smuzhiyun
7046*4882a593Smuzhiyun   :term:`SOURCE_DATE_EPOCH`
7047*4882a593Smuzhiyun      This defines a date expressed in number of seconds since
7048*4882a593Smuzhiyun      the UNIX EPOCH (01 Jan 1970 00:00:00 UTC), which is used by
7049*4882a593Smuzhiyun      multiple build systems to force a timestamp in built binaries.
7050*4882a593Smuzhiyun      Many upstream projects already support this variable.
7051*4882a593Smuzhiyun
7052*4882a593Smuzhiyun      You will find more details in the `official specifications
7053*4882a593Smuzhiyun      <https://reproducible-builds.org/specs/source-date-epoch/>`__.
7054*4882a593Smuzhiyun
7055*4882a593Smuzhiyun      A value for each recipe is computed from the sources by
7056*4882a593Smuzhiyun      :oe_git:`meta/lib/oe/reproducible.py </openembedded-core/tree/meta/lib/oe/reproducible.py>`.
7057*4882a593Smuzhiyun
7058*4882a593Smuzhiyun      If a recipe wishes to override the default behavior, it should set its
7059*4882a593Smuzhiyun      own :term:`SOURCE_DATE_EPOCH` value::
7060*4882a593Smuzhiyun
7061*4882a593Smuzhiyun          SOURCE_DATE_EPOCH = "1613559011"
7062*4882a593Smuzhiyun
7063*4882a593Smuzhiyun   :term:`SOURCE_MIRROR_FETCH`
7064*4882a593Smuzhiyun      When you are fetching files to create a mirror of sources (i.e.
7065*4882a593Smuzhiyun      creating a source mirror), setting :term:`SOURCE_MIRROR_FETCH` to "1" in
7066*4882a593Smuzhiyun      your ``local.conf`` configuration file ensures the source for all
7067*4882a593Smuzhiyun      recipes are fetched regardless of whether or not a recipe is
7068*4882a593Smuzhiyun      compatible with the configuration. A recipe is considered
7069*4882a593Smuzhiyun      incompatible with the currently configured machine when either or
7070*4882a593Smuzhiyun      both the :term:`COMPATIBLE_MACHINE`
7071*4882a593Smuzhiyun      variable and :term:`COMPATIBLE_HOST` variables
7072*4882a593Smuzhiyun      specify compatibility with a machine other than that of the current
7073*4882a593Smuzhiyun      machine or host.
7074*4882a593Smuzhiyun
7075*4882a593Smuzhiyun      .. note::
7076*4882a593Smuzhiyun
7077*4882a593Smuzhiyun         Do not set the :term:`SOURCE_MIRROR_FETCH`
7078*4882a593Smuzhiyun         variable unless you are creating a source mirror. In other words,
7079*4882a593Smuzhiyun         do not set the variable during a normal build.
7080*4882a593Smuzhiyun
7081*4882a593Smuzhiyun   :term:`SOURCE_MIRROR_URL`
7082*4882a593Smuzhiyun      Defines your own :term:`PREMIRRORS` from which to
7083*4882a593Smuzhiyun      first fetch source before attempting to fetch from the upstream
7084*4882a593Smuzhiyun      specified in :term:`SRC_URI`.
7085*4882a593Smuzhiyun
7086*4882a593Smuzhiyun      To use this variable, you must globally inherit the
7087*4882a593Smuzhiyun      :ref:`own-mirrors <ref-classes-own-mirrors>` class and then provide
7088*4882a593Smuzhiyun      the URL to your mirrors. Here is the general syntax::
7089*4882a593Smuzhiyun
7090*4882a593Smuzhiyun         INHERIT += "own-mirrors"
7091*4882a593Smuzhiyun         SOURCE_MIRROR_URL = "http://example.com/my_source_mirror"
7092*4882a593Smuzhiyun
7093*4882a593Smuzhiyun      .. note::
7094*4882a593Smuzhiyun
7095*4882a593Smuzhiyun         You can specify only a single URL in :term:`SOURCE_MIRROR_URL`.
7096*4882a593Smuzhiyun
7097*4882a593Smuzhiyun   :term:`SPDX_ARCHIVE_PACKAGED`
7098*4882a593Smuzhiyun      This option allows to add to :term:`SPDX` output compressed archives
7099*4882a593Smuzhiyun      of the files in the generated target packages.
7100*4882a593Smuzhiyun
7101*4882a593Smuzhiyun      Such archives are available in
7102*4882a593Smuzhiyun      ``tmp/deploy/spdx/MACHINE/packages/packagename.tar.zst``
7103*4882a593Smuzhiyun      under the :term:`Build Directory`.
7104*4882a593Smuzhiyun
7105*4882a593Smuzhiyun      Enable this option as follows::
7106*4882a593Smuzhiyun
7107*4882a593Smuzhiyun         SPDX_ARCHIVE_PACKAGED = "1"
7108*4882a593Smuzhiyun
7109*4882a593Smuzhiyun      According to our tests on release 4.1 "langdale", building
7110*4882a593Smuzhiyun      ``core-image-minimal`` for the ``qemux86-64`` machine, enabling this
7111*4882a593Smuzhiyun      option multiplied the size of the ``tmp/deploy/spdx`` directory by a
7112*4882a593Smuzhiyun      factor of 13 (+1.6 GiB for this image), compared to just using the
7113*4882a593Smuzhiyun      :ref:`create-spdx <ref-classes-create-spdx>` class with no option.
7114*4882a593Smuzhiyun
7115*4882a593Smuzhiyun      Note that this option doesn't increase the size of :term:`SPDX`
7116*4882a593Smuzhiyun      files in ``tmp/deploy/images/MACHINE``.
7117*4882a593Smuzhiyun
7118*4882a593Smuzhiyun   :term:`SPDX_ARCHIVE_SOURCES`
7119*4882a593Smuzhiyun      This option allows to add to :term:`SPDX` output compressed archives
7120*4882a593Smuzhiyun      of the sources for packages installed on the target. It currently
7121*4882a593Smuzhiyun      only works when :term:`SPDX_INCLUDE_SOURCES` is set.
7122*4882a593Smuzhiyun
7123*4882a593Smuzhiyun      This is one way of fulfilling "source code access" license
7124*4882a593Smuzhiyun      requirements.
7125*4882a593Smuzhiyun
7126*4882a593Smuzhiyun      Such source archives are available in
7127*4882a593Smuzhiyun      ``tmp/deploy/spdx/MACHINE/recipes/recipe-packagename.tar.zst``
7128*4882a593Smuzhiyun      under the :term:`Build Directory`.
7129*4882a593Smuzhiyun
7130*4882a593Smuzhiyun      Enable this option as follows::
7131*4882a593Smuzhiyun
7132*4882a593Smuzhiyun         SPDX_INCLUDE_SOURCES = "1"
7133*4882a593Smuzhiyun         SPDX_ARCHIVE_SOURCES = "1"
7134*4882a593Smuzhiyun
7135*4882a593Smuzhiyun      According to our tests on release 4.1 "langdale", building
7136*4882a593Smuzhiyun      ``core-image-minimal`` for the ``qemux86-64`` machine, enabling
7137*4882a593Smuzhiyun      these options multiplied the size of the ``tmp/deploy/spdx``
7138*4882a593Smuzhiyun      directory by a factor of 11 (+1.4 GiB for this image),
7139*4882a593Smuzhiyun      compared to just using the :ref:`create-spdx <ref-classes-create-spdx>`
7140*4882a593Smuzhiyun      class with no option.
7141*4882a593Smuzhiyun
7142*4882a593Smuzhiyun      Note that using this option only marginally increases the size
7143*4882a593Smuzhiyun      of the :term:`SPDX` output in ``tmp/deploy/images/MACHINE/``
7144*4882a593Smuzhiyun      (+ 0.07\% with the tested image), compared to just enabling
7145*4882a593Smuzhiyun      :term:`SPDX_INCLUDE_SOURCES`.
7146*4882a593Smuzhiyun
7147*4882a593Smuzhiyun   :term:`SPDX_INCLUDE_SOURCES`
7148*4882a593Smuzhiyun      This option allows to add a description of the source files used to build
7149*4882a593Smuzhiyun      the host tools and the target packages, to the ``spdx.json`` files in
7150*4882a593Smuzhiyun      ``tmp/deploy/spdx/MACHINE/recipes/`` under the :term:`Build Directory`.
7151*4882a593Smuzhiyun      As a consequence, the ``spdx.json`` files under the ``by-namespace`` and
7152*4882a593Smuzhiyun      ``packages`` subdirectories in ``tmp/deploy/spdx/MACHINE`` are also
7153*4882a593Smuzhiyun      modified to include references to such source file descriptions.
7154*4882a593Smuzhiyun
7155*4882a593Smuzhiyun      Enable this option as follows::
7156*4882a593Smuzhiyun
7157*4882a593Smuzhiyun         SPDX_INCLUDE_SOURCES = "1"
7158*4882a593Smuzhiyun
7159*4882a593Smuzhiyun      According to our tests on release 4.1 "langdale", building
7160*4882a593Smuzhiyun      ``core-image-minimal`` for the ``qemux86-64`` machine, enabling
7161*4882a593Smuzhiyun      this option multiplied the total size of the ``tmp/deploy/spdx``
7162*4882a593Smuzhiyun      directory by a factor of 3  (+291 MiB for this image),
7163*4882a593Smuzhiyun      and the size of the ``IMAGE-MACHINE.spdx.tar.zst`` in
7164*4882a593Smuzhiyun      ``tmp/deploy/images/MACHINE`` by a factor of 130 (+15 MiB for this
7165*4882a593Smuzhiyun      image), compared to just using the
7166*4882a593Smuzhiyun      :ref:`create-spdx <ref-classes-create-spdx>` class with no option.
7167*4882a593Smuzhiyun
7168*4882a593Smuzhiyun   :term:`SPDX_PRETTY`
7169*4882a593Smuzhiyun      This option makes the SPDX output more human-readable, using
7170*4882a593Smuzhiyun      identation and newlines, instead of the default output in a
7171*4882a593Smuzhiyun      single line::
7172*4882a593Smuzhiyun
7173*4882a593Smuzhiyun         SPDX_PRETTY = "1"
7174*4882a593Smuzhiyun
7175*4882a593Smuzhiyun      The generated SPDX files are approximately 20% bigger, but
7176*4882a593Smuzhiyun      this option is recommended if you want to inspect the SPDX
7177*4882a593Smuzhiyun      output files with a text editor.
7178*4882a593Smuzhiyun
7179*4882a593Smuzhiyun   :term:`SPDXLICENSEMAP`
7180*4882a593Smuzhiyun      Maps commonly used license names to their SPDX counterparts found in
7181*4882a593Smuzhiyun      ``meta/files/common-licenses/``. For the default :term:`SPDXLICENSEMAP`
7182*4882a593Smuzhiyun      mappings, see the ``meta/conf/licenses.conf`` file.
7183*4882a593Smuzhiyun
7184*4882a593Smuzhiyun      For additional information, see the :term:`LICENSE`
7185*4882a593Smuzhiyun      variable.
7186*4882a593Smuzhiyun
7187*4882a593Smuzhiyun   :term:`SPECIAL_PKGSUFFIX`
7188*4882a593Smuzhiyun      A list of prefixes for :term:`PN` used by the OpenEmbedded
7189*4882a593Smuzhiyun      build system to create variants of recipes or packages. The list
7190*4882a593Smuzhiyun      specifies the prefixes to strip off during certain circumstances such
7191*4882a593Smuzhiyun      as the generation of the :term:`BPN` variable.
7192*4882a593Smuzhiyun
7193*4882a593Smuzhiyun   :term:`SPL_BINARY`
7194*4882a593Smuzhiyun      The file type for the Secondary Program Loader (SPL). Some devices
7195*4882a593Smuzhiyun      use an SPL from which to boot (e.g. the BeagleBone development
7196*4882a593Smuzhiyun      board). For such cases, you can declare the file type of the SPL
7197*4882a593Smuzhiyun      binary in the ``u-boot.inc`` include file, which is used in the
7198*4882a593Smuzhiyun      U-Boot recipe.
7199*4882a593Smuzhiyun
7200*4882a593Smuzhiyun      The SPL file type is set to "null" by default in the ``u-boot.inc``
7201*4882a593Smuzhiyun      file as follows::
7202*4882a593Smuzhiyun
7203*4882a593Smuzhiyun         # Some versions of u-boot build an SPL (Second Program Loader) image that
7204*4882a593Smuzhiyun         # should be packaged along with the u-boot binary as well as placed in the
7205*4882a593Smuzhiyun         # deploy directory. For those versions they can set the following variables
7206*4882a593Smuzhiyun         # to allow packaging the SPL.
7207*4882a593Smuzhiyun         SPL_BINARY ?= ""
7208*4882a593Smuzhiyun         SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
7209*4882a593Smuzhiyun         SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
7210*4882a593Smuzhiyun         SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
7211*4882a593Smuzhiyun
7212*4882a593Smuzhiyun      The :term:`SPL_BINARY` variable helps form
7213*4882a593Smuzhiyun      various ``SPL_*`` variables used by the OpenEmbedded build system.
7214*4882a593Smuzhiyun
7215*4882a593Smuzhiyun      See the BeagleBone machine configuration example in the
7216*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:adding a layer using the \`\`bitbake-layers\`\` script`"
7217*4882a593Smuzhiyun      section in the Yocto Project Board Support Package Developer's Guide
7218*4882a593Smuzhiyun      for additional information.
7219*4882a593Smuzhiyun
7220*4882a593Smuzhiyun   :term:`SRC_URI`
7221*4882a593Smuzhiyun
7222*4882a593Smuzhiyun      See the BitBake manual for the initial description for this variable:
7223*4882a593Smuzhiyun      :term:`bitbake:SRC_URI`.
7224*4882a593Smuzhiyun
7225*4882a593Smuzhiyun      The following features are added by OpenEmbedded and the Yocto Project.
7226*4882a593Smuzhiyun
7227*4882a593Smuzhiyun      There are standard and recipe-specific options. Here are standard ones:
7228*4882a593Smuzhiyun
7229*4882a593Smuzhiyun      -  ``apply`` - Whether to apply the patch or not. The default
7230*4882a593Smuzhiyun         action is to apply the patch.
7231*4882a593Smuzhiyun
7232*4882a593Smuzhiyun      -  ``striplevel`` - Which striplevel to use when applying the
7233*4882a593Smuzhiyun         patch. The default level is 1.
7234*4882a593Smuzhiyun
7235*4882a593Smuzhiyun      -  ``patchdir`` - Specifies the directory in which the patch should
7236*4882a593Smuzhiyun         be applied. The default is ``${``\ :term:`S`\ ``}``.
7237*4882a593Smuzhiyun
7238*4882a593Smuzhiyun      Here are options specific to recipes building code from a revision
7239*4882a593Smuzhiyun      control system:
7240*4882a593Smuzhiyun
7241*4882a593Smuzhiyun      -  ``mindate`` - Apply the patch only if
7242*4882a593Smuzhiyun         :term:`SRCDATE` is equal to or greater than
7243*4882a593Smuzhiyun         ``mindate``.
7244*4882a593Smuzhiyun
7245*4882a593Smuzhiyun      -  ``maxdate`` - Apply the patch only if :term:`SRCDATE` is not later
7246*4882a593Smuzhiyun         than ``maxdate``.
7247*4882a593Smuzhiyun
7248*4882a593Smuzhiyun      -  ``minrev`` - Apply the patch only if :term:`SRCREV` is equal to or
7249*4882a593Smuzhiyun         greater than ``minrev``.
7250*4882a593Smuzhiyun
7251*4882a593Smuzhiyun      -  ``maxrev`` - Apply the patch only if :term:`SRCREV` is not later
7252*4882a593Smuzhiyun         than ``maxrev``.
7253*4882a593Smuzhiyun
7254*4882a593Smuzhiyun      -  ``rev`` - Apply the patch only if :term:`SRCREV` is equal to
7255*4882a593Smuzhiyun         ``rev``.
7256*4882a593Smuzhiyun
7257*4882a593Smuzhiyun      -  ``notrev`` - Apply the patch only if :term:`SRCREV` is not equal to
7258*4882a593Smuzhiyun         ``rev``.
7259*4882a593Smuzhiyun
7260*4882a593Smuzhiyun      .. note::
7261*4882a593Smuzhiyun
7262*4882a593Smuzhiyun         If you want the build system to pick up files specified through
7263*4882a593Smuzhiyun         a :term:`SRC_URI` statement from your append file, you need to be
7264*4882a593Smuzhiyun         sure to extend the :term:`FILESPATH` variable by also using the
7265*4882a593Smuzhiyun         :term:`FILESEXTRAPATHS` variable from within your append file.
7266*4882a593Smuzhiyun
7267*4882a593Smuzhiyun   :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH`
7268*4882a593Smuzhiyun      By default, the OpenEmbedded build system automatically detects
7269*4882a593Smuzhiyun      whether :term:`SRC_URI` contains files that are machine-specific. If so,
7270*4882a593Smuzhiyun      the build system automatically changes :term:`PACKAGE_ARCH`. Setting this
7271*4882a593Smuzhiyun      variable to "0" disables this behavior.
7272*4882a593Smuzhiyun
7273*4882a593Smuzhiyun   :term:`SRCDATE`
7274*4882a593Smuzhiyun      The date of the source code used to build the package. This variable
7275*4882a593Smuzhiyun      applies only if the source was fetched from a Source Code Manager
7276*4882a593Smuzhiyun      (SCM).
7277*4882a593Smuzhiyun
7278*4882a593Smuzhiyun   :term:`SRCPV`
7279*4882a593Smuzhiyun      Returns the version string of the current package. This string is
7280*4882a593Smuzhiyun      used to help define the value of :term:`PV`.
7281*4882a593Smuzhiyun
7282*4882a593Smuzhiyun      The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf``
7283*4882a593Smuzhiyun      configuration file in the :term:`Source Directory` as
7284*4882a593Smuzhiyun      follows::
7285*4882a593Smuzhiyun
7286*4882a593Smuzhiyun         SRCPV = "${@bb.fetch2.get_srcrev(d)}"
7287*4882a593Smuzhiyun
7288*4882a593Smuzhiyun      Recipes that need to define :term:`PV` do so with the help of the
7289*4882a593Smuzhiyun      :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``)
7290*4882a593Smuzhiyun      located in ``meta/recipes-connectivity`` in the Source Directory
7291*4882a593Smuzhiyun      defines :term:`PV` as follows::
7292*4882a593Smuzhiyun
7293*4882a593Smuzhiyun         PV = "0.12-git${SRCPV}"
7294*4882a593Smuzhiyun
7295*4882a593Smuzhiyun   :term:`SRCREV`
7296*4882a593Smuzhiyun      The revision of the source code used to build the package. This
7297*4882a593Smuzhiyun      variable applies to Subversion, Git, Mercurial, and Bazaar only. Note
7298*4882a593Smuzhiyun      that if you want to build a fixed revision and you want to avoid
7299*4882a593Smuzhiyun      performing a query on the remote repository every time BitBake parses
7300*4882a593Smuzhiyun      your recipe, you should specify a :term:`SRCREV` that is a full revision
7301*4882a593Smuzhiyun      identifier and not just a tag.
7302*4882a593Smuzhiyun
7303*4882a593Smuzhiyun      .. note::
7304*4882a593Smuzhiyun
7305*4882a593Smuzhiyun         For information on limitations when inheriting the latest revision
7306*4882a593Smuzhiyun         of software using :term:`SRCREV`, see the :term:`AUTOREV` variable
7307*4882a593Smuzhiyun         description and the
7308*4882a593Smuzhiyun         ":ref:`dev-manual/common-tasks:automatically incrementing a package version number`"
7309*4882a593Smuzhiyun         section, which is in the Yocto Project Development Tasks Manual.
7310*4882a593Smuzhiyun
7311*4882a593Smuzhiyun   :term:`SRCTREECOVEREDTASKS`
7312*4882a593Smuzhiyun      A list of tasks that are typically not relevant (and therefore skipped)
7313*4882a593Smuzhiyun      when building using the :ref:`externalsrc <ref-classes-externalsrc>`
7314*4882a593Smuzhiyun      class. The default value as set in that class file is the set of tasks
7315*4882a593Smuzhiyun      that are rarely needed when using external source::
7316*4882a593Smuzhiyun
7317*4882a593Smuzhiyun         SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
7318*4882a593Smuzhiyun
7319*4882a593Smuzhiyun      The notable exception is when processing external kernel source as
7320*4882a593Smuzhiyun      defined in the :ref:`kernel-yocto <ref-classes-kernel-yocto>`
7321*4882a593Smuzhiyun      class file (formatted for aesthetics)::
7322*4882a593Smuzhiyun
7323*4882a593Smuzhiyun         SRCTREECOVEREDTASKS += "\
7324*4882a593Smuzhiyun           do_validate_branches \
7325*4882a593Smuzhiyun           do_kernel_configcheck \
7326*4882a593Smuzhiyun           do_kernel_checkout \
7327*4882a593Smuzhiyun           do_fetch \
7328*4882a593Smuzhiyun           do_unpack \
7329*4882a593Smuzhiyun           do_patch \
7330*4882a593Smuzhiyun         "
7331*4882a593Smuzhiyun
7332*4882a593Smuzhiyun      See the associated :term:`EXTERNALSRC` and :term:`EXTERNALSRC_BUILD`
7333*4882a593Smuzhiyun      variables for more information.
7334*4882a593Smuzhiyun
7335*4882a593Smuzhiyun   :term:`SSTATE_DIR`
7336*4882a593Smuzhiyun      The directory for the shared state cache.
7337*4882a593Smuzhiyun
7338*4882a593Smuzhiyun   :term:`SSTATE_EXCLUDEDEPS_SYSROOT`
7339*4882a593Smuzhiyun      This variable allows to specify indirect dependencies to exclude
7340*4882a593Smuzhiyun      from sysroots, for example to avoid the situations when a dependency on
7341*4882a593Smuzhiyun      any ``-native`` recipe will pull in all dependencies of that recipe
7342*4882a593Smuzhiyun      in the recipe sysroot. This behaviour might not always be wanted,
7343*4882a593Smuzhiyun      for example when that ``-native`` recipe depends on build tools
7344*4882a593Smuzhiyun      that are not relevant for the current recipe.
7345*4882a593Smuzhiyun
7346*4882a593Smuzhiyun      This way, irrelevant dependencies are ignored, which could have
7347*4882a593Smuzhiyun      prevented the reuse of prebuilt artifacts stored in the Shared
7348*4882a593Smuzhiyun      State Cache.
7349*4882a593Smuzhiyun
7350*4882a593Smuzhiyun      :term:`SSTATE_EXCLUDEDEPS_SYSROOT` is evaluated as two regular
7351*4882a593Smuzhiyun      expressions of recipe and dependency to ignore. An example
7352*4882a593Smuzhiyun      is the rule in :oe_git:`meta/conf/layer.conf </openembedded-core/tree/meta/conf/layer.conf>`::
7353*4882a593Smuzhiyun
7354*4882a593Smuzhiyun         # Nothing needs to depend on libc-initial
7355*4882a593Smuzhiyun         # base-passwd/shadow-sysroot don't need their dependencies
7356*4882a593Smuzhiyun         SSTATE_EXCLUDEDEPS_SYSROOT += "\
7357*4882a593Smuzhiyun             .*->.*-initial.* \
7358*4882a593Smuzhiyun             .*(base-passwd|shadow-sysroot)->.* \
7359*4882a593Smuzhiyun         "
7360*4882a593Smuzhiyun
7361*4882a593Smuzhiyun      The ``->`` substring represents the dependency between
7362*4882a593Smuzhiyun      the two regular expressions.
7363*4882a593Smuzhiyun
7364*4882a593Smuzhiyun   :term:`SSTATE_MIRROR_ALLOW_NETWORK`
7365*4882a593Smuzhiyun      If set to "1", allows fetches from mirrors that are specified in
7366*4882a593Smuzhiyun      :term:`SSTATE_MIRRORS` to work even when
7367*4882a593Smuzhiyun      fetching from the network is disabled by setting :term:`BB_NO_NETWORK` to
7368*4882a593Smuzhiyun      "1". Using the :term:`SSTATE_MIRROR_ALLOW_NETWORK` variable is useful if
7369*4882a593Smuzhiyun      you have set :term:`SSTATE_MIRRORS` to point to an internal server for
7370*4882a593Smuzhiyun      your shared state cache, but you want to disable any other fetching
7371*4882a593Smuzhiyun      from the network.
7372*4882a593Smuzhiyun
7373*4882a593Smuzhiyun   :term:`SSTATE_MIRRORS`
7374*4882a593Smuzhiyun      Configures the OpenEmbedded build system to search other mirror
7375*4882a593Smuzhiyun      locations for prebuilt cache data objects before building out the
7376*4882a593Smuzhiyun      data. This variable works like fetcher :term:`MIRRORS`
7377*4882a593Smuzhiyun      and :term:`PREMIRRORS` and points to the cache
7378*4882a593Smuzhiyun      locations to check for the shared state (sstate) objects.
7379*4882a593Smuzhiyun
7380*4882a593Smuzhiyun      You can specify a filesystem directory or a remote URL such as HTTP
7381*4882a593Smuzhiyun      or FTP. The locations you specify need to contain the shared state
7382*4882a593Smuzhiyun      cache (sstate-cache) results from previous builds. The sstate-cache
7383*4882a593Smuzhiyun      you point to can also be from builds on other machines.
7384*4882a593Smuzhiyun
7385*4882a593Smuzhiyun      When pointing to sstate build artifacts on another machine that uses
7386*4882a593Smuzhiyun      a different GCC version for native builds, you must configure
7387*4882a593Smuzhiyun      :term:`SSTATE_MIRRORS` with a regular expression that maps local search
7388*4882a593Smuzhiyun      paths to server paths. The paths need to take into account
7389*4882a593Smuzhiyun      :term:`NATIVELSBSTRING` set by the
7390*4882a593Smuzhiyun      :ref:`uninative <ref-classes-uninative>` class. For example, the
7391*4882a593Smuzhiyun      following maps the local search path ``universal-4.9`` to the
7392*4882a593Smuzhiyun      server-provided path server_url_sstate_path::
7393*4882a593Smuzhiyun
7394*4882a593Smuzhiyun         SSTATE_MIRRORS ?= "file://universal-4.9/(.*) https://server_url_sstate_path/universal-4.8/\1"
7395*4882a593Smuzhiyun
7396*4882a593Smuzhiyun      If a mirror uses the same structure as
7397*4882a593Smuzhiyun      :term:`SSTATE_DIR`, you need to add "PATH" at the
7398*4882a593Smuzhiyun      end as shown in the examples below. The build system substitutes the
7399*4882a593Smuzhiyun      correct path within the directory structure.
7400*4882a593Smuzhiyun      ::
7401*4882a593Smuzhiyun
7402*4882a593Smuzhiyun         SSTATE_MIRRORS ?= "\
7403*4882a593Smuzhiyun             file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
7404*4882a593Smuzhiyun             file://.* file:///some-local-dir/sstate/PATH"
7405*4882a593Smuzhiyun
7406*4882a593Smuzhiyun   :term:`SSTATE_SCAN_FILES`
7407*4882a593Smuzhiyun      Controls the list of files the OpenEmbedded build system scans for
7408*4882a593Smuzhiyun      hardcoded installation paths. The variable uses a space-separated
7409*4882a593Smuzhiyun      list of filenames (not paths) with standard wildcard characters
7410*4882a593Smuzhiyun      allowed.
7411*4882a593Smuzhiyun
7412*4882a593Smuzhiyun      During a build, the OpenEmbedded build system creates a shared state
7413*4882a593Smuzhiyun      (sstate) object during the first stage of preparing the sysroots.
7414*4882a593Smuzhiyun      That object is scanned for hardcoded paths for original installation
7415*4882a593Smuzhiyun      locations. The list of files that are scanned for paths is controlled
7416*4882a593Smuzhiyun      by the :term:`SSTATE_SCAN_FILES` variable. Typically, recipes add files
7417*4882a593Smuzhiyun      they want to be scanned to the value of :term:`SSTATE_SCAN_FILES` rather
7418*4882a593Smuzhiyun      than the variable being comprehensively set. The
7419*4882a593Smuzhiyun      :ref:`sstate <ref-classes-sstate>` class specifies the default list
7420*4882a593Smuzhiyun      of files.
7421*4882a593Smuzhiyun
7422*4882a593Smuzhiyun      For details on the process, see the
7423*4882a593Smuzhiyun      :ref:`staging <ref-classes-staging>` class.
7424*4882a593Smuzhiyun
7425*4882a593Smuzhiyun   :term:`STAGING_BASE_LIBDIR_NATIVE`
7426*4882a593Smuzhiyun      Specifies the path to the ``/lib`` subdirectory of the sysroot
7427*4882a593Smuzhiyun      directory for the build host.
7428*4882a593Smuzhiyun
7429*4882a593Smuzhiyun   :term:`STAGING_BASELIBDIR`
7430*4882a593Smuzhiyun      Specifies the path to the ``/lib`` subdirectory of the sysroot
7431*4882a593Smuzhiyun      directory for the target for which the current recipe is being built
7432*4882a593Smuzhiyun      (:term:`STAGING_DIR_HOST`).
7433*4882a593Smuzhiyun
7434*4882a593Smuzhiyun   :term:`STAGING_BINDIR`
7435*4882a593Smuzhiyun      Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7436*4882a593Smuzhiyun      directory for the target for which the current recipe is being built
7437*4882a593Smuzhiyun      (:term:`STAGING_DIR_HOST`).
7438*4882a593Smuzhiyun
7439*4882a593Smuzhiyun   :term:`STAGING_BINDIR_CROSS`
7440*4882a593Smuzhiyun      Specifies the path to the directory containing binary configuration
7441*4882a593Smuzhiyun      scripts. These scripts provide configuration information for other
7442*4882a593Smuzhiyun      software that wants to make use of libraries or include files
7443*4882a593Smuzhiyun      provided by the software associated with the script.
7444*4882a593Smuzhiyun
7445*4882a593Smuzhiyun      .. note::
7446*4882a593Smuzhiyun
7447*4882a593Smuzhiyun         This style of build configuration has been largely replaced by
7448*4882a593Smuzhiyun         ``pkg-config``. Consequently, if ``pkg-config`` is supported by the
7449*4882a593Smuzhiyun         library to which you are linking, it is recommended you use
7450*4882a593Smuzhiyun         ``pkg-config`` instead of a provided configuration script.
7451*4882a593Smuzhiyun
7452*4882a593Smuzhiyun   :term:`STAGING_BINDIR_NATIVE`
7453*4882a593Smuzhiyun      Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
7454*4882a593Smuzhiyun      directory for the build host.
7455*4882a593Smuzhiyun
7456*4882a593Smuzhiyun   :term:`STAGING_DATADIR`
7457*4882a593Smuzhiyun      Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7458*4882a593Smuzhiyun      directory for the target for which the current recipe is being built
7459*4882a593Smuzhiyun      (:term:`STAGING_DIR_HOST`).
7460*4882a593Smuzhiyun
7461*4882a593Smuzhiyun   :term:`STAGING_DATADIR_NATIVE`
7462*4882a593Smuzhiyun      Specifies the path to the ``/usr/share`` subdirectory of the sysroot
7463*4882a593Smuzhiyun      directory for the build host.
7464*4882a593Smuzhiyun
7465*4882a593Smuzhiyun   :term:`STAGING_DIR`
7466*4882a593Smuzhiyun      Helps construct the ``recipe-sysroots`` directory, which is used
7467*4882a593Smuzhiyun      during packaging.
7468*4882a593Smuzhiyun
7469*4882a593Smuzhiyun      For information on how staging for recipe-specific sysroots occurs,
7470*4882a593Smuzhiyun      see the :ref:`ref-tasks-populate_sysroot`
7471*4882a593Smuzhiyun      task, the ":ref:`sdk-manual/extensible:sharing files between recipes`"
7472*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual, the
7473*4882a593Smuzhiyun      ":ref:`overview-manual/concepts:configuration, compilation, and staging`"
7474*4882a593Smuzhiyun      section in the Yocto Project Overview and Concepts Manual, and the
7475*4882a593Smuzhiyun      :term:`SYSROOT_DIRS` variable.
7476*4882a593Smuzhiyun
7477*4882a593Smuzhiyun      .. note::
7478*4882a593Smuzhiyun
7479*4882a593Smuzhiyun         Recipes should never write files directly under the :term:`STAGING_DIR`
7480*4882a593Smuzhiyun         directory because the OpenEmbedded build system manages the
7481*4882a593Smuzhiyun         directory automatically. Instead, files should be installed to
7482*4882a593Smuzhiyun         ``${``\ :term:`D`\ ``}`` within your recipe's :ref:`ref-tasks-install`
7483*4882a593Smuzhiyun         task and then the OpenEmbedded build system will stage a subset of
7484*4882a593Smuzhiyun         those files into the sysroot.
7485*4882a593Smuzhiyun
7486*4882a593Smuzhiyun   :term:`STAGING_DIR_HOST`
7487*4882a593Smuzhiyun      Specifies the path to the sysroot directory for the system on which
7488*4882a593Smuzhiyun      the component is built to run (the system that hosts the component).
7489*4882a593Smuzhiyun      For most recipes, this sysroot is the one in which that recipe's
7490*4882a593Smuzhiyun      :ref:`ref-tasks-populate_sysroot` task copies
7491*4882a593Smuzhiyun      files. Exceptions include ``-native`` recipes, where the
7492*4882a593Smuzhiyun      ``do_populate_sysroot`` task instead uses
7493*4882a593Smuzhiyun      :term:`STAGING_DIR_NATIVE`. Depending on
7494*4882a593Smuzhiyun      the type of recipe and the build target, :term:`STAGING_DIR_HOST` can
7495*4882a593Smuzhiyun      have the following values:
7496*4882a593Smuzhiyun
7497*4882a593Smuzhiyun      -  For recipes building for the target machine, the value is
7498*4882a593Smuzhiyun         "${:term:`STAGING_DIR`}/${:term:`MACHINE`}".
7499*4882a593Smuzhiyun
7500*4882a593Smuzhiyun      -  For native recipes building for the build host, the value is empty
7501*4882a593Smuzhiyun         given the assumption that when building for the build host, the
7502*4882a593Smuzhiyun         build host's own directories should be used.
7503*4882a593Smuzhiyun
7504*4882a593Smuzhiyun         .. note::
7505*4882a593Smuzhiyun
7506*4882a593Smuzhiyun            ``-native`` recipes are not installed into host paths like such
7507*4882a593Smuzhiyun            as ``/usr``. Rather, these recipes are installed into
7508*4882a593Smuzhiyun            :term:`STAGING_DIR_NATIVE`. When compiling ``-native`` recipes,
7509*4882a593Smuzhiyun            standard build environment variables such as
7510*4882a593Smuzhiyun            :term:`CPPFLAGS` and
7511*4882a593Smuzhiyun            :term:`CFLAGS` are set up so that both host paths
7512*4882a593Smuzhiyun            and :term:`STAGING_DIR_NATIVE` are searched for libraries and
7513*4882a593Smuzhiyun            headers using, for example, GCC's ``-isystem`` option.
7514*4882a593Smuzhiyun
7515*4882a593Smuzhiyun            Thus, the emphasis is that the ``STAGING_DIR*`` variables
7516*4882a593Smuzhiyun            should be viewed as input variables by tasks such as
7517*4882a593Smuzhiyun            :ref:`ref-tasks-configure`,
7518*4882a593Smuzhiyun            :ref:`ref-tasks-compile`, and
7519*4882a593Smuzhiyun            :ref:`ref-tasks-install`. Having the real system
7520*4882a593Smuzhiyun            root correspond to :term:`STAGING_DIR_HOST` makes conceptual sense
7521*4882a593Smuzhiyun            for ``-native`` recipes, as they make use of host headers and
7522*4882a593Smuzhiyun            libraries.
7523*4882a593Smuzhiyun
7524*4882a593Smuzhiyun   :term:`STAGING_DIR_NATIVE`
7525*4882a593Smuzhiyun      Specifies the path to the sysroot directory used when building
7526*4882a593Smuzhiyun      components that run on the build host itself.
7527*4882a593Smuzhiyun
7528*4882a593Smuzhiyun   :term:`STAGING_DIR_TARGET`
7529*4882a593Smuzhiyun      Specifies the path to the sysroot used for the system for which the
7530*4882a593Smuzhiyun      component generates code. For components that do not generate code,
7531*4882a593Smuzhiyun      which is the majority, :term:`STAGING_DIR_TARGET` is set to match
7532*4882a593Smuzhiyun      :term:`STAGING_DIR_HOST`.
7533*4882a593Smuzhiyun
7534*4882a593Smuzhiyun      Some recipes build binaries that can run on the target system but
7535*4882a593Smuzhiyun      those binaries in turn generate code for another different system
7536*4882a593Smuzhiyun      (e.g. cross-canadian recipes). Using terminology from GNU, the
7537*4882a593Smuzhiyun      primary system is referred to as the "HOST" and the secondary, or
7538*4882a593Smuzhiyun      different, system is referred to as the "TARGET". Thus, the binaries
7539*4882a593Smuzhiyun      run on the "HOST" system and generate binaries for the "TARGET"
7540*4882a593Smuzhiyun      system. The :term:`STAGING_DIR_HOST` variable points to the sysroot used
7541*4882a593Smuzhiyun      for the "HOST" system, while :term:`STAGING_DIR_TARGET` points to the
7542*4882a593Smuzhiyun      sysroot used for the "TARGET" system.
7543*4882a593Smuzhiyun
7544*4882a593Smuzhiyun   :term:`STAGING_ETCDIR_NATIVE`
7545*4882a593Smuzhiyun      Specifies the path to the ``/etc`` subdirectory of the sysroot
7546*4882a593Smuzhiyun      directory for the build host.
7547*4882a593Smuzhiyun
7548*4882a593Smuzhiyun   :term:`STAGING_EXECPREFIXDIR`
7549*4882a593Smuzhiyun      Specifies the path to the ``/usr`` subdirectory of the sysroot
7550*4882a593Smuzhiyun      directory for the target for which the current recipe is being built
7551*4882a593Smuzhiyun      (:term:`STAGING_DIR_HOST`).
7552*4882a593Smuzhiyun
7553*4882a593Smuzhiyun   :term:`STAGING_INCDIR`
7554*4882a593Smuzhiyun      Specifies the path to the ``/usr/include`` subdirectory of the
7555*4882a593Smuzhiyun      sysroot directory for the target for which the current recipe being
7556*4882a593Smuzhiyun      built (:term:`STAGING_DIR_HOST`).
7557*4882a593Smuzhiyun
7558*4882a593Smuzhiyun   :term:`STAGING_INCDIR_NATIVE`
7559*4882a593Smuzhiyun      Specifies the path to the ``/usr/include`` subdirectory of the
7560*4882a593Smuzhiyun      sysroot directory for the build host.
7561*4882a593Smuzhiyun
7562*4882a593Smuzhiyun   :term:`STAGING_KERNEL_BUILDDIR`
7563*4882a593Smuzhiyun      Points to the directory containing the kernel build artifacts.
7564*4882a593Smuzhiyun      Recipes building software that needs to access kernel build artifacts
7565*4882a593Smuzhiyun      (e.g. ``systemtap-uprobes``) can look in the directory specified with
7566*4882a593Smuzhiyun      the :term:`STAGING_KERNEL_BUILDDIR` variable to find these artifacts
7567*4882a593Smuzhiyun      after the kernel has been built.
7568*4882a593Smuzhiyun
7569*4882a593Smuzhiyun   :term:`STAGING_KERNEL_DIR`
7570*4882a593Smuzhiyun      The directory with kernel headers that are required to build
7571*4882a593Smuzhiyun      out-of-tree modules.
7572*4882a593Smuzhiyun
7573*4882a593Smuzhiyun   :term:`STAGING_LIBDIR`
7574*4882a593Smuzhiyun      Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7575*4882a593Smuzhiyun      directory for the target for which the current recipe is being built
7576*4882a593Smuzhiyun      (:term:`STAGING_DIR_HOST`).
7577*4882a593Smuzhiyun
7578*4882a593Smuzhiyun   :term:`STAGING_LIBDIR_NATIVE`
7579*4882a593Smuzhiyun      Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
7580*4882a593Smuzhiyun      directory for the build host.
7581*4882a593Smuzhiyun
7582*4882a593Smuzhiyun   :term:`STAMP`
7583*4882a593Smuzhiyun      Specifies the base path used to create recipe stamp files. The path
7584*4882a593Smuzhiyun      to an actual stamp file is constructed by evaluating this string and
7585*4882a593Smuzhiyun      then appending additional information. Currently, the default
7586*4882a593Smuzhiyun      assignment for :term:`STAMP` as set in the ``meta/conf/bitbake.conf``
7587*4882a593Smuzhiyun      file is::
7588*4882a593Smuzhiyun
7589*4882a593Smuzhiyun         STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
7590*4882a593Smuzhiyun
7591*4882a593Smuzhiyun      For information on how BitBake uses stamp files to determine if a
7592*4882a593Smuzhiyun      task should be rerun, see the
7593*4882a593Smuzhiyun      ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`"
7594*4882a593Smuzhiyun      section in the Yocto Project Overview and Concepts Manual.
7595*4882a593Smuzhiyun
7596*4882a593Smuzhiyun      See :term:`STAMPS_DIR`,
7597*4882a593Smuzhiyun      :term:`MULTIMACH_TARGET_SYS`,
7598*4882a593Smuzhiyun      :term:`PN`, :term:`EXTENDPE`,
7599*4882a593Smuzhiyun      :term:`PV`, and :term:`PR` for related variable
7600*4882a593Smuzhiyun      information.
7601*4882a593Smuzhiyun
7602*4882a593Smuzhiyun   :term:`STAMPS_DIR`
7603*4882a593Smuzhiyun      Specifies the base directory in which the OpenEmbedded build system
7604*4882a593Smuzhiyun      places stamps. The default directory is ``${TMPDIR}/stamps``.
7605*4882a593Smuzhiyun
7606*4882a593Smuzhiyun   :term:`STRIP`
7607*4882a593Smuzhiyun      The minimal command and arguments to run ``strip``, which is used to
7608*4882a593Smuzhiyun      strip symbols.
7609*4882a593Smuzhiyun
7610*4882a593Smuzhiyun   :term:`SUMMARY`
7611*4882a593Smuzhiyun      The short (72 characters or less) summary of the binary package for
7612*4882a593Smuzhiyun      packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default,
7613*4882a593Smuzhiyun      :term:`SUMMARY` is used to define the
7614*4882a593Smuzhiyun      :term:`DESCRIPTION` variable if :term:`DESCRIPTION` is
7615*4882a593Smuzhiyun      not set in the recipe.
7616*4882a593Smuzhiyun
7617*4882a593Smuzhiyun   :term:`SVNDIR`
7618*4882a593Smuzhiyun      The directory in which files checked out of a Subversion system are
7619*4882a593Smuzhiyun      stored.
7620*4882a593Smuzhiyun
7621*4882a593Smuzhiyun   :term:`SYSLINUX_DEFAULT_CONSOLE`
7622*4882a593Smuzhiyun      Specifies the kernel boot default console. If you want to use a
7623*4882a593Smuzhiyun      console other than the default, set this variable in your recipe as
7624*4882a593Smuzhiyun      follows where "X" is the console number you want to use::
7625*4882a593Smuzhiyun
7626*4882a593Smuzhiyun         SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
7627*4882a593Smuzhiyun
7628*4882a593Smuzhiyun      The :ref:`syslinux <ref-classes-syslinux>` class initially sets
7629*4882a593Smuzhiyun      this variable to null but then checks for a value later.
7630*4882a593Smuzhiyun
7631*4882a593Smuzhiyun   :term:`SYSLINUX_OPTS`
7632*4882a593Smuzhiyun      Lists additional options to add to the syslinux file. You need to set
7633*4882a593Smuzhiyun      this variable in your recipe. If you want to list multiple options,
7634*4882a593Smuzhiyun      separate the options with a semicolon character (``;``).
7635*4882a593Smuzhiyun
7636*4882a593Smuzhiyun      The :ref:`syslinux <ref-classes-syslinux>` class uses this variable
7637*4882a593Smuzhiyun      to create a set of options.
7638*4882a593Smuzhiyun
7639*4882a593Smuzhiyun   :term:`SYSLINUX_SERIAL`
7640*4882a593Smuzhiyun      Specifies the alternate serial port or turns it off. To turn off
7641*4882a593Smuzhiyun      serial, set this variable to an empty string in your recipe. The
7642*4882a593Smuzhiyun      variable's default value is set in the
7643*4882a593Smuzhiyun      :ref:`syslinux <ref-classes-syslinux>` class as follows::
7644*4882a593Smuzhiyun
7645*4882a593Smuzhiyun         SYSLINUX_SERIAL ?= "0 115200"
7646*4882a593Smuzhiyun
7647*4882a593Smuzhiyun      The class checks for and uses the variable as needed.
7648*4882a593Smuzhiyun
7649*4882a593Smuzhiyun   :term:`SYSLINUX_SERIAL_TTY`
7650*4882a593Smuzhiyun      Specifies the alternate console=tty... kernel boot argument. The
7651*4882a593Smuzhiyun      variable's default value is set in the
7652*4882a593Smuzhiyun      :ref:`syslinux <ref-classes-syslinux>` class as follows::
7653*4882a593Smuzhiyun
7654*4882a593Smuzhiyun         SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
7655*4882a593Smuzhiyun
7656*4882a593Smuzhiyun      The class checks for and uses the variable as needed.
7657*4882a593Smuzhiyun
7658*4882a593Smuzhiyun   :term:`SYSLINUX_SPLASH`
7659*4882a593Smuzhiyun      An ``.LSS`` file used as the background for the VGA boot menu when
7660*4882a593Smuzhiyun      you use the boot menu. You need to set this variable in your recipe.
7661*4882a593Smuzhiyun
7662*4882a593Smuzhiyun      The :ref:`syslinux <ref-classes-syslinux>` class checks for this
7663*4882a593Smuzhiyun      variable and if found, the OpenEmbedded build system installs the
7664*4882a593Smuzhiyun      splash screen.
7665*4882a593Smuzhiyun
7666*4882a593Smuzhiyun   :term:`SYSROOT_DESTDIR`
7667*4882a593Smuzhiyun      Points to the temporary directory under the work directory (default
7668*4882a593Smuzhiyun      "``${``\ :term:`WORKDIR`\ ``}/sysroot-destdir``")
7669*4882a593Smuzhiyun      where the files populated into the sysroot are assembled during the
7670*4882a593Smuzhiyun      :ref:`ref-tasks-populate_sysroot` task.
7671*4882a593Smuzhiyun
7672*4882a593Smuzhiyun   :term:`SYSROOT_DIRS`
7673*4882a593Smuzhiyun      Directories that are staged into the sysroot by the
7674*4882a593Smuzhiyun      :ref:`ref-tasks-populate_sysroot` task. By
7675*4882a593Smuzhiyun      default, the following directories are staged::
7676*4882a593Smuzhiyun
7677*4882a593Smuzhiyun         SYSROOT_DIRS = " \
7678*4882a593Smuzhiyun             ${includedir} \
7679*4882a593Smuzhiyun             ${libdir} \
7680*4882a593Smuzhiyun             ${base_libdir} \
7681*4882a593Smuzhiyun             ${nonarch_base_libdir} \
7682*4882a593Smuzhiyun             ${datadir} \
7683*4882a593Smuzhiyun             /sysroot-only \
7684*4882a593Smuzhiyun             "
7685*4882a593Smuzhiyun
7686*4882a593Smuzhiyun   :term:`SYSROOT_DIRS_IGNORE`
7687*4882a593Smuzhiyun      Directories that are not staged into the sysroot by the
7688*4882a593Smuzhiyun      :ref:`ref-tasks-populate_sysroot` task. You
7689*4882a593Smuzhiyun      can use this variable to exclude certain subdirectories of
7690*4882a593Smuzhiyun      directories listed in :term:`SYSROOT_DIRS` from
7691*4882a593Smuzhiyun      staging. By default, the following directories are not staged::
7692*4882a593Smuzhiyun
7693*4882a593Smuzhiyun         SYSROOT_DIRS_IGNORE = " \
7694*4882a593Smuzhiyun             ${mandir} \
7695*4882a593Smuzhiyun             ${docdir} \
7696*4882a593Smuzhiyun             ${infodir} \
7697*4882a593Smuzhiyun             ${datadir}/X11/locale \
7698*4882a593Smuzhiyun             ${datadir}/applications \
7699*4882a593Smuzhiyun             ${datadir}/bash-completion \
7700*4882a593Smuzhiyun             ${datadir}/fonts \
7701*4882a593Smuzhiyun             ${datadir}/gtk-doc/html \
7702*4882a593Smuzhiyun             ${datadir}/installed-tests \
7703*4882a593Smuzhiyun             ${datadir}/locale \
7704*4882a593Smuzhiyun             ${datadir}/pixmaps \
7705*4882a593Smuzhiyun             ${datadir}/terminfo \
7706*4882a593Smuzhiyun             ${libdir}/${BPN}/ptest \
7707*4882a593Smuzhiyun             "
7708*4882a593Smuzhiyun
7709*4882a593Smuzhiyun   :term:`SYSROOT_DIRS_NATIVE`
7710*4882a593Smuzhiyun      Extra directories staged into the sysroot by the
7711*4882a593Smuzhiyun      :ref:`ref-tasks-populate_sysroot` task for
7712*4882a593Smuzhiyun      ``-native`` recipes, in addition to those specified in
7713*4882a593Smuzhiyun      :term:`SYSROOT_DIRS`. By default, the following
7714*4882a593Smuzhiyun      extra directories are staged::
7715*4882a593Smuzhiyun
7716*4882a593Smuzhiyun         SYSROOT_DIRS_NATIVE = " \
7717*4882a593Smuzhiyun             ${bindir} \
7718*4882a593Smuzhiyun             ${sbindir} \
7719*4882a593Smuzhiyun             ${base_bindir} \
7720*4882a593Smuzhiyun             ${base_sbindir} \
7721*4882a593Smuzhiyun             ${libexecdir} \
7722*4882a593Smuzhiyun             ${sysconfdir} \
7723*4882a593Smuzhiyun             ${localstatedir} \
7724*4882a593Smuzhiyun             "
7725*4882a593Smuzhiyun
7726*4882a593Smuzhiyun      .. note::
7727*4882a593Smuzhiyun
7728*4882a593Smuzhiyun         Programs built by ``-native`` recipes run directly from the sysroot
7729*4882a593Smuzhiyun         (:term:`STAGING_DIR_NATIVE`), which is why additional directories
7730*4882a593Smuzhiyun         containing program executables and supporting files need to be staged.
7731*4882a593Smuzhiyun
7732*4882a593Smuzhiyun   :term:`SYSROOT_PREPROCESS_FUNCS`
7733*4882a593Smuzhiyun      A list of functions to execute after files are staged into the
7734*4882a593Smuzhiyun      sysroot. These functions are usually used to apply additional
7735*4882a593Smuzhiyun      processing on the staged files, or to stage additional files.
7736*4882a593Smuzhiyun
7737*4882a593Smuzhiyun   :term:`SYSTEMD_AUTO_ENABLE`
7738*4882a593Smuzhiyun      When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7739*4882a593Smuzhiyun      this variable specifies whether the specified service in
7740*4882a593Smuzhiyun      :term:`SYSTEMD_SERVICE` should start
7741*4882a593Smuzhiyun      automatically or not. By default, the service is enabled to
7742*4882a593Smuzhiyun      automatically start at boot time. The default setting is in the
7743*4882a593Smuzhiyun      :ref:`systemd <ref-classes-systemd>` class as follows::
7744*4882a593Smuzhiyun
7745*4882a593Smuzhiyun         SYSTEMD_AUTO_ENABLE ??= "enable"
7746*4882a593Smuzhiyun
7747*4882a593Smuzhiyun      You can disable the service by setting the variable to "disable".
7748*4882a593Smuzhiyun
7749*4882a593Smuzhiyun   :term:`SYSTEMD_BOOT_CFG`
7750*4882a593Smuzhiyun      When :term:`EFI_PROVIDER` is set to
7751*4882a593Smuzhiyun      "systemd-boot", the :term:`SYSTEMD_BOOT_CFG` variable specifies the
7752*4882a593Smuzhiyun      configuration file that should be used. By default, the
7753*4882a593Smuzhiyun      :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
7754*4882a593Smuzhiyun      :term:`SYSTEMD_BOOT_CFG` as follows::
7755*4882a593Smuzhiyun
7756*4882a593Smuzhiyun         SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
7757*4882a593Smuzhiyun
7758*4882a593Smuzhiyun      For information on Systemd-boot, see the `Systemd-boot
7759*4882a593Smuzhiyun      documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
7760*4882a593Smuzhiyun
7761*4882a593Smuzhiyun   :term:`SYSTEMD_BOOT_ENTRIES`
7762*4882a593Smuzhiyun      When :term:`EFI_PROVIDER` is set to
7763*4882a593Smuzhiyun      "systemd-boot", the :term:`SYSTEMD_BOOT_ENTRIES` variable specifies a
7764*4882a593Smuzhiyun      list of entry files (``*.conf``) to install that contain one boot
7765*4882a593Smuzhiyun      entry per file. By default, the
7766*4882a593Smuzhiyun      :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
7767*4882a593Smuzhiyun      :term:`SYSTEMD_BOOT_ENTRIES` as follows::
7768*4882a593Smuzhiyun
7769*4882a593Smuzhiyun          SYSTEMD_BOOT_ENTRIES ?= ""
7770*4882a593Smuzhiyun
7771*4882a593Smuzhiyun      For information on Systemd-boot, see the `Systemd-boot
7772*4882a593Smuzhiyun      documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
7773*4882a593Smuzhiyun
7774*4882a593Smuzhiyun   :term:`SYSTEMD_BOOT_TIMEOUT`
7775*4882a593Smuzhiyun      When :term:`EFI_PROVIDER` is set to
7776*4882a593Smuzhiyun      "systemd-boot", the :term:`SYSTEMD_BOOT_TIMEOUT` variable specifies the
7777*4882a593Smuzhiyun      boot menu timeout in seconds. By default, the
7778*4882a593Smuzhiyun      :ref:`systemd-boot <ref-classes-systemd-boot>` class sets the
7779*4882a593Smuzhiyun      :term:`SYSTEMD_BOOT_TIMEOUT` as follows::
7780*4882a593Smuzhiyun
7781*4882a593Smuzhiyun         SYSTEMD_BOOT_TIMEOUT ?= "10"
7782*4882a593Smuzhiyun
7783*4882a593Smuzhiyun      For information on Systemd-boot, see the `Systemd-boot
7784*4882a593Smuzhiyun      documentation <https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
7785*4882a593Smuzhiyun
7786*4882a593Smuzhiyun   :term:`SYSTEMD_PACKAGES`
7787*4882a593Smuzhiyun      When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7788*4882a593Smuzhiyun      this variable locates the systemd unit files when they are not found
7789*4882a593Smuzhiyun      in the main recipe's package. By default, the :term:`SYSTEMD_PACKAGES`
7790*4882a593Smuzhiyun      variable is set such that the systemd unit files are assumed to
7791*4882a593Smuzhiyun      reside in the recipes main package::
7792*4882a593Smuzhiyun
7793*4882a593Smuzhiyun         SYSTEMD_PACKAGES ?= "${PN}"
7794*4882a593Smuzhiyun
7795*4882a593Smuzhiyun      If these unit files are not in this recipe's main package, you need
7796*4882a593Smuzhiyun      to use :term:`SYSTEMD_PACKAGES` to list the package or packages in which
7797*4882a593Smuzhiyun      the build system can find the systemd unit files.
7798*4882a593Smuzhiyun
7799*4882a593Smuzhiyun   :term:`SYSTEMD_SERVICE`
7800*4882a593Smuzhiyun      When inheriting the :ref:`systemd <ref-classes-systemd>` class,
7801*4882a593Smuzhiyun      this variable specifies the systemd service name for a package.
7802*4882a593Smuzhiyun
7803*4882a593Smuzhiyun      When you specify this file in your recipe, use a package name
7804*4882a593Smuzhiyun      override to indicate the package to which the value applies. Here is
7805*4882a593Smuzhiyun      an example from the connman recipe::
7806*4882a593Smuzhiyun
7807*4882a593Smuzhiyun         SYSTEMD_SERVICE:${PN} = "connman.service"
7808*4882a593Smuzhiyun
7809*4882a593Smuzhiyun   :term:`SYSVINIT_ENABLED_GETTYS`
7810*4882a593Smuzhiyun      When using
7811*4882a593Smuzhiyun      :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
7812*4882a593Smuzhiyun      specifies a space-separated list of the virtual terminals that should
7813*4882a593Smuzhiyun      run a `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__
7814*4882a593Smuzhiyun      (allowing login), assuming :term:`USE_VT` is not set to
7815*4882a593Smuzhiyun      "0".
7816*4882a593Smuzhiyun
7817*4882a593Smuzhiyun      The default value for :term:`SYSVINIT_ENABLED_GETTYS` is "1" (i.e. only
7818*4882a593Smuzhiyun      run a getty on the first virtual terminal).
7819*4882a593Smuzhiyun
7820*4882a593Smuzhiyun   :term:`T`
7821*4882a593Smuzhiyun      This variable points to a directory were BitBake places temporary
7822*4882a593Smuzhiyun      files, which consist mostly of task logs and scripts, when building a
7823*4882a593Smuzhiyun      particular recipe. The variable is typically set as follows::
7824*4882a593Smuzhiyun
7825*4882a593Smuzhiyun         T = "${WORKDIR}/temp"
7826*4882a593Smuzhiyun
7827*4882a593Smuzhiyun      The :term:`WORKDIR` is the directory into which
7828*4882a593Smuzhiyun      BitBake unpacks and builds the recipe. The default ``bitbake.conf``
7829*4882a593Smuzhiyun      file sets this variable.
7830*4882a593Smuzhiyun
7831*4882a593Smuzhiyun      The :term:`T` variable is not to be confused with the
7832*4882a593Smuzhiyun      :term:`TMPDIR` variable, which points to the root of
7833*4882a593Smuzhiyun      the directory tree where BitBake places the output of an entire
7834*4882a593Smuzhiyun      build.
7835*4882a593Smuzhiyun
7836*4882a593Smuzhiyun   :term:`TARGET_ARCH`
7837*4882a593Smuzhiyun      The target machine's architecture. The OpenEmbedded build system
7838*4882a593Smuzhiyun      supports many architectures. Here is an example list of architectures
7839*4882a593Smuzhiyun      supported. This list is by no means complete as the architecture is
7840*4882a593Smuzhiyun      configurable:
7841*4882a593Smuzhiyun
7842*4882a593Smuzhiyun      - arm
7843*4882a593Smuzhiyun      - i586
7844*4882a593Smuzhiyun      - x86_64
7845*4882a593Smuzhiyun      - powerpc
7846*4882a593Smuzhiyun      - powerpc64
7847*4882a593Smuzhiyun      - mips
7848*4882a593Smuzhiyun      - mipsel
7849*4882a593Smuzhiyun
7850*4882a593Smuzhiyun      For additional information on machine architectures, see the
7851*4882a593Smuzhiyun      :term:`TUNE_ARCH` variable.
7852*4882a593Smuzhiyun
7853*4882a593Smuzhiyun   :term:`TARGET_AS_ARCH`
7854*4882a593Smuzhiyun      Specifies architecture-specific assembler flags for the target
7855*4882a593Smuzhiyun      system. :term:`TARGET_AS_ARCH` is initialized from
7856*4882a593Smuzhiyun      :term:`TUNE_ASARGS` by default in the BitBake
7857*4882a593Smuzhiyun      configuration file (``meta/conf/bitbake.conf``)::
7858*4882a593Smuzhiyun
7859*4882a593Smuzhiyun         TARGET_AS_ARCH = "${TUNE_ASARGS}"
7860*4882a593Smuzhiyun
7861*4882a593Smuzhiyun   :term:`TARGET_CC_ARCH`
7862*4882a593Smuzhiyun      Specifies architecture-specific C compiler flags for the target
7863*4882a593Smuzhiyun      system. :term:`TARGET_CC_ARCH` is initialized from
7864*4882a593Smuzhiyun      :term:`TUNE_CCARGS` by default.
7865*4882a593Smuzhiyun
7866*4882a593Smuzhiyun      .. note::
7867*4882a593Smuzhiyun
7868*4882a593Smuzhiyun         It is a common workaround to append :term:`LDFLAGS` to
7869*4882a593Smuzhiyun         :term:`TARGET_CC_ARCH` in recipes that build software for the target that
7870*4882a593Smuzhiyun         would not otherwise respect the exported :term:`LDFLAGS` variable.
7871*4882a593Smuzhiyun
7872*4882a593Smuzhiyun   :term:`TARGET_CC_KERNEL_ARCH`
7873*4882a593Smuzhiyun      This is a specific kernel compiler flag for a CPU or Application
7874*4882a593Smuzhiyun      Binary Interface (ABI) tune. The flag is used rarely and only for
7875*4882a593Smuzhiyun      cases where a userspace :term:`TUNE_CCARGS` is not
7876*4882a593Smuzhiyun      compatible with the kernel compilation. The :term:`TARGET_CC_KERNEL_ARCH`
7877*4882a593Smuzhiyun      variable allows the kernel (and associated modules) to use a
7878*4882a593Smuzhiyun      different configuration. See the
7879*4882a593Smuzhiyun      ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the
7880*4882a593Smuzhiyun      :term:`Source Directory` for an example.
7881*4882a593Smuzhiyun
7882*4882a593Smuzhiyun   :term:`TARGET_CFLAGS`
7883*4882a593Smuzhiyun      Specifies the flags to pass to the C compiler when building for the
7884*4882a593Smuzhiyun      target. When building in the target context,
7885*4882a593Smuzhiyun      :term:`CFLAGS` is set to the value of this variable by
7886*4882a593Smuzhiyun      default.
7887*4882a593Smuzhiyun
7888*4882a593Smuzhiyun      Additionally, the SDK's environment setup script sets the :term:`CFLAGS`
7889*4882a593Smuzhiyun      variable in the environment to the :term:`TARGET_CFLAGS` value so that
7890*4882a593Smuzhiyun      executables built using the SDK also have the flags applied.
7891*4882a593Smuzhiyun
7892*4882a593Smuzhiyun   :term:`TARGET_CPPFLAGS`
7893*4882a593Smuzhiyun      Specifies the flags to pass to the C pre-processor (i.e. to both the
7894*4882a593Smuzhiyun      C and the C++ compilers) when building for the target. When building
7895*4882a593Smuzhiyun      in the target context, :term:`CPPFLAGS` is set to the
7896*4882a593Smuzhiyun      value of this variable by default.
7897*4882a593Smuzhiyun
7898*4882a593Smuzhiyun      Additionally, the SDK's environment setup script sets the
7899*4882a593Smuzhiyun      :term:`CPPFLAGS` variable in the environment to the :term:`TARGET_CPPFLAGS`
7900*4882a593Smuzhiyun      value so that executables built using the SDK also have the flags
7901*4882a593Smuzhiyun      applied.
7902*4882a593Smuzhiyun
7903*4882a593Smuzhiyun   :term:`TARGET_CXXFLAGS`
7904*4882a593Smuzhiyun      Specifies the flags to pass to the C++ compiler when building for the
7905*4882a593Smuzhiyun      target. When building in the target context,
7906*4882a593Smuzhiyun      :term:`CXXFLAGS` is set to the value of this variable
7907*4882a593Smuzhiyun      by default.
7908*4882a593Smuzhiyun
7909*4882a593Smuzhiyun      Additionally, the SDK's environment setup script sets the
7910*4882a593Smuzhiyun      :term:`CXXFLAGS` variable in the environment to the :term:`TARGET_CXXFLAGS`
7911*4882a593Smuzhiyun      value so that executables built using the SDK also have the flags
7912*4882a593Smuzhiyun      applied.
7913*4882a593Smuzhiyun
7914*4882a593Smuzhiyun   :term:`TARGET_FPU`
7915*4882a593Smuzhiyun      Specifies the method for handling FPU code. For FPU-less targets,
7916*4882a593Smuzhiyun      which include most ARM CPUs, the variable must be set to "soft". If
7917*4882a593Smuzhiyun      not, the kernel emulation gets used, which results in a performance
7918*4882a593Smuzhiyun      penalty.
7919*4882a593Smuzhiyun
7920*4882a593Smuzhiyun   :term:`TARGET_LD_ARCH`
7921*4882a593Smuzhiyun      Specifies architecture-specific linker flags for the target system.
7922*4882a593Smuzhiyun      :term:`TARGET_LD_ARCH` is initialized from
7923*4882a593Smuzhiyun      :term:`TUNE_LDARGS` by default in the BitBake
7924*4882a593Smuzhiyun      configuration file (``meta/conf/bitbake.conf``)::
7925*4882a593Smuzhiyun
7926*4882a593Smuzhiyun         TARGET_LD_ARCH = "${TUNE_LDARGS}"
7927*4882a593Smuzhiyun
7928*4882a593Smuzhiyun   :term:`TARGET_LDFLAGS`
7929*4882a593Smuzhiyun      Specifies the flags to pass to the linker when building for the
7930*4882a593Smuzhiyun      target. When building in the target context,
7931*4882a593Smuzhiyun      :term:`LDFLAGS` is set to the value of this variable
7932*4882a593Smuzhiyun      by default.
7933*4882a593Smuzhiyun
7934*4882a593Smuzhiyun      Additionally, the SDK's environment setup script sets the
7935*4882a593Smuzhiyun      :term:`LDFLAGS` variable in the environment to the
7936*4882a593Smuzhiyun      :term:`TARGET_LDFLAGS` value so that executables built using the SDK also
7937*4882a593Smuzhiyun      have the flags applied.
7938*4882a593Smuzhiyun
7939*4882a593Smuzhiyun   :term:`TARGET_OS`
7940*4882a593Smuzhiyun      Specifies the target's operating system. The variable can be set to
7941*4882a593Smuzhiyun      "linux" for glibc-based systems (GNU C Library) and to "linux-musl"
7942*4882a593Smuzhiyun      for musl libc. For ARM/EABI targets, the possible values are
7943*4882a593Smuzhiyun      "linux-gnueabi" and "linux-musleabi".
7944*4882a593Smuzhiyun
7945*4882a593Smuzhiyun   :term:`TARGET_PREFIX`
7946*4882a593Smuzhiyun      Specifies the prefix used for the toolchain binary target tools.
7947*4882a593Smuzhiyun
7948*4882a593Smuzhiyun      Depending on the type of recipe and the build target,
7949*4882a593Smuzhiyun      :term:`TARGET_PREFIX` is set as follows:
7950*4882a593Smuzhiyun
7951*4882a593Smuzhiyun      -  For recipes building for the target machine, the value is
7952*4882a593Smuzhiyun         "${:term:`TARGET_SYS`}-".
7953*4882a593Smuzhiyun
7954*4882a593Smuzhiyun      -  For native recipes, the build system sets the variable to the
7955*4882a593Smuzhiyun         value of :term:`BUILD_PREFIX`.
7956*4882a593Smuzhiyun
7957*4882a593Smuzhiyun      -  For native SDK recipes (``nativesdk``), the build system sets the
7958*4882a593Smuzhiyun         variable to the value of :term:`SDK_PREFIX`.
7959*4882a593Smuzhiyun
7960*4882a593Smuzhiyun   :term:`TARGET_SYS`
7961*4882a593Smuzhiyun      Specifies the system, including the architecture and the operating
7962*4882a593Smuzhiyun      system, for which the build is occurring in the context of the
7963*4882a593Smuzhiyun      current recipe.
7964*4882a593Smuzhiyun
7965*4882a593Smuzhiyun      The OpenEmbedded build system automatically sets this variable based
7966*4882a593Smuzhiyun      on :term:`TARGET_ARCH`,
7967*4882a593Smuzhiyun      :term:`TARGET_VENDOR`, and
7968*4882a593Smuzhiyun      :term:`TARGET_OS` variables.
7969*4882a593Smuzhiyun
7970*4882a593Smuzhiyun      .. note::
7971*4882a593Smuzhiyun
7972*4882a593Smuzhiyun         You do not need to set the :term:`TARGET_SYS` variable yourself.
7973*4882a593Smuzhiyun
7974*4882a593Smuzhiyun      Consider these two examples:
7975*4882a593Smuzhiyun
7976*4882a593Smuzhiyun      -  Given a native recipe on a 32-bit, x86 machine running Linux, the
7977*4882a593Smuzhiyun         value is "i686-linux".
7978*4882a593Smuzhiyun
7979*4882a593Smuzhiyun      -  Given a recipe being built for a little-endian, MIPS target
7980*4882a593Smuzhiyun         running Linux, the value might be "mipsel-linux".
7981*4882a593Smuzhiyun
7982*4882a593Smuzhiyun   :term:`TARGET_VENDOR`
7983*4882a593Smuzhiyun      Specifies the name of the target vendor.
7984*4882a593Smuzhiyun
7985*4882a593Smuzhiyun   :term:`TCLIBC`
7986*4882a593Smuzhiyun      Specifies the GNU standard C library (``libc``) variant to use during
7987*4882a593Smuzhiyun      the build process.
7988*4882a593Smuzhiyun
7989*4882a593Smuzhiyun      You can select "glibc", "musl", "newlib", or "baremetal".
7990*4882a593Smuzhiyun
7991*4882a593Smuzhiyun   :term:`TCLIBCAPPEND`
7992*4882a593Smuzhiyun      Specifies a suffix to be appended onto the
7993*4882a593Smuzhiyun      :term:`TMPDIR` value. The suffix identifies the
7994*4882a593Smuzhiyun      ``libc`` variant for building. When you are building for multiple
7995*4882a593Smuzhiyun      variants with the same :term:`Build Directory`, this
7996*4882a593Smuzhiyun      mechanism ensures that output for different ``libc`` variants is kept
7997*4882a593Smuzhiyun      separate to avoid potential conflicts.
7998*4882a593Smuzhiyun
7999*4882a593Smuzhiyun      In the ``defaultsetup.conf`` file, the default value of
8000*4882a593Smuzhiyun      :term:`TCLIBCAPPEND` is "-${TCLIBC}". However, distros such as poky,
8001*4882a593Smuzhiyun      which normally only support one ``libc`` variant, set
8002*4882a593Smuzhiyun      :term:`TCLIBCAPPEND` to "" in their distro configuration file resulting
8003*4882a593Smuzhiyun      in no suffix being applied.
8004*4882a593Smuzhiyun
8005*4882a593Smuzhiyun   :term:`TCMODE`
8006*4882a593Smuzhiyun      Specifies the toolchain selector. :term:`TCMODE` controls the
8007*4882a593Smuzhiyun      characteristics of the generated packages and images by telling the
8008*4882a593Smuzhiyun      OpenEmbedded build system which toolchain profile to use. By default,
8009*4882a593Smuzhiyun      the OpenEmbedded build system builds its own internal toolchain. The
8010*4882a593Smuzhiyun      variable's default value is "default", which uses that internal
8011*4882a593Smuzhiyun      toolchain.
8012*4882a593Smuzhiyun
8013*4882a593Smuzhiyun      .. note::
8014*4882a593Smuzhiyun
8015*4882a593Smuzhiyun         If :term:`TCMODE` is set to a value other than "default", then it is your
8016*4882a593Smuzhiyun         responsibility to ensure that the toolchain is compatible with the
8017*4882a593Smuzhiyun         default toolchain. Using older or newer versions of these
8018*4882a593Smuzhiyun         components might cause build problems. See the Release Notes for
8019*4882a593Smuzhiyun         the Yocto Project release for the specific components with which
8020*4882a593Smuzhiyun         the toolchain must be compatible. To access the Release Notes, go
8021*4882a593Smuzhiyun         to the :yocto_home:`Downloads </software-overview/downloads>`
8022*4882a593Smuzhiyun         page on the Yocto Project website and click on the "RELEASE
8023*4882a593Smuzhiyun         INFORMATION" link for the appropriate release.
8024*4882a593Smuzhiyun
8025*4882a593Smuzhiyun      The :term:`TCMODE` variable is similar to :term:`TCLIBC`,
8026*4882a593Smuzhiyun      which controls the variant of the GNU standard C library (``libc``)
8027*4882a593Smuzhiyun      used during the build process: ``glibc`` or ``musl``.
8028*4882a593Smuzhiyun
8029*4882a593Smuzhiyun      With additional layers, it is possible to use a pre-compiled external
8030*4882a593Smuzhiyun      toolchain. One example is the Sourcery G++ Toolchain. The support for
8031*4882a593Smuzhiyun      this toolchain resides in the separate Mentor Graphics
8032*4882a593Smuzhiyun      ``meta-sourcery`` layer at
8033*4882a593Smuzhiyun      https://github.com/MentorEmbedded/meta-sourcery/.
8034*4882a593Smuzhiyun
8035*4882a593Smuzhiyun      The layer's ``README`` file contains information on how to use the
8036*4882a593Smuzhiyun      Sourcery G++ Toolchain as an external toolchain. In summary, you must
8037*4882a593Smuzhiyun      be sure to add the layer to your ``bblayers.conf`` file in front of
8038*4882a593Smuzhiyun      the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable
8039*4882a593Smuzhiyun      in your ``local.conf`` file to the location in which you installed
8040*4882a593Smuzhiyun      the toolchain.
8041*4882a593Smuzhiyun
8042*4882a593Smuzhiyun      The fundamentals used for this example apply to any external
8043*4882a593Smuzhiyun      toolchain. You can use ``meta-sourcery`` as a template for adding
8044*4882a593Smuzhiyun      support for other external toolchains.
8045*4882a593Smuzhiyun
8046*4882a593Smuzhiyun   :term:`TEST_EXPORT_DIR`
8047*4882a593Smuzhiyun      The location the OpenEmbedded build system uses to export tests when
8048*4882a593Smuzhiyun      the :term:`TEST_EXPORT_ONLY` variable is set
8049*4882a593Smuzhiyun      to "1".
8050*4882a593Smuzhiyun
8051*4882a593Smuzhiyun      The :term:`TEST_EXPORT_DIR` variable defaults to
8052*4882a593Smuzhiyun      ``"${TMPDIR}/testimage/${PN}"``.
8053*4882a593Smuzhiyun
8054*4882a593Smuzhiyun   :term:`TEST_EXPORT_ONLY`
8055*4882a593Smuzhiyun      Specifies to export the tests only. Set this variable to "1" if you
8056*4882a593Smuzhiyun      do not want to run the tests but you want them to be exported in a
8057*4882a593Smuzhiyun      manner that you to run them outside of the build system.
8058*4882a593Smuzhiyun
8059*4882a593Smuzhiyun   :term:`TEST_LOG_DIR`
8060*4882a593Smuzhiyun      Holds the SSH log and the boot log for QEMU machines. The
8061*4882a593Smuzhiyun      :term:`TEST_LOG_DIR` variable defaults to ``"${WORKDIR}/testimage"``.
8062*4882a593Smuzhiyun
8063*4882a593Smuzhiyun      .. note::
8064*4882a593Smuzhiyun
8065*4882a593Smuzhiyun         Actual test results reside in the task log (``log.do_testimage``),
8066*4882a593Smuzhiyun         which is in the ``${WORKDIR}/temp/`` directory.
8067*4882a593Smuzhiyun
8068*4882a593Smuzhiyun   :term:`TEST_POWERCONTROL_CMD`
8069*4882a593Smuzhiyun      For automated hardware testing, specifies the command to use to
8070*4882a593Smuzhiyun      control the power of the target machine under test. Typically, this
8071*4882a593Smuzhiyun      command would point to a script that performs the appropriate action
8072*4882a593Smuzhiyun      (e.g. interacting with a web-enabled power strip). The specified
8073*4882a593Smuzhiyun      command should expect to receive as the last argument "off", "on" or
8074*4882a593Smuzhiyun      "cycle" specifying to power off, on, or cycle (power off and then
8075*4882a593Smuzhiyun      power on) the device, respectively.
8076*4882a593Smuzhiyun
8077*4882a593Smuzhiyun   :term:`TEST_POWERCONTROL_EXTRA_ARGS`
8078*4882a593Smuzhiyun      For automated hardware testing, specifies additional arguments to
8079*4882a593Smuzhiyun      pass through to the command specified in
8080*4882a593Smuzhiyun      :term:`TEST_POWERCONTROL_CMD`. Setting
8081*4882a593Smuzhiyun      :term:`TEST_POWERCONTROL_EXTRA_ARGS` is optional. You can use it if you
8082*4882a593Smuzhiyun      wish, for example, to separate the machine-specific and
8083*4882a593Smuzhiyun      non-machine-specific parts of the arguments.
8084*4882a593Smuzhiyun
8085*4882a593Smuzhiyun   :term:`TEST_QEMUBOOT_TIMEOUT`
8086*4882a593Smuzhiyun      The time in seconds allowed for an image to boot before automated
8087*4882a593Smuzhiyun      runtime tests begin to run against an image. The default timeout
8088*4882a593Smuzhiyun      period to allow the boot process to reach the login prompt is 500
8089*4882a593Smuzhiyun      seconds. You can specify a different value in the ``local.conf``
8090*4882a593Smuzhiyun      file.
8091*4882a593Smuzhiyun
8092*4882a593Smuzhiyun      For more information on testing images, see the
8093*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
8094*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
8095*4882a593Smuzhiyun
8096*4882a593Smuzhiyun   :term:`TEST_SERIALCONTROL_CMD`
8097*4882a593Smuzhiyun      For automated hardware testing, specifies the command to use to
8098*4882a593Smuzhiyun      connect to the serial console of the target machine under test. This
8099*4882a593Smuzhiyun      command simply needs to connect to the serial console and forward
8100*4882a593Smuzhiyun      that connection to standard input and output as any normal terminal
8101*4882a593Smuzhiyun      program does.
8102*4882a593Smuzhiyun
8103*4882a593Smuzhiyun      For example, to use the Picocom terminal program on serial device
8104*4882a593Smuzhiyun      ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows::
8105*4882a593Smuzhiyun
8106*4882a593Smuzhiyun         TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
8107*4882a593Smuzhiyun
8108*4882a593Smuzhiyun   :term:`TEST_SERIALCONTROL_EXTRA_ARGS`
8109*4882a593Smuzhiyun      For automated hardware testing, specifies additional arguments to
8110*4882a593Smuzhiyun      pass through to the command specified in
8111*4882a593Smuzhiyun      :term:`TEST_SERIALCONTROL_CMD`. Setting
8112*4882a593Smuzhiyun      :term:`TEST_SERIALCONTROL_EXTRA_ARGS` is optional. You can use it if you
8113*4882a593Smuzhiyun      wish, for example, to separate the machine-specific and
8114*4882a593Smuzhiyun      non-machine-specific parts of the command.
8115*4882a593Smuzhiyun
8116*4882a593Smuzhiyun   :term:`TEST_SERVER_IP`
8117*4882a593Smuzhiyun      The IP address of the build machine (host machine). This IP address
8118*4882a593Smuzhiyun      is usually automatically detected. However, if detection fails, this
8119*4882a593Smuzhiyun      variable needs to be set to the IP address of the build machine (i.e.
8120*4882a593Smuzhiyun      where the build is taking place).
8121*4882a593Smuzhiyun
8122*4882a593Smuzhiyun      .. note::
8123*4882a593Smuzhiyun
8124*4882a593Smuzhiyun         The :term:`TEST_SERVER_IP` variable is only used for a small number of
8125*4882a593Smuzhiyun         tests such as the "dnf" test suite, which needs to download packages
8126*4882a593Smuzhiyun         from ``WORKDIR/oe-rootfs-repo``.
8127*4882a593Smuzhiyun
8128*4882a593Smuzhiyun   :term:`TEST_SUITES`
8129*4882a593Smuzhiyun      An ordered list of tests (modules) to run against an image when
8130*4882a593Smuzhiyun      performing automated runtime testing.
8131*4882a593Smuzhiyun
8132*4882a593Smuzhiyun      The OpenEmbedded build system provides a core set of tests that can
8133*4882a593Smuzhiyun      be used against images.
8134*4882a593Smuzhiyun
8135*4882a593Smuzhiyun      .. note::
8136*4882a593Smuzhiyun
8137*4882a593Smuzhiyun         Currently, there is only support for running these tests under
8138*4882a593Smuzhiyun         QEMU.
8139*4882a593Smuzhiyun
8140*4882a593Smuzhiyun      Tests include ``ping``, ``ssh``, ``df`` among others. You can add
8141*4882a593Smuzhiyun      your own tests to the list of tests by appending :term:`TEST_SUITES` as
8142*4882a593Smuzhiyun      follows::
8143*4882a593Smuzhiyun
8144*4882a593Smuzhiyun         TEST_SUITES:append = " mytest"
8145*4882a593Smuzhiyun
8146*4882a593Smuzhiyun      Alternatively, you can
8147*4882a593Smuzhiyun      provide the "auto" option to have all applicable tests run against
8148*4882a593Smuzhiyun      the image.
8149*4882a593Smuzhiyun      ::
8150*4882a593Smuzhiyun
8151*4882a593Smuzhiyun         TEST_SUITES:append = " auto"
8152*4882a593Smuzhiyun
8153*4882a593Smuzhiyun      Using this option causes the
8154*4882a593Smuzhiyun      build system to automatically run tests that are applicable to the
8155*4882a593Smuzhiyun      image. Tests that are not applicable are skipped.
8156*4882a593Smuzhiyun
8157*4882a593Smuzhiyun      The order in which tests are run is important. Tests that depend on
8158*4882a593Smuzhiyun      another test must appear later in the list than the test on which
8159*4882a593Smuzhiyun      they depend. For example, if you append the list of tests with two
8160*4882a593Smuzhiyun      tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on
8161*4882a593Smuzhiyun      ``test_A``, then you must order the tests as follows::
8162*4882a593Smuzhiyun
8163*4882a593Smuzhiyun         TEST_SUITES = "test_A test_B"
8164*4882a593Smuzhiyun
8165*4882a593Smuzhiyun      For more information on testing images, see the
8166*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
8167*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
8168*4882a593Smuzhiyun
8169*4882a593Smuzhiyun   :term:`TEST_TARGET`
8170*4882a593Smuzhiyun      Specifies the target controller to use when running tests against a
8171*4882a593Smuzhiyun      test image. The default controller to use is "qemu"::
8172*4882a593Smuzhiyun
8173*4882a593Smuzhiyun         TEST_TARGET = "qemu"
8174*4882a593Smuzhiyun
8175*4882a593Smuzhiyun      A target controller is a class that defines how an image gets
8176*4882a593Smuzhiyun      deployed on a target and how a target is started. A layer can extend
8177*4882a593Smuzhiyun      the controllers by adding a module in the layer's
8178*4882a593Smuzhiyun      ``/lib/oeqa/controllers`` directory and by inheriting the
8179*4882a593Smuzhiyun      ``BaseTarget`` class, which is an abstract class that cannot be used
8180*4882a593Smuzhiyun      as a value of :term:`TEST_TARGET`.
8181*4882a593Smuzhiyun
8182*4882a593Smuzhiyun      You can provide the following arguments with :term:`TEST_TARGET`:
8183*4882a593Smuzhiyun
8184*4882a593Smuzhiyun      -  *"qemu":* Boots a QEMU image and runs the tests. See the
8185*4882a593Smuzhiyun         ":ref:`dev-manual/common-tasks:enabling runtime tests on qemu`" section
8186*4882a593Smuzhiyun         in the Yocto Project Development Tasks Manual for more
8187*4882a593Smuzhiyun         information.
8188*4882a593Smuzhiyun
8189*4882a593Smuzhiyun      -  *"simpleremote":* Runs the tests on target hardware that is
8190*4882a593Smuzhiyun         already up and running. The hardware can be on the network or it
8191*4882a593Smuzhiyun         can be a device running an image on QEMU. You must also set
8192*4882a593Smuzhiyun         :term:`TEST_TARGET_IP` when you use
8193*4882a593Smuzhiyun         "simpleremote".
8194*4882a593Smuzhiyun
8195*4882a593Smuzhiyun         .. note::
8196*4882a593Smuzhiyun
8197*4882a593Smuzhiyun            This argument is defined in
8198*4882a593Smuzhiyun            ``meta/lib/oeqa/controllers/simpleremote.py``.
8199*4882a593Smuzhiyun
8200*4882a593Smuzhiyun      For information on running tests on hardware, see the
8201*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:enabling runtime tests on hardware`"
8202*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual.
8203*4882a593Smuzhiyun
8204*4882a593Smuzhiyun   :term:`TEST_TARGET_IP`
8205*4882a593Smuzhiyun      The IP address of your hardware under test. The :term:`TEST_TARGET_IP`
8206*4882a593Smuzhiyun      variable has no effect when :term:`TEST_TARGET` is
8207*4882a593Smuzhiyun      set to "qemu".
8208*4882a593Smuzhiyun
8209*4882a593Smuzhiyun      When you specify the IP address, you can also include a port. Here is
8210*4882a593Smuzhiyun      an example::
8211*4882a593Smuzhiyun
8212*4882a593Smuzhiyun         TEST_TARGET_IP = "192.168.1.4:2201"
8213*4882a593Smuzhiyun
8214*4882a593Smuzhiyun      Specifying a port is
8215*4882a593Smuzhiyun      useful when SSH is started on a non-standard port or in cases when
8216*4882a593Smuzhiyun      your hardware under test is behind a firewall or network that is not
8217*4882a593Smuzhiyun      directly accessible from your host and you need to do port address
8218*4882a593Smuzhiyun      translation.
8219*4882a593Smuzhiyun
8220*4882a593Smuzhiyun   :term:`TESTIMAGE_AUTO`
8221*4882a593Smuzhiyun      Automatically runs the series of automated tests for images when an
8222*4882a593Smuzhiyun      image is successfully built. Setting :term:`TESTIMAGE_AUTO` to "1" causes
8223*4882a593Smuzhiyun      any image that successfully builds to automatically boot under QEMU.
8224*4882a593Smuzhiyun      Using the variable also adds in dependencies so that any SDK for
8225*4882a593Smuzhiyun      which testing is requested is automatically built first.
8226*4882a593Smuzhiyun
8227*4882a593Smuzhiyun      These tests are written in Python making use of the ``unittest``
8228*4882a593Smuzhiyun      module, and the majority of them run commands on the target system
8229*4882a593Smuzhiyun      over ``ssh``. You can set this variable to "1" in your ``local.conf``
8230*4882a593Smuzhiyun      file in the :term:`Build Directory` to have the
8231*4882a593Smuzhiyun      OpenEmbedded build system automatically run these tests after an
8232*4882a593Smuzhiyun      image successfully builds:
8233*4882a593Smuzhiyun
8234*4882a593Smuzhiyun         TESTIMAGE_AUTO = "1"
8235*4882a593Smuzhiyun
8236*4882a593Smuzhiyun      For more information
8237*4882a593Smuzhiyun      on enabling, running, and writing these tests, see the
8238*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:performing automated runtime testing`"
8239*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual and the
8240*4882a593Smuzhiyun      ":ref:`ref-classes-testimage*`" section.
8241*4882a593Smuzhiyun
8242*4882a593Smuzhiyun   :term:`THISDIR`
8243*4882a593Smuzhiyun      The directory in which the file BitBake is currently parsing is
8244*4882a593Smuzhiyun      located. Do not manually set this variable.
8245*4882a593Smuzhiyun
8246*4882a593Smuzhiyun   :term:`TIME`
8247*4882a593Smuzhiyun      The time the build was started. Times appear using the hour, minute,
8248*4882a593Smuzhiyun      and second (HMS) format (e.g. "140159" for one minute and fifty-nine
8249*4882a593Smuzhiyun      seconds past 1400 hours).
8250*4882a593Smuzhiyun
8251*4882a593Smuzhiyun   :term:`TMPDIR`
8252*4882a593Smuzhiyun      This variable is the base directory the OpenEmbedded build system
8253*4882a593Smuzhiyun      uses for all build output and intermediate files (other than the
8254*4882a593Smuzhiyun      shared state cache). By default, the :term:`TMPDIR` variable points to
8255*4882a593Smuzhiyun      ``tmp`` within the :term:`Build Directory`.
8256*4882a593Smuzhiyun
8257*4882a593Smuzhiyun      If you want to establish this directory in a location other than the
8258*4882a593Smuzhiyun      default, you can uncomment and edit the following statement in the
8259*4882a593Smuzhiyun      ``conf/local.conf`` file in the :term:`Source Directory`::
8260*4882a593Smuzhiyun
8261*4882a593Smuzhiyun         #TMPDIR = "${TOPDIR}/tmp"
8262*4882a593Smuzhiyun
8263*4882a593Smuzhiyun      An example use for this scenario is to set :term:`TMPDIR` to a local disk,
8264*4882a593Smuzhiyun      which does not use NFS, while having the Build Directory use NFS.
8265*4882a593Smuzhiyun
8266*4882a593Smuzhiyun      The filesystem used by :term:`TMPDIR` must have standard filesystem
8267*4882a593Smuzhiyun      semantics (i.e. mixed-case files are unique, POSIX file locking, and
8268*4882a593Smuzhiyun      persistent inodes). Due to various issues with NFS and bugs in some
8269*4882a593Smuzhiyun      implementations, NFS does not meet this minimum requirement.
8270*4882a593Smuzhiyun      Consequently, :term:`TMPDIR` cannot be on NFS.
8271*4882a593Smuzhiyun
8272*4882a593Smuzhiyun   :term:`TOOLCHAIN_HOST_TASK`
8273*4882a593Smuzhiyun      This variable lists packages the OpenEmbedded build system uses when
8274*4882a593Smuzhiyun      building an SDK, which contains a cross-development environment. The
8275*4882a593Smuzhiyun      packages specified by this variable are part of the toolchain set
8276*4882a593Smuzhiyun      that runs on the :term:`SDKMACHINE`, and each
8277*4882a593Smuzhiyun      package should usually have the prefix ``nativesdk-``. For example,
8278*4882a593Smuzhiyun      consider the following command when building an SDK::
8279*4882a593Smuzhiyun
8280*4882a593Smuzhiyun         $ bitbake -c populate_sdk imagename
8281*4882a593Smuzhiyun
8282*4882a593Smuzhiyun      In this case, a default list of packages is
8283*4882a593Smuzhiyun      set in this variable, but you can add additional packages to the
8284*4882a593Smuzhiyun      list. See the
8285*4882a593Smuzhiyun      ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
8286*4882a593Smuzhiyun      in the Yocto Project Application Development and the Extensible
8287*4882a593Smuzhiyun      Software Development Kit (eSDK) manual for more information.
8288*4882a593Smuzhiyun
8289*4882a593Smuzhiyun      For background information on cross-development toolchains in the
8290*4882a593Smuzhiyun      Yocto Project development environment, see the
8291*4882a593Smuzhiyun      ":ref:`sdk-manual/intro:the cross-development toolchain`"
8292*4882a593Smuzhiyun      section in the Yocto Project Overview and Concepts Manual. For
8293*4882a593Smuzhiyun      information on setting up a cross-development environment, see the
8294*4882a593Smuzhiyun      :doc:`/sdk-manual/index` manual.
8295*4882a593Smuzhiyun
8296*4882a593Smuzhiyun      Note that this variable applies to building an SDK, not an eSDK,
8297*4882a593Smuzhiyun      in which case the term:`TOOLCHAIN_HOST_TASK_ESDK` setting should be
8298*4882a593Smuzhiyun      used instead.
8299*4882a593Smuzhiyun
8300*4882a593Smuzhiyun   :term:`TOOLCHAIN_HOST_TASK_ESDK`
8301*4882a593Smuzhiyun      This variable allows to extend what is installed in the host
8302*4882a593Smuzhiyun      portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
8303*4882a593Smuzhiyun      applying to SDKs.
8304*4882a593Smuzhiyun
8305*4882a593Smuzhiyun   :term:`TOOLCHAIN_OUTPUTNAME`
8306*4882a593Smuzhiyun      This variable defines the name used for the toolchain output. The
8307*4882a593Smuzhiyun      :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
8308*4882a593Smuzhiyun      the :term:`TOOLCHAIN_OUTPUTNAME` variable as follows::
8309*4882a593Smuzhiyun
8310*4882a593Smuzhiyun         TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
8311*4882a593Smuzhiyun
8312*4882a593Smuzhiyun      See
8313*4882a593Smuzhiyun      the :term:`SDK_NAME` and
8314*4882a593Smuzhiyun      :term:`SDK_VERSION` variables for additional
8315*4882a593Smuzhiyun      information.
8316*4882a593Smuzhiyun
8317*4882a593Smuzhiyun   :term:`TOOLCHAIN_TARGET_TASK`
8318*4882a593Smuzhiyun      This variable lists packages the OpenEmbedded build system uses when
8319*4882a593Smuzhiyun      it creates the target part of an SDK (i.e. the part built for the
8320*4882a593Smuzhiyun      target hardware), which includes libraries and headers. Use this
8321*4882a593Smuzhiyun      variable to add individual packages to the part of the SDK that runs
8322*4882a593Smuzhiyun      on the target. See the
8323*4882a593Smuzhiyun      ":ref:`sdk-manual/appendix-customizing-standard:adding individual packages to the standard sdk`" section
8324*4882a593Smuzhiyun      in the Yocto Project Application Development and the Extensible
8325*4882a593Smuzhiyun      Software Development Kit (eSDK) manual for more information.
8326*4882a593Smuzhiyun
8327*4882a593Smuzhiyun      For background information on cross-development toolchains in the
8328*4882a593Smuzhiyun      Yocto Project development environment, see the
8329*4882a593Smuzhiyun      ":ref:`sdk-manual/intro:the cross-development toolchain`"
8330*4882a593Smuzhiyun      section in the Yocto Project Overview and Concepts Manual. For
8331*4882a593Smuzhiyun      information on setting up a cross-development environment, see the
8332*4882a593Smuzhiyun      :doc:`/sdk-manual/index` manual.
8333*4882a593Smuzhiyun
8334*4882a593Smuzhiyun   :term:`TRANSLATED_TARGET_ARCH`
8335*4882a593Smuzhiyun      A sanitized version of :term:`TARGET_ARCH`. This
8336*4882a593Smuzhiyun      variable is used where the architecture is needed in a value where
8337*4882a593Smuzhiyun      underscores are not allowed, for example within package filenames. In
8338*4882a593Smuzhiyun      this case, dash characters replace any underscore characters used in
8339*4882a593Smuzhiyun      :term:`TARGET_ARCH`.
8340*4882a593Smuzhiyun
8341*4882a593Smuzhiyun      Do not edit this variable.
8342*4882a593Smuzhiyun
8343*4882a593Smuzhiyun   :term:`TUNE_ARCH`
8344*4882a593Smuzhiyun      The GNU canonical architecture for a specific architecture (i.e.
8345*4882a593Smuzhiyun      ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses
8346*4882a593Smuzhiyun      this value to setup configuration.
8347*4882a593Smuzhiyun
8348*4882a593Smuzhiyun      :term:`TUNE_ARCH` definitions are specific to a given architecture. The
8349*4882a593Smuzhiyun      definitions can be a single static definition, or can be dynamically
8350*4882a593Smuzhiyun      adjusted. You can see details for a given CPU family by looking at
8351*4882a593Smuzhiyun      the architecture's ``README`` file. For example, the
8352*4882a593Smuzhiyun      ``meta/conf/machine/include/mips/README`` file in the
8353*4882a593Smuzhiyun      :term:`Source Directory` provides information for
8354*4882a593Smuzhiyun      :term:`TUNE_ARCH` specific to the ``mips`` architecture.
8355*4882a593Smuzhiyun
8356*4882a593Smuzhiyun      :term:`TUNE_ARCH` is tied closely to
8357*4882a593Smuzhiyun      :term:`TARGET_ARCH`, which defines the target
8358*4882a593Smuzhiyun      machine's architecture. The BitBake configuration file
8359*4882a593Smuzhiyun      (``meta/conf/bitbake.conf``) sets :term:`TARGET_ARCH` as follows::
8360*4882a593Smuzhiyun
8361*4882a593Smuzhiyun         TARGET_ARCH = "${TUNE_ARCH}"
8362*4882a593Smuzhiyun
8363*4882a593Smuzhiyun      The following list, which is by no means complete since architectures
8364*4882a593Smuzhiyun      are configurable, shows supported machine architectures:
8365*4882a593Smuzhiyun
8366*4882a593Smuzhiyun      - arm
8367*4882a593Smuzhiyun      - i586
8368*4882a593Smuzhiyun      - x86_64
8369*4882a593Smuzhiyun      - powerpc
8370*4882a593Smuzhiyun      - powerpc64
8371*4882a593Smuzhiyun      - mips
8372*4882a593Smuzhiyun      - mipsel
8373*4882a593Smuzhiyun
8374*4882a593Smuzhiyun   :term:`TUNE_ASARGS`
8375*4882a593Smuzhiyun      Specifies architecture-specific assembler flags for the target
8376*4882a593Smuzhiyun      system. The set of flags is based on the selected tune features.
8377*4882a593Smuzhiyun      :term:`TUNE_ASARGS` is set using the tune include files, which are
8378*4882a593Smuzhiyun      typically under ``meta/conf/machine/include/`` and are influenced
8379*4882a593Smuzhiyun      through :term:`TUNE_FEATURES`. For example, the
8380*4882a593Smuzhiyun      ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
8381*4882a593Smuzhiyun      for the x86 architecture as follows::
8382*4882a593Smuzhiyun
8383*4882a593Smuzhiyun         TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
8384*4882a593Smuzhiyun
8385*4882a593Smuzhiyun      .. note::
8386*4882a593Smuzhiyun
8387*4882a593Smuzhiyun         Board Support Packages (BSPs) select the tune. The selected tune,
8388*4882a593Smuzhiyun         in turn, affects the tune variables themselves (i.e. the tune can
8389*4882a593Smuzhiyun         supply its own set of flags).
8390*4882a593Smuzhiyun
8391*4882a593Smuzhiyun   :term:`TUNE_CCARGS`
8392*4882a593Smuzhiyun      Specifies architecture-specific C compiler flags for the target
8393*4882a593Smuzhiyun      system. The set of flags is based on the selected tune features.
8394*4882a593Smuzhiyun      :term:`TUNE_CCARGS` is set using the tune include files, which are
8395*4882a593Smuzhiyun      typically under ``meta/conf/machine/include/`` and are influenced
8396*4882a593Smuzhiyun      through :term:`TUNE_FEATURES`.
8397*4882a593Smuzhiyun
8398*4882a593Smuzhiyun      .. note::
8399*4882a593Smuzhiyun
8400*4882a593Smuzhiyun         Board Support Packages (BSPs) select the tune. The selected tune,
8401*4882a593Smuzhiyun         in turn, affects the tune variables themselves (i.e. the tune can
8402*4882a593Smuzhiyun         supply its own set of flags).
8403*4882a593Smuzhiyun
8404*4882a593Smuzhiyun   :term:`TUNE_FEATURES`
8405*4882a593Smuzhiyun      Features used to "tune" a compiler for optimal use given a specific
8406*4882a593Smuzhiyun      processor. The features are defined within the tune files and allow
8407*4882a593Smuzhiyun      arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on
8408*4882a593Smuzhiyun      the features.
8409*4882a593Smuzhiyun
8410*4882a593Smuzhiyun      The OpenEmbedded build system verifies the features to be sure they
8411*4882a593Smuzhiyun      are not conflicting and that they are supported.
8412*4882a593Smuzhiyun
8413*4882a593Smuzhiyun      The BitBake configuration file (``meta/conf/bitbake.conf``) defines
8414*4882a593Smuzhiyun      :term:`TUNE_FEATURES` as follows::
8415*4882a593Smuzhiyun
8416*4882a593Smuzhiyun         TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}"
8417*4882a593Smuzhiyun
8418*4882a593Smuzhiyun      See the :term:`DEFAULTTUNE` variable for more information.
8419*4882a593Smuzhiyun
8420*4882a593Smuzhiyun   :term:`TUNE_LDARGS`
8421*4882a593Smuzhiyun      Specifies architecture-specific linker flags for the target system.
8422*4882a593Smuzhiyun      The set of flags is based on the selected tune features.
8423*4882a593Smuzhiyun      :term:`TUNE_LDARGS` is set using the tune include files, which are
8424*4882a593Smuzhiyun      typically under ``meta/conf/machine/include/`` and are influenced
8425*4882a593Smuzhiyun      through :term:`TUNE_FEATURES`. For example, the
8426*4882a593Smuzhiyun      ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
8427*4882a593Smuzhiyun      for the x86 architecture as follows::
8428*4882a593Smuzhiyun
8429*4882a593Smuzhiyun         TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
8430*4882a593Smuzhiyun
8431*4882a593Smuzhiyun      .. note::
8432*4882a593Smuzhiyun
8433*4882a593Smuzhiyun         Board Support Packages (BSPs) select the tune. The selected tune,
8434*4882a593Smuzhiyun         in turn, affects the tune variables themselves (i.e. the tune can
8435*4882a593Smuzhiyun         supply its own set of flags).
8436*4882a593Smuzhiyun
8437*4882a593Smuzhiyun   :term:`TUNE_PKGARCH`
8438*4882a593Smuzhiyun      The package architecture understood by the packaging system to define
8439*4882a593Smuzhiyun      the architecture, ABI, and tuning of output packages. The specific
8440*4882a593Smuzhiyun      tune is defined using the "_tune" override as follows::
8441*4882a593Smuzhiyun
8442*4882a593Smuzhiyun         TUNE_PKGARCH:tune-tune = "tune"
8443*4882a593Smuzhiyun
8444*4882a593Smuzhiyun      These tune-specific package architectures are defined in the machine
8445*4882a593Smuzhiyun      include files. Here is an example of the "core2-32" tuning as used in
8446*4882a593Smuzhiyun      the ``meta/conf/machine/include/x86/tune-core2.inc`` file::
8447*4882a593Smuzhiyun
8448*4882a593Smuzhiyun         TUNE_PKGARCH:tune-core2-32 = "core2-32"
8449*4882a593Smuzhiyun
8450*4882a593Smuzhiyun   :term:`TUNECONFLICTS[feature]`
8451*4882a593Smuzhiyun      Specifies CPU or Application Binary Interface (ABI) tuning features
8452*4882a593Smuzhiyun      that conflict with feature.
8453*4882a593Smuzhiyun
8454*4882a593Smuzhiyun      Known tuning conflicts are specified in the machine include files in
8455*4882a593Smuzhiyun      the :term:`Source Directory`. Here is an example from
8456*4882a593Smuzhiyun      the ``meta/conf/machine/include/mips/arch-mips.inc`` include file
8457*4882a593Smuzhiyun      that lists the "o32" and "n64" features as conflicting with the "n32"
8458*4882a593Smuzhiyun      feature::
8459*4882a593Smuzhiyun
8460*4882a593Smuzhiyun         TUNECONFLICTS[n32] = "o32 n64"
8461*4882a593Smuzhiyun
8462*4882a593Smuzhiyun   :term:`TUNEVALID[feature]`
8463*4882a593Smuzhiyun      Specifies a valid CPU or Application Binary Interface (ABI) tuning
8464*4882a593Smuzhiyun      feature. The specified feature is stored as a flag. Valid features
8465*4882a593Smuzhiyun      are specified in the machine include files (e.g.
8466*4882a593Smuzhiyun      ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example
8467*4882a593Smuzhiyun      from that file::
8468*4882a593Smuzhiyun
8469*4882a593Smuzhiyun         TUNEVALID[bigendian] = "Enable big-endian mode."
8470*4882a593Smuzhiyun
8471*4882a593Smuzhiyun      See the machine include files in the :term:`Source Directory`
8472*4882a593Smuzhiyun      for these features.
8473*4882a593Smuzhiyun
8474*4882a593Smuzhiyun   :term:`UBOOT_CONFIG`
8475*4882a593Smuzhiyun      Configures the :term:`UBOOT_MACHINE` and can
8476*4882a593Smuzhiyun      also define :term:`IMAGE_FSTYPES` for individual
8477*4882a593Smuzhiyun      cases.
8478*4882a593Smuzhiyun
8479*4882a593Smuzhiyun      Following is an example from the ``meta-fsl-arm`` layer. ::
8480*4882a593Smuzhiyun
8481*4882a593Smuzhiyun         UBOOT_CONFIG ??= "sd"
8482*4882a593Smuzhiyun         UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
8483*4882a593Smuzhiyun         UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
8484*4882a593Smuzhiyun         UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
8485*4882a593Smuzhiyun         UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
8486*4882a593Smuzhiyun
8487*4882a593Smuzhiyun      In this example, "sd" is selected as the configuration of the possible four for the
8488*4882a593Smuzhiyun      :term:`UBOOT_MACHINE`. The "sd" configuration defines
8489*4882a593Smuzhiyun      "mx6qsabreauto_config" as the value for :term:`UBOOT_MACHINE`, while the
8490*4882a593Smuzhiyun      "sdcard" specifies the :term:`IMAGE_FSTYPES` to use for the U-Boot image.
8491*4882a593Smuzhiyun
8492*4882a593Smuzhiyun      For more information on how the :term:`UBOOT_CONFIG` is handled, see the
8493*4882a593Smuzhiyun      :ref:`uboot-config <ref-classes-uboot-config>`
8494*4882a593Smuzhiyun      class.
8495*4882a593Smuzhiyun
8496*4882a593Smuzhiyun   :term:`UBOOT_DTB_LOADADDRESS`
8497*4882a593Smuzhiyun      Specifies the load address for the dtb image used by U-Boot. During FIT
8498*4882a593Smuzhiyun      image creation, the :term:`UBOOT_DTB_LOADADDRESS` variable is used in
8499*4882a593Smuzhiyun      :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify
8500*4882a593Smuzhiyun      the load address to be used in
8501*4882a593Smuzhiyun      creating the dtb sections of Image Tree Source for the FIT image.
8502*4882a593Smuzhiyun
8503*4882a593Smuzhiyun   :term:`UBOOT_DTBO_LOADADDRESS`
8504*4882a593Smuzhiyun      Specifies the load address for the dtbo image used by U-Boot.  During FIT
8505*4882a593Smuzhiyun      image creation, the :term:`UBOOT_DTBO_LOADADDRESS` variable is used in
8506*4882a593Smuzhiyun      :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the load address to be used in
8507*4882a593Smuzhiyun      creating the dtbo sections of Image Tree Source for the FIT image.
8508*4882a593Smuzhiyun
8509*4882a593Smuzhiyun   :term:`UBOOT_ENTRYPOINT`
8510*4882a593Smuzhiyun      Specifies the entry point for the U-Boot image. During U-Boot image
8511*4882a593Smuzhiyun      creation, the :term:`UBOOT_ENTRYPOINT` variable is passed as a
8512*4882a593Smuzhiyun      command-line parameter to the ``uboot-mkimage`` utility.
8513*4882a593Smuzhiyun
8514*4882a593Smuzhiyun   :term:`UBOOT_LOADADDRESS`
8515*4882a593Smuzhiyun      Specifies the load address for the U-Boot image. During U-Boot image
8516*4882a593Smuzhiyun      creation, the :term:`UBOOT_LOADADDRESS` variable is passed as a
8517*4882a593Smuzhiyun      command-line parameter to the ``uboot-mkimage`` utility.
8518*4882a593Smuzhiyun
8519*4882a593Smuzhiyun   :term:`UBOOT_LOCALVERSION`
8520*4882a593Smuzhiyun      Appends a string to the name of the local version of the U-Boot
8521*4882a593Smuzhiyun      image. For example, assuming the version of the U-Boot image built
8522*4882a593Smuzhiyun      was "2013.10", the full version string reported by U-Boot would be
8523*4882a593Smuzhiyun      "2013.10-yocto" given the following statement::
8524*4882a593Smuzhiyun
8525*4882a593Smuzhiyun         UBOOT_LOCALVERSION = "-yocto"
8526*4882a593Smuzhiyun
8527*4882a593Smuzhiyun   :term:`UBOOT_MACHINE`
8528*4882a593Smuzhiyun      Specifies the value passed on the ``make`` command line when building
8529*4882a593Smuzhiyun      a U-Boot image. The value indicates the target platform
8530*4882a593Smuzhiyun      configuration. You typically set this variable from the machine
8531*4882a593Smuzhiyun      configuration file (i.e. ``conf/machine/machine_name.conf``).
8532*4882a593Smuzhiyun
8533*4882a593Smuzhiyun      Please see the "Selection of Processor Architecture and Board Type"
8534*4882a593Smuzhiyun      section in the U-Boot README for valid values for this variable.
8535*4882a593Smuzhiyun
8536*4882a593Smuzhiyun   :term:`UBOOT_MAKE_TARGET`
8537*4882a593Smuzhiyun      Specifies the target called in the ``Makefile``. The default target
8538*4882a593Smuzhiyun      is "all".
8539*4882a593Smuzhiyun
8540*4882a593Smuzhiyun   :term:`UBOOT_MKIMAGE`
8541*4882a593Smuzhiyun      Specifies the name of the mkimage command as used by the
8542*4882a593Smuzhiyun      :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to assemble
8543*4882a593Smuzhiyun      the FIT image. This can be used to substitute an alternative command, wrapper
8544*4882a593Smuzhiyun      script or function if desired. The default is "uboot-mkimage".
8545*4882a593Smuzhiyun
8546*4882a593Smuzhiyun   :term:`UBOOT_MKIMAGE_DTCOPTS`
8547*4882a593Smuzhiyun      Options for the device tree compiler passed to mkimage '-D'
8548*4882a593Smuzhiyun      feature while creating FIT image in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class.
8549*4882a593Smuzhiyun      If :term:`UBOOT_MKIMAGE_DTCOPTS` is not set then kernel-fitimage will not
8550*4882a593Smuzhiyun      pass the ``-D`` option to mkimage.
8551*4882a593Smuzhiyun
8552*4882a593Smuzhiyun   :term:`UBOOT_MKIMAGE_SIGN`
8553*4882a593Smuzhiyun      Specifies the name of the mkimage command as used by the
8554*4882a593Smuzhiyun      :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to sign
8555*4882a593Smuzhiyun      the FIT image after it has been assembled (if enabled). This can be used
8556*4882a593Smuzhiyun      to substitute an alternative command, wrapper script or function if
8557*4882a593Smuzhiyun      desired. The default is "${:term:`UBOOT_MKIMAGE`}".
8558*4882a593Smuzhiyun
8559*4882a593Smuzhiyun   :term:`UBOOT_MKIMAGE_SIGN_ARGS`
8560*4882a593Smuzhiyun      Optionally specifies additional arguments for the
8561*4882a593Smuzhiyun      :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to pass to the
8562*4882a593Smuzhiyun      mkimage command when signing the FIT image.
8563*4882a593Smuzhiyun
8564*4882a593Smuzhiyun   :term:`UBOOT_RD_ENTRYPOINT`
8565*4882a593Smuzhiyun      Specifies the entrypoint for the RAM disk image.
8566*4882a593Smuzhiyun      During FIT image creation, the
8567*4882a593Smuzhiyun      :term:`UBOOT_RD_ENTRYPOINT` variable is used
8568*4882a593Smuzhiyun      in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8569*4882a593Smuzhiyun      entrypoint to be used in creating the Image Tree Source for
8570*4882a593Smuzhiyun      the FIT image.
8571*4882a593Smuzhiyun
8572*4882a593Smuzhiyun   :term:`UBOOT_RD_LOADADDRESS`
8573*4882a593Smuzhiyun      Specifies the load address for the RAM disk image.
8574*4882a593Smuzhiyun      During FIT image creation, the
8575*4882a593Smuzhiyun      :term:`UBOOT_RD_LOADADDRESS` variable is used
8576*4882a593Smuzhiyun      in :ref:`kernel-fitimage <ref-classes-kernel-fitimage>` class to specify the
8577*4882a593Smuzhiyun      load address to be used in creating the Image Tree Source for
8578*4882a593Smuzhiyun      the FIT image.
8579*4882a593Smuzhiyun
8580*4882a593Smuzhiyun   :term:`UBOOT_SIGN_ENABLE`
8581*4882a593Smuzhiyun      Enable signing of FIT image. The default value is "0".
8582*4882a593Smuzhiyun
8583*4882a593Smuzhiyun   :term:`UBOOT_SIGN_KEYDIR`
8584*4882a593Smuzhiyun      Location of the directory containing the RSA key and
8585*4882a593Smuzhiyun      certificate used for signing FIT image.
8586*4882a593Smuzhiyun
8587*4882a593Smuzhiyun   :term:`UBOOT_SIGN_KEYNAME`
8588*4882a593Smuzhiyun      The name of keys used for signing U-Boot FIT image stored in
8589*4882a593Smuzhiyun      :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt
8590*4882a593Smuzhiyun      certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have
8591*4882a593Smuzhiyun      :term:`UBOOT_SIGN_KEYNAME` set to "dev".
8592*4882a593Smuzhiyun
8593*4882a593Smuzhiyun   :term:`UBOOT_SUFFIX`
8594*4882a593Smuzhiyun      Points to the generated U-Boot extension. For example, ``u-boot.sb``
8595*4882a593Smuzhiyun      has a ``.sb`` extension.
8596*4882a593Smuzhiyun
8597*4882a593Smuzhiyun      The default U-Boot extension is ``.bin``
8598*4882a593Smuzhiyun
8599*4882a593Smuzhiyun   :term:`UBOOT_TARGET`
8600*4882a593Smuzhiyun      Specifies the target used for building U-Boot. The target is passed
8601*4882a593Smuzhiyun      directly as part of the "make" command (e.g. SPL and AIS). If you do
8602*4882a593Smuzhiyun      not specifically set this variable, the OpenEmbedded build process
8603*4882a593Smuzhiyun      passes and uses "all" for the target during the U-Boot building
8604*4882a593Smuzhiyun      process.
8605*4882a593Smuzhiyun
8606*4882a593Smuzhiyun   :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`
8607*4882a593Smuzhiyun      Specifies a list of options that, if reported by the configure script
8608*4882a593Smuzhiyun      as being invalid, should not generate a warning during the
8609*4882a593Smuzhiyun      :ref:`ref-tasks-configure` task. Normally, invalid
8610*4882a593Smuzhiyun      configure options are simply not passed to the configure script (e.g.
8611*4882a593Smuzhiyun      should be removed from :term:`EXTRA_OECONF` or
8612*4882a593Smuzhiyun      :term:`PACKAGECONFIG_CONFARGS`).
8613*4882a593Smuzhiyun      However, there are common options that are passed to all
8614*4882a593Smuzhiyun      configure scripts at a class level, but might not be valid for some
8615*4882a593Smuzhiyun      configure scripts. Therefore warnings about these options are useless.
8616*4882a593Smuzhiyun      For these cases, the options are added to :term:`UNKNOWN_CONFIGURE_OPT_IGNORE`.
8617*4882a593Smuzhiyun
8618*4882a593Smuzhiyun      The configure arguments check that uses
8619*4882a593Smuzhiyun      :term:`UNKNOWN_CONFIGURE_OPT_IGNORE` is part of the
8620*4882a593Smuzhiyun      :ref:`insane <ref-classes-insane>` class and is only enabled if the
8621*4882a593Smuzhiyun      recipe inherits the :ref:`autotools <ref-classes-autotools>` class.
8622*4882a593Smuzhiyun
8623*4882a593Smuzhiyun   :term:`UPDATERCPN`
8624*4882a593Smuzhiyun      For recipes inheriting the
8625*4882a593Smuzhiyun      :ref:`update-rc.d <ref-classes-update-rc.d>` class, :term:`UPDATERCPN`
8626*4882a593Smuzhiyun      specifies the package that contains the initscript that is enabled.
8627*4882a593Smuzhiyun
8628*4882a593Smuzhiyun      The default value is "${PN}". Given that almost all recipes that
8629*4882a593Smuzhiyun      install initscripts package them in the main package for the recipe,
8630*4882a593Smuzhiyun      you rarely need to set this variable in individual recipes.
8631*4882a593Smuzhiyun
8632*4882a593Smuzhiyun   :term:`UPSTREAM_CHECK_COMMITS`
8633*4882a593Smuzhiyun      You can perform a per-recipe check for what the latest upstream
8634*4882a593Smuzhiyun      source code version is by calling ``devtool latest-version recipe``. If
8635*4882a593Smuzhiyun      the recipe source code is provided from Git repositories, but
8636*4882a593Smuzhiyun      releases are not identified by Git tags, set :term:`UPSTREAM_CHECK_COMMITS`
8637*4882a593Smuzhiyun      to ``1`` in the recipe, and the OpenEmbedded build system
8638*4882a593Smuzhiyun      will compare the latest commit with the one currently specified
8639*4882a593Smuzhiyun      by the recipe (:term:`SRCREV`).
8640*4882a593Smuzhiyun      ::
8641*4882a593Smuzhiyun
8642*4882a593Smuzhiyun         UPSTREAM_CHECK_COMMITS = "1"
8643*4882a593Smuzhiyun
8644*4882a593Smuzhiyun   :term:`UPSTREAM_CHECK_GITTAGREGEX`
8645*4882a593Smuzhiyun      You can perform a per-recipe check for what the latest upstream
8646*4882a593Smuzhiyun      source code version is by calling ``devtool latest-version recipe``. If
8647*4882a593Smuzhiyun      the recipe source code is provided from Git repositories, the
8648*4882a593Smuzhiyun      OpenEmbedded build system determines the latest upstream version by
8649*4882a593Smuzhiyun      picking the latest tag from the list of all repository tags.
8650*4882a593Smuzhiyun
8651*4882a593Smuzhiyun      You can use the :term:`UPSTREAM_CHECK_GITTAGREGEX` variable to provide a
8652*4882a593Smuzhiyun      regular expression to filter only the relevant tags should the
8653*4882a593Smuzhiyun      default filter not work correctly.
8654*4882a593Smuzhiyun      ::
8655*4882a593Smuzhiyun
8656*4882a593Smuzhiyun         UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex"
8657*4882a593Smuzhiyun
8658*4882a593Smuzhiyun   :term:`UPSTREAM_CHECK_REGEX`
8659*4882a593Smuzhiyun      Use the :term:`UPSTREAM_CHECK_REGEX` variable to specify a different
8660*4882a593Smuzhiyun      regular expression instead of the default one when the package
8661*4882a593Smuzhiyun      checking system is parsing the page found using
8662*4882a593Smuzhiyun      :term:`UPSTREAM_CHECK_URI`.
8663*4882a593Smuzhiyun      ::
8664*4882a593Smuzhiyun
8665*4882a593Smuzhiyun         UPSTREAM_CHECK_REGEX = "package_regex"
8666*4882a593Smuzhiyun
8667*4882a593Smuzhiyun   :term:`UPSTREAM_CHECK_URI`
8668*4882a593Smuzhiyun      You can perform a per-recipe check for what the latest upstream
8669*4882a593Smuzhiyun      source code version is by calling ``devtool latest-version recipe``. If
8670*4882a593Smuzhiyun      the source code is provided from tarballs, the latest version is
8671*4882a593Smuzhiyun      determined by fetching the directory listing where the tarball is and
8672*4882a593Smuzhiyun      attempting to find a later tarball. When this approach does not work,
8673*4882a593Smuzhiyun      you can use :term:`UPSTREAM_CHECK_URI` to provide a different URI that
8674*4882a593Smuzhiyun      contains the link to the latest tarball.
8675*4882a593Smuzhiyun      ::
8676*4882a593Smuzhiyun
8677*4882a593Smuzhiyun         UPSTREAM_CHECK_URI = "recipe_url"
8678*4882a593Smuzhiyun
8679*4882a593Smuzhiyun   :term:`UPSTREAM_VERSION_UNKNOWN`
8680*4882a593Smuzhiyun      You can perform a per-recipe check for what the latest upstream
8681*4882a593Smuzhiyun      source code version is by calling ``devtool latest-version recipe``.
8682*4882a593Smuzhiyun      If no combination of the :term:`UPSTREAM_CHECK_URI`, :term:`UPSTREAM_CHECK_REGEX`,
8683*4882a593Smuzhiyun      :term:`UPSTREAM_CHECK_GITTAGREGEX` and :term:`UPSTREAM_CHECK_COMMITS` variables in
8684*4882a593Smuzhiyun      the recipe allows to determine what the latest upstream version is,
8685*4882a593Smuzhiyun      you can set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1`` in the recipe
8686*4882a593Smuzhiyun      to acknowledge that the check cannot be performed.
8687*4882a593Smuzhiyun      ::
8688*4882a593Smuzhiyun
8689*4882a593Smuzhiyun         UPSTREAM_VERSION_UNKNOWN = "1"
8690*4882a593Smuzhiyun
8691*4882a593Smuzhiyun   :term:`USE_DEVFS`
8692*4882a593Smuzhiyun      Determines if ``devtmpfs`` is used for ``/dev`` population. The
8693*4882a593Smuzhiyun      default value used for :term:`USE_DEVFS` is "1" when no value is
8694*4882a593Smuzhiyun      specifically set. Typically, you would set :term:`USE_DEVFS` to "0" for a
8695*4882a593Smuzhiyun      statically populated ``/dev`` directory.
8696*4882a593Smuzhiyun
8697*4882a593Smuzhiyun      See the ":ref:`dev-manual/common-tasks:selecting a device manager`" section in
8698*4882a593Smuzhiyun      the Yocto Project Development Tasks Manual for information on how to
8699*4882a593Smuzhiyun      use this variable.
8700*4882a593Smuzhiyun
8701*4882a593Smuzhiyun   :term:`USE_VT`
8702*4882a593Smuzhiyun      When using
8703*4882a593Smuzhiyun      :ref:`SysVinit <dev-manual/common-tasks:enabling system services>`,
8704*4882a593Smuzhiyun      determines whether or not to run a
8705*4882a593Smuzhiyun      `getty <https://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any
8706*4882a593Smuzhiyun      virtual terminals in order to enable logging in through those
8707*4882a593Smuzhiyun      terminals.
8708*4882a593Smuzhiyun
8709*4882a593Smuzhiyun      The default value used for :term:`USE_VT` is "1" when no default value is
8710*4882a593Smuzhiyun      specifically set. Typically, you would set :term:`USE_VT` to "0" in the
8711*4882a593Smuzhiyun      machine configuration file for machines that do not have a graphical
8712*4882a593Smuzhiyun      display attached and therefore do not need virtual terminal
8713*4882a593Smuzhiyun      functionality.
8714*4882a593Smuzhiyun
8715*4882a593Smuzhiyun   :term:`USER_CLASSES`
8716*4882a593Smuzhiyun      A list of classes to globally inherit. These classes are used by the
8717*4882a593Smuzhiyun      OpenEmbedded build system to enable extra features.
8718*4882a593Smuzhiyun
8719*4882a593Smuzhiyun      The default list is set in your ``local.conf`` file::
8720*4882a593Smuzhiyun
8721*4882a593Smuzhiyun         USER_CLASSES ?= "buildstats"
8722*4882a593Smuzhiyun
8723*4882a593Smuzhiyun      For more information, see
8724*4882a593Smuzhiyun      ``meta-poky/conf/local.conf.sample`` in the :term:`Source Directory`.
8725*4882a593Smuzhiyun
8726*4882a593Smuzhiyun   :term:`USERADD_ERROR_DYNAMIC`
8727*4882a593Smuzhiyun      If set to ``error``, forces the OpenEmbedded build system to produce
8728*4882a593Smuzhiyun      an error if the user identification (``uid``) and group
8729*4882a593Smuzhiyun      identification (``gid``) values are not defined in any of the files
8730*4882a593Smuzhiyun      listed in :term:`USERADD_UID_TABLES` and
8731*4882a593Smuzhiyun      :term:`USERADD_GID_TABLES`. If set to
8732*4882a593Smuzhiyun      ``warn``, a warning will be issued instead.
8733*4882a593Smuzhiyun
8734*4882a593Smuzhiyun      The default behavior for the build system is to dynamically apply
8735*4882a593Smuzhiyun      ``uid`` and ``gid`` values. Consequently, the
8736*4882a593Smuzhiyun      :term:`USERADD_ERROR_DYNAMIC` variable is by default not set. If you plan
8737*4882a593Smuzhiyun      on using statically assigned ``gid`` and ``uid`` values, you should
8738*4882a593Smuzhiyun      set the :term:`USERADD_ERROR_DYNAMIC` variable in your ``local.conf``
8739*4882a593Smuzhiyun      file as follows::
8740*4882a593Smuzhiyun
8741*4882a593Smuzhiyun         USERADD_ERROR_DYNAMIC = "error"
8742*4882a593Smuzhiyun
8743*4882a593Smuzhiyun      Overriding the
8744*4882a593Smuzhiyun      default behavior implies you are going to also take steps to set
8745*4882a593Smuzhiyun      static ``uid`` and ``gid`` values through use of the
8746*4882a593Smuzhiyun      :term:`USERADDEXTENSION`,
8747*4882a593Smuzhiyun      :term:`USERADD_UID_TABLES`, and
8748*4882a593Smuzhiyun      :term:`USERADD_GID_TABLES` variables.
8749*4882a593Smuzhiyun
8750*4882a593Smuzhiyun      .. note::
8751*4882a593Smuzhiyun
8752*4882a593Smuzhiyun         There is a difference in behavior between setting
8753*4882a593Smuzhiyun         :term:`USERADD_ERROR_DYNAMIC` to ``error`` and setting it to ``warn``.
8754*4882a593Smuzhiyun         When it is set to ``warn``, the build system will report a warning for
8755*4882a593Smuzhiyun         every undefined ``uid`` and ``gid`` in any recipe. But when it is set
8756*4882a593Smuzhiyun         to ``error``, it will only report errors for recipes that are actually
8757*4882a593Smuzhiyun         built.
8758*4882a593Smuzhiyun         This saves you from having to add static IDs for recipes that you
8759*4882a593Smuzhiyun         know will never be built.
8760*4882a593Smuzhiyun
8761*4882a593Smuzhiyun   :term:`USERADD_GID_TABLES`
8762*4882a593Smuzhiyun      Specifies a password file to use for obtaining static group
8763*4882a593Smuzhiyun      identification (``gid``) values when the OpenEmbedded build system
8764*4882a593Smuzhiyun      adds a group to the system during package installation.
8765*4882a593Smuzhiyun
8766*4882a593Smuzhiyun      When applying static group identification (``gid``) values, the
8767*4882a593Smuzhiyun      OpenEmbedded build system looks in :term:`BBPATH` for a
8768*4882a593Smuzhiyun      ``files/group`` file and then applies those ``uid`` values. Set the
8769*4882a593Smuzhiyun      variable as follows in your ``local.conf`` file::
8770*4882a593Smuzhiyun
8771*4882a593Smuzhiyun
8772*4882a593Smuzhiyun         USERADD_GID_TABLES = "files/group"
8773*4882a593Smuzhiyun
8774*4882a593Smuzhiyun      .. note::
8775*4882a593Smuzhiyun
8776*4882a593Smuzhiyun         Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8777*4882a593Smuzhiyun         causes the build system to use static ``gid`` values.
8778*4882a593Smuzhiyun
8779*4882a593Smuzhiyun   :term:`USERADD_PACKAGES`
8780*4882a593Smuzhiyun      When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8781*4882a593Smuzhiyun      this variable specifies the individual packages within the recipe
8782*4882a593Smuzhiyun      that require users and/or groups to be added.
8783*4882a593Smuzhiyun
8784*4882a593Smuzhiyun      You must set this variable if the recipe inherits the class. For
8785*4882a593Smuzhiyun      example, the following enables adding a user for the main package in
8786*4882a593Smuzhiyun      a recipe::
8787*4882a593Smuzhiyun
8788*4882a593Smuzhiyun         USERADD_PACKAGES = "${PN}"
8789*4882a593Smuzhiyun
8790*4882a593Smuzhiyun      .. note::
8791*4882a593Smuzhiyun
8792*4882a593Smuzhiyun         It follows that if you are going to use the :term:`USERADD_PACKAGES`
8793*4882a593Smuzhiyun         variable, you need to set one or more of the :term:`USERADD_PARAM`,
8794*4882a593Smuzhiyun         :term:`GROUPADD_PARAM`, or :term:`GROUPMEMS_PARAM` variables.
8795*4882a593Smuzhiyun
8796*4882a593Smuzhiyun   :term:`USERADD_PARAM`
8797*4882a593Smuzhiyun      When inheriting the :ref:`useradd <ref-classes-useradd>` class,
8798*4882a593Smuzhiyun      this variable specifies for a package what parameters should pass to
8799*4882a593Smuzhiyun      the ``useradd`` command if you add a user to the system when the
8800*4882a593Smuzhiyun      package is installed.
8801*4882a593Smuzhiyun
8802*4882a593Smuzhiyun      Here is an example from the ``dbus`` recipe::
8803*4882a593Smuzhiyun
8804*4882a593Smuzhiyun         USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/dbus \
8805*4882a593Smuzhiyun                                --no-create-home --shell /bin/false \
8806*4882a593Smuzhiyun                                --user-group messagebus"
8807*4882a593Smuzhiyun
8808*4882a593Smuzhiyun      For information on the
8809*4882a593Smuzhiyun      standard Linux shell command ``useradd``, see
8810*4882a593Smuzhiyun      https://linux.die.net/man/8/useradd.
8811*4882a593Smuzhiyun
8812*4882a593Smuzhiyun   :term:`USERADD_UID_TABLES`
8813*4882a593Smuzhiyun      Specifies a password file to use for obtaining static user
8814*4882a593Smuzhiyun      identification (``uid``) values when the OpenEmbedded build system
8815*4882a593Smuzhiyun      adds a user to the system during package installation.
8816*4882a593Smuzhiyun
8817*4882a593Smuzhiyun      When applying static user identification (``uid``) values, the
8818*4882a593Smuzhiyun      OpenEmbedded build system looks in :term:`BBPATH` for a
8819*4882a593Smuzhiyun      ``files/passwd`` file and then applies those ``uid`` values. Set the
8820*4882a593Smuzhiyun      variable as follows in your ``local.conf`` file::
8821*4882a593Smuzhiyun
8822*4882a593Smuzhiyun         USERADD_UID_TABLES = "files/passwd"
8823*4882a593Smuzhiyun
8824*4882a593Smuzhiyun      .. note::
8825*4882a593Smuzhiyun
8826*4882a593Smuzhiyun         Setting the :term:`USERADDEXTENSION` variable to "useradd-staticids"
8827*4882a593Smuzhiyun         causes the build system to use static ``uid`` values.
8828*4882a593Smuzhiyun
8829*4882a593Smuzhiyun   :term:`USERADDEXTENSION`
8830*4882a593Smuzhiyun      When set to "useradd-staticids", causes the OpenEmbedded build system
8831*4882a593Smuzhiyun      to base all user and group additions on a static ``passwd`` and
8832*4882a593Smuzhiyun      ``group`` files found in :term:`BBPATH`.
8833*4882a593Smuzhiyun
8834*4882a593Smuzhiyun      To use static user identification (``uid``) and group identification
8835*4882a593Smuzhiyun      (``gid``) values, set the variable as follows in your ``local.conf``
8836*4882a593Smuzhiyun      file: USERADDEXTENSION = "useradd-staticids"
8837*4882a593Smuzhiyun
8838*4882a593Smuzhiyun      .. note::
8839*4882a593Smuzhiyun
8840*4882a593Smuzhiyun         Setting this variable to use static ``uid`` and ``gid``
8841*4882a593Smuzhiyun         values causes the OpenEmbedded build system to employ the
8842*4882a593Smuzhiyun         :ref:`ref-classes-useradd` class.
8843*4882a593Smuzhiyun
8844*4882a593Smuzhiyun      If you use static ``uid`` and ``gid`` information, you must also
8845*4882a593Smuzhiyun      specify the ``files/passwd`` and ``files/group`` files by setting the
8846*4882a593Smuzhiyun      :term:`USERADD_UID_TABLES` and
8847*4882a593Smuzhiyun      :term:`USERADD_GID_TABLES` variables.
8848*4882a593Smuzhiyun      Additionally, you should also set the
8849*4882a593Smuzhiyun      :term:`USERADD_ERROR_DYNAMIC` variable.
8850*4882a593Smuzhiyun
8851*4882a593Smuzhiyun   :term:`VOLATILE_LOG_DIR`
8852*4882a593Smuzhiyun      Specifies the persistence of the target's ``/var/log`` directory,
8853*4882a593Smuzhiyun      which is used to house postinstall target log files.
8854*4882a593Smuzhiyun
8855*4882a593Smuzhiyun      By default, :term:`VOLATILE_LOG_DIR` is set to "yes", which means the
8856*4882a593Smuzhiyun      file is not persistent. You can override this setting by setting the
8857*4882a593Smuzhiyun      variable to "no" to make the log directory persistent.
8858*4882a593Smuzhiyun
8859*4882a593Smuzhiyun   :term:`WARN_QA`
8860*4882a593Smuzhiyun      Specifies the quality assurance checks whose failures are reported as
8861*4882a593Smuzhiyun      warnings by the OpenEmbedded build system. You set this variable in
8862*4882a593Smuzhiyun      your distribution configuration file. For a list of the checks you
8863*4882a593Smuzhiyun      can control with this variable, see the
8864*4882a593Smuzhiyun      ":ref:`ref-classes-insane`" section.
8865*4882a593Smuzhiyun
8866*4882a593Smuzhiyun   :term:`WKS_FILE`
8867*4882a593Smuzhiyun      Specifies the location of the Wic kickstart file that is used by the
8868*4882a593Smuzhiyun      OpenEmbedded build system to create a partitioned image
8869*4882a593Smuzhiyun      (``image.wic``). For information on how to create a partitioned
8870*4882a593Smuzhiyun      image, see the
8871*4882a593Smuzhiyun      ":ref:`dev-manual/common-tasks:creating partitioned images using wic`"
8872*4882a593Smuzhiyun      section in the Yocto Project Development Tasks Manual. For details on
8873*4882a593Smuzhiyun      the kickstart file format, see the ":doc:`/ref-manual/kickstart`" Chapter.
8874*4882a593Smuzhiyun
8875*4882a593Smuzhiyun   :term:`WKS_FILE_DEPENDS`
8876*4882a593Smuzhiyun      When placed in the recipe that builds your image, this variable lists
8877*4882a593Smuzhiyun      build-time dependencies. The :term:`WKS_FILE_DEPENDS` variable is only
8878*4882a593Smuzhiyun      applicable when Wic images are active (i.e. when
8879*4882a593Smuzhiyun      :term:`IMAGE_FSTYPES` contains entries related
8880*4882a593Smuzhiyun      to Wic). If your recipe does not create Wic images, the variable has
8881*4882a593Smuzhiyun      no effect.
8882*4882a593Smuzhiyun
8883*4882a593Smuzhiyun      The :term:`WKS_FILE_DEPENDS` variable is similar to the
8884*4882a593Smuzhiyun      :term:`DEPENDS` variable. When you use the variable in
8885*4882a593Smuzhiyun      your recipe that builds the Wic image, dependencies you list in the
8886*4882a593Smuzhiyun      :term:`WKS_FILE_DEPENDS` variable are added to the :term:`DEPENDS` variable.
8887*4882a593Smuzhiyun
8888*4882a593Smuzhiyun      With the :term:`WKS_FILE_DEPENDS` variable, you have the possibility to
8889*4882a593Smuzhiyun      specify a list of additional dependencies (e.g. native tools,
8890*4882a593Smuzhiyun      bootloaders, and so forth), that are required to build Wic images.
8891*4882a593Smuzhiyun      Following is an example::
8892*4882a593Smuzhiyun
8893*4882a593Smuzhiyun         WKS_FILE_DEPENDS = "some-native-tool"
8894*4882a593Smuzhiyun
8895*4882a593Smuzhiyun      In the
8896*4882a593Smuzhiyun      previous example, some-native-tool would be replaced with an actual
8897*4882a593Smuzhiyun      native tool on which the build would depend.
8898*4882a593Smuzhiyun
8899*4882a593Smuzhiyun   :term:`WORKDIR`
8900*4882a593Smuzhiyun      The pathname of the work directory in which the OpenEmbedded build
8901*4882a593Smuzhiyun      system builds a recipe. This directory is located within the
8902*4882a593Smuzhiyun      :term:`TMPDIR` directory structure and is specific to
8903*4882a593Smuzhiyun      the recipe being built and the system for which it is being built.
8904*4882a593Smuzhiyun
8905*4882a593Smuzhiyun      The :term:`WORKDIR` directory is defined as follows::
8906*4882a593Smuzhiyun
8907*4882a593Smuzhiyun         ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
8908*4882a593Smuzhiyun
8909*4882a593Smuzhiyun      The actual directory depends on several things:
8910*4882a593Smuzhiyun
8911*4882a593Smuzhiyun      -  :term:`TMPDIR`: The top-level build output directory
8912*4882a593Smuzhiyun      -  :term:`MULTIMACH_TARGET_SYS`: The target system identifier
8913*4882a593Smuzhiyun      -  :term:`PN`: The recipe name
8914*4882a593Smuzhiyun      -  :term:`EXTENDPE`: The epoch - (if :term:`PE` is not specified, which
8915*4882a593Smuzhiyun         is usually the case for most recipes, then `EXTENDPE` is blank)
8916*4882a593Smuzhiyun      -  :term:`PV`: The recipe version
8917*4882a593Smuzhiyun      -  :term:`PR`: The recipe revision
8918*4882a593Smuzhiyun
8919*4882a593Smuzhiyun      As an example, assume a Source Directory top-level folder name
8920*4882a593Smuzhiyun      ``poky``, a default Build Directory at ``poky/build``, and a
8921*4882a593Smuzhiyun      ``qemux86-poky-linux`` machine target system. Furthermore, suppose
8922*4882a593Smuzhiyun      your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
8923*4882a593Smuzhiyun      directory the build system uses to build the package would be as
8924*4882a593Smuzhiyun      follows::
8925*4882a593Smuzhiyun
8926*4882a593Smuzhiyun         poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
8927*4882a593Smuzhiyun
8928*4882a593Smuzhiyun   :term:`XSERVER`
8929*4882a593Smuzhiyun      Specifies the packages that should be installed to provide an X
8930*4882a593Smuzhiyun      server and drivers for the current machine, assuming your image
8931*4882a593Smuzhiyun      directly includes ``packagegroup-core-x11-xserver`` or, perhaps
8932*4882a593Smuzhiyun      indirectly, includes "x11-base" in
8933*4882a593Smuzhiyun      :term:`IMAGE_FEATURES`.
8934*4882a593Smuzhiyun
8935*4882a593Smuzhiyun      The default value of :term:`XSERVER`, if not specified in the machine
8936*4882a593Smuzhiyun      configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev".
8937*4882a593Smuzhiyun
8938*4882a593Smuzhiyun   :term:`XZ_THREADS`
8939*4882a593Smuzhiyun      Specifies the number of parallel threads that should be used when
8940*4882a593Smuzhiyun      using xz compression.
8941*4882a593Smuzhiyun
8942*4882a593Smuzhiyun      By default this scales with core count, but is never set less than 2
8943*4882a593Smuzhiyun      to ensure that multi-threaded mode is always used so that the output
8944*4882a593Smuzhiyun      file contents are deterministic. Builds will work with a value of 1
8945*4882a593Smuzhiyun      but the output will differ compared to the output from the compression
8946*4882a593Smuzhiyun      generated when more than one thread is used.
8947*4882a593Smuzhiyun
8948*4882a593Smuzhiyun      On systems where many tasks run in parallel, setting a limit to this
8949*4882a593Smuzhiyun      can be helpful in controlling system resource usage.
8950*4882a593Smuzhiyun
8951*4882a593Smuzhiyun    :term:`XZ_MEMLIMIT`
8952*4882a593Smuzhiyun      Specifies the maximum memory the xz compression should use as a percentage
8953*4882a593Smuzhiyun      of system memory. If unconstrained the xz compressor can use large amounts of
8954*4882a593Smuzhiyun      memory and become problematic with parallelism elsewhere in the build.
8955*4882a593Smuzhiyun      "50%" has been found to be a good value.
8956*4882a593Smuzhiyun
8957*4882a593Smuzhiyun   :term:`ZSTD_THREADS`
8958*4882a593Smuzhiyun      Specifies the number of parallel threads that should be used when
8959*4882a593Smuzhiyun      using ZStandard compression.
8960*4882a593Smuzhiyun
8961*4882a593Smuzhiyun      By default this scales with core count, but is never set less than 2
8962*4882a593Smuzhiyun      to ensure that multi-threaded mode is always used so that the output
8963*4882a593Smuzhiyun      file contents are deterministic. Builds will work with a value of 1
8964*4882a593Smuzhiyun      but the output will differ compared to the output from the compression
8965*4882a593Smuzhiyun      generated when more than one thread is used.
8966*4882a593Smuzhiyun
8967*4882a593Smuzhiyun      On systems where many tasks run in parallel, setting a limit to this
8968*4882a593Smuzhiyun      can be helpful in controlling system resource usage.
8969*4882a593Smuzhiyun
8970