summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual
diff options
context:
space:
mode:
authorNicolas Dechesne <nicolas.dechesne@linaro.org>2020-06-26 19:10:51 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-17 10:09:33 +0100
commit9bd69b1f1d71a9692189beeac75af9dfbad816cc (patch)
tree305347fca899074aed5610e0e82eaec180bf630c /documentation/ref-manual
parentc40a8d5904c29046f1cbbeb998e6cd7c24f9b206 (diff)
downloadpoky-9bd69b1f1d71a9692189beeac75af9dfbad816cc.tar.gz
sphinx: initial sphinx support
This commit is autogenerated pandoc to generate an inital set of reST files based on DocBook XML files. A .rst file is generated for each .xml files in all manuals with this command: cd <manual> for i in *.xml; do \ pandoc -f docbook -t rst --shift-heading-level-by=-1 \ $i -o $(basename $i .xml).rst \ done The conversion was done with: pandoc 2.9.2.1-91 (Arch Linux). Also created an initial top level index file for each document, and added all 'books' to the top leve index.rst file. The YP manuals layout is organized as: Book Chapter Section Section Section Sphinx uses section headers to create the document structure. ReStructuredText defines sections headers like that: To break longer text up into sections, you use section headers. These are a single line of text (one or more words) with adornment: an underline alone, or an underline and an overline together, in dashes "-----", equals "======", tildes "~~~~~~" or any of the non-alphanumeric characters = - ` : ' " ~ ^ _ * + # < > that you feel comfortable with. An underline-only adornment is distinct from an overline-and-underline adornment using the same character. The underline/overline must be at least as long as the title text. Be consistent, since all sections marked with the same adornment style are deemed to be at the same level: Let's define the following convention when converting from Docbook: Book => overline === (Title) Chapter => overline *** (1.) Section => ==== (1.1) Section => ---- (1.1.1) Section => ~~~~ (1.1.1.1) Section => ^^^^ (1.1.1.1.1) During the conversion with pandoc, we used --shift-heading-level=-1 to convert most of DocBook headings automatically. However with this setting, the Chapter header was removed, so I added it back manually. Without this setting all headings were off by one, which was more difficult to manually fix. At least with this change, we now have the same TOC with Sphinx and DocBook. (From yocto-docs rev: 3c73d64a476d4423ee4c6808c685fa94d88d7df8) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/ref-manual')
-rw-r--r--documentation/ref-manual/faq.rst418
-rw-r--r--documentation/ref-manual/migration.rst5081
-rw-r--r--documentation/ref-manual/ref-classes.rst2881
-rw-r--r--documentation/ref-manual/ref-devtool-reference.rst533
-rw-r--r--documentation/ref-manual/ref-features.rst353
-rw-r--r--documentation/ref-manual/ref-images.rst137
-rw-r--r--documentation/ref-manual/ref-kickstart.rst205
-rw-r--r--documentation/ref-manual/ref-manual.rst24
-rw-r--r--documentation/ref-manual/ref-qa-checks.rst524
-rw-r--r--documentation/ref-manual/ref-release-process.rst182
-rw-r--r--documentation/ref-manual/ref-structure.rst871
-rw-r--r--documentation/ref-manual/ref-system-requirements.rst378
-rw-r--r--documentation/ref-manual/ref-tasks.rst834
-rw-r--r--documentation/ref-manual/ref-terms.rst369
-rw-r--r--documentation/ref-manual/ref-variables.rst7924
-rw-r--r--documentation/ref-manual/ref-varlocality.rst164
-rw-r--r--documentation/ref-manual/resources.rst207
17 files changed, 21085 insertions, 0 deletions
diff --git a/documentation/ref-manual/faq.rst b/documentation/ref-manual/faq.rst
new file mode 100644
index 0000000000..6d26537980
--- /dev/null
+++ b/documentation/ref-manual/faq.rst
@@ -0,0 +1,418 @@
1***
2FAQ
3***
4
5**Q:** How does Poky differ from `OpenEmbedded <&OE_HOME_URL;>`__?
6
7**A:** The term "`Poky <#>`__" refers to the specific reference build
8system that the Yocto Project provides. Poky is based on
9`OE-Core <#oe-core>`__ and `BitBake <#bitbake-term>`__. Thus, the
10generic term used here for the build system is the "OpenEmbedded build
11system." Development in the Yocto Project using Poky is closely tied to
12OpenEmbedded, with changes always being merged to OE-Core or BitBake
13first before being pulled back into Poky. This practice benefits both
14projects immediately.
15
16**Q:** My development system does not meet the required Git, tar, and
17Python versions. In particular, I do not have Python 3.5.0 or greater.
18Can I still use the Yocto Project?
19
20**A:** You can get the required tools on your host development system a
21couple different ways (i.e. building a tarball or downloading a
22tarball). See the "`Required Git, tar, Python and gcc
23Versions <#required-git-tar-python-and-gcc-versions>`__" section for
24steps on how to update your build tools.
25
26**Q:** How can you claim Poky / OpenEmbedded-Core is stable?
27
28**A:** There are three areas that help with stability;
29
30- The Yocto Project team keeps `OE-Core <#oe-core>`__ small and
31 focused, containing around 830 recipes as opposed to the thousands
32 available in other OpenEmbedded community layers. Keeping it small
33 makes it easy to test and maintain.
34
35- The Yocto Project team runs manual and automated tests using a small,
36 fixed set of reference hardware as well as emulated targets.
37
38- The Yocto Project uses an autobuilder, which provides continuous
39 build and integration tests.
40
41**Q:** How do I get support for my board added to the Yocto Project?
42
43**A:** Support for an additional board is added by creating a Board
44Support Package (BSP) layer for it. For more information on how to
45create a BSP layer, see the "`Understanding and Creating
46Layers <&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers>`__"
47section in the Yocto Project Development Tasks Manual and the `Yocto
48Project Board Support Package (BSP) Developer's
49Guide <&YOCTO_DOCS_BSP_URL;>`__.
50
51Usually, if the board is not completely exotic, adding support in the
52Yocto Project is fairly straightforward.
53
54**Q:** Are there any products built using the OpenEmbedded build system?
55
56**A:** The software running on the `Vernier
57LabQuest <http://vernier.com/labquest/>`__ is built using the
58OpenEmbedded build system. See the `Vernier
59LabQuest <http://www.vernier.com/products/interfaces/labq/>`__ website
60for more information. There are a number of pre-production devices using
61the OpenEmbedded build system and the Yocto Project team announces them
62as soon as they are released.
63
64**Q:** What does the OpenEmbedded build system produce as output?
65
66**A:** Because you can use the same set of recipes to create output of
67various formats, the output of an OpenEmbedded build depends on how you
68start it. Usually, the output is a flashable image ready for the target
69device.
70
71**Q:** How do I add my package to the Yocto Project?
72
73**A:** To add a package, you need to create a BitBake recipe. For
74information on how to create a BitBake recipe, see the "`Writing a New
75Recipe <&YOCTO_DOCS_DEV_URL;#new-recipe-writing-a-new-recipe>`__"
76section in the Yocto Project Development Tasks Manual.
77
78**Q:** Do I have to reflash my entire board with a new Yocto Project
79image when recompiling a package?
80
81**A:** The OpenEmbedded build system can build packages in various
82formats such as IPK for OPKG, Debian package (``.deb``), or RPM. You can
83then upgrade the packages using the package tools on the device, much
84like on a desktop distribution such as Ubuntu or Fedora. However,
85package management on the target is entirely optional.
86
87**Q:** I see the error
88'``chmod: XXXXX new permissions are r-xrwxrwx, not r-xr-xr-x``'. What is
89wrong?
90
91**A:** You are probably running the build on an NTFS filesystem. Use
92``ext2``, ``ext3``, or ``ext4`` instead.
93
94**Q:** I see lots of 404 responses for files when the OpenEmbedded build
95system is trying to download sources. Is something wrong?
96
97**A:** Nothing is wrong. The OpenEmbedded build system checks any
98configured source mirrors before downloading from the upstream sources.
99The build system does this searching for both source archives and
100pre-checked out versions of SCM-managed software. These checks help in
101large installations because it can reduce load on the SCM servers
102themselves. The address above is one of the default mirrors configured
103into the build system. Consequently, if an upstream source disappears,
104the team can place sources there so builds continue to work.
105
106**Q:** I have machine-specific data in a package for one machine only
107but the package is being marked as machine-specific in all cases, how do
108I prevent this?
109
110**A:** Set ``SRC_URI_OVERRIDES_PACKAGE_ARCH`` = "0" in the ``.bb`` file
111but make sure the package is manually marked as machine-specific for the
112case that needs it. The code that handles
113``SRC_URI_OVERRIDES_PACKAGE_ARCH`` is in the
114``meta/classes/base.bbclass`` file.
115
116**Q:** I'm behind a firewall and need to use a proxy server. How do I do
117that?
118
119**A:** Most source fetching by the OpenEmbedded build system is done by
120``wget`` and you therefore need to specify the proxy settings in a
121``.wgetrc`` file, which can be in your home directory if you are a
122single user or can be in ``/usr/local/etc/wgetrc`` as a global user
123file.
124
125Following is the applicable code for setting various proxy types in the
126``.wgetrc`` file. By default, these settings are disabled with comments.
127To use them, remove the comments: # You can set the default proxies for
128Wget to use for http, https, and ftp. # They will override the value in
129the environment. #https_proxy = http://proxy.yoyodyne.com:18023/
130#http_proxy = http://proxy.yoyodyne.com:18023/ #ftp_proxy =
131http://proxy.yoyodyne.com:18023/ # If you do not want to use proxy at
132all, set this to off. #use_proxy = on The Yocto Project also includes a
133``meta-poky/conf/site.conf.sample`` file that shows how to configure CVS
134and Git proxy servers if needed. For more information on setting up
135various proxy types and configuring proxy servers, see the "`Working
136Behind a Network
137Proxy <&YOCTO_WIKI_URL;/wiki/Working_Behind_a_Network_Proxy>`__" Wiki
138page.
139
140**Q:** What’s the difference between target and target\ ``-native``?
141
142**A:** The ``*-native`` targets are designed to run on the system being
143used for the build. These are usually tools that are needed to assist
144the build in some way such as ``quilt-native``, which is used to apply
145patches. The non-native version is the one that runs on the target
146device.
147
148**Q:** I'm seeing random build failures. Help?!
149
150**A:** If the same build is failing in totally different and random
151ways, the most likely explanation is:
152
153- The hardware you are running the build on has some problem.
154
155- You are running the build under virtualization, in which case the
156 virtualization probably has bugs.
157
158The OpenEmbedded build system processes a massive amount of data that
159causes lots of network, disk and CPU activity and is sensitive to even
160single-bit failures in any of these areas. True random failures have
161always been traced back to hardware or virtualization issues.
162
163**Q:** When I try to build a native recipe, the build fails with
164``iconv.h`` problems.
165
166**A:** If you get an error message that indicates GNU ``libiconv`` is
167not in use but ``iconv.h`` has been included from ``libiconv``, you need
168to check to see if you have a previously installed version of the header
169file in ``/usr/local/include``. #error GNU libiconv not in use but
170included iconv.h is from libiconv If you find a previously installed
171file, you should either uninstall it or temporarily rename it and try
172the build again.
173
174This issue is just a single manifestation of "system leakage" issues
175caused when the OpenEmbedded build system finds and uses previously
176installed files during a native build. This type of issue might not be
177limited to ``iconv.h``. Be sure that leakage cannot occur from
178``/usr/local/include`` and ``/opt`` locations.
179
180**Q:** What do we need to ship for license compliance?
181
182**A:** This is a difficult question and you need to consult your lawyer
183for the answer for your specific case. It is worth bearing in mind that
184for GPL compliance, there needs to be enough information shipped to
185allow someone else to rebuild and produce the same end result you are
186shipping. This means sharing the source code, any patches applied to it,
187and also any configuration information about how that package was
188configured and built.
189
190You can find more information on licensing in the
191"`Licensing <&YOCTO_DOCS_OM_URL;#licensing>`__" section in the Yocto
192Project Overview and Concepts Manual and also in the "`Maintaining Open
193Source License Compliance During Your Product's
194Lifecycle <&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle>`__"
195section in the Yocto Project Development Tasks Manual.
196
197**Q:** How do I disable the cursor on my touchscreen device?
198
199**A:** You need to create a form factor file as described in the
200"`Miscellaneous BSP-Specific Recipe
201Files <&YOCTO_DOCS_BSP_URL;#bsp-filelayout-misc-recipes>`__" section in
202the Yocto Project Board Support Packages (BSP) Developer's Guide. Set
203the ``HAVE_TOUCHSCREEN`` variable equal to one as follows:
204HAVE_TOUCHSCREEN=1
205
206**Q:** How do I make sure connected network interfaces are brought up by
207default?
208
209**A:** The default interfaces file provided by the netbase recipe does
210not automatically bring up network interfaces. Therefore, you will need
211to add a BSP-specific netbase that includes an interfaces file. See the
212"`Miscellaneous BSP-Specific Recipe
213Files <&YOCTO_DOCS_BSP_URL;#bsp-filelayout-misc-recipes>`__" section in
214the Yocto Project Board Support Packages (BSP) Developer's Guide for
215information on creating these types of miscellaneous recipe files.
216
217For example, add the following files to your layer:
218meta-MACHINE/recipes-bsp/netbase/netbase/MACHINE/interfaces
219meta-MACHINE/recipes-bsp/netbase/netbase_5.0.bbappend
220
221**Q:** How do I create images with more free space?
222
223**A:** By default, the OpenEmbedded build system creates images that are
2241.3 times the size of the populated root filesystem. To affect the image
225size, you need to set various configurations:
226
227- *Image Size:* The OpenEmbedded build system uses the
228 ```IMAGE_ROOTFS_SIZE`` <#var-IMAGE_ROOTFS_SIZE>`__ variable to define
229 the size of the image in Kbytes. The build system determines the size
230 by taking into account the initial root filesystem size before any
231 modifications such as requested size for the image and any requested
232 additional free disk space to be added to the image.
233
234- *Overhead:* Use the
235 ```IMAGE_OVERHEAD_FACTOR`` <#var-IMAGE_OVERHEAD_FACTOR>`__ variable
236 to define the multiplier that the build system applies to the initial
237 image size, which is 1.3 by default.
238
239- *Additional Free Space:* Use the
240 ```IMAGE_ROOTFS_EXTRA_SPACE`` <#var-IMAGE_ROOTFS_EXTRA_SPACE>`__
241 variable to add additional free space to the image. The build system
242 adds this space to the image after it determines its
243 ``IMAGE_ROOTFS_SIZE``.
244
245**Q:** Why don't you support directories with spaces in the pathnames?
246
247**A:** The Yocto Project team has tried to do this before but too many
248of the tools the OpenEmbedded build system depends on, such as
249``autoconf``, break when they find spaces in pathnames. Until that
250situation changes, the team will not support spaces in pathnames.
251
252**Q:** How do I use an external toolchain?
253
254**A:** The toolchain configuration is very flexible and customizable. It
255is primarily controlled with the ``TCMODE`` variable. This variable
256controls which ``tcmode-*.inc`` file to include from the
257``meta/conf/distro/include`` directory within the `Source
258Directory <#source-directory>`__.
259
260The default value of ``TCMODE`` is "default", which tells the
261OpenEmbedded build system to use its internally built toolchain (i.e.
262``tcmode-default.inc``). However, other patterns are accepted. In
263particular, "external-*" refers to external toolchains. One example is
264the Sourcery G++ Toolchain. The support for this toolchain resides in
265the separate ``meta-sourcery`` layer at
266` <http://github.com/MentorEmbedded/meta-sourcery/>`__.
267
268In addition to the toolchain configuration, you also need a
269corresponding toolchain recipe file. This recipe file needs to package
270up any pre-built objects in the toolchain such as ``libgcc``,
271``libstdcc++``, any locales, and ``libc``.
272
273**Q:** How does the OpenEmbedded build system obtain source code and
274will it work behind my firewall or proxy server?
275
276**A:** The way the build system obtains source code is highly
277configurable. You can setup the build system to get source code in most
278environments if HTTP transport is available.
279
280When the build system searches for source code, it first tries the local
281download directory. If that location fails, Poky tries
282```PREMIRRORS`` <#var-PREMIRRORS>`__, the upstream source, and then
283```MIRRORS`` <#var-MIRRORS>`__ in that order.
284
285Assuming your distribution is "poky", the OpenEmbedded build system uses
286the Yocto Project source ``PREMIRRORS`` by default for SCM-based
287sources, upstreams for normal tarballs, and then falls back to a number
288of other mirrors including the Yocto Project source mirror if those
289fail.
290
291As an example, you could add a specific server for the build system to
292attempt before any others by adding something like the following to the
293``local.conf`` configuration file: PREMIRRORS_prepend = "\\ git://.*/.\*
294http://www.yoctoproject.org/sources/ \\n \\ ftp://.*/.\*
295http://www.yoctoproject.org/sources/ \\n \\ http://.*/.\*
296http://www.yoctoproject.org/sources/ \\n \\ https://.*/.\*
297http://www.yoctoproject.org/sources/ \\n"
298
299These changes cause the build system to intercept Git, FTP, HTTP, and
300HTTPS requests and direct them to the ``http://`` sources mirror. You
301can use ``file://`` URLs to point to local directories or network shares
302as well.
303
304Aside from the previous technique, these options also exist:
305BB_NO_NETWORK = "1" This statement tells BitBake to issue an error
306instead of trying to access the Internet. This technique is useful if
307you want to ensure code builds only from local sources.
308
309Here is another technique: BB_FETCH_PREMIRRORONLY = "1" This statement
310limits the build system to pulling source from the ``PREMIRRORS`` only.
311Again, this technique is useful for reproducing builds.
312
313Here is another technique: BB_GENERATE_MIRROR_TARBALLS = "1" This
314statement tells the build system to generate mirror tarballs. This
315technique is useful if you want to create a mirror server. If not,
316however, the technique can simply waste time during the build.
317
318Finally, consider an example where you are behind an HTTP-only firewall.
319You could make the following changes to the ``local.conf`` configuration
320file as long as the ``PREMIRRORS`` server is current: PREMIRRORS_prepend
321= "\\ ftp://.*/.\* http://www.yoctoproject.org/sources/ \\n \\
322http://.*/.\* http://www.yoctoproject.org/sources/ \\n \\ https://.*/.\*
323http://www.yoctoproject.org/sources/ \\n" BB_FETCH_PREMIRRORONLY = "1"
324These changes would cause the build system to successfully fetch source
325over HTTP and any network accesses to anything other than the
326``PREMIRRORS`` would fail.
327
328The build system also honors the standard shell environment variables
329``http_proxy``, ``ftp_proxy``, ``https_proxy``, and ``all_proxy`` to
330redirect requests through proxy servers.
331
332.. note::
333
334 You can find more information on the "
335 Working Behind a Network Proxy
336 " Wiki page.
337
338**Q:** Can I get rid of build output so I can start over?
339
340**A:** Yes - you can easily do this. When you use BitBake to build an
341image, all the build output goes into the directory created when you run
342the build environment setup script (i.e.
343````` <#structure-core-script>`__). By default, this `Build
344Directory <#build-directory>`__ is named ``build`` but can be named
345anything you want.
346
347Within the Build Directory, is the ``tmp`` directory. To remove all the
348build output yet preserve any source code or downloaded files from
349previous builds, simply remove the ``tmp`` directory.
350
351**Q:** Why do ``${bindir}`` and ``${libdir}`` have strange values for
352``-native`` recipes?
353
354**A:** Executables and libraries might need to be used from a directory
355other than the directory into which they were initially installed.
356Complicating this situation is the fact that sometimes these executables
357and libraries are compiled with the expectation of being run from that
358initial installation target directory. If this is the case, moving them
359causes problems.
360
361This scenario is a fundamental problem for package maintainers of
362mainstream Linux distributions as well as for the OpenEmbedded build
363system. As such, a well-established solution exists. Makefiles,
364Autotools configuration scripts, and other build systems are expected to
365respect environment variables such as ``bindir``, ``libdir``, and
366``sysconfdir`` that indicate where executables, libraries, and data
367reside when a program is actually run. They are also expected to respect
368a ``DESTDIR`` environment variable, which is prepended to all the other
369variables when the build system actually installs the files. It is
370understood that the program does not actually run from within
371``DESTDIR``.
372
373When the OpenEmbedded build system uses a recipe to build a
374target-architecture program (i.e. one that is intended for inclusion on
375the image being built), that program eventually runs from the root file
376system of that image. Thus, the build system provides a value of
377"/usr/bin" for ``bindir``, a value of "/usr/lib" for ``libdir``, and so
378forth.
379
380Meanwhile, ``DESTDIR`` is a path within the `Build
381Directory <#build-directory>`__. However, when the recipe builds a
382native program (i.e. one that is intended to run on the build machine),
383that program is never installed directly to the build machine's root
384file system. Consequently, the build system uses paths within the Build
385Directory for ``DESTDIR``, ``bindir`` and related variables. To better
386understand this, consider the following two paths where the first is
387relatively normal and the second is not:
388
389.. note::
390
391 Due to these lengthy examples, the paths are artificially broken
392 across lines for readability.
393
394/home/maxtothemax/poky-bootchart2/build/tmp/work/i586-poky-linux/zlib/
3951.2.8-r0/sysroot-destdir/usr/bin
396/home/maxtothemax/poky-bootchart2/build/tmp/work/x86_64-linux/
397zlib-native/1.2.8-r0/sysroot-destdir/home/maxtothemax/poky-bootchart2/
398build/tmp/sysroots/x86_64-linux/usr/bin Even if the paths look unusual,
399they both are correct - the first for a target and the second for a
400native recipe. These paths are a consequence of the ``DESTDIR``
401mechanism and while they appear strange, they are correct and in
402practice very effective.
403
404**Q:** The files provided by my ``*-native`` recipe do not appear to be
405available to other recipes. Files are missing from the native sysroot,
406my recipe is installing to the wrong place, or I am getting permissions
407errors during the do_install task in my recipe! What is wrong?
408
409**A:** This situation results when a build system does not recognize the
410environment variables supplied to it by `BitBake <#bitbake-term>`__. The
411incident that prompted this FAQ entry involved a Makefile that used an
412environment variable named ``BINDIR`` instead of the more standard
413variable ``bindir``. The makefile's hardcoded default value of
414"/usr/bin" worked most of the time, but not for the recipe's ``-native``
415variant. For another example, permissions errors might be caused by a
416Makefile that ignores ``DESTDIR`` or uses a different name for that
417environment variable. Check the the build system to see if these kinds
418of issues exist.
diff --git a/documentation/ref-manual/migration.rst b/documentation/ref-manual/migration.rst
new file mode 100644
index 0000000000..6ddfa93833
--- /dev/null
+++ b/documentation/ref-manual/migration.rst
@@ -0,0 +1,5081 @@
1******************************************
2Migrating to a Newer Yocto Project Release
3******************************************
4
5This chapter provides information you can use to migrate work to a newer
6Yocto Project release. You can find the same information in the release
7notes for a given release.
8
9General Migration Considerations
10================================
11
12Some considerations are not tied to a specific Yocto Project release.
13This section presents information you should consider when migrating to
14any new Yocto Project release.
15
16- *Dealing with Customized Recipes*: Issues could arise if you take
17 older recipes that contain customizations and simply copy them
18 forward expecting them to work after you migrate to new Yocto Project
19 metadata. For example, suppose you have a recipe in your layer that
20 is a customized version of a core recipe copied from the earlier
21 release, rather than through the use of an append file. When you
22 migrate to a newer version of Yocto Project, the metadata (e.g.
23 perhaps an include file used by the recipe) could have changed in a
24 way that would break the build. Say, for example, a function is
25 removed from an include file and the customized recipe tries to call
26 that function.
27
28 You could "forward-port" all your customizations in your recipe so
29 that everything works for the new release. However, this is not the
30 optimal solution as you would have to repeat this process with each
31 new release if changes occur that give rise to problems.
32
33 The better solution (where practical) is to use append files
34 (``*.bbappend``) to capture any customizations you want to make to a
35 recipe. Doing so, isolates your changes from the main recipe making
36 them much more manageable. However, sometimes it is not practical to
37 use an append file. A good example of this is when introducing a
38 newer or older version of a recipe in another layer.
39
40- *Updating Append Files*: Since append files generally only contain
41 your customizations, they often do not need to be adjusted for new
42 releases. However, if the ``.bbappend`` file is specific to a
43 particular version of the recipe (i.e. its name does not use the %
44 wildcard) and the version of the recipe to which it is appending has
45 changed, then you will at a minimum need to rename the append file to
46 match the name of the recipe file. A mismatch between an append file
47 and its corresponding recipe file (``.bb``) will trigger an error
48 during parsing.
49
50 Depending on the type of customization the append file applies, other
51 incompatibilities might occur when you upgrade. For example, if your
52 append file applies a patch and the recipe to which it is appending
53 is updated to a newer version, the patch might no longer apply. If
54 this is the case and assuming the patch is still needed, you must
55 modify the patch file so that it does apply.
56
57Moving to the Yocto Project 1.3 Release
58=======================================
59
60This section provides migration information for moving to the Yocto
61Project 1.3 Release from the prior release.
62
63.. _1.3-local-configuration:
64
65Local Configuration
66-------------------
67
68Differences include changes for
69```SSTATE_MIRRORS`` <#var-SSTATE_MIRRORS>`__ and ``bblayers.conf``.
70
71.. _migration-1.3-sstate-mirrors:
72
73SSTATE_MIRRORS
74~~~~~~~~~~~~~~
75
76The shared state cache (sstate-cache), as pointed to by
77```SSTATE_DIR`` <#var-SSTATE_DIR>`__, by default now has two-character
78subdirectories to prevent issues arising from too many files in the same
79directory. Also, native sstate-cache packages, which are built to run on
80the host system, will go into a subdirectory named using the distro ID
81string. If you copy the newly structured sstate-cache to a mirror
82location (either local or remote) and then point to it in
83```SSTATE_MIRRORS`` <#var-SSTATE_MIRRORS>`__, you need to append "PATH"
84to the end of the mirror URL so that the path used by BitBake before the
85mirror substitution is appended to the path used to access the mirror.
86Here is an example: SSTATE_MIRRORS = "file://.\*
87http://someserver.tld/share/sstate/PATH"
88
89.. _migration-1.3-bblayers-conf:
90
91bblayers.conf
92~~~~~~~~~~~~~
93
94The ``meta-yocto`` layer consists of two parts that correspond to the
95Poky reference distribution and the reference hardware Board Support
96Packages (BSPs), respectively: ``meta-yocto`` and ``meta-yocto-bsp``.
97When running BitBake for the first time after upgrading, your
98``conf/bblayers.conf`` file will be updated to handle this change and
99you will be asked to re-run or restart for the changes to take effect.
100
101.. _1.3-recipes:
102
103Recipes
104-------
105
106Differences include changes for the following:
107
108- Python function whitespace
109
110- ``proto=`` in ``SRC_URI``
111
112- ``nativesdk``
113
114- Task recipes
115
116- ``IMAGE_FEATURES``
117
118- Removed recipes
119
120.. _migration-1.3-python-function-whitespace:
121
122Python Function Whitespace
123~~~~~~~~~~~~~~~~~~~~~~~~~~
124
125All Python functions must now use four spaces for indentation.
126Previously, an inconsistent mix of spaces and tabs existed, which made
127extending these functions using ``_append`` or ``_prepend`` complicated
128given that Python treats whitespace as syntactically significant. If you
129are defining or extending any Python functions (e.g.
130``populate_packages``, ``do_unpack``, ``do_patch`` and so forth) in
131custom recipes or classes, you need to ensure you are using consistent
132four-space indentation.
133
134.. _migration-1.3-proto=-in-src-uri:
135
136proto= in SRC_URI
137~~~~~~~~~~~~~~~~~
138
139Any use of ``proto=`` in ```SRC_URI`` <#var-SRC_URI>`__ needs to be
140changed to ``protocol=``. In particular, this applies to the following
141URIs:
142
143- ``svn://``
144
145- ``bzr://``
146
147- ``hg://``
148
149- ``osc://``
150
151Other URIs were already using ``protocol=``. This change improves
152consistency.
153
154.. _migration-1.3-nativesdk:
155
156nativesdk
157~~~~~~~~~
158
159The suffix ``nativesdk`` is now implemented as a prefix, which
160simplifies a lot of the packaging code for ``nativesdk`` recipes. All
161custom ``nativesdk`` recipes, which are relocatable packages that are
162native to ```SDK_ARCH`` <#var-SDK_ARCH>`__, and any references need to
163be updated to use ``nativesdk-*`` instead of ``*-nativesdk``.
164
165.. _migration-1.3-task-recipes:
166
167Task Recipes
168~~~~~~~~~~~~
169
170"Task" recipes are now known as "Package groups" and have been renamed
171from ``task-*.bb`` to ``packagegroup-*.bb``. Existing references to the
172previous ``task-*`` names should work in most cases as there is an
173automatic upgrade path for most packages. However, you should update
174references in your own recipes and configurations as they could be
175removed in future releases. You should also rename any custom ``task-*``
176recipes to ``packagegroup-*``, and change them to inherit
177``packagegroup`` instead of ``task``, as well as taking the opportunity
178to remove anything now handled by ``packagegroup.bbclass``, such as
179providing ``-dev`` and ``-dbg`` packages, setting
180```LIC_FILES_CHKSUM`` <#var-LIC_FILES_CHKSUM>`__, and so forth. See the
181"```packagegroup.bbclass`` <#ref-classes-packagegroup>`__" section for
182further details.
183
184.. _migration-1.3-image-features:
185
186IMAGE_FEATURES
187~~~~~~~~~~~~~~
188
189Image recipes that previously included "apps-console-core" in
190```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__ should now include "splash"
191instead to enable the boot-up splash screen. Retaining
192"apps-console-core" will still include the splash screen but generates a
193warning. The "apps-x11-core" and "apps-x11-games" ``IMAGE_FEATURES``
194features have been removed.
195
196.. _migration-1.3-removed-recipes:
197
198Removed Recipes
199~~~~~~~~~~~~~~~
200
201The following recipes have been removed. For most of them, it is
202unlikely that you would have any references to them in your own
203`Metadata <#metadata>`__. However, you should check your metadata
204against this list to be sure:
205
206- *``libx11-trim``*: Replaced by ``libx11``, which has a negligible
207 size difference with modern Xorg.
208
209- *``xserver-xorg-lite``*: Use ``xserver-xorg``, which has a negligible
210 size difference when DRI and GLX modules are not installed.
211
212- *``xserver-kdrive``*: Effectively unmaintained for many years.
213
214- *``mesa-xlib``*: No longer serves any purpose.
215
216- *``galago``*: Replaced by telepathy.
217
218- *``gail``*: Functionality was integrated into GTK+ 2.13.
219
220- *``eggdbus``*: No longer needed.
221
222- *``gcc-*-intermediate``*: The build has been restructured to avoid
223 the need for this step.
224
225- *``libgsmd``*: Unmaintained for many years. Functionality now
226 provided by ``ofono`` instead.
227
228- *contacts, dates, tasks, eds-tools*: Largely unmaintained PIM
229 application suite. It has been moved to ``meta-gnome`` in
230 ``meta-openembedded``.
231
232In addition to the previously listed changes, the ``meta-demoapps``
233directory has also been removed because the recipes in it were not being
234maintained and many had become obsolete or broken. Additionally, these
235recipes were not parsed in the default configuration. Many of these
236recipes are already provided in an updated and maintained form within
237the OpenEmbedded community layers such as ``meta-oe`` and
238``meta-gnome``. For the remainder, you can now find them in the
239``meta-extras`` repository, which is in the Yocto Project `Source
240Repositories <&YOCTO_DOCS_OM_URL;#source-repositories>`__.
241
242.. _1.3-linux-kernel-naming:
243
244Linux Kernel Naming
245-------------------
246
247The naming scheme for kernel output binaries has been changed to now
248include ```PE`` <#var-PE>`__ as part of the filename:
249KERNEL_IMAGE_BASE_NAME ?=
250"${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
251
252Because the ``PE`` variable is not set by default, these binary files
253could result with names that include two dash characters. Here is an
254example:
255bzImage--3.10.9+git0+cd502a8814_7144bcc4b8-r0-qemux86-64-20130830085431.bin
256
257Moving to the Yocto Project 1.4 Release
258=======================================
259
260This section provides migration information for moving to the Yocto
261Project 1.4 Release from the prior release.
262
263.. _migration-1.4-bitbake:
264
265BitBake
266-------
267
268Differences include the following:
269
270- *Comment Continuation:* If a comment ends with a line continuation
271 (\) character, then the next line must also be a comment. Any
272 instance where this is not the case, now triggers a warning. You must
273 either remove the continuation character, or be sure the next line is
274 a comment.
275
276- *Package Name Overrides:* The runtime package specific variables
277 ```RDEPENDS`` <#var-RDEPENDS>`__,
278 ```RRECOMMENDS`` <#var-RRECOMMENDS>`__,
279 ```RSUGGESTS`` <#var-RSUGGESTS>`__,
280 ```RPROVIDES`` <#var-RPROVIDES>`__,
281 ```RCONFLICTS`` <#var-RCONFLICTS>`__,
282 ```RREPLACES`` <#var-RREPLACES>`__, ```FILES`` <#var-FILES>`__,
283 ```ALLOW_EMPTY`` <#var-ALLOW_EMPTY>`__, and the pre, post, install,
284 and uninstall script functions ``pkg_preinst``, ``pkg_postinst``,
285 ``pkg_prerm``, and ``pkg_postrm`` should always have a package name
286 override. For example, use ``RDEPENDS_${PN}`` for the main package
287 instead of ``RDEPENDS``. BitBake uses more strict checks when it
288 parses recipes.
289
290.. _migration-1.4-build-behavior:
291
292Build Behavior
293--------------
294
295Differences include the following:
296
297- *Shared State Code:* The shared state code has been optimized to
298 avoid running unnecessary tasks. For example, the following no longer
299 populates the target sysroot since that is not necessary: $ bitbake
300 -c rootfs some-image Instead, the system just needs to extract the
301 output package contents, re-create the packages, and construct the
302 root filesystem. This change is unlikely to cause any problems unless
303 you have missing declared dependencies.
304
305- *Scanning Directory Names:* When scanning for files in
306 ```SRC_URI`` <#var-SRC_URI>`__, the build system now uses
307 ```FILESOVERRIDES`` <#var-FILESOVERRIDES>`__ instead of
308 ```OVERRIDES`` <#var-OVERRIDES>`__ for the directory names. In
309 general, the values previously in ``OVERRIDES`` are now in
310 ``FILESOVERRIDES`` as well. However, if you relied upon an additional
311 value you previously added to ``OVERRIDES``, you might now need to
312 add it to ``FILESOVERRIDES`` unless you are already adding it through
313 the ```MACHINEOVERRIDES`` <#var-MACHINEOVERRIDES>`__ or
314 ```DISTROOVERRIDES`` <#var-DISTROOVERRIDES>`__ variables, as
315 appropriate. For more related changes, see the
316 "`Variables <#migration-1.4-variables>`__" section.
317
318.. _migration-1.4-proxies-and-fetching-source:
319
320Proxies and Fetching Source
321---------------------------
322
323A new ``oe-git-proxy`` script has been added to replace previous methods
324of handling proxies and fetching source from Git. See the
325``meta-yocto/conf/site.conf.sample`` file for information on how to use
326this script.
327
328.. _migration-1.4-custom-interfaces-file-netbase-change:
329
330Custom Interfaces File (netbase change)
331---------------------------------------
332
333If you have created your own custom ``etc/network/interfaces`` file by
334creating an append file for the ``netbase`` recipe, you now need to
335create an append file for the ``init-ifupdown`` recipe instead, which
336you can find in the `Source Directory <#source-directory>`__ at
337``meta/recipes-core/init-ifupdown``. For information on how to use
338append files, see the "`Using .bbappend
339Files <&YOCTO_DOCS_DEV_URL;#using-bbappend-files>`__" section in the
340Yocto Project Development Tasks Manual.
341
342.. _migration-1.4-remote-debugging:
343
344Remote Debugging
345----------------
346
347Support for remote debugging with the Eclipse IDE is now separated into
348an image feature (``eclipse-debug``) that corresponds to the
349``packagegroup-core-eclipse-debug`` package group. Previously, the
350debugging feature was included through the ``tools-debug`` image
351feature, which corresponds to the ``packagegroup-core-tools-debug``
352package group.
353
354.. _migration-1.4-variables:
355
356Variables
357---------
358
359The following variables have changed:
360
361- *``SANITY_TESTED_DISTROS``:* This variable now uses a distribution
362 ID, which is composed of the host distributor ID followed by the
363 release. Previously,
364 ```SANITY_TESTED_DISTROS`` <#var-SANITY_TESTED_DISTROS>`__ was
365 composed of the description field. For example, "Ubuntu 12.10"
366 becomes "Ubuntu-12.10". You do not need to worry about this change if
367 you are not specifically setting this variable, or if you are
368 specifically setting it to "".
369
370- *``SRC_URI``:* The ``${``\ ```PN`` <#var-PN>`__\ ``}``,
371 ``${``\ ```PF`` <#var-PF>`__\ ``}``,
372 ``${``\ ```P`` <#var-P>`__\ ``}``, and ``FILE_DIRNAME`` directories
373 have been dropped from the default value of the
374 ```FILESPATH`` <#var-FILESPATH>`__ variable, which is used as the
375 search path for finding files referred to in
376 ```SRC_URI`` <#var-SRC_URI>`__. If you have a recipe that relied upon
377 these directories, which would be unusual, then you will need to add
378 the appropriate paths within the recipe or, alternatively, rearrange
379 the files. The most common locations are still covered by ``${BP}``,
380 ``${BPN}``, and "files", which all remain in the default value of
381 ```FILESPATH`` <#var-FILESPATH>`__.
382
383.. _migration-target-package-management-with-rpm:
384
385Target Package Management with RPM
386----------------------------------
387
388If runtime package management is enabled and the RPM backend is
389selected, Smart is now installed for package download, dependency
390resolution, and upgrades instead of Zypper. For more information on how
391to use Smart, run the following command on the target: smart --help
392
393.. _migration-1.4-recipes-moved:
394
395Recipes Moved
396-------------
397
398The following recipes were moved from their previous locations because
399they are no longer used by anything in the OpenEmbedded-Core:
400
401- *``clutter-box2d``:* Now resides in the ``meta-oe`` layer.
402
403- *``evolution-data-server``:* Now resides in the ``meta-gnome`` layer.
404
405- *``gthumb``:* Now resides in the ``meta-gnome`` layer.
406
407- *``gtkhtml2``:* Now resides in the ``meta-oe`` layer.
408
409- *``gupnp``:* Now resides in the ``meta-multimedia`` layer.
410
411- *``gypsy``:* Now resides in the ``meta-oe`` layer.
412
413- *``libcanberra``:* Now resides in the ``meta-gnome`` layer.
414
415- *``libgdata``:* Now resides in the ``meta-gnome`` layer.
416
417- *``libmusicbrainz``:* Now resides in the ``meta-multimedia`` layer.
418
419- *``metacity``:* Now resides in the ``meta-gnome`` layer.
420
421- *``polkit``:* Now resides in the ``meta-oe`` layer.
422
423- *``zeroconf``:* Now resides in the ``meta-networking`` layer.
424
425.. _migration-1.4-removals-and-renames:
426
427Removals and Renames
428--------------------
429
430The following list shows what has been removed or renamed:
431
432- *``evieext``:* Removed because it has been removed from ``xserver``
433 since 2008.
434
435- *Gtk+ DirectFB:* Removed support because upstream Gtk+ no longer
436 supports it as of version 2.18.
437
438- *``libxfontcache / xfontcacheproto``:* Removed because they were
439 removed from the Xorg server in 2008.
440
441- *``libxp / libxprintapputil / libxprintutil / printproto``:* Removed
442 because the XPrint server was removed from Xorg in 2008.
443
444- *``libxtrap / xtrapproto``:* Removed because their functionality was
445 broken upstream.
446
447- *linux-yocto 3.0 kernel:* Removed with linux-yocto 3.8 kernel being
448 added. The linux-yocto 3.2 and linux-yocto 3.4 kernels remain as part
449 of the release.
450
451- *``lsbsetup``:* Removed with functionality now provided by
452 ``lsbtest``.
453
454- *``matchbox-stroke``:* Removed because it was never more than a
455 proof-of-concept.
456
457- *``matchbox-wm-2 / matchbox-theme-sato-2``:* Removed because they are
458 not maintained. However, ``matchbox-wm`` and ``matchbox-theme-sato``
459 are still provided.
460
461- *``mesa-dri``:* Renamed to ``mesa``.
462
463- *``mesa-xlib``:* Removed because it was no longer useful.
464
465- *``mutter``:* Removed because nothing ever uses it and the recipe is
466 very old.
467
468- *``orinoco-conf``:* Removed because it has become obsolete.
469
470- *``update-modules``:* Removed because it is no longer used. The
471 kernel module ``postinstall`` and ``postrm`` scripts can now do the
472 same task without the use of this script.
473
474- *``web``:* Removed because it is not maintained. Superseded by
475 ``web-webkit``.
476
477- *``xf86bigfontproto``:* Removed because upstream it has been disabled
478 by default since 2007. Nothing uses ``xf86bigfontproto``.
479
480- *``xf86rushproto``:* Removed because its dependency in ``xserver``
481 was spurious and it was removed in 2005.
482
483- *``zypper / libzypp / sat-solver``:* Removed and been functionally
484 replaced with Smart (``python-smartpm``) when RPM packaging is used
485 and package management is enabled on the target.
486
487Moving to the Yocto Project 1.5 Release
488=======================================
489
490This section provides migration information for moving to the Yocto
491Project 1.5 Release from the prior release.
492
493.. _migration-1.5-host-dependency-changes:
494
495Host Dependency Changes
496-----------------------
497
498The OpenEmbedded build system now has some additional requirements on
499the host system:
500
501- Python 2.7.3+
502
503- Tar 1.24+
504
505- Git 1.7.8+
506
507- Patched version of Make if you are using 3.82. Most distributions
508 that provide Make 3.82 use the patched version.
509
510If the Linux distribution you are using on your build host does not
511provide packages for these, you can install and use the Buildtools
512tarball, which provides an SDK-like environment containing them.
513
514For more information on this requirement, see the "`Required Git, tar,
515Python and gcc Versions <#required-git-tar-python-and-gcc-versions>`__"
516section.
517
518.. _migration-1.5-atom-pc-bsp:
519
520``atom-pc`` Board Support Package (BSP)
521---------------------------------------
522
523The ``atom-pc`` hardware reference BSP has been replaced by a
524``genericx86`` BSP. This BSP is not necessarily guaranteed to work on
525all x86 hardware, but it will run on a wider range of systems than the
526``atom-pc`` did.
527
528.. note::
529
530 Additionally, a
531 genericx86-64
532 BSP has been added for 64-bit Atom systems.
533
534.. _migration-1.5-bitbake:
535
536BitBake
537-------
538
539The following changes have been made that relate to BitBake:
540
541- BitBake now supports a ``_remove`` operator. The addition of this
542 operator means you will have to rename any items in recipe space
543 (functions, variables) whose names currently contain ``_remove_`` or
544 end with ``_remove`` to avoid unexpected behavior.
545
546- BitBake's global method pool has been removed. This method is not
547 particularly useful and led to clashes between recipes containing
548 functions that had the same name.
549
550- The "none" server backend has been removed. The "process" server
551 backend has been serving well as the default for a long time now.
552
553- The ``bitbake-runtask`` script has been removed.
554
555- ``${``\ ```P`` <#var-P>`__\ ``}`` and
556 ``${``\ ```PF`` <#var-PF>`__\ ``}`` are no longer added to
557 ```PROVIDES`` <#var-PROVIDES>`__ by default in ``bitbake.conf``.
558 These version-specific ``PROVIDES`` items were seldom used.
559 Attempting to use them could result in two versions being built
560 simultaneously rather than just one version due to the way BitBake
561 resolves dependencies.
562
563.. _migration-1.5-qa-warnings:
564
565QA Warnings
566-----------
567
568The following changes have been made to the package QA checks:
569
570- If you have customized ```ERROR_QA`` <#var-ERROR_QA>`__ or
571 ```WARN_QA`` <#var-WARN_QA>`__ values in your configuration, check
572 that they contain all of the issues that you wish to be reported.
573 Previous Yocto Project versions contained a bug that meant that any
574 item not mentioned in ``ERROR_QA`` or ``WARN_QA`` would be treated as
575 a warning. Consequently, several important items were not already in
576 the default value of ``WARN_QA``. All of the possible QA checks are
577 now documented in the "```insane.bbclass`` <#ref-classes-insane>`__"
578 section.
579
580- An additional QA check has been added to check if
581 ``/usr/share/info/dir`` is being installed. Your recipe should delete
582 this file within ```do_install`` <#ref-tasks-install>`__ if "make
583 install" is installing it.
584
585- If you are using the buildhistory class, the check for the package
586 version going backwards is now controlled using a standard QA check.
587 Thus, if you have customized your ``ERROR_QA`` or ``WARN_QA`` values
588 and still wish to have this check performed, you should add
589 "version-going-backwards" to your value for one or the other
590 variables depending on how you wish it to be handled. See the
591 documented QA checks in the
592 "```insane.bbclass`` <#ref-classes-insane>`__" section.
593
594.. _migration-1.5-directory-layout-changes:
595
596Directory Layout Changes
597------------------------
598
599The following directory changes exist:
600
601- Output SDK installer files are now named to include the image name
602 and tuning architecture through the ```SDK_NAME`` <#var-SDK_NAME>`__
603 variable.
604
605- Images and related files are now installed into a directory that is
606 specific to the machine, instead of a parent directory containing
607 output files for multiple machines. The
608 ```DEPLOY_DIR_IMAGE`` <#var-DEPLOY_DIR_IMAGE>`__ variable continues
609 to point to the directory containing images for the current
610 ```MACHINE`` <#var-MACHINE>`__ and should be used anywhere there is a
611 need to refer to this directory. The ``runqemu`` script now uses this
612 variable to find images and kernel binaries and will use BitBake to
613 determine the directory. Alternatively, you can set the
614 ``DEPLOY_DIR_IMAGE`` variable in the external environment.
615
616- When buildhistory is enabled, its output is now written under the
617 `Build Directory <#build-directory>`__ rather than
618 ```TMPDIR`` <#var-TMPDIR>`__. Doing so makes it easier to delete
619 ``TMPDIR`` and preserve the build history. Additionally, data for
620 produced SDKs is now split by ```IMAGE_NAME`` <#var-IMAGE_NAME>`__.
621
622- The ``pkgdata`` directory produced as part of the packaging process
623 has been collapsed into a single machine-specific directory. This
624 directory is located under ``sysroots`` and uses a machine-specific
625 name (i.e. ``tmp/sysroots/machine/pkgdata``).
626
627.. _migration-1.5-shortened-git-srcrev-values:
628
629Shortened Git ``SRCREV`` Values
630-------------------------------
631
632BitBake will now shorten revisions from Git repositories from the normal
63340 characters down to 10 characters within ```SRCPV`` <#var-SRCPV>`__
634for improved usability in path and file names. This change should be
635safe within contexts where these revisions are used because the chances
636of spatially close collisions is very low. Distant collisions are not a
637major issue in the way the values are used.
638
639.. _migration-1.5-image-features:
640
641``IMAGE_FEATURES``
642------------------
643
644The following changes have been made that relate to
645```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__:
646
647- The value of ``IMAGE_FEATURES`` is now validated to ensure invalid
648 feature items are not added. Some users mistakenly add package names
649 to this variable instead of using
650 ```IMAGE_INSTALL`` <#var-IMAGE_INSTALL>`__ in order to have the
651 package added to the image, which does not work. This change is
652 intended to catch those kinds of situations. Valid ``IMAGE_FEATURES``
653 are drawn from ``PACKAGE_GROUP`` definitions,
654 ```COMPLEMENTARY_GLOB`` <#var-COMPLEMENTARY_GLOB>`__ and a new
655 "validitems" varflag on ``IMAGE_FEATURES``. The "validitems" varflag
656 change allows additional features to be added if they are not
657 provided using the previous two mechanisms.
658
659- The previously deprecated "apps-console-core" ``IMAGE_FEATURES`` item
660 is no longer supported. Add "splash" to ``IMAGE_FEATURES`` if you
661 wish to have the splash screen enabled, since this is all that
662 apps-console-core was doing.
663
664.. _migration-1.5-run:
665
666``/run``
667--------
668
669The ``/run`` directory from the Filesystem Hierarchy Standard 3.0 has
670been introduced. You can find some of the implications for this change
671`here <http://cgit.openembedded.org/openembedded-core/commit/?id=0e326280a15b0f2c4ef2ef4ec441f63f55b75873>`__.
672The change also means that recipes that install files to ``/var/run``
673must be changed. You can find a guide on how to make these changes
674`here <http://permalink.gmane.org/gmane.comp.handhelds.openembedded/58530>`__.
675
676.. _migration-1.5-removal-of-package-manager-database-within-image-recipes:
677
678Removal of Package Manager Database Within Image Recipes
679--------------------------------------------------------
680
681The image ``core-image-minimal`` no longer adds
682``remove_packaging_data_files`` to
683```ROOTFS_POSTPROCESS_COMMAND`` <#var-ROOTFS_POSTPROCESS_COMMAND>`__.
684This addition is now handled automatically when "package-management" is
685not in ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__. If you have custom
686image recipes that make this addition, you should remove the lines, as
687they are not needed and might interfere with correct operation of
688postinstall scripts.
689
690.. _migration-1.5-images-now-rebuild-only-on-changes-instead-of-every-time:
691
692Images Now Rebuild Only on Changes Instead of Every Time
693--------------------------------------------------------
694
695The ```do_rootfs`` <#ref-tasks-rootfs>`__ and other related image
696construction tasks are no longer marked as "nostamp". Consequently, they
697will only be re-executed when their inputs have changed. Previous
698versions of the OpenEmbedded build system always rebuilt the image when
699requested rather when necessary.
700
701.. _migration-1.5-task-recipes:
702
703Task Recipes
704------------
705
706The previously deprecated ``task.bbclass`` has now been dropped. For
707recipes that previously inherited from this class, you should rename
708them from ``task-*`` to ``packagegroup-*`` and inherit packagegroup
709instead.
710
711For more information, see the
712"```packagegroup.bbclass`` <#ref-classes-packagegroup>`__" section.
713
714.. _migration-1.5-busybox:
715
716BusyBox
717-------
718
719By default, we now split BusyBox into two binaries: one that is suid
720root for those components that need it, and another for the rest of the
721components. Splitting BusyBox allows for optimization that eliminates
722the ``tinylogin`` recipe as recommended by upstream. You can disable
723this split by setting
724```BUSYBOX_SPLIT_SUID`` <#var-BUSYBOX_SPLIT_SUID>`__ to "0".
725
726.. _migration-1.5-automated-image-testing:
727
728Automated Image Testing
729-----------------------
730
731A new automated image testing framework has been added through the
732```testimage.bbclass`` <#ref-classes-testimage*>`__ class. This
733framework replaces the older ``imagetest-qemu`` framework.
734
735You can learn more about performing automated image tests in the
736"`Performing Automated Runtime
737Testing <&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing>`__"
738section in the Yocto Project Development Tasks Manual.
739
740.. _migration-1.5-build-history:
741
742Build History
743-------------
744
745Following are changes to Build History:
746
747- Installed package sizes: ``installed-package-sizes.txt`` for an image
748 now records the size of the files installed by each package instead
749 of the size of each compressed package archive file.
750
751- The dependency graphs (``depends*.dot``) now use the actual package
752 names instead of replacing dashes, dots and plus signs with
753 underscores.
754
755- The ``buildhistory-diff`` and ``buildhistory-collect-srcrevs``
756 utilities have improved command-line handling. Use the ``--help``
757 option for each utility for more information on the new syntax.
758
759For more information on Build History, see the "`Maintaining Build
760Output
761Quality <&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality>`__"
762section in the Yocto Project Development Tasks Manual.
763
764.. _migration-1.5-udev:
765
766``udev``
767--------
768
769Following are changes to ``udev``:
770
771- ``udev`` no longer brings in ``udev-extraconf`` automatically through
772 ```RRECOMMENDS`` <#var-RRECOMMENDS>`__, since this was originally
773 intended to be optional. If you need the extra rules, then add
774 ``udev-extraconf`` to your image.
775
776- ``udev`` no longer brings in ``pciutils-ids`` or ``usbutils-ids``
777 through ``RRECOMMENDS``. These are not needed by ``udev`` itself and
778 removing them saves around 350KB.
779
780.. _migration-1.5-removed-renamed-recipes:
781
782Removed and Renamed Recipes
783---------------------------
784
785- The ``linux-yocto`` 3.2 kernel has been removed.
786
787- ``libtool-nativesdk`` has been renamed to ``nativesdk-libtool``.
788
789- ``tinylogin`` has been removed. It has been replaced by a suid
790 portion of Busybox. See the "`BusyBox <#migration-1.5-busybox>`__"
791 section for more information.
792
793- ``external-python-tarball`` has been renamed to
794 ``buildtools-tarball``.
795
796- ``web-webkit`` has been removed. It has been functionally replaced by
797 ``midori``.
798
799- ``imake`` has been removed. It is no longer needed by any other
800 recipe.
801
802- ``transfig-native`` has been removed. It is no longer needed by any
803 other recipe.
804
805- ``anjuta-remote-run`` has been removed. Anjuta IDE integration has
806 not been officially supported for several releases.
807
808.. _migration-1.5-other-changes:
809
810Other Changes
811-------------
812
813Following is a list of short entries describing other changes:
814
815- ``run-postinsts``: Make this generic.
816
817- ``base-files``: Remove the unnecessary ``media/``\ xxx directories.
818
819- ``alsa-state``: Provide an empty ``asound.conf`` by default.
820
821- ``classes/image``: Ensure
822 ```BAD_RECOMMENDATIONS`` <#var-BAD_RECOMMENDATIONS>`__ supports
823 pre-renamed package names.
824
825- ``classes/rootfs_rpm``: Implement ``BAD_RECOMMENDATIONS`` for RPM.
826
827- ``systemd``: Remove ``systemd_unitdir`` if ``systemd`` is not in
828 ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__.
829
830- ``systemd``: Remove ``init.d`` dir if ``systemd`` unit file is
831 present and ``sysvinit`` is not a distro feature.
832
833- ``libpam``: Deny all services for the ``OTHER`` entries.
834
835- ``image.bbclass``: Move ``runtime_mapping_rename`` to avoid conflict
836 with ``multilib``. See
837 ```YOCTO #4993`` <https://bugzilla.yoctoproject.org/show_bug.cgi?id=4993>`__
838 in Bugzilla for more information.
839
840- ``linux-dtb``: Use kernel build system to generate the ``dtb`` files.
841
842- ``kern-tools``: Switch from guilt to new ``kgit-s2q`` tool.
843
844Moving to the Yocto Project 1.6 Release
845=======================================
846
847This section provides migration information for moving to the Yocto
848Project 1.6 Release from the prior release.
849
850.. _migration-1.6-archiver-class:
851
852``archiver`` Class
853------------------
854
855The ```archiver`` <#ref-classes-archiver>`__ class has been rewritten
856and its configuration has been simplified. For more details on the
857source archiver, see the "`Maintaining Open Source License Compliance
858During Your Product's
859Lifecycle <&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle>`__"
860section in the Yocto Project Development Tasks Manual.
861
862.. _migration-1.6-packaging-changes:
863
864Packaging Changes
865-----------------
866
867The following packaging changes have been made:
868
869- The ``binutils`` recipe no longer produces a ``binutils-symlinks``
870 package. ``update-alternatives`` is now used to handle the preferred
871 ``binutils`` variant on the target instead.
872
873- The tc (traffic control) utilities have been split out of the main
874 ``iproute2`` package and put into the ``iproute2-tc`` package.
875
876- The ``gtk-engines`` schemas have been moved to a dedicated
877 ``gtk-engines-schemas`` package.
878
879- The ``armv7a`` with thumb package architecture suffix has changed.
880 The suffix for these packages with the thumb optimization enabled is
881 "t2" as it should be. Use of this suffix was not the case in the 1.5
882 release. Architecture names will change within package feeds as a
883 result.
884
885.. _migration-1.6-bitbake:
886
887BitBake
888-------
889
890The following changes have been made to `BitBake <#bitbake-term>`__.
891
892.. _migration-1.6-matching-branch-requirement-for-git-fetching:
893
894Matching Branch Requirement for Git Fetching
895~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
896
897When fetching source from a Git repository using
898```SRC_URI`` <#var-SRC_URI>`__, BitBake will now validate the
899```SRCREV`` <#var-SRCREV>`__ value against the branch. You can specify
900the branch using the following form: SRC_URI =
901"git://server.name/repository;branch=branchname" If you do not specify a
902branch, BitBake looks in the default "master" branch.
903
904Alternatively, if you need to bypass this check (e.g. if you are
905fetching a revision corresponding to a tag that is not on any branch),
906you can add ";nobranch=1" to the end of the URL within ``SRC_URI``.
907
908.. _migration-1.6-bitbake-deps:
909
910Python Definition substitutions
911~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
912
913BitBake had some previously deprecated Python definitions within its
914``bb`` module removed. You should use their sub-module counterparts
915instead:
916
917- ``bb.MalformedUrl``: Use ``bb.fetch.MalformedUrl``.
918
919- ``bb.encodeurl``: Use ``bb.fetch.encodeurl``.
920
921- ``bb.decodeurl``: Use ``bb.fetch.decodeurl``
922
923- ``bb.mkdirhier``: Use ``bb.utils.mkdirhier``.
924
925- ``bb.movefile``: Use ``bb.utils.movefile``.
926
927- ``bb.copyfile``: Use ``bb.utils.copyfile``.
928
929- ``bb.which``: Use ``bb.utils.which``.
930
931- ``bb.vercmp_string``: Use ``bb.utils.vercmp_string``.
932
933- ``bb.vercmp``: Use ``bb.utils.vercmp``.
934
935.. _migration-1.6-bitbake-fetcher:
936
937SVK Fetcher
938~~~~~~~~~~~
939
940The SVK fetcher has been removed from BitBake.
941
942.. _migration-1.6-bitbake-console-output:
943
944Console Output Error Redirection
945~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
946
947The BitBake console UI will now output errors to ``stderr`` instead of
948``stdout``. Consequently, if you are piping or redirecting the output of
949``bitbake`` to somewhere else, and you wish to retain the errors, you
950will need to add ``2>&1`` (or something similar) to the end of your
951``bitbake`` command line.
952
953.. _migration-1.6-task-taskname-overrides:
954
955``task-``\ taskname Overrides
956~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
957
958``task-``\ taskname overrides have been adjusted so that tasks whose
959names contain underscores have the underscores replaced by hyphens for
960the override so that they now function properly. For example, the task
961override for ```do_populate_sdk`` <#ref-tasks-populate_sdk>`__ is
962``task-populate-sdk``.
963
964.. _migration-1.6-variable-changes:
965
966Changes to Variables
967--------------------
968
969The following variables have changed. For information on the
970OpenEmbedded build system variables, see the "`Variables
971Glossary <#ref-variables-glos>`__" Chapter.
972
973.. _migration-1.6-variable-changes-TMPDIR:
974
975``TMPDIR``
976~~~~~~~~~~
977
978```TMPDIR`` <#var-TMPDIR>`__ can no longer be on an NFS mount. NFS does
979not offer full POSIX locking and inode consistency and can cause
980unexpected issues if used to store ``TMPDIR``.
981
982The check for this occurs on startup. If ``TMPDIR`` is detected on an
983NFS mount, an error occurs.
984
985.. _migration-1.6-variable-changes-PRINC:
986
987``PRINC``
988~~~~~~~~~
989
990The ``PRINC`` variable has been deprecated and triggers a warning if
991detected during a build. For ```PR`` <#var-PR>`__ increments on changes,
992use the PR service instead. You can find out more about this service in
993the "`Working With a PR
994Service <&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service>`__" section in
995the Yocto Project Development Tasks Manual.
996
997.. _migration-1.6-variable-changes-IMAGE_TYPES:
998
999``IMAGE_TYPES``
1000~~~~~~~~~~~~~~~
1001
1002The "sum.jffs2" option for ```IMAGE_TYPES`` <#var-IMAGE_TYPES>`__ has
1003been replaced by the "jffs2.sum" option, which fits the processing
1004order.
1005
1006.. _migration-1.6-variable-changes-COPY_LIC_MANIFEST:
1007
1008``COPY_LIC_MANIFEST``
1009~~~~~~~~~~~~~~~~~~~~~
1010
1011The ```COPY_LIC_MANIFEST`` <#var-COPY_LIC_MANIFEST>`__ variable must now
1012be set to "1" rather than any value in order to enable it.
1013
1014.. _migration-1.6-variable-changes-COPY_LIC_DIRS:
1015
1016``COPY_LIC_DIRS``
1017~~~~~~~~~~~~~~~~~
1018
1019The ```COPY_LIC_DIRS`` <#var-COPY_LIC_DIRS>`__ variable must now be set
1020to "1" rather than any value in order to enable it.
1021
1022.. _migration-1.6-variable-changes-PACKAGE_GROUP:
1023
1024``PACKAGE_GROUP``
1025~~~~~~~~~~~~~~~~~
1026
1027The ``PACKAGE_GROUP`` variable has been renamed to
1028```FEATURE_PACKAGES`` <#var-FEATURE_PACKAGES>`__ to more accurately
1029reflect its purpose. You can still use ``PACKAGE_GROUP`` but the
1030OpenEmbedded build system produces a warning message when it encounters
1031the variable.
1032
1033.. _migration-1.6-variable-changes-variable-entry-behavior:
1034
1035Preprocess and Post Process Command Variable Behavior
1036~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1037
1038The following variables now expect a semicolon separated list of
1039functions to call and not arbitrary shell commands:
1040`ROOTFS_PREPROCESS_COMMAND <#var-ROOTFS_PREPROCESS_COMMAND>`__
1041`ROOTFS_POSTPROCESS_COMMAND <#var-ROOTFS_POSTPROCESS_COMMAND>`__
1042`SDK_POSTPROCESS_COMMAND <#var-SDK_POSTPROCESS_COMMAND>`__
1043`POPULATE_SDK_POST_TARGET_COMMAND <#var-POPULATE_SDK_POST_TARGET_COMMAND>`__
1044`POPULATE_SDK_POST_HOST_COMMAND <#var-POPULATE_SDK_POST_HOST_COMMAND>`__
1045`IMAGE_POSTPROCESS_COMMAND <#var-IMAGE_POSTPROCESS_COMMAND>`__
1046`IMAGE_PREPROCESS_COMMAND <#var-IMAGE_PREPROCESS_COMMAND>`__
1047`ROOTFS_POSTUNINSTALL_COMMAND <#var-ROOTFS_POSTUNINSTALL_COMMAND>`__
1048`ROOTFS_POSTINSTALL_COMMAND <#var-ROOTFS_POSTINSTALL_COMMAND>`__ For
1049migration purposes, you can simply wrap shell commands in a shell
1050function and then call the function. Here is an example:
1051my_postprocess_function() { echo "hello" > ${IMAGE_ROOTFS}/hello.txt }
1052ROOTFS_POSTPROCESS_COMMAND += "my_postprocess_function; "
1053
1054.. _migration-1.6-package-test-ptest:
1055
1056Package Test (ptest)
1057--------------------
1058
1059Package Tests (ptest) are built but not installed by default. For
1060information on using Package Tests, see the "`Testing Packages with
1061ptest <&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest>`__" section in
1062the Yocto Project Development Tasks Manual. For information on the
1063``ptest`` class, see the "```ptest.bbclass`` <#ref-classes-ptest>`__"
1064section.
1065
1066.. _migration-1.6-build-changes:
1067
1068Build Changes
1069-------------
1070
1071Separate build and source directories have been enabled by default for
1072selected recipes where it is known to work (a whitelist) and for all
1073recipes that inherit the ```cmake`` <#ref-classes-cmake>`__ class. In
1074future releases the ```autotools`` <#ref-classes-autotools>`__ class
1075will enable a separate build directory by default as well. Recipes
1076building Autotools-based software that fails to build with a separate
1077build directory should be changed to inherit from the
1078```autotools-brokensep`` <#ref-classes-autotools>`__ class instead of
1079the ``autotools`` or ``autotools_stage``\ classes.
1080
1081.. _migration-1.6-building-qemu-native:
1082
1083``qemu-native``
1084---------------
1085
1086``qemu-native`` now builds without SDL-based graphical output support by
1087default. The following additional lines are needed in your
1088``local.conf`` to enable it: PACKAGECONFIG_pn-qemu-native = "sdl"
1089ASSUME_PROVIDED += "libsdl-native"
1090
1091.. note::
1092
1093 The default
1094 local.conf
1095 contains these statements. Consequently, if you are building a
1096 headless system and using a default
1097 local.conf
1098 file, you will need comment these two lines out.
1099
1100.. _migration-1.6-core-image-basic:
1101
1102``core-image-basic``
1103--------------------
1104
1105``core-image-basic`` has been renamed to ``core-image-full-cmdline``.
1106
1107In addition to ``core-image-basic`` being renamed,
1108``packagegroup-core-basic`` has been renamed to
1109``packagegroup-core-full-cmdline`` to match.
1110
1111.. _migration-1.6-licensing:
1112
1113Licensing
1114---------
1115
1116The top-level ``LICENSE`` file has been changed to better describe the
1117license of the various components of `OE-Core <#oe-core>`__. However,
1118the licensing itself remains unchanged.
1119
1120Normally, this change would not cause any side-effects. However, some
1121recipes point to this file within
1122```LIC_FILES_CHKSUM`` <#var-LIC_FILES_CHKSUM>`__ (as
1123``${COREBASE}/LICENSE``) and thus the accompanying checksum must be
1124changed from 3f40d7994397109285ec7b81fdeb3b58 to
11254d92cd373abda3937c2bc47fbc49d690. A better alternative is to have
1126``LIC_FILES_CHKSUM`` point to a file describing the license that is
1127distributed with the source that the recipe is building, if possible,
1128rather than pointing to ``${COREBASE}/LICENSE``.
1129
1130.. _migration-1.6-cflags-options:
1131
1132``CFLAGS`` Options
1133------------------
1134
1135The "-fpermissive" option has been removed from the default
1136```CFLAGS`` <#var-CFLAGS>`__ value. You need to take action on
1137individual recipes that fail when building with this option. You need to
1138either patch the recipes to fix the issues reported by the compiler, or
1139you need to add "-fpermissive" to ``CFLAGS`` in the recipes.
1140
1141.. _migration-1.6-custom-images:
1142
1143Custom Image Output Types
1144-------------------------
1145
1146Custom image output types, as selected using
1147```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__, must declare their
1148dependencies on other image types (if any) using a new
1149```IMAGE_TYPEDEP`` <#var-IMAGE_TYPEDEP>`__ variable.
1150
1151.. _migration-1.6-do-package-write-task:
1152
1153Tasks
1154-----
1155
1156The ``do_package_write`` task has been removed. The task is no longer
1157needed.
1158
1159.. _migration-1.6-update-alternatives-provider:
1160
1161``update-alternative`` Provider
1162-------------------------------
1163
1164The default ``update-alternatives`` provider has been changed from
1165``opkg`` to ``opkg-utils``. This change resolves some troublesome
1166circular dependencies. The runtime package has also been renamed from
1167``update-alternatives-cworth`` to ``update-alternatives-opkg``.
1168
1169.. _migration-1.6-virtclass-overrides:
1170
1171``virtclass`` Overrides
1172-----------------------
1173
1174The ``virtclass`` overrides are now deprecated. Use the equivalent class
1175overrides instead (e.g. ``virtclass-native`` becomes ``class-native``.)
1176
1177.. _migration-1.6-removed-renamed-recipes:
1178
1179Removed and Renamed Recipes
1180---------------------------
1181
1182The following recipes have been removed:
1183
1184- ``packagegroup-toolset-native`` - This recipe is largely unused.
1185
1186- ``linux-yocto-3.8`` - Support for the Linux yocto 3.8 kernel has been
1187 dropped. Support for the 3.10 and 3.14 kernels have been added with
1188 the ``linux-yocto-3.10`` and ``linux-yocto-3.14`` recipes.
1189
1190- ``ocf-linux`` - This recipe has been functionally replaced using
1191 ``cryptodev-linux``.
1192
1193- ``genext2fs`` - ``genext2fs`` is no longer used by the build system
1194 and is unmaintained upstream.
1195
1196- ``js`` - This provided an ancient version of Mozilla's javascript
1197 engine that is no longer needed.
1198
1199- ``zaurusd`` - The recipe has been moved to the ``meta-handheld``
1200 layer.
1201
1202- ``eglibc 2.17`` - Replaced by the ``eglibc 2.19`` recipe.
1203
1204- ``gcc 4.7.2`` - Replaced by the now stable ``gcc 4.8.2``.
1205
1206- ``external-sourcery-toolchain`` - this recipe is now maintained in
1207 the ``meta-sourcery`` layer.
1208
1209- ``linux-libc-headers-yocto 3.4+git`` - Now using version 3.10 of the
1210 ``linux-libc-headers`` by default.
1211
1212- ``meta-toolchain-gmae`` - This recipe is obsolete.
1213
1214- ``packagegroup-core-sdk-gmae`` - This recipe is obsolete.
1215
1216- ``packagegroup-core-standalone-gmae-sdk-target`` - This recipe is
1217 obsolete.
1218
1219.. _migration-1.6-removed-classes:
1220
1221Removed Classes
1222---------------
1223
1224The following classes have become obsolete and have been removed:
1225
1226- ``module_strip``
1227
1228- ``pkg_metainfo``
1229
1230- ``pkg_distribute``
1231
1232- ``image-empty``
1233
1234.. _migration-1.6-reference-bsps:
1235
1236Reference Board Support Packages (BSPs)
1237---------------------------------------
1238
1239The following reference BSPs changes occurred:
1240
1241- The BeagleBoard (``beagleboard``) ARM reference hardware has been
1242 replaced by the BeagleBone (``beaglebone``) hardware.
1243
1244- The RouterStation Pro (``routerstationpro``) MIPS reference hardware
1245 has been replaced by the EdgeRouter Lite (``edgerouter``) hardware.
1246
1247The previous reference BSPs for the ``beagleboard`` and
1248``routerstationpro`` machines are still available in a new
1249``meta-yocto-bsp-old`` layer in the `Source
1250Repositories <&YOCTO_GIT_URL;>`__ at
1251http://git.yoctoproject.org/cgit/cgit.cgi/meta-yocto-bsp-old/.
1252
1253Moving to the Yocto Project 1.7 Release
1254=======================================
1255
1256This section provides migration information for moving to the Yocto
1257Project 1.7 Release from the prior release.
1258
1259.. _migration-1.7-changes-to-setting-qemu-packageconfig-options:
1260
1261Changes to Setting QEMU ``PACKAGECONFIG`` Options in ``local.conf``
1262-------------------------------------------------------------------
1263
1264The QEMU recipe now uses a number of
1265```PACKAGECONFIG`` <#var-PACKAGECONFIG>`__ options to enable various
1266optional features. The method used to set defaults for these options
1267means that existing ``local.conf`` files will need to be be modified to
1268append to ``PACKAGECONFIG`` for ``qemu-native`` and ``nativesdk-qemu``
1269instead of setting it. In other words, to enable graphical output for
1270QEMU, you should now have these lines in ``local.conf``:
1271PACKAGECONFIG_append_pn-qemu-native = " sdl"
1272PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
1273
1274.. _migration-1.7-minimum-git-version:
1275
1276Minimum Git version
1277-------------------
1278
1279The minimum `Git <&YOCTO_DOCS_OM_URL;#git>`__ version required on the
1280build host is now 1.7.8 because the ``--list`` option is now required by
1281BitBake's Git fetcher. As always, if your host distribution does not
1282provide a version of Git that meets this requirement, you can use the
1283``buildtools-tarball`` that does. See the "`Required Git, tar, Python
1284and gcc Versions <#required-git-tar-python-and-gcc-versions>`__" section
1285for more information.
1286
1287.. _migration-1.7-autotools-class-changes:
1288
1289Autotools Class Changes
1290-----------------------
1291
1292The following ```autotools`` <#ref-classes-autotools>`__ class changes
1293occurred:
1294
1295- *A separate build directory is now used by default:* The
1296 ``autotools`` class has been changed to use a directory for building
1297 (```B`` <#var-B>`__), which is separate from the source directory
1298 (```S`` <#var-S>`__). This is commonly referred to as ``B != S``, or
1299 an out-of-tree build.
1300
1301 If the software being built is already capable of building in a
1302 directory separate from the source, you do not need to do anything.
1303 However, if the software is not capable of being built in this
1304 manner, you will need to either patch the software so that it can
1305 build separately, or you will need to change the recipe to inherit
1306 the ```autotools-brokensep`` <#ref-classes-autotools>`__ class
1307 instead of the ``autotools`` or ``autotools_stage`` classes.
1308
1309- *The ``--foreign`` option is no longer passed to ``automake`` when
1310 running ``autoconf``:* This option tells ``automake`` that a
1311 particular software package does not follow the GNU standards and
1312 therefore should not be expected to distribute certain files such as
1313 ``ChangeLog``, ``AUTHORS``, and so forth. Because the majority of
1314 upstream software packages already tell ``automake`` to enable
1315 foreign mode themselves, the option is mostly superfluous. However,
1316 some recipes will need patches for this change. You can easily make
1317 the change by patching ``configure.ac`` so that it passes "foreign"
1318 to ``AM_INIT_AUTOMAKE()``. See `this
1319 commit <http://cgit.openembedded.org/openembedded-core/commit/?id=01943188f85ce6411717fb5bf702d609f55813f2>`__
1320 for an example showing how to make the patch.
1321
1322.. _migration-1.7-binary-configuration-scripts-disabled:
1323
1324Binary Configuration Scripts Disabled
1325-------------------------------------
1326
1327Some of the core recipes that package binary configuration scripts now
1328disable the scripts due to the scripts previously requiring error-prone
1329path substitution. Software that links against these libraries using
1330these scripts should use the much more robust ``pkg-config`` instead.
1331The list of recipes changed in this version (and their configuration
1332scripts) is as follows: directfb (directfb-config) freetype
1333(freetype-config) gpgme (gpgme-config) libassuan (libassuan-config)
1334libcroco (croco-6.0-config) libgcrypt (libgcrypt-config) libgpg-error
1335(gpg-error-config) libksba (ksba-config) libpcap (pcap-config) libpcre
1336(pcre-config) libpng (libpng-config, libpng16-config) libsdl
1337(sdl-config) libusb-compat (libusb-config) libxml2 (xml2-config) libxslt
1338(xslt-config) ncurses (ncurses-config) neon (neon-config) npth
1339(npth-config) pth (pth-config) taglib (taglib-config) Additionally,
1340support for ``pkg-config`` has been added to some recipes in the
1341previous list in the rare cases where the upstream software package does
1342not already provide it.
1343
1344.. _migration-1.7-glibc-replaces-eglibc:
1345
1346``eglibc 2.19`` Replaced with ``glibc 2.20``
1347--------------------------------------------
1348
1349Because ``eglibc`` and ``glibc`` were already fairly close, this
1350replacement should not require any significant changes to other software
1351that links to ``eglibc``. However, there were a number of minor changes
1352in ``glibc 2.20`` upstream that could require patching some software
1353(e.g. the removal of the ``_BSD_SOURCE`` feature test macro).
1354
1355``glibc 2.20`` requires version 2.6.32 or greater of the Linux kernel.
1356Thus, older kernels will no longer be usable in conjunction with it.
1357
1358For full details on the changes in ``glibc 2.20``, see the upstream
1359release notes
1360`here <https://sourceware.org/ml/libc-alpha/2014-09/msg00088.html>`__.
1361
1362.. _migration-1.7-kernel-module-autoloading:
1363
1364Kernel Module Autoloading
1365-------------------------
1366
1367The ```module_autoload_*`` <#var-module_autoload>`__ variable is now
1368deprecated and a new
1369```KERNEL_MODULE_AUTOLOAD`` <#var-KERNEL_MODULE_AUTOLOAD>`__ variable
1370should be used instead. Also, ```module_conf_*`` <#var-module_conf>`__
1371must now be used in conjunction with a new
1372```KERNEL_MODULE_PROBECONF`` <#var-KERNEL_MODULE_PROBECONF>`__ variable.
1373The new variables no longer require you to specify the module name as
1374part of the variable name. This change not only simplifies usage but
1375also allows the values of these variables to be appropriately
1376incorporated into task signatures and thus trigger the appropriate tasks
1377to re-execute when changed. You should replace any references to
1378``module_autoload_*`` with ``KERNEL_MODULE_AUTOLOAD``, and add any
1379modules for which ``module_conf_*`` is specified to
1380``KERNEL_MODULE_PROBECONF``.
1381
1382.. _migration-1.7-qa-check-changes:
1383
1384QA Check Changes
1385----------------
1386
1387The following changes have occurred to the QA check process:
1388
1389- Additional QA checks ``file-rdeps`` and ``build-deps`` have been
1390 added in order to verify that file dependencies are satisfied (e.g.
1391 package contains a script requiring ``/bin/bash``) and build-time
1392 dependencies are declared, respectively. For more information, please
1393 see the "`QA Error and Warning Messages <#ref-qa-checks>`__" chapter.
1394
1395- Package QA checks are now performed during a new
1396 ```do_package_qa`` <#ref-tasks-package_qa>`__ task rather than being
1397 part of the ```do_package`` <#ref-tasks-package>`__ task. This allows
1398 more parallel execution. This change is unlikely to be an issue
1399 except for highly customized recipes that disable packaging tasks
1400 themselves by marking them as ``noexec``. For those packages, you
1401 will need to disable the ``do_package_qa`` task as well.
1402
1403- Files being overwritten during the
1404 ```do_populate_sysroot`` <#ref-tasks-populate_sysroot>`__ task now
1405 trigger an error instead of a warning. Recipes should not be
1406 overwriting files written to the sysroot by other recipes. If you
1407 have these types of recipes, you need to alter them so that they do
1408 not overwrite these files.
1409
1410 You might now receive this error after changes in configuration or
1411 metadata resulting in orphaned files being left in the sysroot. If
1412 you do receive this error, the way to resolve the issue is to delete
1413 your ```TMPDIR`` <#var-TMPDIR>`__ or to move it out of the way and
1414 then re-start the build. Anything that has been fully built up to
1415 that point and does not need rebuilding will be restored from the
1416 shared state cache and the rest of the build will be able to proceed
1417 as normal.
1418
1419.. _migration-1.7-removed-recipes:
1420
1421Removed Recipes
1422---------------
1423
1424The following recipes have been removed:
1425
1426- ``x-load``: This recipe has been superseded by U-boot SPL for all
1427 Cortex-based TI SoCs. For legacy boards, the ``meta-ti`` layer, which
1428 contains a maintained recipe, should be used instead.
1429
1430- ``ubootchart``: This recipe is obsolete. A ``bootchart2`` recipe has
1431 been added to functionally replace it.
1432
1433- ``linux-yocto 3.4``: Support for the linux-yocto 3.4 kernel has been
1434 dropped. Support for the 3.10 and 3.14 kernels remains, while support
1435 for version 3.17 has been added.
1436
1437- ``eglibc`` has been removed in favor of ``glibc``. See the
1438 "```eglibc 2.19`` Replaced with
1439 ``glibc 2.20`` <#migration-1.7-glibc-replaces-eglibc>`__" section for
1440 more information.
1441
1442.. _migration-1.7-miscellaneous-changes:
1443
1444Miscellaneous Changes
1445---------------------
1446
1447The following miscellaneous change occurred:
1448
1449- The build history feature now writes ``build-id.txt`` instead of
1450 ``build-id``. Additionally, ``build-id.txt`` now contains the full
1451 build header as printed by BitBake upon starting the build. You
1452 should manually remove old "build-id" files from your existing build
1453 history repositories to avoid confusion. For information on the build
1454 history feature, see the "`Maintaining Build Output
1455 Quality <&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality>`__"
1456 section in the Yocto Project Development Tasks Manual.
1457
1458Moving to the Yocto Project 1.8 Release
1459=======================================
1460
1461This section provides migration information for moving to the Yocto
1462Project 1.8 Release from the prior release.
1463
1464.. _migration-1.8-removed-recipes:
1465
1466Removed Recipes
1467---------------
1468
1469The following recipes have been removed:
1470
1471- ``owl-video``: Functionality replaced by ``gst-player``.
1472
1473- ``gaku``: Functionality replaced by ``gst-player``.
1474
1475- ``gnome-desktop``: This recipe is now available in ``meta-gnome`` and
1476 is no longer needed.
1477
1478- ``gsettings-desktop-schemas``: This recipe is now available in
1479 ``meta-gnome`` and is no longer needed.
1480
1481- ``python-argparse``: The ``argparse`` module is already provided in
1482 the default Python distribution in a package named
1483 ``python-argparse``. Consequently, the separate ``python-argparse``
1484 recipe is no longer needed.
1485
1486- ``telepathy-python, libtelepathy, telepathy-glib, telepathy-idle, telepathy-mission-control``:
1487 All these recipes have moved to ``meta-oe`` and are consequently no
1488 longer needed by any recipes in OpenEmbedded-Core.
1489
1490- ``linux-yocto_3.10`` and ``linux-yocto_3.17``: Support for the
1491 linux-yocto 3.10 and 3.17 kernels has been dropped. Support for the
1492 3.14 kernel remains, while support for 3.19 kernel has been added.
1493
1494- ``poky-feed-config-opkg``: This recipe has become obsolete and is no
1495 longer needed. Use ``distro-feed-config`` from ``meta-oe`` instead.
1496
1497- ``libav 0.8.x``: ``libav 9.x`` is now used.
1498
1499- ``sed-native``: No longer needed. A working version of ``sed`` is
1500 expected to be provided by the host distribution.
1501
1502.. _migration-1.8-bluez:
1503
1504BlueZ 4.x / 5.x Selection
1505-------------------------
1506
1507Proper built-in support for selecting BlueZ 5.x in preference to the
1508default of 4.x now exists. To use BlueZ 5.x, simply add "bluez5" to your
1509```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ value. If you had
1510previously added append files (``*.bbappend``) to make this selection,
1511you can now remove them.
1512
1513Additionally, a ``bluetooth`` class has been added to make selection of
1514the appropriate bluetooth support within a recipe a little easier. If
1515you wish to make use of this class in a recipe, add something such as
1516the following: inherit bluetooth PACKAGECONFIG ??=
1517"${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '',
1518d)}" PACKAGECONFIG[bluez4] =
1519"--enable-bluetooth,--disable-bluetooth,bluez4" PACKAGECONFIG[bluez5] =
1520"--enable-bluez5,--disable-bluez5,bluez5"
1521
1522.. _migration-1.8-kernel-build-changes:
1523
1524Kernel Build Changes
1525--------------------
1526
1527The kernel build process was changed to place the source in a common
1528shared work area and to place build artifacts separately in the source
1529code tree. In theory, migration paths have been provided for most common
1530usages in kernel recipes but this might not work in all cases. In
1531particular, users need to ensure that ``${S}`` (source files) and
1532``${B}`` (build artifacts) are used correctly in functions such as
1533```do_configure`` <#ref-tasks-configure>`__ and
1534```do_install`` <#ref-tasks-install>`__. For kernel recipes that do not
1535inherit from ``kernel-yocto`` or include ``linux-yocto.inc``, you might
1536wish to refer to the ``linux.inc`` file in the ``meta-oe`` layer for the
1537kinds of changes you need to make. For reference, here is the
1538`commit <http://cgit.openembedded.org/meta-openembedded/commit/meta-oe/recipes-kernel/linux/linux.inc?id=fc7132ede27ac67669448d3d2845ce7d46c6a1ee>`__
1539where the ``linux.inc`` file in ``meta-oe`` was updated.
1540
1541Recipes that rely on the kernel source code and do not inherit the
1542module classes might need to add explicit dependencies on the
1543``do_shared_workdir`` kernel task, for example: do_configure[depends] +=
1544"virtual/kernel:do_shared_workdir"
1545
1546.. _migration-1.8-ssl:
1547
1548SSL 3.0 is Now Disabled in OpenSSL
1549----------------------------------
1550
1551SSL 3.0 is now disabled when building OpenSSL. Disabling SSL 3.0 avoids
1552any lingering instances of the POODLE vulnerability. If you feel you
1553must re-enable SSL 3.0, then you can add an append file (``*.bbappend``)
1554for the ``openssl`` recipe to remove "-no-ssl3" from
1555```EXTRA_OECONF`` <#var-EXTRA_OECONF>`__.
1556
1557.. _migration-1.8-default-sysroot-poisoning:
1558
1559Default Sysroot Poisoning
1560-------------------------
1561
1562``gcc's`` default sysroot and include directories are now "poisoned". In
1563other words, the sysroot and include directories are being redirected to
1564a non-existent location in order to catch when host directories are
1565being used due to the correct options not being passed. This poisoning
1566applies both to the cross-compiler used within the build and to the
1567cross-compiler produced in the SDK.
1568
1569If this change causes something in the build to fail, it almost
1570certainly means the various compiler flags and commands are not being
1571passed correctly to the underlying piece of software. In such cases, you
1572need to take corrective steps.
1573
1574.. _migration-1.8-rebuild-improvements:
1575
1576Rebuild Improvements
1577--------------------
1578
1579Changes have been made to the ```base`` <#ref-classes-base>`__,
1580```autotools`` <#ref-classes-autotools>`__, and
1581```cmake`` <#ref-classes-cmake>`__ classes to clean out generated files
1582when the ```do_configure`` <#ref-tasks-configure>`__ task needs to be
1583re-executed.
1584
1585One of the improvements is to attempt to run "make clean" during the
1586``do_configure`` task if a ``Makefile`` exists. Some software packages
1587do not provide a working clean target within their make files. If you
1588have such recipes, you need to set
1589```CLEANBROKEN`` <#var-CLEANBROKEN>`__ to "1" within the recipe, for
1590example: CLEANBROKEN = "1"
1591
1592.. _migration-1.8-qa-check-and-validation-changes:
1593
1594QA Check and Validation Changes
1595-------------------------------
1596
1597The following QA Check and Validation Changes have occurred:
1598
1599- Usage of ``PRINC`` previously triggered a warning. It now triggers an
1600 error. You should remove any remaining usage of ``PRINC`` in any
1601 recipe or append file.
1602
1603- An additional QA check has been added to detect usage of ``${D}`` in
1604 ```FILES`` <#var-FILES>`__ values where ```D`` <#var-D>`__ values
1605 should not be used at all. The same check ensures that ``$D`` is used
1606 in ``pkg_preinst/pkg_postinst/pkg_prerm/pkg_postrm`` functions
1607 instead of ``${D}``.
1608
1609- ```S`` <#var-S>`__ now needs to be set to a valid value within a
1610 recipe. If ``S`` is not set in the recipe, the directory is not
1611 automatically created. If ``S`` does not point to a directory that
1612 exists at the time the ```do_unpack`` <#ref-tasks-unpack>`__ task
1613 finishes, a warning will be shown.
1614
1615- ```LICENSE`` <#var-LICENSE>`__ is now validated for correct
1616 formatting of multiple licenses. If the format is invalid (e.g.
1617 multiple licenses are specified with no operators to specify how the
1618 multiple licenses interact), then a warning will be shown.
1619
1620.. _migration-1.8-miscellaneous-changes:
1621
1622Miscellaneous Changes
1623---------------------
1624
1625The following miscellaneous changes have occurred:
1626
1627- The ``send-error-report`` script now expects a "-s" option to be
1628 specified before the server address. This assumes a server address is
1629 being specified.
1630
1631- The ``oe-pkgdata-util`` script now expects a "-p" option to be
1632 specified before the ``pkgdata`` directory, which is now optional. If
1633 the ``pkgdata`` directory is not specified, the script will run
1634 BitBake to query ```PKGDATA_DIR`` <#var-PKGDATA_DIR>`__ from the
1635 build environment.
1636
1637Moving to the Yocto Project 2.0 Release
1638=======================================
1639
1640This section provides migration information for moving to the Yocto
1641Project 2.0 Release from the prior release.
1642
1643.. _migration-2.0-gcc-5:
1644
1645GCC 5
1646-----
1647
1648The default compiler is now GCC 5.2. This change has required fixes for
1649compilation errors in a number of other recipes.
1650
1651One important example is a fix for when the Linux kernel freezes at boot
1652time on ARM when built with GCC 5. If you are using your own kernel
1653recipe or source tree and building for ARM, you will likely need to
1654apply this
1655`patch <https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=a077224fd35b2f7fbc93f14cf67074fc792fbac2>`__.
1656The standard ``linux-yocto`` kernel source tree already has a workaround
1657for the same issue.
1658
1659For further details, see ` <https://gcc.gnu.org/gcc-5/changes.html>`__
1660and the porting guide at
1661` <https://gcc.gnu.org/gcc-5/porting_to.html>`__.
1662
1663Alternatively, you can switch back to GCC 4.9 or 4.8 by setting
1664``GCCVERSION`` in your configuration, as follows: GCCVERSION = "4.9%"
1665
1666.. _migration-2.0-Gstreamer-0.10-removed:
1667
1668Gstreamer 0.10 Removed
1669----------------------
1670
1671Gstreamer 0.10 has been removed in favor of Gstreamer 1.x. As part of
1672the change, recipes for Gstreamer 0.10 and related software are now
1673located in ``meta-multimedia``. This change results in Qt4 having Phonon
1674and Gstreamer support in QtWebkit disabled by default.
1675
1676.. _migration-2.0-removed-recipes:
1677
1678Removed Recipes
1679---------------
1680
1681The following recipes have been moved or removed:
1682
1683- ``bluez4``: The recipe is obsolete and has been moved due to
1684 ``bluez5`` becoming fully integrated. The ``bluez4`` recipe now
1685 resides in ``meta-oe``.
1686
1687- ``gamin``: The recipe is obsolete and has been removed.
1688
1689- ``gnome-icon-theme``: The recipe's functionally has been replaced by
1690 ``adwaita-icon-theme``.
1691
1692- Gstreamer 0.10 Recipes: Recipes for Gstreamer 0.10 have been removed
1693 in favor of the recipes for Gstreamer 1.x.
1694
1695- ``insserv``: The recipe is obsolete and has been removed.
1696
1697- ``libunique``: The recipe is no longer used and has been moved to
1698 ``meta-oe``.
1699
1700- ``midori``: The recipe's functionally has been replaced by
1701 ``epiphany``.
1702
1703- ``python-gst``: The recipe is obsolete and has been removed since it
1704 only contains bindings for Gstreamer 0.10.
1705
1706- ``qt-mobility``: The recipe is obsolete and has been removed since it
1707 requires ``Gstreamer 0.10``, which has been replaced.
1708
1709- ``subversion``: All 1.6.x versions of this recipe have been removed.
1710
1711- ``webkit-gtk``: The older 1.8.3 version of this recipe has been
1712 removed in favor of ``webkitgtk``.
1713
1714.. _migration-2.0-bitbake-datastore-improvements:
1715
1716BitBake datastore improvements
1717------------------------------
1718
1719The method by which BitBake's datastore handles overrides has changed.
1720Overrides are now applied dynamically and ``bb.data.update_data()`` is
1721now a no-op. Thus, ``bb.data.update_data()`` is no longer required in
1722order to apply the correct overrides. In practice, this change is
1723unlikely to require any changes to Metadata. However, these minor
1724changes in behavior exist:
1725
1726- All potential overrides are now visible in the variable history as
1727 seen when you run the following: $ bitbake -e
1728
1729- ``d.delVar('``\ VARNAME\ ``')`` and
1730 ``d.setVar('``\ VARNAME\ ``', None)`` result in the variable and all
1731 of its overrides being cleared out. Before the change, only the
1732 non-overridden values were cleared.
1733
1734.. _migration-2.0-shell-message-function-changes:
1735
1736Shell Message Function Changes
1737------------------------------
1738
1739The shell versions of the BitBake message functions (i.e. ``bbdebug``,
1740``bbnote``, ``bbwarn``, ``bbplain``, ``bberror``, and ``bbfatal``) are
1741now connected through to their BitBake equivalents ``bb.debug()``,
1742``bb.note()``, ``bb.warn()``, ``bb.plain()``, ``bb.error()``, and
1743``bb.fatal()``, respectively. Thus, those message functions that you
1744would expect to be printed by the BitBake UI are now actually printed.
1745In practice, this change means two things:
1746
1747- If you now see messages on the console that you did not previously
1748 see as a result of this change, you might need to clean up the calls
1749 to ``bbwarn``, ``bberror``, and so forth. Or, you might want to
1750 simply remove the calls.
1751
1752- The ``bbfatal`` message function now suppresses the full error log in
1753 the UI, which means any calls to ``bbfatal`` where you still wish to
1754 see the full error log should be replaced by ``die`` or
1755 ``bbfatal_log``.
1756
1757.. _migration-2.0-extra-development-debug-package-cleanup:
1758
1759Extra Development/Debug Package Cleanup
1760---------------------------------------
1761
1762The following recipes have had extra ``dev/dbg`` packages removed:
1763
1764- ``acl``
1765
1766- ``apmd``
1767
1768- ``aspell``
1769
1770- ``attr``
1771
1772- ``augeas``
1773
1774- ``bzip2``
1775
1776- ``cogl``
1777
1778- ``curl``
1779
1780- ``elfutils``
1781
1782- ``gcc-target``
1783
1784- ``libgcc``
1785
1786- ``libtool``
1787
1788- ``libxmu``
1789
1790- ``opkg``
1791
1792- ``pciutils``
1793
1794- ``rpm``
1795
1796- ``sysfsutils``
1797
1798- ``tiff``
1799
1800- ``xz``
1801
1802All of the above recipes now conform to the standard packaging scheme
1803where a single ``-dev``, ``-dbg``, and ``-staticdev`` package exists per
1804recipe.
1805
1806.. _migration-2.0-recipe-maintenance-tracking-data-moved-to-oe-core:
1807
1808Recipe Maintenance Tracking Data Moved to OE-Core
1809-------------------------------------------------
1810
1811Maintenance tracking data for recipes that was previously part of
1812``meta-yocto`` has been moved to `OE-Core <#oe-core>`__. The change
1813includes ``package_regex.inc`` and ``distro_alias.inc``, which are
1814typically enabled when using the ``distrodata`` class. Additionally, the
1815contents of ``upstream_tracking.inc`` has now been split out to the
1816relevant recipes.
1817
1818.. _migration-2.0-automatic-stale-sysroot-file-cleanup:
1819
1820Automatic Stale Sysroot File Cleanup
1821------------------------------------
1822
1823Stale files from recipes that no longer exist in the current
1824configuration are now automatically removed from sysroot as well as
1825removed from any other place managed by shared state. This automatic
1826cleanup means that the build system now properly handles situations such
1827as renaming the build system side of recipes, removal of layers from
1828``bblayers.conf``, and ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__
1829changes.
1830
1831Additionally, work directories for old versions of recipes are now
1832pruned. If you wish to disable pruning old work directories, you can set
1833the following variable in your configuration:
1834SSTATE_PRUNE_OBSOLETEWORKDIR = "0"
1835
1836.. _migration-2.0-linux-yocto-kernel-metadata-repository-now-split-from-source:
1837
1838``linux-yocto`` Kernel Metadata Repository Now Split from Source
1839----------------------------------------------------------------
1840
1841The ``linux-yocto`` tree has up to now been a combined set of kernel
1842changes and configuration (meta) data carried in a single tree. While
1843this format is effective at keeping kernel configuration and source
1844modifications synchronized, it is not always obvious to developers how
1845to manipulate the Metadata as compared to the source.
1846
1847Metadata processing has now been removed from the
1848```kernel-yocto`` <#ref-classes-kernel-yocto>`__ class and the external
1849Metadata repository ``yocto-kernel-cache``, which has always been used
1850to seed the ``linux-yocto`` "meta" branch. This separate ``linux-yocto``
1851cache repository is now the primary location for this data. Due to this
1852change, ``linux-yocto`` is no longer able to process combined trees.
1853Thus, if you need to have your own combined kernel repository, you must
1854do the split there as well and update your recipes accordingly. See the
1855``meta/recipes-kernel/linux/linux-yocto_4.1.bb`` recipe for an example.
1856
1857.. _migration-2.0-additional-qa-checks:
1858
1859Additional QA checks
1860--------------------
1861
1862The following QA checks have been added:
1863
1864- Added a "host-user-contaminated" check for ownership issues for
1865 packaged files outside of ``/home``. The check looks for files that
1866 are incorrectly owned by the user that ran BitBake instead of owned
1867 by a valid user in the target system.
1868
1869- Added an "invalid-chars" check for invalid (non-UTF8) characters in
1870 recipe metadata variable values (i.e.
1871 ```DESCRIPTION`` <#var-DESCRIPTION>`__,
1872 ```SUMMARY`` <#var-SUMMARY>`__, ```LICENSE`` <#var-LICENSE>`__, and
1873 ```SECTION`` <#var-SECTION>`__). Some package managers do not support
1874 these characters.
1875
1876- Added an "invalid-packageconfig" check for any options specified in
1877 ```PACKAGECONFIG`` <#var-PACKAGECONFIG>`__ that do not match any
1878 ``PACKAGECONFIG`` option defined for the recipe.
1879
1880.. _migration-2.0-miscellaneous:
1881
1882Miscellaneous Changes
1883---------------------
1884
1885These additional changes exist:
1886
1887- ``gtk-update-icon-cache`` has been renamed to ``gtk-icon-utils``.
1888
1889- The ``tools-profile`` ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__
1890 item as well as its corresponding packagegroup and
1891 ``packagegroup-core-tools-profile`` no longer bring in ``oprofile``.
1892 Bringing in ``oprofile`` was originally added to aid compilation on
1893 resource-constrained targets. However, this aid has not been widely
1894 used and is not likely to be used going forward due to the more
1895 powerful target platforms and the existence of better
1896 cross-compilation tools.
1897
1898- The ```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__ variable's default
1899 value now specifies ``ext4`` instead of ``ext3``.
1900
1901- All support for the ``PRINC`` variable has been removed.
1902
1903- The ``packagegroup-core-full-cmdline`` packagegroup no longer brings
1904 in ``lighttpd`` due to the fact that bringing in ``lighttpd`` is not
1905 really in line with the packagegroup's purpose, which is to add full
1906 versions of command-line tools that by default are provided by
1907 ``busybox``.
1908
1909Moving to the Yocto Project 2.1 Release
1910=======================================
1911
1912This section provides migration information for moving to the Yocto
1913Project 2.1 Release from the prior release.
1914
1915.. _migration-2.1-variable-expansion-in-python-functions:
1916
1917Variable Expansion in Python Functions
1918--------------------------------------
1919
1920Variable expressions, such as ``${``\ VARNAME\ ``}`` no longer expand
1921automatically within Python functions. Suppressing expansion was done to
1922allow Python functions to construct shell scripts or other code for
1923situations in which you do not want such expressions expanded. For any
1924existing code that relies on these expansions, you need to change the
1925expansions to expand the value of individual variables through
1926``d.getVar()``. To alternatively expand more complex expressions, use
1927``d.expand()``.
1928
1929.. _migration-2.1-overrides-must-now-be-lower-case:
1930
1931Overrides Must Now be Lower-Case
1932--------------------------------
1933
1934The convention for overrides has always been for them to be lower-case
1935characters. This practice is now a requirement as BitBake's datastore
1936now assumes lower-case characters in order to give a slight performance
1937boost during parsing. In practical terms, this requirement means that
1938anything that ends up in ```OVERRIDES`` <#var-OVERRIDES>`__ must now
1939appear in lower-case characters (e.g. values for ``MACHINE``,
1940``TARGET_ARCH``, ``DISTRO``, and also recipe names if
1941``_pn-``\ recipename overrides are to be effective).
1942
1943.. _migration-2.1-expand-parameter-to-getvar-and-getvarflag-now-mandatory:
1944
1945Expand Parameter to ``getVar()`` and ``getVarFlag()`` is Now Mandatory
1946----------------------------------------------------------------------
1947
1948The expand parameter to ``getVar()`` and ``getVarFlag()`` previously
1949defaulted to False if not specified. Now, however, no default exists so
1950one must be specified. You must change any ``getVar()`` calls that do
1951not specify the final expand parameter to calls that do specify the
1952parameter. You can run the following ``sed`` command at the base of a
1953layer to make this change: sed -e 's:\(\.getVar([^,()]*\)):\1, False):g'
1954-i \`grep -ril getVar \*\` sed -e 's:\(\.getVarFlag([^,()]*,
1955[^,()]*\)):\1, False):g' -i \`grep -ril getVarFlag \*\`
1956
1957.. note::
1958
1959 The reason for this change is that it prepares the way for changing
1960 the default to True in a future Yocto Project release. This future
1961 change is a much more sensible default than False. However, the
1962 change needs to be made gradually as a sudden change of the default
1963 would potentially cause side-effects that would be difficult to
1964 detect.
1965
1966.. _migration-2.1-makefile-environment-changes:
1967
1968Makefile Environment Changes
1969----------------------------
1970
1971```EXTRA_OEMAKE`` <#var-EXTRA_OEMAKE>`__ now defaults to "" instead of
1972"-e MAKEFLAGS=". Setting ``EXTRA_OEMAKE`` to "-e MAKEFLAGS=" by default
1973was a historical accident that has required many classes (e.g.
1974``autotools``, ``module``) and recipes to override this default in order
1975to work with sensible build systems. When upgrading to the release, you
1976must edit any recipe that relies upon this old default by either setting
1977``EXTRA_OEMAKE`` back to "-e MAKEFLAGS=" or by explicitly setting any
1978required variable value overrides using ``EXTRA_OEMAKE``, which is
1979typically only needed when a Makefile sets a default value for a
1980variable that is inappropriate for cross-compilation using the "="
1981operator rather than the "?=" operator.
1982
1983.. _migration-2.1-libexecdir-reverted-to-prefix-libexec:
1984
1985``libexecdir`` Reverted to ``${prefix}/libexec``
1986------------------------------------------------
1987
1988The use of ``${libdir}/${BPN}`` as ``libexecdir`` is different as
1989compared to all other mainstream distributions, which either uses
1990``${prefix}/libexec`` or ``${libdir}``. The use is also contrary to the
1991GNU Coding Standards (i.e.
1992` <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>`__)
1993that suggest ``${prefix}/libexec`` and also notes that any
1994package-specific nesting should be done by the package itself. Finally,
1995having ``libexecdir`` change between recipes makes it very difficult for
1996different recipes to invoke binaries that have been installed into
1997``libexecdir``. The Filesystem Hierarchy Standard (i.e.
1998` <http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s07.html>`__) now
1999recognizes the use of ``${prefix}/libexec/``, giving distributions the
2000choice between ``${prefix}/lib`` or ``${prefix}/libexec`` without
2001breaking FHS.
2002
2003.. _migration-2.1-ac-cv-sizeof-off-t-no-longer-cached-in-site-files:
2004
2005``ac_cv_sizeof_off_t`` is No Longer Cached in Site Files
2006--------------------------------------------------------
2007
2008For recipes inheriting the ```autotools`` <#ref-classes-autotools>`__
2009class, ``ac_cv_sizeof_off_t`` is no longer cached in the site files for
2010``autoconf``. The reason for this change is because the
2011``ac_cv_sizeof_off_t`` value is not necessarily static per architecture
2012as was previously assumed. Rather, the value changes based on whether
2013large file support is enabled. For most software that uses ``autoconf``,
2014this change should not be a problem. However, if you have a recipe that
2015bypasses the standard ```do_configure`` <#ref-tasks-configure>`__ task
2016from the ``autotools`` class and the software the recipe is building
2017uses a very old version of ``autoconf``, the recipe might be incapable
2018of determining the correct size of ``off_t`` during ``do_configure``.
2019
2020The best course of action is to patch the software as necessary to allow
2021the default implementation from the ``autotools`` class to work such
2022that ``autoreconf`` succeeds and produces a working configure script,
2023and to remove the overridden ``do_configure`` task such that the default
2024implementation does get used.
2025
2026.. _migration-2.1-image-generation-split-out-from-filesystem-generation:
2027
2028Image Generation is Now Split Out from Filesystem Generation
2029------------------------------------------------------------
2030
2031Previously, for image recipes the ```do_rootfs`` <#ref-tasks-rootfs>`__
2032task assembled the filesystem and then from that filesystem generated
2033images. With this Yocto Project release, image generation is split into
2034separate ```do_image_*`` <#ref-tasks-image>`__ tasks for clarity both in
2035operation and in the code.
2036
2037For most cases, this change does not present any problems. However, if
2038you have made customizations that directly modify the ``do_rootfs`` task
2039or that mention ``do_rootfs``, you might need to update those changes.
2040In particular, if you had added any tasks after ``do_rootfs``, you
2041should make edits so that those tasks are after the
2042```do_image_complete`` <#ref-tasks-image-complete>`__ task rather than
2043after ``do_rootfs`` so that the your added tasks run at the correct
2044time.
2045
2046A minor part of this restructuring is that the post-processing
2047definitions and functions have been moved from the
2048```image`` <#ref-classes-image>`__ class to the
2049```rootfs-postcommands`` <#ref-classes-rootfs*>`__ class. Functionally,
2050however, they remain unchanged.
2051
2052.. _migration-2.1-removed-recipes:
2053
2054Removed Recipes
2055---------------
2056
2057The following recipes have been removed in the 2.1 release:
2058
2059- ``gcc`` version 4.8: Versions 4.9 and 5.3 remain.
2060
2061- ``qt4``: All support for Qt 4.x has been moved out to a separate
2062 ``meta-qt4`` layer because Qt 4 is no longer supported upstream.
2063
2064- ``x11vnc``: Moved to the ``meta-oe`` layer.
2065
2066- ``linux-yocto-3.14``: No longer supported.
2067
2068- ``linux-yocto-3.19``: No longer supported.
2069
2070- ``libjpeg``: Replaced by the ``libjpeg-turbo`` recipe.
2071
2072- ``pth``: Became obsolete.
2073
2074- ``liboil``: Recipe is no longer needed and has been moved to the
2075 ``meta-multimedia`` layer.
2076
2077- ``gtk-theme-torturer``: Recipe is no longer needed and has been moved
2078 to the ``meta-gnome`` layer.
2079
2080- ``gnome-mime-data``: Recipe is no longer needed and has been moved to
2081 the ``meta-gnome`` layer.
2082
2083- ``udev``: Replaced by the ``eudev`` recipe for compatibility when
2084 using ``sysvinit`` with newer kernels.
2085
2086- ``python-pygtk``: Recipe became obsolete.
2087
2088- ``adt-installer``: Recipe became obsolete. See the "`ADT
2089 Removed <#migration-2.1-adt-removed>`__" section for more
2090 information.
2091
2092.. _migration-2.1-class-changes:
2093
2094Class Changes
2095-------------
2096
2097The following classes have changed:
2098
2099- ``autotools_stage``: Removed because the
2100 ```autotools`` <#ref-classes-autotools>`__ class now provides its
2101 functionality. Recipes that inherited from ``autotools_stage`` should
2102 now inherit from ``autotools`` instead.
2103
2104- ``boot-directdisk``: Merged into the ``image-vm`` class. The
2105 ``boot-directdisk`` class was rarely directly used. Consequently,
2106 this change should not cause any issues.
2107
2108- ``bootimg``: Merged into the
2109 ```image-live`` <#ref-classes-image-live>`__ class. The ``bootimg``
2110 class was rarely directly used. Consequently, this change should not
2111 cause any issues.
2112
2113- ``packageinfo``: Removed due to its limited use by the Hob UI, which
2114 has itself been removed.
2115
2116.. _migration-2.1-build-system-ui-changes:
2117
2118Build System User Interface Changes
2119-----------------------------------
2120
2121The following changes have been made to the build system user interface:
2122
2123- *Hob GTK+-based UI*: Removed because it is unmaintained and based on
2124 the outdated GTK+ 2 library. The Toaster web-based UI is much more
2125 capable and is actively maintained. See the "`Using the Toaster Web
2126 Interface <&YOCTO_DOCS_TOAST_URL;#using-the-toaster-web-interface>`__"
2127 section in the Toaster User Manual for more information on this
2128 interface.
2129
2130- *"puccho" BitBake UI*: Removed because is unmaintained and no longer
2131 useful.
2132
2133.. _migration-2.1-adt-removed:
2134
2135ADT Removed
2136-----------
2137
2138The Application Development Toolkit (ADT) has been removed because its
2139functionality almost completely overlapped with the `standard
2140SDK <&YOCTO_DOCS_SDK_URL;#sdk-using-the-standard-sdk>`__ and the
2141`extensible SDK <&YOCTO_DOCS_SDK_URL;#sdk-extensible>`__. For
2142information on these SDKs and how to build and use them, see the `Yocto
2143Project Application Development and the Extensible Software Development
2144Kit (eSDK) <&YOCTO_DOCS_SDK_URL;>`__ manual.
2145
2146.. note::
2147
2148 The Yocto Project Eclipse IDE Plug-in is still supported and is not
2149 affected by this change.
2150
2151.. _migration-2.1-poky-reference-distribution-changes:
2152
2153Poky Reference Distribution Changes
2154-----------------------------------
2155
2156The following changes have been made for the Poky distribution:
2157
2158- The ``meta-yocto`` layer has been renamed to ``meta-poky`` to better
2159 match its purpose, which is to provide the Poky reference
2160 distribution. The ``meta-yocto-bsp`` layer retains its original name
2161 since it provides reference machines for the Yocto Project and it is
2162 otherwise unrelated to Poky. References to ``meta-yocto`` in your
2163 ``conf/bblayers.conf`` should automatically be updated, so you should
2164 not need to change anything unless you are relying on this naming
2165 elsewhere.
2166
2167- The ```uninative`` <#ref-classes-uninative>`__ class is now enabled
2168 by default in Poky. This class attempts to isolate the build system
2169 from the host distribution's C library and makes re-use of native
2170 shared state artifacts across different host distributions practical.
2171 With this class enabled, a tarball containing a pre-built C library
2172 is downloaded at the start of the build.
2173
2174 The ``uninative`` class is enabled through the
2175 ``meta/conf/distro/include/yocto-uninative.inc`` file, which for
2176 those not using the Poky distribution, can include to easily enable
2177 the same functionality.
2178
2179 Alternatively, if you wish to build your own ``uninative`` tarball,
2180 you can do so by building the ``uninative-tarball`` recipe, making it
2181 available to your build machines (e.g. over HTTP/HTTPS) and setting a
2182 similar configuration as the one set by ``yocto-uninative.inc``.
2183
2184- Static library generation, for most cases, is now disabled by default
2185 in the Poky distribution. Disabling this generation saves some build
2186 time as well as the size used for build output artifacts.
2187
2188 Disabling this library generation is accomplished through a
2189 ``meta/conf/distro/include/no-static-libs.inc``, which for those not
2190 using the Poky distribution can easily include to enable the same
2191 functionality.
2192
2193 Any recipe that needs to opt-out of having the "--disable-static"
2194 option specified on the configure command line either because it is
2195 not a supported option for the configure script or because static
2196 libraries are needed should set the following variable:
2197 DISABLE_STATIC = ""
2198
2199- The separate ``poky-tiny`` distribution now uses the musl C library
2200 instead of a heavily pared down ``glibc``. Using musl results in a
2201 smaller distribution and facilitates much greater maintainability
2202 because musl is designed to have a small footprint.
2203
2204 If you have used ``poky-tiny`` and have customized the ``glibc``
2205 configuration you will need to redo those customizations with musl
2206 when upgrading to the new release.
2207
2208.. _migration-2.1-packaging-changes:
2209
2210Packaging Changes
2211-----------------
2212
2213The following changes have been made to packaging:
2214
2215- The ``runuser`` and ``mountpoint`` binaries, which were previously in
2216 the main ``util-linux`` package, have been split out into the
2217 ``util-linux-runuser`` and ``util-linux-mountpoint`` packages,
2218 respectively.
2219
2220- The ``python-elementtree`` package has been merged into the
2221 ``python-xml`` package.
2222
2223.. _migration-2.1-tuning-file-changes:
2224
2225Tuning File Changes
2226-------------------
2227
2228The following changes have been made to the tuning files:
2229
2230- The "no-thumb-interwork" tuning feature has been dropped from the ARM
2231 tune include files. Because interworking is required for ARM EABI,
2232 attempting to disable it through a tuning feature no longer makes
2233 sense.
2234
2235 .. note::
2236
2237 Support for ARM OABI was deprecated in gcc 4.7.
2238
2239- The ``tune-cortexm*.inc`` and ``tune-cortexr4.inc`` files have been
2240 removed because they are poorly tested. Until the OpenEmbedded build
2241 system officially gains support for CPUs without an MMU, these tuning
2242 files would probably be better maintained in a separate layer if
2243 needed.
2244
2245.. _migration-2.1-supporting-gobject-introspection:
2246
2247Supporting GObject Introspection
2248--------------------------------
2249
2250This release supports generation of GLib Introspective Repository (GIR)
2251files through GObject introspection, which is the standard mechanism for
2252accessing GObject-based software from runtime environments. You can
2253enable, disable, and test the generation of this data. See the
2254"`Enabling GObject Introspection
2255Support <&YOCTO_DOCS_DEV_URL;#enabling-gobject-introspection-support>`__"
2256section in the Yocto Project Development Tasks Manual for more
2257information.
2258
2259.. _migration-2.1-miscellaneous-changes:
2260
2261Miscellaneous Changes
2262---------------------
2263
2264These additional changes exist:
2265
2266- The minimum Git version has been increased to 1.8.3.1. If your host
2267 distribution does not provide a sufficiently recent version, you can
2268 install the buildtools, which will provide it. See the "`Required
2269 Git, tar, Python and gcc
2270 Versions <#required-git-tar-python-and-gcc-versions>`__" section for
2271 more information on the buildtools tarball.
2272
2273- The buggy and incomplete support for the RPM version 4 package
2274 manager has been removed. The well-tested and maintained support for
2275 RPM version 5 remains.
2276
2277- Previously, the following list of packages were removed if
2278 package-management was not in
2279 ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__, regardless of any
2280 dependencies: update-rc.d base-passwd shadow update-alternatives
2281 run-postinsts With the Yocto Project 2.1 release, these packages are
2282 only removed if "read-only-rootfs" is in ``IMAGE_FEATURES``, since
2283 they might still be needed for a read-write image even in the absence
2284 of a package manager (e.g. if users need to be added, modified, or
2285 removed at runtime).
2286
2287- The
2288 ```devtool modify`` <&YOCTO_DOCS_SDK_URL;#sdk-devtool-use-devtool-modify-to-modify-the-source-of-an-existing-component>`__
2289 command now defaults to extracting the source since that is most
2290 commonly expected. The "-x" or "--extract" options are now no-ops. If
2291 you wish to provide your own existing source tree, you will now need
2292 to specify either the "-n" or "--no-extract" options when running
2293 ``devtool modify``.
2294
2295- If the formfactor for a machine is either not supplied or does not
2296 specify whether a keyboard is attached, then the default is to assume
2297 a keyboard is attached rather than assume no keyboard. This change
2298 primarily affects the Sato UI.
2299
2300- The ``.debug`` directory packaging is now automatic. If your recipe
2301 builds software that installs binaries into directories other than
2302 the standard ones, you no longer need to take care of setting
2303 ``FILES_${PN}-dbg`` to pick up the resulting ``.debug`` directories
2304 as these directories are automatically found and added.
2305
2306- Inaccurate disk and CPU percentage data has been dropped from
2307 ``buildstats`` output. This data has been replaced with
2308 ``getrusage()`` data and corrected IO statistics. You will probably
2309 need to update any custom code that reads the ``buildstats`` data.
2310
2311- The ``meta/conf/distro/include/package_regex.inc`` is now deprecated.
2312 The contents of this file have been moved to individual recipes.
2313
2314 .. note::
2315
2316 Because this file will likely be removed in a future Yocto Project
2317 release, it is suggested that you remove any references to the
2318 file that might be in your configuration.
2319
2320- The ``v86d/uvesafb`` has been removed from the ``genericx86`` and
2321 ``genericx86-64`` reference machines, which are provided by the
2322 ``meta-yocto-bsp`` layer. Most modern x86 boards do not rely on this
2323 file and it only adds kernel error messages during startup. If you do
2324 still need to support ``uvesafb``, you can simply add ``v86d`` to
2325 your image.
2326
2327- Build sysroot paths are now removed from debug symbol files. Removing
2328 these paths means that remote GDB using an unstripped build system
2329 sysroot will no longer work (although this was never documented to
2330 work). The supported method to accomplish something similar is to set
2331 ``IMAGE_GEN_DEBUGFS`` to "1", which will generate a companion debug
2332 image containing unstripped binaries and associated debug sources
2333 alongside the image.
2334
2335Moving to the Yocto Project 2.2 Release
2336=======================================
2337
2338This section provides migration information for moving to the Yocto
2339Project 2.2 Release from the prior release.
2340
2341.. _migration-2.2-minimum-kernel-version:
2342
2343Minimum Kernel Version
2344----------------------
2345
2346The minimum kernel version for the target system and for SDK is now
23473.2.0, due to the upgrade to ``glibc 2.24``. Specifically, for
2348AArch64-based targets the version is 3.14. For Nios II-based targets,
2349the minimum kernel version is 3.19.
2350
2351.. note::
2352
2353 For x86 and x86_64, you can reset
2354 OLDEST_KERNEL
2355 to anything down to 2.6.32 if desired.
2356
2357.. _migration-2.2-staging-directories-in-sysroot-simplified:
2358
2359Staging Directories in Sysroot Has Been Simplified
2360--------------------------------------------------
2361
2362The way directories are staged in sysroot has been simplified and
2363introduces the new ```SYSROOT_DIRS`` <#var-SYSROOT_DIRS>`__,
2364```SYSROOT_DIRS_NATIVE`` <#var-SYSROOT_DIRS_NATIVE>`__, and
2365```SYSROOT_DIRS_BLACKLIST`` <#var-SYSROOT_DIRS_BLACKLIST>`__. See the
2366`v2 patch series on the OE-Core Mailing
2367List <http://lists.openembedded.org/pipermail/openembedded-core/2016-May/121365.html>`__
2368for additional information.
2369
2370.. _migration-2.2-removal-of-old-images-from-tmp-deploy-now-enabled:
2371
2372Removal of Old Images and Other Files in ``tmp/deploy`` Now Enabled
2373-------------------------------------------------------------------
2374
2375Removal of old images and other files in ``tmp/deploy/`` is now enabled
2376by default due to a new staging method used for those files. As a result
2377of this change, the ``RM_OLD_IMAGE`` variable is now redundant.
2378
2379.. _migration-2.2-python-changes:
2380
2381Python Changes
2382--------------
2383
2384The following changes for Python occurred:
2385
2386.. _migration-2.2-bitbake-now-requires-python-3.4:
2387
2388BitBake Now Requires Python 3.4+
2389~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2390
2391BitBake requires Python 3.4 or greater.
2392
2393.. _migration-2.2-utf-8-locale-required-on-build-host:
2394
2395UTF-8 Locale Required on Build Host
2396~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2397
2398A UTF-8 locale is required on the build host due to Python 3. Since
2399C.UTF-8 is not a standard, the default is en_US.UTF-8.
2400
2401.. _migration-2.2-metadata-now-must-use-python-3-syntax:
2402
2403Metadata Must Now Use Python 3 Syntax
2404~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2405
2406The metadata is now required to use Python 3 syntax. For help preparing
2407metadata, see any of the many Python 3 porting guides available.
2408Alternatively, you can reference the conversion commits for Bitbake and
2409you can use `OE-Core <#oe-core>`__ as a guide for changes. Following are
2410particular areas of interest: \* subprocess command-line pipes needing
2411locale decoding \* the syntax for octal values changed \* the
2412``iter*()`` functions changed name \* iterators now return views, not
2413lists \* changed names for Python modules
2414
2415.. _migration-2.2-target-python-recipes-switched-to-python-3:
2416
2417Target Python Recipes Switched to Python 3
2418~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2419
2420Most target Python recipes have now been switched to Python 3.
2421Unfortunately, systems using RPM as a package manager and providing
2422online package-manager support through SMART still require Python 2.
2423
2424.. note::
2425
2426 Python 2 and recipes that use it can still be built for the target as
2427 with previous versions.
2428
2429.. _migration-2.2-buildtools-tarball-includes-python-3:
2430
2431``buildtools-tarball`` Includes Python 3
2432~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2433
2434``buildtools-tarball`` now includes Python 3.
2435
2436.. _migration-2.2-uclibc-replaced-by-musl:
2437
2438uClibc Replaced by musl
2439-----------------------
2440
2441uClibc has been removed in favor of musl. Musl has matured, is better
2442maintained, and is compatible with a wider range of applications as
2443compared to uClibc.
2444
2445.. _migration-2.2-B-no-longer-default-working-directory-for-tasks:
2446
2447``${B}`` No Longer Default Working Directory for Tasks
2448------------------------------------------------------
2449
2450``${``\ ```B`` <#var-B>`__\ ``}`` is no longer the default working
2451directory for tasks. Consequently, any custom tasks you define now need
2452to either have the
2453``[``\ ```dirs`` <&YOCTO_DOCS_BB_URL;#variable-flags>`__\ ``]`` flag
2454set, or the task needs to change into the appropriate working directory
2455manually (e.g using ``cd`` for a shell task).
2456
2457.. note::
2458
2459 The preferred method is to use the
2460 [dirs]
2461 flag.
2462
2463.. _migration-2.2-runqemu-ported-to-python:
2464
2465``runqemu`` Ported to Python
2466----------------------------
2467
2468``runqemu`` has been ported to Python and has changed behavior in some
2469cases. Previous usage patterns continue to be supported.
2470
2471The new ``runqemu`` is a Python script. Machine knowledge is no longer
2472hardcoded into ``runqemu``. You can choose to use the ``qemuboot``
2473configuration file to define the BSP's own arguments and to make it
2474bootable with ``runqemu``. If you use a configuration file, use the
2475following form: image-name-machine.qemuboot.conf The configuration file
2476enables fine-grained tuning of options passed to QEMU without the
2477``runqemu`` script hard-coding any knowledge about different machines.
2478Using a configuration file is particularly convenient when trying to use
2479QEMU with machines other than the ``qemu*`` machines in
2480`OE-Core <#oe-core>`__. The ``qemuboot.conf`` file is generated by the
2481``qemuboot`` class when the root filesystem is being build (i.e. build
2482rootfs). QEMU boot arguments can be set in BSP's configuration file and
2483the ``qemuboot`` class will save them to ``qemuboot.conf``.
2484
2485If you want to use ``runqemu`` without a configuration file, use the
2486following command form: $ runqemu machine rootfs kernel [options]
2487Supported machines are as follows: qemuarm qemuarm64 qemux86 qemux86-64
2488qemuppc qemumips qemumips64 qemumipsel qemumips64el Consider the
2489following example, which uses the ``qemux86-64`` machine, provides a
2490root filesystem, provides an image, and uses the ``nographic`` option: $
2491runqemu qemux86-64
2492tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.ext4
2493tmp/deploy/images/qemux86-64/bzImage nographic
2494
2495Following is a list of variables that can be set in configuration files
2496such as ``bsp.conf`` to enable the BSP to be booted by ``runqemu``:
2497
2498.. note::
2499
2500 "QB" means "QEMU Boot".
2501
2502QB_SYSTEM_NAME: QEMU name (e.g. "qemu-system-i386") QB_OPT_APPEND:
2503Options to append to QEMU (e.g. "-show-cursor") QB_DEFAULT_KERNEL:
2504Default kernel to boot (e.g. "bzImage") QB_DEFAULT_FSTYPE: Default
2505FSTYPE to boot (e.g. "ext4") QB_MEM: Memory (e.g. "-m 512") QB_MACHINE:
2506QEMU machine (e.g. "-machine virt") QB_CPU: QEMU cpu (e.g. "-cpu
2507qemu32") QB_CPU_KVM: Similar to QB_CPU except used for kvm support (e.g.
2508"-cpu kvm64") QB_KERNEL_CMDLINE_APPEND: Options to append to the
2509kernel's -append option (e.g. "console=ttyS0 console=tty") QB_DTB: QEMU
2510dtb name QB_AUDIO_DRV: QEMU audio driver (e.g. "alsa", set it when
2511support audio) QB_AUDIO_OPT: QEMU audio option (e.g. "-soundhw
2512ac97,es1370"), which is used when QB_AUDIO_DRV is set. QB_KERNEL_ROOT:
2513Kernel's root (e.g. /dev/vda) QB_TAP_OPT: Network option for 'tap' mode
2514(e.g. "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device
2515virtio-net-device,netdev=net0"). runqemu will replace "@TAP@" with the
2516one that is used, such as tap0, tap1 ... QB_SLIRP_OPT: Network option
2517for SLIRP mode (e.g. "-netdev user,id=net0 -device
2518virtio-net-device,netdev=net0") QB_ROOTFS_OPT: Used as rootfs (e.g.
2519"-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device
2520virtio-blk-device,drive=disk0"). runqemu will replace "@ROOTFS@" with
2521the one which is used, such as core-image-minimal-qemuarm64.ext4.
2522QB_SERIAL_OPT: Serial port (e.g. "-serial mon:stdio") QB_TCPSERIAL_OPT:
2523tcp serial port option (e.g. " -device virtio-serial-device -chardev
2524socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device
2525virtconsole,chardev=virtcon" runqemu will replace "@PORT@" with the port
2526number which is used.
2527
2528To use ``runqemu``, set ```IMAGE_CLASSES`` <#var-IMAGE_CLASSES>`__ as
2529follows and run ``runqemu``:
2530
2531.. note::
2532
2533 For command-line syntax, use
2534 runqemu help
2535 .
2536
2537IMAGE_CLASSES += "qemuboot"
2538
2539.. _migration-2.2-default-linker-hash-style-changed:
2540
2541Default Linker Hash Style Changed
2542---------------------------------
2543
2544The default linker hash style for ``gcc-cross`` is now "sysv" in order
2545to catch recipes that are building software without using the
2546OpenEmbedded ```LDFLAGS`` <#var-LDFLAGS>`__. This change could result in
2547seeing some "No GNU_HASH in the elf binary" QA issues when building such
2548recipes. You need to fix these recipes so that they use the expected
2549``LDFLAGS``. Depending on how the software is built, the build system
2550used by the software (e.g. a Makefile) might need to be patched.
2551However, sometimes making this fix is as simple as adding the following
2552to the recipe: TARGET_CC_ARCH += "${LDFLAGS}"
2553
2554.. _migration-2.2-kernel-image-base-name-no-longer-uses-kernel-imagetype:
2555
2556``KERNEL_IMAGE_BASE_NAME`` no Longer Uses ``KERNEL_IMAGETYPE``
2557--------------------------------------------------------------
2558
2559The ``KERNEL_IMAGE_BASE_NAME`` variable no longer uses the
2560```KERNEL_IMAGETYPE`` <#var-KERNEL_IMAGETYPE>`__ variable to create the
2561image's base name. Because the OpenEmbedded build system can now build
2562multiple kernel image types, this part of the kernel image base name as
2563been removed leaving only the following: KERNEL_IMAGE_BASE_NAME ?=
2564"${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" If you have recipes or
2565classes that use ``KERNEL_IMAGE_BASE_NAME`` directly, you might need to
2566update the references to ensure they continue to work.
2567
2568.. _migration-2.2-bitbake-changes:
2569
2570BitBake Changes
2571---------------
2572
2573The following changes took place for BitBake:
2574
2575- The "goggle" UI and standalone image-writer tool have been removed as
2576 they both require GTK+ 2.0 and were not being maintained.
2577
2578- The Perforce fetcher now supports ```SRCREV`` <#var-SRCREV>`__ for
2579 specifying the source revision to use, be it
2580 ``${``\ ```AUTOREV`` <#var-AUTOREV>`__\ ``}``, changelist number,
2581 p4date, or label, in preference to separate
2582 ```SRC_URI`` <#var-SRC_URI>`__ parameters to specify these. This
2583 change is more in-line with how the other fetchers work for source
2584 control systems. Recipes that fetch from Perforce will need to be
2585 updated to use ``SRCREV`` in place of specifying the source revision
2586 within ``SRC_URI``.
2587
2588- Some of BitBake's internal code structures for accessing the recipe
2589 cache needed to be changed to support the new multi-configuration
2590 functionality. These changes will affect external tools that use
2591 BitBake's tinfoil module. For information on these changes, see the
2592 changes made to the scripts supplied with OpenEmbedded-Core:
2593 `1 <http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=189371f8393971d00bca0fceffd67cc07784f6ee>`__
2594 and
2595 `2 <http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=4a5aa7ea4d07c2c90a1654b174873abb018acc67>`__.
2596
2597- The task management code has been rewritten to avoid using ID
2598 indirection in order to improve performance. This change is unlikely
2599 to cause any problems for most users. However, the setscene
2600 verification function as pointed to by
2601 ``BB_SETSCENE_VERIFY_FUNCTION`` needed to change signature.
2602 Consequently, a new variable named ``BB_SETSCENE_VERIFY_FUNCTION2``
2603 has been added allowing multiple versions of BitBake to work with
2604 suitably written metadata, which includes OpenEmbedded-Core and Poky.
2605 Anyone with custom BitBake task scheduler code might also need to
2606 update the code to handle the new structure.
2607
2608.. _migration-2.2-swabber-has-been-removed:
2609
2610Swabber has Been Removed
2611------------------------
2612
2613Swabber, a tool that was intended to detect host contamination in the
2614build process, has been removed, as it has been unmaintained and unused
2615for some time and was never particularly effective. The OpenEmbedded
2616build system has since incorporated a number of mechanisms including
2617enhanced QA checks that mean that there is less of a need for such a
2618tool.
2619
2620.. _migration-2.2-removed-recipes:
2621
2622Removed Recipes
2623---------------
2624
2625The following recipes have been removed:
2626
2627- ``augeas``: No longer needed and has been moved to ``meta-oe``.
2628
2629- ``directfb``: Unmaintained and has been moved to ``meta-oe``.
2630
2631- ``gcc``: Removed 4.9 version. Versions 5.4 and 6.2 are still present.
2632
2633- ``gnome-doc-utils``: No longer needed.
2634
2635- ``gtk-doc-stub``: Replaced by ``gtk-doc``.
2636
2637- ``gtk-engines``: No longer needed and has been moved to
2638 ``meta-gnome``.
2639
2640- ``gtk-sato-engine``: Became obsolete.
2641
2642- ``libglade``: No longer needed and has been moved to ``meta-oe``.
2643
2644- ``libmad``: Unmaintained and functionally replaced by ``libmpg123``.
2645 ``libmad`` has been moved to ``meta-oe``.
2646
2647- ``libowl``: Became obsolete.
2648
2649- ``libxsettings-client``: No longer needed.
2650
2651- ``oh-puzzles``: Functionally replaced by ``puzzles``.
2652
2653- ``oprofileui``: Became obsolete. OProfile has been largely supplanted
2654 by perf.
2655
2656- ``packagegroup-core-directfb.bb``: Removed.
2657
2658- ``core-image-directfb.bb``: Removed.
2659
2660- ``pointercal``: No longer needed and has been moved to ``meta-oe``.
2661
2662- ``python-imaging``: No longer needed and moved to ``meta-python``
2663
2664- ``python-pyrex``: No longer needed and moved to ``meta-python``.
2665
2666- ``sato-icon-theme``: Became obsolete.
2667
2668- ``swabber-native``: Swabber has been removed. See the `entry on
2669 Swabber <#migration-2.2-swabber-has-been-removed>`__.
2670
2671- ``tslib``: No longer needed and has been moved to ``meta-oe``.
2672
2673- ``uclibc``: Removed in favor of musl.
2674
2675- ``xtscal``: No longer needed and moved to ``meta-oe``
2676
2677.. _migration-2.2-removed-classes:
2678
2679Removed Classes
2680---------------
2681
2682The following classes have been removed:
2683
2684- ``distutils-native-base``: No longer needed.
2685
2686- ``distutils3-native-base``: No longer needed.
2687
2688- ``sdl``: Only set ```DEPENDS`` <#var-DEPENDS>`__ and
2689 ```SECTION`` <#var-SECTION>`__, which are better set within the
2690 recipe instead.
2691
2692- ``sip``: Mostly unused.
2693
2694- ``swabber``: See the `entry on
2695 Swabber <#migration-2.2-swabber-has-been-removed>`__.
2696
2697.. _migration-2.2-minor-packaging-changes:
2698
2699Minor Packaging Changes
2700-----------------------
2701
2702The following minor packaging changes have occurred:
2703
2704- ``grub``: Split ``grub-editenv`` into its own package.
2705
2706- ``systemd``: Split container and vm related units into a new package,
2707 systemd-container.
2708
2709- ``util-linux``: Moved ``prlimit`` to a separate
2710 ``util-linux-prlimit`` package.
2711
2712.. _migration-2.2-miscellaneous-changes:
2713
2714Miscellaneous Changes
2715---------------------
2716
2717The following miscellaneous changes have occurred:
2718
2719- ``package_regex.inc``: Removed because the definitions
2720 ``package_regex.inc`` previously contained have been moved to their
2721 respective recipes.
2722
2723- Both ``devtool add`` and ``recipetool create`` now use a fixed
2724 ```SRCREV`` <#var-SRCREV>`__ by default when fetching from a Git
2725 repository. You can override this in either case to use
2726 ``${``\ ```AUTOREV`` <#var-AUTOREV>`__\ ``}`` instead by using the
2727 ``-a`` or ``DASHDASHautorev`` command-line option
2728
2729- ``distcc``: GTK+ UI is now disabled by default.
2730
2731- ``packagegroup-core-tools-testapps``: Removed Piglit.
2732
2733- ``image.bbclass``: Renamed COMPRESS(ION) to CONVERSION. This change
2734 means that ``COMPRESSIONTYPES``, ``COMPRESS_DEPENDS`` and
2735 ``COMPRESS_CMD`` are deprecated in favor of ``CONVERSIONTYPES``,
2736 ``CONVERSION_DEPENDS`` and ``CONVERSION_CMD``. The ``COMPRESS*``
2737 variable names will still work in the 2.2 release but metadata that
2738 does not need to be backwards-compatible should be changed to use the
2739 new names as the ``COMPRESS*`` ones will be removed in a future
2740 release.
2741
2742- ``gtk-doc``: A full version of ``gtk-doc`` is now made available.
2743 However, some old software might not be capable of using the current
2744 version of ``gtk-doc`` to build documentation. You need to change
2745 recipes that build such software so that they explicitly disable
2746 building documentation with ``gtk-doc``.
2747
2748Moving to the Yocto Project 2.3 Release
2749=======================================
2750
2751This section provides migration information for moving to the Yocto
2752Project 2.3 Release from the prior release.
2753
2754.. _migration-2.3-recipe-specific-sysroots:
2755
2756Recipe-specific Sysroots
2757------------------------
2758
2759The OpenEmbedded build system now uses one sysroot per recipe to resolve
2760long-standing issues with configuration script auto-detection of
2761undeclared dependencies. Consequently, you might find that some of your
2762previously written custom recipes are missing declared dependencies,
2763particularly those dependencies that are incidentally built earlier in a
2764typical build process and thus are already likely to be present in the
2765shared sysroot in previous releases.
2766
2767Consider the following:
2768
2769- *Declare Build-Time Dependencies:* Because of this new feature, you
2770 must explicitly declare all build-time dependencies for your recipe.
2771 If you do not declare these dependencies, they are not populated into
2772 the sysroot for the recipe.
2773
2774- *Specify Pre-Installation and Post-Installation Native Tool
2775 Dependencies:* You must specifically specify any special native tool
2776 dependencies of ``pkg_preinst`` and ``pkg_postinst`` scripts by using
2777 the ```PACKAGE_WRITE_DEPS`` <#var-PACKAGE_WRITE_DEPS>`__ variable.
2778 Specifying these dependencies ensures that these tools are available
2779 if these scripts need to be run on the build host during the
2780 ```do_rootfs`` <#ref-tasks-rootfs>`__ task.
2781
2782 As an example, see the ``dbus`` recipe. You will see that this recipe
2783 has a ``pkg_postinst`` that calls ``systemctl`` if "systemd" is in
2784 ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__. In the example,
2785 ``systemd-systemctl-native`` is added to ``PACKAGE_WRITE_DEPS``,
2786 which is also conditional on "systemd" being in ``DISTRO_FEATURES``.
2787
2788- *Examine Recipes that Use ``SSTATEPOSTINSTFUNCS``:* You need to
2789 examine any recipe that uses ``SSTATEPOSTINSTFUNCS`` and determine
2790 steps to take.
2791
2792 Functions added to ``SSTATEPOSTINSTFUNCS`` are still called as they
2793 were in previous Yocto Project releases. However, since a separate
2794 sysroot is now being populated for every recipe and if existing
2795 functions being called through ``SSTATEPOSTINSTFUNCS`` are doing
2796 relocation, then you will need to change these to use a
2797 post-installation script that is installed by a function added to
2798 ```SYSROOT_PREPROCESS_FUNCS`` <#var-SYSROOT_PREPROCESS_FUNCS>`__.
2799
2800 For an example, see the ``pixbufcache`` class in ``meta/classes/`` in
2801 the Yocto Project `Source
2802 Repositories <&YOCTO_DOCS_OM_URL;#source-repositories>`__.
2803
2804 .. note::
2805
2806 The
2807 SSTATEPOSTINSTFUNCS
2808 variable itself is now deprecated in favor of the
2809 do_populate_sysroot[postfuncs]
2810 task. Consequently, if you do still have any function or functions
2811 that need to be called after the sysroot component is created for
2812 a recipe, then you would be well advised to take steps to use a
2813 post installation script as described previously. Taking these
2814 steps prepares your code for when
2815 SSTATEPOSTINSTFUNCS
2816 is removed in a future Yocto Project release.
2817
2818- *Specify the Sysroot when Using Certain External Scripts:* Because
2819 the shared sysroot is now gone, the scripts
2820 ``oe-find-native-sysroot`` and ``oe-run-native`` have been changed
2821 such that you need to specify which recipe's
2822 ```STAGING_DIR_NATIVE`` <#var-STAGING_DIR_NATIVE>`__ is used.
2823
2824.. note::
2825
2826 You can find more information on how recipe-specific sysroots work in
2827 the "
2828 staging.bbclass
2829 " section.
2830
2831.. _migration-2.3-path-variable:
2832
2833``PATH`` Variable
2834-----------------
2835
2836Within the environment used to run build tasks, the environment variable
2837``PATH`` is now sanitized such that the normal native binary paths
2838(``/bin``, ``/sbin``, ``/usr/bin`` and so forth) are removed and a
2839directory containing symbolic links linking only to the binaries from
2840the host mentioned in the ```HOSTTOOLS`` <#var-HOSTTOOLS>`__ and
2841```HOSTTOOLS_NONFATAL`` <#var-HOSTTOOLS_NONFATAL>`__ variables is added
2842to ``PATH``.
2843
2844Consequently, any native binaries provided by the host that you need to
2845call needs to be in one of these two variables at the configuration
2846level.
2847
2848Alternatively, you can add a native recipe (i.e. ``-native``) that
2849provides the binary to the recipe's ```DEPENDS`` <#var-DEPENDS>`__
2850value.
2851
2852.. note::
2853
2854 PATH
2855 is not sanitized in the same way within
2856 devshell
2857 . If it were, you would have difficulty running host tools for
2858 development and debugging within the shell.
2859
2860.. _migration-2.3-scripts:
2861
2862Changes to Scripts
2863------------------
2864
2865The following changes to scripts took place:
2866
2867- *``oe-find-native-sysroot``:* The usage for the
2868 ``oe-find-native-sysroot`` script has changed to the following: $ .
2869 oe-find-native-sysroot recipe You must now supply a recipe for recipe
2870 as part of the command. Prior to the Yocto Project DISTRO release, it
2871 was not necessary to provide the script with the command.
2872
2873- *``oe-run-native``:* The usage for the ``oe-run-native`` script has
2874 changed to the following: $ oe-run-native native_recipe tool You must
2875 supply the name of the native recipe and the tool you want to run as
2876 part of the command. Prior to the Yocto Project DISTRO release, it
2877 was not necessary to provide the native recipe with the command.
2878
2879- *``cleanup-workdir``:* The ``cleanup-workdir`` script has been
2880 removed because the script was found to be deleting files it should
2881 not have, which lead to broken build trees. Rather than trying to
2882 delete portions of ```TMPDIR`` <#var-TMPDIR>`__ and getting it wrong,
2883 it is recommended that you delete ``TMPDIR`` and have it restored
2884 from shared state (sstate) on subsequent builds.
2885
2886- *``wipe-sysroot``:* The ``wipe-sysroot`` script has been removed as
2887 it is no longer needed with recipe-specific sysroots.
2888
2889.. _migration-2.3-functions:
2890
2891Changes to Functions
2892--------------------
2893
2894The previously deprecated ``bb.data.getVar()``, ``bb.data.setVar()``,
2895and related functions have been removed in favor of ``d.getVar()``,
2896``d.setVar()``, and so forth.
2897
2898You need to fix any references to these old functions.
2899
2900.. _migration-2.3-bitbake-changes:
2901
2902BitBake Changes
2903---------------
2904
2905The following changes took place for BitBake:
2906
2907- *BitBake's Graphical Dependency Explorer UI Replaced:* BitBake's
2908 graphical dependency explorer UI ``depexp`` was replaced by
2909 ``taskexp`` ("Task Explorer"), which provides a graphical way of
2910 exploring the ``task-depends.dot`` file. The data presented by Task
2911 Explorer is much more accurate than the data that was presented by
2912 ``depexp``. Being able to visualize the data is an often requested
2913 feature as standard ``*.dot`` file viewers cannot usual cope with the
2914 size of the ``task-depends.dot`` file.
2915
2916- *BitBake "-g" Output Changes:* The ``package-depends.dot`` and
2917 ``pn-depends.dot`` files as previously generated using the
2918 ``bitbake -g`` command have been removed. A ``recipe-depends.dot``
2919 file is now generated as a collapsed version of ``task-depends.dot``
2920 instead.
2921
2922 The reason for this change is because ``package-depends.dot`` and
2923 ``pn-depends.dot`` largely date back to a time before task-based
2924 execution and do not take into account task-level dependencies
2925 between recipes, which could be misleading.
2926
2927- *Mirror Variable Splitting Changes:* Mirror variables including
2928 ```MIRRORS`` <#var-MIRRORS>`__, ```PREMIRRORS`` <#var-PREMIRRORS>`__,
2929 and ```SSTATE_MIRRORS`` <#var-SSTATE_MIRRORS>`__ can now separate
2930 values entirely with spaces. Consequently, you no longer need "\\n".
2931 BitBake looks for pairs of values, which simplifies usage. There
2932 should be no change required to existing mirror variable values
2933 themselves.
2934
2935- *The Subversion (SVN) Fetcher Uses an "ssh" Parameter and Not an
2936 "rsh" Parameter:* The SVN fetcher now takes an "ssh" parameter
2937 instead of an "rsh" parameter. This new optional parameter is used
2938 when the "protocol" parameter is set to "svn+ssh". You can only use
2939 the new parameter to specify the ``ssh`` program used by SVN. The SVN
2940 fetcher passes the new parameter through the ``SVN_SSH`` environment
2941 variable during the ```do_fetch`` <#ref-tasks-fetch>`__ task.
2942
2943 See the "`Subversion (SVN) Fetcher
2944 (svn://) <&YOCTO_DOCS_BB_URL;#svn-fetcher>`__" section in the BitBake
2945 User Manual for additional information.
2946
2947- *``BB_SETSCENE_VERIFY_FUNCTION`` and ``BB_SETSCENE_VERIFY_FUNCTION2``
2948 Removed:* Because the mechanism they were part of is no longer
2949 necessary with recipe-specific sysroots, the
2950 ``BB_SETSCENE_VERIFY_FUNCTION`` and ``BB_SETSCENE_VERIFY_FUNCTION2``
2951 variables have been removed.
2952
2953.. _migration-2.3-absolute-symlinks:
2954
2955Absolute Symbolic Links
2956-----------------------
2957
2958Absolute symbolic links (symlinks) within staged files are no longer
2959permitted and now trigger an error. Any explicit creation of symlinks
2960can use the ``lnr`` script, which is a replacement for ``ln -r``.
2961
2962If the build scripts in the software that the recipe is building are
2963creating a number of absolute symlinks that need to be corrected, you
2964can inherit ``relative_symlinks`` within the recipe to turn those
2965absolute symlinks into relative symlinks.
2966
2967.. _migration-2.3-gplv2-and-gplv3-moves:
2968
2969GPLv2 Versions of GPLv3 Recipes Moved
2970-------------------------------------
2971
2972Older GPLv2 versions of GPLv3 recipes have moved to a separate
2973``meta-gplv2`` layer.
2974
2975If you use ```INCOMPATIBLE_LICENSE`` <#var-INCOMPATIBLE_LICENSE>`__ to
2976exclude GPLv3 or set ```PREFERRED_VERSION`` <#var-PREFERRED_VERSION>`__
2977to substitute a GPLv2 version of a GPLv3 recipe, then you must add the
2978``meta-gplv2`` layer to your configuration.
2979
2980.. note::
2981
2982 You can find
2983 meta-gplv2
2984 layer in the OpenEmbedded layer index at
2985 .
2986
2987These relocated GPLv2 recipes do not receive the same level of
2988maintenance as other core recipes. The recipes do not get security fixes
2989and upstream no longer maintains them. In fact, the upstream community
2990is actively hostile towards people that use the old versions of the
2991recipes. Moving these recipes into a separate layer both makes the
2992different needs of the recipes clearer and clearly identifies the number
2993of these recipes.
2994
2995.. note::
2996
2997 The long-term solution might be to move to BSD-licensed replacements
2998 of the GPLv3 components for those that need to exclude GPLv3-licensed
2999 components from the target system. This solution will be investigated
3000 for future Yocto Project releases.
3001
3002.. _migration-2.3-package-management-changes:
3003
3004Package Management Changes
3005--------------------------
3006
3007The following package management changes took place:
3008
3009- Smart package manager is replaced by DNF package manager. Smart has
3010 become unmaintained upstream, is not ported to Python 3.x.
3011 Consequently, Smart needed to be replaced. DNF is the only feasible
3012 candidate.
3013
3014 The change in functionality is that the on-target runtime package
3015 management from remote package feeds is now done with a different
3016 tool that has a different set of command-line options. If you have
3017 scripts that call the tool directly, or use its API, they need to be
3018 fixed.
3019
3020 For more information, see the `DNF
3021 Documentation <http://dnf.readthedocs.io/en/latest/>`__.
3022
3023- Rpm 5.x is replaced with Rpm 4.x. This is done for two major reasons:
3024
3025 - DNF is API-incompatible with Rpm 5.x and porting it and
3026 maintaining the port is non-trivial.
3027
3028 - Rpm 5.x itself has limited maintenance upstream, and the Yocto
3029 Project is one of the very few remaining users.
3030
3031- Berkeley DB 6.x is removed and Berkeley DB 5.x becomes the default:
3032
3033 - Version 6.x of Berkeley DB has largely been rejected by the open
3034 source community due to its AGPLv3 license. As a result, most
3035 mainstream open source projects that require DB are still
3036 developed and tested with DB 5.x.
3037
3038 - In OE-core, the only thing that was requiring DB 6.x was Rpm 5.x.
3039 Thus, no reason exists to continue carrying DB 6.x in OE-core.
3040
3041- ``createrepo`` is replaced with ``createrepo_c``.
3042
3043 ``createrepo_c`` is the current incarnation of the tool that
3044 generates remote repository metadata. It is written in C as compared
3045 to ``createrepo``, which is written in Python. ``createrepo_c`` is
3046 faster and is maintained.
3047
3048- Architecture-independent RPM packages are "noarch" instead of "all".
3049
3050 This change was made because too many places in DNF/RPM4 stack
3051 already make that assumption. Only the filenames and the architecture
3052 tag has changed. Nothing else has changed in OE-core system,
3053 particularly in the ```allarch.bbclass`` <#ref-classes-allarch>`__
3054 class.
3055
3056- Signing of remote package feeds using ``PACKAGE_FEED_SIGN`` is not
3057 currently supported. This issue will be fully addressed in a future
3058 Yocto Project release. See `defect
3059 11209 <https://bugzilla.yoctoproject.org/show_bug.cgi?id=11209>`__
3060 for more information on a solution to package feed signing with RPM
3061 in the Yocto Project 2.3 release.
3062
3063- OPKG now uses the libsolv backend for resolving package dependencies
3064 by default. This is vastly superior to OPKG's internal ad-hoc solver
3065 that was previously used. This change does have a small impact on
3066 disk (around 500 KB) and memory footprint.
3067
3068 .. note::
3069
3070 For further details on this change, see the
3071 commit message
3072 .
3073
3074.. _migration-2.3-removed-recipes:
3075
3076Removed Recipes
3077---------------
3078
3079The following recipes have been removed:
3080
3081- *``linux-yocto 4.8:``* Version 4.8 has been removed. Versions 4.1
3082 (LTSI), 4.4 (LTS), 4.9 (LTS/LTSI) and 4.10 are now present.
3083
3084- *``python-smartpm:``* Functionally replaced by ``dnf``.
3085
3086- *``createrepo:``* Replaced by the ``createrepo-c`` recipe.
3087
3088- *``rpmresolve:``* No longer needed with the move to RPM 4 as RPM
3089 itself is used instead.
3090
3091- *``gstreamer:``* Removed the GStreamer Git version recipes as they
3092 have been stale. ``1.10.``\ x recipes are still present.
3093
3094- *``alsa-conf-base:``* Merged into ``alsa-conf`` since ``libasound``
3095 depended on both. Essentially, no way existed to install only one of
3096 these.
3097
3098- *``tremor:``* Moved to ``meta-multimedia``. Fixed-integer Vorbis
3099 decoding is not needed by current hardware. Thus, GStreamer's ivorbis
3100 plugin has been disabled by default eliminating the need for the
3101 ``tremor`` recipe in `OE-Core <#oe-core>`__.
3102
3103- *``gummiboot:``* Replaced by ``systemd-boot``.
3104
3105.. _migration-2.3-wic-changes:
3106
3107Wic Changes
3108-----------
3109
3110The following changes have been made to Wic:
3111
3112.. note::
3113
3114 For more information on Wic, see the "
3115 Creating Partitioned Images Using Wic
3116 " section in the Yocto Project Development Tasks Manual.
3117
3118- *Default Output Directory Changed:* Wic's default output directory is
3119 now the current directory by default instead of the unusual
3120 ``/var/tmp/wic``.
3121
3122 The "-o" and "--outdir" options remain unchanged and are used to
3123 specify your preferred output directory if you do not want to use the
3124 default directory.
3125
3126- *fsimage Plug-in Removed:* The Wic fsimage plugin has been removed as
3127 it duplicates functionality of the rawcopy plugin.
3128
3129.. _migration-2.3-qa-changes:
3130
3131QA Changes
3132----------
3133
3134The following QA checks have changed:
3135
3136- *``unsafe-references-in-binaries``:* The
3137 ``unsafe-references-in-binaries`` QA check, which was disabled by
3138 default, has now been removed. This check was intended to detect
3139 binaries in ``/bin`` that link to libraries in ``/usr/lib`` and have
3140 the case where the user has ``/usr`` on a separate filesystem to
3141 ``/``.
3142
3143 The removed QA check was buggy. Additionally, ``/usr`` residing on a
3144 separate partition from ``/`` is now a rare configuration.
3145 Consequently, ``unsafe-references-in-binaries`` was removed.
3146
3147- *``file-rdeps``:* The ``file-rdeps`` QA check is now an error by
3148 default instead of a warning. Because it is an error instead of a
3149 warning, you need to address missing runtime dependencies.
3150
3151 For additional information, see the
3152 ```insane`` <#ref-classes-insane>`__ class and the "`Errors and
3153 Warnings <#qa-errors-and-warnings>`__" section.
3154
3155.. _migration-2.3-miscellaneous-changes:
3156
3157Miscellaneous Changes
3158---------------------
3159
3160The following miscellaneous changes have occurred:
3161
3162- In this release, a number of recipes have been changed to ignore the
3163 ``largefile`` ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ item,
3164 enabling large file support unconditionally. This feature has always
3165 been enabled by default. Disabling the feature has not been widely
3166 tested.
3167
3168 .. note::
3169
3170 Future releases of the Yocto Project will remove entirely the
3171 ability to disable the
3172 largefile
3173 feature, which would make it unconditionally enabled everywhere.
3174
3175- If the ```DISTRO_VERSION`` <#var-DISTRO_VERSION>`__ value contains
3176 the value of the ```DATE`` <#var-DATE>`__ variable, which is the
3177 default between Poky releases, the ``DATE`` value is explicitly
3178 excluded from ``/etc/issue`` and ``/etc/issue.net``, which is
3179 displayed at the login prompt, in order to avoid conflicts with
3180 Multilib enabled. Regardless, the ``DATE`` value is inaccurate if the
3181 ``base-files`` recipe is restored from shared state (sstate) rather
3182 than rebuilt.
3183
3184 If you need the build date recorded in ``/etc/issue*`` or anywhere
3185 else in your image, a better method is to define a post-processing
3186 function to do it and have the function called from
3187 ```ROOTFS_POSTPROCESS_COMMAND`` <#var-ROOTFS_POSTPROCESS_COMMAND>`__.
3188 Doing so ensures the value is always up-to-date with the created
3189 image.
3190
3191- Dropbear's ``init`` script now disables DSA host keys by default.
3192 This change is in line with the systemd service file, which supports
3193 RSA keys only, and with recent versions of OpenSSH, which deprecates
3194 DSA host keys.
3195
3196- The ```buildhistory`` <#ref-classes-buildhistory>`__ class now
3197 correctly uses tabs as separators between all columns in
3198 ``installed-package-sizes.txt`` in order to aid import into other
3199 tools.
3200
3201- The ``USE_LDCONFIG`` variable has been replaced with the "ldconfig"
3202 ``DISTRO_FEATURES`` feature. Distributions that previously set:
3203 USE_LDCONFIG = "0" should now instead use the following:
3204 DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " ldconfig"
3205
3206- The default value of
3207 ```COPYLEFT_LICENSE_INCLUDE`` <#var-COPYLEFT_LICENSE_INCLUDE>`__ now
3208 includes all versions of AGPL licenses in addition to GPL and LGPL.
3209
3210 .. note::
3211
3212 The default list is not intended to be guaranteed as a complete
3213 safe list. You should seek legal advice based on what you are
3214 distributing if you are unsure.
3215
3216- Kernel module packages are now suffixed with the kernel version in
3217 order to allow module packages from multiple kernel versions to
3218 co-exist on a target system. If you wish to return to the previous
3219 naming scheme that does not include the version suffix, use the
3220 following: KERNEL_MODULE_PACKAGE_SUFFIX to ""
3221
3222- Removal of ``libtool`` ``*.la`` files is now enabled by default. The
3223 ``*.la`` files are not actually needed on Linux and relocating them
3224 is an unnecessary burden.
3225
3226 If you need to preserve these ``.la`` files (e.g. in a custom
3227 distribution), you must change
3228 ```INHERIT_DISTRO`` <#var-INHERIT_DISTRO>`__ such that
3229 "remove-libtool" is not included in the value.
3230
3231- Extensible SDKs built for GCC 5+ now refuse to install on a
3232 distribution where the host GCC version is 4.8 or 4.9. This change
3233 resulted from the fact that the installation is known to fail due to
3234 the way the ``uninative`` shared state (sstate) package is built. See
3235 the ```uninative`` <#ref-classes-uninative>`__ class for additional
3236 information.
3237
3238- All native and nativesdk recipes now use a separate
3239 ``DISTRO_FEATURES`` value instead of sharing the value used by
3240 recipes for the target, in order to avoid unnecessary rebuilds.
3241
3242 The ``DISTRO_FEATURES`` for ``native`` recipes is
3243 ```DISTRO_FEATURES_NATIVE`` <#var-DISTRO_FEATURES_NATIVE>`__ added to
3244 an intersection of ``DISTRO_FEATURES`` and
3245 ```DISTRO_FEATURES_FILTER_NATIVE`` <#var-DISTRO_FEATURES_FILTER_NATIVE>`__.
3246
3247 For nativesdk recipes, the corresponding variables are
3248 ```DISTRO_FEATURES_NATIVESDK`` <#var-DISTRO_FEATURES_NATIVESDK>`__
3249 and
3250 ```DISTRO_FEATURES_FILTER_NATIVESDK`` <#var-DISTRO_FEATURES_FILTER_NATIVESDK>`__.
3251
3252- The ``FILESDIR`` variable, which was previously deprecated and rarely
3253 used, has now been removed. You should change any recipes that set
3254 ``FILESDIR`` to set ```FILESPATH`` <#var-FILESPATH>`__ instead.
3255
3256- The ``MULTIMACH_HOST_SYS`` variable has been removed as it is no
3257 longer needed with recipe-specific sysroots.
3258
3259Moving to the Yocto Project 2.4 Release
3260=======================================
3261
3262This section provides migration information for moving to the Yocto
3263Project 2.4 Release from the prior release.
3264
3265.. _migration-2.4-memory-resident-mode:
3266
3267Memory Resident Mode
3268--------------------
3269
3270A persistent mode is now available in BitBake's default operation,
3271replacing its previous "memory resident mode" (i.e.
3272``oe-init-build-env-memres``). Now you only need to set
3273```BB_SERVER_TIMEOUT`` <#var-BB_SERVER_TIMEOUT>`__ to a timeout (in
3274seconds) and BitBake's server stays resident for that amount of time
3275between invocations. The ``oe-init-build-env-memres`` script has been
3276removed since a separate environment setup script is no longer needed.
3277
3278.. _migration-2.4-packaging-changes:
3279
3280Packaging Changes
3281-----------------
3282
3283This section provides information about packaging changes that have
3284occurred:
3285
3286- *``python3`` Changes:*
3287
3288 - The main "python3" package now brings in all of the standard
3289 Python 3 distribution rather than a subset. This behavior matches
3290 what is expected based on traditional Linux distributions. If you
3291 wish to install a subset of Python 3, specify ``python-core`` plus
3292 one or more of the individual packages that are still produced.
3293
3294 - *``python3``:* The ``bz2.py``, ``lzma.py``, and
3295 ``_compression.py`` scripts have been moved from the
3296 ``python3-misc`` package to the ``python3-compression`` package.
3297
3298- *``binutils``:* The ``libbfd`` library is now packaged in a separate
3299 "libbfd" package. This packaging saves space when certain tools (e.g.
3300 ``perf``) are installed. In such cases, the tools only need
3301 ``libbfd`` rather than all the packages in ``binutils``.
3302
3303- *``util-linux`` Changes:*
3304
3305 - The ``su`` program is now packaged in a separate "util-linux-su"
3306 package, which is only built when "pam" is listed in the
3307 ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ variable.
3308 ``util-linux`` should not be installed unless it is needed because
3309 ``su`` is normally provided through the shadow file format. The
3310 main ``util-linux`` package has runtime dependencies (i.e.
3311 ```RDEPENDS`` <#var-RDEPENDS>`__) on the ``util-linux-su`` package
3312 when "pam" is in ``DISTRO_FEATURES``.
3313
3314 - The ``switch_root`` program is now packaged in a separate
3315 "util-linux-switch-root" package for small initramfs images that
3316 do not need the whole ``util-linux`` package or the busybox
3317 binary, which are both much larger than ``switch_root``. The main
3318 ``util-linux`` package has a recommended runtime dependency (i.e.
3319 ```RRECOMMENDS`` <#var-RRECOMMENDS>`__) on the
3320 ``util-linux-switch-root`` package.
3321
3322 - The ``ionice`` program is now packaged in a separate
3323 "util-linux-ionice" package. The main ``util-linux`` package has a
3324 recommended runtime dependency (i.e. ``RRECOMMENDS``) on the
3325 ``util-linux-ionice`` package.
3326
3327- *``initscripts``:* The ``sushell`` program is now packaged in a
3328 separate "initscripts-sushell" package. This packaging change allows
3329 systems to pull ``sushell`` in when ``selinux`` is enabled. The
3330 change also eliminates needing to pull in the entire ``initscripts``
3331 package. The main ``initscripts`` package has a runtime dependency
3332 (i.e. ``RDEPENDS``) on the ``sushell`` package when "selinux" is in
3333 ``DISTRO_FEATURES``.
3334
3335- *``glib-2.0``:* The ``glib-2.0`` package now has a recommended
3336 runtime dependency (i.e. ``RRECOMMENDS``) on the ``shared-mime-info``
3337 package, since large portions of GIO are not useful without the MIME
3338 database. You can remove the dependency by using the
3339 ```BAD_RECOMMENDATIONS`` <#var-BAD_RECOMMENDATIONS>`__ variable if
3340 ``shared-mime-info`` is too large and is not required.
3341
3342- *Go Standard Runtime:* The Go standard runtime has been split out
3343 from the main ``go`` recipe into a separate ``go-runtime`` recipe.
3344
3345.. _migration-2.4-removed-recipes:
3346
3347Removed Recipes
3348---------------
3349
3350The following recipes have been removed:
3351
3352- *``acpitests``:* This recipe is not maintained.
3353
3354- *``autogen-native``:* No longer required by Grub, oe-core, or
3355 meta-oe.
3356
3357- *``bdwgc``:* Nothing in OpenEmbedded-Core requires this recipe. It
3358 has moved to meta-oe.
3359
3360- *``byacc``:* This recipe was only needed by rpm 5.x and has moved to
3361 meta-oe.
3362
3363- *``gcc (5.4)``:* The 5.4 series dropped the recipe in favor of 6.3 /
3364 7.2.
3365
3366- *``gnome-common``:* Deprecated upstream and no longer needed.
3367
3368- *``go-bootstrap-native``:* Go 1.9 does its own bootstrapping so this
3369 recipe has been removed.
3370
3371- *``guile``:* This recipe was only needed by ``autogen-native`` and
3372 ``remake``. The recipe is no longer needed by either of these
3373 programs.
3374
3375- *``libclass-isa-perl``:* This recipe was previously needed for LSB 4,
3376 no longer needed.
3377
3378- *``libdumpvalue-perl``:* This recipe was previously needed for LSB 4,
3379 no longer needed.
3380
3381- *``libenv-perl``:* This recipe was previously needed for LSB 4, no
3382 longer needed.
3383
3384- *``libfile-checktree-perl``:* This recipe was previously needed for
3385 LSB 4, no longer needed.
3386
3387- *``libi18n-collate-perl``:* This recipe was previously needed for LSB
3388 4, no longer needed.
3389
3390- *``libiconv``:* This recipe was only needed for ``uclibc``, which was
3391 removed in the previous release. ``glibc`` and ``musl`` have their
3392 own implementations. ``meta-mingw`` still needs ``libiconv``, so it
3393 has been moved to ``meta-mingw``.
3394
3395- *``libpng12``:* This recipe was previously needed for LSB. The
3396 current ``libpng`` is 1.6.x.
3397
3398- *``libpod-plainer-perl``:* This recipe was previously needed for LSB
3399 4, no longer needed.
3400
3401- *``linux-yocto (4.1)``:* This recipe was removed in favor of 4.4,
3402 4.9, 4.10 and 4.12.
3403
3404- *``mailx``:* This recipe was previously only needed for LSB
3405 compatibility, and upstream is defunct.
3406
3407- *``mesa (git version only)``:* The git version recipe was stale with
3408 respect to the release version.
3409
3410- *``ofono (git version only)``:* The git version recipe was stale with
3411 respect to the release version.
3412
3413- *``portmap``:* This recipe is obsolete and is superseded by
3414 ``rpcbind``.
3415
3416- *``python3-pygpgme``:* This recipe is old and unmaintained. It was
3417 previously required by ``dnf``, which has switched to official
3418 ``gpgme`` Python bindings.
3419
3420- *``python-async``:* This recipe has been removed in favor of the
3421 Python 3 version.
3422
3423- *``python-gitdb``:* This recipe has been removed in favor of the
3424 Python 3 version.
3425
3426- *``python-git``:* This recipe was removed in favor of the Python 3
3427 version.
3428
3429- *``python-mako``:* This recipe was removed in favor of the Python 3
3430 version.
3431
3432- *``python-pexpect``:* This recipe was removed in favor of the Python
3433 3 version.
3434
3435- *``python-ptyprocess``:* This recipe was removed in favor of Python
3436 the 3 version.
3437
3438- *``python-pycurl``:* Nothing is using this recipe in
3439 OpenEmbedded-Core (i.e. ``meta-oe``).
3440
3441- *``python-six``:* This recipe was removed in favor of the Python 3
3442 version.
3443
3444- *``python-smmap``:* This recipe was removed in favor of the Python 3
3445 version.
3446
3447- *``remake``:* Using ``remake`` as the provider of ``virtual/make`` is
3448 broken. Consequently, this recipe is not needed in OpenEmbedded-Core.
3449
3450.. _migration-2.4-kernel-device-tree-move:
3451
3452Kernel Device Tree Move
3453-----------------------
3454
3455Kernel Device Tree support is now easier to enable in a kernel recipe.
3456The Device Tree code has moved to a
3457```kernel-devicetree`` <#ref-classes-kernel-devicetree>`__ class.
3458Functionality is automatically enabled for any recipe that inherits the
3459```kernel`` <#ref-classes-kernel>`__ class and sets the
3460```KERNEL_DEVICETREE`` <#var-KERNEL_DEVICETREE>`__ variable. The
3461previous mechanism for doing this,
3462``meta/recipes-kernel/linux/linux-dtb.inc``, is still available to avoid
3463breakage, but triggers a deprecation warning. Future releases of the
3464Yocto Project will remove ``meta/recipes-kernel/linux/linux-dtb.inc``.
3465It is advisable to remove any ``require`` statements that request
3466``meta/recipes-kernel/linux/linux-dtb.inc`` from any custom kernel
3467recipes you might have. This will avoid breakage in post 2.4 releases.
3468
3469.. _migration-2.4-package-qa-changes:
3470
3471Package QA Changes
3472------------------
3473
3474The following package QA changes took place:
3475
3476- The "unsafe-references-in-scripts" QA check has been removed.
3477
3478- If you refer to ``${COREBASE}/LICENSE`` within
3479 ```LIC_FILES_CHKSUM`` <#var-LIC_FILES_CHKSUM>`__ you receive a
3480 warning because this file is a description of the license for
3481 OE-Core. Use ``${COMMON_LICENSE_DIR}/MIT`` if your recipe is
3482 MIT-licensed and you cannot use the preferred method of referring to
3483 a file within the source tree.
3484
3485.. _migration-2.4-readme-changes:
3486
3487``README`` File Changes
3488-----------------------
3489
3490The following are changes to ``README`` files:
3491
3492- The main Poky ``README`` file has been moved to the ``meta-poky``
3493 layer and has been renamed ``README.poky``. A symlink has been
3494 created so that references to the old location work.
3495
3496- The ``README.hardware`` file has been moved to ``meta-yocto-bsp``. A
3497 symlink has been created so that references to the old location work.
3498
3499- A ``README.qemu`` file has been created with coverage of the
3500 ``qemu*`` machines.
3501
3502.. _migration-2.4-miscellaneous-changes:
3503
3504Miscellaneous Changes
3505---------------------
3506
3507The following are additional changes:
3508
3509- The ``ROOTFS_PKGMANAGE_BOOTSTRAP`` variable and any references to it
3510 have been removed. You should remove this variable from any custom
3511 recipes.
3512
3513- The ``meta-yocto`` directory has been removed.
3514
3515 .. note::
3516
3517 In the Yocto Project 2.1 release
3518 meta-yocto
3519 was renamed to
3520 meta-poky
3521 and the
3522 meta-yocto
3523 subdirectory remained to avoid breaking existing configurations.
3524
3525- The ``maintainers.inc`` file, which tracks maintainers by listing a
3526 primary person responsible for each recipe in OE-Core, has been moved
3527 from ``meta-poky`` to OE-Core (i.e. from
3528 ``meta-poky/conf/distro/include`` to ``meta/conf/distro/include``).
3529
3530- The ```buildhistory`` <#ref-classes-buildhistory>`__ class now makes
3531 a single commit per build rather than one commit per subdirectory in
3532 the repository. This behavior assumes the commits are enabled with
3533 ```BUILDHISTORY_COMMIT`` <#var-BUILDHISTORY_COMMIT>`__ = "1", which
3534 is typical. Previously, the ``buildhistory`` class made one commit
3535 per subdirectory in the repository in order to make it easier to see
3536 the changes for a particular subdirectory. To view a particular
3537 change, specify that subdirectory as the last parameter on the
3538 ``git show`` or ``git diff`` commands.
3539
3540- The ``x86-base.inc`` file, which is included by all x86-based machine
3541 configurations, now sets ```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__
3542 using ``?=`` to "live" rather than appending with ``+=``. This change
3543 makes the default easier to override.
3544
3545- BitBake fires multiple "BuildStarted" events when multiconfig is
3546 enabled (one per configuration). For more information, see the
3547 "`Events <&YOCTO_DOCS_BB_URL;#events>`__" section in the BitBake User
3548 Manual.
3549
3550- By default, the ``security_flags.inc`` file sets a
3551 ```GCCPIE`` <#var-GCCPIE>`__ variable with an option to enable
3552 Position Independent Executables (PIE) within ``gcc``. Enabling PIE
3553 in the GNU C Compiler (GCC), makes Return Oriented Programming (ROP)
3554 attacks much more difficult to execute.
3555
3556- OE-Core now provides a ``bitbake-layers`` plugin that implements a
3557 "create-layer" subcommand. The implementation of this subcommand has
3558 resulted in the ``yocto-layer`` script being deprecated and will
3559 likely be removed in the next Yocto Project release.
3560
3561- The ``vmdk``, ``vdi``, and ``qcow2`` image file types are now used in
3562 conjunction with the "wic" image type through ``CONVERSION_CMD``.
3563 Consequently, the equivalent image types are now ``wic.vmdk``,
3564 ``wic.vdi``, and ``wic.qcow2``, respectively.
3565
3566- ``do_image_<type>[depends]`` has replaced ``IMAGE_DEPENDS_<type>``.
3567 If you have your own classes that implement custom image types, then
3568 you need to update them.
3569
3570- OpenSSL 1.1 has been introduced. However, the default is still 1.0.x
3571 through the ```PREFERRED_VERSION`` <#var-PREFERRED_VERSION>`__
3572 variable. This preference is set is due to the remaining
3573 compatibility issues with other software. The
3574 ```PROVIDES`` <#var-PROVIDES>`__ variable in the openssl 1.0 recipe
3575 now includes "openssl10" as a marker that can be used in
3576 ```DEPENDS`` <#var-DEPENDS>`__ within recipes that build software
3577 that still depend on OpenSSL 1.0.
3578
3579- To ensure consistent behavior, BitBake's "-r" and "-R" options (i.e.
3580 prefile and postfile), which are used to read or post-read additional
3581 configuration files from the command line, now only affect the
3582 current BitBake command. Before these BitBake changes, these options
3583 would "stick" for future executions.
3584
3585Moving to the Yocto Project 2.5 Release
3586=======================================
3587
3588This section provides migration information for moving to the Yocto
3589Project 2.5 Release from the prior release.
3590
3591.. _migration-2.5-packaging-changes:
3592
3593Packaging Changes
3594-----------------
3595
3596This section provides information about packaging changes that have
3597occurred:
3598
3599- *``bind-libs``:* The libraries packaged by the bind recipe are in a
3600 separate ``bind-libs`` package.
3601
3602- *``libfm-gtk``:* The ``libfm`` GTK+ bindings are split into a
3603 separate ``libfm-gtk`` package.
3604
3605- *``flex-libfl``:* The flex recipe splits out libfl into a separate
3606 ``flex-libfl`` package to avoid too many dependencies being pulled in
3607 where only the library is needed.
3608
3609- *``grub-efi``:* The ``grub-efi`` configuration is split into a
3610 separate ``grub-bootconf`` recipe. However, the dependency
3611 relationship from ``grub-efi`` is through a virtual/grub-bootconf
3612 provider making it possible to have your own recipe provide the
3613 dependency. Alternatively, you can use a BitBake append file to bring
3614 the configuration back into the ``grub-efi`` recipe.
3615
3616- *armv7a Legacy Package Feed Support:* Legacy support is removed for
3617 transitioning from ``armv7a`` to ``armv7a-vfp-neon`` in package
3618 feeds, which was previously enabled by setting
3619 ``PKGARCHCOMPAT_ARMV7A``. This transition occurred in 2011 and active
3620 package feeds should by now be updated to the new naming.
3621
3622.. _migration-2.5-removed-recipes:
3623
3624Removed Recipes
3625---------------
3626
3627The following recipes have been removed:
3628
3629- *``gcc``:* The version 6.4 recipes are replaced by 7.x.
3630
3631- *``gst-player``:* Renamed to ``gst-examples`` as per upstream.
3632
3633- *``hostap-utils``:* This software package is obsolete.
3634
3635- *``latencytop``:* This recipe is no longer maintained upstream. The
3636 last release was in 2009.
3637
3638- *``libpfm4``:* The only file that requires this recipe is
3639 ``oprofile``, which has been removed.
3640
3641- *``linux-yocto``:* The version 4.4, 4.9, and 4.10 recipes have been
3642 removed. Versions 4.12, 4.14, and 4.15 remain.
3643
3644- *``man``:* This recipe has been replaced by modern ``man-db``
3645
3646- *``mkelfimage``:* This tool has been removed in the upstream coreboot
3647 project, and is no longer needed with the removal of the ELF image
3648 type.
3649
3650- *``nativesdk-postinst-intercept``:* This recipe is not maintained.
3651
3652- *``neon``:* This software package is no longer maintained upstream
3653 and is no longer needed by anything in OpenEmbedded-Core.
3654
3655- *``oprofile``:* The functionality of this recipe is replaced by
3656 ``perf`` and keeping compatibility on an ongoing basis with ``musl``
3657 is difficult.
3658
3659- *``pax``:* This software package is obsolete.
3660
3661- *``stat``:* This software package is not maintained upstream.
3662 ``coreutils`` provides a modern stat binary.
3663
3664- *``zisofs-tools-native``:* This recipe is no longer needed because
3665 the compressed ISO image feature has been removed.
3666
3667.. _migration-2.5-scripts-and-tools-changes:
3668
3669Scripts and Tools Changes
3670-------------------------
3671
3672The following are changes to scripts and tools:
3673
3674- *``yocto-bsp``, ``yocto-kernel``, and ``yocto-layer``*: The
3675 ``yocto-bsp``, ``yocto-kernel``, and ``yocto-layer`` scripts
3676 previously shipped with poky but not in OpenEmbedded-Core have been
3677 removed. These scripts are not maintained and are outdated. In many
3678 cases, they are also limited in scope. The
3679 ``bitbake-layers create-layer`` command is a direct replacement for
3680 ``yocto-layer``. See the documentation to create a BSP or kernel
3681 recipe in the "`BSP Kernel Recipe
3682 Example <&YOCTO_DOCS_BSP_URL;#bsp-kernel-recipe-example>`__" section.
3683
3684- *``devtool finish``:* ``devtool finish`` now exits with an error if
3685 there are uncommitted changes or a rebase/am in progress in the
3686 recipe's source repository. If this error occurs, there might be
3687 uncommitted changes that will not be included in updates to the
3688 patches applied by the recipe. A -f/--force option is provided for
3689 situations that the uncommitted changes are inconsequential and you
3690 want to proceed regardless.
3691
3692- *``scripts/oe-setup-rpmrepo`` script:* The functionality of
3693 ``scripts/oe-setup-rpmrepo`` is replaced by
3694 ``bitbake package-index``.
3695
3696- *``scripts/test-dependencies.sh`` script:* The script is largely made
3697 obsolete by the recipe-specific sysroots functionality introduced in
3698 the previous release.
3699
3700.. _migration-2.5-bitbake-changes:
3701
3702BitBake Changes
3703---------------
3704
3705The following are BitBake changes:
3706
3707- The ``--runall`` option has changed. There are two different
3708 behaviors people might want:
3709
3710 - *Behavior A:* For a given target (or set of targets) look through
3711 the task graph and run task X only if it is present and will be
3712 built.
3713
3714 - *Behavior B:* For a given target (or set of targets) look through
3715 the task graph and run task X if any recipe in the taskgraph has
3716 such a target, even if it is not in the original task graph.
3717
3718 The ``--runall`` option now performs "Behavior B". Previously
3719 ``--runall`` behaved like "Behavior A". A ``--runonly`` option has
3720 been added to retain the ability to perform "Behavior A".
3721
3722- Several explicit "run this task for all recipes in the dependency
3723 tree" tasks have been removed (e.g. ``fetchall``, ``checkuriall``,
3724 and the ``*all`` tasks provided by the ``distrodata`` and
3725 ``archiver`` classes). There is a BitBake option to complete this for
3726 any arbitrary task. For example: bitbake <target> -c fetchall should
3727 now be replaced with: bitbake <target> --runall=fetch
3728
3729.. _migration-2.5-python-and-python3-changes:
3730
3731Python and Python 3 Changes
3732---------------------------
3733
3734The following are auto-packaging changes to Python and Python 3:
3735
3736The script-managed ``python-*-manifest.inc`` files that were previously
3737used to generate Python and Python 3 packages have been replaced with a
3738JSON-based file that is easier to read and maintain. A new task is
3739available for maintainers of the Python recipes to update the JSON file
3740when upgrading to new Python versions. You can now edit the file
3741directly instead of having to edit a script and run it to update the
3742file.
3743
3744One particular change to note is that the Python recipes no longer have
3745build-time provides for their packages. This assumes ``python-foo`` is
3746one of the packages provided by the Python recipe. You can no longer run
3747``bitbake python-foo`` or have a
3748```DEPENDS`` <&YOCTO_DOCS_REF_URL;#var-DEPENDS>`__ on ``python-foo``,
3749but doing either of the following causes the package to work as
3750expected: IMAGE_INSTALL_append = " python-foo" or RDEPENDS_${PN} =
3751"python-foo" The earlier build-time provides behavior was a quirk of the
3752way the Python manifest file was created. For more information on this
3753change please see `this
3754commit <http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=8d94b9db221d1def42f091b991903faa2d1651ce>`__.
3755
3756.. _migration-2.5-miscellaneous-changes:
3757
3758Miscellaneous Changes
3759---------------------
3760
3761The following are additional changes:
3762
3763- The ``kernel`` class supports building packages for multiple kernels.
3764 If your kernel recipe or ``.bbappend`` file mentions packaging at
3765 all, you should replace references to the kernel in package names
3766 with ``${KERNEL_PACKAGE_NAME}``. For example, if you disable
3767 automatic installation of the kernel image using
3768 ``RDEPENDS_kernel-base = ""`` you can avoid warnings using
3769 ``RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""`` instead.
3770
3771- The ``buildhistory`` class commits changes to the repository by
3772 default so you no longer need to set ``BUILDHISTORY_COMMIT = "1"``.
3773 If you want to disable commits you need to set
3774 ``BUILDHISTORY_COMMIT = "0"`` in your configuration.
3775
3776- The ``beaglebone`` reference machine has been renamed to
3777 ``beaglebone-yocto``. The ``beaglebone-yocto`` BSP is a reference
3778 implementation using only mainline components available in
3779 OpenEmbedded-Core and ``meta-yocto-bsp``, whereas Texas Instruments
3780 maintains a full-featured BSP in the ``meta-ti`` layer. This rename
3781 avoids the previous name clash that existed between the two BSPs.
3782
3783- The ``update-alternatives`` class no longer works with SysV ``init``
3784 scripts because this usage has been problematic. Also, the
3785 ``sysklogd`` recipe no longer uses ``update-alternatives`` because it
3786 is incompatible with other implementations.
3787
3788- By default, the ```cmake`` <#ref-classes-cmake>`__ class uses
3789 ``ninja`` instead of ``make`` for building. This improves build
3790 performance. If a recipe is broken with ``ninja``, then the recipe
3791 can set ``OECMAKE_GENERATOR = "Unix Makefiles"`` to change back to
3792 ``make``.
3793
3794- The previously deprecated ``base_*`` functions have been removed in
3795 favor of their replacements in ``meta/lib/oe`` and
3796 ``bitbake/lib/bb``. These are typically used from recipes and
3797 classes. Any references to the old functions must be updated. The
3798 following table shows the removed functions and their replacements:
3799 *Removed* *Replacement* ============================
3800 ============================ base_path_join() oe.path.join()
3801 base_path_relative() oe.path.relative() base_path_out()
3802 oe.path.format_display() base_read_file() oe.utils.read_file()
3803 base_ifelse() oe.utils.ifelse() base_conditional()
3804 oe.utils.conditional() base_less_or_equal() oe.utils.less_or_equal()
3805 base_version_less_or_equal() oe.utils.version_less_or_equal()
3806 base_contains() bb.utils.contains() base_both_contain()
3807 oe.utils.both_contain() base_prune_suffix() oe.utils.prune_suffix()
3808 oe_filter() oe.utils.str_filter() oe_filter_out()
3809 oe.utils.str_filter_out() (or use the \_remove operator).
3810
3811- Using ``exit 1`` to explicitly defer a postinstall script until first
3812 boot is now deprecated since it is not an obvious mechanism and can
3813 mask actual errors. If you want to explicitly defer a postinstall to
3814 first boot on the target rather than at ``rootfs`` creation time, use
3815 ``pkg_postinst_ontarget()`` or call
3816 ``postinst_intercept delay_to_first_boot`` from ``pkg_postinst()``.
3817 Any failure of a ``pkg_postinst()`` script (including ``exit 1``)
3818 will trigger a warning during ``do_rootfs``.
3819
3820 For more information, see the "`Post-Installation
3821 Scripts <&YOCTO_DOCS_DEV_URL;#new-recipe-post-installation-scripts>`__"
3822 section in the Yocto Project Development Tasks Manual.
3823
3824- The ``elf`` image type has been removed. This image type was removed
3825 because the ``mkelfimage`` tool that was required to create it is no
3826 longer provided by coreboot upstream and required updating every time
3827 ``binutils`` updated.
3828
3829- Support for .iso image compression (previously enabled through
3830 ``COMPRESSISO = "1"``) has been removed. The userspace tools
3831 (``zisofs-tools``) are unmaintained and ``squashfs`` provides better
3832 performance and compression. In order to build a live image with
3833 squashfs+lz4 compression enabled you should now set
3834 ``LIVE_ROOTFS_TYPE = "squashfs-lz4"`` and ensure that ``live`` is in
3835 ``IMAGE_FSTYPES``.
3836
3837- Recipes with an unconditional dependency on ``libpam`` are only
3838 buildable with ``pam`` in ``DISTRO_FEATURES``. If the dependency is
3839 truly optional then it is recommended that the dependency be
3840 conditional upon ``pam`` being in ``DISTRO_FEATURES``.
3841
3842- For EFI-based machines, the bootloader (``grub-efi`` by default) is
3843 installed into the image at /boot. Wic can be used to split the
3844 bootloader into separate boot and rootfs partitions if necessary.
3845
3846- Patches whose context does not match exactly (i.e. where patch
3847 reports "fuzz" when applying) will generate a warning. For an example
3848 of this see `this
3849 commit <http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=cc97bc08125b63821ce3f616771830f77c456f57>`__.
3850
3851- Layers are expected to set ``LAYERSERIES_COMPAT_layername`` to match
3852 the version(s) of OpenEmbedded-Core they are compatible with. This is
3853 specified as codenames using spaces to separate multiple values (e.g.
3854 "rocko sumo"). If a layer does not set
3855 ``LAYERSERIES_COMPAT_layername``, a warning will is shown. If a layer
3856 sets a value that does not include the current version ("sumo" for
3857 the 2.5 release), then an error will be produced.
3858
3859- The ``TZ`` environment variable is set to "UTC" within the build
3860 environment in order to fix reproducibility problems in some recipes.
3861
3862Moving to the Yocto Project 2.6 Release
3863=======================================
3864
3865This section provides migration information for moving to the Yocto
3866Project 2.6 Release from the prior release.
3867
3868.. _migration-2.6-gcc-changes:
3869
3870GCC 8.2 is Now Used by Default
3871------------------------------
3872
3873The GNU Compiler Collection version 8.2 is now used by default for
3874compilation. For more information on what has changed in the GCC 8.x
3875release, see ` <https://gcc.gnu.org/gcc-8/changes.html>`__.
3876
3877If you still need to compile with version 7.x, GCC 7.3 is also provided.
3878You can select this version by setting the and can be selected by
3879setting the ```GCCVERSION`` <#var-GCCVERSION>`__ variable to "7.%" in
3880your configuration.
3881
3882.. _migration-2.6-removed-recipes:
3883
3884Removed Recipes
3885---------------
3886
3887The following recipes have been removed: *``beecrypt``:* No longer
3888needed since moving to RPM 4. *``bigreqsproto``:* Replaced by
3889``xorgproto``. *``calibrateproto``:* Removed in favor of ``xinput``.
3890*``compositeproto``:* Replaced by ``xorgproto``. *``damageproto``:*
3891Replaced by ``xorgproto``. *``dmxproto``:* Replaced by ``xorgproto``.
3892*``dri2proto``:* Replaced by ``xorgproto``. *``dri3proto``:* Replaced by
3893``xorgproto``. *``eee-acpi-scripts``:* Became obsolete.
3894*``fixesproto``:* Replaced by ``xorgproto``. *``fontsproto``:* Replaced
3895by ``xorgproto``. *``fstests``:* Became obsolete. *``gccmakedep``:* No
3896longer used. *``glproto``:* Replaced by ``xorgproto``.
3897*``gnome-desktop3``:* No longer needed. This recipe has moved to
3898``meta-oe``. *``icon-naming-utils``:* No longer used since the Sato
3899theme was removed in 2016. *``inputproto``:* Replaced by ``xorgproto``.
3900*``kbproto``:* Replaced by ``xorgproto``. *``libusb-compat``:* Became
3901obsolete. *``libuser``:* Became obsolete. *``libnfsidmap``:* No longer
3902an external requirement since ``nfs-utils`` 2.2.1. ``libnfsidmap`` is
3903now integrated. *``libxcalibrate``:* No longer needed with ``xinput``
3904*``mktemp``:* Became obsolete. The ``mktemp`` command is provided by
3905both ``busybox`` and ``coreutils``. *``ossp-uuid``:* Is not being
3906maintained and has mostly been replaced by ``uuid.h`` in ``util-linux``.
3907*``pax-utils``:* No longer needed. Previous QA tests that did use this
3908recipe are now done at build time. *``pcmciautils``:* Became obsolete.
3909*``pixz``:* No longer needed. ``xz`` now supports multi-threaded
3910compression. *``presentproto``:* Replaced by ``xorgproto``.
3911*``randrproto``:* Replaced by ``xorgproto``. *``recordproto``:* Replaced
3912by ``xorgproto``. *``renderproto``:* Replaced by ``xorgproto``.
3913*``resourceproto``:* Replaced by ``xorgproto``. *``scrnsaverproto``:*
3914Replaced by ``xorgproto``. *``trace-cmd``:* Became obsolete. ``perf``
3915replaced this recipe's functionally. *``videoproto``:* Replaced by
3916``xorgproto``. *``wireless-tools``:* Became obsolete. Superseded by
3917``iw``. *``xcmiscproto``:* Replaced by ``xorgproto``. *``xextproto``:*
3918Replaced by ``xorgproto``. *``xf86dgaproto``:* Replaced by
3919``xorgproto``. *``xf86driproto``:* Replaced by ``xorgproto``.
3920*``xf86miscproto``:* Replaced by ``xorgproto``. *``xf86-video-omapfb``:*
3921Became obsolete. Use kernel modesetting driver instead.
3922*``xf86-video-omap``:* Became obsolete. Use kernel modesetting driver
3923instead. *``xf86vidmodeproto``:* Replaced by ``xorgproto``.
3924*``xineramaproto``:* Replaced by ``xorgproto``. *``xproto``:* Replaced
3925by ``xorgproto``. *``yasm``:* No longer needed since previous usages are
3926now satisfied by ``nasm``.
3927
3928.. _migration-2.6-packaging-changes:
3929
3930Packaging Changes
3931-----------------
3932
3933The following packaging changes have been made:
3934
3935- *``cmake``:* ``cmake.m4`` and ``toolchain`` files have been moved to
3936 the main package.
3937
3938- *``iptables``:* The ``iptables`` modules have been split into
3939 separate packages.
3940
3941- *``alsa-lib``:* ``libasound`` is now in the main ``alsa-lib`` package
3942 instead of ``libasound``.
3943
3944- *``glibc``:* ``libnss-db`` is now in its own package along with a
3945 ``/var/db/makedbs.sh`` script to update databases.
3946
3947- *``python`` and ``python3``:* The main package has been removed from
3948 the recipe. You must install specific packages or ``python-modules``
3949 / ``python3-modules`` for everything.
3950
3951- *``systemtap``:* Moved ``systemtap-exporter`` into its own package.
3952
3953.. _migration-2.6-xorg-protocol-dependencies:
3954
3955XOrg Protocol dependencies
3956--------------------------
3957
3958The "*proto" upstream repositories have been combined into one
3959"xorgproto" repository. Thus, the corresponding recipes have also been
3960combined into a single ``xorgproto`` recipe. Any recipes that depend
3961upon the older ``*proto`` recipes need to be changed to depend on the
3962newer ``xorgproto`` recipe instead.
3963
3964For names of recipes removed because of this repository change, see the
3965`Removed Recipes <#migration-2.6-removed-recipes>`__ section.
3966
3967.. _migration-2.6-distutils-distutils3-fetching-dependencies:
3968
3969``distutils`` and ``distutils3`` Now Prevent Fetching Dependencies During the ``do_configure`` Task
3970---------------------------------------------------------------------------------------------------
3971
3972Previously, it was possible for Python recipes that inherited the
3973```distutils`` <#ref-classes-distutils>`__ and
3974```distutils3`` <#ref-classes-distutils3>`__ classes to fetch code
3975during the ```do_configure`` <#ref-tasks-configure>`__ task to satisfy
3976dependencies mentioned in ``setup.py`` if those dependencies were not
3977provided in the sysroot (i.e. recipes providing the dependencies were
3978missing from ```DEPENDS`` <#var-DEPENDS>`__).
3979
3980.. note::
3981
3982 This change affects classes beyond just the two mentioned (i.e.
3983 distutils
3984 and
3985 distutils3
3986 ). Any recipe that inherits
3987 distutils\*
3988 classes are affected. For example, the
3989 setuptools
3990 and
3991 setuptools3
3992 recipes are affected since they inherit the
3993 distutils\*
3994 classes.
3995
3996Fetching these types of dependencies that are not provided in the
3997sysroot negatively affects the ability to reproduce builds. This type of
3998fetching is now explicitly disabled. Consequently, any missing
3999dependencies in Python recipes that use these classes now result in an
4000error during the ``do_configure`` task.
4001
4002.. _migration-2.6-linux-yocto-configuration-audit-issues-now-correctly-reported:
4003
4004``linux-yocto`` Configuration Audit Issues Now Correctly Reported
4005-----------------------------------------------------------------
4006
4007Due to a bug, the kernel configuration audit functionality was not
4008writing out any resulting warnings during the build. This issue is now
4009corrected. You might notice these warnings now if you have a custom
4010kernel configuration with a ``linux-yocto`` style kernel recipe.
4011
4012.. _migration-2.6-image-kernel-artifact-naming-changes:
4013
4014Image/Kernel Artifact Naming Changes
4015------------------------------------
4016
4017The following changes have been made:
4018
4019- Name variables (e.g. ```IMAGE_NAME`` <#var-IMAGE_NAME>`__) use a new
4020 ``IMAGE_VERSION_SUFFIX`` variable instead of
4021 ```DATETIME`` <#var-DATETIME>`__. Using ``IMAGE_VERSION_SUFFIX``
4022 allows easier and more direct changes.
4023
4024 The ``IMAGE_VERSION_SUFFIX`` variable is set in the ``bitbake.conf``
4025 configuration file as follows: IMAGE_VERSION_SUFFIX = "-${DATETIME}"
4026
4027- Several variables have changed names for consistency: Old Variable
4028 Name New Variable Name
4029 ========================================================
4030 KERNEL_IMAGE_BASE_NAME `KERNEL_IMAGE_NAME <#var-KERNEL_IMAGE_NAME>`__
4031 KERNEL_IMAGE_SYMLINK_NAME
4032 `KERNEL_IMAGE_LINK_NAME <#var-KERNEL_IMAGE_LINK_NAME>`__
4033 MODULE_TARBALL_BASE_NAME
4034 `MODULE_TARBALL_NAME <#var-MODULE_TARBALL_NAME>`__
4035 MODULE_TARBALL_SYMLINK_NAME
4036 `MODULE_TARBALL_LINK_NAME <#var-MODULE_TARBALL_LINK_NAME>`__
4037 INITRAMFS_BASE_NAME `INITRAMFS_NAME <#var-INITRAMFS_NAME>`__
4038
4039- The ``MODULE_IMAGE_BASE_NAME`` variable has been removed. The module
4040 tarball name is now controlled directly with the
4041 ```MODULE_TARBALL_NAME`` <#var-MODULE_TARBALL_NAME>`__ variable.
4042
4043- The ```KERNEL_DTB_NAME`` <#var-KERNEL_DTB_NAME>`__ and
4044 ```KERNEL_DTB_LINK_NAME`` <#var-KERNEL_DTB_LINK_NAME>`__ variables
4045 have been introduced to control kernel Device Tree Binary (DTB)
4046 artifact names instead of mangling ``KERNEL_IMAGE_*`` variables.
4047
4048- The ```KERNEL_FIT_NAME`` <#var-KERNEL_FIT_NAME>`__ and
4049 ```KERNEL_FIT_LINK_NAME`` <#var-KERNEL_FIT_LINK_NAME>`__ variables
4050 have been introduced to specify the name of flattened image tree
4051 (FIT) kernel images similar to other deployed artifacts.
4052
4053- The ```MODULE_TARBALL_NAME`` <#var-MODULE_TARBALL_NAME>`__ and
4054 ```MODULE_TARBALL_LINK_NAME`` <#var-MODULE_TARBALL_LINK_NAME>`__
4055 variable values no longer include the "module-" prefix or ".tgz"
4056 suffix. These parts are now hardcoded so that the values are
4057 consistent with other artifact naming variables.
4058
4059- Added the ```INITRAMFS_LINK_NAME`` <#var-INITRAMFS_LINK_NAME>`__
4060 variable so that the symlink can be controlled similarly to other
4061 artifact types.
4062
4063- ```INITRAMFS_NAME`` <#var-INITRAMFS_NAME>`__ now uses
4064 "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" instead
4065 of "${PV}-${PR}-${MACHINE}-${DATETIME}", which makes it consistent
4066 with other variables.
4067
4068.. _migration-2.6-serial-console-deprecated:
4069
4070``SERIAL_CONSOLE`` Deprecated
4071-----------------------------
4072
4073The ```SERIAL_CONSOLE`` <#var-SERIAL_CONSOLE>`__ variable has been
4074functionally replaced by the
4075```SERIAL_CONSOLES`` <#var-SERIAL_CONSOLES>`__ variable for some time.
4076With the Yocto Project 2.6 release, ``SERIAL_CONSOLE`` has been
4077officially deprecated.
4078
4079``SERIAL_CONSOLE`` will continue to work as before for the 2.6 release.
4080However, for the sake of future compatibility, it is recommended that
4081you replace all instances of ``SERIAL_CONSOLE`` with
4082``SERIAL_CONSOLES``.
4083
4084.. note::
4085
4086 The only difference in usage is that
4087 SERIAL_CONSOLES
4088 expects entries to be separated using semicolons as compared to
4089 SERIAL_CONSOLE
4090 , which expects spaces.
4091
4092.. _migration-2.6-poky-sets-unknown-configure-option-to-qa-error:
4093
4094Configure Script Reports Unknown Options as Errors
4095--------------------------------------------------
4096
4097If the configure script reports an unknown option, this now triggers a
4098QA error instead of a warning. Any recipes that previously got away with
4099specifying such unknown options now need to be fixed.
4100
4101.. _migration-2.6-override-changes:
4102
4103Override Changes
4104----------------
4105
4106The following changes have occurred:
4107
4108- *The ``virtclass-native`` and ``virtclass-nativesdk`` Overrides Have
4109 Been Removed:* The ``virtclass-native`` and ``virtclass-nativesdk``
4110 overrides have been deprecated since 2012 in favor of
4111 ``class-native`` and ``class-nativesdk``, respectively. Both
4112 ``virtclass-native`` and ``virtclass-nativesdk`` are now dropped.
4113
4114 .. note::
4115
4116 The
4117 virtclass-multilib-
4118 overrides for multilib are still valid.
4119
4120- *The ``forcevariable`` Override Now Has a Higher Priority Than
4121 ``libc`` Overrides:* The ``forcevariable`` override is documented to
4122 be the highest priority override. However, due to a long-standing
4123 quirk of how ```OVERRIDES`` <#var-OVERRIDES>`__ is set, the ``libc``
4124 overrides (e.g. ``libc-glibc``, ``libc-musl``, and so forth)
4125 erroneously had a higher priority. This issue is now corrected.
4126
4127 It is likely this change will not cause any problems. However, it is
4128 possible with some unusual configurations that you might see a change
4129 in behavior if you were relying on the previous behavior. Be sure to
4130 check how you use ``forcevariable`` and ``libc-*`` overrides in your
4131 custom layers and configuration files to ensure they make sense.
4132
4133- *The ``build-${BUILD_OS}`` Override Has Been Removed:* The
4134 ``build-${BUILD_OS}``, which is typically ``build-linux``, override
4135 has been removed because building on a host operating system other
4136 than a recent version of Linux is neither supported nor recommended.
4137 Dropping the override avoids giving the impression that other host
4138 operating systems might be supported.
4139
4140- The "_remove" operator now preserves whitespace. Consequently, when
4141 specifying list items to remove, be aware that leading and trailing
4142 whitespace resulting from the removal is retained.
4143
4144 See the "`Removal (Override Style
4145 Syntax) <&YOCTO_DOCS_BB_URL;#removing-override-style-syntax>`__"
4146 section in the BitBake User Manual for a detailed example.
4147
4148.. _migration-2.6-systemd-configuration-now-split-out-to-system-conf:
4149
4150``systemd`` Configuration is Now Split Into ``systemd-conf``
4151------------------------------------------------------------
4152
4153The configuration for the ``systemd`` recipe has been moved into a
4154``system-conf`` recipe. Moving this configuration to a separate recipe
4155avoids the ``systemd`` recipe from becoming machine-specific for cases
4156where machine-specific configurations need to be applied (e.g. for
4157``qemu*`` machines).
4158
4159Currently, the new recipe packages the following files:
4160${sysconfdir}/machine-id ${sysconfdir}/systemd/coredump.conf
4161${sysconfdir}/systemd/journald.conf ${sysconfdir}/systemd/logind.conf
4162${sysconfdir}/systemd/system.conf ${sysconfdir}/systemd/user.conf If you
4163previously used bbappend files to append the ``systemd`` recipe to
4164change any of the listed files, you must do so for the ``systemd-conf``
4165recipe instead.
4166
4167.. _migration-2.6-automatic-testing-changes:
4168
4169Automatic Testing Changes
4170-------------------------
4171
4172This section provides information about automatic testing changes:
4173
4174- *``TEST_IMAGE`` Variable Removed:* Prior to this release, you set the
4175 ``TEST_IMAGE`` variable to "1" to enable automatic testing for
4176 successfully built images. The ``TEST_IMAGE`` variable no longer
4177 exists and has been replaced by the
4178 ```TESTIMAGE_AUTO`` <#var-TESTIMAGE_AUTO>`__ variable.
4179
4180- *Inheriting the ``testimage`` and ``testsdk`` Classes:* Best
4181 practices now dictate that you use the
4182 ```IMAGE_CLASSES`` <#var-IMAGE_CLASSES>`__ variable rather than the
4183 ```INHERIT`` <#var-INHERIT>`__ variable when you inherit the
4184 ```testimage`` <#ref-classes-testimage*>`__ and
4185 ```testsdk`` <#ref-classes-testsdk>`__ classes used for automatic
4186 testing.
4187
4188.. _migration-2.6-openssl-changes:
4189
4190OpenSSL Changes
4191---------------
4192
4193`OpenSSL <https://www.openssl.org/>`__ has been upgraded from 1.0 to
41941.1. By default, this upgrade could cause problems for recipes that have
4195both versions in their dependency chains. The problem is that both
4196versions cannot be installed together at build time.
4197
4198.. note::
4199
4200 It is possible to have both versions of the library at runtime.
4201
4202.. _migration-2.6-bitbake-changes:
4203
4204BitBake Changes
4205---------------
4206
4207The server logfile ``bitbake-cookerdaemon.log`` is now always placed in
4208the `Build Directory <#build-directory>`__ instead of the current
4209directory.
4210
4211.. _migration-2.6-security-changes:
4212
4213Security Changes
4214----------------
4215
4216The Poky distribution now uses security compiler flags by default.
4217Inclusion of these flags could cause new failures due to stricter
4218checking for various potential security issues in code.
4219
4220.. _migration-2.6-post-installation-changes:
4221
4222Post Installation Changes
4223-------------------------
4224
4225You must explicitly mark post installs to defer to the target. If you
4226want to explicitly defer a postinstall to first boot on the target
4227rather than at rootfs creation time, use ``pkg_postinst_ontarget()`` or
4228call ``postinst_intercept delay_to_first_boot`` from ``pkg_postinst()``.
4229Any failure of a ``pkg_postinst()`` script (including exit 1) triggers
4230an error during the ```do_rootfs`` <#ref-tasks-rootfs>`__ task.
4231
4232For more information on post-installation behavior, see the
4233"`Post-Installation
4234Scripts <&YOCTO_DOCS_DEV_URL;#new-recipe-post-installation-scripts>`__"
4235section in the Yocto Project Development Tasks Manual.
4236
4237.. _migration-2.6-python-3-profile-guided-optimizations:
4238
4239Python 3 Profile-Guided Optimization
4240------------------------------------
4241
4242The ``python3`` recipe now enables profile-guided optimization. Using
4243this optimization requires a little extra build time in exchange for
4244improved performance on the target at runtime. Additionally, the
4245optimization is only enabled if the current
4246```MACHINE`` <#var-MACHINE>`__ has support for user-mode emulation in
4247QEMU (i.e. "qemu-usermode" is in
4248```MACHINE_FEATURES`` <#var-MACHINE_FEATURES>`__, which it is by
4249default).
4250
4251If you wish to disable Python profile-guided optimization regardless of
4252the value of ``MACHINE_FEATURES``, then ensure that
4253```PACKAGECONFIG`` <#var-PACKAGECONFIG>`__ for the ``python3`` recipe
4254does not contain "pgo". You could accomplish the latter using the
4255following at the configuration level: PACKAGECONFIG_remove_pn-python3 =
4256"pgo" Alternatively, you can set ``PACKAGECONFIG`` using an append file
4257for the ``python3`` recipe.
4258
4259.. _migration-2.6-miscellaneous-changes:
4260
4261Miscellaneous Changes
4262---------------------
4263
4264The following miscellaneous changes occurred:
4265
4266- Default to using the Thumb-2 instruction set for armv7a and above. If
4267 you have any custom recipes that build software that needs to be
4268 built with the ARM instruction set, change the recipe to set the
4269 instruction set as follows: ARM_INSTRUCTION_SET = "arm"
4270
4271- ``run-postinsts`` no longer uses ``/etc/*-postinsts`` for
4272 ``dpkg/opkg`` in favor of built-in postinst support. RPM behavior
4273 remains unchanged.
4274
4275- The ``NOISO`` and ``NOHDD`` variables are no longer used. You now
4276 control building ``*.iso`` and ``*.hddimg`` image types directly by
4277 using the ```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__ variable.
4278
4279- The ``scripts/contrib/mkefidisk.sh`` has been removed in favor of
4280 Wic.
4281
4282- ``kernel-modules`` has been removed from
4283 ```RRECOMMENDS`` <#var-RRECOMMENDS>`__ for ``qemumips`` and
4284 ``qemumips64`` machines. Removal also impacts the ``x86-base.inc``
4285 file.
4286
4287 .. note::
4288
4289 genericx86
4290 and
4291 genericx86-64
4292 retain
4293 kernel-modules
4294 as part of the
4295 RRECOMMENDS
4296 variable setting.
4297
4298- The ``LGPLv2_WHITELIST_GPL-3.0`` variable has been removed. If you
4299 are setting this variable in your configuration, set or append it to
4300 the ``WHITELIST_GPL-3.0`` variable instead.
4301
4302- ``${ASNEEDED}`` is now included in the
4303 ```TARGET_LDFLAGS`` <#var-TARGET_LDFLAGS>`__ variable directly. The
4304 remaining definitions from ``meta/conf/distro/include/as-needed.inc``
4305 have been moved to corresponding recipes.
4306
4307- Support for DSA host keys has been dropped from the OpenSSH recipes.
4308 If you are still using DSA keys, you must switch over to a more
4309 secure algorithm as recommended by OpenSSH upstream.
4310
4311- The ``dhcp`` recipe now uses the ``dhcpd6.conf`` configuration file
4312 in ``dhcpd6.service`` for IPv6 DHCP rather than re-using
4313 ``dhcpd.conf``, which is now reserved for IPv4.
4314
4315Moving to the Yocto Project 2.7 Release
4316=======================================
4317
4318This section provides migration information for moving to the Yocto
4319Project 2.7 Release from the prior release.
4320
4321.. _migration-2.7-bitbake-changes:
4322
4323BitBake Changes
4324---------------
4325
4326The following changes have been made to BitBake:
4327
4328- BitBake now checks anonymous Python functions and pure Python
4329 functions (e.g. ``def funcname:``) in the metadata for tab
4330 indentation. If found, BitBake produces a warning.
4331
4332- Bitbake now checks
4333 ```BBFILE_COLLECTIONS`` <#var-BBFILE_COLLECTIONS>`__ for duplicate
4334 entries and triggers an error if any are found.
4335
4336.. _migration-2.7-eclipse-support-dropped:
4337
4338Eclipse Support Removed
4339-----------------------
4340
4341Support for the Eclipse IDE has been removed. Support continues for
4342those releases prior to 2.7 that did include support. The 2.7 release
4343does not include the Eclipse Yocto plugin.
4344
4345.. _migration-2.7-qemu-native-splits-system-and-user-mode-parts:
4346
4347``qemu-native`` Splits the System and User-Mode Parts
4348-----------------------------------------------------
4349
4350The system and user-mode parts of ``qemu-native`` are now split.
4351``qemu-native`` provides the user-mode components and
4352``qemu-system-native`` provides the system components. If you have
4353recipes that depend on QEMU's system emulation functionality at build
4354time, they should now depend upon ``qemu-system-native`` instead of
4355``qemu-native``.
4356
4357.. _migration-2.7-upstream-tracking.inc-removed:
4358
4359The ``upstream-tracking.inc`` File Has Been Removed
4360---------------------------------------------------
4361
4362The previously deprecated ``upstream-tracking.inc`` file is now removed.
4363Any ``UPSTREAM_TRACKING*`` variables are now set in the corresponding
4364recipes instead.
4365
4366Remove any references you have to the ``upstream-tracking.inc`` file in
4367your configuration.
4368
4369.. _migration-2.7-distro-features-libc-removed:
4370
4371The ``DISTRO_FEATURES_LIBC`` Variable Has Been Removed
4372------------------------------------------------------
4373
4374The ``DISTRO_FEATURES_LIBC`` variable is no longer used. The ability to
4375configure glibc using kconfig has been removed for quite some time
4376making the ``libc-*`` features set no longer effective.
4377
4378Remove any references you have to ``DISTRO_FEATURES_LIBC`` in your own
4379layers.
4380
4381.. _migration-2.7-license-values:
4382
4383License Value Corrections
4384-------------------------
4385
4386The following corrections have been made to the
4387```LICENSE`` <#var-LICENSE>`__ values set by recipes: *socat*: Corrected
4388``LICENSE`` to be "GPLv2" rather than "GPLv2+". *libgfortran*: Set
4389license to "GPL-3.0-with-GCC-exception". *elfutils*: Removed
4390"Elfutils-Exception" and set to "GPLv2" for shared libraries
4391
4392.. _migration-2.7-packaging-changes:
4393
4394Packaging Changes
4395-----------------
4396
4397This section provides information about packaging changes.
4398
4399- ``bind``: The ``nsupdate`` binary has been moved to the
4400 ``bind-utils`` package.
4401
4402- Debug split: The default debug split has been changed to create
4403 separate source packages (i.e. package_name\ ``-dbg`` and
4404 package_name\ ``-src``). If you are currently using ``dbg-pkgs`` in
4405 ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__ to bring in debug
4406 symbols and you still need the sources, you must now also add
4407 ``src-pkgs`` to ``IMAGE_FEATURES``. Source packages remain in the
4408 target portion of the SDK by default, unless you have set your own
4409 value for ```SDKIMAGE_FEATURES`` <#var-SDKIMAGE_FEATURES>`__ that
4410 does not include ``src-pkgs``.
4411
4412- Mount all using ``util-linux``: ``/etc/default/mountall`` has moved
4413 into the -mount sub-package.
4414
4415- Splitting binaries using ``util-linux``: ``util-linux`` now splits
4416 each binary into its own package for fine-grained control. The main
4417 ``util-linux`` package pulls in the individual binary packages using
4418 the ```RRECOMMENDS`` <#var-RRECOMMENDS>`__ and
4419 ```RDEPENDS`` <#var-RDEPENDS>`__ variables. As a result, existing
4420 images should not see any changes assuming
4421 ```NO_RECOMMENDATIONS`` <#var-NO_RECOMMENDATIONS>`__ is not set.
4422
4423- ``netbase/base-files``: ``/etc/hosts`` has moved from ``netbase`` to
4424 ``base-files``.
4425
4426- ``tzdata``: The main package has been converted to an empty meta
4427 package that pulls in all ``tzdata`` packages by default.
4428
4429- ``lrzsz``: This package has been removed from
4430 ``packagegroup-self-hosted`` and
4431 ``packagegroup-core-tools-testapps``. The X/Y/ZModem support is less
4432 likely to be needed on modern systems. If you are relying on these
4433 packagegroups to include the ``lrzsz`` package in your image, you now
4434 need to explicitly add the package.
4435
4436.. _migration-2.7-removed-recipes:
4437
4438Removed Recipes
4439---------------
4440
4441The following recipes have been removed: *gcc*: Drop version 7.3
4442recipes. Version 8.3 now remains. *linux-yocto*: Drop versions 4.14 and
44434.18 recipes. Versions 4.19 and 5.0 remain. *go*: Drop version 1.9
4444recipes. Versions 1.11 and 1.12 remain. *xvideo-tests*: Became obsolete.
4445*libart-lgpl*: Became obsolete. *gtk-icon-utils-native*: These tools are
4446now provided by gtk+3-native *gcc-cross-initial*: No longer needed.
4447gcc-cross/gcc-crosssdk is now used instead. *gcc-crosssdk-initial*: No
4448longer needed. gcc-cross/gcc-crosssdk is now used instead.
4449*glibc-initial*: Removed because the benefits of having it for
4450site_config are currently outweighed by the cost of building the recipe.
4451
4452.. _migration-2.7-removed-classes:
4453
4454Removed Classes
4455---------------
4456
4457The following classes have been removed: *distutils-tools*: This class
4458was never used. *bugzilla.bbclass*: Became obsolete. *distrodata*: This
4459functionally has been replaced by a more modern tinfoil-based
4460implementation.
4461
4462.. _migration-2.7-miscellaneous-changes:
4463
4464Miscellaneous Changes
4465---------------------
4466
4467The following miscellaneous changes occurred:
4468
4469- The ``distro`` subdirectory of the Poky repository has been removed
4470 from the top-level ``scripts`` directory.
4471
4472- Perl now builds for the target using
4473 ```perl-cross`` <http://arsv.github.io/perl-cross/>`__ for better
4474 maintainability and improved build performance. This change should
4475 not present any problems unless you have heavily customized your Perl
4476 recipe.
4477
4478- ``arm-tunes``: Removed the "-march" option if mcpu is already added.
4479
4480- ``update-alternatives``: Convert file renames to
4481 ```PACKAGE_PREPROCESS_FUNCS`` <#var-PACKAGE_PREPROCESS_FUNCS>`__
4482
4483- ``base/pixbufcache``: Obsolete ``sstatecompletions`` code has been
4484 removed.
4485
4486- ```native`` <#ref-classes-native>`__ class:
4487 ```RDEPENDS`` <#var-RDEPENDS>`__ handling has been enabled.
4488
4489- ``inetutils``: This recipe has rsh disabled.
4490
4491Moving to the Yocto Project 3.0 Release
4492=======================================
4493
4494This section provides migration information for moving to the Yocto
4495Project 3.0 Release from the prior release.
4496
4497.. _migration-3.0-init-system-selection:
4498
4499Init System Selection
4500---------------------
4501
4502Changing the init system manager previously required setting a number of
4503different variables. You can now change the manager by setting the
4504``INIT_MANAGER`` variable and the corresponding include files (i.e.
4505``conf/distro/include/init-manager-*.conf``). Include files are provided
4506for four values: "none", "sysvinit", "systemd", and "mdev-busybox". The
4507default value, "none", for ``INIT_MANAGER`` should allow your current
4508settings to continue working. However, it is advisable to explicitly set
4509``INIT_MANAGER``.
4510
4511.. _migration-3.0-lsb-support-removed:
4512
4513LSB Support Removed
4514-------------------
4515
4516Linux Standard Base (LSB) as a standard is not current, and is not well
4517suited for embedded applications. Support can be continued in a separate
4518layer if needed. However, presently LSB support has been removed from
4519the core.
4520
4521As a result of this change, the ``poky-lsb`` derivative distribution
4522configuration that was also used for testing alternative configurations
4523has been replaced with a ``poky-altcfg`` distribution that has LSB parts
4524removed.
4525
4526.. _migration-3.0-removed-recipes:
4527
4528Removed Recipes
4529---------------
4530
4531The following recipes have been removed.
4532
4533- ``core-image-lsb-dev``: Part of removed LSB support.
4534
4535- ``core-image-lsb``: Part of removed LSB support.
4536
4537- ``core-image-lsb-sdk``: Part of removed LSB support.
4538
4539- ``cve-check-tool``: Functionally replaced by the ``cve-update-db``
4540 recipe and ``cve-check`` class.
4541
4542- ``eglinfo``: No longer maintained. ``eglinfo`` from ``mesa-demos`` is
4543 an adequate and maintained alternative.
4544
4545- ``gcc-8.3``: Version 8.3 removed. Replaced by 9.2.
4546
4547- ``gnome-themes-standard``: Only needed by gtk+ 2.x, which has been
4548 removed.
4549
4550- ``gtk+``: GTK+ 2 is obsolete and has been replaced by gtk+3.
4551
4552- ``irda-utils``: Has become obsolete. IrDA support has been removed
4553 from the Linux kernel in version 4.17 and later.
4554
4555- ``libnewt-python``: ``libnewt`` Python support merged into main
4556 ``libnewt`` recipe.
4557
4558- ``libsdl``: Replaced by newer ``libsdl2``.
4559
4560- ``libx11-diet``: Became obsolete.
4561
4562- ``libxx86dga``: Removed obsolete client library.
4563
4564- ``libxx86misc``: Removed. Library is redundant.
4565
4566- ``linux-yocto``: Version 5.0 removed, which is now redundant (5.2 /
4567 4.19 present).
4568
4569- ``lsbinitscripts``: Part of removed LSB support.
4570
4571- ``lsb``: Part of removed LSB support.
4572
4573- ``lsbtest``: Part of removed LSB support.
4574
4575- ``openssl10``: Replaced by newer ``openssl`` version 1.1.
4576
4577- ``packagegroup-core-lsb``: Part of removed LSB support.
4578
4579- ``python-nose``: Removed the Python 2.x version of the recipe.
4580
4581- ``python-numpy``: Removed the Python 2.x version of the recipe.
4582
4583- ``python-scons``: Removed the Python 2.x version of the recipe.
4584
4585- ``source-highlight``: No longer needed.
4586
4587- ``stress``: Replaced by ``stress-ng``.
4588
4589- ``vulkan``: Split into ``vulkan-loader``, ``vulkan-headers``, and
4590 ``vulkan-tools``.
4591
4592- ``weston-conf``: Functionality moved to ``weston-init``.
4593
4594.. _migration-3.0-packaging-changes:
4595
4596Packaging Changes
4597-----------------
4598
4599The following packaging changes have occurred.
4600
4601- The `Epiphany <https://en.wikipedia.org/wiki/GNOME_Web>`__ browser
4602 has been dropped from ``packagegroup-self-hosted`` as it has not been
4603 needed inside ``build-appliance-image`` for quite some time and was
4604 causing resource problems.
4605
4606- ``libcap-ng`` Python support has been moved to a separate
4607 ``libcap-ng-python`` recipe to streamline the build process when the
4608 Python bindings are not needed.
4609
4610- ``libdrm`` now packages the file ``amdgpu.ids`` into a separate
4611 ``libdrm-amdgpu`` package.
4612
4613- ``python3``: The ``runpy`` module is now in the ``python3-core``
4614 package as it is required to support the common "python3 -m" command
4615 usage.
4616
4617- ``distcc`` now provides separate ``distcc-client`` and
4618 ``distcc-server`` packages as typically one or the other are needed,
4619 rather than both.
4620
4621- ``python*-setuptools`` recipes now separately package the
4622 ``pkg_resources`` module in a ``python-pkg-resources`` /
4623 ``python3-pkg-resources`` package as the module is useful independent
4624 of the rest of the setuptools package. The main ``python-setuptools``
4625 / ``python3-setuptools`` package depends on this new package so you
4626 should only need to update dependencies unless you want to take
4627 advantage of the increased granularity.
4628
4629.. _migration-3.0-cve-checking:
4630
4631CVE Checking
4632------------
4633
4634``cve-check-tool`` has been functionally replaced by a new
4635``cve-update-db`` recipe and functionality built into the ``cve-check``
4636class. The result uses NVD JSON data feeds rather than the deprecated
4637XML feeds that ``cve-check-tool`` was using, supports CVSSv3 scoring,
4638and makes other improvements.
4639
4640Additionally, the ``CVE_CHECK_CVE_WHITELIST`` variable has been replaced
4641by ``CVE_CHECK_WHITELIST``.
4642
4643.. _migration-3.0-bitbake-changes:
4644
4645Bitbake Changes
4646---------------
4647
4648The following BitBake changes have occurred.
4649
4650- ``addtask`` statements now properly validate dependent tasks.
4651 Previously, an invalid task was silently ignored. With this change,
4652 the invalid task generates a warning.
4653
4654- Other invalid ``addtask`` and ``deltask`` usages now trigger these
4655 warnings: "multiple target tasks arguments with addtask / deltask",
4656 and "multiple before/after clauses".
4657
4658- The "multiconfig" prefix is now shortened to "mc". "multiconfig" will
4659 continue to work, however it may be removed in a future release.
4660
4661- The ``bitbake -g`` command no longer generates a
4662 ``recipe-depends.dot`` file as the contents (i.e. a reprocessed
4663 version of ``task-depends.dot``) were confusing.
4664
4665- The ``bb.build.FuncFailed`` exception, previously raised by
4666 ``bb.build.exec_func()`` when certain other exceptions have occurred,
4667 has been removed. The real underlying exceptions will be raised
4668 instead. If you have calls to ``bb.build.exec_func()`` in custom
4669 classes or ``tinfoil-using`` scripts, any references to
4670 ``bb.build.FuncFailed`` should be cleaned up.
4671
4672- Additionally, the ``bb.build.exec_func()`` no longer accepts the
4673 "pythonexception" parameter. The function now always raises
4674 exceptions. Remove this argument in any calls to
4675 ``bb.build.exec_func()`` in custom classes or scripts.
4676
4677- The
4678 ```BB_SETSCENE_VERIFY_FUNCTION2`` <&YOCTO_DOCS_BB_URL;#var-bb-BB_SETSCENE_VERIFY_FUNCTION2>`__
4679 is no longer used. In the unlikely event that you have any references
4680 to it, they should be removed.
4681
4682- The ``RunQueueExecuteScenequeue`` and ``RunQueueExecuteTasks`` events
4683 have been removed since setscene tasks are now executed as part of
4684 the normal runqueue. Any event handling code in custom classes or
4685 scripts that handles these two events need to be updated.
4686
4687- The arguments passed to functions used with
4688 ```BB_HASHCHECK_FUNCTION`` <&YOCTO_DOCS_BB_URL;#var-bb-BB_HASHCHECK_FUNCTION>`__
4689 have changed. If you are using your own custom hash check function,
4690 see
4691 ` <http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=40a5e193c4ba45c928fccd899415ea56b5417725>`__
4692 for details.
4693
4694- Task specifications in ``BB_TASKDEPDATA`` and class implementations
4695 used in signature generator classes now use "<fn>:<task>" everywhere
4696 rather than the "." delimiter that was being used in some places.
4697 This change makes it consistent with all areas in the code. Custom
4698 signature generator classes and code that reads ``BB_TASKDEPDATA``
4699 need to be updated to use ':' as a separator rather than '.'.
4700
4701.. _migration-3.0-sanity-checks:
4702
4703Sanity Checks
4704-------------
4705
4706The following sanity check changes occurred.
4707
4708- ```SRC_URI`` <#var-SRC_URI>`__ is now checked for usage of two
4709 problematic items:
4710
4711 - "${PN}" prefix/suffix use - Warnings always appear if ${PN} is
4712 used. You must fix the issue regardless of whether multiconfig or
4713 anything else that would cause prefixing/suffixing to happen.
4714
4715 - Github archive tarballs - these are not guaranteed to be stable.
4716 Consequently, it is likely that the tarballs will be refreshed and
4717 thus the SRC_URI checksums will fail to apply. It is recommended
4718 that you fetch either an official release tarball or a specific
4719 revision from the actual Git repository instead.
4720
4721 Either one of these items now trigger a warning by default. If you
4722 wish to disable this check, remove ``src-uri-bad`` from
4723 ```WARN_QA`` <#var-WARN_QA>`__.
4724
4725- The ``file-rdeps`` runtime dependency check no longer expands
4726 ```RDEPENDS`` <#var-RDEPENDS>`__ recursively as there is no mechanism
4727 to ensure they can be fully computed, and thus races sometimes result
4728 in errors either showing up or not. Thus, you might now see errors
4729 for missing runtime dependencies that were previously satisfied
4730 recursively. Here is an example: package A contains a shell script
4731 starting with ``#!/bin/bash`` but has no dependency on bash. However,
4732 package A depends on package B, which does depend on bash. You need
4733 to add the missing dependency or dependencies to resolve the warning.
4734
4735- Setting ``DEPENDS_${PN}`` anywhere (i.e. typically in a recipe) now
4736 triggers an error. The error is triggered because
4737 ```DEPENDS`` <#var-DEPENDS>`__ is not a package-specific variable
4738 unlike RDEPENDS. You should set ``DEPENDS`` instead.
4739
4740- systemd currently does not work well with the musl C library because
4741 only upstream officially supports linking the library with glibc.
4742 Thus, a warning is shown when building systemd in conjunction with
4743 musl.
4744
4745.. _migration-3.0-miscellaneous-changes:
4746
4747Miscellaneous Changes
4748---------------------
4749
4750The following miscellaneous changes have occurred.
4751
4752- The ``gnome`` class has been removed because it now does very little.
4753 You should update recipes that previously inherited this class to do
4754 the following: inherit gnomebase gtk-icon-cache gconf mime
4755
4756- The ``meta/recipes-kernel/linux/linux-dtb.inc`` file has been
4757 removed. This file was previously deprecated in favor of setting
4758 ```KERNEL_DEVICETREE`` <#var-KERNEL_DEVICETREE>`__ in any kernel
4759 recipe and only produced a warning. Remove any ``include`` or
4760 ``require`` statements pointing to this file.
4761
4762- ```TARGET_CFLAGS`` <#var-TARGET_CFLAGS>`__,
4763 ```TARGET_CPPFLAGS`` <#var-TARGET_CPPFLAGS>`__,
4764 ```TARGET_CXXFLAGS`` <#var-TARGET_CXXFLAGS>`__, and
4765 ```TARGET_LDFLAGS`` <#var-TARGET_LDFLAGS>`__ are no longer exported
4766 to the external environment. This change did not require any changes
4767 to core recipes, which is a good indicator that no changes will be
4768 required. However, if for some reason the software being built by one
4769 of your recipes is expecting these variables to be set, then building
4770 the recipe will fail. In such cases, you must either export the
4771 variable or variables in the recipe or change the scripts so that
4772 exporting is not necessary.
4773
4774- You must change the host distro identifier used in
4775 ```NATIVELSBSTRING`` <#var-NATIVELSBSTRING>`__ to use all lowercase
4776 characters even if it does not contain a version number. This change
4777 is necessary only if you are not using ``uninative`` and
4778 ```SANITY_TESTED_DISTROS`` <#var-SANITY_TESTED_DISTROS>`__.
4779
4780- In the ``base-files`` recipe, writing the hostname into
4781 ``/etc/hosts`` and ``/etc/hostname`` is now done within the main
4782 ```do_install`` <#ref-tasks-install>`__ function rather than in the
4783 ``do_install_basefilesissue`` function. The reason for the change is
4784 because ``do_install_basefilesissue`` is more easily overridden
4785 without having to duplicate the hostname functionality. If you have
4786 done the latter (e.g. in a ``base-files`` bbappend), then you should
4787 remove it from your customized ``do_install_basefilesissue``
4788 function.
4789
4790- The ``wic --expand`` command now uses commas to separate "key:value"
4791 pairs rather than hyphens.
4792
4793 .. note::
4794
4795 The wic command-line help is not updated.
4796
4797 You must update any scripts or commands where you use
4798 ``wic --expand`` with multiple "key:value" pairs.
4799
4800- UEFI image variable settings have been moved from various places to a
4801 central ``conf/image-uefi.conf``. This change should not influence
4802 any existing configuration as the ``meta/conf/image-uefi.conf`` in
4803 the core metadata sets defaults that can be overridden in the same
4804 manner as before.
4805
4806- ``conf/distro/include/world-broken.inc`` has been removed. For cases
4807 where certain recipes need to be disabled when using the musl C
4808 library, these recipes now have ``COMPATIBLE_HOST_libc-musl`` set
4809 with a comment that explains why.
4810
4811Moving to the Yocto Project 3.1 Release
4812=======================================
4813
4814This section provides migration information for moving to the Yocto
4815Project 3.1 Release from the prior release.
4816
4817.. _migration-3.1-minimum-system-requirements:
4818
4819Minimum system requirements
4820---------------------------
4821
4822The following versions / requirements of build host components have been
4823updated:
4824
4825- gcc 5.0
4826
4827- python 3.5
4828
4829- tar 1.28
4830
4831- ``rpcgen`` is now required on the host (part of the ``libc-dev-bin``
4832 package on Ubuntu, Debian and related distributions, and the
4833 ``glibc`` package on RPM-based distributions).
4834
4835Additionally, the ``makeinfo`` and ``pod2man`` tools are *no longer*
4836required on the host.
4837
4838.. _migration-3.1-mpc8315e-rdb-removed:
4839
4840mpc8315e-rdb machine removed
4841----------------------------
4842
4843The MPC8315E-RDB machine is old/obsolete and unobtainable, thus given
4844the maintenance burden the ``mpc8315e-rdb`` machine configuration that
4845supported it has been removed in this release. The removal does leave a
4846gap in official PowerPC reference hardware support; this may change in
4847future if a suitable machine with accompanying support resources is
4848found.
4849
4850.. _migration-3.1-python-2-removed:
4851
4852Python 2 removed
4853----------------
4854
4855Due to the expiration of upstream support in January 2020, support for
4856Python 2 has now been removed; it is recommended that you use Python 3
4857instead. If absolutely needed there is a meta-python2 community layer
4858containing Python 2, related classes and various Python 2-based modules,
4859however it should not be considered as supported.
4860
4861.. _migration-3.1-reproducible-builds:
4862
4863Reproducible builds now enabled by default
4864------------------------------------------
4865
4866In order to avoid unnecessary differences in output files (aiding binary
4867reproducibility), the Poky distribution configuration
4868(``DISTRO = "poky"``) now inherits the ``reproducible_build`` class by
4869default.
4870
4871.. _migration-3.1-ptest-feature-impact:
4872
4873Impact of ptest feature is now more significant
4874-----------------------------------------------
4875
4876The Poky distribution configuration (``DISTRO = "poky"``) enables ptests
4877by default to enable runtime testing of various components. In this
4878release, a dependency needed to be added that has resulted in a
4879significant increase in the number of components that will be built just
4880when building a simple image such as core-image-minimal. If you do not
4881need runtime tests enabled for core components, then it is recommended
4882that you remove "ptest" from
4883```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ to save a significant
4884amount of build time e.g. by adding the following in your configuration:
4885DISTRO_FEATURES_remove = "ptest"
4886
4887.. _migration-3.1-removed-recipes:
4888
4889Removed recipes
4890---------------
4891
4892The following recipes have been removed:
4893
4894- ``chkconfig``: obsolete
4895
4896- ``console-tools``: obsolete
4897
4898- ``enchant``: replaced by ``enchant2``
4899
4900- ``foomatic-filters``: obsolete
4901
4902- ``libidn``: no longer needed, moved to meta-oe
4903
4904- ``libmodulemd``: replaced by ``libmodulemd-v1``
4905
4906- ``linux-yocto``: drop 4.19, 5.2 version recipes (5.4 now provided)
4907
4908- ``nspr``: no longer needed, moved to meta-oe
4909
4910- ``nss``: no longer needed, moved to meta-oe
4911
4912- ``python``: Python 2 removed (Python 3 preferred)
4913
4914- ``python-setuptools``: Python 2 version removed (python3-setuptools
4915 preferred)
4916
4917- ``sysprof``: no longer needed, moved to meta-oe
4918
4919- ``texi2html``: obsolete
4920
4921- ``u-boot-fw-utils``: functionally replaced by ``libubootenv``
4922
4923.. _migration-3.1-features-check:
4924
4925features_check class replaces distro_features_check
4926---------------------------------------------------
4927
4928The ``distro_features_check`` class has had its functionality expanded,
4929now supporting ``ANY_OF_MACHINE_FEATURES``,
4930``REQUIRED_MACHINE_FEATURES``, ``CONFLICT_MACHINE_FEATURES``,
4931``ANY_OF_COMBINED_FEATURES``, ``REQUIRED_COMBINED_FEATURES``,
4932``CONFLICT_COMBINED_FEATURES``. As a result the class has now been
4933renamed to ``features_check``; the ``distro_features_check`` class still
4934exists but generates a warning and redirects to the new class. In
4935preparation for a future removal of the old class it is recommended that
4936you update recipes currently inheriting ``distro_features_check`` to
4937inherit ``features_check`` instead.
4938
4939.. _migration-3.1-removed-classes:
4940
4941Removed classes
4942---------------
4943
4944The following classes have been removed:
4945
4946- ``distutils-base``: moved to meta-python2
4947
4948- ``distutils``: moved to meta-python2
4949
4950- ``libc-common``: merged into the glibc recipe as nothing else used
4951 it.
4952
4953- ``python-dir``: moved to meta-python2
4954
4955- ``pythonnative``: moved to meta-python2
4956
4957- ``setuptools``: moved to meta-python2
4958
4959- ``tinderclient``: dropped as it was obsolete.
4960
4961.. _migration-3.1-src-uri-checksums:
4962
4963SRC_URI checksum behaviour
4964--------------------------
4965
4966Previously, recipes by tradition included both SHA256 and MD5 checksums
4967for remotely fetched files in ```SRC_URI`` <#var-SRC_URI>`__, even
4968though only one is actually mandated. However, the MD5 checksum does not
4969add much given its inherent weakness; thus when a checksum fails only
4970the SHA256 sum will now be printed. The md5sum will still be verified if
4971it is specified.
4972
4973.. _migration-3.1-npm:
4974
4975npm fetcher changes
4976-------------------
4977
4978The npm fetcher has been completely reworked in this release. The npm
4979fetcher now only fetches the package source itself and no longer the
4980dependencies; there is now also an npmsw fetcher which explicitly
4981fetches the shrinkwrap file and the dependencies. This removes the
4982slightly awkward ``NPM_LOCKDOWN`` and ``NPM_SHRINKWRAP`` variables which
4983pointed to local files; the lockdown file is no longer needed at all.
4984Additionally, the package name in ``npm://`` entries in
4985```SRC_URI`` <#var-SRC_URI>`__ is now specified using a ``package``
4986parameter instead of the earlier ``name`` which overlapped with the
4987generic ``name`` parameter. All recipes using the npm fetcher will need
4988to be changed as a result.
4989
4990An example of the new scheme: SRC_URI =
4991"npm://registry.npmjs.org;package=array-flatten;version=1.1.1 \\
4992npmsw://${THISDIR}/npm-shrinkwrap.json" Another example where the
4993sources are fetched from git rather than an npm repository: SRC_URI =
4994"git://github.com/foo/bar.git;protocol=https \\
4995npmsw://${THISDIR}/npm-shrinkwrap.json"
4996
4997devtool and recipetool have also been updated to match with the npm
4998fetcher changes. Other than producing working and more complete recipes
4999for npm sources, there is also a minor change to the command line for
5000devtool: the ``--fetch-dev`` option has been renamed to ``--npm-dev`` as
5001it is npm-specific.
5002
5003.. _migration-3.1-packaging-changes:
5004
5005Packaging changes
5006-----------------
5007
5008- ``intltool`` has been removed from ``packagegroup-core-sdk`` as it is
5009 rarely needed to build modern software - gettext can do most of the
5010 things it used to be needed for. ``intltool`` has also been removed
5011 from ``packagegroup-core-self-hosted`` as it is not needed to for
5012 standard builds.
5013
5014- git: ``git-am``, ``git-difftool``, ``git-submodule``, and
5015 ``git-request-pull`` are no longer perl-based, so are now installed
5016 with the main ``git`` package instead of within ``git-perltools``.
5017
5018- The ``ldconfig`` binary built as part of glibc has now been moved to
5019 its own ``ldconfig`` package (note no ``glibc-`` prefix). This
5020 package is in the ```RRECOMMENDS`` <#var-RRECOMMENDS>`__ of the main
5021 ``glibc`` package if ``ldconfig`` is present in
5022 ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__.
5023
5024- ``libevent`` now splits each shared library into its own package (as
5025 Debian does). Since these are shared libraries and will be pulled in
5026 through the normal shared library dependency handling, there should
5027 be no impact to existing configurations other than less unnecessary
5028 libraries being installed in some cases.
5029
5030- linux-firmware now has a new package for ``bcm4366c`` and includes
5031 available NVRAM config files into the ``bcm43340``, ``bcm43362``,
5032 ``bcm43430`` and ``bcm4356-pcie`` packages.
5033
5034- ``harfbuzz`` now splits the new ``libharfbuzz-subset.so`` library
5035 into its own package to reduce the main package size in cases where
5036 ``libharfbuzz-subset.so`` is not needed.
5037
5038.. _migration-3.1-package-qa-warnings:
5039
5040Additional warnings
5041-------------------
5042
5043Warnings will now be shown at ``do_package_qa`` time in the following
5044circumstances:
5045
5046- A recipe installs ``.desktop`` files containing ``MimeType`` keys but
5047 does not inherit the new ``mime-xdg`` class
5048
5049- A recipe installs ``.xml`` files into ``${datadir}/mime/packages``
5050 but does not inherit the ``mime`` class
5051
5052.. _migration-3.1-x86-live-wic:
5053
5054``wic`` image type now used instead of ``live`` by default for x86
5055------------------------------------------------------------------
5056
5057``conf/machine/include/x86-base.inc`` (inherited by most x86 machine
5058configurations) now specifies ``wic`` instead of ``live`` by default in
5059```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__. The ``live`` image type will
5060likely be removed in a future release so it is recommended that you use
5061``wic`` instead.
5062
5063.. _migration-3.1-misc:
5064
5065Miscellaneous changes
5066---------------------
5067
5068- The undocumented ``SRC_DISTRIBUTE_LICENSES`` variable has now been
5069 removed in favour of a new ``AVAILABLE_LICENSES`` variable which is
5070 dynamically set based upon license files found in
5071 ``${COMMON_LICENSE_DIR}`` and ``${LICENSE_PATH}``.
5072
5073- The tune definition for big-endian microblaze machines is now
5074 ``microblaze`` instead of ``microblazeeb``.
5075
5076- ``newlib`` no longer has built-in syscalls. ``libgloss`` should then
5077 provide the syscalls, ``crt0.o`` and other functions that are no
5078 longer part of ``newlib`` itself. If you are using
5079 ``TCLIBC = "newlib"`` this now means that you must link applications
5080 with both ``newlib`` and ``libgloss``, whereas before ``newlib``
5081 would run in many configurations by itself.
diff --git a/documentation/ref-manual/ref-classes.rst b/documentation/ref-manual/ref-classes.rst
new file mode 100644
index 0000000000..3b6f450fab
--- /dev/null
+++ b/documentation/ref-manual/ref-classes.rst
@@ -0,0 +1,2881 @@
1*******
2Classes
3*******
4
5Class files are used to abstract common functionality and share it
6amongst multiple recipe (``.bb``) files. To use a class file, you simply
7make sure the recipe inherits the class. In most cases, when a recipe
8inherits a class it is enough to enable its features. There are cases,
9however, where in the recipe you might need to set variables or override
10some default behavior.
11
12Any `Metadata <#metadata>`__ usually found in a recipe can also be
13placed in a class file. Class files are identified by the extension
14``.bbclass`` and are usually placed in a ``classes/`` directory beneath
15the ``meta*/`` directory found in the `Source
16Directory <#source-directory>`__. Class files can also be pointed to by
17```BUILDDIR`` <#var-BUILDDIR>`__ (e.g. ``build/``) in the same way as
18``.conf`` files in the ``conf`` directory. Class files are searched for
19in ```BBPATH`` <#var-BBPATH>`__ using the same method by which ``.conf``
20files are searched.
21
22This chapter discusses only the most useful and important classes. Other
23classes do exist within the ``meta/classes`` directory in the Source
24Directory. You can reference the ``.bbclass`` files directly for more
25information.
26
27.. _ref-classes-allarch:
28
29``allarch.bbclass``
30===================
31
32The ``allarch`` class is inherited by recipes that do not produce
33architecture-specific output. The class disables functionality that is
34normally needed for recipes that produce executable binaries (such as
35building the cross-compiler and a C library as pre-requisites, and
36splitting out of debug symbols during packaging).
37
38.. note::
39
40 Unlike some distro recipes (e.g. Debian), OpenEmbedded recipes that
41 produce packages that depend on tunings through use of the
42 ```RDEPENDS`` <#var-RDEPENDS>`__ and
43 ```TUNE_PKGARCH`` <#var-TUNE_PKGARCH>`__ variables, should never be
44 configured for all architectures using ``allarch``. This is the case
45 even if the recipes do not produce architecture-specific output.
46
47 Configuring such recipes for all architectures causes the
48 ```do_package_write_*`` <#ref-tasks-package_write_deb>`__ tasks to
49 have different signatures for the machines with different tunings.
50 Additionally, unnecessary rebuilds occur every time an image for a
51 different ``MACHINE`` is built even when the recipe never changes.
52
53By default, all recipes inherit the ```base`` <#ref-classes-base>`__ and
54```package`` <#ref-classes-package>`__ classes, which enable
55functionality needed for recipes that produce executable output. If your
56recipe, for example, only produces packages that contain configuration
57files, media files, or scripts (e.g. Python and Perl), then it should
58inherit the ``allarch`` class.
59
60.. _ref-classes-archiver:
61
62``archiver.bbclass``
63====================
64
65The ``archiver`` class supports releasing source code and other
66materials with the binaries.
67
68For more details on the source archiver, see the "`Maintaining Open
69Source License Compliance During Your Product's
70Lifecycle <&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle>`__"
71section in the Yocto Project Development Tasks Manual. You can also see
72the ```ARCHIVER_MODE`` <#var-ARCHIVER_MODE>`__ variable for information
73about the variable flags (varflags) that help control archive creation.
74
75.. _ref-classes-autotools:
76
77``autotools*.bbclass``
78======================
79
80The ``autotools*`` classes support Autotooled packages.
81
82The ``autoconf``, ``automake``, and ``libtool`` packages bring
83standardization. This class defines a set of tasks (e.g. ``configure``,
84``compile`` and so forth) that work for all Autotooled packages. It
85should usually be enough to define a few standard variables and then
86simply ``inherit autotools``. These classes can also work with software
87that emulates Autotools. For more information, see the "`Autotooled
88Package <&YOCTO_DOCS_DEV_URL;#new-recipe-autotooled-package>`__" section
89in the Yocto Project Development Tasks Manual.
90
91By default, the ``autotools*`` classes use out-of-tree builds (i.e.
92``autotools.bbclass`` building with ``B != S``).
93
94If the software being built by a recipe does not support using
95out-of-tree builds, you should have the recipe inherit the
96``autotools-brokensep`` class. The ``autotools-brokensep`` class behaves
97the same as the ``autotools`` class but builds with ```B`` <#var-B>`__
98== ```S`` <#var-S>`__. This method is useful when out-of-tree build
99support is either not present or is broken.
100
101.. note::
102
103 It is recommended that out-of-tree support be fixed and used if at
104 all possible.
105
106It's useful to have some idea of how the tasks defined by the
107``autotools*`` classes work and what they do behind the scenes.
108
109- ```do_configure`` <#ref-tasks-configure>`__ - Regenerates the
110 configure script (using ``autoreconf``) and then launches it with a
111 standard set of arguments used during cross-compilation. You can pass
112 additional parameters to ``configure`` through the ``EXTRA_OECONF``
113 or ```PACKAGECONFIG_CONFARGS`` <#var-PACKAGECONFIG_CONFARGS>`__
114 variables.
115
116- ```do_compile`` <#ref-tasks-compile>`__ - Runs ``make`` with
117 arguments that specify the compiler and linker. You can pass
118 additional arguments through the ``EXTRA_OEMAKE`` variable.
119
120- ```do_install`` <#ref-tasks-install>`__ - Runs ``make install`` and
121 passes in ``${``\ ```D`` <#var-D>`__\ ``}`` as ``DESTDIR``.
122
123.. _ref-classes-base:
124
125``base.bbclass``
126================
127
128The ``base`` class is special in that every ``.bb`` file implicitly
129inherits the class. This class contains definitions for standard basic
130tasks such as fetching, unpacking, configuring (empty by default),
131compiling (runs any ``Makefile`` present), installing (empty by default)
132and packaging (empty by default). These classes are often overridden or
133extended by other classes such as the
134```autotools`` <#ref-classes-autotools>`__ class or the
135```package`` <#ref-classes-package>`__ class.
136
137The class also contains some commonly used functions such as
138``oe_runmake``, which runs ``make`` with the arguments specified in
139```EXTRA_OEMAKE`` <#var-EXTRA_OEMAKE>`__ variable as well as the
140arguments passed directly to ``oe_runmake``.
141
142.. _ref-classes-bash-completion:
143
144``bash-completion.bbclass``
145===========================
146
147Sets up packaging and dependencies appropriate for recipes that build
148software that includes bash-completion data.
149
150.. _ref-classes-bin-package:
151
152``bin_package.bbclass``
153=======================
154
155The ``bin_package`` class is a helper class for recipes that extract the
156contents of a binary package (e.g. an RPM) and install those contents
157rather than building the binary from source. The binary package is
158extracted and new packages in the configured output package format are
159created. Extraction and installation of proprietary binaries is a good
160example use for this class.
161
162.. note::
163
164 For RPMs and other packages that do not contain a subdirectory, you
165 should specify an appropriate fetcher parameter to point to the
166 subdirectory. For example, if BitBake is using the Git fetcher (
167 git://
168 ), the "subpath" parameter limits the checkout to a specific subpath
169 of the tree. Here is an example where
170 ${BP}
171 is used so that the files are extracted into the subdirectory
172 expected by the default value of
173 S
174 :
175 ::
176
177 SRC_URI = "git://example.com/downloads/somepackage.rpm;subpath=${BP}"
178
179
180 See the "
181 Fetchers
182 " section in the BitBake User Manual for more information on
183 supported BitBake Fetchers.
184
185.. _ref-classes-binconfig:
186
187``binconfig.bbclass``
188=====================
189
190The ``binconfig`` class helps to correct paths in shell scripts.
191
192Before ``pkg-config`` had become widespread, libraries shipped shell
193scripts to give information about the libraries and include paths needed
194to build software (usually named ``LIBNAME-config``). This class assists
195any recipe using such scripts.
196
197During staging, the OpenEmbedded build system installs such scripts into
198the ``sysroots/`` directory. Inheriting this class results in all paths
199in these scripts being changed to point into the ``sysroots/`` directory
200so that all builds that use the script use the correct directories for
201the cross compiling layout. See the
202```BINCONFIG_GLOB`` <#var-BINCONFIG_GLOB>`__ variable for more
203information.
204
205.. _ref-classes-binconfig-disabled:
206
207``binconfig-disabled.bbclass``
208==============================
209
210An alternative version of the ```binconfig`` <#ref-classes-binconfig>`__
211class, which disables binary configuration scripts by making them return
212an error in favor of using ``pkg-config`` to query the information. The
213scripts to be disabled should be specified using the
214```BINCONFIG`` <#var-BINCONFIG>`__ variable within the recipe inheriting
215the class.
216
217.. _ref-classes-blacklist:
218
219``blacklist.bbclass``
220=====================
221
222The ``blacklist`` class prevents the OpenEmbedded build system from
223building specific recipes (blacklists them). To use this class, inherit
224the class globally and set ```PNBLACKLIST`` <#var-PNBLACKLIST>`__ for
225each recipe you wish to blacklist. Specify the ```PN`` <#var-PN>`__
226value as a variable flag (varflag) and provide a reason, which is
227reported, if the package is requested to be built as the value. For
228example, if you want to blacklist a recipe called "exoticware", you add
229the following to your ``local.conf`` or distribution configuration:
230INHERIT += "blacklist" PNBLACKLIST[exoticware] = "Not supported by our
231organization."
232
233.. _ref-classes-buildhistory:
234
235``buildhistory.bbclass``
236========================
237
238The ``buildhistory`` class records a history of build output metadata,
239which can be used to detect possible regressions as well as used for
240analysis of the build output. For more information on using Build
241History, see the "`Maintaining Build Output
242Quality <&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality>`__"
243section in the Yocto Project Development Tasks Manual.
244
245.. _ref-classes-buildstats:
246
247``buildstats.bbclass``
248======================
249
250The ``buildstats`` class records performance statistics about each task
251executed during the build (e.g. elapsed time, CPU usage, and I/O usage).
252
253When you use this class, the output goes into the
254```BUILDSTATS_BASE`` <#var-BUILDSTATS_BASE>`__ directory, which defaults
255to ``${TMPDIR}/buildstats/``. You can analyze the elapsed time using
256``scripts/pybootchartgui/pybootchartgui.py``, which produces a cascading
257chart of the entire build process and can be useful for highlighting
258bottlenecks.
259
260Collecting build statistics is enabled by default through the
261```USER_CLASSES`` <#var-USER_CLASSES>`__ variable from your
262``local.conf`` file. Consequently, you do not have to do anything to
263enable the class. However, if you want to disable the class, simply
264remove "buildstats" from the ``USER_CLASSES`` list.
265
266.. _ref-classes-buildstats-summary:
267
268``buildstats-summary.bbclass``
269==============================
270
271When inherited globally, prints statistics at the end of the build on
272sstate re-use. In order to function, this class requires the
273```buildstats`` <#ref-classes-buildstats>`__ class be enabled.
274
275.. _ref-classes-ccache:
276
277``ccache.bbclass``
278==================
279
280The ``ccache`` class enables the C/C++ Compiler Cache for the build.
281This class is used to give a minor performance boost during the build.
282However, using the class can lead to unexpected side-effects. Thus, it
283is recommended that you do not use this class. See
284` <http://ccache.samba.org/>`__ for information on the C/C++ Compiler
285Cache.
286
287.. _ref-classes-chrpath:
288
289``chrpath.bbclass``
290===================
291
292The ``chrpath`` class is a wrapper around the "chrpath" utility, which
293is used during the build process for ``nativesdk``, ``cross``, and
294``cross-canadian`` recipes to change ``RPATH`` records within binaries
295in order to make them relocatable.
296
297.. _ref-classes-clutter:
298
299``clutter.bbclass``
300===================
301
302The ``clutter`` class consolidates the major and minor version naming
303and other common items used by Clutter and related recipes.
304
305.. note::
306
307 Unlike some other classes related to specific libraries, recipes
308 building other software that uses Clutter do not need to inherit this
309 class unless they use the same recipe versioning scheme that the
310 Clutter and related recipes do.
311
312.. _ref-classes-cmake:
313
314``cmake.bbclass``
315=================
316
317The ``cmake`` class allows for recipes that need to build software using
318the `CMake <https://cmake.org/overview/>`__ build system. You can use
319the ```EXTRA_OECMAKE`` <#var-EXTRA_OECMAKE>`__ variable to specify
320additional configuration options to be passed using the ``cmake``
321command line.
322
323On the occasion that you would be installing custom CMake toolchain
324files supplied by the application being built, you should install them
325to the preferred CMake Module directory: ``${D}${datadir}/cmake/``
326Modules during
327```do_install`` <&YOCTO_DOCS_REF_URL;#ref-tasks-install>`__.
328
329.. _ref-classes-cml1:
330
331``cml1.bbclass``
332================
333
334The ``cml1`` class provides basic support for the Linux kernel style
335build configuration system.
336
337.. _ref-classes-compress_doc:
338
339``compress_doc.bbclass``
340========================
341
342Enables compression for man pages and info pages. This class is intended
343to be inherited globally. The default compression mechanism is gz (gzip)
344but you can select an alternative mechanism by setting the
345```DOC_COMPRESS`` <#var-DOC_COMPRESS>`__ variable.
346
347.. _ref-classes-copyleft_compliance:
348
349``copyleft_compliance.bbclass``
350===============================
351
352The ``copyleft_compliance`` class preserves source code for the purposes
353of license compliance. This class is an alternative to the ``archiver``
354class and is still used by some users even though it has been deprecated
355in favor of the ```archiver`` <#ref-classes-archiver>`__ class.
356
357.. _ref-classes-copyleft_filter:
358
359``copyleft_filter.bbclass``
360===========================
361
362A class used by the ```archiver`` <#ref-classes-archiver>`__ and
363```copyleft_compliance`` <#ref-classes-copyleft_compliance>`__ classes
364for filtering licenses. The ``copyleft_filter`` class is an internal
365class and is not intended to be used directly.
366
367.. _ref-classes-core-image:
368
369``core-image.bbclass``
370======================
371
372The ``core-image`` class provides common definitions for the
373``core-image-*`` image recipes, such as support for additional
374```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__.
375
376.. _ref-classes-cpan:
377
378``cpan*.bbclass``
379=================
380
381The ``cpan*`` classes support Perl modules.
382
383Recipes for Perl modules are simple. These recipes usually only need to
384point to the source's archive and then inherit the proper class file.
385Building is split into two methods depending on which method the module
386authors used.
387
388- Modules that use old ``Makefile.PL``-based build system require
389 ``cpan.bbclass`` in their recipes.
390
391- Modules that use ``Build.PL``-based build system require using
392 ``cpan_build.bbclass`` in their recipes.
393
394Both build methods inherit the ``cpan-base`` class for basic Perl
395support.
396
397.. _ref-classes-cross:
398
399``cross.bbclass``
400=================
401
402The ``cross`` class provides support for the recipes that build the
403cross-compilation tools.
404
405.. _ref-classes-cross-canadian:
406
407``cross-canadian.bbclass``
408==========================
409
410The ``cross-canadian`` class provides support for the recipes that build
411the Canadian Cross-compilation tools for SDKs. See the
412"`Cross-Development Toolchain
413Generation <&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation>`__"
414section in the Yocto Project Overview and Concepts Manual for more
415discussion on these cross-compilation tools.
416
417.. _ref-classes-crosssdk:
418
419``crosssdk.bbclass``
420====================
421
422The ``crosssdk`` class provides support for the recipes that build the
423cross-compilation tools used for building SDKs. See the
424"`Cross-Development Toolchain
425Generation <&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation>`__"
426section in the Yocto Project Overview and Concepts Manual for more
427discussion on these cross-compilation tools.
428
429.. _ref-classes-debian:
430
431``debian.bbclass``
432==================
433
434The ``debian`` class renames output packages so that they follow the
435Debian naming policy (i.e. ``glibc`` becomes ``libc6`` and
436``glibc-devel`` becomes ``libc6-dev``.) Renaming includes the library
437name and version as part of the package name.
438
439If a recipe creates packages for multiple libraries (shared object files
440of ``.so`` type), use the ```LEAD_SONAME`` <#var-LEAD_SONAME>`__
441variable in the recipe to specify the library on which to apply the
442naming scheme.
443
444.. _ref-classes-deploy:
445
446``deploy.bbclass``
447==================
448
449The ``deploy`` class handles deploying files to the
450```DEPLOY_DIR_IMAGE`` <#var-DEPLOY_DIR_IMAGE>`__ directory. The main
451function of this class is to allow the deploy step to be accelerated by
452shared state. Recipes that inherit this class should define their own
453```do_deploy`` <#ref-tasks-deploy>`__ function to copy the files to be
454deployed to ```DEPLOYDIR`` <#var-DEPLOYDIR>`__, and use ``addtask`` to
455add the task at the appropriate place, which is usually after
456```do_compile`` <#ref-tasks-compile>`__ or
457```do_install`` <#ref-tasks-install>`__. The class then takes care of
458staging the files from ``DEPLOYDIR`` to ``DEPLOY_DIR_IMAGE``.
459
460.. _ref-classes-devshell:
461
462``devshell.bbclass``
463====================
464
465The ``devshell`` class adds the ``do_devshell`` task. Distribution
466policy dictates whether to include this class. See the "`Using a
467Development Shell <&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell>`__"
468section in the Yocto Project Development Tasks Manual for more
469information about using ``devshell``.
470
471.. _ref-classes-devupstream:
472
473``devupstream.bbclass``
474=======================
475
476The ``devupstream`` class uses
477```BBCLASSEXTEND`` <#var-BBCLASSEXTEND>`__ to add a variant of the
478recipe that fetches from an alternative URI (e.g. Git) instead of a
479tarball. Following is an example: BBCLASSEXTEND = "devupstream:target"
480SRC_URI_class-devupstream = "git://git.example.com/example"
481SRCREV_class-devupstream = "abcd1234" Adding the above statements to
482your recipe creates a variant that has
483```DEFAULT_PREFERENCE`` <#var-DEFAULT_PREFERENCE>`__ set to "-1".
484Consequently, you need to select the variant of the recipe to use it.
485Any development-specific adjustments can be done by using the
486``class-devupstream`` override. Here is an example:
487DEPENDS_append_class-devupstream = " gperf-native"
488do_configure_prepend_class-devupstream() { touch ${S}/README } The class
489currently only supports creating a development variant of the target
490recipe, not ``native`` or ``nativesdk`` variants.
491
492The ``BBCLASSEXTEND`` syntax (i.e. ``devupstream:target``) provides
493support for ``native`` and ``nativesdk`` variants. Consequently, this
494functionality can be added in a future release.
495
496Support for other version control systems such as Subversion is limited
497due to BitBake's automatic fetch dependencies (e.g.
498``subversion-native``).
499
500.. _ref-classes-distro_features_check:
501
502``distro_features_check.bbclass``
503=================================
504
505The ``distro_features_check`` class allows individual recipes to check
506for required and conflicting
507```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__.
508
509This class provides support for the
510```REQUIRED_DISTRO_FEATURES`` <#var-REQUIRED_DISTRO_FEATURES>`__ and
511```CONFLICT_DISTRO_FEATURES`` <#var-CONFLICT_DISTRO_FEATURES>`__
512variables. If any conditions specified in the recipe using the above
513variables are not met, the recipe will be skipped.
514
515.. _ref-classes-distutils:
516
517``distutils*.bbclass``
518======================
519
520The ``distutils*`` classes support recipes for Python version 2.x
521extensions, which are simple. These recipes usually only need to point
522to the source's archive and then inherit the proper class. Building is
523split into two methods depending on which method the module authors
524used.
525
526- Extensions that use an Autotools-based build system require Autotools
527 and the classes based on ``distutils`` in their recipes.
528
529- Extensions that use build systems based on ``distutils`` require the
530 ``distutils`` class in their recipes.
531
532- Extensions that use build systems based on ``setuptools`` require the
533 ```setuptools`` <#ref-classes-setuptools>`__ class in their recipes.
534
535The ``distutils-common-base`` class is required by some of the
536``distutils*`` classes to provide common Python2 support.
537
538.. _ref-classes-distutils3:
539
540``distutils3*.bbclass``
541=======================
542
543The ``distutils3*`` classes support recipes for Python version 3.x
544extensions, which are simple. These recipes usually only need to point
545to the source's archive and then inherit the proper class. Building is
546split into three methods depending on which method the module authors
547used.
548
549- Extensions that use an Autotools-based build system require Autotools
550 and ``distutils``-based classes in their recipes.
551
552- Extensions that use ``distutils``-based build systems require the
553 ``distutils`` class in their recipes.
554
555- Extensions that use build systems based on ``setuptools3`` require
556 the ```setuptools3`` <#ref-classes-setuptools>`__ class in their
557 recipes.
558
559The ``distutils3*`` classes either inherit their corresponding
560``distutils*`` class or replicate them using a Python3 version instead
561(e.g. ``distutils3-base`` inherits ``distutils-common-base``, which is
562the same as ``distutils-base`` but inherits ``python3native`` instead of
563``pythonnative``).
564
565.. _ref-classes-externalsrc:
566
567``externalsrc.bbclass``
568=======================
569
570The ``externalsrc`` class supports building software from source code
571that is external to the OpenEmbedded build system. Building software
572from an external source tree means that the build system's normal fetch,
573unpack, and patch process is not used.
574
575By default, the OpenEmbedded build system uses the ```S`` <#var-S>`__
576and ```B`` <#var-B>`__ variables to locate unpacked recipe source code
577and to build it, respectively. When your recipe inherits the
578``externalsrc`` class, you use the
579```EXTERNALSRC`` <#var-EXTERNALSRC>`__ and
580```EXTERNALSRC_BUILD`` <#var-EXTERNALSRC_BUILD>`__ variables to
581ultimately define ``S`` and ``B``.
582
583By default, this class expects the source code to support recipe builds
584that use the ```B`` <#var-B>`__ variable to point to the directory in
585which the OpenEmbedded build system places the generated objects built
586from the recipes. By default, the ``B`` directory is set to the
587following, which is separate from the source directory (``S``):
588${WORKDIR}/${BPN}/{PV}/ See these variables for more information:
589```WORKDIR`` <#var-WORKDIR>`__, ```BPN`` <#var-BPN>`__, and
590```PV`` <#var-PV>`__,
591
592For more information on the ``externalsrc`` class, see the comments in
593``meta/classes/externalsrc.bbclass`` in the `Source
594Directory <#source-directory>`__. For information on how to use the
595``externalsrc`` class, see the "`Building Software from an External
596Source <&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source>`__"
597section in the Yocto Project Development Tasks Manual.
598
599.. _ref-classes-extrausers:
600
601``extrausers.bbclass``
602======================
603
604The ``extrausers`` class allows additional user and group configuration
605to be applied at the image level. Inheriting this class either globally
606or from an image recipe allows additional user and group operations to
607be performed using the
608```EXTRA_USERS_PARAMS`` <#var-EXTRA_USERS_PARAMS>`__ variable.
609
610.. note::
611
612 The user and group operations added using the
613 extrausers
614 class are not tied to a specific recipe outside of the recipe for the
615 image. Thus, the operations can be performed across the image as a
616 whole. Use the
617 useradd
618 class to add user and group configuration to a specific recipe.
619
620Here is an example that uses this class in an image recipe: inherit
621extrausers EXTRA_USERS_PARAMS = "\\ useradd -p '' tester; \\ groupadd
622developers; \\ userdel nobody; \\ groupdel -g video; \\ groupmod -g 1020
623developers; \\ usermod -s /bin/sh tester; \\ " Here is an example that
624adds two users named "tester-jim" and "tester-sue" and assigns
625passwords: inherit extrausers EXTRA_USERS_PARAMS = "\\ useradd -P
626tester01 tester-jim; \\ useradd -P tester01 tester-sue; \\ " Finally,
627here is an example that sets the root password to "1876*18": inherit
628extrausers EXTRA_USERS_PARAMS = "\\ usermod -P 1876*18 root; \\ "
629
630.. _ref-classes-fontcache:
631
632``fontcache.bbclass``
633=====================
634
635The ``fontcache`` class generates the proper post-install and
636post-remove (postinst and postrm) scriptlets for font packages. These
637scriptlets call ``fc-cache`` (part of ``Fontconfig``) to add the fonts
638to the font information cache. Since the cache files are
639architecture-specific, ``fc-cache`` runs using QEMU if the postinst
640scriptlets need to be run on the build host during image creation.
641
642If the fonts being installed are in packages other than the main
643package, set ```FONT_PACKAGES`` <#var-FONT_PACKAGES>`__ to specify the
644packages containing the fonts.
645
646.. _ref-classes-fs-uuid:
647
648``fs-uuid.bbclass``
649===================
650
651The ``fs-uuid`` class extracts UUID from
652``${``\ ```ROOTFS`` <#var-ROOTFS>`__\ ``}``, which must have been built
653by the time that this function gets called. The ``fs-uuid`` class only
654works on ``ext`` file systems and depends on ``tune2fs``.
655
656.. _ref-classes-gconf:
657
658``gconf.bbclass``
659=================
660
661The ``gconf`` class provides common functionality for recipes that need
662to install GConf schemas. The schemas will be put into a separate
663package (``${``\ ```PN`` <#var-PN>`__\ ``}-gconf``) that is created
664automatically when this class is inherited. This package uses the
665appropriate post-install and post-remove (postinst/postrm) scriptlets to
666register and unregister the schemas in the target image.
667
668.. _ref-classes-gettext:
669
670``gettext.bbclass``
671===================
672
673The ``gettext`` class provides support for building software that uses
674the GNU ``gettext`` internationalization and localization system. All
675recipes building software that use ``gettext`` should inherit this
676class.
677
678.. _ref-classes-gnomebase:
679
680``gnomebase.bbclass``
681=====================
682
683The ``gnomebase`` class is the base class for recipes that build
684software from the GNOME stack. This class sets
685```SRC_URI`` <#var-SRC_URI>`__ to download the source from the GNOME
686mirrors as well as extending ```FILES`` <#var-FILES>`__ with the typical
687GNOME installation paths.
688
689.. _ref-classes-gobject-introspection:
690
691``gobject-introspection.bbclass``
692=================================
693
694Provides support for recipes building software that supports GObject
695introspection. This functionality is only enabled if the
696"gobject-introspection-data" feature is in
697```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ as well as
698"qemu-usermode" being in
699```MACHINE_FEATURES`` <#var-MACHINE_FEATURES>`__.
700
701.. note::
702
703 This functionality is backfilled by default and, if not applicable,
704 should be disabled through
705 DISTRO_FEATURES_BACKFILL_CONSIDERED
706 or
707 MACHINE_FEATURES_BACKFILL_CONSIDERED
708 , respectively.
709
710.. _ref-classes-grub-efi:
711
712``grub-efi.bbclass``
713====================
714
715The ``grub-efi`` class provides ``grub-efi``-specific functions for
716building bootable images.
717
718This class supports several variables:
719
720- ```INITRD`` <#var-INITRD>`__: Indicates list of filesystem images to
721 concatenate and use as an initial RAM disk (initrd) (optional).
722
723- ```ROOTFS`` <#var-ROOTFS>`__: Indicates a filesystem image to include
724 as the root filesystem (optional).
725
726- ```GRUB_GFXSERIAL`` <#var-GRUB_GFXSERIAL>`__: Set this to "1" to have
727 graphics and serial in the boot menu.
728
729- ```LABELS`` <#var-LABELS>`__: A list of targets for the automatic
730 configuration.
731
732- ```APPEND`` <#var-APPEND>`__: An override list of append strings for
733 each ``LABEL``.
734
735- ```GRUB_OPTS`` <#var-GRUB_OPTS>`__: Additional options to add to the
736 configuration (optional). Options are delimited using semi-colon
737 characters (``;``).
738
739- ```GRUB_TIMEOUT`` <#var-GRUB_TIMEOUT>`__: Timeout before executing
740 the default ``LABEL`` (optional).
741
742.. _ref-classes-gsettings:
743
744``gsettings.bbclass``
745=====================
746
747The ``gsettings`` class provides common functionality for recipes that
748need to install GSettings (glib) schemas. The schemas are assumed to be
749part of the main package. Appropriate post-install and post-remove
750(postinst/postrm) scriptlets are added to register and unregister the
751schemas in the target image.
752
753.. _ref-classes-gtk-doc:
754
755``gtk-doc.bbclass``
756===================
757
758The ``gtk-doc`` class is a helper class to pull in the appropriate
759``gtk-doc`` dependencies and disable ``gtk-doc``.
760
761.. _ref-classes-gtk-icon-cache:
762
763``gtk-icon-cache.bbclass``
764==========================
765
766The ``gtk-icon-cache`` class generates the proper post-install and
767post-remove (postinst/postrm) scriptlets for packages that use GTK+ and
768install icons. These scriptlets call ``gtk-update-icon-cache`` to add
769the fonts to GTK+'s icon cache. Since the cache files are
770architecture-specific, ``gtk-update-icon-cache`` is run using QEMU if
771the postinst scriptlets need to be run on the build host during image
772creation.
773
774.. _ref-classes-gtk-immodules-cache:
775
776``gtk-immodules-cache.bbclass``
777===============================
778
779The ``gtk-immodules-cache`` class generates the proper post-install and
780post-remove (postinst/postrm) scriptlets for packages that install GTK+
781input method modules for virtual keyboards. These scriptlets call
782``gtk-update-icon-cache`` to add the input method modules to the cache.
783Since the cache files are architecture-specific,
784``gtk-update-icon-cache`` is run using QEMU if the postinst scriptlets
785need to be run on the build host during image creation.
786
787If the input method modules being installed are in packages other than
788the main package, set
789```GTKIMMODULES_PACKAGES`` <#var-GTKIMMODULES_PACKAGES>`__ to specify
790the packages containing the modules.
791
792.. _ref-classes-gzipnative:
793
794``gzipnative.bbclass``
795======================
796
797The ``gzipnative`` class enables the use of different native versions of
798``gzip`` and ``pigz`` rather than the versions of these tools from the
799build host.
800
801.. _ref-classes-icecc:
802
803``icecc.bbclass``
804=================
805
806The ``icecc`` class supports
807`Icecream <https://github.com/icecc/icecream>`__, which facilitates
808taking compile jobs and distributing them among remote machines.
809
810The class stages directories with symlinks from ``gcc`` and ``g++`` to
811``icecc``, for both native and cross compilers. Depending on each
812configure or compile, the OpenEmbedded build system adds the directories
813at the head of the ``PATH`` list and then sets the ``ICECC_CXX`` and
814``ICEC_CC`` variables, which are the paths to the ``g++`` and ``gcc``
815compilers, respectively.
816
817For the cross compiler, the class creates a ``tar.gz`` file that
818contains the Yocto Project toolchain and sets ``ICECC_VERSION``, which
819is the version of the cross-compiler used in the cross-development
820toolchain, accordingly.
821
822The class handles all three different compile stages (i.e native
823,cross-kernel and target) and creates the necessary environment
824``tar.gz`` file to be used by the remote machines. The class also
825supports SDK generation.
826
827If ```ICECC_PATH`` <#var-ICECC_PATH>`__ is not set in your
828``local.conf`` file, then the class tries to locate the ``icecc`` binary
829using ``which``. If ```ICECC_ENV_EXEC`` <#var-ICECC_ENV_EXEC>`__ is set
830in your ``local.conf`` file, the variable should point to the
831``icecc-create-env`` script provided by the user. If you do not point to
832a user-provided script, the build system uses the default script
833provided by the recipe ``icecc-create-env-native.bb``.
834
835.. note::
836
837 This script is a modified version and not the one that comes with
838 icecc
839 .
840
841If you do not want the Icecream distributed compile support to apply to
842specific recipes or classes, you can effectively "blacklist" them by
843listing the recipes and classes using the
844```ICECC_USER_PACKAGE_BL`` <#var-ICECC_USER_PACKAGE_BL>`__ and
845```ICECC_USER_CLASS_BL`` <#var-ICECC_USER_CLASS_BL>`__, variables,
846respectively, in your ``local.conf`` file. Doing so causes the
847OpenEmbedded build system to handle these compilations locally.
848
849Additionally, you can list recipes using the
850```ICECC_USER_PACKAGE_WL`` <#var-ICECC_USER_PACKAGE_WL>`__ variable in
851your ``local.conf`` file to force ``icecc`` to be enabled for recipes
852using an empty ```PARALLEL_MAKE`` <#var-PARALLEL_MAKE>`__ variable.
853
854Inheriting the ``icecc`` class changes all sstate signatures.
855Consequently, if a development team has a dedicated build system that
856populates ```STATE_MIRRORS`` <#var-SSTATE_MIRRORS>`__ and they want to
857reuse sstate from ``STATE_MIRRORS``, then all developers and the build
858system need to either inherit the ``icecc`` class or nobody should.
859
860At the distribution level, you can inherit the ``icecc`` class to be
861sure that all builders start with the same sstate signatures. After
862inheriting the class, you can then disable the feature by setting the
863```ICECC_DISABLED`` <#var-ICECC_DISABLED>`__ variable to "1" as follows:
864INHERIT_DISTRO_append = " icecc" ICECC_DISABLED ??= "1" This practice
865makes sure everyone is using the same signatures but also requires
866individuals that do want to use Icecream to enable the feature
867individually as follows in your ``local.conf`` file: ICECC_DISABLED = ""
868
869.. _ref-classes-image:
870
871``image.bbclass``
872=================
873
874The ``image`` class helps support creating images in different formats.
875First, the root filesystem is created from packages using one of the
876``rootfs*.bbclass`` files (depending on the package format used) and
877then one or more image files are created.
878
879- The ``IMAGE_FSTYPES`` variable controls the types of images to
880 generate.
881
882- The ``IMAGE_INSTALL`` variable controls the list of packages to
883 install into the image.
884
885For information on customizing images, see the "`Customizing
886Images <&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage>`__" section
887in the Yocto Project Development Tasks Manual. For information on how
888images are created, see the
889"`Images <&YOCTO_DOCS_OM_URL;#images-dev-environment>`__" section in the
890Yocto Project Overview and Concpets Manual.
891
892.. _ref-classes-image-buildinfo:
893
894``image-buildinfo.bbclass``
895===========================
896
897The ``image-buildinfo`` class writes information to the target
898filesystem on ``/etc/build``.
899
900.. _ref-classes-image_types:
901
902``image_types.bbclass``
903=======================
904
905The ``image_types`` class defines all of the standard image output types
906that you can enable through the
907```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__ variable. You can use this
908class as a reference on how to add support for custom image output
909types.
910
911By default, the ```image`` <#ref-classes-image>`__ class automatically
912enables the ``image_types`` class. The ``image`` class uses the
913``IMGCLASSES`` variable as follows: IMGCLASSES =
914"rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}" IMGCLASSES +=
915"${@['populate_sdk_base', 'populate_sdk_ext']['linux' in
916d.getVar("SDK_OS")]}" IMGCLASSES +=
917"${@bb.utils.contains_any('IMAGE_FSTYPES', 'live iso hddimg',
918'image-live', '', d)}" IMGCLASSES +=
919"${@bb.utils.contains('IMAGE_FSTYPES', 'container', 'image-container',
920'', d)}" IMGCLASSES += "image_types_wic" IMGCLASSES +=
921"rootfs-postcommands" IMGCLASSES += "image-postinst-intercepts" inherit
922${IMGCLASSES}
923
924The ``image_types`` class also handles conversion and compression of
925images.
926
927.. note::
928
929 To build a VMware VMDK image, you need to add "wic.vmdk" to
930 IMAGE_FSTYPES
931 . This would also be similar for Virtual Box Virtual Disk Image
932 ("vdi") and QEMU Copy On Write Version 2 ("qcow2") images.
933
934.. _ref-classes-image-live:
935
936``image-live.bbclass``
937======================
938
939This class controls building "live" (i.e. HDDIMG and ISO) images. Live
940images contain syslinux for legacy booting, as well as the bootloader
941specified by ```EFI_PROVIDER`` <#var-EFI_PROVIDER>`__ if
942```MACHINE_FEATURES`` <#var-MACHINE_FEATURES>`__ contains "efi".
943
944Normally, you do not use this class directly. Instead, you add "live" to
945```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__.
946
947.. _ref-classes-image-mklibs:
948
949``image-mklibs.bbclass``
950========================
951
952The ``image-mklibs`` class enables the use of the ``mklibs`` utility
953during the ```do_rootfs`` <#ref-tasks-rootfs>`__ task, which optimizes
954the size of libraries contained in the image.
955
956By default, the class is enabled in the ``local.conf.template`` using
957the ```USER_CLASSES`` <#var-USER_CLASSES>`__ variable as follows:
958USER_CLASSES ?= "buildstats image-mklibs image-prelink"
959
960.. _ref-classes-image-prelink:
961
962``image-prelink.bbclass``
963=========================
964
965The ``image-prelink`` class enables the use of the ``prelink`` utility
966during the ```do_rootfs`` <#ref-tasks-rootfs>`__ task, which optimizes
967the dynamic linking of shared libraries to reduce executable startup
968time.
969
970By default, the class is enabled in the ``local.conf.template`` using
971the ```USER_CLASSES`` <#var-USER_CLASSES>`__ variable as follows:
972USER_CLASSES ?= "buildstats image-mklibs image-prelink"
973
974.. _ref-classes-insane:
975
976``insane.bbclass``
977==================
978
979The ``insane`` class adds a step to the package generation process so
980that output quality assurance checks are generated by the OpenEmbedded
981build system. A range of checks are performed that check the build's
982output for common problems that show up during runtime. Distribution
983policy usually dictates whether to include this class.
984
985You can configure the sanity checks so that specific test failures
986either raise a warning or an error message. Typically, failures for new
987tests generate a warning. Subsequent failures for the same test would
988then generate an error message once the metadata is in a known and good
989condition. See the "`QA Error and Warning Messages <#ref-qa-checks>`__"
990Chapter for a list of all the warning and error messages you might
991encounter using a default configuration.
992
993Use the ```WARN_QA`` <#var-WARN_QA>`__ and
994```ERROR_QA`` <#var-ERROR_QA>`__ variables to control the behavior of
995these checks at the global level (i.e. in your custom distro
996configuration). However, to skip one or more checks in recipes, you
997should use ```INSANE_SKIP`` <#var-INSANE_SKIP>`__. For example, to skip
998the check for symbolic link ``.so`` files in the main package of a
999recipe, add the following to the recipe. You need to realize that the
1000package name override, in this example ``${PN}``, must be used:
1001INSANE_SKIP_${PN} += "dev-so" Please keep in mind that the QA checks
1002exist in order to detect real or potential problems in the packaged
1003output. So exercise caution when disabling these checks.
1004
1005The following list shows the tests you can list with the ``WARN_QA`` and
1006``ERROR_QA`` variables:
1007
1008- *``already-stripped:``* Checks that produced binaries have not
1009 already been stripped prior to the build system extracting debug
1010 symbols. It is common for upstream software projects to default to
1011 stripping debug symbols for output binaries. In order for debugging
1012 to work on the target using ``-dbg`` packages, this stripping must be
1013 disabled.
1014
1015- *``arch:``* Checks the Executable and Linkable Format (ELF) type, bit
1016 size, and endianness of any binaries to ensure they match the target
1017 architecture. This test fails if any binaries do not match the type
1018 since there would be an incompatibility. The test could indicate that
1019 the wrong compiler or compiler options have been used. Sometimes
1020 software, like bootloaders, might need to bypass this check.
1021
1022- *``buildpaths:``* Checks for paths to locations on the build host
1023 inside the output files. Currently, this test triggers too many false
1024 positives and thus is not normally enabled.
1025
1026- *``build-deps:``* Determines if a build-time dependency that is
1027 specified through ```DEPENDS`` <#var-DEPENDS>`__, explicit
1028 ```RDEPENDS`` <#var-RDEPENDS>`__, or task-level dependencies exists
1029 to match any runtime dependency. This determination is particularly
1030 useful to discover where runtime dependencies are detected and added
1031 during packaging. If no explicit dependency has been specified within
1032 the metadata, at the packaging stage it is too late to ensure that
1033 the dependency is built, and thus you can end up with an error when
1034 the package is installed into the image during the
1035 ```do_rootfs`` <#ref-tasks-rootfs>`__ task because the auto-detected
1036 dependency was not satisfied. An example of this would be where the
1037 ```update-rc.d`` <#ref-classes-update-rc.d>`__ class automatically
1038 adds a dependency on the ``initscripts-functions`` package to
1039 packages that install an initscript that refers to
1040 ``/etc/init.d/functions``. The recipe should really have an explicit
1041 ``RDEPENDS`` for the package in question on ``initscripts-functions``
1042 so that the OpenEmbedded build system is able to ensure that the
1043 ``initscripts`` recipe is actually built and thus the
1044 ``initscripts-functions`` package is made available.
1045
1046- *``compile-host-path:``* Checks the
1047 ```do_compile`` <#ref-tasks-compile>`__ log for indications that
1048 paths to locations on the build host were used. Using such paths
1049 might result in host contamination of the build output.
1050
1051- *``debug-deps:``* Checks that all packages except ``-dbg`` packages
1052 do not depend on ``-dbg`` packages, which would cause a packaging
1053 bug.
1054
1055- *``debug-files:``* Checks for ``.debug`` directories in anything but
1056 the ``-dbg`` package. The debug files should all be in the ``-dbg``
1057 package. Thus, anything packaged elsewhere is incorrect packaging.
1058
1059- *``dep-cmp:``* Checks for invalid version comparison statements in
1060 runtime dependency relationships between packages (i.e. in
1061 ```RDEPENDS`` <#var-RDEPENDS>`__,
1062 ```RRECOMMENDS`` <#var-RRECOMMENDS>`__,
1063 ```RSUGGESTS`` <#var-RSUGGESTS>`__,
1064 ```RPROVIDES`` <#var-RPROVIDES>`__,
1065 ```RREPLACES`` <#var-RREPLACES>`__, and
1066 ```RCONFLICTS`` <#var-RCONFLICTS>`__ variable values). Any invalid
1067 comparisons might trigger failures or undesirable behavior when
1068 passed to the package manager.
1069
1070- *``desktop:``* Runs the ``desktop-file-validate`` program against any
1071 ``.desktop`` files to validate their contents against the
1072 specification for ``.desktop`` files.
1073
1074- *``dev-deps:``* Checks that all packages except ``-dev`` or
1075 ``-staticdev`` packages do not depend on ``-dev`` packages, which
1076 would be a packaging bug.
1077
1078- *``dev-so:``* Checks that the ``.so`` symbolic links are in the
1079 ``-dev`` package and not in any of the other packages. In general,
1080 these symlinks are only useful for development purposes. Thus, the
1081 ``-dev`` package is the correct location for them. Some very rare
1082 cases do exist for dynamically loaded modules where these symlinks
1083 are needed instead in the main package.
1084
1085- *``file-rdeps:``* Checks that file-level dependencies identified by
1086 the OpenEmbedded build system at packaging time are satisfied. For
1087 example, a shell script might start with the line ``#!/bin/bash``.
1088 This line would translate to a file dependency on ``/bin/bash``. Of
1089 the three package managers that the OpenEmbedded build system
1090 supports, only RPM directly handles file-level dependencies,
1091 resolving them automatically to packages providing the files.
1092 However, the lack of that functionality in the other two package
1093 managers does not mean the dependencies do not still need resolving.
1094 This QA check attempts to ensure that explicitly declared
1095 ```RDEPENDS`` <#var-RDEPENDS>`__ exist to handle any file-level
1096 dependency detected in packaged files.
1097
1098- *``files-invalid:``* Checks for ```FILES`` <#var-FILES>`__ variable
1099 values that contain "//", which is invalid.
1100
1101- *``host-user-contaminated:``* Checks that no package produced by the
1102 recipe contains any files outside of ``/home`` with a user or group
1103 ID that matches the user running BitBake. A match usually indicates
1104 that the files are being installed with an incorrect UID/GID, since
1105 target IDs are independent from host IDs. For additional information,
1106 see the section describing the
1107 ```do_install`` <#ref-tasks-install>`__ task.
1108
1109- *``incompatible-license:``* Report when packages are excluded from
1110 being created due to being marked with a license that is in
1111 ```INCOMPATIBLE_LICENSE`` <#var-INCOMPATIBLE_LICENSE>`__.
1112
1113- *``install-host-path:``* Checks the
1114 ```do_install`` <#ref-tasks-install>`__ log for indications that
1115 paths to locations on the build host were used. Using such paths
1116 might result in host contamination of the build output.
1117
1118- *``installed-vs-shipped:``* Reports when files have been installed
1119 within ``do_install`` but have not been included in any package by
1120 way of the ```FILES`` <#var-FILES>`__ variable. Files that do not
1121 appear in any package cannot be present in an image later on in the
1122 build process. Ideally, all installed files should be packaged or not
1123 installed at all. These files can be deleted at the end of
1124 ``do_install`` if the files are not needed in any package.
1125
1126- *``invalid-chars:``* Checks that the recipe metadata variables
1127 ```DESCRIPTION`` <#var-DESCRIPTION>`__,
1128 ```SUMMARY`` <#var-SUMMARY>`__, ```LICENSE`` <#var-LICENSE>`__, and
1129 ```SECTION`` <#var-SECTION>`__ do not contain non-UTF-8 characters.
1130 Some package managers do not support such characters.
1131
1132- *``invalid-packageconfig:``* Checks that no undefined features are
1133 being added to ```PACKAGECONFIG`` <#var-PACKAGECONFIG>`__. For
1134 example, any name "foo" for which the following form does not exist:
1135 PACKAGECONFIG[foo] = "..."
1136
1137- *``la:``* Checks ``.la`` files for any ``TMPDIR`` paths. Any ``.la``
1138 file containing these paths is incorrect since ``libtool`` adds the
1139 correct sysroot prefix when using the files automatically itself.
1140
1141- *``ldflags:``* Ensures that the binaries were linked with the
1142 ```LDFLAGS`` <#var-LDFLAGS>`__ options provided by the build system.
1143 If this test fails, check that the ``LDFLAGS`` variable is being
1144 passed to the linker command.
1145
1146- *``libdir:``* Checks for libraries being installed into incorrect
1147 (possibly hardcoded) installation paths. For example, this test will
1148 catch recipes that install ``/lib/bar.so`` when ``${base_libdir}`` is
1149 "lib32". Another example is when recipes install
1150 ``/usr/lib64/foo.so`` when ``${libdir}`` is "/usr/lib".
1151
1152- *``libexec:``* Checks if a package contains files in
1153 ``/usr/libexec``. This check is not performed if the ``libexecdir``
1154 variable has been set explicitly to ``/usr/libexec``.
1155
1156- *``packages-list:``* Checks for the same package being listed
1157 multiple times through the ```PACKAGES`` <#var-PACKAGES>`__ variable
1158 value. Installing the package in this manner can cause errors during
1159 packaging.
1160
1161- *``perm-config:``* Reports lines in ``fs-perms.txt`` that have an
1162 invalid format.
1163
1164- *``perm-line:``* Reports lines in ``fs-perms.txt`` that have an
1165 invalid format.
1166
1167- *``perm-link:``* Reports lines in ``fs-perms.txt`` that specify
1168 'link' where the specified target already exists.
1169
1170- *``perms:``* Currently, this check is unused but reserved.
1171
1172- *``pkgconfig:``* Checks ``.pc`` files for any
1173 ```TMPDIR`` <#var-TMPDIR>`__/```WORKDIR`` <#var-WORKDIR>`__ paths.
1174 Any ``.pc`` file containing these paths is incorrect since
1175 ``pkg-config`` itself adds the correct sysroot prefix when the files
1176 are accessed.
1177
1178- *``pkgname:``* Checks that all packages in
1179 ```PACKAGES`` <#var-PACKAGES>`__ have names that do not contain
1180 invalid characters (i.e. characters other than 0-9, a-z, ., +, and
1181 -).
1182
1183- *``pkgv-undefined:``* Checks to see if the ``PKGV`` variable is
1184 undefined during ```do_package`` <#ref-tasks-package>`__.
1185
1186- *``pkgvarcheck:``* Checks through the variables
1187 ```RDEPENDS`` <#var-RDEPENDS>`__,
1188 ```RRECOMMENDS`` <#var-RRECOMMENDS>`__,
1189 ```RSUGGESTS`` <#var-RSUGGESTS>`__,
1190 ```RCONFLICTS`` <#var-RCONFLICTS>`__,
1191 ```RPROVIDES`` <#var-RPROVIDES>`__,
1192 ```RREPLACES`` <#var-RREPLACES>`__, ```FILES`` <#var-FILES>`__,
1193 ```ALLOW_EMPTY`` <#var-ALLOW_EMPTY>`__, ``pkg_preinst``,
1194 ``pkg_postinst``, ``pkg_prerm`` and ``pkg_postrm``, and reports if
1195 there are variable sets that are not package-specific. Using these
1196 variables without a package suffix is bad practice, and might
1197 unnecessarily complicate dependencies of other packages within the
1198 same recipe or have other unintended consequences.
1199
1200- *``pn-overrides:``* Checks that a recipe does not have a name
1201 (```PN`` <#var-PN>`__) value that appears in
1202 ```OVERRIDES`` <#var-OVERRIDES>`__. If a recipe is named such that
1203 its ``PN`` value matches something already in ``OVERRIDES`` (e.g.
1204 ``PN`` happens to be the same as ```MACHINE`` <#var-MACHINE>`__ or
1205 ```DISTRO`` <#var-DISTRO>`__), it can have unexpected consequences.
1206 For example, assignments such as ``FILES_${PN} = "xyz"`` effectively
1207 turn into ``FILES = "xyz"``.
1208
1209- *``rpaths:``* Checks for rpaths in the binaries that contain build
1210 system paths such as ``TMPDIR``. If this test fails, bad ``-rpath``
1211 options are being passed to the linker commands and your binaries
1212 have potential security issues.
1213
1214- *``split-strip:``* Reports that splitting or stripping debug symbols
1215 from binaries has failed.
1216
1217- *``staticdev:``* Checks for static library files (``*.a``) in
1218 non-``staticdev`` packages.
1219
1220- *``symlink-to-sysroot:``* Checks for symlinks in packages that point
1221 into ```TMPDIR`` <#var-TMPDIR>`__ on the host. Such symlinks will
1222 work on the host, but are clearly invalid when running on the target.
1223
1224- *``textrel:``* Checks for ELF binaries that contain relocations in
1225 their ``.text`` sections, which can result in a performance impact at
1226 runtime. See the explanation for the
1227 ```ELF binary`` <#qa-issue-textrel>`__ message for more information
1228 regarding runtime performance issues.
1229
1230- *``unlisted-pkg-lics:``* Checks that all declared licenses applying
1231 for a package are also declared on the recipe level (i.e. any license
1232 in ``LICENSE_*`` should appear in ```LICENSE`` <#var-LICENSE>`__).
1233
1234- *``useless-rpaths:``* Checks for dynamic library load paths (rpaths)
1235 in the binaries that by default on a standard system are searched by
1236 the linker (e.g. ``/lib`` and ``/usr/lib``). While these paths will
1237 not cause any breakage, they do waste space and are unnecessary.
1238
1239- *``var-undefined:``* Reports when variables fundamental to packaging
1240 (i.e. ```WORKDIR`` <#var-WORKDIR>`__,
1241 ```DEPLOY_DIR`` <#var-DEPLOY_DIR>`__, ```D`` <#var-D>`__,
1242 ```PN`` <#var-PN>`__, and ```PKGD`` <#var-PKGD>`__) are undefined
1243 during ```do_package`` <#ref-tasks-package>`__.
1244
1245- *``version-going-backwards:``* If Build History is enabled, reports
1246 when a package being written out has a lower version than the
1247 previously written package under the same name. If you are placing
1248 output packages into a feed and upgrading packages on a target system
1249 using that feed, the version of a package going backwards can result
1250 in the target system not correctly upgrading to the "new" version of
1251 the package.
1252
1253 .. note::
1254
1255 If you are not using runtime package management on your target
1256 system, then you do not need to worry about this situation.
1257
1258- *``xorg-driver-abi:``* Checks that all packages containing Xorg
1259 drivers have ABI dependencies. The ``xserver-xorg`` recipe provides
1260 driver ABI names. All drivers should depend on the ABI versions that
1261 they have been built against. Driver recipes that include
1262 ``xorg-driver-input.inc`` or ``xorg-driver-video.inc`` will
1263 automatically get these versions. Consequently, you should only need
1264 to explicitly add dependencies to binary driver recipes.
1265
1266.. _ref-classes-insserv:
1267
1268``insserv.bbclass``
1269===================
1270
1271The ``insserv`` class uses the ``insserv`` utility to update the order
1272of symbolic links in ``/etc/rc?.d/`` within an image based on
1273dependencies specified by LSB headers in the ``init.d`` scripts
1274themselves.
1275
1276.. _ref-classes-kernel:
1277
1278``kernel.bbclass``
1279==================
1280
1281The ``kernel`` class handles building Linux kernels. The class contains
1282code to build all kernel trees. All needed headers are staged into the
1283``STAGING_KERNEL_DIR`` directory to allow out-of-tree module builds
1284using the ```module`` <#ref-classes-module>`__ class.
1285
1286This means that each built kernel module is packaged separately and
1287inter-module dependencies are created by parsing the ``modinfo`` output.
1288If all modules are required, then installing the ``kernel-modules``
1289package installs all packages with modules and various other kernel
1290packages such as ``kernel-vmlinux``.
1291
1292The ``kernel`` class contains logic that allows you to embed an initial
1293RAM filesystem (initramfs) image when you build the kernel image. For
1294information on how to build an initramfs, see the "`Building an Initial
1295RAM Filesystem (initramfs)
1296Image <&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image>`__" section in
1297the Yocto Project Development Tasks Manual.
1298
1299Various other classes are used by the ``kernel`` and ``module`` classes
1300internally including the ```kernel-arch`` <#ref-classes-kernel-arch>`__,
1301```module-base`` <#ref-classes-module-base>`__, and
1302```linux-kernel-base`` <#ref-classes-linux-kernel-base>`__ classes.
1303
1304.. _ref-classes-kernel-arch:
1305
1306``kernel-arch.bbclass``
1307=======================
1308
1309The ``kernel-arch`` class sets the ``ARCH`` environment variable for
1310Linux kernel compilation (including modules).
1311
1312.. _ref-classes-kernel-devicetree:
1313
1314``kernel-devicetree.bbclass``
1315=============================
1316
1317The ``kernel-devicetree`` class, which is inherited by the
1318```kernel`` <#ref-classes-kernel>`__ class, supports device tree
1319generation.
1320
1321.. _ref-classes-kernel-fitimage:
1322
1323``kernel-fitimage.bbclass``
1324===========================
1325
1326The ``kernel-fitimage`` class provides support to pack a kernel Image,
1327device trees and a RAM disk into a single FIT image. In theory, a FIT
1328image can support any number of kernels, RAM disks and device-trees.
1329However, ``kernel-fitimage`` currently only supports
1330limited usescases: just one kernel image, an optional RAM disk, and
1331any number of device tree.
1332
1333To create a FIT image, it is required that :term:`KERNEL_CLASSES`
1334is set to "kernel-fitimage" and :term:`KERNEL_IMAGETYPE`
1335is set to "fitImage".
1336
1337The options for the device tree compiler passed to mkimage -D feature
1338when creating the FIT image are specified using the
1339:term:`UBOOT_MKIMAGE_DTCOPTS` variable.
1340
1341Only a single kernel can be added to the FIT image created by
1342``kernel-fitimage`` and the kernel image in FIT is mandatory. The
1343address where the kernel image is to be loaded by U-boot is
1344specified by :term:`UBOOT_LOADADDRESS` and the entrypoint by
1345:term:`UBOOT_ENTRYPOINT`.
1346
1347Multiple device trees can be added to the FIT image created by
1348``kernel-fitimage`` and the device tree is optional.
1349The address where the device tree is to be loaded by U-boot is
1350specified by :term:`UBOOT_DTBO_LOADADDRESS` for device tree overlays
1351and by `:term:`UBOOT_DTB_LOADADDRESS` for device tree binaries.
1352
1353Only a single RAM disk can be added to the FIT image created by
1354``kernel-fitimage`` and the RAM disk in FIT is optional.
1355The address where the RAM disk image is to be loaded by U-boot
1356is specified by :term:`UBOOT_RD_LOADADDRESS` and the entrypoint by
1357:term:`UBOOT_RD_ENTRYPOINT`. The ramdisk is added to FIT image when
1358:term:`INITRAMFS_IMAGE` is specified.
1359
1360The FIT image generated by ``kernel-fitimage`` class is signed when the
1361variables :term:`UBOOT_SIGN_ENABLE`, :term:`UBOOT_MKIMAGE_DTCOPTS`,
1362:term:`UBOOT_SIGN_KEYDIR` and :term:`UBOOT_SIGN_KEYNAME` are set
1363appropriately. The default values used for :term:`FIT_HASH_ALG` and
1364:term:`FIT_SIGN_ALG` in ``kernel-fitimage`` are "sha256" and
1365"rsa2048" respectively.
1366
1367
1368.. _ref-classes-kernel-grub:
1369
1370``kernel-grub.bbclass``
1371=======================
1372
1373The ``kernel-grub`` class updates the boot area and the boot menu with
1374the kernel as the priority boot mechanism while installing a RPM to
1375update the kernel on a deployed target.
1376
1377.. _ref-classes-kernel-module-split:
1378
1379``kernel-module-split.bbclass``
1380===============================
1381
1382The ``kernel-module-split`` class provides common functionality for
1383splitting Linux kernel modules into separate packages.
1384
1385.. _ref-classes-kernel-uboot:
1386
1387``kernel-uboot.bbclass``
1388========================
1389
1390The ``kernel-uboot`` class provides support for building from
1391vmlinux-style kernel sources.
1392
1393.. _ref-classes-kernel-uimage:
1394
1395``kernel-uimage.bbclass``
1396=========================
1397
1398The ``kernel-uimage`` class provides support to pack uImage.
1399
1400.. _ref-classes-kernel-yocto:
1401
1402``kernel-yocto.bbclass``
1403========================
1404
1405The ``kernel-yocto`` class provides common functionality for building
1406from linux-yocto style kernel source repositories.
1407
1408.. _ref-classes-kernelsrc:
1409
1410``kernelsrc.bbclass``
1411=====================
1412
1413The ``kernelsrc`` class sets the Linux kernel source and version.
1414
1415.. _ref-classes-lib_package:
1416
1417``lib_package.bbclass``
1418=======================
1419
1420The ``lib_package`` class supports recipes that build libraries and
1421produce executable binaries, where those binaries should not be
1422installed by default along with the library. Instead, the binaries are
1423added to a separate ``${``\ ```PN`` <#var-PN>`__\ ``}-bin`` package to
1424make their installation optional.
1425
1426.. _ref-classes-libc*:
1427
1428``libc*.bbclass``
1429=================
1430
1431The ``libc*`` classes support recipes that build packages with ``libc``:
1432
1433- The ``libc-common`` class provides common support for building with
1434 ``libc``.
1435
1436- The ``libc-package`` class supports packaging up ``glibc`` and
1437 ``eglibc``.
1438
1439.. _ref-classes-license:
1440
1441``license.bbclass``
1442===================
1443
1444The ``license`` class provides license manifest creation and license
1445exclusion. This class is enabled by default using the default value for
1446the ```INHERIT_DISTRO`` <#var-INHERIT_DISTRO>`__ variable.
1447
1448.. _ref-classes-linux-kernel-base:
1449
1450``linux-kernel-base.bbclass``
1451=============================
1452
1453The ``linux-kernel-base`` class provides common functionality for
1454recipes that build out of the Linux kernel source tree. These builds
1455goes beyond the kernel itself. For example, the Perf recipe also
1456inherits this class.
1457
1458.. _ref-classes-linuxloader:
1459
1460``linuxloader.bbclass``
1461=======================
1462
1463Provides the function ``linuxloader()``, which gives the value of the
1464dynamic loader/linker provided on the platform. This value is used by a
1465number of other classes.
1466
1467.. _ref-classes-logging:
1468
1469``logging.bbclass``
1470===================
1471
1472The ``logging`` class provides the standard shell functions used to log
1473messages for various BitBake severity levels (i.e. ``bbplain``,
1474``bbnote``, ``bbwarn``, ``bberror``, ``bbfatal``, and ``bbdebug``).
1475
1476This class is enabled by default since it is inherited by the ``base``
1477class.
1478
1479.. _ref-classes-meta:
1480
1481``meta.bbclass``
1482================
1483
1484The ``meta`` class is inherited by recipes that do not build any output
1485packages themselves, but act as a "meta" target for building other
1486recipes.
1487
1488.. _ref-classes-metadata_scm:
1489
1490``metadata_scm.bbclass``
1491========================
1492
1493The ``metadata_scm`` class provides functionality for querying the
1494branch and revision of a Source Code Manager (SCM) repository.
1495
1496The ```base`` <#ref-classes-base>`__ class uses this class to print the
1497revisions of each layer before starting every build. The
1498``metadata_scm`` class is enabled by default because it is inherited by
1499the ``base`` class.
1500
1501.. _ref-classes-migrate_localcount:
1502
1503``migrate_localcount.bbclass``
1504==============================
1505
1506The ``migrate_localcount`` class verifies a recipe's localcount data and
1507increments it appropriately.
1508
1509.. _ref-classes-mime:
1510
1511``mime.bbclass``
1512================
1513
1514The ``mime`` class generates the proper post-install and post-remove
1515(postinst/postrm) scriptlets for packages that install MIME type files.
1516These scriptlets call ``update-mime-database`` to add the MIME types to
1517the shared database.
1518
1519.. _ref-classes-mirrors:
1520
1521``mirrors.bbclass``
1522===================
1523
1524The ``mirrors`` class sets up some standard
1525```MIRRORS`` <#var-MIRRORS>`__ entries for source code mirrors. These
1526mirrors provide a fall-back path in case the upstream source specified
1527in ```SRC_URI`` <#var-SRC_URI>`__ within recipes is unavailable.
1528
1529This class is enabled by default since it is inherited by the
1530```base`` <#ref-classes-base>`__ class.
1531
1532.. _ref-classes-module:
1533
1534``module.bbclass``
1535==================
1536
1537The ``module`` class provides support for building out-of-tree Linux
1538kernel modules. The class inherits the
1539```module-base`` <#ref-classes-module-base>`__ and
1540```kernel-module-split`` <#ref-classes-kernel-module-split>`__ classes,
1541and implements the ```do_compile`` <#ref-tasks-compile>`__ and
1542```do_install`` <#ref-tasks-install>`__ tasks. The class provides
1543everything needed to build and package a kernel module.
1544
1545For general information on out-of-tree Linux kernel modules, see the
1546"`Incorporating Out-of-Tree
1547Modules <&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules>`__"
1548section in the Yocto Project Linux Kernel Development Manual.
1549
1550.. _ref-classes-module-base:
1551
1552``module-base.bbclass``
1553=======================
1554
1555The ``module-base`` class provides the base functionality for building
1556Linux kernel modules. Typically, a recipe that builds software that
1557includes one or more kernel modules and has its own means of building
1558the module inherits this class as opposed to inheriting the
1559```module`` <#ref-classes-module>`__ class.
1560
1561.. _ref-classes-multilib*:
1562
1563``multilib*.bbclass``
1564=====================
1565
1566The ``multilib*`` classes provide support for building libraries with
1567different target optimizations or target architectures and installing
1568them side-by-side in the same image.
1569
1570For more information on using the Multilib feature, see the "`Combining
1571Multiple Versions of Library Files into One
1572Image <&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image>`__"
1573section in the Yocto Project Development Tasks Manual.
1574
1575.. _ref-classes-native:
1576
1577``native.bbclass``
1578==================
1579
1580The ``native`` class provides common functionality for recipes that
1581build tools to run on the `build host <#hardware-build-system-term>`__
1582(i.e. tools that use the compiler or other tools from the build host).
1583
1584You can create a recipe that builds tools that run natively on the host
1585a couple different ways:
1586
1587- Create a myrecipe\ ``-native.bb`` recipe that inherits the ``native``
1588 class. If you use this method, you must order the inherit statement
1589 in the recipe after all other inherit statements so that the
1590 ``native`` class is inherited last.
1591
1592 .. note::
1593
1594 When creating a recipe this way, the recipe name must follow this
1595 naming convention:
1596 ::
1597
1598 myrecipe-native.bb
1599
1600
1601 Not using this naming convention can lead to subtle problems
1602 caused by existing code that depends on that naming convention.
1603
1604- Create or modify a target recipe that contains the following:
1605 ```BBCLASSEXTEND`` <#var-BBCLASSEXTEND>`__ = "native" Inside the
1606 recipe, use ``_class-native`` and ``_class-target`` overrides to
1607 specify any functionality specific to the respective native or target
1608 case.
1609
1610Although applied differently, the ``native`` class is used with both
1611methods. The advantage of the second method is that you do not need to
1612have two separate recipes (assuming you need both) for native and
1613target. All common parts of the recipe are automatically shared.
1614
1615.. _ref-classes-nativesdk:
1616
1617``nativesdk.bbclass``
1618=====================
1619
1620The ``nativesdk`` class provides common functionality for recipes that
1621wish to build tools to run as part of an SDK (i.e. tools that run on
1622```SDKMACHINE`` <#var-SDKMACHINE>`__).
1623
1624You can create a recipe that builds tools that run on the SDK machine a
1625couple different ways:
1626
1627- Create a ``nativesdk-``\ myrecipe\ ``.bb`` recipe that inherits the
1628 ``nativesdk`` class. If you use this method, you must order the
1629 inherit statement in the recipe after all other inherit statements so
1630 that the ``nativesdk`` class is inherited last.
1631
1632- Create a ``nativesdk`` variant of any recipe by adding the following:
1633 ```BBCLASSEXTEND`` <#var-BBCLASSEXTEND>`__ = "nativesdk" Inside the
1634 recipe, use ``_class-nativesdk`` and ``_class-target`` overrides to
1635 specify any functionality specific to the respective SDK machine or
1636 target case.
1637
1638.. note::
1639
1640 When creating a recipe, you must follow this naming convention:
1641 ::
1642
1643 nativesdk-myrecipe.bb
1644
1645
1646 Not doing so can lead to subtle problems because code exists that
1647 depends on the naming convention.
1648
1649Although applied differently, the ``nativesdk`` class is used with both
1650methods. The advantage of the second method is that you do not need to
1651have two separate recipes (assuming you need both) for the SDK machine
1652and the target. All common parts of the recipe are automatically shared.
1653
1654.. _ref-classes-nopackages:
1655
1656``nopackages.bbclass``
1657======================
1658
1659Disables packaging tasks for those recipes and classes where packaging
1660is not needed.
1661
1662.. _ref-classes-npm:
1663
1664``npm.bbclass``
1665===============
1666
1667Provides support for building Node.js software fetched using the `node
1668package manager (NPM) <https://en.wikipedia.org/wiki/Npm_(software)>`__.
1669
1670.. note::
1671
1672 Currently, recipes inheriting this class must use the
1673 npm://
1674 fetcher to have dependencies fetched and packaged automatically.
1675
1676For information on how to create NPM packages, see the "`Creating Node
1677Package Manager (NPM)
1678Packages <&YOCTO_DOCS_DEV_URL;#creating-node-package-manager-npm-packages>`__"
1679section in the Yocto Project Development Tasks Manual.
1680
1681.. _ref-classes-oelint:
1682
1683``oelint.bbclass``
1684==================
1685
1686The ``oelint`` class is an obsolete lint checking tool that exists in
1687``meta/classes`` in the `Source Directory <#source-directory>`__.
1688
1689A number of classes exist that could be generally useful in OE-Core but
1690are never actually used within OE-Core itself. The ``oelint`` class is
1691one such example. However, being aware of this class can reduce the
1692proliferation of different versions of similar classes across multiple
1693layers.
1694
1695.. _ref-classes-own-mirrors:
1696
1697``own-mirrors.bbclass``
1698=======================
1699
1700The ``own-mirrors`` class makes it easier to set up your own
1701```PREMIRRORS`` <#var-PREMIRRORS>`__ from which to first fetch source
1702before attempting to fetch it from the upstream specified in
1703```SRC_URI`` <#var-SRC_URI>`__ within each recipe.
1704
1705To use this class, inherit it globally and specify
1706```SOURCE_MIRROR_URL`` <#var-SOURCE_MIRROR_URL>`__. Here is an example:
1707INHERIT += "own-mirrors" SOURCE_MIRROR_URL =
1708"http://example.com/my-source-mirror" You can specify only a single URL
1709in ``SOURCE_MIRROR_URL``.
1710
1711.. _ref-classes-package:
1712
1713``package.bbclass``
1714===================
1715
1716The ``package`` class supports generating packages from a build's
1717output. The core generic functionality is in ``package.bbclass``. The
1718code specific to particular package types resides in these
1719package-specific classes:
1720```package_deb`` <#ref-classes-package_deb>`__,
1721```package_rpm`` <#ref-classes-package_rpm>`__,
1722```package_ipk`` <#ref-classes-package_ipk>`__, and
1723```package_tar`` <#ref-classes-package_tar>`__.
1724
1725.. note::
1726
1727 The
1728 package_tar
1729 class is broken and not supported. It is recommended that you do not
1730 use this class.
1731
1732You can control the list of resulting package formats by using the
1733``PACKAGE_CLASSES`` variable defined in your ``conf/local.conf``
1734configuration file, which is located in the `Build
1735Directory <#build-directory>`__. When defining the variable, you can
1736specify one or more package types. Since images are generated from
1737packages, a packaging class is needed to enable image generation. The
1738first class listed in this variable is used for image generation.
1739
1740If you take the optional step to set up a repository (package feed) on
1741the development host that can be used by DNF, you can install packages
1742from the feed while you are running the image on the target (i.e.
1743runtime installation of packages). For more information, see the "`Using
1744Runtime Package
1745Management <&YOCTO_DOCS_DEV_URL;#using-runtime-package-management>`__"
1746section in the Yocto Project Development Tasks Manual.
1747
1748The package-specific class you choose can affect build-time performance
1749and has space ramifications. In general, building a package with IPK
1750takes about thirty percent less time as compared to using RPM to build
1751the same or similar package. This comparison takes into account a
1752complete build of the package with all dependencies previously built.
1753The reason for this discrepancy is because the RPM package manager
1754creates and processes more `Metadata <#metadata>`__ than the IPK package
1755manager. Consequently, you might consider setting ``PACKAGE_CLASSES`` to
1756"package_ipk" if you are building smaller systems.
1757
1758Before making your package manager decision, however, you should
1759consider some further things about using RPM:
1760
1761- RPM starts to provide more abilities than IPK due to the fact that it
1762 processes more Metadata. For example, this information includes
1763 individual file types, file checksum generation and evaluation on
1764 install, sparse file support, conflict detection and resolution for
1765 Multilib systems, ACID style upgrade, and repackaging abilities for
1766 rollbacks.
1767
1768- For smaller systems, the extra space used for the Berkeley Database
1769 and the amount of metadata when using RPM can affect your ability to
1770 perform on-device upgrades.
1771
1772You can find additional information on the effects of the package class
1773at these two Yocto Project mailing list links:
1774
1775- `https://lists.yoctoproject.org/pipermail/poky/2011-May/006362.html <&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006362.html>`__
1776
1777- `https://lists.yoctoproject.org/pipermail/poky/2011-May/006363.html <&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006363.html>`__
1778
1779.. _ref-classes-package_deb:
1780
1781``package_deb.bbclass``
1782=======================
1783
1784The ``package_deb`` class provides support for creating packages that
1785use the Debian (i.e. ``.deb``) file format. The class ensures the
1786packages are written out in a ``.deb`` file format to the
1787``${``\ ```DEPLOY_DIR_DEB`` <#var-DEPLOY_DIR_DEB>`__\ ``}`` directory.
1788
1789This class inherits the ```package`` <#ref-classes-package>`__ class and
1790is enabled through the ```PACKAGE_CLASSES`` <#var-PACKAGE_CLASSES>`__
1791variable in the ``local.conf`` file.
1792
1793.. _ref-classes-package_ipk:
1794
1795``package_ipk.bbclass``
1796=======================
1797
1798The ``package_ipk`` class provides support for creating packages that
1799use the IPK (i.e. ``.ipk``) file format. The class ensures the packages
1800are written out in a ``.ipk`` file format to the
1801``${``\ ```DEPLOY_DIR_IPK`` <#var-DEPLOY_DIR_IPK>`__\ ``}`` directory.
1802
1803This class inherits the ```package`` <#ref-classes-package>`__ class and
1804is enabled through the ```PACKAGE_CLASSES`` <#var-PACKAGE_CLASSES>`__
1805variable in the ``local.conf`` file.
1806
1807.. _ref-classes-package_rpm:
1808
1809``package_rpm.bbclass``
1810=======================
1811
1812The ``package_rpm`` class provides support for creating packages that
1813use the RPM (i.e. ``.rpm``) file format. The class ensures the packages
1814are written out in a ``.rpm`` file format to the
1815``${``\ ```DEPLOY_DIR_RPM`` <#var-DEPLOY_DIR_RPM>`__\ ``}`` directory.
1816
1817This class inherits the ```package`` <#ref-classes-package>`__ class and
1818is enabled through the ```PACKAGE_CLASSES`` <#var-PACKAGE_CLASSES>`__
1819variable in the ``local.conf`` file.
1820
1821.. _ref-classes-package_tar:
1822
1823``package_tar.bbclass``
1824=======================
1825
1826The ``package_tar`` class provides support for creating tarballs. The
1827class ensures the packages are written out in a tarball format to the
1828``${``\ ```DEPLOY_DIR_TAR`` <#var-DEPLOY_DIR_TAR>`__\ ``}`` directory.
1829
1830This class inherits the ```package`` <#ref-classes-package>`__ class and
1831is enabled through the ```PACKAGE_CLASSES`` <#var-PACKAGE_CLASSES>`__
1832variable in the ``local.conf`` file.
1833
1834.. note::
1835
1836 You cannot specify the
1837 package_tar
1838 class first using the
1839 PACKAGE_CLASSES
1840 variable. You must use
1841 .deb
1842 ,
1843 .ipk
1844 , or
1845 .rpm
1846 file formats for your image or SDK.
1847
1848.. _ref-classes-packagedata:
1849
1850``packagedata.bbclass``
1851=======================
1852
1853The ``packagedata`` class provides common functionality for reading
1854``pkgdata`` files found in ```PKGDATA_DIR`` <#var-PKGDATA_DIR>`__. These
1855files contain information about each output package produced by the
1856OpenEmbedded build system.
1857
1858This class is enabled by default because it is inherited by the
1859```package`` <#ref-classes-package>`__ class.
1860
1861.. _ref-classes-packagegroup:
1862
1863``packagegroup.bbclass``
1864========================
1865
1866The ``packagegroup`` class sets default values appropriate for package
1867group recipes (e.g. ``PACKAGES``, ``PACKAGE_ARCH``, ``ALLOW_EMPTY``, and
1868so forth). It is highly recommended that all package group recipes
1869inherit this class.
1870
1871For information on how to use this class, see the "`Customizing Images
1872Using Custom Package
1873Groups <&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-customtasks>`__"
1874section in the Yocto Project Development Tasks Manual.
1875
1876Previously, this class was called the ``task`` class.
1877
1878.. _ref-classes-patch:
1879
1880``patch.bbclass``
1881=================
1882
1883The ``patch`` class provides all functionality for applying patches
1884during the ```do_patch`` <#ref-tasks-patch>`__ task.
1885
1886This class is enabled by default because it is inherited by the
1887```base`` <#ref-classes-base>`__ class.
1888
1889.. _ref-classes-perlnative:
1890
1891``perlnative.bbclass``
1892======================
1893
1894When inherited by a recipe, the ``perlnative`` class supports using the
1895native version of Perl built by the build system rather than using the
1896version provided by the build host.
1897
1898.. _ref-classes-pixbufcache:
1899
1900``pixbufcache.bbclass``
1901=======================
1902
1903The ``pixbufcache`` class generates the proper post-install and
1904post-remove (postinst/postrm) scriptlets for packages that install
1905pixbuf loaders, which are used with ``gdk-pixbuf``. These scriptlets
1906call ``update_pixbuf_cache`` to add the pixbuf loaders to the cache.
1907Since the cache files are architecture-specific, ``update_pixbuf_cache``
1908is run using QEMU if the postinst scriptlets need to be run on the build
1909host during image creation.
1910
1911If the pixbuf loaders being installed are in packages other than the
1912recipe's main package, set
1913```PIXBUF_PACKAGES`` <#var-PIXBUF_PACKAGES>`__ to specify the packages
1914containing the loaders.
1915
1916.. _ref-classes-pkgconfig:
1917
1918``pkgconfig.bbclass``
1919=====================
1920
1921The ``pkgconfig`` class provides a standard way to get header and
1922library information by using ``pkg-config``. This class aims to smooth
1923integration of ``pkg-config`` into libraries that use it.
1924
1925During staging, BitBake installs ``pkg-config`` data into the
1926``sysroots/`` directory. By making use of sysroot functionality within
1927``pkg-config``, the ``pkgconfig`` class no longer has to manipulate the
1928files.
1929
1930.. _ref-classes-populate-sdk:
1931
1932``populate_sdk.bbclass``
1933========================
1934
1935The ``populate_sdk`` class provides support for SDK-only recipes. For
1936information on advantages gained when building a cross-development
1937toolchain using the ```do_populate_sdk`` <#ref-tasks-populate_sdk>`__
1938task, see the "`Building an SDK
1939Installer <&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer>`__"
1940section in the Yocto Project Application Development and the Extensible
1941Software Development Kit (eSDK) manual.
1942
1943.. _ref-classes-populate-sdk-*:
1944
1945``populate_sdk_*.bbclass``
1946==========================
1947
1948The ``populate_sdk_*`` classes support SDK creation and consist of the
1949following classes:
1950
1951- *``populate_sdk_base``:* The base class supporting SDK creation under
1952 all package managers (i.e. DEB, RPM, and opkg).
1953
1954- *``populate_sdk_deb``:* Supports creation of the SDK given the Debian
1955 package manager.
1956
1957- *``populate_sdk_rpm``:* Supports creation of the SDK given the RPM
1958 package manager.
1959
1960- *``populate_sdk_ipk``:* Supports creation of the SDK given the opkg
1961 (IPK format) package manager.
1962
1963- *``populate_sdk_ext``:* Supports extensible SDK creation under all
1964 package managers.
1965
1966The ``populate_sdk_base`` class inherits the appropriate
1967``populate_sdk_*`` (i.e. ``deb``, ``rpm``, and ``ipk``) based on
1968```IMAGE_PKGTYPE`` <#var-IMAGE_PKGTYPE>`__.
1969
1970The base class ensures all source and destination directories are
1971established and then populates the SDK. After populating the SDK, the
1972``populate_sdk_base`` class constructs two sysroots:
1973``${``\ ```SDK_ARCH`` <#var-SDK_ARCH>`__\ ``}-nativesdk``, which
1974contains the cross-compiler and associated tooling, and the target,
1975which contains a target root filesystem that is configured for the SDK
1976usage. These two images reside in ```SDK_OUTPUT`` <#var-SDK_OUTPUT>`__,
1977which consists of the following:
1978${SDK_OUTPUT}/${SDK_ARCH}-nativesdk-pkgs
1979${SDK_OUTPUT}/${SDKTARGETSYSROOT}/target-pkgs
1980
1981Finally, the base populate SDK class creates the toolchain environment
1982setup script, the tarball of the SDK, and the installer.
1983
1984The respective ``populate_sdk_deb``, ``populate_sdk_rpm``, and
1985``populate_sdk_ipk`` classes each support the specific type of SDK.
1986These classes are inherited by and used with the ``populate_sdk_base``
1987class.
1988
1989For more information on the cross-development toolchain generation, see
1990the "`Cross-Development Toolchain
1991Generation <&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation>`__"
1992section in the Yocto Project Overview and Concepts Manual. For
1993information on advantages gained when building a cross-development
1994toolchain using the ```do_populate_sdk`` <#ref-tasks-populate_sdk>`__
1995task, see the "`Building an SDK
1996Installer <&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer>`__"
1997section in the Yocto Project Application Development and the Extensible
1998Software Development Kit (eSDK) manual.
1999
2000.. _ref-classes-prexport:
2001
2002``prexport.bbclass``
2003====================
2004
2005The ``prexport`` class provides functionality for exporting
2006```PR`` <#var-PR>`__ values.
2007
2008.. note::
2009
2010 This class is not intended to be used directly. Rather, it is enabled
2011 when using "
2012 bitbake-prserv-tool export
2013 ".
2014
2015.. _ref-classes-primport:
2016
2017``primport.bbclass``
2018====================
2019
2020The ``primport`` class provides functionality for importing
2021```PR`` <#var-PR>`__ values.
2022
2023.. note::
2024
2025 This class is not intended to be used directly. Rather, it is enabled
2026 when using "
2027 bitbake-prserv-tool import
2028 ".
2029
2030.. _ref-classes-prserv:
2031
2032``prserv.bbclass``
2033==================
2034
2035The ``prserv`` class provides functionality for using a `PR
2036service <&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service>`__ in order to
2037automatically manage the incrementing of the ```PR`` <#var-PR>`__
2038variable for each recipe.
2039
2040This class is enabled by default because it is inherited by the
2041```package`` <#ref-classes-package>`__ class. However, the OpenEmbedded
2042build system will not enable the functionality of this class unless
2043```PRSERV_HOST`` <#var-PRSERV_HOST>`__ has been set.
2044
2045.. _ref-classes-ptest:
2046
2047``ptest.bbclass``
2048=================
2049
2050The ``ptest`` class provides functionality for packaging and installing
2051runtime tests for recipes that build software that provides these tests.
2052
2053This class is intended to be inherited by individual recipes. However,
2054the class' functionality is largely disabled unless "ptest" appears in
2055```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__. See the "`Testing
2056Packages With
2057ptest <&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest>`__" section in
2058the Yocto Project Development Tasks Manual for more information on
2059ptest.
2060
2061.. _ref-classes-ptest-gnome:
2062
2063``ptest-gnome.bbclass``
2064=======================
2065
2066Enables package tests (ptests) specifically for GNOME packages, which
2067have tests intended to be executed with ``gnome-desktop-testing``.
2068
2069For information on setting up and running ptests, see the "`Testing
2070Packages With
2071ptest <&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest>`__" section in
2072the Yocto Project Development Tasks Manual.
2073
2074.. _ref-classes-python-dir:
2075
2076``python-dir.bbclass``
2077======================
2078
2079The ``python-dir`` class provides the base version, location, and site
2080package location for Python.
2081
2082.. _ref-classes-python3native:
2083
2084``python3native.bbclass``
2085=========================
2086
2087The ``python3native`` class supports using the native version of Python
20883 built by the build system rather than support of the version provided
2089by the build host.
2090
2091.. _ref-classes-pythonnative:
2092
2093``pythonnative.bbclass``
2094========================
2095
2096When inherited by a recipe, the ``pythonnative`` class supports using
2097the native version of Python built by the build system rather than using
2098the version provided by the build host.
2099
2100.. _ref-classes-qemu:
2101
2102``qemu.bbclass``
2103================
2104
2105The ``qemu`` class provides functionality for recipes that either need
2106QEMU or test for the existence of QEMU. Typically, this class is used to
2107run programs for a target system on the build host using QEMU's
2108application emulation mode.
2109
2110.. _ref-classes-recipe_sanity:
2111
2112``recipe_sanity.bbclass``
2113=========================
2114
2115The ``recipe_sanity`` class checks for the presence of any host system
2116recipe prerequisites that might affect the build (e.g. variables that
2117are set or software that is present).
2118
2119.. _ref-classes-relocatable:
2120
2121``relocatable.bbclass``
2122=======================
2123
2124The ``relocatable`` class enables relocation of binaries when they are
2125installed into the sysroot.
2126
2127This class makes use of the ```chrpath`` <#ref-classes-chrpath>`__ class
2128and is used by both the ```cross`` <#ref-classes-cross>`__ and
2129```native`` <#ref-classes-native>`__ classes.
2130
2131.. _ref-classes-remove-libtool:
2132
2133``remove-libtool.bbclass``
2134==========================
2135
2136The ``remove-libtool`` class adds a post function to the
2137```do_install`` <#ref-tasks-install>`__ task to remove all ``.la`` files
2138installed by ``libtool``. Removing these files results in them being
2139absent from both the sysroot and target packages.
2140
2141If a recipe needs the ``.la`` files to be installed, then the recipe can
2142override the removal by setting ``REMOVE_LIBTOOL_LA`` to "0" as follows:
2143REMOVE_LIBTOOL_LA = "0"
2144
2145.. note::
2146
2147 The
2148 remove-libtool
2149 class is not enabled by default.
2150
2151.. _ref-classes-report-error:
2152
2153``report-error.bbclass``
2154========================
2155
2156The ``report-error`` class supports enabling the `error reporting
2157tool <&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool>`__, which
2158allows you to submit build error information to a central database.
2159
2160The class collects debug information for recipe, recipe version, task,
2161machine, distro, build system, target system, host distro, branch,
2162commit, and log. From the information, report files using a JSON format
2163are created and stored in
2164``${``\ ```LOG_DIR`` <#var-LOG_DIR>`__\ ``}/error-report``.
2165
2166.. _ref-classes-rm-work:
2167
2168``rm_work.bbclass``
2169===================
2170
2171The ``rm_work`` class supports deletion of temporary workspace, which
2172can ease your hard drive demands during builds.
2173
2174The OpenEmbedded build system can use a substantial amount of disk space
2175during the build process. A portion of this space is the work files
2176under the ``${TMPDIR}/work`` directory for each recipe. Once the build
2177system generates the packages for a recipe, the work files for that
2178recipe are no longer needed. However, by default, the build system
2179preserves these files for inspection and possible debugging purposes. If
2180you would rather have these files deleted to save disk space as the
2181build progresses, you can enable ``rm_work`` by adding the following to
2182your ``local.conf`` file, which is found in the `Build
2183Directory <#build-directory>`__. INHERIT += "rm_work" If you are
2184modifying and building source code out of the work directory for a
2185recipe, enabling ``rm_work`` will potentially result in your changes to
2186the source being lost. To exclude some recipes from having their work
2187directories deleted by ``rm_work``, you can add the names of the recipe
2188or recipes you are working on to the ``RM_WORK_EXCLUDE`` variable, which
2189can also be set in your ``local.conf`` file. Here is an example:
2190RM_WORK_EXCLUDE += "busybox glibc"
2191
2192.. _ref-classes-rootfs*:
2193
2194``rootfs*.bbclass``
2195===================
2196
2197The ``rootfs*`` classes support creating the root filesystem for an
2198image and consist of the following classes:
2199
2200- The ``rootfs-postcommands`` class, which defines filesystem
2201 post-processing functions for image recipes.
2202
2203- The ``rootfs_deb`` class, which supports creation of root filesystems
2204 for images built using ``.deb`` packages.
2205
2206- The ``rootfs_rpm`` class, which supports creation of root filesystems
2207 for images built using ``.rpm`` packages.
2208
2209- The ``rootfs_ipk`` class, which supports creation of root filesystems
2210 for images built using ``.ipk`` packages.
2211
2212- The ``rootfsdebugfiles`` class, which installs additional files found
2213 on the build host directly into the root filesystem.
2214
2215The root filesystem is created from packages using one of the
2216``rootfs*.bbclass`` files as determined by the
2217```PACKAGE_CLASSES`` <#var-PACKAGE_CLASSES>`__ variable.
2218
2219For information on how root filesystem images are created, see the
2220"`Image
2221Generation <&YOCTO_DOCS_OM_URL;#image-generation-dev-environment>`__"
2222section in the Yocto Project Overview and Concepts Manual.
2223
2224.. _ref-classes-sanity:
2225
2226``sanity.bbclass``
2227==================
2228
2229The ``sanity`` class checks to see if prerequisite software is present
2230on the host system so that users can be notified of potential problems
2231that might affect their build. The class also performs basic user
2232configuration checks from the ``local.conf`` configuration file to
2233prevent common mistakes that cause build failures. Distribution policy
2234usually determines whether to include this class.
2235
2236.. _ref-classes-scons:
2237
2238``scons.bbclass``
2239=================
2240
2241The ``scons`` class supports recipes that need to build software that
2242uses the SCons build system. You can use the
2243```EXTRA_OESCONS`` <#var-EXTRA_OESCONS>`__ variable to specify
2244additional configuration options you want to pass SCons command line.
2245
2246.. _ref-classes-sdl:
2247
2248``sdl.bbclass``
2249===============
2250
2251The ``sdl`` class supports recipes that need to build software that uses
2252the Simple DirectMedia Layer (SDL) library.
2253
2254.. _ref-classes-setuptools:
2255
2256``setuptools.bbclass``
2257======================
2258
2259The ``setuptools`` class supports Python version 2.x extensions that use
2260build systems based on ``setuptools``. If your recipe uses these build
2261systems, the recipe needs to inherit the ``setuptools`` class.
2262
2263.. _ref-classes-setuptools3:
2264
2265``setuptools3.bbclass``
2266=======================
2267
2268The ``setuptools3`` class supports Python version 3.x extensions that
2269use build systems based on ``setuptools3``. If your recipe uses these
2270build systems, the recipe needs to inherit the ``setuptools3`` class.
2271
2272.. _ref-classes-sign_rpm:
2273
2274``sign_rpm.bbclass``
2275====================
2276
2277The ``sign_rpm`` class supports generating signed RPM packages.
2278
2279.. _ref-classes-sip:
2280
2281``sip.bbclass``
2282===============
2283
2284The ``sip`` class supports recipes that build or package SIP-based
2285Python bindings.
2286
2287.. _ref-classes-siteconfig:
2288
2289``siteconfig.bbclass``
2290======================
2291
2292The ``siteconfig`` class provides functionality for handling site
2293configuration. The class is used by the
2294```autotools`` <#ref-classes-autotools>`__ class to accelerate the
2295```do_configure`` <#ref-tasks-configure>`__ task.
2296
2297.. _ref-classes-siteinfo:
2298
2299``siteinfo.bbclass``
2300====================
2301
2302The ``siteinfo`` class provides information about the targets that might
2303be needed by other classes or recipes.
2304
2305As an example, consider Autotools, which can require tests that must
2306execute on the target hardware. Since this is not possible in general
2307when cross compiling, site information is used to provide cached test
2308results so these tests can be skipped over but still make the correct
2309values available. The ``meta/site directory`` contains test results
2310sorted into different categories such as architecture, endianness, and
2311the ``libc`` used. Site information provides a list of files containing
2312data relevant to the current build in the ``CONFIG_SITE`` variable that
2313Autotools automatically picks up.
2314
2315The class also provides variables like ``SITEINFO_ENDIANNESS`` and
2316``SITEINFO_BITS`` that can be used elsewhere in the metadata.
2317
2318.. _ref-classes-spdx:
2319
2320``spdx.bbclass``
2321================
2322
2323The ``spdx`` class integrates real-time license scanning, generation of
2324SPDX standard output, and verification of license information during the
2325build.
2326
2327.. note::
2328
2329 This class is currently at the prototype stage in the 1.6 release.
2330
2331.. _ref-classes-sstate:
2332
2333``sstate.bbclass``
2334==================
2335
2336The ``sstate`` class provides support for Shared State (sstate). By
2337default, the class is enabled through the
2338```INHERIT_DISTRO`` <#var-INHERIT_DISTRO>`__ variable's default value.
2339
2340For more information on sstate, see the "`Shared State
2341Cache <&YOCTO_DOCS_OM_URL;#shared-state-cache>`__" section in the Yocto
2342Project Overview and Concepts Manual.
2343
2344.. _ref-classes-staging:
2345
2346``staging.bbclass``
2347===================
2348
2349The ``staging`` class installs files into individual recipe work
2350directories for sysroots. The class contains the following key tasks:
2351
2352- The ```do_populate_sysroot`` <#ref-tasks-populate_sysroot>`__ task,
2353 which is responsible for handing the files that end up in the recipe
2354 sysroots.
2355
2356- The
2357 ```do_prepare_recipe_sysroot`` <#ref-tasks-prepare_recipe_sysroot>`__
2358 task (a "partner" task to the ``populate_sysroot`` task), which
2359 installs the files into the individual recipe work directories (i.e.
2360 ```WORKDIR`` <#var-WORKDIR>`__).
2361
2362The code in the ``staging`` class is complex and basically works in two
2363stages:
2364
2365- *Stage One:* The first stage addresses recipes that have files they
2366 want to share with other recipes that have dependencies on the
2367 originating recipe. Normally these dependencies are installed through
2368 the ```do_install`` <#ref-tasks-install>`__ task into
2369 ``${``\ ```D`` <#var-D>`__\ ``}``. The ``do_populate_sysroot`` task
2370 copies a subset of these files into ``${SYSROOT_DESTDIR}``. This
2371 subset of files is controlled by the
2372 ```SYSROOT_DIRS`` <#var-SYSROOT_DIRS>`__,
2373 ```SYSROOT_DIRS_NATIVE`` <#var-SYSROOT_DIRS_NATIVE>`__, and
2374 ```SYSROOT_DIRS_BLACKLIST`` <#var-SYSROOT_DIRS_BLACKLIST>`__
2375 variables.
2376
2377 .. note::
2378
2379 Additionally, a recipe can customize the files further by
2380 declaring a processing function in the
2381 SYSROOT_PREPROCESS_FUNCS
2382 variable.
2383
2384 A shared state (sstate) object is built from these files and the
2385 files are placed into a subdirectory of
2386 ```tmp/sysroots-components/`` <#structure-build-tmp-sysroots-components>`__.
2387 The files are scanned for hardcoded paths to the original
2388 installation location. If the location is found in text files, the
2389 hardcoded locations are replaced by tokens and a list of the files
2390 needing such replacements is created. These adjustments are referred
2391 to as "FIXMEs". The list of files that are scanned for paths is
2392 controlled by the ```SSTATE_SCAN_FILES`` <#var-SSTATE_SCAN_FILES>`__
2393 variable.
2394
2395- *Stage Two:* The second stage addresses recipes that want to use
2396 something from another recipe and declare a dependency on that recipe
2397 through the ```DEPENDS`` <#var-DEPENDS>`__ variable. The recipe will
2398 have a
2399 ```do_prepare_recipe_sysroot`` <#ref-tasks-prepare_recipe_sysroot>`__
2400 task and when this task executes, it creates the ``recipe-sysroot``
2401 and ``recipe-sysroot-native`` in the recipe work directory (i.e.
2402 ```WORKDIR`` <#var-WORKDIR>`__). The OpenEmbedded build system
2403 creates hard links to copies of the relevant files from
2404 ``sysroots-components`` into the recipe work directory.
2405
2406 .. note::
2407
2408 If hard links are not possible, the build system uses actual
2409 copies.
2410
2411 The build system then addresses any "FIXMEs" to paths as defined from
2412 the list created in the first stage.
2413
2414 Finally, any files in ``${bindir}`` within the sysroot that have the
2415 prefix "``postinst-``" are executed.
2416
2417 .. note::
2418
2419 Although such sysroot post installation scripts are not
2420 recommended for general use, the files do allow some issues such
2421 as user creation and module indexes to be addressed.
2422
2423 Because recipes can have other dependencies outside of ``DEPENDS``
2424 (e.g. ``do_unpack[depends] += "tar-native:do_populate_sysroot"``),
2425 the sysroot creation function ``extend_recipe_sysroot`` is also added
2426 as a pre-function for those tasks whose dependencies are not through
2427 ``DEPENDS`` but operate similarly.
2428
2429 When installing dependencies into the sysroot, the code traverses the
2430 dependency graph and processes dependencies in exactly the same way
2431 as the dependencies would or would not be when installed from sstate.
2432 This processing means, for example, a native tool would have its
2433 native dependencies added but a target library would not have its
2434 dependencies traversed or installed. The same sstate dependency code
2435 is used so that builds should be identical regardless of whether
2436 sstate was used or not. For a closer look, see the
2437 ``setscene_depvalid()`` function in the
2438 ```sstate`` <#ref-classes-sstate>`__ class.
2439
2440 The build system is careful to maintain manifests of the files it
2441 installs so that any given dependency can be installed as needed. The
2442 sstate hash of the installed item is also stored so that if it
2443 changes, the build system can reinstall it.
2444
2445.. _ref-classes-syslinux:
2446
2447``syslinux.bbclass``
2448====================
2449
2450The ``syslinux`` class provides syslinux-specific functions for building
2451bootable images.
2452
2453The class supports the following variables:
2454
2455- ```INITRD`` <#var-INITRD>`__: Indicates list of filesystem images to
2456 concatenate and use as an initial RAM disk (initrd). This variable is
2457 optional.
2458
2459- ```ROOTFS`` <#var-ROOTFS>`__: Indicates a filesystem image to include
2460 as the root filesystem. This variable is optional.
2461
2462- ```AUTO_SYSLINUXMENU`` <#var-AUTO_SYSLINUXMENU>`__: Enables creating
2463 an automatic menu when set to "1".
2464
2465- ```LABELS`` <#var-LABELS>`__: Lists targets for automatic
2466 configuration.
2467
2468- ```APPEND`` <#var-APPEND>`__: Lists append string overrides for each
2469 label.
2470
2471- ```SYSLINUX_OPTS`` <#var-SYSLINUX_OPTS>`__: Lists additional options
2472 to add to the syslinux file. Semicolon characters separate multiple
2473 options.
2474
2475- ```SYSLINUX_SPLASH`` <#var-SYSLINUX_SPLASH>`__: Lists a background
2476 for the VGA boot menu when you are using the boot menu.
2477
2478- ```SYSLINUX_DEFAULT_CONSOLE`` <#var-SYSLINUX_DEFAULT_CONSOLE>`__: Set
2479 to "console=ttyX" to change kernel boot default console.
2480
2481- ```SYSLINUX_SERIAL`` <#var-SYSLINUX_SERIAL>`__: Sets an alternate
2482 serial port. Or, turns off serial when the variable is set with an
2483 empty string.
2484
2485- ```SYSLINUX_SERIAL_TTY`` <#var-SYSLINUX_SERIAL_TTY>`__: Sets an
2486 alternate "console=tty..." kernel boot argument.
2487
2488.. _ref-classes-systemd:
2489
2490``systemd.bbclass``
2491===================
2492
2493The ``systemd`` class provides support for recipes that install systemd
2494unit files.
2495
2496The functionality for this class is disabled unless you have "systemd"
2497in ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__.
2498
2499Under this class, the recipe or Makefile (i.e. whatever the recipe is
2500calling during the ```do_install`` <#ref-tasks-install>`__ task)
2501installs unit files into
2502``${``\ ```D`` <#var-D>`__\ ``}${systemd_unitdir}/system``. If the unit
2503files being installed go into packages other than the main package, you
2504need to set ```SYSTEMD_PACKAGES`` <#var-SYSTEMD_PACKAGES>`__ in your
2505recipe to identify the packages in which the files will be installed.
2506
2507You should set ```SYSTEMD_SERVICE`` <#var-SYSTEMD_SERVICE>`__ to the
2508name of the service file. You should also use a package name override to
2509indicate the package to which the value applies. If the value applies to
2510the recipe's main package, use ``${``\ ```PN`` <#var-PN>`__\ ``}``. Here
2511is an example from the connman recipe: SYSTEMD_SERVICE_${PN} =
2512"connman.service" Services are set up to start on boot automatically
2513unless you have set
2514```SYSTEMD_AUTO_ENABLE`` <#var-SYSTEMD_AUTO_ENABLE>`__ to "disable".
2515
2516For more information on ``systemd``, see the "`Selecting an
2517Initialization
2518Manager <&YOCTO_DOCS_DEV_URL;#selecting-an-initialization-manager>`__"
2519section in the Yocto Project Development Tasks Manual.
2520
2521.. _ref-classes-systemd-boot:
2522
2523``systemd-boot.bbclass``
2524========================
2525
2526The ``systemd-boot`` class provides functions specific to the
2527systemd-boot bootloader for building bootable images. This is an
2528internal class and is not intended to be used directly.
2529
2530.. note::
2531
2532 The
2533 systemd-boot
2534 class is a result from merging the
2535 gummiboot
2536 class used in previous Yocto Project releases with the
2537 systemd
2538 project.
2539
2540Set the ```EFI_PROVIDER`` <#var-EFI_PROVIDER>`__ variable to
2541"systemd-boot" to use this class. Doing so creates a standalone EFI
2542bootloader that is not dependent on systemd.
2543
2544For information on more variables used and supported in this class, see
2545the ```SYSTEMD_BOOT_CFG`` <#var-SYSTEMD_BOOT_CFG>`__,
2546```SYSTEMD_BOOT_ENTRIES`` <#var-SYSTEMD_BOOT_ENTRIES>`__, and
2547```SYSTEMD_BOOT_TIMEOUT`` <#var-SYSTEMD_BOOT_TIMEOUT>`__ variables.
2548
2549You can also see the `Systemd-boot
2550documentation <http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__
2551for more information.
2552
2553.. _ref-classes-terminal:
2554
2555``terminal.bbclass``
2556====================
2557
2558The ``terminal`` class provides support for starting a terminal session.
2559The ```OE_TERMINAL`` <#var-OE_TERMINAL>`__ variable controls which
2560terminal emulator is used for the session.
2561
2562Other classes use the ``terminal`` class anywhere a separate terminal
2563session needs to be started. For example, the
2564```patch`` <#ref-classes-patch>`__ class assuming
2565```PATCHRESOLVE`` <#var-PATCHRESOLVE>`__ is set to "user", the
2566```cml1`` <#ref-classes-cml1>`__ class, and the
2567```devshell`` <#ref-classes-devshell>`__ class all use the ``terminal``
2568class.
2569
2570.. _ref-classes-testimage*:
2571
2572``testimage*.bbclass``
2573======================
2574
2575The ``testimage*`` classes support running automated tests against
2576images using QEMU and on actual hardware. The classes handle loading the
2577tests and starting the image. To use the classes, you need to perform
2578steps to set up the environment.
2579
2580.. note::
2581
2582 Best practices include using
2583 IMAGE_CLASSES
2584 rather than
2585 INHERIT
2586 to inherit the
2587 testimage
2588 class for automated image testing.
2589
2590The tests are commands that run on the target system over ``ssh``. Each
2591test is written in Python and makes use of the ``unittest`` module.
2592
2593The ``testimage.bbclass`` runs tests on an image when called using the
2594following: $ bitbake -c testimage image The ``testimage-auto`` class
2595runs tests on an image after the image is constructed (i.e.
2596```TESTIMAGE_AUTO`` <#var-TESTIMAGE_AUTO>`__ must be set to "1").
2597
2598For information on how to enable, run, and create new tests, see the
2599"`Performing Automated Runtime
2600Testing <&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing>`__"
2601section in the Yocto Project Development Tasks Manual.
2602
2603.. _ref-classes-testsdk:
2604
2605``testsdk.bbclass``
2606===================
2607
2608This class supports running automated tests against software development
2609kits (SDKs). The ``testsdk`` class runs tests on an SDK when called
2610using the following: $ bitbake -c testsdk image
2611
2612.. note::
2613
2614 Best practices include using
2615 IMAGE_CLASSES
2616 rather than
2617 INHERIT
2618 to inherit the
2619 testsdk
2620 class for automated SDK testing.
2621
2622.. _ref-classes-texinfo:
2623
2624``texinfo.bbclass``
2625===================
2626
2627This class should be inherited by recipes whose upstream packages invoke
2628the ``texinfo`` utilities at build-time. Native and cross recipes are
2629made to use the dummy scripts provided by ``texinfo-dummy-native``, for
2630improved performance. Target architecture recipes use the genuine
2631Texinfo utilities. By default, they use the Texinfo utilities on the
2632host system.
2633
2634.. note::
2635
2636 If you want to use the Texinfo recipe shipped with the build system,
2637 you can remove "texinfo-native" from
2638 ASSUME_PROVIDED
2639 and makeinfo from
2640 SANITY_REQUIRED_UTILITIES
2641 .
2642
2643.. _ref-classes-tinderclient:
2644
2645``tinderclient.bbclass``
2646========================
2647
2648The ``tinderclient`` class submits build results to an external
2649Tinderbox instance.
2650
2651.. note::
2652
2653 This class is currently unmaintained.
2654
2655.. _ref-classes-toaster:
2656
2657``toaster.bbclass``
2658===================
2659
2660The ``toaster`` class collects information about packages and images and
2661sends them as events that the BitBake user interface can receive. The
2662class is enabled when the Toaster user interface is running.
2663
2664This class is not intended to be used directly.
2665
2666.. _ref-classes-toolchain-scripts:
2667
2668``toolchain-scripts.bbclass``
2669=============================
2670
2671The ``toolchain-scripts`` class provides the scripts used for setting up
2672the environment for installed SDKs.
2673
2674.. _ref-classes-typecheck:
2675
2676``typecheck.bbclass``
2677=====================
2678
2679The ``typecheck`` class provides support for validating the values of
2680variables set at the configuration level against their defined types.
2681The OpenEmbedded build system allows you to define the type of a
2682variable using the "type" varflag. Here is an example:
2683IMAGE_FEATURES[type] = "list"
2684
2685.. _ref-classes-uboot-config:
2686
2687``uboot-config.bbclass``
2688========================
2689
2690The ``uboot-config`` class provides support for U-Boot configuration for
2691a machine. Specify the machine in your recipe as follows: UBOOT_CONFIG
2692??= <default> UBOOT_CONFIG[foo] = "config,images" You can also specify
2693the machine using this method: UBOOT_MACHINE = "config" See the
2694```UBOOT_CONFIG`` <#var-UBOOT_CONFIG>`__ and
2695```UBOOT_MACHINE`` <#var-UBOOT_MACHINE>`__ variables for additional
2696information.
2697
2698.. _ref-classes-uninative:
2699
2700``uninative.bbclass``
2701=====================
2702
2703Attempts to isolate the build system from the host distribution's C
2704library in order to make re-use of native shared state artifacts across
2705different host distributions practical. With this class enabled, a
2706tarball containing a pre-built C library is downloaded at the start of
2707the build. In the Poky reference distribution this is enabled by default
2708through ``meta/conf/distro/include/yocto-uninative.inc``. Other
2709distributions that do not derive from poky can also
2710"``require conf/distro/include/yocto-uninative.inc``" to use this.
2711Alternatively if you prefer, you can build the uninative-tarball recipe
2712yourself, publish the resulting tarball (e.g. via HTTP) and set
2713``UNINATIVE_URL`` and ``UNINATIVE_CHECKSUM`` appropriately. For an
2714example, see the ``meta/conf/distro/include/yocto-uninative.inc``.
2715
2716The ``uninative`` class is also used unconditionally by the extensible
2717SDK. When building the extensible SDK, ``uninative-tarball`` is built
2718and the resulting tarball is included within the SDK.
2719
2720.. _ref-classes-update-alternatives:
2721
2722``update-alternatives.bbclass``
2723===============================
2724
2725The ``update-alternatives`` class helps the alternatives system when
2726multiple sources provide the same command. This situation occurs when
2727several programs that have the same or similar function are installed
2728with the same name. For example, the ``ar`` command is available from
2729the ``busybox``, ``binutils`` and ``elfutils`` packages. The
2730``update-alternatives`` class handles renaming the binaries so that
2731multiple packages can be installed without conflicts. The ``ar`` command
2732still works regardless of which packages are installed or subsequently
2733removed. The class renames the conflicting binary in each package and
2734symlinks the highest priority binary during installation or removal of
2735packages.
2736
2737To use this class, you need to define a number of variables:
2738
2739- ```ALTERNATIVE`` <#var-ALTERNATIVE>`__
2740
2741- ```ALTERNATIVE_LINK_NAME`` <#var-ALTERNATIVE_LINK_NAME>`__
2742
2743- ```ALTERNATIVE_TARGET`` <#var-ALTERNATIVE_TARGET>`__
2744
2745- ```ALTERNATIVE_PRIORITY`` <#var-ALTERNATIVE_PRIORITY>`__
2746
2747These variables list alternative commands needed by a package, provide
2748pathnames for links, default links for targets, and so forth. For
2749details on how to use this class, see the comments in the
2750```update-alternatives.bbclass`` <&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/update-alternatives.bbclass>`__
2751file.
2752
2753.. note::
2754
2755 You can use the
2756 update-alternatives
2757 command directly in your recipes. However, this class simplifies
2758 things in most cases.
2759
2760.. _ref-classes-update-rc.d:
2761
2762``update-rc.d.bbclass``
2763=======================
2764
2765The ``update-rc.d`` class uses ``update-rc.d`` to safely install an
2766initialization script on behalf of the package. The OpenEmbedded build
2767system takes care of details such as making sure the script is stopped
2768before a package is removed and started when the package is installed.
2769
2770Three variables control this class: ``INITSCRIPT_PACKAGES``,
2771``INITSCRIPT_NAME`` and ``INITSCRIPT_PARAMS``. See the variable links
2772for details.
2773
2774.. _ref-classes-useradd:
2775
2776``useradd*.bbclass``
2777====================
2778
2779The ``useradd*`` classes support the addition of users or groups for
2780usage by the package on the target. For example, if you have packages
2781that contain system services that should be run under their own user or
2782group, you can use these classes to enable creation of the user or
2783group. The ``meta-skeleton/recipes-skeleton/useradd/useradd-example.bb``
2784recipe in the `Source Directory <#source-directory>`__ provides a simple
2785example that shows how to add three users and groups to two packages.
2786See the ``useradd-example.bb`` recipe for more information on how to use
2787these classes.
2788
2789The ``useradd_base`` class provides basic functionality for user or
2790groups settings.
2791
2792The ``useradd*`` classes support the
2793```USERADD_PACKAGES`` <#var-USERADD_PACKAGES>`__,
2794```USERADD_PARAM`` <#var-USERADD_PARAM>`__,
2795```GROUPADD_PARAM`` <#var-GROUPADD_PARAM>`__, and
2796```GROUPMEMS_PARAM`` <#var-GROUPMEMS_PARAM>`__ variables.
2797
2798The ``useradd-staticids`` class supports the addition of users or groups
2799that have static user identification (``uid``) and group identification
2800(``gid``) values.
2801
2802The default behavior of the OpenEmbedded build system for assigning
2803``uid`` and ``gid`` values when packages add users and groups during
2804package install time is to add them dynamically. This works fine for
2805programs that do not care what the values of the resulting users and
2806groups become. In these cases, the order of the installation determines
2807the final ``uid`` and ``gid`` values. However, if non-deterministic
2808``uid`` and ``gid`` values are a problem, you can override the default,
2809dynamic application of these values by setting static values. When you
2810set static values, the OpenEmbedded build system looks in
2811```BBPATH`` <#var-BBPATH>`__ for ``files/passwd`` and ``files/group``
2812files for the values.
2813
2814To use static ``uid`` and ``gid`` values, you need to set some
2815variables. See the ```USERADDEXTENSION`` <#var-USERADDEXTENSION>`__,
2816```USERADD_UID_TABLES`` <#var-USERADD_UID_TABLES>`__,
2817```USERADD_GID_TABLES`` <#var-USERADD_GID_TABLES>`__, and
2818```USERADD_ERROR_DYNAMIC`` <#var-USERADD_ERROR_DYNAMIC>`__ variables.
2819You can also see the ```useradd`` <#ref-classes-useradd>`__ class for
2820additional information.
2821
2822.. note::
2823
2824 You do not use the
2825 useradd-staticids
2826 class directly. You either enable or disable the class by setting the
2827 USERADDEXTENSION
2828 variable. If you enable or disable the class in a configured system,
2829 TMPDIR
2830 might contain incorrect
2831 uid
2832 and
2833 gid
2834 values. Deleting the
2835 TMPDIR
2836 directory will correct this condition.
2837
2838.. _ref-classes-utility-tasks:
2839
2840``utility-tasks.bbclass``
2841=========================
2842
2843The ``utility-tasks`` class provides support for various "utility" type
2844tasks that are applicable to all recipes, such as
2845```do_clean`` <#ref-tasks-clean>`__ and
2846```do_listtasks`` <#ref-tasks-listtasks>`__.
2847
2848This class is enabled by default because it is inherited by the
2849```base`` <#ref-classes-base>`__ class.
2850
2851.. _ref-classes-utils:
2852
2853``utils.bbclass``
2854=================
2855
2856The ``utils`` class provides some useful Python functions that are
2857typically used in inline Python expressions (e.g. ``${@...}``). One
2858example use is for ``bb.utils.contains()``.
2859
2860This class is enabled by default because it is inherited by the
2861```base`` <#ref-classes-base>`__ class.
2862
2863.. _ref-classes-vala:
2864
2865``vala.bbclass``
2866================
2867
2868The ``vala`` class supports recipes that need to build software written
2869using the Vala programming language.
2870
2871.. _ref-classes-waf:
2872
2873``waf.bbclass``
2874===============
2875
2876The ``waf`` class supports recipes that need to build software that uses
2877the Waf build system. You can use the
2878```EXTRA_OECONF`` <#var-EXTRA_OECONF>`__ or
2879```PACKAGECONFIG_CONFARGS`` <#var-PACKAGECONFIG_CONFARGS>`__ variables
2880to specify additional configuration options to be passed on the Waf
2881command line.
diff --git a/documentation/ref-manual/ref-devtool-reference.rst b/documentation/ref-manual/ref-devtool-reference.rst
new file mode 100644
index 0000000000..c91ba5bdfa
--- /dev/null
+++ b/documentation/ref-manual/ref-devtool-reference.rst
@@ -0,0 +1,533 @@
1***************************
2``devtool`` Quick Reference
3***************************
4
5The ``devtool`` command-line tool provides a number of features that
6help you build, test, and package software. This command is available
7alongside the ``bitbake`` command. Additionally, the ``devtool`` command
8is a key part of the extensible SDK.
9
10This chapter provides a Quick Reference for the ``devtool`` command. For
11more information on how to apply the command when using the extensible
12SDK, see the "`Using the Extensible
13SDK <&YOCTO_DOCS_SDK_URL;#sdk-extensible>`__" chapter in the Yocto
14Project Application Development and the Extensible Software Development
15Kit (eSDK) manual.
16
17.. _devtool-getting-help:
18
19Getting Help
20============
21
22The ``devtool`` command line is organized similarly to Git in that it
23has a number of sub-commands for each function. You can run
24``devtool --help`` to see all the commands: $ devtool -h NOTE: Starting
25bitbake server... usage: devtool [--basepath BASEPATH] [--bbpath BBPATH]
26[-d] [-q] [--color COLOR] [-h] <subcommand> ... OpenEmbedded development
27tool options: --basepath BASEPATH Base directory of SDK / build
28directory --bbpath BBPATH Explicitly specify the BBPATH, rather than
29getting it from the metadata -d, --debug Enable debug output -q, --quiet
30Print only errors --color COLOR Colorize output (where COLOR is auto,
31always, never) -h, --help show this help message and exit subcommands:
32Beginning work on a recipe: add Add a new recipe modify Modify the
33source for an existing recipe upgrade Upgrade an existing recipe Getting
34information: status Show workspace status search Search available
35recipes latest-version Report the latest version of an existing recipe
36check-upgrade-status Report upgradability for multiple (or all) recipes
37Working on a recipe in the workspace: build Build a recipe rename Rename
38a recipe file in the workspace edit-recipe Edit a recipe file
39find-recipe Find a recipe file configure-help Get help on configure
40script options update-recipe Apply changes from external source tree to
41recipe reset Remove a recipe from your workspace finish Finish working
42on a recipe in your workspace Testing changes on target: deploy-target
43Deploy recipe output files to live target machine undeploy-target
44Undeploy recipe output files in live target machine build-image Build
45image including workspace recipe packages Advanced: create-workspace Set
46up workspace in an alternative location export Export workspace into a
47tar archive import Import exported tar archive into workspace extract
48Extract the source for an existing recipe sync Synchronize the source
49tree for an existing recipe Use devtool <subcommand> --help to get help
50on a specific command As directed in the general help output, you can
51get more syntax on a specific command by providing the command name and
52using "--help": $ devtool add --help NOTE: Starting bitbake server...
53usage: devtool add [-h] [--same-dir \| --no-same-dir] [--fetch URI]
54[--fetch-dev] [--version VERSION] [--no-git] [--srcrev SRCREV \|
55--autorev] [--srcbranch SRCBRANCH] [--binary] [--also-native]
56[--src-subdir SUBDIR] [--mirrors] [--provides PROVIDES] [recipename]
57[srctree] [fetchuri] Adds a new recipe to the workspace to build a
58specified source tree. Can optionally fetch a remote URI and unpack it
59to create the source tree. arguments: recipename Name for new recipe to
60add (just name - no version, path or extension). If not specified, will
61attempt to auto-detect it. srctree Path to external source tree. If not
62specified, a subdirectory of /home/scottrif/poky/build/workspace/sources
63will be used. fetchuri Fetch the specified URI and extract it to create
64the source tree options: -h, --help show this help message and exit
65--same-dir, -s Build in same directory as source --no-same-dir Force
66build in a separate build directory --fetch URI, -f URI Fetch the
67specified URI and extract it to create the source tree (deprecated -
68pass as positional argument instead) --fetch-dev For npm, also fetch
69devDependencies --version VERSION, -V VERSION Version to use within
70recipe (PV) --no-git, -g If fetching source, do not set up source tree
71as a git repository --srcrev SRCREV, -S SRCREV Source revision to fetch
72if fetching from an SCM such as git (default latest) --autorev, -a When
73fetching from a git repository, set SRCREV in the recipe to a floating
74revision instead of fixed --srcbranch SRCBRANCH, -B SRCBRANCH Branch in
75source repository if fetching from an SCM such as git (default master)
76--binary, -b Treat the source tree as something that should be installed
77verbatim (no compilation, same directory structure). Useful with binary
78packages e.g. RPMs. --also-native Also add native variant (i.e. support
79building recipe for the build host as well as the target machine)
80--src-subdir SUBDIR Specify subdirectory within source tree to use
81--mirrors Enable PREMIRRORS and MIRRORS for source tree fetching
82(disable by default). --provides PROVIDES, -p PROVIDES Specify an alias
83for the item provided by the recipe. E.g. virtual/libgl
84
85.. _devtool-the-workspace-layer-structure:
86
87The Workspace Layer Structure
88=============================
89
90``devtool`` uses a "Workspace" layer in which to accomplish builds. This
91layer is not specific to any single ``devtool`` command but is rather a
92common working area used across the tool.
93
94The following figure shows the workspace structure:
95
96attic - A directory created if devtool believes it must preserve
97anything when you run "devtool reset". For example, if you run "devtool
98add", make changes to the recipe, and then run "devtool reset", devtool
99takes notice that the file has been changed and moves it into the attic
100should you still want the recipe. README - Provides information on what
101is in workspace layer and how to manage it. .devtool_md5 - A checksum
102file used by devtool. appends - A directory that contains \*.bbappend
103files, which point to external source. conf - A configuration directory
104that contains the layer.conf file. recipes - A directory containing
105recipes. This directory contains a folder for each directory added whose
106name matches that of the added recipe. devtool places the recipe.bb file
107within that sub-directory. sources - A directory containing a working
108copy of the source files used when building the recipe. This is the
109default directory used as the location of the source tree when you do
110not provide a source tree path. This directory contains a folder for
111each set of source files matched to a corresponding recipe.
112
113.. _devtool-adding-a-new-recipe-to-the-workspace:
114
115Adding a New Recipe to the Workspace Layer
116==========================================
117
118Use the ``devtool add`` command to add a new recipe to the workspace
119layer. The recipe you add should not exist - ``devtool`` creates it for
120you. The source files the recipe uses should exist in an external area.
121
122The following example creates and adds a new recipe named ``jackson`` to
123a workspace layer the tool creates. The source code built by the recipes
124resides in ``/home/user/sources/jackson``: $ devtool add jackson
125/home/user/sources/jackson
126
127If you add a recipe and the workspace layer does not exist, the command
128creates the layer and populates it as described in "`The Workspace Layer
129Structure <#devtool-the-workspace-layer-structure>`__" section.
130
131Running ``devtool add`` when the workspace layer exists causes the tool
132to add the recipe, append files, and source files into the existing
133workspace layer. The ``.bbappend`` file is created to point to the
134external source tree.
135
136.. note::
137
138 If your recipe has runtime dependencies defined, you must be sure
139 that these packages exist on the target hardware before attempting to
140 run your application. If dependent packages (e.g. libraries) do not
141 exist on the target, your application, when run, will fail to find
142 those functions. For more information, see the "
143 Deploying Your Software on the Target Machine
144 " section.
145
146By default, ``devtool add`` uses the latest revision (i.e. master) when
147unpacking files from a remote URI. In some cases, you might want to
148specify a source revision by branch, tag, or commit hash. You can
149specify these options when using the ``devtool add`` command:
150
151- To specify a source branch, use the ``--srcbranch`` option: $ devtool
152 add --srcbranch DISTRO_NAME_NO_CAP jackson /home/user/sources/jackson
153 In the previous example, you are checking out the DISTRO_NAME_NO_CAP
154 branch.
155
156- To specify a specific tag or commit hash, use the ``--srcrev``
157 option: $ devtool add --srcrev DISTRO_REL_TAG jackson
158 /home/user/sources/jackson $ devtool add --srcrev some_commit_hash
159 /home/user/sources/jackson The previous examples check out the
160 DISTRO_REL_TAG tag and the commit associated with the
161 some_commit_hash hash.
162
163.. note::
164
165 If you prefer to use the latest revision every time the recipe is
166 built, use the options
167 --autorev
168 or
169 -a
170 .
171
172.. _devtool-extracting-the-source-for-an-existing-recipe:
173
174Extracting the Source for an Existing Recipe
175============================================
176
177Use the ``devtool extract`` command to extract the source for an
178existing recipe. When you use this command, you must supply the root
179name of the recipe (i.e. no version, paths, or extensions), and you must
180supply the directory to which you want the source extracted.
181
182Additional command options let you control the name of a development
183branch into which you can checkout the source and whether or not to keep
184a temporary directory, which is useful for debugging.
185
186.. _devtool-synchronizing-a-recipes-extracted-source-tree:
187
188Synchronizing a Recipe's Extracted Source Tree
189==============================================
190
191Use the ``devtool sync`` command to synchronize a previously extracted
192source tree for an existing recipe. When you use this command, you must
193supply the root name of the recipe (i.e. no version, paths, or
194extensions), and you must supply the directory to which you want the
195source extracted.
196
197Additional command options let you control the name of a development
198branch into which you can checkout the source and whether or not to keep
199a temporary directory, which is useful for debugging.
200
201.. _devtool-modifying-a-recipe:
202
203Modifying an Existing Recipe
204============================
205
206Use the ``devtool modify`` command to begin modifying the source of an
207existing recipe. This command is very similar to the
208```add`` <#devtool-adding-a-new-recipe-to-the-workspace>`__ command
209except that it does not physically create the recipe in the workspace
210layer because the recipe already exists in an another layer.
211
212The ``devtool modify`` command extracts the source for a recipe, sets it
213up as a Git repository if the source had not already been fetched from
214Git, checks out a branch for development, and applies any patches from
215the recipe as commits on top. You can use the following command to
216checkout the source files: $ devtool modify recipe Using the above
217command form, ``devtool`` uses the existing recipe's
218```SRC_URI`` <#var-SRC_URI>`__ statement to locate the upstream source,
219extracts the source into the default sources location in the workspace.
220The default development branch used is "devtool".
221
222.. _devtool-edit-an-existing-recipe:
223
224Edit an Existing Recipe
225=======================
226
227Use the ``devtool edit-recipe`` command to run the default editor, which
228is identified using the ``EDITOR`` variable, on the specified recipe.
229
230When you use the ``devtool edit-recipe`` command, you must supply the
231root name of the recipe (i.e. no version, paths, or extensions). Also,
232the recipe file itself must reside in the workspace as a result of the
233``devtool add`` or ``devtool upgrade`` commands. However, you can
234override that requirement by using the "-a" or "--any-recipe" option.
235Using either of these options allows you to edit any recipe regardless
236of its location.
237
238.. _devtool-updating-a-recipe:
239
240Updating a Recipe
241=================
242
243Use the ``devtool update-recipe`` command to update your recipe with
244patches that reflect changes you make to the source files. For example,
245if you know you are going to work on some code, you could first use the
246```devtool modify`` <#devtool-modifying-a-recipe>`__ command to extract
247the code and set up the workspace. After which, you could modify,
248compile, and test the code.
249
250When you are satisfied with the results and you have committed your
251changes to the Git repository, you can then run the
252``devtool update-recipe`` to create the patches and update the recipe: $
253devtool update-recipe recipe If you run the ``devtool update-recipe``
254without committing your changes, the command ignores the changes.
255
256Often, you might want to apply customizations made to your software in
257your own layer rather than apply them to the original recipe. If so, you
258can use the ``-a`` or ``--append`` option with the
259``devtool update-recipe`` command. These options allow you to specify
260the layer into which to write an append file: $ devtool update-recipe
261recipe -a base-layer-directory The ``*.bbappend`` file is created at the
262appropriate path within the specified layer directory, which may or may
263not be in your ``bblayers.conf`` file. If an append file already exists,
264the command updates it appropriately.
265
266.. _devtool-checking-on-the-upgrade-status-of-a-recipe:
267
268Checking on the Upgrade Status of a Recipe
269==========================================
270
271Upstream recipes change over time. Consequently, you might find that you
272need to determine if you can upgrade a recipe to a newer version.
273
274To check on the upgrade status of a recipe, use the
275``devtool check-upgrade-status`` command. The command displays a table
276of your current recipe versions, the latest upstream versions, the email
277address of the recipe's maintainer, and any additional information such
278as commit hash strings and reasons you might not be able to upgrade a
279particular recipe.
280
281.. note::
282
283 - For the ``oe-core`` layer, recipe maintainers come from the
284 ```maintainers.inc`` <http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/conf/distro/include/maintainers.inc>`__
285 file.
286
287 - If the recipe is using the `Git
288 fetcher <&YOCTO_DOCS_BB_URL;#git-fetcher>`__ rather than a
289 tarball, the commit hash points to the commit that matches the
290 recipe's latest version tag.
291
292As with all ``devtool`` commands, you can get help on the individual
293command: $ devtool check-upgrade-status -h NOTE: Starting bitbake
294server... usage: devtool check-upgrade-status [-h] [--all] [recipe
295[recipe ...]] Prints a table of recipes together with versions currently
296provided by recipes, and latest upstream versions, when there is a later
297version available arguments: recipe Name of the recipe to report (omit
298to report upgrade info for all recipes) options: -h, --help show this
299help message and exit --all, -a Show all recipes, not just recipes
300needing upgrade
301
302Unless you provide a specific recipe name on the command line, the
303command checks all recipes in all configured layers.
304
305Following is a partial example table that reports on all the recipes.
306Notice the reported reason for not upgrading the ``base-passwd`` recipe.
307In this example, while a new version is available upstream, you do not
308want to use it because the dependency on ``cdebconf`` is not easily
309satisfied.
310
311.. note::
312
313 When a reason for not upgrading displays, the reason is usually
314 written into the recipe using the
315 RECIPE_NO_UPDATE_REASON
316 variable. See the
317 base-passwd.bb
318 recipe for an example.
319
320$ devtool check-upgrade-status ... NOTE: acpid 2.0.30 2.0.31 Ross Burton
321<ross.burton@intel.com> NOTE: u-boot-fw-utils 2018.11 2019.01 Marek
322Vasut <marek.vasut@gmail.com> d3689267f92c5956e09cc7d1baa4700141662bff
323NOTE: u-boot-tools 2018.11 2019.01 Marek Vasut <marek.vasut@gmail.com>
324d3689267f92c5956e09cc7d1baa4700141662bff . . . NOTE: base-passwd 3.5.29
3253.5.45 Anuj Mittal <anuj.mittal@intel.com> cannot be updated due to:
326Version 3.5.38 requires cdebconf for update-passwd utility NOTE: busybox
3271.29.2 1.30.0 Andrej Valek <andrej.valek@siemens.com> NOTE: dbus-test
3281.12.10 1.12.12 Chen Qi <Qi.Chen@windriver.com>
329
330.. _devtool-upgrading-a-recipe:
331
332Upgrading a Recipe
333==================
334
335As software matures, upstream recipes are upgraded to newer versions. As
336a developer, you need to keep your local recipes up-to-date with the
337upstream version releases. Several methods exist by which you can
338upgrade recipes. You can read about them in the "`Upgrading
339Recipes <&YOCTO_DOCS_DEV_URL;#gs-upgrading-recipes>`__" section of the
340Yocto Project Development Tasks Manual. This section overviews the
341``devtool upgrade`` command.
342
343.. note::
344
345 Before you upgrade a recipe, you can check on its upgrade status. See
346 the "
347 Checking on the Upgrade Status of a Recipe
348 " for more information.
349
350The ``devtool upgrade`` command upgrades an existing recipe to a more
351recent version of the recipe upstream. The command puts the upgraded
352recipe file along with any associated files into a "workspace" and, if
353necessary, extracts the source tree to a specified location. During the
354upgrade, patches associated with the recipe are rebased or added as
355needed.
356
357When you use the ``devtool upgrade`` command, you must supply the root
358name of the recipe (i.e. no version, paths, or extensions), and you must
359supply the directory to which you want the source extracted. Additional
360command options let you control things such as the version number to
361which you want to upgrade (i.e. the ```PV`` <#var-PV>`__), the source
362revision to which you want to upgrade (i.e. the
363```SRCREV`` <#var-SRCREV>`__), whether or not to apply patches, and so
364forth.
365
366You can read more on the ``devtool upgrade`` workflow in the "`Use
367``devtool upgrade`` to Create a Version of the Recipe that Supports a
368Newer Version of the
369Software <&YOCTO_DOCS_SDK_URL;#sdk-devtool-use-devtool-upgrade-to-create-a-version-of-the-recipe-that-supports-a-newer-version-of-the-software>`__"
370section in the Yocto Project Application Development and the Extensible
371Software Development Kit (eSDK) manual. You can also see an example of
372how to use ``devtool upgrade`` in the "`Using
373``devtool upgrade`` <&YOCTO_DOCS_DEV_URL;#gs-using-devtool-upgrade>`__"
374section in the Yocto Project Development Tasks Manual.
375
376.. _devtool-resetting-a-recipe:
377
378Resetting a Recipe
379==================
380
381Use the ``devtool reset`` command to remove a recipe and its
382configuration (e.g. the corresponding ``.bbappend`` file) from the
383workspace layer. Realize that this command deletes the recipe and the
384append file. The command does not physically move them for you.
385Consequently, you must be sure to physically relocate your updated
386recipe and the append file outside of the workspace layer before running
387the ``devtool reset`` command.
388
389If the ``devtool reset`` command detects that the recipe or the append
390files have been modified, the command preserves the modified files in a
391separate "attic" subdirectory under the workspace layer.
392
393Here is an example that resets the workspace directory that contains the
394``mtr`` recipe: $ devtool reset mtr NOTE: Cleaning sysroot for recipe
395mtr... NOTE: Leaving source tree
396/home/scottrif/poky/build/workspace/sources/mtr as-is; if you no longer
397need it then please delete it manually $
398
399.. _devtool-building-your-recipe:
400
401Building Your Recipe
402====================
403
404Use the ``devtool build`` command to build your recipe. The
405``devtool build`` command is equivalent to the
406``bitbake -c populate_sysroot`` command.
407
408When you use the ``devtool build`` command, you must supply the root
409name of the recipe (i.e. do not provide versions, paths, or extensions).
410You can use either the "-s" or the "--disable-parallel-make" options to
411disable parallel makes during the build. Here is an example: $ devtool
412build recipe
413
414.. _devtool-building-your-image:
415
416Building Your Image
417===================
418
419Use the ``devtool build-image`` command to build an image, extending it
420to include packages from recipes in the workspace. Using this command is
421useful when you want an image that ready for immediate deployment onto a
422device for testing. For proper integration into a final image, you need
423to edit your custom image recipe appropriately.
424
425When you use the ``devtool build-image`` command, you must supply the
426name of the image. This command has no command line options: $ devtool
427build-image image
428
429.. _devtool-deploying-your-software-on-the-target-machine:
430
431Deploying Your Software on the Target Machine
432=============================================
433
434Use the ``devtool deploy-target`` command to deploy the recipe's build
435output to the live target machine: $ devtool deploy-target recipe target
436The target is the address of the target machine, which must be running
437an SSH server (i.e. ``user@hostname[:destdir]``).
438
439This command deploys all files installed during the
440```do_install`` <#ref-tasks-install>`__ task. Furthermore, you do not
441need to have package management enabled within the target machine. If
442you do, the package manager is bypassed.
443
444.. note::
445
446 The ``deploy-target`` functionality is for development only. You
447 should never use it to update an image that will be used in
448 production.
449
450Some conditions exist that could prevent a deployed application from
451behaving as expected. When both of the following conditions exist, your
452application has the potential to not behave correctly when run on the
453target:
454
455- You are deploying a new application to the target and the recipe you
456 used to build the application had correctly defined runtime
457 dependencies.
458
459- The target does not physically have the packages on which the
460 application depends installed.
461
462If both of these conditions exist, your application will not behave as
463expected. The reason for this misbehavior is because the
464``devtool deploy-target`` command does not deploy the packages (e.g.
465libraries) on which your new application depends. The assumption is that
466the packages are already on the target. Consequently, when a runtime
467call is made in the application for a dependent function (e.g. a library
468call), the function cannot be found.
469
470To be sure you have all the dependencies local to the target, you need
471to be sure that the packages are pre-deployed (installed) on the target
472before attempting to run your application.
473
474.. _devtool-removing-your-software-from-the-target-machine:
475
476Removing Your Software from the Target Machine
477==============================================
478
479Use the ``devtool undeploy-target`` command to remove deployed build
480output from the target machine. For the ``devtool undeploy-target``
481command to work, you must have previously used the
482```devtool deploy-target`` <#devtool-deploying-your-software-on-the-target-machine>`__
483command. $ devtool undeploy-target recipe target The target is the
484address of the target machine, which must be running an SSH server (i.e.
485``user@hostname``).
486
487.. _devtool-creating-the-workspace:
488
489Creating the Workspace Layer in an Alternative Location
490=======================================================
491
492Use the ``devtool create-workspace`` command to create a new workspace
493layer in your `Build Directory <#build-directory>`__. When you create a
494new workspace layer, it is populated with the ``README`` file and the
495``conf`` directory only.
496
497The following example creates a new workspace layer in your current
498working and by default names the workspace layer "workspace": $ devtool
499create-workspace
500
501You can create a workspace layer anywhere by supplying a pathname with
502the command. The following command creates a new workspace layer named
503"new-workspace": $ devtool create-workspace /home/scottrif/new-workspace
504
505.. _devtool-get-the-status-of-the-recipes-in-your-workspace:
506
507Get the Status of the Recipes in Your Workspace
508===============================================
509
510Use the ``devtool status`` command to list the recipes currently in your
511workspace. Information includes the paths to their respective external
512source trees.
513
514The ``devtool status`` command has no command-line options: $ devtool
515status Following is sample output after using
516```devtool add`` <#devtool-adding-a-new-recipe-to-the-workspace>`__ to
517create and add the ``mtr_0.86.bb`` recipe to the ``workspace``
518directory: $ devtool status mtr:
519/home/scottrif/poky/build/workspace/sources/mtr
520(/home/scottrif/poky/build/workspace/recipes/mtr/mtr_0.86.bb) $
521
522.. _devtool-search-for-available-target-recipes:
523
524Search for Available Target Recipes
525===================================
526
527Use the ``devtool search`` command to search for available target
528recipes. The command matches the recipe name, package name, description,
529and installed files. The command displays the recipe name as a result of
530a match.
531
532When you use the ``devtool search`` command, you must supply a keyword.
533The command uses the keyword when searching for a match.
diff --git a/documentation/ref-manual/ref-features.rst b/documentation/ref-manual/ref-features.rst
new file mode 100644
index 0000000000..1cdf09bfdb
--- /dev/null
+++ b/documentation/ref-manual/ref-features.rst
@@ -0,0 +1,353 @@
1********
2Features
3********
4
5This chapter provides a reference of shipped machine and distro features
6you can include as part of your image, a reference on image features you
7can select, and a reference on feature backfilling.
8
9Features provide a mechanism for working out which packages should be
10included in the generated images. Distributions can select which
11features they want to support through the ``DISTRO_FEATURES`` variable,
12which is set or appended to in a distribution's configuration file such
13as ``poky.conf``, ``poky-tiny.conf``, ``poky-lsb.conf`` and so forth.
14Machine features are set in the ``MACHINE_FEATURES`` variable, which is
15set in the machine configuration file and specifies the hardware
16features for a given machine.
17
18These two variables combine to work out which kernel modules, utilities,
19and other packages to include. A given distribution can support a
20selected subset of features so some machine features might not be
21included if the distribution itself does not support them.
22
23One method you can use to determine which recipes are checking to see if
24a particular feature is contained or not is to ``grep`` through the
25`Metadata <#metadata>`__ for the feature. Here is an example that
26discovers the recipes whose build is potentially changed based on a
27given feature: $ cd poky $ git grep
28'contains.*MACHINE_FEATURES.*feature'
29
30.. _ref-features-machine:
31
32Machine Features
33================
34
35The items below are features you can use with
36```MACHINE_FEATURES`` <#var-MACHINE_FEATURES>`__. Features do not have a
37one-to-one correspondence to packages, and they can go beyond simply
38controlling the installation of a package or packages. Sometimes a
39feature can influence how certain recipes are built. For example, a
40feature might determine whether a particular configure option is
41specified within the ```do_configure`` <#ref-tasks-configure>`__ task
42for a particular recipe.
43
44This feature list only represents features as shipped with the Yocto
45Project metadata:
46
47- *acpi:* Hardware has ACPI (x86/x86_64 only)
48
49- *alsa:* Hardware has ALSA audio drivers
50
51- *apm:* Hardware uses APM (or APM emulation)
52
53- *bluetooth:* Hardware has integrated BT
54
55- *efi:* Support for booting through EFI
56
57- *ext2:* Hardware HDD or Microdrive
58
59- *keyboard:* Hardware has a keyboard
60
61- *pcbios:* Support for booting through BIOS
62
63- *pci:* Hardware has a PCI bus
64
65- *pcmcia:* Hardware has PCMCIA or CompactFlash sockets
66
67- *phone:* Mobile phone (voice) support
68
69- *qvga:* Machine has a QVGA (320x240) display
70
71- *rtc:* Machine has a Real-Time Clock
72
73- *screen:* Hardware has a screen
74
75- *serial:* Hardware has serial support (usually RS232)
76
77- *touchscreen:* Hardware has a touchscreen
78
79- *usbgadget:* Hardware is USB gadget device capable
80
81- *usbhost:* Hardware is USB Host capable
82
83- *vfat:* FAT file system support
84
85- *wifi:* Hardware has integrated WiFi
86
87.. _ref-features-distro:
88
89Distro Features
90===============
91
92The items below are features you can use with
93```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ to enable features across
94your distribution. Features do not have a one-to-one correspondence to
95packages, and they can go beyond simply controlling the installation of
96a package or packages. In most cases, the presence or absence of a
97feature translates to the appropriate option supplied to the configure
98script during the ```do_configure`` <#ref-tasks-configure>`__ task for
99the recipes that optionally support the feature.
100
101Some distro features are also machine features. These select features
102make sense to be controlled both at the machine and distribution
103configuration level. See the
104```COMBINED_FEATURES`` <#var-COMBINED_FEATURES>`__ variable for more
105information.
106
107This list only represents features as shipped with the Yocto Project
108metadata:
109
110- *alsa:* Include ALSA support (OSS compatibility kernel modules
111 installed if available).
112
113- *api-documentation:* Enables generation of API documentation during
114 recipe builds. The resulting documentation is added to SDK tarballs
115 when the ``bitbake -c populate_sdk`` command is used. See the
116 "`Adding API Documentation to the Standard
117 SDK <&YOCTO_DOCS_SDK_URL;#adding-api-documentation-to-the-standard-sdk>`__"
118 section in the Yocto Project Application Development and the
119 Extensible Software Development Kit (eSDK) manual.
120
121- *bluetooth:* Include bluetooth support (integrated BT only).
122
123- *cramfs:* Include CramFS support.
124
125- *directfb:* Include DirectFB support.
126
127- *ext2:* Include tools for supporting for devices with internal
128 HDD/Microdrive for storing files (instead of Flash only devices).
129
130- *ipsec:* Include IPSec support.
131
132- *ipv6:* Include IPv6 support.
133
134- *keyboard:* Include keyboard support (e.g. keymaps will be loaded
135 during boot).
136
137- *ldconfig:* Include support for ldconfig and ``ld.so.conf`` on the
138 target.
139
140- *nfs:* Include NFS client support (for mounting NFS exports on
141 device).
142
143- *opengl:* Include the Open Graphics Library, which is a
144 cross-language, multi-platform application programming interface used
145 for rendering two and three-dimensional graphics.
146
147- *pci:* Include PCI bus support.
148
149- *pcmcia:* Include PCMCIA/CompactFlash support.
150
151- *ppp:* Include PPP dialup support.
152
153- *ptest:* Enables building the package tests where supported by
154 individual recipes. For more information on package tests, see the
155 "`Testing Packages With
156 ptest <&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest>`__" section
157 in the Yocto Project Development Tasks Manual.
158
159- *smbfs:* Include SMB networks client support (for mounting
160 Samba/Microsoft Windows shares on device).
161
162- *systemd:* Include support for this ``init`` manager, which is a full
163 replacement of for ``init`` with parallel starting of services,
164 reduced shell overhead, and other features. This ``init`` manager is
165 used by many distributions.
166
167- *usbgadget:* Include USB Gadget Device support (for USB
168 networking/serial/storage).
169
170- *usbhost:* Include USB Host support (allows to connect external
171 keyboard, mouse, storage, network etc).
172
173- *usrmerge:* Merges the ``/bin``, ``/sbin``, ``/lib``, and ``/lib64``
174 directories into their respective counterparts in the ``/usr``
175 directory to provide better package and application compatibility.
176
177- *wayland:* Include the Wayland display server protocol and the
178 library that supports it.
179
180- *wifi:* Include WiFi support (integrated only).
181
182- *x11:* Include the X server and libraries.
183
184.. _ref-features-image:
185
186Image Features
187==============
188
189The contents of images generated by the OpenEmbedded build system can be
190controlled by the ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__ and
191```EXTRA_IMAGE_FEATURES`` <#var-EXTRA_IMAGE_FEATURES>`__ variables that
192you typically configure in your image recipes. Through these variables,
193you can add several different predefined packages such as development
194utilities or packages with debug information needed to investigate
195application problems or profile applications.
196
197The following image features are available for all images:
198
199- *allow-empty-password:* Allows Dropbear and OpenSSH to accept root
200 logins and logins from accounts having an empty password string.
201
202- *dbg-pkgs:* Installs debug symbol packages for all packages installed
203 in a given image.
204
205- *debug-tweaks:* Makes an image suitable for development (e.g. allows
206 root logins without passwords and enables post-installation logging).
207 See the 'allow-empty-password', 'empty-root-password', and
208 'post-install-logging' features in this list for additional
209 information.
210
211- *dev-pkgs:* Installs development packages (headers and extra library
212 links) for all packages installed in a given image.
213
214- *doc-pkgs:* Installs documentation packages for all packages
215 installed in a given image.
216
217- *empty-root-password:* Sets the root password to an empty string,
218 which allows logins with a blank password.
219
220- *package-management:* Installs package management tools and preserves
221 the package manager database.
222
223- *post-install-logging:* Enables logging postinstall script runs to
224 the ``/var/log/postinstall.log`` file on first boot of the image on
225 the target system.
226
227 .. note::
228
229 To make the
230 /var/log
231 directory on the target persistent, use the
232 VOLATILE_LOG_DIR
233 variable by setting it to "no".
234
235- *ptest-pkgs:* Installs ptest packages for all ptest-enabled recipes.
236
237- *read-only-rootfs:* Creates an image whose root filesystem is
238 read-only. See the "`Creating a Read-Only Root
239 Filesystem <&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem>`__"
240 section in the Yocto Project Development Tasks Manual for more
241 information.
242
243- *splash:* Enables showing a splash screen during boot. By default,
244 this screen is provided by ``psplash``, which does allow
245 customization. If you prefer to use an alternative splash screen
246 package, you can do so by setting the ``SPLASH`` variable to a
247 different package name (or names) within the image recipe or at the
248 distro configuration level.
249
250- *staticdev-pkgs:* Installs static development packages, which are
251 static libraries (i.e. ``*.a`` files), for all packages installed in
252 a given image.
253
254Some image features are available only when you inherit the
255```core-image`` <#ref-classes-core-image>`__ class. The current list of
256these valid features is as follows:
257
258- *hwcodecs:* Installs hardware acceleration codecs.
259
260- *nfs-server:* Installs an NFS server.
261
262- *perf:* Installs profiling tools such as ``perf``, ``systemtap``, and
263 ``LTTng``. For general information on user-space tools, see the
264 `Yocto Project Application Development and the Extensible Software
265 Development Kit (eSDK) <&YOCTO_DOCS_SDK_URL;>`__ manual.
266
267- *ssh-server-dropbear:* Installs the Dropbear minimal SSH server.
268
269- *ssh-server-openssh:* Installs the OpenSSH SSH server, which is more
270 full-featured than Dropbear. Note that if both the OpenSSH SSH server
271 and the Dropbear minimal SSH server are present in
272 ``IMAGE_FEATURES``, then OpenSSH will take precedence and Dropbear
273 will not be installed.
274
275- *tools-debug:* Installs debugging tools such as ``strace`` and
276 ``gdb``. For information on GDB, see the "`Debugging With the GNU
277 Project Debugger (GDB)
278 Remotely <&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug>`__" section
279 in the Yocto Project Development Tasks Manual. For information on
280 tracing and profiling, see the `Yocto Project Profiling and Tracing
281 Manual <&YOCTO_DOCS_PROF_URL;>`__.
282
283- *tools-sdk:* Installs a full SDK that runs on the device.
284
285- *tools-testapps:* Installs device testing tools (e.g. touchscreen
286 debugging).
287
288- *x11:* Installs the X server.
289
290- *x11-base:* Installs the X server with a minimal environment.
291
292- *x11-sato:* Installs the OpenedHand Sato environment.
293
294.. _ref-features-backfill:
295
296Feature Backfilling
297===================
298
299Sometimes it is necessary in the OpenEmbedded build system to extend
300```MACHINE_FEATURES`` <#var-MACHINE_FEATURES>`__ or
301```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ to control functionality
302that was previously enabled and not able to be disabled. For these
303cases, we need to add an additional feature item to appear in one of
304these variables, but we do not want to force developers who have
305existing values of the variables in their configuration to add the new
306feature in order to retain the same overall level of functionality.
307Thus, the OpenEmbedded build system has a mechanism to automatically
308"backfill" these added features into existing distro or machine
309configurations. You can see the list of features for which this is done
310by finding the
311```DISTRO_FEATURES_BACKFILL`` <#var-DISTRO_FEATURES_BACKFILL>`__ and
312```MACHINE_FEATURES_BACKFILL`` <#var-MACHINE_FEATURES_BACKFILL>`__
313variables in the ``meta/conf/bitbake.conf`` file.
314
315Because such features are backfilled by default into all configurations
316as described in the previous paragraph, developers who wish to disable
317the new features need to be able to selectively prevent the backfilling
318from occurring. They can do this by adding the undesired feature or
319features to the
320```DISTRO_FEATURES_BACKFILL_CONSIDERED`` <#var-DISTRO_FEATURES_BACKFILL_CONSIDERED>`__
321or
322```MACHINE_FEATURES_BACKFILL_CONSIDERED`` <#var-MACHINE_FEATURES_BACKFILL_CONSIDERED>`__
323variables for distro features and machine features respectively.
324
325Here are two examples to help illustrate feature backfilling:
326
327- *The "pulseaudio" distro feature option*: Previously, PulseAudio
328 support was enabled within the Qt and GStreamer frameworks. Because
329 of this, the feature is backfilled and thus enabled for all distros
330 through the ``DISTRO_FEATURES_BACKFILL`` variable in the
331 ``meta/conf/bitbake.conf`` file. However, your distro needs to
332 disable the feature. You can disable the feature without affecting
333 other existing distro configurations that need PulseAudio support by
334 adding "pulseaudio" to ``DISTRO_FEATURES_BACKFILL_CONSIDERED`` in
335 your distro's ``.conf`` file. Adding the feature to this variable
336 when it also exists in the ``DISTRO_FEATURES_BACKFILL`` variable
337 prevents the build system from adding the feature to your
338 configuration's ``DISTRO_FEATURES``, effectively disabling the
339 feature for that particular distro.
340
341- *The "rtc" machine feature option*: Previously, real time clock (RTC)
342 support was enabled for all target devices. Because of this, the
343 feature is backfilled and thus enabled for all machines through the
344 ``MACHINE_FEATURES_BACKFILL`` variable in the
345 ``meta/conf/bitbake.conf`` file. However, your target device does not
346 have this capability. You can disable RTC support for your device
347 without affecting other machines that need RTC support by adding the
348 feature to your machine's ``MACHINE_FEATURES_BACKFILL_CONSIDERED``
349 list in the machine's ``.conf`` file. Adding the feature to this
350 variable when it also exists in the ``MACHINE_FEATURES_BACKFILL``
351 variable prevents the build system from adding the feature to your
352 configuration's ``MACHINE_FEATURES``, effectively disabling RTC
353 support for that particular machine.
diff --git a/documentation/ref-manual/ref-images.rst b/documentation/ref-manual/ref-images.rst
new file mode 100644
index 0000000000..62863b640a
--- /dev/null
+++ b/documentation/ref-manual/ref-images.rst
@@ -0,0 +1,137 @@
1******
2Images
3******
4
5The OpenEmbedded build system provides several example images to satisfy
6different needs. When you issue the ``bitbake`` command you provide a
7“top-level” recipe that essentially begins the build for the type of
8image you want.
9
10.. note::
11
12 Building an image without GNU General Public License Version 3
13 (GPLv3), GNU Lesser General Public License Version 3 (LGPLv3), and
14 the GNU Affero General Public License Version 3 (AGPL-3.0) components
15 is only supported for minimal and base images. Furthermore, if you
16 are going to build an image using non-GPLv3 and similarly licensed
17 components, you must make the following changes in the
18 local.conf
19 file before using the BitBake command to build the minimal or base
20 image:
21 ::
22
23 1. Comment out the EXTRA_IMAGE_FEATURES line
24 2. Set INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
25
26
27From within the ``poky`` Git repository, you can use the following
28command to display the list of directories within the `Source
29Directory <#source-directory>`__ that contain image recipe files: $ ls
30meta*/recipes*/images/*.bb
31
32Following is a list of supported recipes:
33
34- ``build-appliance-image``: An example virtual machine that contains
35 all the pieces required to run builds using the build system as well
36 as the build system itself. You can boot and run the image using
37 either the `VMware
38 Player <http://www.vmware.com/products/player/overview.html>`__ or
39 `VMware
40 Workstation <http://www.vmware.com/products/workstation/overview.html>`__.
41 For more information on this image, see the `Build
42 Appliance <&YOCTO_HOME_URL;/software-item/build-appliance/>`__ page
43 on the Yocto Project website.
44
45- ``core-image-base``: A console-only image that fully supports the
46 target device hardware.
47
48- ``core-image-clutter``: An image with support for the Open GL-based
49 toolkit Clutter, which enables development of rich and animated
50 graphical user interfaces.
51
52- ``core-image-full-cmdline``: A console-only image with more
53 full-featured Linux system functionality installed.
54
55- ``core-image-lsb``: An image that conforms to the Linux Standard Base
56 (LSB) specification. This image requires a distribution configuration
57 that enables LSB compliance (e.g. ``poky-lsb``). If you build
58 ``core-image-lsb`` without that configuration, the image will not be
59 LSB-compliant.
60
61- ``core-image-lsb-dev``: A ``core-image-lsb`` image that is suitable
62 for development work using the host. The image includes headers and
63 libraries you can use in a host development environment. This image
64 requires a distribution configuration that enables LSB compliance
65 (e.g. ``poky-lsb``). If you build ``core-image-lsb-dev`` without that
66 configuration, the image will not be LSB-compliant.
67
68- ``core-image-lsb-sdk``: A ``core-image-lsb`` that includes everything
69 in the cross-toolchain but also includes development headers and
70 libraries to form a complete standalone SDK. This image requires a
71 distribution configuration that enables LSB compliance (e.g.
72 ``poky-lsb``). If you build ``core-image-lsb-sdk`` without that
73 configuration, the image will not be LSB-compliant. This image is
74 suitable for development using the target.
75
76- ``core-image-minimal``: A small image just capable of allowing a
77 device to boot.
78
79- ``core-image-minimal-dev``: A ``core-image-minimal`` image suitable
80 for development work using the host. The image includes headers and
81 libraries you can use in a host development environment.
82
83- ``core-image-minimal-initramfs``: A ``core-image-minimal`` image that
84 has the Minimal RAM-based Initial Root Filesystem (initramfs) as part
85 of the kernel, which allows the system to find the first “init”
86 program more efficiently. See the
87 ```PACKAGE_INSTALL`` <#var-PACKAGE_INSTALL>`__ variable for
88 additional information helpful when working with initramfs images.
89
90- ``core-image-minimal-mtdutils``: A ``core-image-minimal`` image that
91 has support for the Minimal MTD Utilities, which let the user
92 interact with the MTD subsystem in the kernel to perform operations
93 on flash devices.
94
95- ``core-image-rt``: A ``core-image-minimal`` image plus a real-time
96 test suite and tools appropriate for real-time use.
97
98- ``core-image-rt-sdk``: A ``core-image-rt`` image that includes
99 everything in the cross-toolchain. The image also includes
100 development headers and libraries to form a complete stand-alone SDK
101 and is suitable for development using the target.
102
103- ``core-image-sato``: An image with Sato support, a mobile environment
104 and visual style that works well with mobile devices. The image
105 supports X11 with a Sato theme and applications such as a terminal,
106 editor, file manager, media player, and so forth.
107
108- ``core-image-sato-dev``: A ``core-image-sato`` image suitable for
109 development using the host. The image includes libraries needed to
110 build applications on the device itself, testing and profiling tools,
111 and debug symbols. This image was formerly ``core-image-sdk``.
112
113- ``core-image-sato-sdk``: A ``core-image-sato`` image that includes
114 everything in the cross-toolchain. The image also includes
115 development headers and libraries to form a complete standalone SDK
116 and is suitable for development using the target.
117
118- ``core-image-testmaster``: A "master" image designed to be used for
119 automated runtime testing. Provides a "known good" image that is
120 deployed to a separate partition so that you can boot into it and use
121 it to deploy a second image to be tested. You can find more
122 information about runtime testing in the "`Performing Automated
123 Runtime
124 Testing <&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing>`__"
125 section in the Yocto Project Development Tasks Manual.
126
127- ``core-image-testmaster-initramfs``: A RAM-based Initial Root
128 Filesystem (initramfs) image tailored for use with the
129 ``core-image-testmaster`` image.
130
131- ``core-image-weston``: A very basic Wayland image with a terminal.
132 This image provides the Wayland protocol libraries and the reference
133 Weston compositor. For more information, see the "`Using Wayland and
134 Weston <&YOCTO_DOCS_DEV_URL;#dev-using-wayland-and-weston>`__"
135 section in the Yocto Project Development Tasks Manual.
136
137- ``core-image-x11``: A very basic X11 image with a terminal.
diff --git a/documentation/ref-manual/ref-kickstart.rst b/documentation/ref-manual/ref-kickstart.rst
new file mode 100644
index 0000000000..c019406c6b
--- /dev/null
+++ b/documentation/ref-manual/ref-kickstart.rst
@@ -0,0 +1,205 @@
1*******************************************
2OpenEmbedded Kickstart (``.wks``) Reference
3*******************************************
4
5.. _openembedded-kickstart-wks-reference:
6
7Introduction
8============
9
10The current Wic implementation supports only the basic kickstart
11partitioning commands: ``partition`` (or ``part`` for short) and
12``bootloader``.
13
14.. note::
15
16 Future updates will implement more commands and options. If you use
17 anything that is not specifically supported, results can be
18 unpredictable.
19
20This chapter provides a reference on the available kickstart commands.
21The information lists the commands, their syntax, and meanings.
22Kickstart commands are based on the Fedora kickstart versions but with
23modifications to reflect Wic capabilities. You can see the original
24documentation for those commands at the following link:
25http://pykickstart.readthedocs.io/en/latest/kickstart-docs.html
26
27Command: part or partition
28==========================
29
30Either of these commands creates a partition on the system and uses the
31following syntax: part [mntpoint] partition [mntpoint] If you do not
32provide mntpoint, Wic creates a partition but does not mount it.
33
34The ``mntpoint`` is where the partition is mounted and must be in one of
35the following forms:
36
37- ``/path``: For example, "/", "/usr", or "/home"
38
39- ``swap``: The created partition is used as swap space
40
41Specifying a mntpoint causes the partition to automatically be mounted.
42Wic achieves this by adding entries to the filesystem table (fstab)
43during image generation. In order for Wic to generate a valid fstab, you
44must also provide one of the ``--ondrive``, ``--ondisk``, or
45``--use-uuid`` partition options as part of the command.
46
47.. note::
48
49 The mount program must understand the PARTUUID syntax you use with
50 --use-uuid
51 and non-root
52 mountpoint
53 , including swap. The busybox versions of these application are
54 currently excluded.
55
56Here is an example that uses "/" as the mountpoint. The command uses
57``--ondisk`` to force the partition onto the ``sdb`` disk: part /
58--source rootfs --ondisk sdb --fstype=ext3 --label platform --align 1024
59
60Here is a list that describes other supported options you can use with
61the ``part`` and ``partition`` commands:
62
63- *``--size``:* The minimum partition size in MBytes. Specify an
64 integer value such as 500. Do not append the number with "MB". You do
65 not need this option if you use ``--source``.
66
67- *``--fixed-size``:* The exact partition size in MBytes. You cannot
68 specify with ``--size``. An error occurs when assembling the disk
69 image if the partition data is larger than ``--fixed-size``.
70
71- *``--source``:* This option is a Wic-specific option that names the
72 source of the data that populates the partition. The most common
73 value for this option is "rootfs", but you can use any value that
74 maps to a valid source plugin. For information on the source plugins,
75 see the "`Using the Wic Plugins
76 Interface <&YOCTO_DOCS_DEV_URL;#wic-using-the-wic-plugin-interface>`__"
77 section in the Yocto Project Development Tasks Manual.
78
79 If you use ``--source rootfs``, Wic creates a partition as large as
80 needed and fills it with the contents of the root filesystem pointed
81 to by the ``-r`` command-line option or the equivalent rootfs derived
82 from the ``-e`` command-line option. The filesystem type used to
83 create the partition is driven by the value of the ``--fstype``
84 option specified for the partition. See the entry on ``--fstype``
85 that follows for more information.
86
87 If you use ``--source plugin-name``, Wic creates a partition as large
88 as needed and fills it with the contents of the partition that is
89 generated by the specified plugin name using the data pointed to by
90 the ``-r`` command-line option or the equivalent rootfs derived from
91 the ``-e`` command-line option. Exactly what those contents are and
92 filesystem type used are dependent on the given plugin
93 implementation.
94
95 If you do not use the ``--source`` option, the ``wic`` command
96 creates an empty partition. Consequently, you must use the ``--size``
97 option to specify the size of the empty partition.
98
99- *``--ondisk`` or ``--ondrive``:* Forces the partition to be created
100 on a particular disk.
101
102- *``--fstype``:* Sets the file system type for the partition. Valid
103 values are:
104
105 - ``ext4``
106
107 - ``ext3``
108
109 - ``ext2``
110
111 - ``btrfs``
112
113 - ``squashfs``
114
115 - ``swap``
116
117- *``--fsoptions``:* Specifies a free-form string of options to be used
118 when mounting the filesystem. This string is copied into the
119 ``/etc/fstab`` file of the installed system and should be enclosed in
120 quotes. If not specified, the default string is "defaults".
121
122- *``--label label``:* Specifies the label to give to the filesystem to
123 be made on the partition. If the given label is already in use by
124 another filesystem, a new label is created for the partition.
125
126- *``--active``:* Marks the partition as active.
127
128- *``--align (in KBytes)``:* This option is a Wic-specific option that
129 says to start partitions on boundaries given x KBytes.
130
131- *``--no-table``:* This option is a Wic-specific option. Using the
132 option reserves space for the partition and causes it to become
133 populated. However, the partition is not added to the partition
134 table.
135
136- *``--exclude-path``:* This option is a Wic-specific option that
137 excludes the given relative path from the resulting image. This
138 option is only effective with the rootfs source plugin.
139
140- *``--extra-space``:* This option is a Wic-specific option that adds
141 extra space after the space filled by the content of the partition.
142 The final size can exceed the size specified by the ``--size``
143 option. The default value is 10 Mbytes.
144
145- *``--overhead-factor``:* This option is a Wic-specific option that
146 multiplies the size of the partition by the option's value. You must
147 supply a value greater than or equal to "1". The default value is
148 "1.3".
149
150- *``--part-name``:* This option is a Wic-specific option that
151 specifies a name for GPT partitions.
152
153- *``--part-type``:* This option is a Wic-specific option that
154 specifies the partition type globally unique identifier (GUID) for
155 GPT partitions. You can find the list of partition type GUIDs at
156 ` <http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs>`__.
157
158- *``--use-uuid``:* This option is a Wic-specific option that causes
159 Wic to generate a random GUID for the partition. The generated
160 identifier is used in the bootloader configuration to specify the
161 root partition.
162
163- *``--uuid``:* This option is a Wic-specific option that specifies the
164 partition UUID.
165
166- *``--fsuuid``:* This option is a Wic-specific option that specifies
167 the filesystem UUID. You can generate or modify
168 ```WKS_FILE`` <#var-WKS_FILE>`__ with this option if a preconfigured
169 filesystem UUID is added to the kernel command line in the bootloader
170 configuration before you run Wic.
171
172- *``--system-id``:* This option is a Wic-specific option that
173 specifies the partition system ID, which is a one byte long,
174 hexadecimal parameter with or without the 0x prefix.
175
176- *``--mkfs-extraopts``:* This option specifies additional options to
177 pass to the ``mkfs`` utility. Some default options for certain
178 filesystems do not take effect. See Wic's help on kickstart (i.e.
179 ``wic help kickstart``).
180
181Command: bootloader
182===================
183
184This command specifies how the bootloader should be configured and
185supports the following options:
186
187.. note::
188
189 Bootloader functionality and boot partitions are implemented by the
190 various
191 --source
192 plugins that implement bootloader functionality. The bootloader
193 command essentially provides a means of modifying bootloader
194 configuration.
195
196- *``--timeout``:* Specifies the number of seconds before the
197 bootloader times out and boots the default option.
198
199- *``--append``:* Specifies kernel parameters. These parameters will be
200 added to the syslinux ``APPEND`` or ``grub`` kernel command line.
201
202- *``--configfile``:* Specifies a user-defined configuration file for
203 the bootloader. You can provide a full pathname for the file or a
204 file that exists in the ``canned-wks`` folder. This option overrides
205 all other bootloader options.
diff --git a/documentation/ref-manual/ref-manual.rst b/documentation/ref-manual/ref-manual.rst
new file mode 100644
index 0000000000..a8433f5817
--- /dev/null
+++ b/documentation/ref-manual/ref-manual.rst
@@ -0,0 +1,24 @@
1==============================
2Yocto Project Reference Manual
3==============================
4
5.. toctree::
6 :caption: Table of Contents
7 :numbered:
8
9 ref-system-requirements
10 ref-terms
11 ref-release-process
12 migration
13 ref-structure
14 ref-classes
15 ref-tasks
16 ref-devtool-reference
17 ref-kickstart
18 ref-qa-checks
19 ref-images
20 ref-features
21 ref-variables
22 ref-varlocality
23 faq
24 resources
diff --git a/documentation/ref-manual/ref-qa-checks.rst b/documentation/ref-manual/ref-qa-checks.rst
new file mode 100644
index 0000000000..a8b9ef60e4
--- /dev/null
+++ b/documentation/ref-manual/ref-qa-checks.rst
@@ -0,0 +1,524 @@
1*****************************
2QA Error and Warning Messages
3*****************************
4
5.. _qa-introduction:
6
7Introduction
8============
9
10When building a recipe, the OpenEmbedded build system performs various
11QA checks on the output to ensure that common issues are detected and
12reported. Sometimes when you create a new recipe to build new software,
13it will build with no problems. When this is not the case, or when you
14have QA issues building any software, it could take a little time to
15resolve them.
16
17While it is tempting to ignore a QA message or even to disable QA
18checks, it is best to try and resolve any reported QA issues. This
19chapter provides a list of the QA messages and brief explanations of the
20issues you could encounter so that you can properly resolve problems.
21
22The next section provides a list of all QA error and warning messages
23based on a default configuration. Each entry provides the message or
24error form along with an explanation.
25
26.. note::
27
28 - At the end of each message, the name of the associated QA test (as
29 listed in the "```insane.bbclass`` <#ref-classes-insane>`__"
30 section) appears within square brackets.
31
32 - As mentioned, this list of error and warning messages is for QA
33 checks only. The list does not cover all possible build errors or
34 warnings you could encounter.
35
36 - Because some QA checks are disabled by default, this list does not
37 include all possible QA check errors and warnings.
38
39.. _qa-errors-and-warnings:
40
41Errors and Warnings
42===================
43
44- ``<packagename>: <path> is using libexec please relocate to <libexecdir> [libexec]``
45
46 The specified package contains files in ``/usr/libexec`` when the
47 distro configuration uses a different path for ``<libexecdir>`` By
48 default, ``<libexecdir>`` is ``$prefix/libexec``. However, this
49 default can be changed (e.g. ``${libdir}``).
50
51  
52
53- ``package <packagename> contains bad RPATH <rpath> in file <file> [rpaths]``
54
55 The specified binary produced by the recipe contains dynamic library
56 load paths (rpaths) that contain build system paths such as
57 ```TMPDIR`` <#var-TMPDIR>`__, which are incorrect for the target and
58 could potentially be a security issue. Check for bad ``-rpath``
59 options being passed to the linker in your
60 ```do_compile`` <#ref-tasks-compile>`__ log. Depending on the build
61 system used by the software being built, there might be a configure
62 option to disable rpath usage completely within the build of the
63 software.
64
65  
66
67- ``<packagename>: <file> contains probably-redundant RPATH <rpath> [useless-rpaths]``
68
69 The specified binary produced by the recipe contains dynamic library
70 load paths (rpaths) that on a standard system are searched by default
71 by the linker (e.g. ``/lib`` and ``/usr/lib``). While these paths
72 will not cause any breakage, they do waste space and are unnecessary.
73 Depending on the build system used by the software being built, there
74 might be a configure option to disable rpath usage completely within
75 the build of the software.
76
77  
78
79- ``<packagename> requires <files>, but no providers in its RDEPENDS [file-rdeps]``
80
81 A file-level dependency has been identified from the specified
82 package on the specified files, but there is no explicit
83 corresponding entry in ```RDEPENDS`` <#var-RDEPENDS>`__. If
84 particular files are required at runtime then ``RDEPENDS`` should be
85 declared in the recipe to ensure the packages providing them are
86 built.
87
88  
89
90- ``<packagename1> rdepends on <packagename2>, but it isn't a build dependency? [build-deps]``
91
92 A runtime dependency exists between the two specified packages, but
93 there is nothing explicit within the recipe to enable the
94 OpenEmbedded build system to ensure that dependency is satisfied.
95 This condition is usually triggered by an
96 ```RDEPENDS`` <#var-RDEPENDS>`__ value being added at the packaging
97 stage rather than up front, which is usually automatic based on the
98 contents of the package. In most cases, you should change the recipe
99 to add an explicit ``RDEPENDS`` for the dependency.
100
101  
102
103- ``non -dev/-dbg/nativesdk- package contains symlink .so: <packagename> path '<path>' [dev-so]``
104
105 Symlink ``.so`` files are for development only, and should therefore
106 go into the ``-dev`` package. This situation might occur if you add
107 ``*.so*`` rather than ``*.so.*`` to a non-dev package. Change
108 ```FILES`` <#var-FILES>`__ (and possibly
109 ```PACKAGES`` <#var-PACKAGES>`__) such that the specified ``.so``
110 file goes into an appropriate ``-dev`` package.
111
112  
113
114- ``non -staticdev package contains static .a library: <packagename> path '<path>' [staticdev]``
115
116 Static ``.a`` library files should go into a ``-staticdev`` package.
117 Change ```FILES`` <#var-FILES>`__ (and possibly
118 ```PACKAGES`` <#var-PACKAGES>`__) such that the specified ``.a`` file
119 goes into an appropriate ``-staticdev`` package.
120
121  
122
123- ``<packagename>: found library in wrong location [libdir]``
124
125 The specified file may have been installed into an incorrect
126 (possibly hardcoded) installation path. For example, this test will
127 catch recipes that install ``/lib/bar.so`` when ``${base_libdir}`` is
128 "lib32". Another example is when recipes install
129 ``/usr/lib64/foo.so`` when ``${libdir}`` is "/usr/lib". False
130 positives occasionally exist. For these cases add "libdir" to
131 ```INSANE_SKIP`` <#var-INSANE_SKIP>`__ for the package.
132
133  
134
135- ``non debug package contains .debug directory: <packagename> path <path> [debug-files]``
136
137 The specified package contains a ``.debug`` directory, which should
138 not appear in anything but the ``-dbg`` package. This situation might
139 occur if you add a path which contains a ``.debug`` directory and do
140 not explicitly add the ``.debug`` directory to the ``-dbg`` package.
141 If this is the case, add the ``.debug`` directory explicitly to
142 ``FILES_${PN}-dbg``. See ```FILES`` <#var-FILES>`__ for additional
143 information on ``FILES``.
144
145  
146
147- ``Architecture did not match (<machine_arch> to <file_arch>) on <file> [arch]``
148
149 By default, the OpenEmbedded build system checks the Executable and
150 Linkable Format (ELF) type, bit size, and endianness of any binaries
151 to ensure they match the target architecture. This test fails if any
152 binaries do not match the type since there would be an
153 incompatibility. The test could indicate that the wrong compiler or
154 compiler options have been used. Sometimes software, like
155 bootloaders, might need to bypass this check. If the file you receive
156 the error for is firmware that is not intended to be executed within
157 the target operating system or is intended to run on a separate
158 processor within the device, you can add "arch" to
159 ```INSANE_SKIP`` <#var-INSANE_SKIP>`__ for the package. Another
160 option is to check the ```do_compile`` <#ref-tasks-compile>`__ log
161 and verify that the compiler options being used are correct.
162
163  
164
165- ``Bit size did not match (<machine_bits> to <file_bits>) <recipe> on <file> [arch]``
166
167 By default, the OpenEmbedded build system checks the Executable and
168 Linkable Format (ELF) type, bit size, and endianness of any binaries
169 to ensure they match the target architecture. This test fails if any
170 binaries do not match the type since there would be an
171 incompatibility. The test could indicate that the wrong compiler or
172 compiler options have been used. Sometimes software, like
173 bootloaders, might need to bypass this check. If the file you receive
174 the error for is firmware that is not intended to be executed within
175 the target operating system or is intended to run on a separate
176 processor within the device, you can add "arch" to
177 ```INSANE_SKIP`` <#var-INSANE_SKIP>`__ for the package. Another
178 option is to check the ```do_compile`` <#ref-tasks-compile>`__ log
179 and verify that the compiler options being used are correct.
180
181  
182
183- ``Endianness did not match (<machine_endianness> to <file_endianness>) on <file> [arch]``
184
185 By default, the OpenEmbedded build system checks the Executable and
186 Linkable Format (ELF) type, bit size, and endianness of any binaries
187 to ensure they match the target architecture. This test fails if any
188 binaries do not match the type since there would be an
189 incompatibility. The test could indicate that the wrong compiler or
190 compiler options have been used. Sometimes software, like
191 bootloaders, might need to bypass this check. If the file you receive
192 the error for is firmware that is not intended to be executed within
193 the target operating system or is intended to run on a separate
194 processor within the device, you can add "arch" to
195 ```INSANE_SKIP`` <#var-INSANE_SKIP>`__ for the package. Another
196 option is to check the ```do_compile`` <#ref-tasks-compile>`__ log
197 and verify that the compiler options being used are correct.
198
199  
200
201- ``ELF binary '<file>' has relocations in .text [textrel]``
202
203 The specified ELF binary contains relocations in its ``.text``
204 sections. This situation can result in a performance impact at
205 runtime.
206
207 Typically, the way to solve this performance issue is to add "-fPIC"
208 or "-fpic" to the compiler command-line options. For example, given
209 software that reads ```CFLAGS`` <#var-CFLAGS>`__ when you build it,
210 you could add the following to your recipe: CFLAGS_append = " -fPIC "
211
212 For more information on text relocations at runtime, see
213 ` <http://www.akkadia.org/drepper/textrelocs.html>`__.
214
215  
216
217- ``No GNU_HASH in the elf binary: '<file>' [ldflags]``
218
219 This indicates that binaries produced when building the recipe have
220 not been linked with the ```LDFLAGS`` <#var-LDFLAGS>`__ options
221 provided by the build system. Check to be sure that the ``LDFLAGS``
222 variable is being passed to the linker command. A common workaround
223 for this situation is to pass in ``LDFLAGS`` using
224 ```TARGET_CC_ARCH`` <#var-TARGET_CC_ARCH>`__ within the recipe as
225 follows: TARGET_CC_ARCH += "${LDFLAGS}"
226
227  
228
229- ``Package <packagename> contains Xorg driver (<driver>) but no xorg-abi- dependencies [xorg-driver-abi]``
230
231 The specified package contains an Xorg driver, but does not have a
232 corresponding ABI package dependency. The xserver-xorg recipe
233 provides driver ABI names. All drivers should depend on the ABI
234 versions that they have been built against. Driver recipes that
235 include ``xorg-driver-input.inc`` or ``xorg-driver-video.inc`` will
236 automatically get these versions. Consequently, you should only need
237 to explicitly add dependencies to binary driver recipes.
238
239  
240
241- ``The /usr/share/info/dir file is not meant to be shipped in a particular package. [infodir]``
242
243 The ``/usr/share/info/dir`` should not be packaged. Add the following
244 line to your ```do_install`` <#ref-tasks-install>`__ task or to your
245 ``do_install_append`` within the recipe as follows: rm
246 ${D}${infodir}/dir
247
248  
249
250- ``Symlink <path> in <packagename> points to TMPDIR [symlink-to-sysroot]``
251
252 The specified symlink points into ```TMPDIR`` <#var-TMPDIR>`__ on the
253 host. Such symlinks will work on the host. However, they are clearly
254 invalid when running on the target. You should either correct the
255 symlink to use a relative path or remove the symlink.
256
257  
258
259- ``<file> failed sanity test (workdir) in path <path> [la]``
260
261 The specified ``.la`` file contains ```TMPDIR`` <#var-TMPDIR>`__
262 paths. Any ``.la`` file containing these paths is incorrect since
263 ``libtool`` adds the correct sysroot prefix when using the files
264 automatically itself.
265
266  
267
268- ``<file> failed sanity test (tmpdir) in path <path> [pkgconfig]``
269
270 The specified ``.pc`` file contains
271 ```TMPDIR`` <#var-TMPDIR>`__\ ``/``\ ```WORKDIR`` <#var-WORKDIR>`__
272 paths. Any ``.pc`` file containing these paths is incorrect since
273 ``pkg-config`` itself adds the correct sysroot prefix when the files
274 are accessed.
275
276  
277
278- ``<packagename> rdepends on <debug_packagename> [debug-deps]``
279
280 A dependency exists between the specified non-dbg package (i.e. a
281 package whose name does not end in ``-dbg``) and a package that is a
282 ``dbg`` package. The ``dbg`` packages contain debug symbols and are
283 brought in using several different methods:
284
285 - Using the ``dbg-pkgs``
286 ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__ value.
287
288 - Using ```IMAGE_INSTALL`` <#var-IMAGE_INSTALL>`__.
289
290 - As a dependency of another ``dbg`` package that was brought in
291 using one of the above methods.
292
293 The dependency might have been automatically added because the
294 ``dbg`` package erroneously contains files that it should not contain
295 (e.g. a non-symlink ``.so`` file) or it might have been added
296 manually (e.g. by adding to ```RDEPENDS`` <#var-RDEPENDS>`__).
297
298  
299
300- ``<packagename> rdepends on <dev_packagename> [dev-deps]``
301
302 A dependency exists between the specified non-dev package (a package
303 whose name does not end in ``-dev``) and a package that is a ``dev``
304 package. The ``dev`` packages contain development headers and are
305 usually brought in using several different methods:
306
307 - Using the ``dev-pkgs``
308 ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__ value.
309
310 - Using ```IMAGE_INSTALL`` <#var-IMAGE_INSTALL>`__.
311
312 - As a dependency of another ``dev`` package that was brought in
313 using one of the above methods.
314
315 The dependency might have been automatically added (because the
316 ``dev`` package erroneously contains files that it should not have
317 (e.g. a non-symlink ``.so`` file) or it might have been added
318 manually (e.g. by adding to ```RDEPENDS`` <#var-RDEPENDS>`__).
319
320  
321
322- ``<var>_<packagename> is invalid: <comparison> (<value>) only comparisons <, =, >, <=, and >= are allowed [dep-cmp]``
323
324 If you are adding a versioned dependency relationship to one of the
325 dependency variables (```RDEPENDS`` <#var-RDEPENDS>`__,
326 ```RRECOMMENDS`` <#var-RRECOMMENDS>`__,
327 ```RSUGGESTS`` <#var-RSUGGESTS>`__,
328 ```RPROVIDES`` <#var-RPROVIDES>`__,
329 ```RREPLACES`` <#var-RREPLACES>`__, or
330 ```RCONFLICTS`` <#var-RCONFLICTS>`__), you must only use the named
331 comparison operators. Change the versioned dependency values you are
332 adding to match those listed in the message.
333
334  
335
336- ``<recipename>: The compile log indicates that host include and/or library paths were used. Please check the log '<logfile>' for more information. [compile-host-path]``
337
338 The log for the ```do_compile`` <#ref-tasks-compile>`__ task
339 indicates that paths on the host were searched for files, which is
340 not appropriate when cross-compiling. Look for "is unsafe for
341 cross-compilation" or "CROSS COMPILE Badness" in the specified log
342 file.
343
344  
345
346- ``<recipename>: The install log indicates that host include and/or library paths were used. Please check the log '<logfile>' for more information. [install-host-path]``
347
348 The log for the ```do_install`` <#ref-tasks-install>`__ task
349 indicates that paths on the host were searched for files, which is
350 not appropriate when cross-compiling. Look for "is unsafe for
351 cross-compilation" or "CROSS COMPILE Badness" in the specified log
352 file.
353
354  
355
356- ``This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. Rerun configure task after fixing this. The path was '<path>'``
357
358 The log for the ```do_configure`` <#ref-tasks-configure>`__ task
359 indicates that paths on the host were searched for files, which is
360 not appropriate when cross-compiling. Look for "is unsafe for
361 cross-compilation" or "CROSS COMPILE Badness" in the specified log
362 file.
363
364  
365
366- ``<packagename> doesn't match the [a-z0-9.+-]+ regex [pkgname]``
367
368 The convention within the OpenEmbedded build system (sometimes
369 enforced by the package manager itself) is to require that package
370 names are all lower case and to allow a restricted set of characters.
371 If your recipe name does not match this, or you add packages to
372 ```PACKAGES`` <#var-PACKAGES>`__ that do not conform to the
373 convention, then you will receive this error. Rename your recipe. Or,
374 if you have added a non-conforming package name to ``PACKAGES``,
375 change the package name appropriately.
376
377  
378
379- ``<recipe>: configure was passed unrecognized options: <options> [unknown-configure-option]``
380
381 The configure script is reporting that the specified options are
382 unrecognized. This situation could be because the options were
383 previously valid but have been removed from the configure script. Or,
384 there was a mistake when the options were added and there is another
385 option that should be used instead. If you are unsure, consult the
386 upstream build documentation, the ``./configure --help`` output, and
387 the upstream change log or release notes. Once you have worked out
388 what the appropriate change is, you can update
389 ```EXTRA_OECONF`` <#var-EXTRA_OECONF>`__,
390 ```PACKAGECONFIG_CONFARGS`` <#var-PACKAGECONFIG_CONFARGS>`__, or the
391 individual ```PACKAGECONFIG`` <#var-PACKAGECONFIG>`__ option values
392 accordingly.
393
394  
395
396- ``Recipe <recipefile> has PN of "<recipename>" which is in OVERRIDES, this can result in unexpected behavior. [pn-overrides]``
397
398 The specified recipe has a name (```PN`` <#var-PN>`__) value that
399 appears in ```OVERRIDES`` <#var-OVERRIDES>`__. If a recipe is named
400 such that its ``PN`` value matches something already in ``OVERRIDES``
401 (e.g. ``PN`` happens to be the same as ```MACHINE`` <#var-MACHINE>`__
402 or ```DISTRO`` <#var-DISTRO>`__), it can have unexpected
403 consequences. For example, assignments such as
404 ``FILES_${PN} = "xyz"`` effectively turn into ``FILES = "xyz"``.
405 Rename your recipe (or if ``PN`` is being set explicitly, change the
406 ``PN`` value) so that the conflict does not occur. See
407 ```FILES`` <#var-FILES>`__ for additional information.
408
409  
410
411- ``<recipefile>: Variable <variable> is set as not being package specific, please fix this. [pkgvarcheck]``
412
413 Certain variables (```RDEPENDS`` <#var-RDEPENDS>`__,
414 ```RRECOMMENDS`` <#var-RRECOMMENDS>`__,
415 ```RSUGGESTS`` <#var-RSUGGESTS>`__,
416 ```RCONFLICTS`` <#var-RCONFLICTS>`__,
417 ```RPROVIDES`` <#var-RPROVIDES>`__,
418 ```RREPLACES`` <#var-RREPLACES>`__, ```FILES`` <#var-FILES>`__,
419 ``pkg_preinst``, ``pkg_postinst``, ``pkg_prerm``, ``pkg_postrm``, and
420 ```ALLOW_EMPTY`` <#var-ALLOW_EMPTY>`__) should always be set specific
421 to a package (i.e. they should be set with a package name override
422 such as ``RDEPENDS_${PN} = "value"`` rather than
423 ``RDEPENDS = "value"``). If you receive this error, correct any
424 assignments to these variables within your recipe.
425
426  
427
428- ``File '<file>' from <recipename> was already stripped, this will prevent future debugging! [already-stripped]``
429
430 Produced binaries have already been stripped prior to the build
431 system extracting debug symbols. It is common for upstream software
432 projects to default to stripping debug symbols for output binaries.
433 In order for debugging to work on the target using ``-dbg`` packages,
434 this stripping must be disabled.
435
436 Depending on the build system used by the software being built,
437 disabling this stripping could be as easy as specifying an additional
438 configure option. If not, disabling stripping might involve patching
439 the build scripts. In the latter case, look for references to "strip"
440 or "STRIP", or the "-s" or "-S" command-line options being specified
441 on the linker command line (possibly through the compiler command
442 line if preceded with "-Wl,").
443
444 .. note::
445
446 Disabling stripping here does not mean that the final packaged
447 binaries will be unstripped. Once the OpenEmbedded build system
448 splits out debug symbols to the
449 -dbg
450 package, it will then strip the symbols from the binaries.
451
452  
453
454- ``<packagename> is listed in PACKAGES multiple times, this leads to packaging errors. [packages-list]``
455
456 Package names must appear only once in the
457 ```PACKAGES`` <#var-PACKAGES>`__ variable. You might receive this
458 error if you are attempting to add a package to ``PACKAGES`` that is
459 already in the variable's value.
460
461  
462
463- ``FILES variable for package <packagename> contains '//' which is invalid. Attempting to fix this but you should correct the metadata. [files-invalid]``
464
465 The string "//" is invalid in a Unix path. Correct all occurrences
466 where this string appears in a ```FILES`` <#var-FILES>`__ variable so
467 that there is only a single "/".
468
469  
470
471- ``<recipename>: Files/directories were installed but not shipped in any package [installed-vs-shipped]``
472
473 Files have been installed within the
474 ```do_install`` <#ref-tasks-install>`__ task but have not been
475 included in any package by way of the ```FILES`` <#var-FILES>`__
476 variable. Files that do not appear in any package cannot be present
477 in an image later on in the build process. You need to do one of the
478 following:
479
480 - Add the files to ``FILES`` for the package you want them to appear
481 in (e.g. ``FILES_${``\ ```PN`` <#var-PN>`__\ ``}`` for the main
482 package).
483
484 - Delete the files at the end of the ``do_install`` task if the
485 files are not needed in any package.
486
487  
488
489- ``<oldpackage>-<oldpkgversion> was registered as shlib provider for <library>, changing it to <newpackage>-<newpkgversion> because it was built later``
490
491 This message means that both ``<oldpackage>`` and ``<newpackage>``
492 provide the specified shared library. You can expect this message
493 when a recipe has been renamed. However, if that is not the case, the
494 message might indicate that a private version of a library is being
495 erroneously picked up as the provider for a common library. If that
496 is the case, you should add the library's ``.so`` file name to
497 ```PRIVATE_LIBS`` <#var-PRIVATE_LIBS>`__ in the recipe that provides
498 the private version of the library.
499
500- ``LICENSE_<packagename> includes licenses (<licenses>) that are not listed in LICENSE [unlisted-pkg-lics]``
501
502 The ```LICENSE`` <#var-LICENSE>`__ of the recipe should be a superset
503 of all the licenses of all packages produced by this recipe. In other
504 words, any license in ``LICENSE_*`` should also appear in
505 ```LICENSE`` <#var-LICENSE>`__.
506
507  
508
509Configuring and Disabling QA Checks
510===================================
511
512You can configure the QA checks globally so that specific check failures
513either raise a warning or an error message, using the
514```WARN_QA`` <#var-WARN_QA>`__ and ```ERROR_QA`` <#var-ERROR_QA>`__
515variables, respectively. You can also disable checks within a particular
516recipe using ```INSANE_SKIP`` <#var-INSANE_SKIP>`__. For information on
517how to work with the QA checks, see the
518"```insane.bbclass`` <#ref-classes-insane>`__" section.
519
520.. note::
521
522 Please keep in mind that the QA checks exist in order to detect real
523 or potential problems in the packaged output. So exercise caution
524 when disabling these checks.
diff --git a/documentation/ref-manual/ref-release-process.rst b/documentation/ref-manual/ref-release-process.rst
new file mode 100644
index 0000000000..1c97500d2b
--- /dev/null
+++ b/documentation/ref-manual/ref-release-process.rst
@@ -0,0 +1,182 @@
1*****************************************************
2Yocto Project Releases and the Stable Release Process
3*****************************************************
4
5The Yocto Project release process is predictable and consists of both
6major and minor (point) releases. This brief chapter provides
7information on how releases are named, their life cycle, and their
8stability.
9
10Major and Minor Release Cadence
11===============================
12
13The Yocto Project delivers major releases (e.g. DISTRO) using a six
14month cadence roughly timed each April and October of the year.
15Following are examples of some major YP releases with their codenames
16also shown. See the "`Major Release
17Codenames <#major-release-codenames>`__" section for information on
18codenames used with major releases. 2.2 (Morty) 2.1 (Krogoth) 2.0
19(Jethro) While the cadence is never perfect, this timescale facilitates
20regular releases that have strong QA cycles while not overwhelming users
21with too many new releases. The cadence is predictable and avoids many
22major holidays in various geographies.
23
24The Yocto project delivers minor (point) releases on an unscheduled
25basis and are usually driven by the accumulation of enough significant
26fixes or enhancements to the associated major release. Following are
27some example past point releases: 2.1.1 2.1.2 2.2.1 The point release
28indicates a point in the major release branch where a full QA cycle and
29release process validates the content of the new branch.
30
31.. note::
32
33 Realize that there can be patches merged onto the stable release
34 branches as and when they become available.
35
36Major Release Codenames
37=======================
38
39Each major release receives a codename that identifies the release in
40the `Yocto Project Source
41Repositories <&YOCTO_DOCS_OM_URL;#yocto-project-repositories>`__. The
42concept is that branches of `Metadata <#metadata>`__ with the same
43codename are likely to be compatible and thus work together.
44
45.. note::
46
47 Codenames are associated with major releases because a Yocto Project
48 release number (e.g. DISTRO) could conflict with a given layer or
49 company versioning scheme. Codenames are unique, interesting, and
50 easily identifiable.
51
52Releases are given a nominal release version as well but the codename is
53used in repositories for this reason. You can find information on Yocto
54Project releases and codenames at
55` <https://wiki.yoctoproject.org/wiki/Releases>`__.
56
57Stable Release Process
58======================
59
60Once released, the release enters the stable release process at which
61time a person is assigned as the maintainer for that stable release.
62This maintainer monitors activity for the release by investigating and
63handling nominated patches and backport activity. Only fixes and
64enhancements that have first been applied on the "master" branch (i.e.
65the current, in-development branch) are considered for backporting to a
66stable release.
67
68.. note::
69
70 The current Yocto Project policy regarding backporting is to consider
71 bug fixes and security fixes only. Policy dictates that features are
72 not backported to a stable release. This policy means generic recipe
73 version upgrades are unlikely to be accepted for backporting. The
74 exception to this policy occurs when a strong reason exists such as
75 the fix happens to also be the preferred upstream approach.
76
77Stable release branches have strong maintenance for about a year after
78their initial release. Should significant issues be found for any
79release regardless of its age, fixes could be backported to older
80releases. For issues that are not backported given an older release,
81Community LTS trees and branches exist where community members share
82patches for older releases. However, these types of patches do not go
83through the same release process as do point releases. You can find more
84information about stable branch maintenance at
85` <https://wiki.yoctoproject.org/wiki/Stable_branch_maintenance>`__.
86
87Testing and Quality Assurance
88=============================
89
90Part of the Yocto Project development and release process is quality
91assurance through the execution of test strategies. Test strategies
92provide the Yocto Project team a way to ensure a release is validated.
93Additionally, because the test strategies are visible to you as a
94developer, you can validate your projects. This section overviews the
95available test infrastructure used in the Yocto Project. For information
96on how to run available tests on your projects, see the "`Performing
97Automated Runtime
98Testing <&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing>`__"
99section in the Yocto Project Development Tasks Manual.
100
101The QA/testing infrastructure is woven into the project to the point
102where core developers take some of it for granted. The infrastructure
103consists of the following pieces:
104
105- ``bitbake-selftest``: A standalone command that runs unit tests on
106 key pieces of BitBake and its fetchers.
107
108- ```sanity.bbclass`` <#ref-classes-sanity>`__: This automatically
109 included class checks the build environment for missing tools (e.g.
110 ``gcc``) or common misconfigurations such as
111 ```MACHINE`` <#var-MACHINE>`__ set incorrectly.
112
113- ```insane.bbclass`` <#ref-classes-insane>`__: This class checks the
114 generated output from builds for sanity. For example, if building for
115 an ARM target, did the build produce ARM binaries. If, for example,
116 the build produced PPC binaries then there is a problem.
117
118- ```testimage.bbclass`` <#ref-classes-testimage*>`__: This class
119 performs runtime testing of images after they are built. The tests
120 are usually used with `QEMU <&YOCTO_DOCS_DEV_URL;#dev-manual-qemu>`__
121 to boot the images and check the combined runtime result boot
122 operation and functions. However, the test can also use the IP
123 address of a machine to test.
124
125- ```ptest`` <&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest>`__:
126 Runs tests against packages produced during the build for a given
127 piece of software. The test allows the packages to be be run within a
128 target image.
129
130- ``oe-selftest``: Tests combination BitBake invocations. These tests
131 operate outside the OpenEmbedded build system itself. The
132 ``oe-selftest`` can run all tests by default or can run selected
133 tests or test suites.
134
135 .. note::
136
137 Running
138 oe-selftest
139 requires host packages beyond the "Essential" grouping. See the "
140 Required Packages for the Build Host
141 " section for more information.
142
143Originally, much of this testing was done manually. However, significant
144effort has been made to automate the tests so that more people can use
145them and the Yocto Project development team can run them faster and more
146efficiently.
147
148The Yocto Project's main Autobuilder (``autobuilder.yoctoproject.org``)
149publicly tests each Yocto Project release's code in the
150`OE-Core <#oe-core>`__, Poky, and BitBake repositories. The testing
151occurs for both the current state of the "master" branch and also for
152submitted patches. Testing for submitted patches usually occurs in the
153"ross/mut" branch in the ``poky-contrib`` repository (i.e. the
154master-under-test branch) or in the "master-next" branch in the ``poky``
155repository.
156
157.. note::
158
159 You can find all these branches in the Yocto Project
160 Source Repositories
161 .
162
163Testing within these public branches ensures in a publicly visible way
164that all of the main supposed architectures and recipes in OE-Core
165successfully build and behave properly.
166
167Various features such as ``multilib``, sub architectures (e.g. ``x32``,
168``poky-tiny``, ``musl``, ``no-x11`` and and so forth),
169``bitbake-selftest``, and ``oe-selftest`` are tested as part of the QA
170process of a release. Complete testing and validation for a release
171takes the Autobuilder workers several hours.
172
173.. note::
174
175 The Autobuilder workers are non-homogeneous, which means regular
176 testing across a variety of Linux distributions occurs. The
177 Autobuilder is limited to only testing QEMU-based setups and not real
178 hardware.
179
180Finally, in addition to the Autobuilder's tests, the Yocto Project QA
181team also performs testing on a variety of platforms, which includes
182actual hardware, to ensure expected results.
diff --git a/documentation/ref-manual/ref-structure.rst b/documentation/ref-manual/ref-structure.rst
new file mode 100644
index 0000000000..59d8c0d6c4
--- /dev/null
+++ b/documentation/ref-manual/ref-structure.rst
@@ -0,0 +1,871 @@
1**************************
2Source Directory Structure
3**************************
4
5The `Source Directory <#source-directory>`__ consists of numerous files,
6directories and subdirectories; understanding their locations and
7contents is key to using the Yocto Project effectively. This chapter
8describes the Source Directory and gives information about those files
9and directories.
10
11For information on how to establish a local Source Directory on your
12development system, see the "`Locating Yocto Project Source
13Files <&YOCTO_DOCS_DEV_URL;#locating-yocto-project-source-files>`__"
14section in the Yocto Project Development Tasks Manual.
15
16.. note::
17
18 The OpenEmbedded build system does not support file or directory
19 names that contain spaces. Be sure that the Source Directory you use
20 does not contain these types of names.
21
22.. _structure-core:
23
24Top-Level Core Components
25=========================
26
27This section describes the top-level components of the `Source
28Directory <#source-directory>`__.
29
30.. _structure-core-bitbake:
31
32``bitbake/``
33------------
34
35This directory includes a copy of BitBake for ease of use. The copy
36usually matches the current stable BitBake release from the BitBake
37project. BitBake, a `Metadata <#metadata>`__ interpreter, reads the
38Yocto Project Metadata and runs the tasks defined by that data. Failures
39are usually caused by errors in your Metadata and not from BitBake
40itself; consequently, most users do not need to worry about BitBake.
41
42When you run the ``bitbake`` command, the main BitBake executable (which
43resides in the ``bitbake/bin/`` directory) starts. Sourcing the
44environment setup script (i.e. ````` <#structure-core-script>`__) places
45the ``scripts/`` and ``bitbake/bin/`` directories (in that order) into
46the shell's ``PATH`` environment variable.
47
48For more information on BitBake, see the `BitBake User
49Manual <&YOCTO_DOCS_BB_URL;>`__.
50
51.. _structure-core-build:
52
53``build/``
54----------
55
56This directory contains user configuration files and the output
57generated by the OpenEmbedded build system in its standard configuration
58where the source tree is combined with the output. The `Build
59Directory <#build-directory>`__ is created initially when you ``source``
60the OpenEmbedded build environment setup script (i.e.
61````` <#structure-core-script>`__).
62
63It is also possible to place output and configuration files in a
64directory separate from the `Source Directory <#source-directory>`__ by
65providing a directory name when you ``source`` the setup script. For
66information on separating output from your local Source Directory files
67(commonly described as an "out of tree" build), see the
68"````` <#structure-core-script>`__" section.
69
70.. _handbook:
71
72``documentation/``
73------------------
74
75This directory holds the source for the Yocto Project documentation as
76well as templates and tools that allow you to generate PDF and HTML
77versions of the manuals. Each manual is contained in its own sub-folder;
78for example, the files for this reference manual reside in the
79``ref-manual/`` directory.
80
81.. _structure-core-meta:
82
83``meta/``
84---------
85
86This directory contains the minimal, underlying OpenEmbedded-Core
87metadata. The directory holds recipes, common classes, and machine
88configuration for strictly emulated targets (``qemux86``, ``qemuarm``,
89and so forth.)
90
91.. _structure-core-meta-poky:
92
93``meta-poky/``
94--------------
95
96Designed above the ``meta/`` content, this directory adds just enough
97metadata to define the Poky reference distribution.
98
99.. _structure-core-meta-yocto-bsp:
100
101``meta-yocto-bsp/``
102-------------------
103
104This directory contains the Yocto Project reference hardware Board
105Support Packages (BSPs). For more information on BSPs, see the `Yocto
106Project Board Support Package (BSP) Developer's
107Guide <&YOCTO_DOCS_BSP_URL;>`__.
108
109.. _structure-meta-selftest:
110
111``meta-selftest/``
112------------------
113
114This directory adds additional recipes and append files used by the
115OpenEmbedded selftests to verify the behavior of the build system. You
116do not have to add this layer to your ``bblayers.conf`` file unless you
117want to run the selftests.
118
119.. _structure-meta-skeleton:
120
121``meta-skeleton/``
122------------------
123
124This directory contains template recipes for BSP and kernel development.
125
126.. _structure-core-scripts:
127
128``scripts/``
129------------
130
131This directory contains various integration scripts that implement extra
132functionality in the Yocto Project environment (e.g. QEMU scripts). The
133````` <#structure-core-script>`__ script prepends this directory to the
134shell's ``PATH`` environment variable.
135
136The ``scripts`` directory has useful scripts that assist in contributing
137back to the Yocto Project, such as ``create-pull-request`` and
138``send-pull-request``.
139
140.. _structure-core-script:
141
142````
143----
144
145This script sets up the OpenEmbedded build environment. Running this
146script with the ``source`` command in a shell makes changes to ``PATH``
147and sets other core BitBake variables based on the current working
148directory. You need to run an environment setup script before running
149BitBake commands. The script uses other scripts within the ``scripts``
150directory to do the bulk of the work.
151
152When you run this script, your Yocto Project environment is set up, a
153`Build Directory <#build-directory>`__ is created, your working
154directory becomes the Build Directory, and you are presented with some
155simple suggestions as to what to do next, including a list of some
156possible targets to build. Here is an example: $ source
157oe-init-build-env ### Shell environment set up for builds. ### You can
158now run 'bitbake <target>' Common targets are: core-image-minimal
159core-image-sato meta-toolchain meta-ide-support You can also run
160generated qemu images with a command like 'runqemu qemux86-64' The
161default output of the ``oe-init-build-env`` script is from the
162``conf-notes.txt`` file, which is found in the ``meta-poky`` directory
163within the `Source Directory <#source-directory>`__. If you design a
164custom distribution, you can include your own version of this
165configuration file to mention the targets defined by your distribution.
166See the "`Creating a Custom Template Configuration
167Directory <&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory>`__"
168section in the Yocto Project Development Tasks Manual for more
169information.
170
171By default, running this script without a Build Directory argument
172creates the ``build/`` directory in your current working directory. If
173you provide a Build Directory argument when you ``source`` the script,
174you direct the OpenEmbedded build system to create a Build Directory of
175your choice. For example, the following command creates a Build
176Directory named ``mybuilds/`` that is outside of the `Source
177Directory <#source-directory>`__: $ source OE_INIT_FILE ~/mybuilds The
178OpenEmbedded build system uses the template configuration files, which
179are found by default in the ``meta-poky/conf/`` directory in the Source
180Directory. See the "`Creating a Custom Template Configuration
181Directory <&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory>`__"
182section in the Yocto Project Development Tasks Manual for more
183information.
184
185.. note::
186
187 The OpenEmbedded build system does not support file or directory
188 names that contain spaces. If you attempt to run the
189 OE_INIT_FILE
190 script from a Source Directory that contains spaces in either the
191 filenames or directory names, the script returns an error indicating
192 no such file or directory. Be sure to use a Source Directory free of
193 names containing spaces.
194
195.. _structure-basic-top-level:
196
197``LICENSE, README, and README.hardware``
198----------------------------------------
199
200These files are standard top-level files.
201
202.. _structure-build:
203
204The Build Directory - ``build/``
205================================
206
207The OpenEmbedded build system creates the `Build
208Directory <#build-directory>`__ when you run the build environment setup
209script ````` <#structure-core-script>`__. If you do not give the Build
210Directory a specific name when you run the setup script, the name
211defaults to ``build/``.
212
213For subsequent parsing and processing, the name of the Build directory
214is available via the ```TOPDIR`` <#var-TOPDIR>`__ variable.
215
216.. _structure-build-buildhistory:
217
218``build/buildhistory/``
219-----------------------
220
221The OpenEmbedded build system creates this directory when you enable
222build history via the ``buildhistory`` class file. The directory
223organizes build information into image, packages, and SDK
224subdirectories. For information on the build history feature, see the
225"`Maintaining Build Output
226Quality <&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality>`__"
227section in the Yocto Project Development Tasks Manual.
228
229.. _structure-build-conf-local.conf:
230
231``build/conf/local.conf``
232-------------------------
233
234This configuration file contains all the local user configurations for
235your build environment. The ``local.conf`` file contains documentation
236on the various configuration options. Any variable set here overrides
237any variable set elsewhere within the environment unless that variable
238is hard-coded within a file (e.g. by using '=' instead of '?='). Some
239variables are hard-coded for various reasons but such variables are
240relatively rare.
241
242At a minimum, you would normally edit this file to select the target
243``MACHINE``, which package types you wish to use
244(```PACKAGE_CLASSES`` <#var-PACKAGE_CLASSES>`__), and the location from
245which you want to access downloaded files (``DL_DIR``).
246
247If ``local.conf`` is not present when you start the build, the
248OpenEmbedded build system creates it from ``local.conf.sample`` when you
249``source`` the top-level build environment setup script
250````` <#structure-core-script>`__.
251
252The source ``local.conf.sample`` file used depends on the
253``$TEMPLATECONF`` script variable, which defaults to ``meta-poky/conf/``
254when you are building from the Yocto Project development environment,
255and to ``meta/conf/`` when you are building from the OpenEmbedded-Core
256environment. Because the script variable points to the source of the
257``local.conf.sample`` file, this implies that you can configure your
258build environment from any layer by setting the variable in the
259top-level build environment setup script as follows:
260TEMPLATECONF=your_layer/conf Once the build process gets the sample
261file, it uses ``sed`` to substitute final
262``${``\ ```OEROOT`` <#var-OEROOT>`__\ ``}`` values for all
263``##OEROOT##`` values.
264
265.. note::
266
267 You can see how the
268 TEMPLATECONF
269 variable is used by looking at the
270 scripts/oe-setup-builddir
271 script in the
272 Source Directory
273 . You can find the Yocto Project version of the
274 local.conf.sample
275 file in the
276 meta-poky/conf
277 directory.
278
279.. _structure-build-conf-bblayers.conf:
280
281``build/conf/bblayers.conf``
282----------------------------
283
284This configuration file defines
285`layers <&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers>`__,
286which are directory trees, traversed (or walked) by BitBake. The
287``bblayers.conf`` file uses the ```BBLAYERS`` <#var-BBLAYERS>`__
288variable to list the layers BitBake tries to find.
289
290If ``bblayers.conf`` is not present when you start the build, the
291OpenEmbedded build system creates it from ``bblayers.conf.sample`` when
292you ``source`` the top-level build environment setup script (i.e.
293````` <#structure-core-script>`__).
294
295As with the ``local.conf`` file, the source ``bblayers.conf.sample``
296file used depends on the ``$TEMPLATECONF`` script variable, which
297defaults to ``meta-poky/conf/`` when you are building from the Yocto
298Project development environment, and to ``meta/conf/`` when you are
299building from the OpenEmbedded-Core environment. Because the script
300variable points to the source of the ``bblayers.conf.sample`` file, this
301implies that you can base your build from any layer by setting the
302variable in the top-level build environment setup script as follows:
303TEMPLATECONF=your_layer/conf Once the build process gets the sample
304file, it uses ``sed`` to substitute final
305``${``\ ```OEROOT`` <#var-OEROOT>`__\ ``}`` values for all
306``##OEROOT##`` values.
307
308.. note::
309
310 You can see how the
311 TEMPLATECONF
312 variable
313 scripts/oe-setup-builddir
314 script in the
315 Source Directory
316 . You can find the Yocto Project version of the
317 bblayers.conf.sample
318 file in the
319 meta-poky/conf/
320 directory.
321
322.. _structure-build-conf-sanity_info:
323
324``build/cache/sanity_info``
325---------------------------
326
327This file indicates the state of the sanity checks and is created during
328the build.
329
330.. _structure-build-downloads:
331
332``build/downloads/``
333--------------------
334
335This directory contains downloaded upstream source tarballs. You can
336reuse the directory for multiple builds or move the directory to another
337location. You can control the location of this directory through the
338``DL_DIR`` variable.
339
340.. _structure-build-sstate-cache:
341
342``build/sstate-cache/``
343-----------------------
344
345This directory contains the shared state cache. You can reuse the
346directory for multiple builds or move the directory to another location.
347You can control the location of this directory through the
348``SSTATE_DIR`` variable.
349
350.. _structure-build-tmp:
351
352``build/tmp/``
353--------------
354
355The OpenEmbedded build system creates and uses this directory for all
356the build system's output. The ```TMPDIR`` <#var-TMPDIR>`__ variable
357points to this directory.
358
359BitBake creates this directory if it does not exist. As a last resort,
360to clean up a build and start it from scratch (other than the
361downloads), you can remove everything in the ``tmp`` directory or get
362rid of the directory completely. If you do, you should also completely
363remove the ``build/sstate-cache`` directory.
364
365.. _structure-build-tmp-buildstats:
366
367``build/tmp/buildstats/``
368-------------------------
369
370This directory stores the build statistics.
371
372.. _structure-build-tmp-cache:
373
374``build/tmp/cache/``
375--------------------
376
377When BitBake parses the metadata (recipes and configuration files), it
378caches the results in ``build/tmp/cache/`` to speed up future builds.
379The results are stored on a per-machine basis.
380
381During subsequent builds, BitBake checks each recipe (together with, for
382example, any files included or appended to it) to see if they have been
383modified. Changes can be detected, for example, through file
384modification time (mtime) changes and hashing of file contents. If no
385changes to the file are detected, then the parsed result stored in the
386cache is reused. If the file has changed, it is reparsed.
387
388.. _structure-build-tmp-deploy:
389
390``build/tmp/deploy/``
391---------------------
392
393This directory contains any "end result" output from the OpenEmbedded
394build process. The ```DEPLOY_DIR`` <#var-DEPLOY_DIR>`__ variable points
395to this directory. For more detail on the contents of the ``deploy``
396directory, see the
397"`Images <&YOCTO_DOCS_OM_URL;#images-dev-environment>`__" and
398"`Application Development
399SDK <&YOCTO_DOCS_OM_URL;#sdk-dev-environment>`__" sections in the Yocto
400Project Overview and Concepts Manual.
401
402.. _structure-build-tmp-deploy-deb:
403
404``build/tmp/deploy/deb/``
405-------------------------
406
407This directory receives any ``.deb`` packages produced by the build
408process. The packages are sorted into feeds for different architecture
409types.
410
411.. _structure-build-tmp-deploy-rpm:
412
413``build/tmp/deploy/rpm/``
414-------------------------
415
416This directory receives any ``.rpm`` packages produced by the build
417process. The packages are sorted into feeds for different architecture
418types.
419
420.. _structure-build-tmp-deploy-ipk:
421
422``build/tmp/deploy/ipk/``
423-------------------------
424
425This directory receives ``.ipk`` packages produced by the build process.
426
427.. _structure-build-tmp-deploy-licenses:
428
429``build/tmp/deploy/licenses/``
430------------------------------
431
432This directory receives package licensing information. For example, the
433directory contains sub-directories for ``bash``, ``busybox``, and
434``glibc`` (among others) that in turn contain appropriate ``COPYING``
435license files with other licensing information. For information on
436licensing, see the "`Maintaining Open Source License Compliance During
437Your Product's
438Lifecycle <&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle>`__"
439section in the Yocto Project Development Tasks Manual.
440
441.. _structure-build-tmp-deploy-images:
442
443``build/tmp/deploy/images/``
444----------------------------
445
446This directory is populated with the basic output objects of the build
447(think of them as the "generated artifacts" of the build process),
448including things like the boot loader image, kernel, root filesystem and
449more. If you want to flash the resulting image from a build onto a
450device, look here for the necessary components.
451
452Be careful when deleting files in this directory. You can safely delete
453old images from this directory (e.g. ``core-image-*``). However, the
454kernel (``*zImage*``, ``*uImage*``, etc.), bootloader and other
455supplementary files might be deployed here prior to building an image.
456Because these files are not directly produced from the image, if you
457delete them they will not be automatically re-created when you build the
458image again.
459
460If you do accidentally delete files here, you will need to force them to
461be re-created. In order to do that, you will need to know the target
462that produced them. For example, these commands rebuild and re-create
463the kernel files: $ bitbake -c clean virtual/kernel $ bitbake
464virtual/kernel
465
466.. _structure-build-tmp-deploy-sdk:
467
468``build/tmp/deploy/sdk/``
469-------------------------
470
471The OpenEmbedded build system creates this directory to hold toolchain
472installer scripts which, when executed, install the sysroot that matches
473your target hardware. You can find out more about these installers in
474the "`Building an SDK
475Installer <&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer>`__"
476section in the Yocto Project Application Development and the Extensible
477Software Development Kit (eSDK) manual.
478
479.. _structure-build-tmp-sstate-control:
480
481``build/tmp/sstate-control/``
482-----------------------------
483
484The OpenEmbedded build system uses this directory for the shared state
485manifest files. The shared state code uses these files to record the
486files installed by each sstate task so that the files can be removed
487when cleaning the recipe or when a newer version is about to be
488installed. The build system also uses the manifests to detect and
489produce a warning when files from one task are overwriting those from
490another.
491
492.. _structure-build-tmp-sysroots-components:
493
494``build/tmp/sysroots-components/``
495----------------------------------
496
497This directory is the location of the sysroot contents that the task
498```do_prepare_recipe_sysroot`` <#ref-tasks-prepare_recipe_sysroot>`__
499links or copies into the recipe-specific sysroot for each recipe listed
500in ```DEPENDS`` <#var-DEPENDS>`__. Population of this directory is
501handled through shared state, while the path is specified by the
502```COMPONENTS_DIR`` <#var-COMPONENTS_DIR>`__ variable. Apart from a few
503unusual circumstances, handling of the ``sysroots-components`` directory
504should be automatic, and recipes should not directly reference
505``build/tmp/sysroots-components``.
506
507.. _structure-build-tmp-sysroots:
508
509``build/tmp/sysroots/``
510-----------------------
511
512Previous versions of the OpenEmbedded build system used to create a
513global shared sysroot per machine along with a native sysroot. Beginning
514with the DISTRO version of the Yocto Project, sysroots exist in
515recipe-specific ```WORKDIR`` <#var-WORKDIR>`__ directories. Thus, the
516``build/tmp/sysroots/`` directory is unused.
517
518.. note::
519
520 The
521 build/tmp/sysroots/
522 directory can still be populated using the
523 bitbake build-sysroots
524 command and can be used for compatibility in some cases. However, in
525 general it is not recommended to populate this directory. Individual
526 recipe-specific sysroots should be used.
527
528.. _structure-build-tmp-stamps:
529
530``build/tmp/stamps/``
531---------------------
532
533This directory holds information that BitBake uses for accounting
534purposes to track what tasks have run and when they have run. The
535directory is sub-divided by architecture, package name, and version.
536Following is an example:
537stamps/all-poky-linux/distcc-config/1.0-r0.do_build-2fdd....2do Although
538the files in the directory are empty of data, BitBake uses the filenames
539and timestamps for tracking purposes.
540
541For information on how BitBake uses stamp files to determine if a task
542should be rerun, see the "`Stamp Files and the Rerunning of
543Tasks <&YOCTO_DOCS_OM_URL;#stamp-files-and-the-rerunning-of-tasks>`__"
544section in the Yocto Project Overview and Concepts Manual.
545
546.. _structure-build-tmp-log:
547
548``build/tmp/log/``
549------------------
550
551This directory contains general logs that are not otherwise placed using
552the package's ``WORKDIR``. Examples of logs are the output from the
553``do_check_pkg`` or ``do_distro_check`` tasks. Running a build does not
554necessarily mean this directory is created.
555
556.. _structure-build-tmp-work:
557
558``build/tmp/work/``
559-------------------
560
561This directory contains architecture-specific work sub-directories for
562packages built by BitBake. All tasks execute from the appropriate work
563directory. For example, the source for a particular package is unpacked,
564patched, configured and compiled all within its own work directory.
565Within the work directory, organization is based on the package group
566and version for which the source is being compiled as defined by the
567```WORKDIR`` <#var-WORKDIR>`__.
568
569It is worth considering the structure of a typical work directory. As an
570example, consider ``linux-yocto-kernel-3.0`` on the machine ``qemux86``
571built within the Yocto Project. For this package, a work directory of
572``tmp/work/qemux86-poky-linux/linux-yocto/3.0+git1+<.....>``, referred
573to as the ``WORKDIR``, is created. Within this directory, the source is
574unpacked to ``linux-qemux86-standard-build`` and then patched by Quilt.
575(See the "`Using Quilt in Your
576Workflow <&YOCTO_DOCS_DEV_URL;#using-a-quilt-workflow>`__" section in
577the Yocto Project Development Tasks Manual for more information.) Within
578the ``linux-qemux86-standard-build`` directory, standard Quilt
579directories ``linux-3.0/patches`` and ``linux-3.0/.pc`` are created, and
580standard Quilt commands can be used.
581
582There are other directories generated within ``WORKDIR``. The most
583important directory is ``WORKDIR/temp/``, which has log files for each
584task (``log.do_*.pid``) and contains the scripts BitBake runs for each
585task (``run.do_*.pid``). The ``WORKDIR/image/`` directory is where "make
586install" places its output that is then split into sub-packages within
587``WORKDIR/packages-split/``.
588
589.. _structure-build-tmp-work-tunearch-recipename-version:
590
591``build/tmp/work/tunearch/recipename/version/``
592-----------------------------------------------
593
594The recipe work directory - ``${WORKDIR}``.
595
596As described earlier in the
597"```build/tmp/sysroots/`` <#structure-build-tmp-sysroots>`__" section,
598beginning with the DISTRO release of the Yocto Project, the OpenEmbedded
599build system builds each recipe in its own work directory (i.e.
600```WORKDIR`` <#var-WORKDIR>`__). The path to the work directory is
601constructed using the architecture of the given build (e.g.
602```TUNE_PKGARCH`` <#var-TUNE_PKGARCH>`__,
603```MACHINE_ARCH`` <#var-MACHINE_ARCH>`__, or "allarch"), the recipe
604name, and the version of the recipe (i.e.
605```PE`` <#var-PE>`__\ ``:``\ ```PV`` <#var-PV>`__\ ``-``\ ```PR`` <#var-PR>`__).
606
607A number of key subdirectories exist within each recipe work directory:
608
609- ``${WORKDIR}/temp``: Contains the log files of each task executed for
610 this recipe, the "run" files for each executed task, which contain
611 the code run, and a ``log.task_order`` file, which lists the order in
612 which tasks were executed.
613
614- ``${WORKDIR}/image``: Contains the output of the
615 ```do_install`` <#ref-tasks-install>`__ task, which corresponds to
616 the ``${``\ ```D`` <#var-D>`__\ ``}`` variable in that task.
617
618- ``${WORKDIR}/pseudo``: Contains the pseudo database and log for any
619 tasks executed under pseudo for the recipe.
620
621- ``${WORKDIR}/sysroot-destdir``: Contains the output of the
622 ```do_populate_sysroot`` <#ref-tasks-populate_sysroot>`__ task.
623
624- ``${WORKDIR}/package``: Contains the output of the
625 ```do_package`` <#ref-tasks-package>`__ task before the output is
626 split into individual packages.
627
628- ``${WORKDIR}/packages-split``: Contains the output of the
629 ``do_package`` task after the output has been split into individual
630 packages. Subdirectories exist for each individual package created by
631 the recipe.
632
633- ``${WORKDIR}/recipe-sysroot``: A directory populated with the target
634 dependencies of the recipe. This directory looks like the target
635 filesystem and contains libraries that the recipe might need to link
636 against (e.g. the C library).
637
638- ``${WORKDIR}/recipe-sysroot-native``: A directory populated with the
639 native dependencies of the recipe. This directory contains the tools
640 the recipe needs to build (e.g. the compiler, Autoconf, libtool, and
641 so forth).
642
643- ``${WORKDIR}/build``: This subdirectory applies only to recipes that
644 support builds where the source is separate from the build artifacts.
645 The OpenEmbedded build system uses this directory as a separate build
646 directory (i.e. ``${``\ ```B`` <#var-B>`__\ ``}``).
647
648.. _structure-build-work-shared:
649
650``build/tmp/work-shared/``
651--------------------------
652
653For efficiency, the OpenEmbedded build system creates and uses this
654directory to hold recipes that share a work directory with other
655recipes. In practice, this is only used for ``gcc`` and its variants
656(e.g. ``gcc-cross``, ``libgcc``, ``gcc-runtime``, and so forth).
657
658.. _structure-meta:
659
660The Metadata - ``meta/``
661========================
662
663As mentioned previously, `Metadata <#metadata>`__ is the core of the
664Yocto Project. Metadata has several important subdivisions:
665
666.. _structure-meta-classes:
667
668``meta/classes/``
669-----------------
670
671This directory contains the ``*.bbclass`` files. Class files are used to
672abstract common code so it can be reused by multiple packages. Every
673package inherits the ``base.bbclass`` file. Examples of other important
674classes are ``autotools.bbclass``, which in theory allows any
675Autotool-enabled package to work with the Yocto Project with minimal
676effort. Another example is ``kernel.bbclass`` that contains common code
677and functions for working with the Linux kernel. Functions like image
678generation or packaging also have their specific class files such as
679``image.bbclass``, ``rootfs_*.bbclass`` and ``package*.bbclass``.
680
681For reference information on classes, see the
682"`Classes <#ref-classes>`__" chapter.
683
684.. _structure-meta-conf:
685
686``meta/conf/``
687--------------
688
689This directory contains the core set of configuration files that start
690from ``bitbake.conf`` and from which all other configuration files are
691included. See the include statements at the end of the ``bitbake.conf``
692file and you will note that even ``local.conf`` is loaded from there.
693While ``bitbake.conf`` sets up the defaults, you can often override
694these by using the (``local.conf``) file, machine file or the
695distribution configuration file.
696
697.. _structure-meta-conf-machine:
698
699``meta/conf/machine/``
700----------------------
701
702This directory contains all the machine configuration files. If you set
703``MACHINE = "qemux86"``, the OpenEmbedded build system looks for a
704``qemux86.conf`` file in this directory. The ``include`` directory
705contains various data common to multiple machines. If you want to add
706support for a new machine to the Yocto Project, look in this directory.
707
708.. _structure-meta-conf-distro:
709
710``meta/conf/distro/``
711---------------------
712
713The contents of this directory controls any distribution-specific
714configurations. For the Yocto Project, the ``defaultsetup.conf`` is the
715main file here. This directory includes the versions and the ``SRCDATE``
716definitions for applications that are configured here. An example of an
717alternative configuration might be ``poky-bleeding.conf``. Although this
718file mainly inherits its configuration from Poky.
719
720.. _structure-meta-conf-machine-sdk:
721
722``meta/conf/machine-sdk/``
723--------------------------
724
725The OpenEmbedded build system searches this directory for configuration
726files that correspond to the value of
727```SDKMACHINE`` <#var-SDKMACHINE>`__. By default, 32-bit and 64-bit x86
728files ship with the Yocto Project that support some SDK hosts. However,
729it is possible to extend that support to other SDK hosts by adding
730additional configuration files in this subdirectory within another
731layer.
732
733.. _structure-meta-files:
734
735``meta/files/``
736---------------
737
738This directory contains common license files and several text files used
739by the build system. The text files contain minimal device information
740and lists of files and directories with known permissions.
741
742.. _structure-meta-lib:
743
744``meta/lib/``
745-------------
746
747This directory contains OpenEmbedded Python library code used during the
748build process.
749
750.. _structure-meta-recipes-bsp:
751
752``meta/recipes-bsp/``
753---------------------
754
755This directory contains anything linking to specific hardware or
756hardware configuration information such as "u-boot" and "grub".
757
758.. _structure-meta-recipes-connectivity:
759
760``meta/recipes-connectivity/``
761------------------------------
762
763This directory contains libraries and applications related to
764communication with other devices.
765
766.. _structure-meta-recipes-core:
767
768``meta/recipes-core/``
769----------------------
770
771This directory contains what is needed to build a basic working Linux
772image including commonly used dependencies.
773
774.. _structure-meta-recipes-devtools:
775
776``meta/recipes-devtools/``
777--------------------------
778
779This directory contains tools that are primarily used by the build
780system. The tools, however, can also be used on targets.
781
782.. _structure-meta-recipes-extended:
783
784``meta/recipes-extended/``
785--------------------------
786
787This directory contains non-essential applications that add features
788compared to the alternatives in core. You might need this directory for
789full tool functionality or for Linux Standard Base (LSB) compliance.
790
791.. _structure-meta-recipes-gnome:
792
793``meta/recipes-gnome/``
794-----------------------
795
796This directory contains all things related to the GTK+ application
797framework.
798
799.. _structure-meta-recipes-graphics:
800
801``meta/recipes-graphics/``
802--------------------------
803
804This directory contains X and other graphically related system
805libraries.
806
807.. _structure-meta-recipes-kernel:
808
809``meta/recipes-kernel/``
810------------------------
811
812This directory contains the kernel and generic applications and
813libraries that have strong kernel dependencies.
814
815.. _structure-meta-recipes-lsb4:
816
817``meta/recipes-lsb4/``
818----------------------
819
820This directory contains recipes specifically added to support the Linux
821Standard Base (LSB) version 4.x.
822
823.. _structure-meta-recipes-multimedia:
824
825``meta/recipes-multimedia/``
826----------------------------
827
828This directory contains codecs and support utilities for audio, images
829and video.
830
831.. _structure-meta-recipes-rt:
832
833``meta/recipes-rt/``
834--------------------
835
836This directory contains package and image recipes for using and testing
837the ``PREEMPT_RT`` kernel.
838
839.. _structure-meta-recipes-sato:
840
841``meta/recipes-sato/``
842----------------------
843
844This directory contains the Sato demo/reference UI/UX and its associated
845applications and configuration data.
846
847.. _structure-meta-recipes-support:
848
849``meta/recipes-support/``
850-------------------------
851
852This directory contains recipes used by other recipes, but that are not
853directly included in images (i.e. dependencies of other recipes).
854
855.. _structure-meta-site:
856
857``meta/site/``
858--------------
859
860This directory contains a list of cached results for various
861architectures. Because certain "autoconf" test results cannot be
862determined when cross-compiling due to the tests not able to run on a
863live system, the information in this directory is passed to "autoconf"
864for the various architectures.
865
866.. _structure-meta-recipes-txt:
867
868``meta/recipes.txt``
869--------------------
870
871This file is a description of the contents of ``recipes-*``.
diff --git a/documentation/ref-manual/ref-system-requirements.rst b/documentation/ref-manual/ref-system-requirements.rst
new file mode 100644
index 0000000000..ca2744c311
--- /dev/null
+++ b/documentation/ref-manual/ref-system-requirements.rst
@@ -0,0 +1,378 @@
1*******************
2System Requirements
3*******************
4
5Welcome to the Yocto Project Reference Manual! This manual provides
6reference information for the current release of the Yocto Project, and
7is most effectively used after you have an understanding of the basics
8of the Yocto Project. The manual is neither meant to be read as a
9starting point to the Yocto Project, nor read from start to finish.
10Rather, use this manual to find variable definitions, class
11descriptions, and so forth as needed during the course of using the
12Yocto Project.
13
14For introductory information on the Yocto Project, see the `Yocto
15Project Website <&YOCTO_HOME_URL;>`__ and the "`Yocto Project
16Development
17Environment <&YOCTO_DOCS_OM_URL;#overview-development-environment>`__"
18chapter in the Yocto Project Overview and Concepts Manual.
19
20If you want to use the Yocto Project to quickly build an image without
21having to understand concepts, work through the `Yocto Project Quick
22Build <&YOCTO_DOCS_BRIEF_URL;>`__ document. You can find "how-to"
23information in the `Yocto Project Development Tasks
24Manual <&YOCTO_DOCS_DEV_URL;>`__. You can find Yocto Project overview
25and conceptual information in the `Yocto Project Overview and Concepts
26Manual <&YOCTO_DOCS_OM_URL;>`__.
27
28.. note::
29
30 For more information about the Yocto Project Documentation set, see
31 the "
32 Links and Related Documentation
33 " section.
34
35.. _detailed-supported-distros:
36
37Supported Linux Distributions
38=============================
39
40Currently, the Yocto Project is supported on the following
41distributions:
42
43.. note::
44
45 - Yocto Project releases are tested against the stable Linux
46 distributions in the following list. The Yocto Project should work
47 on other distributions but validation is not performed against
48 them.
49
50 - In particular, the Yocto Project does not support and currently
51 has no plans to support rolling-releases or development
52 distributions due to their constantly changing nature. We welcome
53 patches and bug reports, but keep in mind that our priority is on
54 the supported platforms listed below.
55
56 - You may use Windows Subsystem For Linux v2 to set up a build host
57 using Windows 10, but validation is not performed against build
58 hosts using WSLv2.
59
60 .. note::
61
62 The Yocto Project is not compatible with WSLv1, it is
63 compatible but not officially supported nor validated with
64 WSLv2, if you still decide to use WSL please upgrade to WSLv2.
65
66 - If you encounter problems, please go to `Yocto Project
67 Bugzilla <&YOCTO_BUGZILLA_URL;>`__ and submit a bug. We are
68 interested in hearing about your experience. For information on
69 how to submit a bug, see the Yocto Project `Bugzilla wiki
70 page <&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking>`__
71 and the "`Submitting a Defect Against the Yocto
72 Project <&YOCTO_DOCS_DEV_URL;#submitting-a-defect-against-the-yocto-project>`__"
73 section in the Yocto Project Development Tasks Manual.
74
75- Ubuntu 16.04 (LTS)
76
77- Ubuntu 18.04 (LTS)
78
79- Ubuntu 20.04
80
81- Fedora 30
82
83- Fedora 31
84
85- Fedora 32
86
87- CentOS 7.x
88
89- CentOS 8.x
90
91- Debian GNU/Linux 8.x (Jessie)
92
93- Debian GNU/Linux 9.x (Stretch)
94
95- Debian GNU/Linux 10.x (Buster)
96
97- OpenSUSE Leap 15.1
98
99.. note::
100
101 While the Yocto Project Team attempts to ensure all Yocto Project
102 releases are one hundred percent compatible with each officially
103 supported Linux distribution, instances might exist where you
104 encounter a problem while using the Yocto Project on a specific
105 distribution.
106
107Required Packages for the Build Host
108====================================
109
110The list of packages you need on the host development system can be
111large when covering all build scenarios using the Yocto Project. This
112section describes required packages according to Linux distribution and
113function.
114
115.. _ubuntu-packages:
116
117Ubuntu and Debian
118-----------------
119
120The following list shows the required packages by function given a
121supported Ubuntu or Debian Linux distribution:
122
123.. note::
124
125 - If your build system has the ``oss4-dev`` package installed, you
126 might experience QEMU build failures due to the package installing
127 its own custom ``/usr/include/linux/soundcard.h`` on the Debian
128 system. If you run into this situation, either of the following
129 solutions exist: $ sudo apt-get build-dep qemu $ sudo apt-get
130 remove oss4-dev
131
132 - For Debian-8, ``python3-git`` and ``pylint3`` are no longer
133 available via ``apt-get``. $ sudo pip3 install GitPython
134 pylint==1.9.5
135
136- *Essentials:* Packages needed to build an image on a headless system:
137 $ sudo apt-get install UBUNTU_HOST_PACKAGES_ESSENTIAL
138
139- *Documentation:* Packages needed if you are going to build out the
140 Yocto Project documentation manuals: $ sudo apt-get install make
141 xsltproc docbook-utils fop dblatex xmlto
142
143Fedora Packages
144---------------
145
146The following list shows the required packages by function given a
147supported Fedora Linux distribution:
148
149- *Essentials:* Packages needed to build an image for a headless
150 system: $ sudo dnf install FEDORA_HOST_PACKAGES_ESSENTIAL
151
152- *Documentation:* Packages needed if you are going to build out the
153 Yocto Project documentation manuals: $ sudo dnf install
154 docbook-style-dsssl docbook-style-xsl \\ docbook-dtds docbook-utils
155 fop libxslt dblatex xmlto
156
157openSUSE Packages
158-----------------
159
160The following list shows the required packages by function given a
161supported openSUSE Linux distribution:
162
163- *Essentials:* Packages needed to build an image for a headless
164 system: $ sudo zypper install OPENSUSE_HOST_PACKAGES_ESSENTIAL
165
166- *Documentation:* Packages needed if you are going to build out the
167 Yocto Project documentation manuals: $ sudo zypper install dblatex
168 xmlto
169
170CentOS-7 Packages
171-----------------
172
173The following list shows the required packages by function given a
174supported CentOS-7 Linux distribution:
175
176- *Essentials:* Packages needed to build an image for a headless
177 system: $ sudo yum install CENTOS7_HOST_PACKAGES_ESSENTIAL
178
179 .. note::
180
181 - Extra Packages for Enterprise Linux (i.e. ``epel-release``) is
182 a collection of packages from Fedora built on RHEL/CentOS for
183 easy installation of packages not included in enterprise Linux
184 by default. You need to install these packages separately.
185
186 - The ``makecache`` command consumes additional Metadata from
187 ``epel-release``.
188
189- *Documentation:* Packages needed if you are going to build out the
190 Yocto Project documentation manuals: $ sudo yum install
191 docbook-style-dsssl docbook-style-xsl \\ docbook-dtds docbook-utils
192 fop libxslt dblatex xmlto
193
194CentOS-8 Packages
195-----------------
196
197The following list shows the required packages by function given a
198supported CentOS-8 Linux distribution:
199
200- *Essentials:* Packages needed to build an image for a headless
201 system: $ sudo dnf install CENTOS8_HOST_PACKAGES_ESSENTIAL
202
203 .. note::
204
205 - Extra Packages for Enterprise Linux (i.e. ``epel-release``) is
206 a collection of packages from Fedora built on RHEL/CentOS for
207 easy installation of packages not included in enterprise Linux
208 by default. You need to install these packages separately.
209
210 - The ``PowerTools`` repo provides additional packages such as
211 ``rpcgen`` and ``texinfo``.
212
213 - The ``makecache`` command consumes additional Metadata from
214 ``epel-release``.
215
216- *Documentation:* Packages needed if you are going to build out the
217 Yocto Project documentation manuals: $ sudo dnf install
218 docbook-style-dsssl docbook-style-xsl \\ docbook-dtds docbook-utils
219 fop libxslt dblatex xmlto
220
221Required Git, tar, Python and gcc Versions
222==========================================
223
224In order to use the build system, your host development system must meet
225the following version requirements for Git, tar, and Python:
226
227- Git 1.8.3.1 or greater
228
229- tar 1.28 or greater
230
231- Python 3.5.0 or greater
232
233If your host development system does not meet all these requirements,
234you can resolve this by installing a ``buildtools`` tarball that
235contains these tools. You can get the tarball one of two ways: download
236a pre-built tarball or use BitBake to build the tarball.
237
238In addition, your host development system must meet the following
239version requirement for gcc:
240
241- gcc 5.0 or greater
242
243If your host development system does not meet this requirement, you can
244resolve this by installing a ``buildtools-extended`` tarball that
245contains additional tools, the equivalent of ``buildtools-essential``.
246
247Installing a Pre-Built ``buildtools`` Tarball with ``install-buildtools`` script
248--------------------------------------------------------------------------------
249
250The ``install-buildtools`` script is the easiest of the three methods by
251which you can get these tools. It downloads a pre-built buildtools
252installer and automatically installs the tools for you:
253
2541. Execute the ``install-buildtools`` script. Here is an example: $ cd
255 poky $ scripts/install-buildtools --without-extended-buildtools \\
256 --base-url YOCTO_DL_URL/releases/yocto \\ --release yocto-DISTRO \\
257 --installer-version DISTRO
258
259 During execution, the buildtools tarball will be downloaded, the
260 checksum of the download will be verified, the installer will be run
261 for you, and some basic checks will be run to to make sure the
262 installation is functional.
263
264 To avoid the need of ``sudo`` privileges, the ``install-buildtools``
265 script will by default tell the installer to install in:
266 /path/to/poky/buildtools
267
268 If your host development system needs the additional tools provided
269 in the ``buildtools-extended`` tarball, you can instead execute the
270 ``install-buildtools`` script with the default parameters: $ cd poky
271 $ scripts/install-buildtools
272
2732. Source the tools environment setup script by using a command like the
274 following: $ source
275 /path/to/poky/buildtools/environment-setup-x86_64-pokysdk-linux Of
276 course, you need to supply your installation directory and be sure to
277 use the right file (i.e. i586 or x86_64).
278
279 After you have sourced the setup script, the tools are added to
280 ``PATH`` and any other environment variables required to run the
281 tools are initialized. The results are working versions versions of
282 Git, tar, Python and ``chrpath``. And in the case of the
283 ``buildtools-extended`` tarball, additional working versions of tools
284 including ``gcc``, ``make`` and the other tools included in
285 ``packagegroup-core-buildessential``.
286
287Downloading a Pre-Built ``buildtools`` Tarball
288----------------------------------------------
289
290Downloading and running a pre-built buildtools installer is the easiest
291of the two methods by which you can get these tools:
292
2931. Locate and download the ``*.sh`` at
294 ` <&YOCTO_RELEASE_DL_URL;/buildtools/>`__.
295
2962. Execute the installation script. Here is an example for the
297 traditional installer: $ sh
298 ~/Downloads/x86_64-buildtools-nativesdk-standalone-DISTRO.sh Here is
299 an example for the extended installer: $ sh
300 ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-DISTRO.sh
301 During execution, a prompt appears that allows you to choose the
302 installation directory. For example, you could choose the following:
303 /home/your-username/buildtools
304
3053. Source the tools environment setup script by using a command like the
306 following: $ source
307 /home/your_username/buildtools/environment-setup-i586-poky-linux Of
308 course, you need to supply your installation directory and be sure to
309 use the right file (i.e. i585 or x86-64).
310
311 After you have sourced the setup script, the tools are added to
312 ``PATH`` and any other environment variables required to run the
313 tools are initialized. The results are working versions versions of
314 Git, tar, Python and ``chrpath``. And in the case of the
315 ``buildtools-extended`` tarball, additional working versions of tools
316 including ``gcc``, ``make`` and the other tools included in
317 ``packagegroup-core-buildessential``.
318
319Building Your Own ``buildtools`` Tarball
320----------------------------------------
321
322Building and running your own buildtools installer applies only when you
323have a build host that can already run BitBake. In this case, you use
324that machine to build the ``.sh`` file and then take steps to transfer
325and run it on a machine that does not meet the minimal Git, tar, and
326Python (or gcc) requirements.
327
328Here are the steps to take to build and run your own buildtools
329installer:
330
3311. On the machine that is able to run BitBake, be sure you have set up
332 your build environment with the setup script
333 (````` <#structure-core-script>`__).
334
3352. Run the BitBake command to build the tarball: $ bitbake
336 buildtools-tarball or run the BitBake command to build the extended
337 tarball: $ bitbake buildtools-extended-tarball
338
339 .. note::
340
341 The
342 SDKMACHINE
343 variable in your
344 local.conf
345 file determines whether you build tools for a 32-bit or 64-bit
346 system.
347
348 Once the build completes, you can find the ``.sh`` file that installs
349 the tools in the ``tmp/deploy/sdk`` subdirectory of the `Build
350 Directory <#build-directory>`__. The installer file has the string
351 "buildtools" (or "buildtools-extended") in the name.
352
3533. Transfer the ``.sh`` file from the build host to the machine that
354 does not meet the Git, tar, or Python (or gcc) requirements.
355
3564. On the machine that does not meet the requirements, run the ``.sh``
357 file to install the tools. Here is an example for the traditional
358 installer: $ sh
359 ~/Downloads/x86_64-buildtools-nativesdk-standalone-DISTRO.sh Here is
360 an example for the extended installer: $ sh
361 ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-DISTRO.sh
362 During execution, a prompt appears that allows you to choose the
363 installation directory. For example, you could choose the following:
364 /home/your_username/buildtools
365
3665. Source the tools environment setup script by using a command like the
367 following: $ source
368 /home/your_username/buildtools/environment-setup-x86_64-poky-linux Of
369 course, you need to supply your installation directory and be sure to
370 use the right file (i.e. i586 or x86_64).
371
372 After you have sourced the setup script, the tools are added to
373 ``PATH`` and any other environment variables required to run the
374 tools are initialized. The results are working versions versions of
375 Git, tar, Python and ``chrpath``. And in the case of the
376 ``buildtools-extended`` tarball, additional working versions of tools
377 including ``gcc``, ``make`` and the other tools included in
378 ``packagegroup-core-buildessential``.
diff --git a/documentation/ref-manual/ref-tasks.rst b/documentation/ref-manual/ref-tasks.rst
new file mode 100644
index 0000000000..be7db8d4fc
--- /dev/null
+++ b/documentation/ref-manual/ref-tasks.rst
@@ -0,0 +1,834 @@
1*****
2Tasks
3*****
4
5Tasks are units of execution for BitBake. Recipes (``.bb`` files) use
6tasks to complete configuring, compiling, and packaging software. This
7chapter provides a reference of the tasks defined in the OpenEmbedded
8build system.
9
10Normal Recipe Build Tasks
11=========================
12
13The following sections describe normal tasks associated with building a
14recipe. For more information on tasks and dependencies, see the
15"`Tasks <&YOCTO_DOCS_BB_URL;#tasks>`__" and
16"`Dependencies <&YOCTO_DOCS_BB_URL;#dependencies>`__" sections in the
17BitBake User Manual.
18
19.. _ref-tasks-build:
20
21``do_build``
22------------
23
24The default task for all recipes. This task depends on all other normal
25tasks required to build a recipe.
26
27.. _ref-tasks-compile:
28
29``do_compile``
30--------------
31
32Compiles the source code. This task runs with the current working
33directory set to ``${``\ ```B`` <#var-B>`__\ ``}``.
34
35The default behavior of this task is to run the ``oe_runmake`` function
36if a makefile (``Makefile``, ``makefile``, or ``GNUmakefile``) is found.
37If no such file is found, the ``do_compile`` task does nothing.
38
39.. _ref-tasks-compile_ptest_base:
40
41``do_compile_ptest_base``
42-------------------------
43
44Compiles the runtime test suite included in the software being built.
45
46.. _ref-tasks-configure:
47
48``do_configure``
49----------------
50
51Configures the source by enabling and disabling any build-time and
52configuration options for the software being built. The task runs with
53the current working directory set to ``${``\ ```B`` <#var-B>`__\ ``}``.
54
55The default behavior of this task is to run ``oe_runmake clean`` if a
56makefile (``Makefile``, ``makefile``, or ``GNUmakefile``) is found and
57```CLEANBROKEN`` <#var-CLEANBROKEN>`__ is not set to "1". If no such
58file is found or the ``CLEANBROKEN`` variable is set to "1", the
59``do_configure`` task does nothing.
60
61.. _ref-tasks-configure_ptest_base:
62
63``do_configure_ptest_base``
64---------------------------
65
66Configures the runtime test suite included in the software being built.
67
68.. _ref-tasks-deploy:
69
70``do_deploy``
71-------------
72
73Writes output files that are to be deployed to
74``${``\ ```DEPLOY_DIR_IMAGE`` <#var-DEPLOY_DIR_IMAGE>`__\ ``}``. The
75task runs with the current working directory set to
76``${``\ ```B`` <#var-B>`__\ ``}``.
77
78Recipes implementing this task should inherit the
79```deploy`` <#ref-classes-deploy>`__ class and should write the output
80to ``${``\ ```DEPLOYDIR`` <#var-DEPLOYDIR>`__\ ``}``, which is not to be
81confused with ``${DEPLOY_DIR}``. The ``deploy`` class sets up
82``do_deploy`` as a shared state (sstate) task that can be accelerated
83through sstate use. The sstate mechanism takes care of copying the
84output from ``${DEPLOYDIR}`` to ``${DEPLOY_DIR_IMAGE}``.
85
86.. note::
87
88 Do not write the output directly to
89 ${DEPLOY_DIR_IMAGE}
90 , as this causes the sstate mechanism to malfunction.
91
92The ``do_deploy`` task is not added as a task by default and
93consequently needs to be added manually. If you want the task to run
94after ```do_compile`` <#ref-tasks-compile>`__, you can add it by doing
95the following: addtask deploy after do_compile Adding ``do_deploy``
96after other tasks works the same way.
97
98.. note::
99
100 You do not need to add
101 before do_build
102 to the
103 addtask
104 command (though it is harmless), because the
105 base
106 class contains the following:
107 ::
108
109 do_build[recrdeptask] += "do_deploy"
110
111
112 See the "
113 Dependencies
114 " section in the BitBake User Manual for more information.
115
116If the ``do_deploy`` task re-executes, any previous output is removed
117(i.e. "cleaned").
118
119.. _ref-tasks-fetch:
120
121``do_fetch``
122------------
123
124Fetches the source code. This task uses the
125```SRC_URI`` <#var-SRC_URI>`__ variable and the argument's prefix to
126determine the correct `fetcher <&YOCTO_DOCS_BB_URL;#bb-fetchers>`__
127module.
128
129.. _ref-tasks-image:
130
131``do_image``
132------------
133
134Starts the image generation process. The ``do_image`` task runs after
135the OpenEmbedded build system has run the
136```do_rootfs`` <#ref-tasks-rootfs>`__ task during which packages are
137identified for installation into the image and the root filesystem is
138created, complete with post-processing.
139
140The ``do_image`` task performs pre-processing on the image through the
141```IMAGE_PREPROCESS_COMMAND`` <#var-IMAGE_PREPROCESS_COMMAND>`__ and
142dynamically generates supporting ``do_image_*`` tasks as needed.
143
144For more information on image creation, see the "`Image
145Generation <&YOCTO_DOCS_OM_URL;#image-generation-dev-environment>`__"
146section in the Yocto Project Overview and Concepts Manual.
147
148.. _ref-tasks-image-complete:
149
150``do_image_complete``
151---------------------
152
153Completes the image generation process. The ``do_image_complete`` task
154runs after the OpenEmbedded build system has run the
155```do_image`` <#ref-tasks-image>`__ task during which image
156pre-processing occurs and through dynamically generated ``do_image_*``
157tasks the image is constructed.
158
159The ``do_image_complete`` task performs post-processing on the image
160through the
161```IMAGE_POSTPROCESS_COMMAND`` <#var-IMAGE_POSTPROCESS_COMMAND>`__.
162
163For more information on image creation, see the "`Image
164Generation <&YOCTO_DOCS_OM_URL;#image-generation-dev-environment>`__"
165section in the Yocto Project Overview and Concepts Manual.
166
167.. _ref-tasks-install:
168
169``do_install``
170--------------
171
172Copies files that are to be packaged into the holding area
173``${``\ ```D`` <#var-D>`__\ ``}``. This task runs with the current
174working directory set to ``${``\ ```B`` <#var-B>`__\ ``}``, which is the
175compilation directory. The ``do_install`` task, as well as other tasks
176that either directly or indirectly depend on the installed files (e.g.
177```do_package`` <#ref-tasks-package>`__,
178```do_package_write_*`` <#ref-tasks-package_write_deb>`__, and
179```do_rootfs`` <#ref-tasks-rootfs>`__), run under
180`fakeroot <&YOCTO_DOCS_OM_URL;#fakeroot-and-pseudo>`__.
181
182.. note::
183
184 When installing files, be careful not to set the owner and group IDs
185 of the installed files to unintended values. Some methods of copying
186 files, notably when using the recursive ``cp`` command, can preserve
187 the UID and/or GID of the original file, which is usually not what
188 you want. The
189 ```host-user-contaminated`` <#insane-host-user-contaminated>`__ QA
190 check checks for files that probably have the wrong ownership.
191
192 Safe methods for installing files include the following:
193
194 - The ``install`` utility. This utility is the preferred method.
195
196 - The ``cp`` command with the "--no-preserve=ownership" option.
197
198 - The ``tar`` command with the "--no-same-owner" option. See the
199 ``bin_package.bbclass`` file in the ``meta/classes`` directory of
200 the `Source Directory <#source-directory>`__ for an example.
201
202.. _ref-tasks-install_ptest_base:
203
204``do_install_ptest_base``
205-------------------------
206
207Copies the runtime test suite files from the compilation directory to a
208holding area.
209
210.. _ref-tasks-package:
211
212``do_package``
213--------------
214
215Analyzes the content of the holding area
216``${``\ ```D`` <#var-D>`__\ ``}`` and splits the content into subsets
217based on available packages and files. This task makes use of the
218```PACKAGES`` <#var-PACKAGES>`__ and ```FILES`` <#var-FILES>`__
219variables.
220
221The ``do_package`` task, in conjunction with the
222```do_packagedata`` <#ref-tasks-packagedata>`__ task, also saves some
223important package metadata. For additional information, see the
224```PKGDESTWORK`` <#var-PKGDESTWORK>`__ variable and the "`Automatically
225Added Runtime
226Dependencies <&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies>`__"
227section in the Yocto Project Overview and Concepts Manual.
228
229.. _ref-tasks-package_qa:
230
231``do_package_qa``
232-----------------
233
234Runs QA checks on packaged files. For more information on these checks,
235see the ```insane`` <#ref-classes-insane>`__ class.
236
237.. _ref-tasks-package_write_deb:
238
239``do_package_write_deb``
240------------------------
241
242Creates Debian packages (i.e. ``*.deb`` files) and places them in the
243``${``\ ```DEPLOY_DIR_DEB`` <#var-DEPLOY_DIR_DEB>`__\ ``}`` directory in
244the package feeds area. For more information, see the "`Package
245Feeds <&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment>`__" section in
246the Yocto Project Overview and Concepts Manual.
247
248.. _ref-tasks-package_write_ipk:
249
250``do_package_write_ipk``
251------------------------
252
253Creates IPK packages (i.e. ``*.ipk`` files) and places them in the
254``${``\ ```DEPLOY_DIR_IPK`` <#var-DEPLOY_DIR_IPK>`__\ ``}`` directory in
255the package feeds area. For more information, see the "`Package
256Feeds <&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment>`__" section in
257the Yocto Project Overview and Concepts Manual.
258
259.. _ref-tasks-package_write_rpm:
260
261``do_package_write_rpm``
262------------------------
263
264Creates RPM packages (i.e. ``*.rpm`` files) and places them in the
265``${``\ ```DEPLOY_DIR_RPM`` <#var-DEPLOY_DIR_RPM>`__\ ``}`` directory in
266the package feeds area. For more information, see the "`Package
267Feeds <&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment>`__" section in
268the Yocto Project Overview and Concepts Manual.
269
270.. _ref-tasks-package_write_tar:
271
272``do_package_write_tar``
273------------------------
274
275Creates tarballs and places them in the
276``${``\ ```DEPLOY_DIR_TAR`` <#var-DEPLOY_DIR_TAR>`__\ ``}`` directory in
277the package feeds area. For more information, see the "`Package
278Feeds <&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment>`__" section in
279the Yocto Project Overview and Concepts Manual.
280
281.. _ref-tasks-packagedata:
282
283``do_packagedata``
284------------------
285
286Saves package metadata generated by the
287```do_package`` <#ref-tasks-package>`__ task in
288```PKGDATA_DIR`` <#var-PKGDATA_DIR>`__ to make it available globally.
289
290.. _ref-tasks-patch:
291
292``do_patch``
293------------
294
295Locates patch files and applies them to the source code.
296
297After fetching and unpacking source files, the build system uses the
298recipe's ```SRC_URI`` <&YOCTO_DOCS_REF_URL;#var-SRC_URI>`__ statements
299to locate and apply patch files to the source code.
300
301.. note::
302
303 The build system uses the
304 FILESPATH
305 variable to determine the default set of directories when searching
306 for patches.
307
308Patch files, by default, are ``*.patch`` and ``*.diff`` files created
309and kept in a subdirectory of the directory holding the recipe file. For
310example, consider the
311```bluez5`` <&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/recipes-connectivity/bluez5>`__
312recipe from the OE-Core layer (i.e. ``poky/meta``):
313poky/meta/recipes-connectivity/bluez5 This recipe has two patch files
314located here: poky/meta/recipes-connectivity/bluez5/bluez5
315
316In the ``bluez5`` recipe, the ``SRC_URI`` statements point to the source
317and patch files needed to build the package.
318
319.. note::
320
321 In the case for the
322 bluez5_5.48.bb
323 recipe, the
324 SRC_URI
325 statements are from an include file
326 bluez5.inc
327 .
328
329As mentioned earlier, the build system treats files whose file types are
330``.patch`` and ``.diff`` as patch files. However, you can use the
331"apply=yes" parameter with the ``SRC_URI`` statement to indicate any
332file as a patch file: SRC_URI = " \\ git://path_to_repo/some_package \\
333file://file;apply=yes \\ "
334
335Conversely, if you have a directory full of patch files and you want to
336exclude some so that the ``do_patch`` task does not apply them during
337the patch phase, you can use the "apply=no" parameter with the
338``SRC_URI`` statement: SRC_URI = " \\ git://path_to_repo/some_package \\
339file://path_to_lots_of_patch_files \\
340file://path_to_lots_of_patch_files/patch_file5;apply=no \\ " In the
341previous example, assuming all the files in the directory holding the
342patch files end with either ``.patch`` or ``.diff``, every file would be
343applied as a patch by default except for the patch_file5 patch.
344
345You can find out more about the patching process in the
346"`Patching <&YOCTO_DOCS_OM_URL;#patching-dev-environment>`__" section in
347the Yocto Project Overview and Concepts Manual and the "`Patching
348Code <&YOCTO_DOCS_DEV_URL;#new-recipe-patching-code>`__" section in the
349Yocto Project Development Tasks Manual.
350
351.. _ref-tasks-populate_lic:
352
353``do_populate_lic``
354-------------------
355
356Writes license information for the recipe that is collected later when
357the image is constructed.
358
359.. _ref-tasks-populate_sdk:
360
361``do_populate_sdk``
362-------------------
363
364Creates the file and directory structure for an installable SDK. See the
365"`SDK
366Generation <&YOCTO_DOCS_OM_URL;#sdk-generation-dev-environment>`__"
367section in the Yocto Project Overview and Concepts Manual for more
368information.
369
370.. _ref-tasks-populate_sysroot:
371
372``do_populate_sysroot``
373-----------------------
374
375Stages (copies) a subset of the files installed by the
376```do_install`` <#ref-tasks-install>`__ task into the appropriate
377sysroot. For information on how to access these files from other
378recipes, see the ```STAGING_DIR*`` <#var-STAGING_DIR_HOST>`__ variables.
379Directories that would typically not be needed by other recipes at build
380time (e.g. ``/etc``) are not copied by default.
381
382For information on what directories are copied by default, see the
383```SYSROOT_DIRS*`` <#var-SYSROOT_DIRS>`__ variables. You can change
384these variables inside your recipe if you need to make additional (or
385fewer) directories available to other recipes at build time.
386
387The ``do_populate_sysroot`` task is a shared state (sstate) task, which
388means that the task can be accelerated through sstate use. Realize also
389that if the task is re-executed, any previous output is removed (i.e.
390"cleaned").
391
392.. _ref-tasks-prepare_recipe_sysroot:
393
394``do_prepare_recipe_sysroot``
395-----------------------------
396
397Installs the files into the individual recipe specific sysroots (i.e.
398``recipe-sysroot`` and ``recipe-sysroot-native`` under
399``${``\ ```WORKDIR`` <#var-WORKDIR>`__\ ``}`` based upon the
400dependencies specified by ```DEPENDS`` <#var-DEPENDS>`__). See the
401"```staging`` <#ref-classes-staging>`__" class for more information.
402
403.. _ref-tasks-rm_work:
404
405``do_rm_work``
406--------------
407
408Removes work files after the OpenEmbedded build system has finished with
409them. You can learn more by looking at the
410"```rm_work.bbclass`` <#ref-classes-rm-work>`__" section.
411
412.. _ref-tasks-unpack:
413
414``do_unpack``
415-------------
416
417Unpacks the source code into a working directory pointed to by
418``${``\ ```WORKDIR`` <#var-WORKDIR>`__\ ``}``. The ```S`` <#var-S>`__
419variable also plays a role in where unpacked source files ultimately
420reside. For more information on how source files are unpacked, see the
421"`Source
422Fetching <&YOCTO_DOCS_OM_URL;#source-fetching-dev-environment>`__"
423section in the Yocto Project Overview and Concepts Manual and also see
424the ``WORKDIR`` and ``S`` variable descriptions.
425
426Manually Called Tasks
427=====================
428
429These tasks are typically manually triggered (e.g. by using the
430``bitbake -c`` command-line option):
431
432.. _ref-tasks-checkpkg:
433
434``do_checkpkg``
435---------------
436
437Provides information about the recipe including its upstream version and
438status. The upstream version and status reveals whether or not a version
439of the recipe exists upstream and a status of not updated, updated, or
440unknown.
441
442To check the upstream version and status of a recipe, use the following
443devtool commands: $ devtool latest-version $ devtool
444check-upgrade-status See the "```devtool`` Quick
445Reference <#ref-devtool-reference>`__" chapter for more information on
446``devtool``. See the "`Checking on the Upgrade Status of a
447Recipe <&YOCTO_DOCS_REF_URL;#devtool-checking-on-the-upgrade-status-of-a-recipe>`__"
448section for information on checking the upgrade status of a recipe.
449
450To build the ``checkpkg`` task, use the ``bitbake`` command with the
451"-c" option and task name: $ bitbake core-image-minimal -c checkpkg By
452default, the results are stored in ```$LOG_DIR`` <#var-LOG_DIR>`__ (e.g.
453``$BUILD_DIR/tmp/log``).
454
455.. _ref-tasks-checkuri:
456
457``do_checkuri``
458---------------
459
460Validates the ```SRC_URI`` <#var-SRC_URI>`__ value.
461
462.. _ref-tasks-clean:
463
464``do_clean``
465------------
466
467Removes all output files for a target from the
468```do_unpack`` <#ref-tasks-unpack>`__ task forward (i.e. ``do_unpack``,
469```do_configure`` <#ref-tasks-configure>`__,
470```do_compile`` <#ref-tasks-compile>`__,
471```do_install`` <#ref-tasks-install>`__, and
472```do_package`` <#ref-tasks-package>`__).
473
474You can run this task using BitBake as follows: $ bitbake -c clean
475recipe
476
477Running this task does not remove the
478`sstate <&YOCTO_DOCS_OM_URL;#shared-state-cache>`__ cache files.
479Consequently, if no changes have been made and the recipe is rebuilt
480after cleaning, output files are simply restored from the sstate cache.
481If you want to remove the sstate cache files for the recipe, you need to
482use the ```do_cleansstate`` <#ref-tasks-cleansstate>`__ task instead
483(i.e. ``bitbake -c cleansstate`` recipe).
484
485.. _ref-tasks-cleanall:
486
487``do_cleanall``
488---------------
489
490Removes all output files, shared state
491(`sstate <&YOCTO_DOCS_OM_URL;#shared-state-cache>`__) cache, and
492downloaded source files for a target (i.e. the contents of
493```DL_DIR`` <#var-DL_DIR>`__). Essentially, the ``do_cleanall`` task is
494identical to the ```do_cleansstate`` <#ref-tasks-cleansstate>`__ task
495with the added removal of downloaded source files.
496
497You can run this task using BitBake as follows: $ bitbake -c cleanall
498recipe
499
500Typically, you would not normally use the ``cleanall`` task. Do so only
501if you want to start fresh with the ```do_fetch`` <#ref-tasks-fetch>`__
502task.
503
504.. _ref-tasks-cleansstate:
505
506``do_cleansstate``
507------------------
508
509Removes all output files and shared state
510(`sstate <&YOCTO_DOCS_OM_URL;#shared-state-cache>`__) cache for a
511target. Essentially, the ``do_cleansstate`` task is identical to the
512```do_clean`` <#ref-tasks-clean>`__ task with the added removal of
513shared state (`sstate <&YOCTO_DOCS_OM_URL;#shared-state-cache>`__)
514cache.
515
516You can run this task using BitBake as follows: $ bitbake -c cleansstate
517recipe
518
519When you run the ``do_cleansstate`` task, the OpenEmbedded build system
520no longer uses any sstate. Consequently, building the recipe from
521scratch is guaranteed.
522
523.. note::
524
525 The
526 do_cleansstate
527 task cannot remove sstate from a remote sstate mirror. If you need to
528 build a target from scratch using remote mirrors, use the "-f" option
529 as follows:
530 ::
531
532 $ bitbake -f -c do_cleansstate target
533
534
535.. _ref-tasks-devpyshell:
536
537``do_devpyshell``
538-----------------
539
540Starts a shell in which an interactive Python interpreter allows you to
541interact with the BitBake build environment. From within this shell, you
542can directly examine and set bits from the data store and execute
543functions as if within the BitBake environment. See the "`Using a
544Development Python
545Shell <&YOCTO_DOCS_DEV_URL;#platdev-appdev-devpyshell>`__" section in
546the Yocto Project Development Tasks Manual for more information about
547using ``devpyshell``.
548
549.. _ref-tasks-devshell:
550
551``do_devshell``
552---------------
553
554Starts a shell whose environment is set up for development, debugging,
555or both. See the "`Using a Development
556Shell <&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell>`__" section in the
557Yocto Project Development Tasks Manual for more information about using
558``devshell``.
559
560.. _ref-tasks-listtasks:
561
562``do_listtasks``
563----------------
564
565Lists all defined tasks for a target.
566
567.. _ref-tasks-package_index:
568
569``do_package_index``
570--------------------
571
572Creates or updates the index in the `Package
573Feeds <&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment>`__ area.
574
575.. note::
576
577 This task is not triggered with the
578 bitbake -c
579 command-line option as are the other tasks in this section. Because
580 this task is specifically for the
581 package-index
582 recipe, you run it using
583 bitbake package-index
584 .
585
586Image-Related Tasks
587===================
588
589The following tasks are applicable to image recipes.
590
591.. _ref-tasks-bootimg:
592
593``do_bootimg``
594--------------
595
596Creates a bootable live image. See the
597```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__ variable for additional
598information on live image types.
599
600.. _ref-tasks-bundle_initramfs:
601
602``do_bundle_initramfs``
603-----------------------
604
605Combines an initial RAM disk (initramfs) image and kernel together to
606form a single image. The
607```CONFIG_INITRAMFS_SOURCE`` <#var-CONFIG_INITRAMFS_SOURCE>`__ variable
608has some more information about these types of images.
609
610.. _ref-tasks-rootfs:
611
612``do_rootfs``
613-------------
614
615Creates the root filesystem (file and directory structure) for an image.
616See the "`Image
617Generation <&YOCTO_DOCS_OM_URL;#image-generation-dev-environment>`__"
618section in the Yocto Project Overview and Concepts Manual for more
619information on how the root filesystem is created.
620
621.. _ref-tasks-testimage:
622
623``do_testimage``
624----------------
625
626Boots an image and performs runtime tests within the image. For
627information on automatically testing images, see the "`Performing
628Automated Runtime
629Testing <&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing>`__"
630section in the Yocto Project Development Tasks Manual.
631
632.. _ref-tasks-testimage_auto:
633
634``do_testimage_auto``
635---------------------
636
637Boots an image and performs runtime tests within the image immediately
638after it has been built. This task is enabled when you set
639```TESTIMAGE_AUTO`` <#var-TESTIMAGE_AUTO>`__ equal to "1".
640
641For information on automatically testing images, see the "`Performing
642Automated Runtime
643Testing <&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing>`__"
644section in the Yocto Project Development Tasks Manual.
645
646Kernel-Related Tasks
647====================
648
649The following tasks are applicable to kernel recipes. Some of these
650tasks (e.g. the ```do_menuconfig`` <#ref-tasks-menuconfig>`__ task) are
651also applicable to recipes that use Linux kernel style configuration
652such as the BusyBox recipe.
653
654.. _ref-tasks-compile_kernelmodules:
655
656``do_compile_kernelmodules``
657----------------------------
658
659Runs the step that builds the kernel modules (if needed). Building a
660kernel consists of two steps: 1) the kernel (``vmlinux``) is built, and
6612) the modules are built (i.e. ``make modules``).
662
663.. _ref-tasks-diffconfig:
664
665``do_diffconfig``
666-----------------
667
668When invoked by the user, this task creates a file containing the
669differences between the original config as produced by
670```do_kernel_configme`` <#ref-tasks-kernel_configme>`__ task and the
671changes made by the user with other methods (i.e. using
672(```do_kernel_menuconfig`` <#ref-tasks-kernel_menuconfig>`__). Once the
673file of differences is created, it can be used to create a config
674fragment that only contains the differences. You can invoke this task
675from the command line as follows: $ bitbake linux-yocto -c diffconfig
676For more information, see the "`Creating Configuration
677Fragments <&YOCTO_DOCS_KERNEL_DEV_URL;#creating-config-fragments>`__"
678section in the Yocto Project Linux Kernel Development Manual.
679
680.. _ref-tasks-kernel_checkout:
681
682``do_kernel_checkout``
683----------------------
684
685Converts the newly unpacked kernel source into a form with which the
686OpenEmbedded build system can work. Because the kernel source can be
687fetched in several different ways, the ``do_kernel_checkout`` task makes
688sure that subsequent tasks are given a clean working tree copy of the
689kernel with the correct branches checked out.
690
691.. _ref-tasks-kernel_configcheck:
692
693``do_kernel_configcheck``
694-------------------------
695
696Validates the configuration produced by the
697```do_kernel_menuconfig`` <#ref-tasks-kernel_menuconfig>`__ task. The
698``do_kernel_configcheck`` task produces warnings when a requested
699configuration does not appear in the final ``.config`` file or when you
700override a policy configuration in a hardware configuration fragment.
701You can run this task explicitly and view the output by using the
702following command: $ bitbake linux-yocto -c kernel_configcheck -f For
703more information, see the "`Validating
704Configuration <&YOCTO_DOCS_KERNEL_DEV_URL;#validating-configuration>`__"
705section in the Yocto Project Linux Kernel Development Manual.
706
707.. _ref-tasks-kernel_configme:
708
709``do_kernel_configme``
710----------------------
711
712After the kernel is patched by the ```do_patch`` <#ref-tasks-patch>`__
713task, the ``do_kernel_configme`` task assembles and merges all the
714kernel config fragments into a merged configuration that can then be
715passed to the kernel configuration phase proper. This is also the time
716during which user-specified defconfigs are applied if present, and where
717configuration modes such as ``--allnoconfig`` are applied.
718
719.. _ref-tasks-kernel_menuconfig:
720
721``do_kernel_menuconfig``
722------------------------
723
724Invoked by the user to manipulate the ``.config`` file used to build a
725linux-yocto recipe. This task starts the Linux kernel configuration
726tool, which you then use to modify the kernel configuration.
727
728.. note::
729
730 You can also invoke this tool from the command line as follows:
731 ::
732
733 $ bitbake linux-yocto -c menuconfig
734
735
736See the "`Using
737``menuconfig`` <&YOCTO_DOCS_KERNEL_DEV_URL;#using-menuconfig>`__"
738section in the Yocto Project Linux Kernel Development Manual for more
739information on this configuration tool.
740
741.. _ref-tasks-kernel_metadata:
742
743``do_kernel_metadata``
744----------------------
745
746Collects all the features required for a given kernel build, whether the
747features come from ```SRC_URI`` <#var-SRC_URI>`__ or from Git
748repositories. After collection, the ``do_kernel_metadata`` task
749processes the features into a series of config fragments and patches,
750which can then be applied by subsequent tasks such as
751```do_patch`` <#ref-tasks-patch>`__ and
752```do_kernel_configme`` <#ref-tasks-kernel_configme>`__.
753
754.. _ref-tasks-menuconfig:
755
756``do_menuconfig``
757-----------------
758
759Runs ``make menuconfig`` for the kernel. For information on
760``menuconfig``, see the
761"`Using  ``menuconfig`` <&YOCTO_DOCS_KERNEL_DEV_URL;#using-menuconfig>`__"
762section in the Yocto Project Linux Kernel Development Manual.
763
764.. _ref-tasks-savedefconfig:
765
766``do_savedefconfig``
767--------------------
768
769When invoked by the user, creates a defconfig file that can be used
770instead of the default defconfig. The saved defconfig contains the
771differences between the default defconfig and the changes made by the
772user using other methods (i.e. the
773```do_kernel_menuconfig`` <#ref-tasks-kernel_menuconfig>`__ task. You
774can invoke the task using the following command: $ bitbake linux-yocto
775-c savedefconfig
776
777.. _ref-tasks-shared_workdir:
778
779``do_shared_workdir``
780---------------------
781
782After the kernel has been compiled but before the kernel modules have
783been compiled, this task copies files required for module builds and
784which are generated from the kernel build into the shared work
785directory. With these copies successfully copied, the
786```do_compile_kernelmodules`` <#ref-tasks-compile_kernelmodules>`__ task
787can successfully build the kernel modules in the next step of the build.
788
789.. _ref-tasks-sizecheck:
790
791``do_sizecheck``
792----------------
793
794After the kernel has been built, this task checks the size of the
795stripped kernel image against
796```KERNEL_IMAGE_MAXSIZE`` <#var-KERNEL_IMAGE_MAXSIZE>`__. If that
797variable was set and the size of the stripped kernel exceeds that size,
798the kernel build produces a warning to that effect.
799
800.. _ref-tasks-strip:
801
802``do_strip``
803------------
804
805If ``KERNEL_IMAGE_STRIP_EXTRA_SECTIONS`` is defined, this task strips
806the sections named in that variable from ``vmlinux``. This stripping is
807typically used to remove nonessential sections such as ``.comment``
808sections from a size-sensitive configuration.
809
810.. _ref-tasks-validate_branches:
811
812``do_validate_branches``
813------------------------
814
815After the kernel is unpacked but before it is patched, this task makes
816sure that the machine and metadata branches as specified by the
817```SRCREV`` <#var-SRCREV>`__ variables actually exist on the specified
818branches. If these branches do not exist and
819```AUTOREV`` <#var-AUTOREV>`__ is not being used, the
820``do_validate_branches`` task fails during the build.
821
822Miscellaneous Tasks
823===================
824
825The following sections describe miscellaneous tasks.
826
827.. _ref-tasks-spdx:
828
829``do_spdx``
830-----------
831
832A build stage that takes the source code and scans it on a remote
833FOSSOLOGY server in order to produce an SPDX document. This task applies
834only to the ```spdx`` <#ref-classes-spdx>`__ class.
diff --git a/documentation/ref-manual/ref-terms.rst b/documentation/ref-manual/ref-terms.rst
new file mode 100644
index 0000000000..16e0aa7568
--- /dev/null
+++ b/documentation/ref-manual/ref-terms.rst
@@ -0,0 +1,369 @@
1*******************
2Yocto Project Terms
3*******************
4
5Following is a list of terms and definitions users new to the Yocto
6Project development environment might find helpful. While some of these
7terms are universal, the list includes them just in case:
8
9- *Append Files:* Files that append build information to a recipe file.
10 Append files are known as BitBake append files and ``.bbappend``
11 files. The OpenEmbedded build system expects every append file to
12 have a corresponding recipe (``.bb``) file. Furthermore, the append
13 file and corresponding recipe file must use the same root filename.
14 The filenames can differ only in the file type suffix used (e.g.
15 ``formfactor_0.0.bb`` and ``formfactor_0.0.bbappend``).
16
17 Information in append files extends or overrides the information in
18 the similarly-named recipe file. For an example of an append file in
19 use, see the "`Using .bbappend Files in Your
20 Layer <&YOCTO_DOCS_DEV_URL;#using-bbappend-files>`__" section in the
21 Yocto Project Development Tasks Manual.
22
23 When you name an append file, you can use the "``%``" wildcard
24 character to allow for matching recipe names. For example, suppose
25 you have an append file named as follows: busybox_1.21.%.bbappend
26 That append file would match any ``busybox_1.21.``\ x\ ``.bb``
27 version of the recipe. So, the append file would match any of the
28 following recipe names: busybox_1.21.1.bb busybox_1.21.2.bb
29 busybox_1.21.3.bb busybox_1.21.10.bb busybox_1.21.25.bb
30
31 .. note::
32
33 The use of the "
34 %
35 " character is limited in that it only works directly in front of
36 the
37 .bbappend
38 portion of the append file's name. You cannot use the wildcard
39 character in any other location of the name.
40
41- *BitBake:* The task executor and scheduler used by the OpenEmbedded
42 build system to build images. For more information on BitBake, see
43 the `BitBake User Manual <&YOCTO_DOCS_BB_URL;>`__.
44
45- *Board Support Package (BSP):* A group of drivers, definitions, and
46 other components that provide support for a specific hardware
47 configuration. For more information on BSPs, see the `Yocto Project
48 Board Support Package (BSP) Developer's
49 Guide <&YOCTO_DOCS_BSP_URL;>`__.
50
51- *Build Directory:* This term refers to the area used by the
52 OpenEmbedded build system for builds. The area is created when you
53 ``source`` the setup environment script that is found in the Source
54 Directory (i.e. ````` <#structure-core-script>`__). The
55 ```TOPDIR`` <#var-TOPDIR>`__ variable points to the Build Directory.
56
57 You have a lot of flexibility when creating the Build Directory.
58 Following are some examples that show how to create the directory.
59 The examples assume your `Source Directory <#source-directory>`__ is
60 named ``poky``:
61
62 - Create the Build Directory inside your Source Directory and let
63 the name of the Build Directory default to ``build``: $ cd
64 $HOME/poky $ source OE_INIT_FILE
65
66 - Create the Build Directory inside your home directory and
67 specifically name it ``test-builds``: $ cd $HOME $ source
68 poky/OE_INIT_FILE test-builds
69
70 - Provide a directory path and specifically name the Build
71 Directory. Any intermediate folders in the pathname must exist.
72 This next example creates a Build Directory named
73 ``YP-POKYVERSION`` in your home directory within the existing
74 directory ``mybuilds``: $ cd $HOME $ source
75 $HOME/poky/OE_INIT_FILE $HOME/mybuilds/YP-POKYVERSION
76
77 .. note::
78
79 By default, the Build Directory contains
80 TMPDIR
81 , which is a temporary directory the build system uses for its
82 work.
83 TMPDIR
84 cannot be under NFS. Thus, by default, the Build Directory cannot
85 be under NFS. However, if you need the Build Directory to be under
86 NFS, you can set this up by setting
87 TMPDIR
88 in your
89 local.conf
90 file to use a local drive. Doing so effectively separates
91 TMPDIR
92 from
93 TOPDIR
94 , which is the Build Directory.
95
96- *Build Host:* The system used to build images in a Yocto Project
97 Development environment. The build system is sometimes referred to as
98 the development host.
99
100- *Classes:* Files that provide for logic encapsulation and inheritance
101 so that commonly used patterns can be defined once and then easily
102 used in multiple recipes. For reference information on the Yocto
103 Project classes, see the "`Classes <#ref-classes>`__" chapter. Class
104 files end with the ``.bbclass`` filename extension.
105
106- *Configuration File:* Files that hold global definitions of
107 variables, user-defined variables, and hardware configuration
108 information. These files tell the OpenEmbedded build system what to
109 build and what to put into the image to support a particular
110 platform.
111
112 Configuration files end with a ``.conf`` filename extension. The
113 ``conf/local.conf`` configuration file in the `Build
114 Directory <#build-directory>`__ contains user-defined variables that
115 affect every build. The ``meta-poky/conf/distro/poky.conf``
116 configuration file defines Yocto "distro" configuration variables
117 used only when building with this policy. Machine configuration
118 files, which are located throughout the `Source
119 Directory <#source-directory>`__, define variables for specific
120 hardware and are only used when building for that target (e.g. the
121 ``machine/beaglebone.conf`` configuration file defines variables for
122 the Texas Instruments ARM Cortex-A8 development board).
123
124- *Container Layer:* Layers that hold other layers. An example of a
125 container layer is OpenEmbedded's
126 ```meta-openembedded`` <https://github.com/openembedded/meta-openembedded>`__
127 layer. The ``meta-openembedded`` layer contains many ``meta-*``
128 layers.
129
130- *Cross-Development Toolchain:* In general, a cross-development
131 toolchain is a collection of software development tools and utilities
132 that run on one architecture and allow you to develop software for a
133 different, or targeted, architecture. These toolchains contain
134 cross-compilers, linkers, and debuggers that are specific to the
135 target architecture.
136
137 The Yocto Project supports two different cross-development
138 toolchains:
139
140 - A toolchain only used by and within BitBake when building an image
141 for a target architecture.
142
143 - A relocatable toolchain used outside of BitBake by developers when
144 developing applications that will run on a targeted device.
145
146 Creation of these toolchains is simple and automated. For information
147 on toolchain concepts as they apply to the Yocto Project, see the
148 "`Cross-Development Toolchain
149 Generation <&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation>`__"
150 section in the Yocto Project Overview and Concepts Manual. You can
151 also find more information on using the relocatable toolchain in the
152 `Yocto Project Application Development and the Extensible Software
153 Development Kit (eSDK) <&YOCTO_DOCS_SDK_URL;>`__ manual.
154
155- *Extensible Software Development Kit (eSDK):* A custom SDK for
156 application developers. This eSDK allows developers to incorporate
157 their library and programming changes back into the image to make
158 their code available to other application developers.
159
160 For information on the eSDK, see the `Yocto Project Application
161 Development and the Extensible Software Development Kit
162 (eSDK) <&YOCTO_DOCS_SDK_URL;>`__ manual.
163
164- *Image:* An image is an artifact of the BitBake build process given a
165 collection of recipes and related Metadata. Images are the binary
166 output that run on specific hardware or QEMU and are used for
167 specific use-cases. For a list of the supported image types that the
168 Yocto Project provides, see the "`Images <#ref-images>`__" chapter.
169
170- *Layer:* A collection of related recipes. Layers allow you to
171 consolidate related metadata to customize your build. Layers also
172 isolate information used when building for multiple architectures.
173 Layers are hierarchical in their ability to override previous
174 specifications. You can include any number of available layers from
175 the Yocto Project and customize the build by adding your layers after
176 them. You can search the Layer Index for layers used within Yocto
177 Project.
178
179 For introductory information on layers, see the "`The Yocto Project
180 Layer Model <&YOCTO_DOCS_OM_URL;#the-yocto-project-layer-model>`__"
181 section in the Yocto Project Overview and Concepts Manual. For more
182 detailed information on layers, see the "`Understanding and Creating
183 Layers <&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers>`__"
184 section in the Yocto Project Development Tasks Manual. For a
185 discussion specifically on BSP Layers, see the "`BSP
186 Layers <&YOCTO_DOCS_BSP_URL;#bsp-layers>`__" section in the Yocto
187 Project Board Support Packages (BSP) Developer's Guide.
188
189- *Metadata:* A key element of the Yocto Project is the Metadata that
190 is used to construct a Linux distribution and is contained in the
191 files that the `OpenEmbedded build system <#build-system-term>`__
192 parses when building an image. In general, Metadata includes recipes,
193 configuration files, and other information that refers to the build
194 instructions themselves, as well as the data used to control what
195 things get built and the effects of the build. Metadata also includes
196 commands and data used to indicate what versions of software are
197 used, from where they are obtained, and changes or additions to the
198 software itself (patches or auxiliary files) that are used to fix
199 bugs or customize the software for use in a particular situation.
200 OpenEmbedded-Core is an important set of validated metadata.
201
202 In the context of the kernel ("kernel Metadata"), the term refers to
203 the kernel config fragments and features contained in the
204 ```yocto-kernel-cache`` <&YOCTO_GIT_URL;/cgit/cgit.cgi/yocto-kernel-cache>`__
205 Git repository.
206
207- *OpenEmbedded-Core (OE-Core):* OE-Core is metadata comprised of
208 foundational recipes, classes, and associated files that are meant to
209 be common among many different OpenEmbedded-derived systems,
210 including the Yocto Project. OE-Core is a curated subset of an
211 original repository developed by the OpenEmbedded community that has
212 been pared down into a smaller, core set of continuously validated
213 recipes. The result is a tightly controlled and an quality-assured
214 core set of recipes.
215
216 You can see the Metadata in the ``meta`` directory of the Yocto
217 Project `Source
218 Repositories <http://git.yoctoproject.org/cgit/cgit.cgi>`__.
219
220- *OpenEmbedded Build System:* The build system specific to the Yocto
221 Project. The OpenEmbedded build system is based on another project
222 known as "Poky", which uses `BitBake <#bitbake-term>`__ as the task
223 executor. Throughout the Yocto Project documentation set, the
224 OpenEmbedded build system is sometimes referred to simply as "the
225 build system". If other build systems, such as a host or target build
226 system are referenced, the documentation clearly states the
227 difference.
228
229 .. note::
230
231 For some historical information about Poky, see the
232 Poky
233 term.
234
235- *Package:* In the context of the Yocto Project, this term refers to a
236 recipe's packaged output produced by BitBake (i.e. a "baked recipe").
237 A package is generally the compiled binaries produced from the
238 recipe's sources. You "bake" something by running it through BitBake.
239
240 It is worth noting that the term "package" can, in general, have
241 subtle meanings. For example, the packages referred to in the
242 "`Required Packages for the Build
243 Host <#required-packages-for-the-build-host>`__" section are compiled
244 binaries that, when installed, add functionality to your Linux
245 distribution.
246
247 Another point worth noting is that historically within the Yocto
248 Project, recipes were referred to as packages - thus, the existence
249 of several BitBake variables that are seemingly mis-named, (e.g.
250 ```PR`` <#var-PR>`__, ```PV`` <#var-PV>`__, and
251 ```PE`` <#var-PE>`__).
252
253- *Package Groups:* Arbitrary groups of software Recipes. You use
254 package groups to hold recipes that, when built, usually accomplish a
255 single task. For example, a package group could contain the recipes
256 for a company’s proprietary or value-add software. Or, the package
257 group could contain the recipes that enable graphics. A package group
258 is really just another recipe. Because package group files are
259 recipes, they end with the ``.bb`` filename extension.
260
261- *Poky:* Poky, which is pronounced *Pock*-ee, is a reference embedded
262 distribution and a reference test configuration. Poky provides the
263 following:
264
265 - A base-level functional distro used to illustrate how to customize
266 a distribution.
267
268 - A means by which to test the Yocto Project components (i.e. Poky
269 is used to validate the Yocto Project).
270
271 - A vehicle through which you can download the Yocto Project.
272
273 Poky is not a product level distro. Rather, it is a good starting
274 point for customization.
275
276 .. note::
277
278 Poky began as an open-source project initially developed by
279 OpenedHand. OpenedHand developed Poky from the existing
280 OpenEmbedded build system to create a commercially supportable
281 build system for embedded Linux. After Intel Corporation acquired
282 OpenedHand, the poky project became the basis for the Yocto
283 Project's build system.
284
285- *Recipe:* A set of instructions for building packages. A recipe
286 describes where you get source code, which patches to apply, how to
287 configure the source, how to compile it and so on. Recipes also
288 describe dependencies for libraries or for other recipes. Recipes
289 represent the logical unit of execution, the software to build, the
290 images to build, and use the ``.bb`` file extension.
291
292- *Reference Kit:* A working example of a system, which includes a
293 `BSP <#board-support-package-bsp-term>`__ as well as a `build
294 host <#hardware-build-system-term>`__ and other components, that can
295 work on specific hardware.
296
297- *Source Directory:* This term refers to the directory structure
298 created as a result of creating a local copy of the ``poky`` Git
299 repository ``git://git.yoctoproject.org/poky`` or expanding a
300 released ``poky`` tarball.
301
302 .. note::
303
304 Creating a local copy of the
305 poky
306 Git repository is the recommended method for setting up your
307 Source Directory.
308
309 Sometimes you might hear the term "poky directory" used to refer to
310 this directory structure.
311
312 .. note::
313
314 The OpenEmbedded build system does not support file or directory
315 names that contain spaces. Be sure that the Source Directory you
316 use does not contain these types of names.
317
318 The Source Directory contains BitBake, Documentation, Metadata and
319 other files that all support the Yocto Project. Consequently, you
320 must have the Source Directory in place on your development system in
321 order to do any development using the Yocto Project.
322
323 When you create a local copy of the Git repository, you can name the
324 repository anything you like. Throughout much of the documentation,
325 "poky" is used as the name of the top-level folder of the local copy
326 of the poky Git repository. So, for example, cloning the ``poky`` Git
327 repository results in a local Git repository whose top-level folder
328 is also named "poky".
329
330 While it is not recommended that you use tarball expansion to set up
331 the Source Directory, if you do, the top-level directory name of the
332 Source Directory is derived from the Yocto Project release tarball.
333 For example, downloading and unpacking ```` results in a Source
334 Directory whose root folder is named ````.
335
336 It is important to understand the differences between the Source
337 Directory created by unpacking a released tarball as compared to
338 cloning ``git://git.yoctoproject.org/poky``. When you unpack a
339 tarball, you have an exact copy of the files based on the time of
340 release - a fixed release point. Any changes you make to your local
341 files in the Source Directory are on top of the release and will
342 remain local only. On the other hand, when you clone the ``poky`` Git
343 repository, you have an active development repository with access to
344 the upstream repository's branches and tags. In this case, any local
345 changes you make to the local Source Directory can be later applied
346 to active development branches of the upstream ``poky`` Git
347 repository.
348
349 For more information on concepts related to Git repositories,
350 branches, and tags, see the "`Repositories, Tags, and
351 Branches <&YOCTO_DOCS_OM_URL;#repositories-tags-and-branches>`__"
352 section in the Yocto Project Overview and Concepts Manual.
353
354- *Task:* A unit of execution for BitBake (e.g.
355 ```do_compile`` <#ref-tasks-compile>`__,
356 ```do_fetch`` <#ref-tasks-fetch>`__,
357 ```do_patch`` <#ref-tasks-patch>`__, and so forth).
358
359- *Toaster:* A web interface to the Yocto Project's `OpenEmbedded Build
360 System <#build-system-term>`__. The interface enables you to
361 configure and run your builds. Information about builds is collected
362 and stored in a database. For information on Toaster, see the
363 `Toaster User Manual <&YOCTO_DOCS_TOAST_URL;>`__.
364
365- *Upstream:* A reference to source code or repositories that are not
366 local to the development system but located in a master area that is
367 controlled by the maintainer of the source code. For example, in
368 order for a developer to work on a particular piece of code, they
369 need to first get a copy of it from an "upstream" source.
diff --git a/documentation/ref-manual/ref-variables.rst b/documentation/ref-manual/ref-variables.rst
new file mode 100644
index 0000000000..3fa1b6ccaa
--- /dev/null
+++ b/documentation/ref-manual/ref-variables.rst
@@ -0,0 +1,7924 @@
1******************
2Variables Glossary
3******************
4
5This chapter lists common variables used in the OpenEmbedded build
6system and gives an overview of their function and contents.
7
8`A <#var-ABIEXTENSION>`__ `B <#var-B>`__ `C <#var-CACHE>`__
9`D <#var-D>`__ `E <#var-EFI_PROVIDER>`__ `F <#var-FEATURE_PACKAGES>`__
10`G <#var-GCCPIE>`__ `H <#var-HOMEPAGE>`__ `I <#var-ICECC_DISABLED>`__
11`K <#var-KARCH>`__ `L <#var-LABELS>`__ `M <#var-MACHINE>`__
12`N <#var-NATIVELSBSTRING>`__ `O <#var-OBJCOPY>`__ `P <#var-P>`__
13`R <#var-RANLIB>`__ `S <#var-S>`__ `T <#var-T>`__
14`U <#var-UBOOT_CONFIG>`__ `V <#var-VOLATILE_LOG_DIR>`__
15`W <#var-WARN_QA>`__ `X <#var-XSERVER>`__
16
17ABIEXTENSION
18 Extension to the Application Binary Interface (ABI) field of the GNU
19 canonical architecture name (e.g. "eabi").
20
21 ABI extensions are set in the machine include files. For example, the
22 ``meta/conf/machine/include/arm/arch-arm.inc`` file sets the
23 following extension: ABIEXTENSION = "eabi"
24
25ALLOW_EMPTY
26 Specifies whether to produce an output package even if it is empty.
27 By default, BitBake does not produce empty packages. This default
28 behavior can cause issues when there is an
29 ```RDEPENDS`` <#var-RDEPENDS>`__ or some other hard runtime
30 requirement on the existence of the package.
31
32 Like all package-controlling variables, you must always use them in
33 conjunction with a package name override, as in: ALLOW_EMPTY_${PN} =
34 "1" ALLOW_EMPTY_${PN}-dev = "1" ALLOW_EMPTY_${PN}-staticdev = "1"
35
36ALTERNATIVE
37 Lists commands in a package that need an alternative binary naming
38 scheme. Sometimes the same command is provided in multiple packages.
39 When this occurs, the OpenEmbedded build system needs to use the
40 alternatives system to create a different binary naming scheme so the
41 commands can co-exist.
42
43 To use the variable, list out the package's commands that also exist
44 as part of another package. For example, if the ``busybox`` package
45 has four commands that also exist as part of another package, you
46 identify them as follows: ALTERNATIVE_busybox = "sh sed test bracket"
47 For more information on the alternatives system, see the
48 "```update-alternatives.bbclass`` <#ref-classes-update-alternatives>`__"
49 section.
50
51ALTERNATIVE_LINK_NAME
52 Used by the alternatives system to map duplicated commands to actual
53 locations. For example, if the ``bracket`` command provided by the
54 ``busybox`` package is duplicated through another package, you must
55 use the ``ALTERNATIVE_LINK_NAME`` variable to specify the actual
56 location: ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/["
57
58 In this example, the binary for the ``bracket`` command (i.e. ``[``)
59 from the ``busybox`` package resides in ``/usr/bin/``.
60
61 .. note::
62
63 If
64 ALTERNATIVE_LINK_NAME
65 is not defined, it defaults to
66 ${bindir}/
67 name
68 .
69
70 For more information on the alternatives system, see the
71 "```update-alternatives.bbclass`` <#ref-classes-update-alternatives>`__"
72 section.
73
74ALTERNATIVE_PRIORITY
75 Used by the alternatives system to create default priorities for
76 duplicated commands. You can use the variable to create a single
77 default regardless of the command name or package, a default for
78 specific duplicated commands regardless of the package, or a default
79 for specific commands tied to particular packages. Here are the
80 available syntax forms: ALTERNATIVE_PRIORITY = "priority"
81 ALTERNATIVE_PRIORITY[name] = "priority"
82 ALTERNATIVE_PRIORITY_pkg[name] = "priority"
83
84 For more information on the alternatives system, see the
85 "```update-alternatives.bbclass`` <#ref-classes-update-alternatives>`__"
86 section.
87
88ALTERNATIVE_TARGET
89 Used by the alternatives system to create default link locations for
90 duplicated commands. You can use the variable to create a single
91 default location for all duplicated commands regardless of the
92 command name or package, a default for specific duplicated commands
93 regardless of the package, or a default for specific commands tied to
94 particular packages. Here are the available syntax forms:
95 ALTERNATIVE_TARGET = "target" ALTERNATIVE_TARGET[name] = "target"
96 ALTERNATIVE_TARGET_pkg[name] = "target"
97
98 .. note::
99
100 If ``ALTERNATIVE_TARGET`` is not defined, it inherits the value
101 from the
102 ```ALTERNATIVE_LINK_NAME`` <#var-ALTERNATIVE_LINK_NAME>`__
103 variable.
104
105 If ``ALTERNATIVE_LINK_NAME`` and ``ALTERNATIVE_TARGET`` are the
106 same, the target for ``ALTERNATIVE_TARGET`` has "``.{BPN}``"
107 appended to it.
108
109 Finally, if the file referenced has not been renamed, the
110 alternatives system will rename it to avoid the need to rename
111 alternative files in the ```do_install`` <#ref-tasks-install>`__
112 task while retaining support for the command if necessary.
113
114 For more information on the alternatives system, see the
115 "```update-alternatives.bbclass`` <#ref-classes-update-alternatives>`__"
116 section.
117
118APPEND
119 An override list of append strings for each target specified with
120 ```LABELS`` <#var-LABELS>`__.
121
122 See the ```grub-efi`` <#ref-classes-grub-efi>`__ class for more
123 information on how this variable is used.
124
125AR
126 The minimal command and arguments used to run ``ar``.
127
128ARCHIVER_MODE
129 When used with the ```archiver`` <#ref-classes-archiver>`__ class,
130 determines the type of information used to create a released archive.
131 You can use this variable to create archives of patched source,
132 original source, configured source, and so forth by employing the
133 following variable flags (varflags): ARCHIVER_MODE[src] = "original"
134 # Uses original (unpacked) source # files. ARCHIVER_MODE[src] =
135 "patched" # Uses patched source files. This is # the default.
136 ARCHIVER_MODE[src] = "configured" # Uses configured source files.
137 ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and #
138 do_patch. ARCHIVER_MODE[diff-exclude] ?= "file file ..." # Lists
139 files and directories to # exclude from diff. ARCHIVER_MODE[dumpdata]
140 = "1" # Uses environment data. ARCHIVER_MODE[recipe] = "1" # Uses
141 recipe and include files. ARCHIVER_MODE[srpm] = "1" # Uses RPM
142 package files. For information on how the variable works, see the
143 ``meta/classes/archiver.bbclass`` file in the `Source
144 Directory <#source-directory>`__.
145
146AS
147 Minimal command and arguments needed to run the assembler.
148
149ASSUME_PROVIDED
150 Lists recipe names (```PN`` <#var-PN>`__ values) BitBake does not
151 attempt to build. Instead, BitBake assumes these recipes have already
152 been built.
153
154 In OpenEmbedded-Core, ``ASSUME_PROVIDED`` mostly specifies native
155 tools that should not be built. An example is ``git-native``, which
156 when specified, allows for the Git binary from the host to be used
157 rather than building ``git-native``.
158
159ASSUME_SHLIBS
160 Provides additional ``shlibs`` provider mapping information, which
161 adds to or overwrites the information provided automatically by the
162 system. Separate multiple entries using spaces.
163
164 As an example, use the following form to add an ``shlib`` provider of
165 shlibname in packagename with the optional version:
166 shlibname:packagename[_version]
167
168 Here is an example that adds a shared library named ``libEGL.so.1``
169 as being provided by the ``libegl-implementation`` package:
170 ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation"
171
172AUTHOR
173 The email address used to contact the original author or authors in
174 order to send patches and forward bugs.
175
176AUTO_LIBNAME_PKGS
177 When the ```debian`` <#ref-classes-debian>`__ class is inherited,
178 which is the default behavior, ``AUTO_LIBNAME_PKGS`` specifies which
179 packages should be checked for libraries and renamed according to
180 Debian library package naming.
181
182 The default value is "${PACKAGES}", which causes the debian class to
183 act on all packages that are explicitly generated by the recipe.
184
185AUTO_SYSLINUXMENU
186 Enables creating an automatic menu for the syslinux bootloader. You
187 must set this variable in your recipe. The
188 ```syslinux`` <#ref-classes-syslinux>`__ class checks this variable.
189
190AUTOREV
191 When ``SRCREV`` is set to the value of this variable, it specifies to
192 use the latest source revision in the repository. Here is an example:
193 SRCREV = "${AUTOREV}"
194
195 If you use the previous statement to retrieve the latest version of
196 software, you need to be sure ```PV`` <#var-PV>`__ contains
197 ``${``\ ```SRCPV`` <#var-SRCPV>`__\ ``}``. For example, suppose you
198 have a kernel recipe that inherits the
199 `kernel <#ref-classes-kernel>`__ class and you use the previous
200 statement. In this example, ``${SRCPV}`` does not automatically get
201 into ``PV``. Consequently, you need to change ``PV`` in your recipe
202 so that it does contain ``${SRCPV}``.
203
204 For more information see the "`Automatically Incrementing a Binary
205 Package Revision
206 Number <&YOCTO_DOCS_DEV_URL;#automatically-incrementing-a-binary-package-revision-number>`__"
207 section in the Yocto Project Development Tasks Manual.
208
209AVAILABLE_LICENSES
210 List of licenses found in the directories specified by
211 ```COMMON_LICENSE_DIR`` <#var-COMMON_LICENSE_DIR>`__ and
212 ```LICENSE_PATH`` <#var-LICENSE_PATH>`__.
213
214 .. note::
215
216 It is assumed that all changes to
217 COMMON_LICENSE_DIR
218 and
219 LICENSE_PATH
220 have been done before
221 AVAILABLE_LICENSES
222 is defined (in
223 license.bbclass
224 ).
225
226AVAILTUNES
227 The list of defined CPU and Application Binary Interface (ABI)
228 tunings (i.e. "tunes") available for use by the OpenEmbedded build
229 system.
230
231 The list simply presents the tunes that are available. Not all tunes
232 may be compatible with a particular machine configuration, or with
233 each other in a
234 `Multilib <&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image>`__
235 configuration.
236
237 To add a tune to the list, be sure to append it with spaces using the
238 "+=" BitBake operator. Do not simply replace the list by using the
239 "=" operator. See the "`Basic
240 Syntax <&YOCTO_DOCS_BB_URL;#basic-syntax>`__" section in the BitBake
241 User Manual for more information.
242
243B
244 The directory within the `Build Directory <#build-directory>`__ in
245 which the OpenEmbedded build system places generated objects during a
246 recipe's build process. By default, this directory is the same as the
247 ```S`` <#var-S>`__ directory, which is defined as: S =
248 "${WORKDIR}/${BP}"
249
250 You can separate the (``S``) directory and the directory pointed to
251 by the ``B`` variable. Most Autotools-based recipes support
252 separating these directories. The build system defaults to using
253 separate directories for ``gcc`` and some kernel recipes.
254
255BAD_RECOMMENDATIONS
256 Lists "recommended-only" packages to not install. Recommended-only
257 packages are packages installed only through the
258 ```RRECOMMENDS`` <#var-RRECOMMENDS>`__ variable. You can prevent any
259 of these "recommended" packages from being installed by listing them
260 with the ``BAD_RECOMMENDATIONS`` variable: BAD_RECOMMENDATIONS =
261 "package_name package_name package_name ..."
262
263 You can set this variable globally in your ``local.conf`` file or you
264 can attach it to a specific image recipe by using the recipe name
265 override: BAD_RECOMMENDATIONS_pn-target_image = "package_name"
266
267 It is important to realize that if you choose to not install packages
268 using this variable and some other packages are dependent on them
269 (i.e. listed in a recipe's ```RDEPENDS`` <#var-RDEPENDS>`__
270 variable), the OpenEmbedded build system ignores your request and
271 will install the packages to avoid dependency errors.
272
273 Support for this variable exists only when using the IPK and RPM
274 packaging backend. Support does not exist for DEB.
275
276 See the ```NO_RECOMMENDATIONS`` <#var-NO_RECOMMENDATIONS>`__ and the
277 ```PACKAGE_EXCLUDE`` <#var-PACKAGE_EXCLUDE>`__ variables for related
278 information.
279
280BASE_LIB
281 The library directory name for the CPU or Application Binary
282 Interface (ABI) tune. The ``BASE_LIB`` applies only in the Multilib
283 context. See the "`Combining Multiple Versions of Library Files into
284 One
285 Image <&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image>`__"
286 section in the Yocto Project Development Tasks Manual for information
287 on Multilib.
288
289 The ``BASE_LIB`` variable is defined in the machine include files in
290 the `Source Directory <#source-directory>`__. If Multilib is not
291 being used, the value defaults to "lib".
292
293BASE_WORKDIR
294 Points to the base of the work directory for all recipes. The default
295 value is "${TMPDIR}/work".
296
297BB_ALLOWED_NETWORKS
298 Specifies a space-delimited list of hosts that the fetcher is allowed
299 to use to obtain the required source code. Following are
300 considerations surrounding this variable:
301
302 - This host list is only used if ``BB_NO_NETWORK`` is either not set
303 or set to "0".
304
305 - Limited support for wildcard matching against the beginning of
306 host names exists. For example, the following setting matches
307 ``git.gnu.org``, ``ftp.gnu.org``, and ``foo.git.gnu.org``.
308 BB_ALLOWED_NETWORKS = "*.gnu.org"
309
310 .. note::
311
312 The use of the "``*``" character only works at the beginning of
313 a host name and it must be isolated from the remainder of the
314 host name. You cannot use the wildcard character in any other
315 location of the name or combined with the front part of the
316 name.
317
318 For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar``
319 is not.
320
321 - Mirrors not in the host list are skipped and logged in debug.
322
323 - Attempts to access networks not in the host list cause a failure.
324
325 Using ``BB_ALLOWED_NETWORKS`` in conjunction with
326 ```PREMIRRORS`` <#var-PREMIRRORS>`__ is very useful. Adding the host
327 you want to use to ``PREMIRRORS`` results in the source code being
328 fetched from an allowed location and avoids raising an error when a
329 host that is not allowed is in a ```SRC_URI`` <#var-SRC_URI>`__
330 statement. This is because the fetcher does not attempt to use the
331 host listed in ``SRC_URI`` after a successful fetch from the
332 ``PREMIRRORS`` occurs.
333
334BB_DANGLINGAPPENDS_WARNONLY
335 Defines how BitBake handles situations where an append file
336 (``.bbappend``) has no corresponding recipe file (``.bb``). This
337 condition often occurs when layers get out of sync (e.g. ``oe-core``
338 bumps a recipe version and the old recipe no longer exists and the
339 other layer has not been updated to the new version of the recipe
340 yet).
341
342 The default fatal behavior is safest because it is the sane reaction
343 given something is out of sync. It is important to realize when your
344 changes are no longer being applied.
345
346 You can change the default behavior by setting this variable to "1",
347 "yes", or "true" in your ``local.conf`` file, which is located in the
348 `Build Directory <#build-directory>`__: Here is an example:
349 BB_DANGLINGAPPENDS_WARNONLY = "1"
350
351BB_DISKMON_DIRS
352 Monitors disk space and available inodes during the build and allows
353 you to control the build based on these parameters.
354
355 Disk space monitoring is disabled by default. To enable monitoring,
356 add the ``BB_DISKMON_DIRS`` variable to your ``conf/local.conf`` file
357 found in the `Build Directory <#build-directory>`__. Use the
358 following form: BB_DISKMON_DIRS = "action,dir,threshold [...]" where:
359 action is: ABORT: Immediately abort the build when a threshold is
360 broken. STOPTASKS: Stop the build after the currently executing tasks
361 have finished when a threshold is broken. WARN: Issue a warning but
362 continue the build when a threshold is broken. Subsequent warnings
363 are issued as defined by the BB_DISKMON_WARNINTERVAL variable, which
364 must be defined in the conf/local.conf file. dir is: Any directory
365 you choose. You can specify one or more directories to monitor by
366 separating the groupings with a space. If two directories are on the
367 same device, only the first directory is monitored. threshold is:
368 Either the minimum available disk space, the minimum number of free
369 inodes, or both. You must specify at least one. To omit one or the
370 other, simply omit the value. Specify the threshold using G, M, K for
371 Gbytes, Mbytes, and Kbytes, respectively. If you do not specify G, M,
372 or K, Kbytes is assumed by default. Do not use GB, MB, or KB.
373
374 Here are some examples: BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K
375 WARN,${SSTATE_DIR},1G,100K" BB_DISKMON_DIRS =
376 "STOPTASKS,${TMPDIR},1G" BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
377 The first example works only if you also provide the
378 ```BB_DISKMON_WARNINTERVAL`` <#var-BB_DISKMON_WARNINTERVAL>`__
379 variable in the ``conf/local.conf``. This example causes the build
380 system to immediately abort when either the disk space in
381 ``${TMPDIR}`` drops below 1 Gbyte or the available free inodes drops
382 below 100 Kbytes. Because two directories are provided with the
383 variable, the build system also issue a warning when the disk space
384 in the ``${SSTATE_DIR}`` directory drops below 1 Gbyte or the number
385 of free inodes drops below 100 Kbytes. Subsequent warnings are issued
386 during intervals as defined by the ``BB_DISKMON_WARNINTERVAL``
387 variable.
388
389 The second example stops the build after all currently executing
390 tasks complete when the minimum disk space in the ``${TMPDIR}``
391 directory drops below 1 Gbyte. No disk monitoring occurs for the free
392 inodes in this case.
393
394 The final example immediately aborts the build when the number of
395 free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
396 disk space monitoring for the directory itself occurs in this case.
397
398BB_DISKMON_WARNINTERVAL
399 Defines the disk space and free inode warning intervals. To set these
400 intervals, define the variable in your ``conf/local.conf`` file in
401 the `Build Directory <#build-directory>`__.
402
403 If you are going to use the ``BB_DISKMON_WARNINTERVAL`` variable, you
404 must also use the ```BB_DISKMON_DIRS`` <#var-BB_DISKMON_DIRS>`__
405 variable and define its action as "WARN". During the build,
406 subsequent warnings are issued each time disk space or number of free
407 inodes further reduces by the respective interval.
408
409 If you do not provide a ``BB_DISKMON_WARNINTERVAL`` variable and you
410 do use ``BB_DISKMON_DIRS`` with the "WARN" action, the disk
411 monitoring interval defaults to the following:
412 BB_DISKMON_WARNINTERVAL = "50M,5K"
413
414 When specifying the variable in your configuration file, use the
415 following form: BB_DISKMON_WARNINTERVAL =
416 "disk_space_interval,disk_inode_interval" where: disk_space_interval
417 is: An interval of memory expressed in either G, M, or K for Gbytes,
418 Mbytes, or Kbytes, respectively. You cannot use GB, MB, or KB.
419 disk_inode_interval is: An interval of free inodes expressed in
420 either G, M, or K for Gbytes, Mbytes, or Kbytes, respectively. You
421 cannot use GB, MB, or KB.
422
423 Here is an example: BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
424 BB_DISKMON_WARNINTERVAL = "50M,5K" These variables cause the
425 OpenEmbedded build system to issue subsequent warnings each time the
426 available disk space further reduces by 50 Mbytes or the number of
427 free inodes further reduces by 5 Kbytes in the ``${SSTATE_DIR}``
428 directory. Subsequent warnings based on the interval occur each time
429 a respective interval is reached beyond the initial warning (i.e. 1
430 Gbytes and 100 Kbytes).
431
432BB_GENERATE_MIRROR_TARBALLS
433 Causes tarballs of the source control repositories (e.g. Git
434 repositories), including metadata, to be placed in the
435 ```DL_DIR`` <#var-DL_DIR>`__ directory.
436
437 For performance reasons, creating and placing tarballs of these
438 repositories is not the default action by the OpenEmbedded build
439 system. BB_GENERATE_MIRROR_TARBALLS = "1" Set this variable in your
440 ``local.conf`` file in the `Build Directory <#build-directory>`__.
441
442 Once you have the tarballs containing your source files, you can
443 clean up your ``DL_DIR`` directory by deleting any Git or other
444 source control work directories.
445
446BB_NUMBER_THREADS
447 The maximum number of tasks BitBake should run in parallel at any one
448 time. The OpenEmbedded build system automatically configures this
449 variable to be equal to the number of cores on the build system. For
450 example, a system with a dual core processor that also uses
451 hyper-threading causes the ``BB_NUMBER_THREADS`` variable to default
452 to "4".
453
454 For single socket systems (i.e. one CPU), you should not have to
455 override this variable to gain optimal parallelism during builds.
456 However, if you have very large systems that employ multiple physical
457 CPUs, you might want to make sure the ``BB_NUMBER_THREADS`` variable
458 is not set higher than "20".
459
460 For more information on speeding up builds, see the "`Speeding Up a
461 Build <&YOCTO_DOCS_DEV_URL;#speeding-up-a-build>`__" section in the
462 Yocto Project Development Tasks Manual.
463
464BB_SERVER_TIMEOUT
465 Specifies the time (in seconds) after which to unload the BitBake
466 server due to inactivity. Set ``BB_SERVER_TIMEOUT`` to determine how
467 long the BitBake server stays resident between invocations.
468
469 For example, the following statement in your ``local.conf`` file
470 instructs the server to be unloaded after 20 seconds of inactivity:
471 BB_SERVER_TIMEOUT = "20" If you want the server to never be unloaded,
472 set ``BB_SERVER_TIMEOUT`` to "-1".
473
474BBCLASSEXTEND
475 Allows you to extend a recipe so that it builds variants of the
476 software. Common variants for recipes exist such as "natives" like
477 ``quilt-native``, which is a copy of Quilt built to run on the build
478 system; "crosses" such as ``gcc-cross``, which is a compiler built to
479 run on the build machine but produces binaries that run on the target
480 ```MACHINE`` <#var-MACHINE>`__; "nativesdk", which targets the SDK
481 machine instead of ``MACHINE``; and "mulitlibs" in the form
482 "``multilib:``\ multilib_name".
483
484 To build a different variant of the recipe with a minimal amount of
485 code, it usually is as simple as adding the following to your recipe:
486 BBCLASSEXTEND =+ "native nativesdk" BBCLASSEXTEND =+
487 "multilib:multilib_name"
488
489 .. note::
490
491 Internally, the ``BBCLASSEXTEND`` mechanism generates recipe
492 variants by rewriting variable values and applying overrides such
493 as ``_class-native``. For example, to generate a native version of
494 a recipe, a ```DEPENDS`` <#var-DEPENDS>`__ on "foo" is rewritten
495 to a ``DEPENDS`` on "foo-native".
496
497 Even when using ``BBCLASSEXTEND``, the recipe is only parsed once.
498 Parsing once adds some limitations. For example, it is not
499 possible to include a different file depending on the variant,
500 since ``include`` statements are processed when the recipe is
501 parsed.
502
503BBFILE_COLLECTIONS
504 Lists the names of configured layers. These names are used to find
505 the other ``BBFILE_*`` variables. Typically, each layer will append
506 its name to this variable in its ``conf/layer.conf`` file.
507
508BBFILE_PATTERN
509 Variable that expands to match files from
510 ```BBFILES`` <#var-BBFILES>`__ in a particular layer. This variable
511 is used in the ``conf/layer.conf`` file and must be suffixed with the
512 name of the specific layer (e.g. ``BBFILE_PATTERN_emenlow``).
513
514BBFILE_PRIORITY
515 Assigns the priority for recipe files in each layer.
516
517 This variable is useful in situations where the same recipe appears
518 in more than one layer. Setting this variable allows you to
519 prioritize a layer against other layers that contain the same recipe
520 - effectively letting you control the precedence for the multiple
521 layers. The precedence established through this variable stands
522 regardless of a recipe's version (```PV`` <#var-PV>`__ variable). For
523 example, a layer that has a recipe with a higher ``PV`` value but for
524 which the ``BBFILE_PRIORITY`` is set to have a lower precedence still
525 has a lower precedence.
526
527 A larger value for the ``BBFILE_PRIORITY`` variable results in a
528 higher precedence. For example, the value 6 has a higher precedence
529 than the value 5. If not specified, the ``BBFILE_PRIORITY`` variable
530 is set based on layer dependencies (see the ``LAYERDEPENDS`` variable
531 for more information. The default priority, if unspecified for a
532 layer with no dependencies, is the lowest defined priority + 1 (or 1
533 if no priorities are defined).
534
535 .. tip::
536
537 You can use the command
538 bitbake-layers show-layers
539 to list all configured layers along with their priorities.
540
541BBFILES
542 A space-separated list of recipe files BitBake uses to build
543 software.
544
545 When specifying recipe files, you can pattern match using Python's
546 ```glob`` <https://docs.python.org/3/library/glob.html>`__ syntax.
547 For details on the syntax, see the documentation by following the
548 previous link.
549
550BBFILES_DYNAMIC
551 Activates content when identified layers are present. You identify
552 the layers by the collections that the layers define.
553
554 Use the ``BBFILES_DYNAMIC`` variable to avoid ``.bbappend`` files
555 whose corresponding ``.bb`` file is in a layer that attempts to
556 modify other layers through ``.bbappend`` but does not want to
557 introduce a hard dependency on those other layers.
558
559 Use the following form for ``BBFILES_DYNAMIC``:
560 collection_name:filename_pattern The following example identifies two
561 collection names and two filename patterns: BBFILES_DYNAMIC += " \\
562 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \\
563 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \\ "
564 This next example shows an error message that occurs because invalid
565 entries are found, which cause parsing to abort: ERROR:
566 BBFILES_DYNAMIC entries must be of the form <collection
567 name>:<filename pattern>, not:
568 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
569 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
570
571BBINCLUDELOGS
572 Variable that controls how BitBake displays logs on build failure.
573
574BBINCLUDELOGS_LINES
575 If ```BBINCLUDELOGS`` <#var-BBINCLUDELOGS>`__ is set, specifies the
576 maximum number of lines from the task log file to print when
577 reporting a failed task. If you do not set ``BBINCLUDELOGS_LINES``,
578 the entire log is printed.
579
580BBLAYERS
581 Lists the layers to enable during the build. This variable is defined
582 in the ``bblayers.conf`` configuration file in the `Build
583 Directory <#build-directory>`__. Here is an example: BBLAYERS = " \\
584 /home/scottrif/poky/meta \\ /home/scottrif/poky/meta-poky \\
585 /home/scottrif/poky/meta-yocto-bsp \\
586 /home/scottrif/poky/meta-mykernel \\ "
587
588 This example enables four layers, one of which is a custom,
589 user-defined layer named ``meta-mykernel``.
590
591BBMASK
592 Prevents BitBake from processing recipes and recipe append files.
593
594 You can use the ``BBMASK`` variable to "hide" these ``.bb`` and
595 ``.bbappend`` files. BitBake ignores any recipe or recipe append
596 files that match any of the expressions. It is as if BitBake does not
597 see them at all. Consequently, matching files are not parsed or
598 otherwise used by BitBake.
599
600 The values you provide are passed to Python's regular expression
601 compiler. Consequently, the syntax follows Python's Regular
602 Expression (re) syntax. The expressions are compared against the full
603 paths to the files. For complete syntax information, see Python's
604 documentation at ` <http://docs.python.org/3/library/re.html#re>`__.
605
606 The following example uses a complete regular expression to tell
607 BitBake to ignore all recipe and recipe append files in the
608 ``meta-ti/recipes-misc/`` directory: BBMASK = "meta-ti/recipes-misc/"
609 If you want to mask out multiple directories or recipes, you can
610 specify multiple regular expression fragments. This next example
611 masks out multiple directories and individual recipes: BBMASK +=
612 "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/" BBMASK +=
613 "/meta-oe/recipes-support/" BBMASK += "/meta-foo/.*/openldap" BBMASK
614 += "opencv.*\.bbappend" BBMASK += "lzma"
615
616 .. note::
617
618 When specifying a directory name, use the trailing slash character
619 to ensure you match just that directory name.
620
621BBMULTICONFIG
622 Specifies each additional separate configuration when you are
623 building targets with multiple configurations. Use this variable in
624 your ``conf/local.conf`` configuration file. Specify a
625 multiconfigname for each configuration file you are using. For
626 example, the following line specifies three configuration files:
627 BBMULTICONFIG = "configA configB configC" Each configuration file you
628 use must reside in the `Build Directory <#build-directory>`__
629 ``conf/multiconfig`` directory (e.g.
630 build_directory\ ``/conf/multiconfig/configA.conf``).
631
632 For information on how to use ``BBMULTICONFIG`` in an environment
633 that supports building targets with multiple configurations, see the
634 "`Building Images for Multiple Targets Using Multiple
635 Configurations <&YOCTO_DOCS_DEV_URL;#dev-building-images-for-multiple-targets-using-multiple-configurations>`__"
636 section in the Yocto Project Development Tasks Manual.
637
638BBPATH
639 Used by BitBake to locate ``.bbclass`` and configuration files. This
640 variable is analogous to the ``PATH`` variable.
641
642 .. note::
643
644 If you run BitBake from a directory outside of the
645 Build Directory
646 , you must be sure to set
647 BBPATH
648 to point to the Build Directory. Set the variable as you would any
649 environment variable and then run BitBake:
650 ::
651
652 $ BBPATH = "build_directory"
653 $ export BBPATH
654 $ bitbake target
655
656
657BBSERVER
658 If defined in the BitBake environment, ``BBSERVER`` points to the
659 BitBake remote server.
660
661 Use the following format to export the variable to the BitBake
662 environment: export BBSERVER=localhost:$port
663
664 By default, ``BBSERVER`` also appears in
665 ```BB_HASHBASE_WHITELIST`` <&YOCTO_DOCS_BB_URL;#var-BB_HASHBASE_WHITELIST>`__.
666 Consequently, ``BBSERVER`` is excluded from checksum and dependency
667 data.
668
669BINCONFIG
670 When inheriting the
671 ```binconfig-disabled`` <#ref-classes-binconfig-disabled>`__ class,
672 this variable specifies binary configuration scripts to disable in
673 favor of using ``pkg-config`` to query the information. The
674 ``binconfig-disabled`` class will modify the specified scripts to
675 return an error so that calls to them can be easily found and
676 replaced.
677
678 To add multiple scripts, separate them by spaces. Here is an example
679 from the ``libpng`` recipe: BINCONFIG = "${bindir}/libpng-config
680 ${bindir}/libpng16-config"
681
682BINCONFIG_GLOB
683 When inheriting the ```binconfig`` <#ref-classes-binconfig>`__ class,
684 this variable specifies a wildcard for configuration scripts that
685 need editing. The scripts are edited to correct any paths that have
686 been set up during compilation so that they are correct for use when
687 installed into the sysroot and called by the build processes of other
688 recipes.
689
690 .. note::
691
692 The
693 BINCONFIG_GLOB
694 variable uses
695 shell globbing
696 , which is recognition and expansion of wildcards during pattern
697 matching. Shell globbing is very similar to
698 fnmatch
699 and
700 glob
701 .
702
703 For more information on how this variable works, see
704 ``meta/classes/binconfig.bbclass`` in the `Source
705 Directory <#source-directory>`__. You can also find general
706 information on the class in the
707 "```binconfig.bbclass`` <#ref-classes-binconfig>`__" section.
708
709BP
710 The base recipe name and version but without any special recipe name
711 suffix (i.e. ``-native``, ``lib64-``, and so forth). ``BP`` is
712 comprised of the following: ${BPN}-${PV}
713
714BPN
715 This variable is a version of the ```PN`` <#var-PN>`__ variable with
716 common prefixes and suffixes removed, such as ``nativesdk-``,
717 ``-cross``, ``-native``, and multilib's ``lib64-`` and ``lib32-``.
718 The exact lists of prefixes and suffixes removed are specified by the
719 ```MLPREFIX`` <#var-MLPREFIX>`__ and
720 ```SPECIAL_PKGSUFFIX`` <#var-SPECIAL_PKGSUFFIX>`__ variables,
721 respectively.
722
723BUGTRACKER
724 Specifies a URL for an upstream bug tracking website for a recipe.
725 The OpenEmbedded build system does not use this variable. Rather, the
726 variable is a useful pointer in case a bug in the software being
727 built needs to be manually reported.
728
729BUILD_ARCH
730 Specifies the architecture of the build host (e.g. ``i686``). The
731 OpenEmbedded build system sets the value of ``BUILD_ARCH`` from the
732 machine name reported by the ``uname`` command.
733
734BUILD_AS_ARCH
735 Specifies the architecture-specific assembler flags for the build
736 host. By default, the value of ``BUILD_AS_ARCH`` is empty.
737
738BUILD_CC_ARCH
739 Specifies the architecture-specific C compiler flags for the build
740 host. By default, the value of ``BUILD_CC_ARCH`` is empty.
741
742BUILD_CCLD
743 Specifies the linker command to be used for the build host when the C
744 compiler is being used as the linker. By default, ``BUILD_CCLD``
745 points to GCC and passes as arguments the value of
746 ```BUILD_CC_ARCH`` <#var-BUILD_CC_ARCH>`__, assuming
747 ``BUILD_CC_ARCH`` is set.
748
749BUILD_CFLAGS
750 Specifies the flags to pass to the C compiler when building for the
751 build host. When building in the ``-native`` context,
752 ```CFLAGS`` <#var-CFLAGS>`__ is set to the value of this variable by
753 default.
754
755BUILD_CPPFLAGS
756 Specifies the flags to pass to the C preprocessor (i.e. to both the C
757 and the C++ compilers) when building for the build host. When
758 building in the ``-native`` context, ```CPPFLAGS`` <#var-CPPFLAGS>`__
759 is set to the value of this variable by default.
760
761BUILD_CXXFLAGS
762 Specifies the flags to pass to the C++ compiler when building for the
763 build host. When building in the ``-native`` context,
764 ```CXXFLAGS`` <#var-CXXFLAGS>`__ is set to the value of this variable
765 by default.
766
767BUILD_FC
768 Specifies the Fortran compiler command for the build host. By
769 default, ``BUILD_FC`` points to Gfortran and passes as arguments the
770 value of ```BUILD_CC_ARCH`` <#var-BUILD_CC_ARCH>`__, assuming
771 ``BUILD_CC_ARCH`` is set.
772
773BUILD_LD
774 Specifies the linker command for the build host. By default,
775 ``BUILD_LD`` points to the GNU linker (ld) and passes as arguments
776 the value of ```BUILD_LD_ARCH`` <#var-BUILD_LD_ARCH>`__, assuming
777 ``BUILD_LD_ARCH`` is set.
778
779BUILD_LD_ARCH
780 Specifies architecture-specific linker flags for the build host. By
781 default, the value of ``BUILD_LD_ARCH`` is empty.
782
783BUILD_LDFLAGS
784 Specifies the flags to pass to the linker when building for the build
785 host. When building in the ``-native`` context,
786 ```LDFLAGS`` <#var-LDFLAGS>`__ is set to the value of this variable
787 by default.
788
789BUILD_OPTIMIZATION
790 Specifies the optimization flags passed to the C compiler when
791 building for the build host or the SDK. The flags are passed through
792 the ```BUILD_CFLAGS`` <#var-BUILD_CFLAGS>`__ and
793 ```BUILDSDK_CFLAGS`` <#var-BUILDSDK_CFLAGS>`__ default values.
794
795 The default value of the ``BUILD_OPTIMIZATION`` variable is "-O2
796 -pipe".
797
798BUILD_OS
799 Specifies the operating system in use on the build host (e.g.
800 "linux"). The OpenEmbedded build system sets the value of
801 ``BUILD_OS`` from the OS reported by the ``uname`` command - the
802 first word, converted to lower-case characters.
803
804BUILD_PREFIX
805 The toolchain binary prefix used for native recipes. The OpenEmbedded
806 build system uses the ``BUILD_PREFIX`` value to set the
807 ```TARGET_PREFIX`` <#var-TARGET_PREFIX>`__ when building for
808 ``native`` recipes.
809
810BUILD_STRIP
811 Specifies the command to be used to strip debugging symbols from
812 binaries produced for the build host. By default, ``BUILD_STRIP``
813 points to
814 ``${``\ ```BUILD_PREFIX`` <#var-BUILD_PREFIX>`__\ ``}strip``.
815
816BUILD_SYS
817 Specifies the system, including the architecture and the operating
818 system, to use when building for the build host (i.e. when building
819 ``native`` recipes).
820
821 The OpenEmbedded build system automatically sets this variable based
822 on ```BUILD_ARCH`` <#var-BUILD_ARCH>`__,
823 ```BUILD_VENDOR`` <#var-BUILD_VENDOR>`__, and
824 ```BUILD_OS`` <#var-BUILD_OS>`__. You do not need to set the
825 ``BUILD_SYS`` variable yourself.
826
827BUILD_VENDOR
828 Specifies the vendor name to use when building for the build host.
829 The default value is an empty string ("").
830
831BUILDDIR
832 Points to the location of the `Build Directory <#build-directory>`__.
833 You can define this directory indirectly through the
834 ````` <#structure-core-script>`__ script by passing in a Build
835 Directory path when you run the script. If you run the script and do
836 not provide a Build Directory path, the ``BUILDDIR`` defaults to
837 ``build`` in the current directory.
838
839BUILDHISTORY_COMMIT
840 When inheriting the ```buildhistory`` <#ref-classes-buildhistory>`__
841 class, this variable specifies whether or not to commit the build
842 history output in a local Git repository. If set to "1", this local
843 repository will be maintained automatically by the ``buildhistory``
844 class and a commit will be created on every build for changes to each
845 top-level subdirectory of the build history output (images, packages,
846 and sdk). If you want to track changes to build history over time,
847 you should set this value to "1".
848
849 By default, the ``buildhistory`` class does not commit the build
850 history output in a local Git repository: BUILDHISTORY_COMMIT ?= "0"
851
852BUILDHISTORY_COMMIT_AUTHOR
853 When inheriting the ```buildhistory`` <#ref-classes-buildhistory>`__
854 class, this variable specifies the author to use for each Git commit.
855 In order for the ``BUILDHISTORY_COMMIT_AUTHOR`` variable to work, the
856 ```BUILDHISTORY_COMMIT`` <#var-BUILDHISTORY_COMMIT>`__ variable must
857 be set to "1".
858
859 Git requires that the value you provide for the
860 ``BUILDHISTORY_COMMIT_AUTHOR`` variable takes the form of "name
861 email@host". Providing an email address or host that is not valid
862 does not produce an error.
863
864 By default, the ``buildhistory`` class sets the variable as follows:
865 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
866
867BUILDHISTORY_DIR
868 When inheriting the ```buildhistory`` <#ref-classes-buildhistory>`__
869 class, this variable specifies the directory in which build history
870 information is kept. For more information on how the variable works,
871 see the ``buildhistory.class``.
872
873 By default, the ``buildhistory`` class sets the directory as follows:
874 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
875
876BUILDHISTORY_FEATURES
877 When inheriting the ```buildhistory`` <#ref-classes-buildhistory>`__
878 class, this variable specifies the build history features to be
879 enabled. For more information on how build history works, see the
880 "`Maintaining Build Output
881 Quality <&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality>`__"
882 section in the Yocto Project Development Tasks Manual.
883
884 You can specify these features in the form of a space-separated list:
885
886 - *image:* Analysis of the contents of images, which includes the
887 list of installed packages among other things.
888
889 - *package:* Analysis of the contents of individual packages.
890
891 - *sdk:* Analysis of the contents of the software development kit
892 (SDK).
893
894 - *task:* Save output file signatures for `shared
895 state <&YOCTO_DOCS_OM_URL;#shared-state-cache>`__ (sstate) tasks.
896 This saves one file per task and lists the SHA-256 checksums for
897 each file staged (i.e. the output of the task).
898
899 By default, the ``buildhistory`` class enables the following
900 features: BUILDHISTORY_FEATURES ?= "image package sdk"
901
902BUILDHISTORY_IMAGE_FILES
903 When inheriting the ```buildhistory`` <#ref-classes-buildhistory>`__
904 class, this variable specifies a list of paths to files copied from
905 the image contents into the build history directory under an
906 "image-files" directory in the directory for the image, so that you
907 can track the contents of each file. The default is to copy
908 ``/etc/passwd`` and ``/etc/group``, which allows you to monitor for
909 changes in user and group entries. You can modify the list to include
910 any file. Specifying an invalid path does not produce an error.
911 Consequently, you can include files that might not always be present.
912
913 By default, the ``buildhistory`` class provides paths to the
914 following files: BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
915
916BUILDHISTORY_PUSH_REPO
917 When inheriting the ```buildhistory`` <#ref-classes-buildhistory>`__
918 class, this variable optionally specifies a remote repository to
919 which build history pushes Git changes. In order for
920 ``BUILDHISTORY_PUSH_REPO`` to work,
921 ```BUILDHISTORY_COMMIT`` <#var-BUILDHISTORY_COMMIT>`__ must be set to
922 "1".
923
924 The repository should correspond to a remote address that specifies a
925 repository as understood by Git, or alternatively to a remote name
926 that you have set up manually using ``git remote`` within the local
927 repository.
928
929 By default, the ``buildhistory`` class sets the variable as follows:
930 BUILDHISTORY_PUSH_REPO ?= ""
931
932BUILDSDK_CFLAGS
933 Specifies the flags to pass to the C compiler when building for the
934 SDK. When building in the ``nativesdk-`` context,
935 ```CFLAGS`` <#var-CFLAGS>`__ is set to the value of this variable by
936 default.
937
938BUILDSDK_CPPFLAGS
939 Specifies the flags to pass to the C pre-processor (i.e. to both the
940 C and the C++ compilers) when building for the SDK. When building in
941 the ``nativesdk-`` context, ```CPPFLAGS`` <#var-CPPFLAGS>`__ is set
942 to the value of this variable by default.
943
944BUILDSDK_CXXFLAGS
945 Specifies the flags to pass to the C++ compiler when building for the
946 SDK. When building in the ``nativesdk-`` context,
947 ```CXXFLAGS`` <#var-CXXFLAGS>`__ is set to the value of this variable
948 by default.
949
950BUILDSDK_LDFLAGS
951 Specifies the flags to pass to the linker when building for the SDK.
952 When building in the ``nativesdk-`` context,
953 ```LDFLAGS`` <#var-LDFLAGS>`__ is set to the value of this variable
954 by default.
955
956BUILDSTATS_BASE
957 Points to the location of the directory that holds build statistics
958 when you use and enable the
959 ```buildstats`` <#ref-classes-buildstats>`__ class. The
960 ``BUILDSTATS_BASE`` directory defaults to
961 ``${``\ ```TMPDIR`` <#var-TMPDIR>`__\ ``}/buildstats/``.
962
963BUSYBOX_SPLIT_SUID
964 For the BusyBox recipe, specifies whether to split the output
965 executable file into two parts: one for features that require
966 ``setuid root``, and one for the remaining features (i.e. those that
967 do not require ``setuid root``).
968
969 The ``BUSYBOX_SPLIT_SUID`` variable defaults to "1", which results in
970 splitting the output executable file. Set the variable to "0" to get
971 a single output executable file.
972
973CACHE
974 Specifies the directory BitBake uses to store a cache of the
975 `Metadata <#metadata>`__ so it does not need to be parsed every time
976 BitBake is started.
977
978CC
979 The minimal command and arguments used to run the C compiler.
980
981CFLAGS
982 Specifies the flags to pass to the C compiler. This variable is
983 exported to an environment variable and thus made visible to the
984 software being built during the compilation step.
985
986 Default initialization for ``CFLAGS`` varies depending on what is
987 being built:
988
989 - ```TARGET_CFLAGS`` <#var-TARGET_CFLAGS>`__ when building for the
990 target
991
992 - ```BUILD_CFLAGS`` <#var-BUILD_CFLAGS>`__ when building for the
993 build host (i.e. ``-native``)
994
995 - ```BUILDSDK_CFLAGS`` <#var-BUILDSDK_CFLAGS>`__ when building for
996 an SDK (i.e. ``nativesdk-``)
997
998CLASSOVERRIDE
999 An internal variable specifying the special class override that
1000 should currently apply (e.g. "class-target", "class-native", and so
1001 forth). The classes that use this variable (e.g.
1002 ```native`` <#ref-classes-native>`__,
1003 ```nativesdk`` <#ref-classes-nativesdk>`__, and so forth) set the
1004 variable to appropriate values.
1005
1006 .. note::
1007
1008 CLASSOVERRIDE
1009 gets its default "class-target" value from the
1010 bitbake.conf
1011 file.
1012
1013 As an example, the following override allows you to install extra
1014 files, but only when building for the target:
1015 do_install_append_class-target() { install my-extra-file
1016 ${D}${sysconfdir} } Here is an example where ``FOO`` is set to
1017 "native" when building for the build host, and to "other" when not
1018 building for the build host: FOO_class-native = "native" FOO =
1019 "other" The underlying mechanism behind ``CLASSOVERRIDE`` is simply
1020 that it is included in the default value of
1021 ```OVERRIDES`` <#var-OVERRIDES>`__.
1022
1023CLEANBROKEN
1024 If set to "1" within a recipe, ``CLEANBROKEN`` specifies that the
1025 ``make clean`` command does not work for the software being built.
1026 Consequently, the OpenEmbedded build system will not try to run
1027 ``make clean`` during the ```do_configure`` <#ref-tasks-configure>`__
1028 task, which is the default behavior.
1029
1030COMBINED_FEATURES
1031 Provides a list of hardware features that are enabled in both
1032 ```MACHINE_FEATURES`` <#var-MACHINE_FEATURES>`__ and
1033 ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__. This select list of
1034 features contains features that make sense to be controlled both at
1035 the machine and distribution configuration level. For example, the
1036 "bluetooth" feature requires hardware support but should also be
1037 optional at the distribution level, in case the hardware supports
1038 Bluetooth but you do not ever intend to use it.
1039
1040COMMON_LICENSE_DIR
1041 Points to ``meta/files/common-licenses`` in the `Source
1042 Directory <#source-directory>`__, which is where generic license
1043 files reside.
1044
1045COMPATIBLE_HOST
1046 A regular expression that resolves to one or more hosts (when the
1047 recipe is native) or one or more targets (when the recipe is
1048 non-native) with which a recipe is compatible. The regular expression
1049 is matched against ```HOST_SYS`` <#var-HOST_SYS>`__. You can use the
1050 variable to stop recipes from being built for classes of systems with
1051 which the recipes are not compatible. Stopping these builds is
1052 particularly useful with kernels. The variable also helps to increase
1053 parsing speed since the build system skips parsing recipes not
1054 compatible with the current system.
1055
1056COMPATIBLE_MACHINE
1057 A regular expression that resolves to one or more target machines
1058 with which a recipe is compatible. The regular expression is matched
1059 against ```MACHINEOVERRIDES`` <#var-MACHINEOVERRIDES>`__. You can use
1060 the variable to stop recipes from being built for machines with which
1061 the recipes are not compatible. Stopping these builds is particularly
1062 useful with kernels. The variable also helps to increase parsing
1063 speed since the build system skips parsing recipes not compatible
1064 with the current machine.
1065
1066COMPLEMENTARY_GLOB
1067 Defines wildcards to match when installing a list of complementary
1068 packages for all the packages explicitly (or implicitly) installed in
1069 an image.
1070
1071 .. note::
1072
1073 The
1074 COMPLEMENTARY_GLOB
1075 variable uses Unix filename pattern matching (
1076 fnmatch
1077 ), which is similar to the Unix style pathname pattern expansion (
1078 glob
1079 ).
1080
1081 The resulting list of complementary packages is associated with an
1082 item that can be added to
1083 ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__. An example usage of
1084 this is the "dev-pkgs" item that when added to ``IMAGE_FEATURES``
1085 will install -dev packages (containing headers and other development
1086 files) for every package in the image.
1087
1088 To add a new feature item pointing to a wildcard, use a variable flag
1089 to specify the feature item name and use the value to specify the
1090 wildcard. Here is an example: COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1091
1092COMPONENTS_DIR
1093 Stores sysroot components for each recipe. The OpenEmbedded build
1094 system uses ``COMPONENTS_DIR`` when constructing recipe-specific
1095 sysroots for other recipes.
1096
1097 The default is
1098 "``${``\ ```STAGING_DIR`` <#var-STAGING_DIR>`__\ ``}-components``."
1099 (i.e.
1100 "``${``\ ```TMPDIR`` <#var-TMPDIR>`__\ ``}/sysroots-components``").
1101
1102CONF_VERSION
1103 Tracks the version of the local configuration file (i.e.
1104 ``local.conf``). The value for ``CONF_VERSION`` increments each time
1105 ``build/conf/`` compatibility changes.
1106
1107CONFFILES
1108 Identifies editable or configurable files that are part of a package.
1109 If the Package Management System (PMS) is being used to update
1110 packages on the target system, it is possible that configuration
1111 files you have changed after the original installation and that you
1112 now want to remain unchanged are overwritten. In other words,
1113 editable files might exist in the package that you do not want reset
1114 as part of the package update process. You can use the ``CONFFILES``
1115 variable to list the files in the package that you wish to prevent
1116 the PMS from overwriting during this update process.
1117
1118 To use the ``CONFFILES`` variable, provide a package name override
1119 that identifies the resulting package. Then, provide a
1120 space-separated list of files. Here is an example: CONFFILES_${PN} +=
1121 "${sysconfdir}/file1 \\ ${sysconfdir}/file2 ${sysconfdir}/file3"
1122
1123 A relationship exists between the ``CONFFILES`` and ``FILES``
1124 variables. The files listed within ``CONFFILES`` must be a subset of
1125 the files listed within ``FILES``. Because the configuration files
1126 you provide with ``CONFFILES`` are simply being identified so that
1127 the PMS will not overwrite them, it makes sense that the files must
1128 already be included as part of the package through the ``FILES``
1129 variable.
1130
1131 .. note::
1132
1133 When specifying paths as part of the
1134 CONFFILES
1135 variable, it is good practice to use appropriate path variables.
1136 For example,
1137 ${sysconfdir}
1138 rather than
1139 /etc
1140 or
1141 ${bindir}
1142 rather than
1143 /usr/bin
1144 . You can find a list of these variables at the top of the
1145 meta/conf/bitbake.conf
1146 file in the
1147 Source Directory
1148 .
1149
1150CONFIG_INITRAMFS_SOURCE
1151 Identifies the initial RAM filesystem (initramfs) source files. The
1152 OpenEmbedded build system receives and uses this kernel Kconfig
1153 variable as an environment variable. By default, the variable is set
1154 to null ("").
1155
1156 The ``CONFIG_INITRAMFS_SOURCE`` can be either a single cpio archive
1157 with a ``.cpio`` suffix or a space-separated list of directories and
1158 files for building the initramfs image. A cpio archive should contain
1159 a filesystem archive to be used as an initramfs image. Directories
1160 should contain a filesystem layout to be included in the initramfs
1161 image. Files should contain entries according to the format described
1162 by the ``usr/gen_init_cpio`` program in the kernel tree.
1163
1164 If you specify multiple directories and files, the initramfs image
1165 will be the aggregate of all of them.
1166
1167 For information on creating an initramfs, see the "`Building an
1168 Initial RAM Filesystem (initramfs)
1169 Image <&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image>`__" section
1170 in the Yocto Project Development Tasks Manual.
1171
1172CONFIG_SITE
1173 A list of files that contains ``autoconf`` test results relevant to
1174 the current build. This variable is used by the Autotools utilities
1175 when running ``configure``.
1176
1177CONFIGURE_FLAGS
1178 The minimal arguments for GNU configure.
1179
1180CONFLICT_DISTRO_FEATURES
1181 When inheriting the
1182 ```distro_features_check`` <#ref-classes-distro_features_check>`__
1183 class, this variable identifies distribution features that would be
1184 in conflict should the recipe be built. In other words, if the
1185 ``CONFLICT_DISTRO_FEATURES`` variable lists a feature that also
1186 appears in ``DISTRO_FEATURES`` within the current configuration, an
1187 error occurs and the build stops.
1188
1189COPYLEFT_LICENSE_EXCLUDE
1190 A space-separated list of licenses to exclude from the source
1191 archived by the ```archiver`` <#ref-classes-archiver>`__ class. In
1192 other words, if a license in a recipe's
1193 ```LICENSE`` <#var-LICENSE>`__ value is in the value of
1194 ``COPYLEFT_LICENSE_EXCLUDE``, then its source is not archived by the
1195 class.
1196
1197 .. note::
1198
1199 The
1200 COPYLEFT_LICENSE_EXCLUDE
1201 variable takes precedence over the
1202 COPYLEFT_LICENSE_INCLUDE
1203 variable.
1204
1205 The default value, which is "CLOSED Proprietary", for
1206 ``COPYLEFT_LICENSE_EXCLUDE`` is set by the
1207 ```copyleft_filter`` <#ref-classes-copyleft_filter>`__ class, which
1208 is inherited by the ``archiver`` class.
1209
1210COPYLEFT_LICENSE_INCLUDE
1211 A space-separated list of licenses to include in the source archived
1212 by the ```archiver`` <#ref-classes-archiver>`__ class. In other
1213 words, if a license in a recipe's ```LICENSE`` <#var-LICENSE>`__
1214 value is in the value of ``COPYLEFT_LICENSE_INCLUDE``, then its
1215 source is archived by the class.
1216
1217 The default value is set by the
1218 ```copyleft_filter`` <#ref-classes-copyleft_filter>`__ class, which
1219 is inherited by the ``archiver`` class. The default value includes
1220 "GPL*", "LGPL*", and "AGPL*".
1221
1222COPYLEFT_PN_EXCLUDE
1223 A list of recipes to exclude in the source archived by the
1224 ```archiver`` <#ref-classes-archiver>`__ class. The
1225 ``COPYLEFT_PN_EXCLUDE`` variable overrides the license inclusion and
1226 exclusion caused through the
1227 ```COPYLEFT_LICENSE_INCLUDE`` <#var-COPYLEFT_LICENSE_INCLUDE>`__ and
1228 ```COPYLEFT_LICENSE_EXCLUDE`` <#var-COPYLEFT_LICENSE_EXCLUDE>`__
1229 variables, respectively.
1230
1231 The default value, which is "" indicating to not explicitly exclude
1232 any recipes by name, for ``COPYLEFT_PN_EXCLUDE`` is set by the
1233 ```copyleft_filter`` <#ref-classes-copyleft_filter>`__ class, which
1234 is inherited by the ``archiver`` class.
1235
1236COPYLEFT_PN_INCLUDE
1237 A list of recipes to include in the source archived by the
1238 ```archiver`` <#ref-classes-archiver>`__ class. The
1239 ``COPYLEFT_PN_INCLUDE`` variable overrides the license inclusion and
1240 exclusion caused through the
1241 ```COPYLEFT_LICENSE_INCLUDE`` <#var-COPYLEFT_LICENSE_INCLUDE>`__ and
1242 ```COPYLEFT_LICENSE_EXCLUDE`` <#var-COPYLEFT_LICENSE_EXCLUDE>`__
1243 variables, respectively.
1244
1245 The default value, which is "" indicating to not explicitly include
1246 any recipes by name, for ``COPYLEFT_PN_INCLUDE`` is set by the
1247 ```copyleft_filter`` <#ref-classes-copyleft_filter>`__ class, which
1248 is inherited by the ``archiver`` class.
1249
1250COPYLEFT_RECIPE_TYPES
1251 A space-separated list of recipe types to include in the source
1252 archived by the ```archiver`` <#ref-classes-archiver>`__ class.
1253 Recipe types are ``target``, ``native``, ``nativesdk``, ``cross``,
1254 ``crosssdk``, and ``cross-canadian``.
1255
1256 The default value, which is "target*", for ``COPYLEFT_RECIPE_TYPES``
1257 is set by the ```copyleft_filter`` <#ref-classes-copyleft_filter>`__
1258 class, which is inherited by the ``archiver`` class.
1259
1260COPY_LIC_DIRS
1261 If set to "1" along with the
1262 ```COPY_LIC_MANIFEST`` <#var-COPY_LIC_MANIFEST>`__ variable, the
1263 OpenEmbedded build system copies into the image the license files,
1264 which are located in ``/usr/share/common-licenses``, for each
1265 package. The license files are placed in directories within the image
1266 itself during build time.
1267
1268 .. note::
1269
1270 The
1271 COPY_LIC_DIRS
1272 does not offer a path for adding licenses for newly installed
1273 packages to an image, which might be most suitable for read-only
1274 filesystems that cannot be upgraded. See the
1275 LICENSE_CREATE_PACKAGE
1276 variable for additional information. You can also reference the "
1277 Providing License Text
1278 " section in the Yocto Project Development Tasks Manual for
1279 information on providing license text.
1280
1281COPY_LIC_MANIFEST
1282 If set to "1", the OpenEmbedded build system copies the license
1283 manifest for the image to
1284 ``/usr/share/common-licenses/license.manifest`` within the image
1285 itself during build time.
1286
1287 .. note::
1288
1289 The
1290 COPY_LIC_MANIFEST
1291 does not offer a path for adding licenses for newly installed
1292 packages to an image, which might be most suitable for read-only
1293 filesystems that cannot be upgraded. See the
1294 LICENSE_CREATE_PACKAGE
1295 variable for additional information. You can also reference the "
1296 Providing License Text
1297 " section in the Yocto Project Development Tasks Manual for
1298 information on providing license text.
1299
1300CORE_IMAGE_EXTRA_INSTALL
1301 Specifies the list of packages to be added to the image. You should
1302 only set this variable in the ``local.conf`` configuration file found
1303 in the `Build Directory <#build-directory>`__.
1304
1305 This variable replaces ``POKY_EXTRA_INSTALL``, which is no longer
1306 supported.
1307
1308COREBASE
1309 Specifies the parent directory of the OpenEmbedded-Core Metadata
1310 layer (i.e. ``meta``).
1311
1312 It is an important distinction that ``COREBASE`` points to the parent
1313 of this layer and not the layer itself. Consider an example where you
1314 have cloned the Poky Git repository and retained the ``poky`` name
1315 for your local copy of the repository. In this case, ``COREBASE``
1316 points to the ``poky`` folder because it is the parent directory of
1317 the ``poky/meta`` layer.
1318
1319COREBASE_FILES
1320 Lists files from the ```COREBASE`` <#var-COREBASE>`__ directory that
1321 should be copied other than the layers listed in the
1322 ``bblayers.conf`` file. The ``COREBASE_FILES`` variable exists for
1323 the purpose of copying metadata from the OpenEmbedded build system
1324 into the extensible SDK.
1325
1326 Explicitly listing files in ``COREBASE`` is needed because it
1327 typically contains build directories and other files that should not
1328 normally be copied into the extensible SDK. Consequently, the value
1329 of ``COREBASE_FILES`` is used in order to only copy the files that
1330 are actually needed.
1331
1332CPP
1333 The minimal command and arguments used to run the C preprocessor.
1334
1335CPPFLAGS
1336 Specifies the flags to pass to the C pre-processor (i.e. to both the
1337 C and the C++ compilers). This variable is exported to an environment
1338 variable and thus made visible to the software being built during the
1339 compilation step.
1340
1341 Default initialization for ``CPPFLAGS`` varies depending on what is
1342 being built:
1343
1344 - ```TARGET_CPPFLAGS`` <#var-TARGET_CPPFLAGS>`__ when building for
1345 the target
1346
1347 - ```BUILD_CPPFLAGS`` <#var-BUILD_CPPFLAGS>`__ when building for the
1348 build host (i.e. ``-native``)
1349
1350 - ```BUILDSDK_CPPFLAGS`` <#var-BUILDSDK_CPPFLAGS>`__ when building
1351 for an SDK (i.e. ``nativesdk-``)
1352
1353CROSS_COMPILE
1354 The toolchain binary prefix for the target tools. The
1355 ``CROSS_COMPILE`` variable is the same as the
1356 ```TARGET_PREFIX`` <#var-TARGET_PREFIX>`__ variable.
1357
1358 .. note::
1359
1360 The OpenEmbedded build system sets the
1361 CROSS_COMPILE
1362 variable only in certain contexts (e.g. when building for kernel
1363 and kernel module recipes).
1364
1365CVSDIR
1366 The directory in which files checked out under the CVS system are
1367 stored.
1368
1369CXX
1370 The minimal command and arguments used to run the C++ compiler.
1371
1372CXXFLAGS
1373 Specifies the flags to pass to the C++ compiler. This variable is
1374 exported to an environment variable and thus made visible to the
1375 software being built during the compilation step.
1376
1377 Default initialization for ``CXXFLAGS`` varies depending on what is
1378 being built:
1379
1380 - ```TARGET_CXXFLAGS`` <#var-TARGET_CXXFLAGS>`__ when building for
1381 the target
1382
1383 - ```BUILD_CXXFLAGS`` <#var-BUILD_CXXFLAGS>`__ when building for the
1384 build host (i.e. ``-native``)
1385
1386 - ```BUILDSDK_CXXFLAGS`` <#var-BUILDSDK_CXXFLAGS>`__ when building
1387 for an SDK (i.e. ``nativesdk-``)
1388
1389D
1390 The destination directory. The location in the `Build
1391 Directory <#build-directory>`__ where components are installed by the
1392 ```do_install`` <#ref-tasks-install>`__ task. This location defaults
1393 to: ${WORKDIR}/image
1394
1395 .. note::
1396
1397 Tasks that read from or write to this directory should run under
1398 fakeroot
1399 .
1400
1401DATE
1402 The date the build was started. Dates appear using the year, month,
1403 and day (YMD) format (e.g. "20150209" for February 9th, 2015).
1404
1405DATETIME
1406 The date and time on which the current build started. The format is
1407 suitable for timestamps.
1408
1409DEBIAN_NOAUTONAME
1410 When the ```debian`` <#ref-classes-debian>`__ class is inherited,
1411 which is the default behavior, ``DEBIAN_NOAUTONAME`` specifies a
1412 particular package should not be renamed according to Debian library
1413 package naming. You must use the package name as an override when you
1414 set this variable. Here is an example from the ``fontconfig`` recipe:
1415 DEBIAN_NOAUTONAME_fontconfig-utils = "1"
1416
1417DEBIANNAME
1418 When the ```debian`` <#ref-classes-debian>`__ class is inherited,
1419 which is the default behavior, ``DEBIANNAME`` allows you to override
1420 the library name for an individual package. Overriding the library
1421 name in these cases is rare. You must use the package name as an
1422 override when you set this variable. Here is an example from the
1423 ``dbus`` recipe: DEBIANNAME_${PN} = "dbus-1"
1424
1425DEBUG_BUILD
1426 Specifies to build packages with debugging information. This
1427 influences the value of the ``SELECTED_OPTIMIZATION`` variable.
1428
1429DEBUG_OPTIMIZATION
1430 The options to pass in ``TARGET_CFLAGS`` and ``CFLAGS`` when
1431 compiling a system for debugging. This variable defaults to "-O
1432 -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1433
1434DEFAULT_PREFERENCE
1435 Specifies a weak bias for recipe selection priority.
1436
1437 The most common usage of this is variable is to set it to "-1" within
1438 a recipe for a development version of a piece of software. Using the
1439 variable in this way causes the stable version of the recipe to build
1440 by default in the absence of ``PREFERRED_VERSION`` being used to
1441 build the development version.
1442
1443 .. note::
1444
1445 The bias provided by
1446 DEFAULT_PREFERENCE
1447 is weak and is overridden by
1448 BBFILE_PRIORITY
1449 if that variable is different between two layers that contain
1450 different versions of the same recipe.
1451
1452DEFAULTTUNE
1453 The default CPU and Application Binary Interface (ABI) tunings (i.e.
1454 the "tune") used by the OpenEmbedded build system. The
1455 ``DEFAULTTUNE`` helps define
1456 ```TUNE_FEATURES`` <#var-TUNE_FEATURES>`__.
1457
1458 The default tune is either implicitly or explicitly set by the
1459 machine (```MACHINE`` <#var-MACHINE>`__). However, you can override
1460 the setting using available tunes as defined with
1461 ```AVAILTUNES`` <#var-AVAILTUNES>`__.
1462
1463DEPENDS
1464 Lists a recipe's build-time dependencies. These are dependencies on
1465 other recipes whose contents (e.g. headers and shared libraries) are
1466 needed by the recipe at build time.
1467
1468 As an example, consider a recipe ``foo`` that contains the following
1469 assignment: DEPENDS = "bar" The practical effect of the previous
1470 assignment is that all files installed by bar will be available in
1471 the appropriate staging sysroot, given by the
1472 ```STAGING_DIR*`` <#var-STAGING_DIR>`__ variables, by the time the
1473 ```do_configure`` <#ref-tasks-configure>`__ task for ``foo`` runs.
1474 This mechanism is implemented by having ``do_configure`` depend on
1475 the ```do_populate_sysroot`` <#ref-tasks-populate_sysroot>`__ task of
1476 each recipe listed in ``DEPENDS``, through a
1477 ``[``\ ```deptask`` <&YOCTO_DOCS_BB_URL;#variable-flags>`__\ ``]``
1478 declaration in the ```base`` <#ref-classes-base>`__ class.
1479
1480 .. note::
1481
1482 It seldom is necessary to reference, for example,
1483 STAGING_DIR_HOST
1484 explicitly. The standard classes and build-related variables are
1485 configured to automatically use the appropriate staging sysroots.
1486
1487 As another example, ``DEPENDS`` can also be used to add utilities
1488 that run on the build machine during the build. For example, a recipe
1489 that makes use of a code generator built by the recipe ``codegen``
1490 might have the following: DEPENDS = "codegen-native" For more
1491 information, see the ```native`` <#ref-classes-native>`__ class and
1492 the ```EXTRANATIVEPATH`` <#var-EXTRANATIVEPATH>`__ variable.
1493
1494 .. note::
1495
1496 - ``DEPENDS`` is a list of recipe names. Or, to be more precise,
1497 it is a list of ```PROVIDES`` <#var-PROVIDES>`__ names, which
1498 usually match recipe names. Putting a package name such as
1499 "foo-dev" in ``DEPENDS`` does not make sense. Use "foo"
1500 instead, as this will put files from all the packages that make
1501 up ``foo``, which includes those from ``foo-dev``, into the
1502 sysroot.
1503
1504 - One recipe having another recipe in ``DEPENDS`` does not by
1505 itself add any runtime dependencies between the packages
1506 produced by the two recipes. However, as explained in the
1507 "`Automatically Added Runtime
1508 Dependencies <&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies>`__"
1509 section in the Yocto Project Overview and Concepts Manual,
1510 runtime dependencies will often be added automatically, meaning
1511 ``DEPENDS`` alone is sufficient for most recipes.
1512
1513 - Counterintuitively, ``DEPENDS`` is often necessary even for
1514 recipes that install precompiled components. For example, if
1515 ``libfoo`` is a precompiled library that links against
1516 ``libbar``, then linking against ``libfoo`` requires both
1517 ``libfoo`` and ``libbar`` to be available in the sysroot.
1518 Without a ``DEPENDS`` from the recipe that installs ``libfoo``
1519 to the recipe that installs ``libbar``, other recipes might
1520 fail to link against ``libfoo``.
1521
1522 For information on runtime dependencies, see the
1523 ```RDEPENDS`` <#var-RDEPENDS>`__ variable. You can also see the
1524 "`Tasks <&YOCTO_DOCS_BB_URL;#tasks>`__" and
1525 "`Dependencies <&YOCTO_DOCS_BB_URL;#dependencies>`__" sections in the
1526 BitBake User Manual for additional information on tasks and
1527 dependencies.
1528
1529DEPLOY_DIR
1530 Points to the general area that the OpenEmbedded build system uses to
1531 place images, packages, SDKs, and other output files that are ready
1532 to be used outside of the build system. By default, this directory
1533 resides within the `Build Directory <#build-directory>`__ as
1534 ``${TMPDIR}/deploy``.
1535
1536 For more information on the structure of the Build Directory, see
1537 "`The Build Directory - ``build/`` <#structure-build>`__" section.
1538 For more detail on the contents of the ``deploy`` directory, see the
1539 "`Images <&YOCTO_DOCS_OM_URL;#images-dev-environment>`__", "`Package
1540 Feeds <&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment>`__", and
1541 "`Application Development
1542 SDK <&YOCTO_DOCS_OM_URL;#sdk-dev-environment>`__" sections all in the
1543 Yocto Project Overview and Concepts Manual.
1544
1545DEPLOY_DIR_DEB
1546 Points to the area that the OpenEmbedded build system uses to place
1547 Debian packages that are ready to be used outside of the build
1548 system. This variable applies only when
1549 ```PACKAGE_CLASSES`` <#var-PACKAGE_CLASSES>`__ contains
1550 "package_deb".
1551
1552 The BitBake configuration file initially defines the
1553 ``DEPLOY_DIR_DEB`` variable as a sub-folder of
1554 ```DEPLOY_DIR`` <#var-DEPLOY_DIR>`__: DEPLOY_DIR_DEB =
1555 "${DEPLOY_DIR}/deb"
1556
1557 The ```package_deb`` <#ref-classes-package_deb>`__ class uses the
1558 ``DEPLOY_DIR_DEB`` variable to make sure the
1559 ```do_package_write_deb`` <#ref-tasks-package_write_deb>`__ task
1560 writes Debian packages into the appropriate folder. For more
1561 information on how packaging works, see the "`Package
1562 Feeds <&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment>`__" section
1563 in the Yocto Project Overview and Concepts Manual.
1564
1565DEPLOY_DIR_IMAGE
1566 Points to the area that the OpenEmbedded build system uses to place
1567 images and other associated output files that are ready to be
1568 deployed onto the target machine. The directory is machine-specific
1569 as it contains the ``${MACHINE}`` name. By default, this directory
1570 resides within the `Build Directory <#build-directory>`__ as
1571 ``${DEPLOY_DIR}/images/${MACHINE}/``.
1572
1573 For more information on the structure of the Build Directory, see
1574 "`The Build Directory - ``build/`` <#structure-build>`__" section.
1575 For more detail on the contents of the ``deploy`` directory, see the
1576 "`Images <&YOCTO_DOCS_OM_URL;#images-dev-environment>`__" and
1577 "`Application Development
1578 SDK <&YOCTO_DOCS_OM_URL;#sdk-dev-environment>`__" sections both in
1579 the Yocto Project Overview and Concepts Manual.
1580
1581DEPLOY_DIR_IPK
1582 Points to the area that the OpenEmbedded build system uses to place
1583 IPK packages that are ready to be used outside of the build system.
1584 This variable applies only when
1585 ```PACKAGE_CLASSES`` <#var-PACKAGE_CLASSES>`__ contains
1586 "package_ipk".
1587
1588 The BitBake configuration file initially defines this variable as a
1589 sub-folder of ```DEPLOY_DIR`` <#var-DEPLOY_DIR>`__: DEPLOY_DIR_IPK =
1590 "${DEPLOY_DIR}/ipk"
1591
1592 The ```package_ipk`` <#ref-classes-package_ipk>`__ class uses the
1593 ``DEPLOY_DIR_IPK`` variable to make sure the
1594 ```do_package_write_ipk`` <#ref-tasks-package_write_ipk>`__ task
1595 writes IPK packages into the appropriate folder. For more information
1596 on how packaging works, see the "`Package
1597 Feeds <&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment>`__" section
1598 in the Yocto Project Overview and Concepts Manual.
1599
1600DEPLOY_DIR_RPM
1601 Points to the area that the OpenEmbedded build system uses to place
1602 RPM packages that are ready to be used outside of the build system.
1603 This variable applies only when
1604 ```PACKAGE_CLASSES`` <#var-PACKAGE_CLASSES>`__ contains
1605 "package_rpm".
1606
1607 The BitBake configuration file initially defines this variable as a
1608 sub-folder of ```DEPLOY_DIR`` <#var-DEPLOY_DIR>`__: DEPLOY_DIR_RPM =
1609 "${DEPLOY_DIR}/rpm"
1610
1611 The ```package_rpm`` <#ref-classes-package_rpm>`__ class uses the
1612 ``DEPLOY_DIR_RPM`` variable to make sure the
1613 ```do_package_write_rpm`` <#ref-tasks-package_write_rpm>`__ task
1614 writes RPM packages into the appropriate folder. For more information
1615 on how packaging works, see the "`Package
1616 Feeds <&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment>`__" section
1617 in the Yocto Project Overview and Concepts Manual.
1618
1619DEPLOY_DIR_TAR
1620 Points to the area that the OpenEmbedded build system uses to place
1621 tarballs that are ready to be used outside of the build system. This
1622 variable applies only when
1623 ```PACKAGE_CLASSES`` <#var-PACKAGE_CLASSES>`__ contains
1624 "package_tar".
1625
1626 The BitBake configuration file initially defines this variable as a
1627 sub-folder of ```DEPLOY_DIR`` <#var-DEPLOY_DIR>`__: DEPLOY_DIR_TAR =
1628 "${DEPLOY_DIR}/tar"
1629
1630 The ```package_tar`` <#ref-classes-package_tar>`__ class uses the
1631 ``DEPLOY_DIR_TAR`` variable to make sure the
1632 ```do_package_write_tar`` <#ref-tasks-package_write_tar>`__ task
1633 writes TAR packages into the appropriate folder. For more information
1634 on how packaging works, see the "`Package
1635 Feeds <&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment>`__" section
1636 in the Yocto Project Overview and Concepts Manual.
1637
1638DEPLOYDIR
1639 When inheriting the ```deploy`` <#ref-classes-deploy>`__ class, the
1640 ``DEPLOYDIR`` points to a temporary work area for deployed files that
1641 is set in the ``deploy`` class as follows: DEPLOYDIR =
1642 "${WORKDIR}/deploy-${```PN`` <#var-PN>`__}"
1643
1644 Recipes inheriting the ``deploy`` class should copy files to be
1645 deployed into ``DEPLOYDIR``, and the class will take care of copying
1646 them into ```DEPLOY_DIR_IMAGE`` <#var-DEPLOY_DIR_IMAGE>`__
1647 afterwards.
1648
1649DESCRIPTION
1650 The package description used by package managers. If not set,
1651 ``DESCRIPTION`` takes the value of the ```SUMMARY`` <#var-SUMMARY>`__
1652 variable.
1653
1654DISTRO
1655 The short name of the distribution. For information on the long name
1656 of the distribution, see the ```DISTRO_NAME`` <#var-DISTRO_NAME>`__
1657 variable.
1658
1659 The ``DISTRO`` variable corresponds to a distribution configuration
1660 file whose root name is the same as the variable's argument and whose
1661 filename extension is ``.conf``. For example, the distribution
1662 configuration file for the Poky distribution is named ``poky.conf``
1663 and resides in the ``meta-poky/conf/distro`` directory of the `Source
1664 Directory <#source-directory>`__.
1665
1666 Within that ``poky.conf`` file, the ``DISTRO`` variable is set as
1667 follows: DISTRO = "poky"
1668
1669 Distribution configuration files are located in a ``conf/distro``
1670 directory within the `Metadata <#metadata>`__ that contains the
1671 distribution configuration. The value for ``DISTRO`` must not contain
1672 spaces, and is typically all lower-case.
1673
1674 .. note::
1675
1676 If the
1677 DISTRO
1678 variable is blank, a set of default configurations are used, which
1679 are specified within
1680 meta/conf/distro/defaultsetup.conf
1681 also in the Source Directory.
1682
1683DISTRO_CODENAME
1684 Specifies a codename for the distribution being built.
1685
1686DISTRO_EXTRA_RDEPENDS
1687 Specifies a list of distro-specific packages to add to all images.
1688 This variable takes affect through ``packagegroup-base`` so the
1689 variable only really applies to the more full-featured images that
1690 include ``packagegroup-base``. You can use this variable to keep
1691 distro policy out of generic images. As with all other distro
1692 variables, you set this variable in the distro ``.conf`` file.
1693
1694DISTRO_EXTRA_RRECOMMENDS
1695 Specifies a list of distro-specific packages to add to all images if
1696 the packages exist. The packages might not exist or be empty (e.g.
1697 kernel modules). The list of packages are automatically installed but
1698 you can remove them.
1699
1700DISTRO_FEATURES
1701 The software support you want in your distribution for various
1702 features. You define your distribution features in the distribution
1703 configuration file.
1704
1705 In most cases, the presence or absence of a feature in
1706 ``DISTRO_FEATURES`` is translated to the appropriate option supplied
1707 to the configure script during the
1708 ```do_configure`` <#ref-tasks-configure>`__ task for recipes that
1709 optionally support the feature. For example, specifying "x11" in
1710 ``DISTRO_FEATURES``, causes every piece of software built for the
1711 target that can optionally support X11 to have its X11 support
1712 enabled.
1713
1714 Two more examples are Bluetooth and NFS support. For a more complete
1715 list of features that ships with the Yocto Project and that you can
1716 provide with this variable, see the "`Distro
1717 Features <#ref-features-distro>`__" section.
1718
1719DISTRO_FEATURES_BACKFILL
1720 Features to be added to ``DISTRO_FEATURES`` if not also present in
1721 ``DISTRO_FEATURES_BACKFILL_CONSIDERED``.
1722
1723 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
1724 not intended to be user-configurable. It is best to just reference
1725 the variable to see which distro features are being backfilled for
1726 all distro configurations. See the "`Feature
1727 Backfilling <#ref-features-backfill>`__" section for more
1728 information.
1729
1730DISTRO_FEATURES_BACKFILL_CONSIDERED
1731 Features from ``DISTRO_FEATURES_BACKFILL`` that should not be
1732 backfilled (i.e. added to ``DISTRO_FEATURES``) during the build. See
1733 the "`Feature Backfilling <#ref-features-backfill>`__" section for
1734 more information.
1735
1736DISTRO_FEATURES_DEFAULT
1737 A convenience variable that gives you the default list of distro
1738 features with the exception of any features specific to the C library
1739 (``libc``).
1740
1741 When creating a custom distribution, you might find it useful to be
1742 able to reuse the default
1743 ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ options without the
1744 need to write out the full set. Here is an example that uses
1745 ``DISTRO_FEATURES_DEFAULT`` from a custom distro configuration file:
1746 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature"
1747
1748DISTRO_FEATURES_FILTER_NATIVE
1749 Specifies a list of features that if present in the target
1750 ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ value should be
1751 included in ``DISTRO_FEATURES`` when building native recipes. This
1752 variable is used in addition to the features filtered using the
1753 ```DISTRO_FEATURES_NATIVE`` <#var-DISTRO_FEATURES_NATIVE>`__
1754 variable.
1755
1756DISTRO_FEATURES_FILTER_NATIVESDK
1757 Specifies a list of features that if present in the target
1758 ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ value should be
1759 included in ``DISTRO_FEATURES`` when building nativesdk recipes. This
1760 variable is used in addition to the features filtered using the
1761 ```DISTRO_FEATURES_NATIVESDK`` <#var-DISTRO_FEATURES_NATIVESDK>`__
1762 variable.
1763
1764DISTRO_FEATURES_NATIVE
1765 Specifies a list of features that should be included in
1766 ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ when building native
1767 recipes. This variable is used in addition to the features filtered
1768 using the
1769 ```DISTRO_FEATURES_FILTER_NATIVE`` <#var-DISTRO_FEATURES_FILTER_NATIVE>`__
1770 variable.
1771
1772DISTRO_FEATURES_NATIVESDK
1773 Specifies a list of features that should be included in
1774 ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__ when building
1775 nativesdk recipes. This variable is used in addition to the features
1776 filtered using the
1777 ```DISTRO_FEATURES_FILTER_NATIVESDK`` <#var-DISTRO_FEATURES_FILTER_NATIVESDK>`__
1778 variable.
1779
1780DISTRO_NAME
1781 The long name of the distribution. For information on the short name
1782 of the distribution, see the ```DISTRO`` <#var-DISTRO>`__ variable.
1783
1784 The ``DISTRO_NAME`` variable corresponds to a distribution
1785 configuration file whose root name is the same as the variable's
1786 argument and whose filename extension is ``.conf``. For example, the
1787 distribution configuration file for the Poky distribution is named
1788 ``poky.conf`` and resides in the ``meta-poky/conf/distro`` directory
1789 of the `Source Directory <#source-directory>`__.
1790
1791 Within that ``poky.conf`` file, the ``DISTRO_NAME`` variable is set
1792 as follows: DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
1793
1794 Distribution configuration files are located in a ``conf/distro``
1795 directory within the `Metadata <#metadata>`__ that contains the
1796 distribution configuration.
1797
1798 .. note::
1799
1800 If the
1801 DISTRO_NAME
1802 variable is blank, a set of default configurations are used, which
1803 are specified within
1804 meta/conf/distro/defaultsetup.conf
1805 also in the Source Directory.
1806
1807DISTRO_VERSION
1808 The version of the distribution.
1809
1810DISTROOVERRIDES
1811 A colon-separated list of overrides specific to the current
1812 distribution. By default, this list includes the value of
1813 ```DISTRO`` <#var-DISTRO>`__.
1814
1815 You can extend ``DISTROOVERRIDES`` to add extra overrides that should
1816 apply to the distribution.
1817
1818 The underlying mechanism behind ``DISTROOVERRIDES`` is simply that it
1819 is included in the default value of
1820 ```OVERRIDES`` <#var-OVERRIDES>`__.
1821
1822DL_DIR
1823 The central download directory used by the build process to store
1824 downloads. By default, ``DL_DIR`` gets files suitable for mirroring
1825 for everything except Git repositories. If you want tarballs of Git
1826 repositories, use the
1827 ```BB_GENERATE_MIRROR_TARBALLS`` <#var-BB_GENERATE_MIRROR_TARBALLS>`__
1828 variable.
1829
1830 You can set this directory by defining the ``DL_DIR`` variable in the
1831 ``conf/local.conf`` file. This directory is self-maintaining and you
1832 should not have to touch it. By default, the directory is
1833 ``downloads`` in the `Build Directory <#build-directory>`__. #DL_DIR
1834 ?= "${TOPDIR}/downloads" To specify a different download directory,
1835 simply remove the comment from the line and provide your directory.
1836
1837 During a first build, the system downloads many different source code
1838 tarballs from various upstream projects. Downloading can take a
1839 while, particularly if your network connection is slow. Tarballs are
1840 all stored in the directory defined by ``DL_DIR`` and the build
1841 system looks there first to find source tarballs.
1842
1843 .. note::
1844
1845 When wiping and rebuilding, you can preserve this directory to
1846 speed up this part of subsequent builds.
1847
1848 You can safely share this directory between multiple builds on the
1849 same development machine. For additional information on how the build
1850 process gets source files when working behind a firewall or proxy
1851 server, see this specific question in the
1852 "`FAQ <#how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server>`__"
1853 chapter. You can also refer to the "`Working Behind a Network
1854 Proxy <&YOCTO_WIKI_URL;/wiki/Working_Behind_a_Network_Proxy>`__" Wiki
1855 page.
1856
1857DOC_COMPRESS
1858 When inheriting the ```compress_doc`` <#ref-classes-compress_doc>`__
1859 class, this variable sets the compression policy used when the
1860 OpenEmbedded build system compresses man pages and info pages. By
1861 default, the compression method used is gz (gzip). Other policies
1862 available are xz and bz2.
1863
1864 For information on policies and on how to use this variable, see the
1865 comments in the ``meta/classes/compress_doc.bbclass`` file.
1866
1867EFI_PROVIDER
1868 When building bootable images (i.e. where ``hddimg``, ``iso``, or
1869 ``wic.vmdk`` is in ```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__), the
1870 ``EFI_PROVIDER`` variable specifies the EFI bootloader to use. The
1871 default is "grub-efi", but "systemd-boot" can be used instead.
1872
1873 See the ```systemd-boot`` <#ref-classes-systemd-boot>`__ and
1874 ```image-live`` <#ref-classes-image-live>`__ classes for more
1875 information.
1876
1877ENABLE_BINARY_LOCALE_GENERATION
1878 Variable that controls which locales for ``glibc`` are generated
1879 during the build (useful if the target device has 64Mbytes of RAM or
1880 less).
1881
1882ERR_REPORT_DIR
1883 When used with the ```report-error`` <#ref-classes-report-error>`__
1884 class, specifies the path used for storing the debug files created by
1885 the `error reporting
1886 tool <&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool>`__, which
1887 allows you to submit build errors you encounter to a central
1888 database. By default, the value of this variable is
1889 ``${``\ ```LOG_DIR`` <#var-LOG_DIR>`__\ ``}/error-report``.
1890
1891 You can set ``ERR_REPORT_DIR`` to the path you want the error
1892 reporting tool to store the debug files as follows in your
1893 ``local.conf`` file: ERR_REPORT_DIR = "path"
1894
1895ERROR_QA
1896 Specifies the quality assurance checks whose failures are reported as
1897 errors by the OpenEmbedded build system. You set this variable in
1898 your distribution configuration file. For a list of the checks you
1899 can control with this variable, see the
1900 "```insane.bbclass`` <#ref-classes-insane>`__" section.
1901
1902EXCLUDE_FROM_SHLIBS
1903 Triggers the OpenEmbedded build system's shared libraries resolver to
1904 exclude an entire package when scanning for shared libraries.
1905
1906 .. note::
1907
1908 The shared libraries resolver's functionality results in part from
1909 the internal function
1910 package_do_shlibs
1911 , which is part of the
1912 do_package
1913 task. You should be aware that the shared libraries resolver might
1914 implicitly define some dependencies between packages.
1915
1916 The ``EXCLUDE_FROM_SHLIBS`` variable is similar to the
1917 ```PRIVATE_LIBS`` <#var-PRIVATE_LIBS>`__ variable, which excludes a
1918 package's particular libraries only and not the whole package.
1919
1920 Use the ``EXCLUDE_FROM_SHLIBS`` variable by setting it to "1" for a
1921 particular package: EXCLUDE_FROM_SHLIBS = "1"
1922
1923EXCLUDE_FROM_WORLD
1924 Directs BitBake to exclude a recipe from world builds (i.e.
1925 ``bitbake world``). During world builds, BitBake locates, parses and
1926 builds all recipes found in every layer exposed in the
1927 ``bblayers.conf`` configuration file.
1928
1929 To exclude a recipe from a world build using this variable, set the
1930 variable to "1" in the recipe.
1931
1932 .. note::
1933
1934 Recipes added to
1935 EXCLUDE_FROM_WORLD
1936 may still be built during a world build in order to satisfy
1937 dependencies of other recipes. Adding a recipe to
1938 EXCLUDE_FROM_WORLD
1939 only ensures that the recipe is not explicitly added to the list
1940 of build targets in a world build.
1941
1942EXTENDPE
1943 Used with file and pathnames to create a prefix for a recipe's
1944 version based on the recipe's ```PE`` <#var-PE>`__ value. If ``PE``
1945 is set and greater than zero for a recipe, ``EXTENDPE`` becomes that
1946 value (e.g if ``PE`` is equal to "1" then ``EXTENDPE`` becomes "1_").
1947 If a recipe's ``PE`` is not set (the default) or is equal to zero,
1948 ``EXTENDPE`` becomes "".
1949
1950 See the ```STAMP`` <#var-STAMP>`__ variable for an example.
1951
1952EXTENDPKGV
1953 The full package version specification as it appears on the final
1954 packages produced by a recipe. The variable's value is normally used
1955 to fix a runtime dependency to the exact same version of another
1956 package in the same recipe: RDEPENDS_${PN}-additional-module = "${PN}
1957 (= ${EXTENDPKGV})"
1958
1959 The dependency relationships are intended to force the package
1960 manager to upgrade these types of packages in lock-step.
1961
1962EXTERNAL_KERNEL_TOOLS
1963 When set, the ``EXTERNAL_KERNEL_TOOLS`` variable indicates that these
1964 tools are not in the source tree.
1965
1966 When kernel tools are available in the tree, they are preferred over
1967 any externally installed tools. Setting the ``EXTERNAL_KERNEL_TOOLS``
1968 variable tells the OpenEmbedded build system to prefer the installed
1969 external tools. See the
1970 ```kernel-yocto`` <#ref-classes-kernel-yocto>`__ class in
1971 ``meta/classes`` to see how the variable is used.
1972
1973EXTERNALSRC
1974 When inheriting the ```externalsrc`` <#ref-classes-externalsrc>`__
1975 class, this variable points to the source tree, which is outside of
1976 the OpenEmbedded build system. When set, this variable sets the
1977 ```S`` <#var-S>`__ variable, which is what the OpenEmbedded build
1978 system uses to locate unpacked recipe source code.
1979
1980 For more information on ``externalsrc.bbclass``, see the
1981 "```externalsrc.bbclass`` <#ref-classes-externalsrc>`__" section. You
1982 can also find information on how to use this variable in the
1983 "`Building Software from an External
1984 Source <&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source>`__"
1985 section in the Yocto Project Development Tasks Manual.
1986
1987EXTERNALSRC_BUILD
1988 When inheriting the ```externalsrc`` <#ref-classes-externalsrc>`__
1989 class, this variable points to the directory in which the recipe's
1990 source code is built, which is outside of the OpenEmbedded build
1991 system. When set, this variable sets the ```B`` <#var-B>`__ variable,
1992 which is what the OpenEmbedded build system uses to locate the Build
1993 Directory.
1994
1995 For more information on ``externalsrc.bbclass``, see the
1996 "```externalsrc.bbclass`` <#ref-classes-externalsrc>`__" section. You
1997 can also find information on how to use this variable in the
1998 "`Building Software from an External
1999 Source <&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source>`__"
2000 section in the Yocto Project Development Tasks Manual.
2001
2002EXTRA_AUTORECONF
2003 For recipes inheriting the ```autotools`` <#ref-classes-autotools>`__
2004 class, you can use ``EXTRA_AUTORECONF`` to specify extra options to
2005 pass to the ``autoreconf`` command that is executed during the
2006 ```do_configure`` <#ref-tasks-configure>`__ task.
2007
2008 The default value is "--exclude=autopoint".
2009
2010EXTRA_IMAGE_FEATURES
2011 A list of additional features to include in an image. When listing
2012 more than one feature, separate them with a space.
2013
2014 Typically, you configure this variable in your ``local.conf`` file,
2015 which is found in the `Build Directory <#build-directory>`__.
2016 Although you can use this variable from within a recipe, best
2017 practices dictate that you do not.
2018
2019 .. note::
2020
2021 To enable primary features from within the image recipe, use the
2022 IMAGE_FEATURES
2023 variable.
2024
2025 Here are some examples of features you can add: "dbg-pkgs" - Adds
2026 -dbg packages for all installed packages including symbol information
2027 for debugging and profiling. "debug-tweaks" - Makes an image suitable
2028 for debugging. For example, allows root logins without passwords and
2029 enables post-installation logging. See the 'allow-empty-password' and
2030 'post-install-logging' features in the "`Image
2031 Features <#ref-features-image>`__" section for more information.
2032 "dev-pkgs" - Adds -dev packages for all installed packages. This is
2033 useful if you want to develop against the libraries in the image.
2034 "read-only-rootfs" - Creates an image whose root filesystem is
2035 read-only. See the "`Creating a Read-Only Root
2036 Filesystem <&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem>`__"
2037 section in the Yocto Project Development Tasks Manual for more
2038 information "tools-debug" - Adds debugging tools such as gdb and
2039 strace. "tools-sdk" - Adds development tools such as gcc, make,
2040 pkgconfig and so forth. "tools-testapps" - Adds useful testing tools
2041 such as ts_print, aplay, arecord and so forth.
2042
2043 For a complete list of image features that ships with the Yocto
2044 Project, see the "`Image Features <#ref-features-image>`__" section.
2045
2046 For an example that shows how to customize your image by using this
2047 variable, see the "`Customizing Images Using Custom
2048 ``IMAGE_FEATURES`` and
2049 ``EXTRA_IMAGE_FEATURES`` <&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-imagefeatures>`__"
2050 section in the Yocto Project Development Tasks Manual.
2051
2052EXTRA_IMAGECMD
2053 Specifies additional options for the image creation command that has
2054 been specified in ```IMAGE_CMD`` <#var-IMAGE_CMD>`__. When setting
2055 this variable, use an override for the associated image type. Here is
2056 an example: EXTRA_IMAGECMD_ext3 ?= "-i 4096"
2057
2058EXTRA_IMAGEDEPENDS
2059 A list of recipes to build that do not provide packages for
2060 installing into the root filesystem.
2061
2062 Sometimes a recipe is required to build the final image but is not
2063 needed in the root filesystem. You can use the ``EXTRA_IMAGEDEPENDS``
2064 variable to list these recipes and thus specify the dependencies. A
2065 typical example is a required bootloader in a machine configuration.
2066
2067 .. note::
2068
2069 To add packages to the root filesystem, see the various
2070 \*
2071 RDEPENDS
2072 and
2073 \*
2074 RRECOMMENDS
2075 variables.
2076
2077EXTRANATIVEPATH
2078 A list of subdirectories of
2079 ``${``\ ```STAGING_BINDIR_NATIVE`` <#var-STAGING_BINDIR_NATIVE>`__\ ``}``
2080 added to the beginning of the environment variable ``PATH``. As an
2081 example, the following prepends
2082 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:" to
2083 ``PATH``: EXTRANATIVEPATH = "foo bar"
2084
2085EXTRA_OECMAKE
2086 Additional `CMake <https://cmake.org/overview/>`__ options. See the
2087 ```cmake`` <#ref-classes-cmake>`__ class for additional information.
2088
2089EXTRA_OECONF
2090 Additional ``configure`` script options. See
2091 ```PACKAGECONFIG_CONFARGS`` <#var-PACKAGECONFIG_CONFARGS>`__ for
2092 additional information on passing configure script options.
2093
2094EXTRA_OEMAKE
2095 Additional GNU ``make`` options.
2096
2097 Because the ``EXTRA_OEMAKE`` defaults to "", you need to set the
2098 variable to specify any required GNU options.
2099
2100 ```PARALLEL_MAKE`` <#var-PARALLEL_MAKE>`__ and
2101 ```PARALLEL_MAKEINST`` <#var-PARALLEL_MAKEINST>`__ also make use of
2102 ``EXTRA_OEMAKE`` to pass the required flags.
2103
2104EXTRA_OESCONS
2105 When inheriting the ```scons`` <#ref-classes-scons>`__ class, this
2106 variable specifies additional configuration options you want to pass
2107 to the ``scons`` command line.
2108
2109EXTRA_USERS_PARAMS
2110 When inheriting the ```extrausers`` <#ref-classes-extrausers>`__
2111 class, this variable provides image level user and group operations.
2112 This is a more global method of providing user and group
2113 configuration as compared to using the
2114 ```useradd`` <#ref-classes-useradd>`__ class, which ties user and
2115 group configurations to a specific recipe.
2116
2117 The set list of commands you can configure using the
2118 ``EXTRA_USERS_PARAMS`` is shown in the ``extrausers`` class. These
2119 commands map to the normal Unix commands of the same names: #
2120 EXTRA_USERS_PARAMS = "\\ # useradd -p '' tester; \\ # groupadd
2121 developers; \\ # userdel nobody; \\ # groupdel -g video; \\ #
2122 groupmod -g 1020 developers; \\ # usermod -s /bin/sh tester; \\ # "
2123
2124FEATURE_PACKAGES
2125 Defines one or more packages to include in an image when a specific
2126 item is included in ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__.
2127 When setting the value, ``FEATURE_PACKAGES`` should have the name of
2128 the feature item as an override. Here is an example:
2129 FEATURE_PACKAGES_widget = "package1 package2"
2130
2131 In this example, if "widget" were added to ``IMAGE_FEATURES``,
2132 package1 and package2 would be included in the image.
2133
2134 .. note::
2135
2136 Packages installed by features defined through
2137 FEATURE_PACKAGES
2138 are often package groups. While similarly named, you should not
2139 confuse the
2140 FEATURE_PACKAGES
2141 variable with package groups, which are discussed elsewhere in the
2142 documentation.
2143
2144FEED_DEPLOYDIR_BASE_URI
2145 Points to the base URL of the server and location within the
2146 document-root that provides the metadata and packages required by
2147 OPKG to support runtime package management of IPK packages. You set
2148 this variable in your ``local.conf`` file.
2149
2150 Consider the following example: FEED_DEPLOYDIR_BASE_URI =
2151 "http://192.168.7.1/BOARD-dir" This example assumes you are serving
2152 your packages over HTTP and your databases are located in a directory
2153 named ``BOARD-dir``, which is underneath your HTTP server's
2154 document-root. In this case, the OpenEmbedded build system generates
2155 a set of configuration files for you in your target that work with
2156 the feed.
2157
2158FILES
2159 The list of files and directories that are placed in a package. The
2160 ```PACKAGES`` <#var-PACKAGES>`__ variable lists the packages
2161 generated by a recipe.
2162
2163 To use the ``FILES`` variable, provide a package name override that
2164 identifies the resulting package. Then, provide a space-separated
2165 list of files or paths that identify the files you want included as
2166 part of the resulting package. Here is an example: FILES_${PN} +=
2167 "${bindir}/mydir1 ${bindir}/mydir2/myfile"
2168
2169 .. note::
2170
2171 - When specifying files or paths, you can pattern match using
2172 Python's
2173 ```glob`` <https://docs.python.org/2/library/glob.html>`__
2174 syntax. For details on the syntax, see the documentation by
2175 following the previous link.
2176
2177 - When specifying paths as part of the ``FILES`` variable, it is
2178 good practice to use appropriate path variables. For example,
2179 use ``${sysconfdir}`` rather than ``/etc``, or ``${bindir}``
2180 rather than ``/usr/bin``. You can find a list of these
2181 variables at the top of the ``meta/conf/bitbake.conf`` file in
2182 the `Source Directory <#source-directory>`__. You will also
2183 find the default values of the various ``FILES_*`` variables in
2184 this file.
2185
2186 If some of the files you provide with the ``FILES`` variable are
2187 editable and you know they should not be overwritten during the
2188 package update process by the Package Management System (PMS), you
2189 can identify these files so that the PMS will not overwrite them. See
2190 the ```CONFFILES`` <#var-CONFFILES>`__ variable for information on
2191 how to identify these files to the PMS.
2192
2193FILES_SOLIBSDEV
2194 Defines the file specification to match
2195 ```SOLIBSDEV`` <#var-SOLIBSDEV>`__. In other words,
2196 ``FILES_SOLIBSDEV`` defines the full path name of the development
2197 symbolic link (symlink) for shared libraries on the target platform.
2198
2199 The following statement from the ``bitbake.conf`` shows how it is
2200 set: FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV}
2201 ${libdir}/lib*${SOLIBSDEV}"
2202
2203FILESEXTRAPATHS
2204 Extends the search path the OpenEmbedded build system uses when
2205 looking for files and patches as it processes recipes and append
2206 files. The default directories BitBake uses when it processes recipes
2207 are initially defined by the ```FILESPATH`` <#var-FILESPATH>`__
2208 variable. You can extend ``FILESPATH`` variable by using
2209 ``FILESEXTRAPATHS``.
2210
2211 Best practices dictate that you accomplish this by using
2212 ``FILESEXTRAPATHS`` from within a ``.bbappend`` file and that you
2213 prepend paths as follows: FILESEXTRAPATHS_prepend :=
2214 "${THISDIR}/${PN}:" In the above example, the build system first
2215 looks for files in a directory that has the same name as the
2216 corresponding append file.
2217
2218 .. note::
2219
2220 When extending ``FILESEXTRAPATHS``, be sure to use the immediate
2221 expansion (``:=``) operator. Immediate expansion makes sure that
2222 BitBake evaluates ```THISDIR`` <#var-THISDIR>`__ at the time the
2223 directive is encountered rather than at some later time when
2224 expansion might result in a directory that does not contain the
2225 files you need.
2226
2227 Also, include the trailing separating colon character if you are
2228 prepending. The trailing colon character is necessary because you
2229 are directing BitBake to extend the path by prepending directories
2230 to the search path.
2231
2232 Here is another common use: FILESEXTRAPATHS_prepend :=
2233 "${THISDIR}/files:" In this example, the build system extends the
2234 ``FILESPATH`` variable to include a directory named ``files`` that is
2235 in the same directory as the corresponding append file.
2236
2237 This next example specifically adds three paths:
2238 FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:"
2239
2240 A final example shows how you can extend the search path and include
2241 a ```MACHINE`` <#var-MACHINE>`__-specific override, which is useful
2242 in a BSP layer: FILESEXTRAPATHS_prepend_intel-x86-common :=
2243 "${THISDIR}/${PN}:" The previous statement appears in the
2244 ``linux-yocto-dev.bbappend`` file, which is found in the Yocto
2245 Project `Source
2246 Repositories <&YOCTO_DOCS_OM_URL;#source-repositories>`__ in
2247 ``meta-intel/common/recipes-kernel/linux``. Here, the machine
2248 override is a special ```PACKAGE_ARCH`` <#var-PACKAGE_ARCH>`__
2249 definition for multiple ``meta-intel`` machines.
2250
2251 .. note::
2252
2253 For a layer that supports a single BSP, the override could just be
2254 the value of
2255 MACHINE
2256 .
2257
2258 By prepending paths in ``.bbappend`` files, you allow multiple append
2259 files that reside in different layers but are used for the same
2260 recipe to correctly extend the path.
2261
2262FILESOVERRIDES
2263 A subset of ```OVERRIDES`` <#var-OVERRIDES>`__ used by the
2264 OpenEmbedded build system for creating
2265 ```FILESPATH`` <#var-FILESPATH>`__. The ``FILESOVERRIDES`` variable
2266 uses overrides to automatically extend the
2267 ```FILESPATH`` <#var-FILESPATH>`__ variable. For an example of how
2268 that works, see the ```FILESPATH`` <#var-FILESPATH>`__ variable
2269 description. Additionally, you find more information on how overrides
2270 are handled in the "`Conditional Syntax
2271 (Overrides) <&YOCTO_DOCS_BB_URL;#conditional-syntax-overrides>`__"
2272 section of the BitBake User Manual.
2273
2274 By default, the ``FILESOVERRIDES`` variable is defined as:
2275 FILESOVERRIDES =
2276 "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2277
2278 .. note::
2279
2280 Do not hand-edit the
2281 FILESOVERRIDES
2282 variable. The values match up with expected overrides and are used
2283 in an expected manner by the build system.
2284
2285FILESPATH
2286 The default set of directories the OpenEmbedded build system uses
2287 when searching for patches and files.
2288
2289 During the build process, BitBake searches each directory in
2290 ``FILESPATH`` in the specified order when looking for files and
2291 patches specified by each ``file://`` URI in a recipe's
2292 ```SRC_URI`` <#var-SRC_URI>`__ statements.
2293
2294 The default value for the ``FILESPATH`` variable is defined in the
2295 ``base.bbclass`` class found in ``meta/classes`` in the `Source
2296 Directory <#source-directory>`__: FILESPATH =
2297 "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \\
2298 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}" The
2299 ``FILESPATH`` variable is automatically extended using the overrides
2300 from the ```FILESOVERRIDES`` <#var-FILESOVERRIDES>`__ variable.
2301
2302 .. note::
2303
2304 - Do not hand-edit the ``FILESPATH`` variable. If you want the
2305 build system to look in directories other than the defaults,
2306 extend the ``FILESPATH`` variable by using the
2307 ```FILESEXTRAPATHS`` <#var-FILESEXTRAPATHS>`__ variable.
2308
2309 - Be aware that the default ``FILESPATH`` directories do not map
2310 to directories in custom layers where append files
2311 (``.bbappend``) are used. If you want the build system to find
2312 patches or files that reside with your append files, you need
2313 to extend the ``FILESPATH`` variable by using the
2314 ``FILESEXTRAPATHS`` variable.
2315
2316 You can take advantage of this searching behavior in useful ways. For
2317 example, consider a case where the following directory structure
2318 exists for general and machine-specific configurations:
2319 files/defconfig files/MACHINEA/defconfig files/MACHINEB/defconfig
2320 Also in the example, the ``SRC_URI`` statement contains
2321 "file://defconfig". Given this scenario, you can set
2322 ```MACHINE`` <#var-MACHINE>`__ to "MACHINEA" and cause the build
2323 system to use files from ``files/MACHINEA``. Set ``MACHINE`` to
2324 "MACHINEB" and the build system uses files from ``files/MACHINEB``.
2325 Finally, for any machine other than "MACHINEA" and "MACHINEB", the
2326 build system uses files from ``files/defconfig``.
2327
2328 You can find out more about the patching process in the
2329 "`Patching <&YOCTO_DOCS_OM_URL;#patching-dev-environment>`__" section
2330 in the Yocto Project Overview and Concepts Manual and the "`Patching
2331 Code <&YOCTO_DOCS_DEV_URL;#new-recipe-patching-code>`__" section in
2332 the Yocto Project Development Tasks Manual. See the
2333 ```do_patch`` <#ref-tasks-patch>`__ task as well.
2334
2335FILESYSTEM_PERMS_TABLES
2336 Allows you to define your own file permissions settings table as part
2337 of your configuration for the packaging process. For example, suppose
2338 you need a consistent set of custom permissions for a set of groups
2339 and users across an entire work project. It is best to do this in the
2340 packages themselves but this is not always possible.
2341
2342 By default, the OpenEmbedded build system uses the ``fs-perms.txt``,
2343 which is located in the ``meta/files`` folder in the `Source
2344 Directory <#source-directory>`__. If you create your own file
2345 permissions setting table, you should place it in your layer or the
2346 distro's layer.
2347
2348 You define the ``FILESYSTEM_PERMS_TABLES`` variable in the
2349 ``conf/local.conf`` file, which is found in the `Build
2350 Directory <#build-directory>`__, to point to your custom
2351 ``fs-perms.txt``. You can specify more than a single file permissions
2352 setting table. The paths you specify to these files must be defined
2353 within the ```BBPATH`` <#var-BBPATH>`__ variable.
2354
2355 For guidance on how to create your own file permissions settings
2356 table file, examine the existing ``fs-perms.txt``.
2357
2358FIT_HASH_ALG
2359 Specifies the hash algorithm used in creating the FIT Image. For e.g. sha256.
2360
2361FIT_SIGN_ALG</glossterm>
2362 Specifies the signature algorithm used in creating the FIT Image.
2363 For e.g. rsa2048.
2364
2365FONT_EXTRA_RDEPENDS
2366 When inheriting the ```fontcache`` <#ref-classes-fontcache>`__ class,
2367 this variable specifies the runtime dependencies for font packages.
2368 By default, the ``FONT_EXTRA_RDEPENDS`` is set to "fontconfig-utils".
2369
2370FONT_PACKAGES
2371 When inheriting the ```fontcache`` <#ref-classes-fontcache>`__ class,
2372 this variable identifies packages containing font files that need to
2373 be cached by Fontconfig. By default, the ``fontcache`` class assumes
2374 that fonts are in the recipe's main package (i.e.
2375 ``${``\ ```PN`` <#var-PN>`__\ ``}``). Use this variable if fonts you
2376 need are in a package other than that main package.
2377
2378FORCE_RO_REMOVE
2379 Forces the removal of the packages listed in ``ROOTFS_RO_UNNEEDED``
2380 during the generation of the root filesystem.
2381
2382 Set the variable to "1" to force the removal of these packages.
2383
2384FULL_OPTIMIZATION
2385 The options to pass in ``TARGET_CFLAGS`` and ``CFLAGS`` when
2386 compiling an optimized system. This variable defaults to "-O2 -pipe
2387 ${DEBUG_FLAGS}".
2388
2389GCCPIE
2390 Enables Position Independent Executables (PIE) within the GNU C
2391 Compiler (GCC). Enabling PIE in the GCC makes Return Oriented
2392 Programming (ROP) attacks much more difficult to execute.
2393
2394 By default the ``security_flags.inc`` file enables PIE by setting the
2395 variable as follows: GCCPIE ?= "--enable-default-pie"
2396
2397GCCVERSION
2398 Specifies the default version of the GNU C Compiler (GCC) used for
2399 compilation. By default, ``GCCVERSION`` is set to "8.x" in the
2400 ``meta/conf/distro/include/tcmode-default.inc`` include file:
2401 GCCVERSION ?= "8.%" You can override this value by setting it in a
2402 configuration file such as the ``local.conf``.
2403
2404GDB
2405 The minimal command and arguments to run the GNU Debugger.
2406
2407GITDIR
2408 The directory in which a local copy of a Git repository is stored
2409 when it is cloned.
2410
2411GLIBC_GENERATE_LOCALES
2412 Specifies the list of GLIBC locales to generate should you not wish
2413 to generate all LIBC locals, which can be time consuming.
2414
2415 .. note::
2416
2417 If you specifically remove the locale
2418 en_US.UTF-8
2419 , you must set
2420 IMAGE_LINGUAS
2421 appropriately.
2422
2423 You can set ``GLIBC_GENERATE_LOCALES`` in your ``local.conf`` file.
2424 By default, all locales are generated. GLIBC_GENERATE_LOCALES =
2425 "en_GB.UTF-8 en_US.UTF-8"
2426
2427GROUPADD_PARAM
2428 When inheriting the ```useradd`` <#ref-classes-useradd>`__ class,
2429 this variable specifies for a package what parameters should be
2430 passed to the ``groupadd`` command if you wish to add a group to the
2431 system when the package is installed.
2432
2433 Here is an example from the ``dbus`` recipe: GROUPADD_PARAM_${PN} =
2434 "-r netdev" For information on the standard Linux shell command
2435 ``groupadd``, see ` <http://linux.die.net/man/8/groupadd>`__.
2436
2437GROUPMEMS_PARAM
2438 When inheriting the ```useradd`` <#ref-classes-useradd>`__ class,
2439 this variable specifies for a package what parameters should be
2440 passed to the ``groupmems`` command if you wish to modify the members
2441 of a group when the package is installed.
2442
2443 For information on the standard Linux shell command ``groupmems``,
2444 see ` <http://linux.die.net/man/8/groupmems>`__.
2445
2446GRUB_GFXSERIAL
2447 Configures the GNU GRand Unified Bootloader (GRUB) to have graphics
2448 and serial in the boot menu. Set this variable to "1" in your
2449 ``local.conf`` or distribution configuration file to enable graphics
2450 and serial in the menu.
2451
2452 See the ```grub-efi`` <#ref-classes-grub-efi>`__ class for more
2453 information on how this variable is used.
2454
2455GRUB_OPTS
2456 Additional options to add to the GNU GRand Unified Bootloader (GRUB)
2457 configuration. Use a semi-colon character (``;``) to separate
2458 multiple options.
2459
2460 The ``GRUB_OPTS`` variable is optional. See the
2461 ```grub-efi`` <#ref-classes-grub-efi>`__ class for more information
2462 on how this variable is used.
2463
2464GRUB_TIMEOUT
2465 Specifies the timeout before executing the default ``LABEL`` in the
2466 GNU GRand Unified Bootloader (GRUB).
2467
2468 The ``GRUB_TIMEOUT`` variable is optional. See the
2469 ```grub-efi`` <#ref-classes-grub-efi>`__ class for more information
2470 on how this variable is used.
2471
2472GTKIMMODULES_PACKAGES
2473 When inheriting the
2474 ```gtk-immodules-cache`` <#ref-classes-gtk-immodules-cache>`__ class,
2475 this variable specifies the packages that contain the GTK+ input
2476 method modules being installed when the modules are in packages other
2477 than the main package.
2478
2479HOMEPAGE
2480 Website where more information about the software the recipe is
2481 building can be found.
2482
2483HOST_ARCH
2484 The name of the target architecture, which is normally the same as
2485 ```TARGET_ARCH`` <#var-TARGET_ARCH>`__. The OpenEmbedded build system
2486 supports many architectures. Here is an example list of architectures
2487 supported. This list is by no means complete as the architecture is
2488 configurable: arm i586 x86_64 powerpc powerpc64 mips mipsel
2489
2490HOST_CC_ARCH
2491 Specifies architecture-specific compiler flags that are passed to the
2492 C compiler.
2493
2494 Default initialization for ``HOST_CC_ARCH`` varies depending on what
2495 is being built:
2496
2497 - ```TARGET_CC_ARCH`` <#var-TARGET_CC_ARCH>`__ when building for the
2498 target
2499
2500 - ``BUILD_CC_ARCH`` when building for the build host (i.e.
2501 ``-native``)
2502
2503 - ``BUILDSDK_CC_ARCH`` when building for an SDK (i.e.
2504 ``nativesdk-``)
2505
2506HOST_OS
2507 Specifies the name of the target operating system, which is normally
2508 the same as the ```TARGET_OS`` <#var-TARGET_OS>`__. The variable can
2509 be set to "linux" for ``glibc``-based systems and to "linux-musl" for
2510 ``musl``. For ARM/EABI targets, there are also "linux-gnueabi" and
2511 "linux-musleabi" values possible.
2512
2513HOST_PREFIX
2514 Specifies the prefix for the cross-compile toolchain. ``HOST_PREFIX``
2515 is normally the same as ```TARGET_PREFIX`` <#var-TARGET_PREFIX>`__.
2516
2517HOST_SYS
2518 Specifies the system, including the architecture and the operating
2519 system, for which the build is occurring in the context of the
2520 current recipe.
2521
2522 The OpenEmbedded build system automatically sets this variable based
2523 on ```HOST_ARCH`` <#var-HOST_ARCH>`__,
2524 ```HOST_VENDOR`` <#var-HOST_VENDOR>`__, and
2525 ```HOST_OS`` <#var-HOST_OS>`__ variables.
2526
2527 .. note::
2528
2529 You do not need to set the variable yourself.
2530
2531 Consider these two examples:
2532
2533 - Given a native recipe on a 32-bit x86 machine running Linux, the
2534 value is "i686-linux".
2535
2536 - Given a recipe being built for a little-endian MIPS target running
2537 Linux, the value might be "mipsel-linux".
2538
2539HOSTTOOLS
2540 A space-separated list (filter) of tools on the build host that
2541 should be allowed to be called from within build tasks. Using this
2542 filter helps reduce the possibility of host contamination. If a tool
2543 specified in the value of ``HOSTTOOLS`` is not found on the build
2544 host, the OpenEmbedded build system produces an error and the build
2545 is not started.
2546
2547 For additional information, see
2548 ```HOSTTOOLS_NONFATAL`` <#var-HOSTTOOLS_NONFATAL>`__.
2549
2550HOSTTOOLS_NONFATAL
2551 A space-separated list (filter) of tools on the build host that
2552 should be allowed to be called from within build tasks. Using this
2553 filter helps reduce the possibility of host contamination. Unlike
2554 ```HOSTTOOLS`` <#var-HOSTTOOLS>`__, the OpenEmbedded build system
2555 does not produce an error if a tool specified in the value of
2556 ``HOSTTOOLS_NONFATAL`` is not found on the build host. Thus, you can
2557 use ``HOSTTOOLS_NONFATAL`` to filter optional host tools.
2558
2559HOST_VENDOR
2560 Specifies the name of the vendor. ``HOST_VENDOR`` is normally the
2561 same as ```TARGET_VENDOR`` <#var-TARGET_VENDOR>`__.
2562
2563ICECC_DISABLED
2564 Disables or enables the ``icecc`` (Icecream) function. For more
2565 information on this function and best practices for using this
2566 variable, see the "```icecc.bbclass`` <#ref-classes-icecc>`__"
2567 section.
2568
2569 Setting this variable to "1" in your ``local.conf`` disables the
2570 function: ICECC_DISABLED ??= "1" To enable the function, set the
2571 variable as follows: ICECC_DISABLED = ""
2572
2573ICECC_ENV_EXEC
2574 Points to the ``icecc-create-env`` script that you provide. This
2575 variable is used by the ```icecc`` <#ref-classes-icecc>`__ class. You
2576 set this variable in your ``local.conf`` file.
2577
2578 If you do not point to a script that you provide, the OpenEmbedded
2579 build system uses the default script provided by the
2580 ``icecc-create-env.bb`` recipe, which is a modified version and not
2581 the one that comes with ``icecc``.
2582
2583ICECC_PARALLEL_MAKE
2584 Extra options passed to the ``make`` command during the
2585 ```do_compile`` <#ref-tasks-compile>`__ task that specify parallel
2586 compilation. This variable usually takes the form of "-j x", where x
2587 represents the maximum number of parallel threads ``make`` can run.
2588
2589 .. note::
2590
2591 The options passed affect builds on all enabled machines on the
2592 network, which are machines running the
2593 iceccd
2594 daemon.
2595
2596 If your enabled machines support multiple cores, coming up with the
2597 maximum number of parallel threads that gives you the best
2598 performance could take some experimentation since machine speed,
2599 network lag, available memory, and existing machine loads can all
2600 affect build time. Consequently, unlike the
2601 ```PARALLEL_MAKE`` <#var-PARALLEL_MAKE>`__ variable, there is no
2602 rule-of-thumb for setting ``ICECC_PARALLEL_MAKE`` to achieve optimal
2603 performance.
2604
2605 If you do not set ``ICECC_PARALLEL_MAKE``, the build system does not
2606 use it (i.e. the system does not detect and assign the number of
2607 cores as is done with ``PARALLEL_MAKE``).
2608
2609ICECC_PATH
2610 The location of the ``icecc`` binary. You can set this variable in
2611 your ``local.conf`` file. If your ``local.conf`` file does not define
2612 this variable, the ```icecc`` <#ref-classes-icecc>`__ class attempts
2613 to define it by locating ``icecc`` using ``which``.
2614
2615ICECC_USER_CLASS_BL
2616 Identifies user classes that you do not want the Icecream distributed
2617 compile support to consider. This variable is used by the
2618 ```icecc`` <#ref-classes-icecc>`__ class. You set this variable in
2619 your ``local.conf`` file.
2620
2621 When you list classes using this variable, you are "blacklisting"
2622 them from distributed compilation across remote hosts. Any classes
2623 you list will be distributed and compiled locally.
2624
2625ICECC_USER_PACKAGE_BL
2626 Identifies user recipes that you do not want the Icecream distributed
2627 compile support to consider. This variable is used by the
2628 ```icecc`` <#ref-classes-icecc>`__ class. You set this variable in
2629 your ``local.conf`` file.
2630
2631 When you list packages using this variable, you are "blacklisting"
2632 them from distributed compilation across remote hosts. Any packages
2633 you list will be distributed and compiled locally.
2634
2635ICECC_USER_PACKAGE_WL
2636 Identifies user recipes that use an empty
2637 ```PARALLEL_MAKE`` <#var-PARALLEL_MAKE>`__ variable that you want to
2638 force remote distributed compilation on using the Icecream
2639 distributed compile support. This variable is used by the
2640 ```icecc`` <#ref-classes-icecc>`__ class. You set this variable in
2641 your ``local.conf`` file.
2642
2643IMAGE_BASENAME
2644 The base name of image output files. This variable defaults to the
2645 recipe name (``${``\ ```PN`` <#var-PN>`__\ ``}``).
2646
2647IMAGE_BOOT_FILES
2648 A space-separated list of files installed into the boot partition
2649 when preparing an image using the Wic tool with the
2650 ``bootimg-partition`` or ``bootimg-efi`` source plugin. By default,
2651 the files are
2652 installed under the same name as the source files. To change the
2653 installed name, separate it from the original name with a semi-colon
2654 (;). Source files need to be located in
2655 ```DEPLOY_DIR_IMAGE`` <#var-DEPLOY_DIR_IMAGE>`__. Here are two
2656 examples: IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
2657 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
2658
2659 Alternatively, source files can be picked up using a glob pattern. In
2660 this case, the destination file must have the same name as the base
2661 name of the source file path. To install files into a directory
2662 within the target location, pass its name after a semi-colon (;).
2663 Here are two examples: IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
2664 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/" The first example
2665 installs all files from ``${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles``
2666 into the root of the target partition. The second example installs
2667 the same files into a ``boot`` directory within the target partition.
2668
2669 You can find information on how to use the Wic tool in the "`Creating
2670 Partitioned Images Using
2671 Wic <&YOCTO_DOCS_DEV_URL;#creating-partitioned-images-using-wic>`__"
2672 section of the Yocto Project Development Tasks Manual. Reference
2673 material for Wic is located in the "`OpenEmbedded Kickstart (.wks)
2674 Reference <&YOCTO_DOCS_REF_URL;#ref-kickstart>`__" chapter.
2675
2676IMAGE_CLASSES
2677 A list of classes that all images should inherit. You typically use
2678 this variable to specify the list of classes that register the
2679 different types of images the OpenEmbedded build system creates.
2680
2681 The default value for ``IMAGE_CLASSES`` is ``image_types``. You can
2682 set this variable in your ``local.conf`` or in a distribution
2683 configuration file.
2684
2685 For more information, see ``meta/classes/image_types.bbclass`` in the
2686 `Source Directory <#source-directory>`__.
2687
2688IMAGE_CMD
2689 Specifies the command to create the image file for a specific image
2690 type, which corresponds to the value set set in
2691 ```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__, (e.g. ``ext3``,
2692 ``btrfs``, and so forth). When setting this variable, you should use
2693 an override for the associated type. Here is an example:
2694 IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} \\ --faketime
2695 --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \\
2696 ${EXTRA_IMAGECMD}"
2697
2698 You typically do not need to set this variable unless you are adding
2699 support for a new image type. For more examples on how to set this
2700 variable, see the ```image_types`` <#ref-classes-image_types>`__
2701 class file, which is ``meta/classes/image_types.bbclass``.
2702
2703IMAGE_DEVICE_TABLES
2704 Specifies one or more files that contain custom device tables that
2705 are passed to the ``makedevs`` command as part of creating an image.
2706 These files list basic device nodes that should be created under
2707 ``/dev`` within the image. If ``IMAGE_DEVICE_TABLES`` is not set,
2708 ``files/device_table-minimal.txt`` is used, which is located by
2709 ```BBPATH`` <#var-BBPATH>`__. For details on how you should write
2710 device table files, see ``meta/files/device_table-minimal.txt`` as an
2711 example.
2712
2713IMAGE_FEATURES
2714 The primary list of features to include in an image. Typically, you
2715 configure this variable in an image recipe. Although you can use this
2716 variable from your ``local.conf`` file, which is found in the `Build
2717 Directory <#build-directory>`__, best practices dictate that you do
2718 not.
2719
2720 .. note::
2721
2722 To enable extra features from outside the image recipe, use the
2723 EXTRA_IMAGE_FEATURES
2724 variable.
2725
2726 For a list of image features that ships with the Yocto Project, see
2727 the "`Image Features <#ref-features-image>`__" section.
2728
2729 For an example that shows how to customize your image by using this
2730 variable, see the "`Customizing Images Using Custom
2731 ``IMAGE_FEATURES`` and
2732 ``EXTRA_IMAGE_FEATURES`` <&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-imagefeatures>`__"
2733 section in the Yocto Project Development Tasks Manual.
2734
2735IMAGE_FSTYPES
2736 Specifies the formats the OpenEmbedded build system uses during the
2737 build when creating the root filesystem. For example, setting
2738 ``IMAGE_FSTYPES`` as follows causes the build system to create root
2739 filesystems using two formats: ``.ext3`` and ``.tar.bz2``:
2740 IMAGE_FSTYPES = "ext3 tar.bz2"
2741
2742 For the complete list of supported image formats from which you can
2743 choose, see ```IMAGE_TYPES`` <#var-IMAGE_TYPES>`__.
2744
2745 .. note::
2746
2747 - If an image recipe uses the "inherit image" line and you are
2748 setting ``IMAGE_FSTYPES`` inside the recipe, you must set
2749 ``IMAGE_FSTYPES`` prior to using the "inherit image" line.
2750
2751 - Due to the way the OpenEmbedded build system processes this
2752 variable, you cannot update its contents by using ``_append``
2753 or ``_prepend``. You must use the ``+=`` operator to add one or
2754 more options to the ``IMAGE_FSTYPES`` variable.
2755
2756IMAGE_INSTALL
2757 Used by recipes to specify the packages to install into an image
2758 through the ```image`` <#ref-classes-image>`__ class. Use the
2759 ``IMAGE_INSTALL`` variable with care to avoid ordering issues.
2760
2761 Image recipes set ``IMAGE_INSTALL`` to specify the packages to
2762 install into an image through ``image.bbclass``. Additionally,
2763 "helper" classes such as the
2764 ```core-image`` <#ref-classes-core-image>`__ class exist that can
2765 take lists used with ``IMAGE_FEATURES`` and turn them into
2766 auto-generated entries in ``IMAGE_INSTALL`` in addition to its
2767 default contents.
2768
2769 When you use this variable, it is best to use it as follows:
2770 IMAGE_INSTALL_append = " package-name" Be sure to include the space
2771 between the quotation character and the start of the package name or
2772 names.
2773
2774 .. note::
2775
2776 - When working with a
2777 ```core-image-minimal-initramfs`` <#images-core-image-minimal-initramfs>`__
2778 image, do not use the ``IMAGE_INSTALL`` variable to specify
2779 packages for installation. Instead, use the
2780 ```PACKAGE_INSTALL`` <#var-PACKAGE_INSTALL>`__ variable, which
2781 allows the initial RAM filesystem (initramfs) recipe to use a
2782 fixed set of packages and not be affected by ``IMAGE_INSTALL``.
2783 For information on creating an initramfs, see the "`Building an
2784 Initial RAM Filesystem (initramfs)
2785 Image <&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image>`__"
2786 section in the Yocto Project Development Tasks Manual.
2787
2788 - Using ``IMAGE_INSTALL`` with the
2789 ```+=`` <&YOCTO_DOCS_BB_URL;#appending-and-prepending>`__
2790 BitBake operator within the ``/conf/local.conf`` file or from
2791 within an image recipe is not recommended. Use of this operator
2792 in these ways can cause ordering issues. Since
2793 ``core-image.bbclass`` sets ``IMAGE_INSTALL`` to a default
2794 value using the
2795 ```?=`` <&YOCTO_DOCS_BB_URL;#setting-a-default-value>`__
2796 operator, using a ``+=`` operation against ``IMAGE_INSTALL``
2797 results in unexpected behavior when used within
2798 ``conf/local.conf``. Furthermore, the same operation from
2799 within an image recipe may or may not succeed depending on the
2800 specific situation. In both these cases, the behavior is
2801 contrary to how most users expect the ``+=`` operator to work.
2802
2803IMAGE_LINGUAS
2804 Specifies the list of locales to install into the image during the
2805 root filesystem construction process. The OpenEmbedded build system
2806 automatically splits locale files, which are used for localization,
2807 into separate packages. Setting the ``IMAGE_LINGUAS`` variable
2808 ensures that any locale packages that correspond to packages already
2809 selected for installation into the image are also installed. Here is
2810 an example: IMAGE_LINGUAS = "pt-br de-de"
2811
2812 In this example, the build system ensures any Brazilian Portuguese
2813 and German locale files that correspond to packages in the image are
2814 installed (i.e. ``*-locale-pt-br`` and ``*-locale-de-de`` as well as
2815 ``*-locale-pt`` and ``*-locale-de``, since some software packages
2816 only provide locale files by language and not by country-specific
2817 language).
2818
2819 See the ```GLIBC_GENERATE_LOCALES`` <#var-GLIBC_GENERATE_LOCALES>`__
2820 variable for information on generating GLIBC locales.
2821
2822IMAGE_MANIFEST
2823 The manifest file for the image. This file lists all the installed
2824 packages that make up the image. The file contains package
2825 information on a line-per-package basis as follows: packagename
2826 packagearch version
2827
2828 The ```image`` <#ref-classes-image>`__ class defines the manifest
2829 file as follows: IMAGE_MANIFEST =
2830 "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest" The location is
2831 derived using the ```DEPLOY_DIR_IMAGE`` <#var-DEPLOY_DIR_IMAGE>`__
2832 and ```IMAGE_NAME`` <#var-IMAGE_NAME>`__ variables. You can find
2833 information on how the image is created in the "`Image
2834 Generation <&YOCTO_DOCS_OM_URL;#image-generation-dev-environment>`__"
2835 section in the Yocto Project Overview and Concepts Manual.
2836
2837IMAGE_NAME
2838 The name of the output image files minus the extension. This variable
2839 is derived using the ```IMAGE_BASENAME`` <#var-IMAGE_BASENAME>`__,
2840 ```MACHINE`` <#var-MACHINE>`__, and ```DATETIME`` <#var-DATETIME>`__
2841 variables: IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
2842
2843IMAGE_OVERHEAD_FACTOR
2844 Defines a multiplier that the build system applies to the initial
2845 image size for cases when the multiplier times the returned disk
2846 usage value for the image is greater than the sum of
2847 ``IMAGE_ROOTFS_SIZE`` and ``IMAGE_ROOTFS_EXTRA_SPACE``. The result of
2848 the multiplier applied to the initial image size creates free disk
2849 space in the image as overhead. By default, the build process uses a
2850 multiplier of 1.3 for this variable. This default value results in
2851 30% free disk space added to the image when this method is used to
2852 determine the final generated image size. You should be aware that
2853 post install scripts and the package management system uses disk
2854 space inside this overhead area. Consequently, the multiplier does
2855 not produce an image with all the theoretical free disk space. See
2856 ``IMAGE_ROOTFS_SIZE`` for information on how the build system
2857 determines the overall image size.
2858
2859 The default 30% free disk space typically gives the image enough room
2860 to boot and allows for basic post installs while still leaving a
2861 small amount of free disk space. If 30% free space is inadequate, you
2862 can increase the default value. For example, the following setting
2863 gives you 50% free space added to the image: IMAGE_OVERHEAD_FACTOR =
2864 "1.5"
2865
2866 Alternatively, you can ensure a specific amount of free disk space is
2867 added to the image by using the ``IMAGE_ROOTFS_EXTRA_SPACE``
2868 variable.
2869
2870IMAGE_PKGTYPE
2871 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the
2872 OpenEmbedded build system. The variable is defined appropriately by
2873 the ```package_deb`` <#ref-classes-package_deb>`__,
2874 ```package_rpm`` <#ref-classes-package_rpm>`__,
2875 ```package_ipk`` <#ref-classes-package_ipk>`__, or
2876 ```package_tar`` <#ref-classes-package_tar>`__ class.
2877
2878 .. note::
2879
2880 The
2881 package_tar
2882 class is broken and is not supported. It is recommended that you
2883 do not use it.
2884
2885 The ```populate_sdk_*`` <#ref-classes-populate-sdk-*>`__ and
2886 ```image`` <#ref-classes-image>`__ classes use the ``IMAGE_PKGTYPE``
2887 for packaging up images and SDKs.
2888
2889 You should not set the ``IMAGE_PKGTYPE`` manually. Rather, the
2890 variable is set indirectly through the appropriate
2891 ```package_*`` <#ref-classes-package>`__ class using the
2892 ```PACKAGE_CLASSES`` <#var-PACKAGE_CLASSES>`__ variable. The
2893 OpenEmbedded build system uses the first package type (e.g. DEB, RPM,
2894 or IPK) that appears with the variable
2895
2896 .. note::
2897
2898 Files using the
2899 .tar
2900 format are never used as a substitute packaging format for DEB,
2901 RPM, and IPK formatted files for your image or SDK.
2902
2903IMAGE_POSTPROCESS_COMMAND
2904 Specifies a list of functions to call once the OpenEmbedded build
2905 system creates the final image output files. You can specify
2906 functions separated by semicolons: IMAGE_POSTPROCESS_COMMAND +=
2907 "function; ... "
2908
2909 If you need to pass the root filesystem path to a command within the
2910 function, you can use ``${IMAGE_ROOTFS}``, which points to the
2911 directory that becomes the root filesystem image. See the
2912 ```IMAGE_ROOTFS`` <#var-IMAGE_ROOTFS>`__ variable for more
2913 information.
2914
2915IMAGE_PREPROCESS_COMMAND
2916 Specifies a list of functions to call before the OpenEmbedded build
2917 system creates the final image output files. You can specify
2918 functions separated by semicolons: IMAGE_PREPROCESS_COMMAND +=
2919 "function; ... "
2920
2921 If you need to pass the root filesystem path to a command within the
2922 function, you can use ``${IMAGE_ROOTFS}``, which points to the
2923 directory that becomes the root filesystem image. See the
2924 ```IMAGE_ROOTFS`` <#var-IMAGE_ROOTFS>`__ variable for more
2925 information.
2926
2927IMAGE_ROOTFS
2928 The location of the root filesystem while it is under construction
2929 (i.e. during the ```do_rootfs`` <#ref-tasks-rootfs>`__ task). This
2930 variable is not configurable. Do not change it.
2931
2932IMAGE_ROOTFS_ALIGNMENT
2933 Specifies the alignment for the output image file in Kbytes. If the
2934 size of the image is not a multiple of this value, then the size is
2935 rounded up to the nearest multiple of the value. The default value is
2936 "1". See ```IMAGE_ROOTFS_SIZE`` <#var-IMAGE_ROOTFS_SIZE>`__ for
2937 additional information.
2938
2939IMAGE_ROOTFS_EXTRA_SPACE
2940 Defines additional free disk space created in the image in Kbytes. By
2941 default, this variable is set to "0". This free disk space is added
2942 to the image after the build system determines the image size as
2943 described in ``IMAGE_ROOTFS_SIZE``.
2944
2945 This variable is particularly useful when you want to ensure that a
2946 specific amount of free disk space is available on a device after an
2947 image is installed and running. For example, to be sure 5 Gbytes of
2948 free disk space is available, set the variable as follows:
2949 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
2950
2951 For example, the Yocto Project Build Appliance specifically requests
2952 40 Gbytes of extra space with the line: IMAGE_ROOTFS_EXTRA_SPACE =
2953 "41943040"
2954
2955IMAGE_ROOTFS_SIZE
2956 Defines the size in Kbytes for the generated image. The OpenEmbedded
2957 build system determines the final size for the generated image using
2958 an algorithm that takes into account the initial disk space used for
2959 the generated image, a requested size for the image, and requested
2960 additional free disk space to be added to the image. Programatically,
2961 the build system determines the final size of the generated image as
2962 follows: if (image-du \* overhead) < rootfs-size:
2963 internal-rootfs-size = rootfs-size + xspace else:
2964 internal-rootfs-size = (image-du \* overhead) + xspace where:
2965 image-du = Returned value of the du command on the image. overhead =
2966 IMAGE_OVERHEAD_FACTOR rootfs-size = IMAGE_ROOTFS_SIZE
2967 internal-rootfs-size = Initial root filesystem size before any
2968 modifications. xspace = IMAGE_ROOTFS_EXTRA_SPACE
2969
2970 See the ```IMAGE_OVERHEAD_FACTOR`` <#var-IMAGE_OVERHEAD_FACTOR>`__
2971 and ```IMAGE_ROOTFS_EXTRA_SPACE`` <#var-IMAGE_ROOTFS_EXTRA_SPACE>`__
2972 variables for related information.
2973
2974IMAGE_TYPEDEP
2975 Specifies a dependency from one image type on another. Here is an
2976 example from the ```image-live`` <#ref-classes-image-live>`__ class:
2977 IMAGE_TYPEDEP_live = "ext3"
2978
2979 In the previous example, the variable ensures that when "live" is
2980 listed with the ```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__ variable,
2981 the OpenEmbedded build system produces an ``ext3`` image first since
2982 one of the components of the live image is an ``ext3`` formatted
2983 partition containing the root filesystem.
2984
2985IMAGE_TYPES
2986 Specifies the complete list of supported image types by default:
2987 btrfs container cpio cpio.gz cpio.lz4 cpio.lzma cpio.xz cramfs ext2
2988 ext2.bz2 ext2.gz ext2.lzma ext3 ext3.gz ext4 ext4.gz f2fs hddimg iso
2989 jffs2 jffs2.sum multiubi squashfs squashfs-lz4 squashfs-lzo
2990 squashfs-xz tar tar.bz2 tar.gz tar.lz4 tar.xz tar.zst ubi ubifs wic
2991 wic.bz2 wic.gz wic.lzma
2992
2993 For more information about these types of images, see
2994 ``meta/classes/image_types*.bbclass`` in the `Source
2995 Directory <#source-directory>`__.
2996
2997INC_PR
2998 Helps define the recipe revision for recipes that share a common
2999 ``include`` file. You can think of this variable as part of the
3000 recipe revision as set from within an include file.
3001
3002 Suppose, for example, you have a set of recipes that are used across
3003 several projects. And, within each of those recipes the revision (its
3004 ```PR`` <#var-PR>`__ value) is set accordingly. In this case, when
3005 the revision of those recipes changes, the burden is on you to find
3006 all those recipes and be sure that they get changed to reflect the
3007 updated version of the recipe. In this scenario, it can get
3008 complicated when recipes that are used in many places and provide
3009 common functionality are upgraded to a new revision.
3010
3011 A more efficient way of dealing with this situation is to set the
3012 ``INC_PR`` variable inside the ``include`` files that the recipes
3013 share and then expand the ``INC_PR`` variable within the recipes to
3014 help define the recipe revision.
3015
3016 The following provides an example that shows how to use the
3017 ``INC_PR`` variable given a common ``include`` file that defines the
3018 variable. Once the variable is defined in the ``include`` file, you
3019 can use the variable to set the ``PR`` values in each recipe. You
3020 will notice that when you set a recipe's ``PR`` you can provide more
3021 granular revisioning by appending values to the ``INC_PR`` variable:
3022 recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
3023 recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
3024 recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
3025 recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" The
3026 first line of the example establishes the baseline revision to be
3027 used for all recipes that use the ``include`` file. The remaining
3028 lines in the example are from individual recipes and show how the
3029 ``PR`` value is set.
3030
3031INCOMPATIBLE_LICENSE
3032 Specifies a space-separated list of license names (as they would
3033 appear in ```LICENSE`` <#var-LICENSE>`__) that should be excluded
3034 from the build. Recipes that provide no alternatives to listed
3035 incompatible licenses are not built. Packages that are individually
3036 licensed with the specified incompatible licenses will be deleted.
3037
3038 .. note::
3039
3040 This functionality is only regularly tested using the following
3041 setting:
3042 ::
3043
3044 INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
3045
3046
3047 Although you can use other settings, you might be required to
3048 remove dependencies on or provide alternatives to components that
3049 are required to produce a functional system image.
3050
3051 .. note::
3052
3053 It is possible to define a list of licenses that are allowed to be
3054 used instead of the licenses that are excluded. To do this, define
3055 a variable
3056 COMPATIBLE_LICENSES
3057 with the names of the licences that are allowed. Then define
3058 INCOMPATIBLE_LICENSE
3059 as:
3060 ::
3061
3062 INCOMPATIBLE_LICENSE = "${@' '.join(sorted(set(d.getVar('AVAILABLE_LICENSES').split()) - set(d.getVar('COMPATIBLE_LICENSES').split())))}"
3063
3064
3065 This will result in
3066 INCOMPATIBLE_LICENSE
3067 containing the names of all licences from
3068 AVAILABLE_LICENSES
3069 except the ones specified in
3070 COMPATIBLE_LICENSES
3071 , thus only allowing the latter licences to be used.
3072
3073INHERIT
3074 Causes the named class or classes to be inherited globally. Anonymous
3075 functions in the class or classes are not executed for the base
3076 configuration and in each individual recipe. The OpenEmbedded build
3077 system ignores changes to ``INHERIT`` in individual recipes.
3078
3079 For more information on ``INHERIT``, see the "```INHERIT``
3080 Configuration
3081 Directive <&YOCTO_DOCS_BB_URL;#inherit-configuration-directive>`__"
3082 section in the Bitbake User Manual.
3083
3084INHERIT_DISTRO
3085 Lists classes that will be inherited at the distribution level. It is
3086 unlikely that you want to edit this variable.
3087
3088 The default value of the variable is set as follows in the
3089 ``meta/conf/distro/defaultsetup.conf`` file: INHERIT_DISTRO ?=
3090 "debian devshell sstate license"
3091
3092INHIBIT_DEFAULT_DEPS
3093 Prevents the default dependencies, namely the C compiler and standard
3094 C library (libc), from being added to ```DEPENDS`` <#var-DEPENDS>`__.
3095 This variable is usually used within recipes that do not require any
3096 compilation using the C compiler.
3097
3098 Set the variable to "1" to prevent the default dependencies from
3099 being added.
3100
3101INHIBIT_PACKAGE_DEBUG_SPLIT
3102 Prevents the OpenEmbedded build system from splitting out debug
3103 information during packaging. By default, the build system splits out
3104 debugging information during the
3105 ```do_package`` <#ref-tasks-package>`__ task. For more information on
3106 how debug information is split out, see the
3107 ```PACKAGE_DEBUG_SPLIT_STYLE`` <#var-PACKAGE_DEBUG_SPLIT_STYLE>`__
3108 variable.
3109
3110 To prevent the build system from splitting out debug information
3111 during packaging, set the ``INHIBIT_PACKAGE_DEBUG_SPLIT`` variable as
3112 follows: INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
3113
3114INHIBIT_PACKAGE_STRIP
3115 If set to "1", causes the build to not strip binaries in resulting
3116 packages and prevents the ``-dbg`` package from containing the source
3117 files.
3118
3119 By default, the OpenEmbedded build system strips binaries and puts
3120 the debugging symbols into ``${``\ ```PN`` <#var-PN>`__\ ``}-dbg``.
3121 Consequently, you should not set ``INHIBIT_PACKAGE_STRIP`` when you
3122 plan to debug in general.
3123
3124INHIBIT_SYSROOT_STRIP
3125 If set to "1", causes the build to not strip binaries in the
3126 resulting sysroot.
3127
3128 By default, the OpenEmbedded build system strips binaries in the
3129 resulting sysroot. When you specifically set the
3130 ``INHIBIT_SYSROOT_STRIP`` variable to "1" in your recipe, you inhibit
3131 this stripping.
3132
3133 If you want to use this variable, include the
3134 ```staging`` <#ref-classes-staging>`__ class. This class uses a
3135 ``sys_strip()`` function to test for the variable and acts
3136 accordingly.
3137
3138 .. note::
3139
3140 Use of the
3141 INHIBIT_SYSROOT_STRIP
3142 variable occurs in rare and special circumstances. For example,
3143 suppose you are building bare-metal firmware by using an external
3144 GCC toolchain. Furthermore, even if the toolchain's binaries are
3145 strippable, other files exist that are needed for the build that
3146 are not strippable.
3147
3148INITRAMFS_FSTYPES
3149 Defines the format for the output image of an initial RAM filesystem
3150 (initramfs), which is used during boot. Supported formats are the
3151 same as those supported by the
3152 ```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__ variable.
3153
3154 The default value of this variable, which is set in the
3155 ``meta/conf/bitbake.conf`` configuration file in the `Source
3156 Directory <#source-directory>`__, is "cpio.gz". The Linux kernel's
3157 initramfs mechanism, as opposed to the initial RAM filesystem
3158 `initrd <https://en.wikipedia.org/wiki/Initrd>`__ mechanism, expects
3159 an optionally compressed cpio archive.
3160
3161INITRAMFS_IMAGE
3162 Specifies the ```PROVIDES`` <#var-PROVIDES>`__ name of an image
3163 recipe that is used to build an initial RAM filesystem (initramfs)
3164 image. In other words, the ``INITRAMFS_IMAGE`` variable causes an
3165 additional recipe to be built as a dependency to whatever root
3166 filesystem recipe you might be using (e.g. ``core-image-sato``). The
3167 initramfs image recipe you provide should set
3168 ```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__ to
3169 ```INITRAMFS_FSTYPES`` <#var-INITRAMFS_FSTYPES>`__.
3170
3171 An initramfs image provides a temporary root filesystem used for
3172 early system initialization (e.g. loading of modules needed to locate
3173 and mount the "real" root filesystem).
3174
3175 .. note::
3176
3177 See the
3178 meta/recipes-core/images/core-image-minimal-initramfs.bb
3179 recipe in the
3180 Source Directory
3181 for an example initramfs recipe. To select this sample recipe as
3182 the one built to provide the initramfs image, set
3183 INITRAMFS_IMAGE
3184 to "core-image-minimal-initramfs".
3185
3186 You can also find more information by referencing the
3187 ``meta-poky/conf/local.conf.sample.extended`` configuration file in
3188 the Source Directory, the ```image`` <#ref-classes-image>`__ class,
3189 and the ```kernel`` <#ref-classes-kernel>`__ class to see how to use
3190 the ``INITRAMFS_IMAGE`` variable.
3191
3192 If ``INITRAMFS_IMAGE`` is empty, which is the default, then no
3193 initramfs image is built.
3194
3195 For more information, you can also see the
3196 ```INITRAMFS_IMAGE_BUNDLE`` <#var-INITRAMFS_IMAGE_BUNDLE>`__
3197 variable, which allows the generated image to be bundled inside the
3198 kernel image. Additionally, for information on creating an initramfs
3199 image, see the "`Building an Initial RAM Filesystem (initramfs)
3200 Image <&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image>`__" section
3201 in the Yocto Project Development Tasks Manual.
3202
3203INITRAMFS_IMAGE_BUNDLE
3204 Controls whether or not the image recipe specified by
3205 ```INITRAMFS_IMAGE`` <#var-INITRAMFS_IMAGE>`__ is run through an
3206 extra pass
3207 (```do_bundle_initramfs`` <#ref-tasks-bundle_initramfs>`__) during
3208 kernel compilation in order to build a single binary that contains
3209 both the kernel image and the initial RAM filesystem (initramfs)
3210 image. This makes use of the
3211 ```CONFIG_INITRAMFS_SOURCE`` <#var-CONFIG_INITRAMFS_SOURCE>`__ kernel
3212 feature.
3213
3214 .. note::
3215
3216 Using an extra compilation pass to bundle the initramfs avoids a
3217 circular dependency between the kernel recipe and the initramfs
3218 recipe should the initramfs include kernel modules. Should that be
3219 the case, the initramfs recipe depends on the kernel for the
3220 kernel modules, and the kernel depends on the initramfs recipe
3221 since the initramfs is bundled inside the kernel image.
3222
3223 The combined binary is deposited into the ``tmp/deploy`` directory,
3224 which is part of the `Build Directory <#build-directory>`__.
3225
3226 Setting the variable to "1" in a configuration file causes the
3227 OpenEmbedded build system to generate a kernel image with the
3228 initramfs specified in ``INITRAMFS_IMAGE`` bundled within:
3229 INITRAMFS_IMAGE_BUNDLE = "1" By default, the
3230 ```kernel`` <#ref-classes-kernel>`__ class sets this variable to a
3231 null string as follows: INITRAMFS_IMAGE_BUNDLE ?= ""
3232
3233 .. note::
3234
3235 You must set the
3236 INITRAMFS_IMAGE_BUNDLE
3237 variable in a configuration file. You cannot set the variable in a
3238 recipe file.
3239
3240 See the
3241 ```local.conf.sample.extended`` <&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-poky/conf/local.conf.sample.extended>`__
3242 file for additional information. Also, for information on creating an
3243 initramfs, see the "`Building an Initial RAM Filesystem (initramfs)
3244 Image <&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image>`__" section
3245 in the Yocto Project Development Tasks Manual.
3246
3247INITRAMFS_LINK_NAME
3248 The link name of the initial RAM filesystem image. This variable is
3249 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3250 follows: INITRAMFS_LINK_NAME ?=
3251 "initramfs-${KERNEL_ARTIFACT_LINK_NAME}" The value of the
3252 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
3253 file, has the following value: KERNEL_ARTIFACT_LINK_NAME ?=
3254 "${MACHINE}"
3255
3256 See the ```MACHINE`` <#var-MACHINE>`__ variable for additional
3257 information.
3258
3259INITRAMFS_NAME
3260 The base name of the initial RAM filesystem image. This variable is
3261 set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3262 follows: INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}" The
3263 value of the ```KERNEL_ARTIFACT_NAME`` <#var-KERNEL_ARTIFACT_NAME>`__
3264 variable, which is set in the same file, has the following value:
3265 KERNEL_ARTIFACT_NAME ?=
3266 "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3267
3268INITRD
3269 Indicates list of filesystem images to concatenate and use as an
3270 initial RAM disk (``initrd``).
3271
3272 The ``INITRD`` variable is an optional variable used with the
3273 ```image-live`` <#ref-classes-image-live>`__ class.
3274
3275INITRD_IMAGE
3276 When building a "live" bootable image (i.e. when
3277 ```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__ contains "live"),
3278 ``INITRD_IMAGE`` specifies the image recipe that should be built to
3279 provide the initial RAM disk image. The default value is
3280 "core-image-minimal-initramfs".
3281
3282 See the ```image-live`` <#ref-classes-image-live>`__ class for more
3283 information.
3284
3285INITSCRIPT_NAME
3286 The filename of the initialization script as installed to
3287 ``${sysconfdir}/init.d``.
3288
3289 This variable is used in recipes when using ``update-rc.d.bbclass``.
3290 The variable is mandatory.
3291
3292INITSCRIPT_PACKAGES
3293 A list of the packages that contain initscripts. If multiple packages
3294 are specified, you need to append the package name to the other
3295 ``INITSCRIPT_*`` as an override.
3296
3297 This variable is used in recipes when using ``update-rc.d.bbclass``.
3298 The variable is optional and defaults to the ```PN`` <#var-PN>`__
3299 variable.
3300
3301INITSCRIPT_PARAMS
3302 Specifies the options to pass to ``update-rc.d``. Here is an example:
3303 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
3304
3305 In this example, the script has a runlevel of 99, starts the script
3306 in initlevels 2 and 5, and stops the script in levels 0, 1 and 6.
3307
3308 The variable's default value is "defaults", which is set in the
3309 ```update-rc.d`` <#ref-classes-update-rc.d>`__ class.
3310
3311 The value in ``INITSCRIPT_PARAMS`` is passed through to the
3312 ``update-rc.d`` command. For more information on valid parameters,
3313 please see the ``update-rc.d`` manual page at
3314 ` <http://www.tin.org/bin/man.cgi?section=8&topic=update-rc.d>`__.
3315
3316INSANE_SKIP
3317 Specifies the QA checks to skip for a specific package within a
3318 recipe. For example, to skip the check for symbolic link ``.so``
3319 files in the main package of a recipe, add the following to the
3320 recipe. The package name override must be used, which in this example
3321 is ``${PN}``: INSANE_SKIP_${PN} += "dev-so"
3322
3323 See the "```insane.bbclass`` <#ref-classes-insane>`__" section for a
3324 list of the valid QA checks you can specify using this variable.
3325
3326INSTALL_TIMEZONE_FILE
3327 By default, the ``tzdata`` recipe packages an ``/etc/timezone`` file.
3328 Set the ``INSTALL_TIMEZONE_FILE`` variable to "0" at the
3329 configuration level to disable this behavior.
3330
3331IPK_FEED_URIS
3332 When the IPK backend is in use and package management is enabled on
3333 the target, you can use this variable to set up ``opkg`` in the
3334 target image to point to package feeds on a nominated server. Once
3335 the feed is established, you can perform installations or upgrades
3336 using the package manager at runtime.
3337
3338KARCH
3339 Defines the kernel architecture used when assembling the
3340 configuration. Architectures supported for this release are: powerpc
3341 i386 x86_64 arm qemu mips
3342
3343 You define the ``KARCH`` variable in the `BSP
3344 Descriptions <&YOCTO_DOCS_KERNEL_DEV_URL;#bsp-descriptions>`__.
3345
3346KBRANCH
3347 A regular expression used by the build process to explicitly identify
3348 the kernel branch that is validated, patched, and configured during a
3349 build. You must set this variable to ensure the exact kernel branch
3350 you want is being used by the build process.
3351
3352 Values for this variable are set in the kernel's recipe file and the
3353 kernel's append file. For example, if you are using the
3354 ``linux-yocto_4.12`` kernel, the kernel recipe file is the
3355 ``meta/recipes-kernel/linux/linux-yocto_4.12.bb`` file. ``KBRANCH``
3356 is set as follows in that kernel recipe file: KBRANCH ?=
3357 "standard/base"
3358
3359 This variable is also used from the kernel's append file to identify
3360 the kernel branch specific to a particular machine or target
3361 hardware. Continuing with the previous kernel example, the kernel's
3362 append file (i.e. ``linux-yocto_4.12.bbappend``) is located in the
3363 BSP layer for a given machine. For example, the append file for the
3364 Beaglebone, EdgeRouter, and generic versions of both 32 and 64-bit IA
3365 machines (``meta-yocto-bsp``) is named
3366 ``meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend``.
3367 Here are the related statements from that append file:
3368 KBRANCH_genericx86 = "standard/base" KBRANCH_genericx86-64 =
3369 "standard/base" KBRANCH_edgerouter = "standard/edgerouter"
3370 KBRANCH_beaglebone = "standard/beaglebone" The ``KBRANCH`` statements
3371 identify the kernel branch to use when building for each supported
3372 BSP.
3373
3374KBUILD_DEFCONFIG
3375 When used with the ```kernel-yocto`` <#ref-classes-kernel-yocto>`__
3376 class, specifies an "in-tree" kernel configuration file for use
3377 during a kernel build.
3378
3379 Typically, when using a ``defconfig`` to configure a kernel during a
3380 build, you place the file in your layer in the same manner as you
3381 would place patch files and configuration fragment files (i.e.
3382 "out-of-tree"). However, if you want to use a ``defconfig`` file that
3383 is part of the kernel tree (i.e. "in-tree"), you can use the
3384 ``KBUILD_DEFCONFIG`` variable and append the
3385 ```KMACHINE`` <#var-KMACHINE>`__ variable to point to the
3386 ``defconfig`` file.
3387
3388 To use the variable, set it in the append file for your kernel recipe
3389 using the following form: KBUILD_DEFCONFIG_KMACHINE ?= defconfig_file
3390 Here is an example from a "raspberrypi2" ``KMACHINE`` build that uses
3391 a ``defconfig`` file named "bcm2709_defconfig":
3392 KBUILD_DEFCONFIG_raspberrypi2 = "bcm2709_defconfig" As an
3393 alternative, you can use the following within your append file:
3394 KBUILD_DEFCONFIG_pn-linux-yocto ?= defconfig_file For more
3395 information on how to use the ``KBUILD_DEFCONFIG`` variable, see the
3396 "`Using an "In-Tree" ``defconfig``
3397 File <&YOCTO_DOCS_KERNEL_DEV_URL;#using-an-in-tree-defconfig-file>`__"
3398 section in the Yocto Project Linux Kernel Development Manual.
3399
3400KERNEL_ALT_IMAGETYPE
3401 Specifies an alternate kernel image type for creation in addition to
3402 the kernel image type specified using the
3403 ```KERNEL_IMAGETYPE`` <#var-KERNEL_IMAGETYPE>`__ variable.
3404
3405KERNEL_ARTIFACT_NAME
3406 Specifies the name of all of the build artifacts. You can change the
3407 name of the artifacts by changing the ``KERNEL_ARTIFACT_NAME``
3408 variable.
3409
3410 The value of ``KERNEL_ARTIFACT_NAME``, which is set in the
3411 ``meta/classes/kernel-artifact-names.bbclass`` file, has the
3412 following default value: KERNEL_ARTIFACT_NAME ?=
3413 "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3414
3415 See the ```PKGE`` <#var-PKGE>`__, ```PKGV`` <#var-PKGV>`__,
3416 ```PKGR`` <#var-PKGR>`__, and ```MACHINE`` <#var-MACHINE>`__
3417 variables for additional information.
3418
3419 .. note::
3420
3421 The
3422 IMAGE_VERSION_SUFFIX
3423 variable is set to
3424 DATETIME
3425 .
3426
3427KERNEL_CLASSES
3428 A list of classes defining kernel image types that the
3429 ```kernel`` <#ref-classes-kernel>`__ class should inherit. You
3430 typically append this variable to enable extended image types. An
3431 example is the "kernel-fitimage", which enables fitImage support and
3432 resides in ``meta/classes/kernel-fitimage.bbclass``. You can register
3433 custom kernel image types with the ``kernel`` class using this
3434 variable.
3435
3436KERNEL_DEVICETREE
3437 Specifies the name of the generated Linux kernel device tree (i.e.
3438 the ``.dtb``) file.
3439
3440 .. note::
3441
3442 Legacy support exists for specifying the full path to the device
3443 tree. However, providing just the
3444 .dtb
3445 file is preferred.
3446
3447 In order to use this variable, the
3448 ```kernel-devicetree`` <#ref-classes-kernel-devicetree>`__ class must
3449 be inherited.
3450
3451KERNEL_DTB_LINK_NAME
3452 The link name of the kernel device tree binary (DTB). This variable
3453 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3454 follows: KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" The
3455 value of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in
3456 the same file, has the following value: KERNEL_ARTIFACT_LINK_NAME ?=
3457 "${MACHINE}"
3458
3459 See the ```MACHINE`` <#var-MACHINE>`__ variable for additional
3460 information.
3461
3462KERNEL_DTB_NAME
3463 The base name of the kernel device tree binary (DTB). This variable
3464 is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
3465 follows: KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}" The value of
3466 the ```KERNEL_ARTIFACT_NAME`` <#var-KERNEL_ARTIFACT_NAME>`__
3467 variable, which is set in the same file, has the following value:
3468 KERNEL_ARTIFACT_NAME ?=
3469 "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3470
3471KERNEL_EXTRA_ARGS
3472 Specifies additional ``make`` command-line arguments the OpenEmbedded
3473 build system passes on when compiling the kernel.
3474
3475KERNEL_FEATURES
3476 Includes additional kernel metadata. In the OpenEmbedded build
3477 system, the default Board Support Packages (BSPs)
3478 `Metadata <#metadata>`__ is provided through the
3479 ```KMACHINE`` <#var-KMACHINE>`__ and ```KBRANCH`` <#var-KBRANCH>`__
3480 variables. You can use the ``KERNEL_FEATURES`` variable from within
3481 the kernel recipe or kernel append file to further add metadata for
3482 all BSPs or specific BSPs.
3483
3484 The metadata you add through this variable includes config fragments
3485 and features descriptions, which usually includes patches as well as
3486 config fragments. You typically override the ``KERNEL_FEATURES``
3487 variable for a specific machine. In this way, you can provide
3488 validated, but optional, sets of kernel configurations and features.
3489
3490 For example, the following example from the ``linux-yocto-rt_4.12``
3491 kernel recipe adds "netfilter" and "taskstats" features to all BSPs
3492 as well as "virtio" configurations to all QEMU machines. The last two
3493 statements add specific configurations to targeted machine types:
3494 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc
3495 features/taskstats/taskstats.scc" KERNEL_FEATURES_append = "
3496 ${KERNEL_EXTRA_FEATURES}" KERNEL_FEATURES_append_qemuall = "
3497 cfg/virtio.scc" KERNEL_FEATURES_append_qemux86 = " cfg/sound.scc
3498 cfg/paravirt_kvm.scc" KERNEL_FEATURES_append_qemux86-64 = "
3499 cfg/sound.scc"
3500
3501KERNEL_FIT_LINK_NAME
3502 The link name of the kernel flattened image tree (FIT) image. This
3503 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
3504 file as follows: KERNEL_FIT_LINK_NAME ?=
3505 "${KERNEL_ARTIFACT_LINK_NAME}" The value of the
3506 ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
3507 file, has the following value: KERNEL_ARTIFACT_LINK_NAME ?=
3508 "${MACHINE}"
3509
3510 See the ```MACHINE`` <#var-MACHINE>`__ variable for additional
3511 information.
3512
3513KERNEL_FIT_NAME
3514 The base name of the kernel flattened image tree (FIT) image. This
3515 variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
3516 file as follows: KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}" The
3517 value of the ```KERNEL_ARTIFACT_NAME`` <#var-KERNEL_ARTIFACT_NAME>`__
3518 variable, which is set in the same file, has the following value:
3519 KERNEL_ARTIFACT_NAME ?=
3520 "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3521
3522KERNEL_IMAGE_LINK_NAME
3523 The link name for the kernel image. This variable is set in the
3524 ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
3525 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" The value of
3526 the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the same
3527 file, has the following value: KERNEL_ARTIFACT_LINK_NAME ?=
3528 "${MACHINE}"
3529
3530 See the ```MACHINE`` <#var-MACHINE>`__ variable for additional
3531 information.
3532
3533KERNEL_IMAGE_MAXSIZE
3534 Specifies the maximum size of the kernel image file in kilobytes. If
3535 ``KERNEL_IMAGE_MAXSIZE`` is set, the size of the kernel image file is
3536 checked against the set value during the
3537 ```do_sizecheck`` <#ref-tasks-sizecheck>`__ task. The task fails if
3538 the kernel image file is larger than the setting.
3539
3540 ``KERNEL_IMAGE_MAXSIZE`` is useful for target devices that have a
3541 limited amount of space in which the kernel image must be stored.
3542
3543 By default, this variable is not set, which means the size of the
3544 kernel image is not checked.
3545
3546KERNEL_IMAGE_NAME
3547 The base name of the kernel image. This variable is set in the
3548 ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
3549 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}" The value of the
3550 ```KERNEL_ARTIFACT_NAME`` <#var-KERNEL_ARTIFACT_NAME>`__ variable,
3551 which is set in the same file, has the following value:
3552 KERNEL_ARTIFACT_NAME ?=
3553 "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
3554
3555KERNEL_IMAGETYPE
3556 The type of kernel to build for a device, usually set by the machine
3557 configuration files and defaults to "zImage". This variable is used
3558 when building the kernel and is passed to ``make`` as the target to
3559 build.
3560
3561 If you want to build an alternate kernel image type, use the
3562 ```KERNEL_ALT_IMAGETYPE`` <#var-KERNEL_ALT_IMAGETYPE>`__ variable.
3563
3564KERNEL_MODULE_AUTOLOAD
3565 Lists kernel modules that need to be auto-loaded during boot.
3566
3567 .. note::
3568
3569 This variable replaces the deprecated
3570 module_autoload
3571 variable.
3572
3573 You can use the ``KERNEL_MODULE_AUTOLOAD`` variable anywhere that it
3574 can be recognized by the kernel recipe or by an out-of-tree kernel
3575 module recipe (e.g. a machine configuration file, a distribution
3576 configuration file, an append file for the recipe, or the recipe
3577 itself).
3578
3579 Specify it as follows: KERNEL_MODULE_AUTOLOAD += "module_name1
3580 module_name2 module_name3"
3581
3582 Including ``KERNEL_MODULE_AUTOLOAD`` causes the OpenEmbedded build
3583 system to populate the ``/etc/modules-load.d/modname.conf`` file with
3584 the list of modules to be auto-loaded on boot. The modules appear
3585 one-per-line in the file. Here is an example of the most common use
3586 case: KERNEL_MODULE_AUTOLOAD += "module_name"
3587
3588 For information on how to populate the ``modname.conf`` file with
3589 ``modprobe.d`` syntax lines, see the
3590 ```KERNEL_MODULE_PROBECONF`` <#var-KERNEL_MODULE_PROBECONF>`__
3591 variable.
3592
3593KERNEL_MODULE_PROBECONF
3594 Provides a list of modules for which the OpenEmbedded build system
3595 expects to find ``module_conf_``\ modname values that specify
3596 configuration for each of the modules. For information on how to
3597 provide those module configurations, see the
3598 ```module_conf_*`` <#var-module_conf>`__ variable.
3599
3600KERNEL_PATH
3601 The location of the kernel sources. This variable is set to the value
3602 of the ```STAGING_KERNEL_DIR`` <#var-STAGING_KERNEL_DIR>`__ within
3603 the ```module`` <#ref-classes-module>`__ class. For information on
3604 how this variable is used, see the "`Incorporating Out-of-Tree
3605 Modules <&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules>`__"
3606 section in the Yocto Project Linux Kernel Development Manual.
3607
3608 To help maximize compatibility with out-of-tree drivers used to build
3609 modules, the OpenEmbedded build system also recognizes and uses the
3610 ```KERNEL_SRC`` <#var-KERNEL_SRC>`__ variable, which is identical to
3611 the ``KERNEL_PATH`` variable. Both variables are common variables
3612 used by external Makefiles to point to the kernel source directory.
3613
3614KERNEL_SRC
3615 The location of the kernel sources. This variable is set to the value
3616 of the ```STAGING_KERNEL_DIR`` <#var-STAGING_KERNEL_DIR>`__ within
3617 the ```module`` <#ref-classes-module>`__ class. For information on
3618 how this variable is used, see the "`Incorporating Out-of-Tree
3619 Modules <&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules>`__"
3620 section in the Yocto Project Linux Kernel Development Manual.
3621
3622 To help maximize compatibility with out-of-tree drivers used to build
3623 modules, the OpenEmbedded build system also recognizes and uses the
3624 ```KERNEL_PATH`` <#var-KERNEL_PATH>`__ variable, which is identical
3625 to the ``KERNEL_SRC`` variable. Both variables are common variables
3626 used by external Makefiles to point to the kernel source directory.
3627
3628KERNEL_VERSION
3629 Specifies the version of the kernel as extracted from ``version.h``
3630 or ``utsrelease.h`` within the kernel sources. Effects of setting
3631 this variable do not take affect until the kernel has been
3632 configured. Consequently, attempting to refer to this variable in
3633 contexts prior to configuration will not work.
3634
3635KERNELDEPMODDEPEND
3636 Specifies whether the data referenced through
3637 ```PKGDATA_DIR`` <#var-PKGDATA_DIR>`__ is needed or not. The
3638 ``KERNELDEPMODDEPEND`` does not control whether or not that data
3639 exists, but simply whether or not it is used. If you do not need to
3640 use the data, set the ``KERNELDEPMODDEPEND`` variable in your
3641 ``initramfs`` recipe. Setting the variable there when the data is not
3642 needed avoids a potential dependency loop.
3643
3644KFEATURE_DESCRIPTION
3645 Provides a short description of a configuration fragment. You use
3646 this variable in the ``.scc`` file that describes a configuration
3647 fragment file. Here is the variable used in a file named ``smp.scc``
3648 to describe SMP being enabled: define KFEATURE_DESCRIPTION "Enable
3649 SMP"
3650
3651KMACHINE
3652 The machine as known by the kernel. Sometimes the machine name used
3653 by the kernel does not match the machine name used by the
3654 OpenEmbedded build system. For example, the machine name that the
3655 OpenEmbedded build system understands as ``core2-32-intel-common``
3656 goes by a different name in the Linux Yocto kernel. The kernel
3657 understands that machine as ``intel-core2-32``. For cases like these,
3658 the ``KMACHINE`` variable maps the kernel machine name to the
3659 OpenEmbedded build system machine name.
3660
3661 These mappings between different names occur in the Yocto Linux
3662 Kernel's ``meta`` branch. As an example take a look in the
3663 ``common/recipes-kernel/linux/linux-yocto_3.19.bbappend`` file:
3664 LINUX_VERSION_core2-32-intel-common = "3.19.0"
3665 COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}"
3666 SRCREV_meta_core2-32-intel-common =
3667 "8897ef68b30e7426bc1d39895e71fb155d694974"
3668 SRCREV_machine_core2-32-intel-common =
3669 "43b9eced9ba8a57add36af07736344dcc383f711"
3670 KMACHINE_core2-32-intel-common = "intel-core2-32"
3671 KBRANCH_core2-32-intel-common = "standard/base"
3672 KERNEL_FEATURES_append_core2-32-intel-common =
3673 "${KERNEL_FEATURES_INTEL_COMMON}" The ``KMACHINE`` statement says
3674 that the kernel understands the machine name as "intel-core2-32".
3675 However, the OpenEmbedded build system understands the machine as
3676 "core2-32-intel-common".
3677
3678KTYPE
3679 Defines the kernel type to be used in assembling the configuration.
3680 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
3681 kernel types. See the "`Kernel
3682 Types <&YOCTO_DOCS_KERNEL_DEV_URL;#kernel-types>`__" section in the
3683 Yocto Project Linux Kernel Development Manual for more information on
3684 kernel types.
3685
3686 You define the ``KTYPE`` variable in the `BSP
3687 Descriptions <&YOCTO_DOCS_KERNEL_DEV_URL;#bsp-descriptions>`__. The
3688 value you use must match the value used for the
3689 ```LINUX_KERNEL_TYPE`` <#var-LINUX_KERNEL_TYPE>`__ value used by the
3690 kernel recipe.
3691
3692LABELS
3693 Provides a list of targets for automatic configuration.
3694
3695 See the ```grub-efi`` <#ref-classes-grub-efi>`__ class for more
3696 information on how this variable is used.
3697
3698LAYERDEPENDS
3699 Lists the layers, separated by spaces, on which this recipe depends.
3700 Optionally, you can specify a specific layer version for a dependency
3701 by adding it to the end of the layer name. Here is an example:
3702 LAYERDEPENDS_mylayer = "anotherlayer (=3)" In this previous example,
3703 version 3 of "anotherlayer" is compared against
3704 ```LAYERVERSION`` <#var-LAYERVERSION>`__\ ``_anotherlayer``.
3705
3706 An error is produced if any dependency is missing or the version
3707 numbers (if specified) do not match exactly. This variable is used in
3708 the ``conf/layer.conf`` file and must be suffixed with the name of
3709 the specific layer (e.g. ``LAYERDEPENDS_mylayer``).
3710
3711LAYERDIR
3712 When used inside the ``layer.conf`` configuration file, this variable
3713 provides the path of the current layer. This variable is not
3714 available outside of ``layer.conf`` and references are expanded
3715 immediately when parsing of the file completes.
3716
3717LAYERRECOMMENDS
3718 Lists the layers, separated by spaces, recommended for use with this
3719 layer.
3720
3721 Optionally, you can specify a specific layer version for a
3722 recommendation by adding the version to the end of the layer name.
3723 Here is an example: LAYERRECOMMENDS_mylayer = "anotherlayer (=3)" In
3724 this previous example, version 3 of "anotherlayer" is compared
3725 against ``LAYERVERSION_anotherlayer``.
3726
3727 This variable is used in the ``conf/layer.conf`` file and must be
3728 suffixed with the name of the specific layer (e.g.
3729 ``LAYERRECOMMENDS_mylayer``).
3730
3731LAYERSERIES_COMPAT
3732 Lists the versions of the `OpenEmbedded-Core <#oe-core>`__ for which
3733 a layer is compatible. Using the ``LAYERSERIES_COMPAT`` variable
3734 allows the layer maintainer to indicate which combinations of the
3735 layer and OE-Core can be expected to work. The variable gives the
3736 system a way to detect when a layer has not been tested with new
3737 releases of OE-Core (e.g. the layer is not maintained).
3738
3739 To specify the OE-Core versions for which a layer is compatible, use
3740 this variable in your layer's ``conf/layer.conf`` configuration file.
3741 For the list, use the Yocto Project `Release
3742 Name <https://wiki.yoctoproject.org/wiki/Releases>`__ (e.g.
3743 DISTRO_NAME_NO_CAP). To specify multiple OE-Core versions for the
3744 layer, use a space-separated list: LAYERSERIES_COMPAT_layer_root_name
3745 = "DISTRO_NAME_NO_CAP DISTRO_NAME_NO_CAP_MINUS_ONE"
3746
3747 .. note::
3748
3749 Setting
3750 LAYERSERIES_COMPAT
3751 is required by the Yocto Project Compatible version 2 standard.
3752 The OpenEmbedded build system produces a warning if the variable
3753 is not set for any given layer.
3754
3755 See the "`Creating Your Own
3756 Layer <&YOCTO_DOCS_DEV_URL;#creating-your-own-layer>`__" section in
3757 the Yocto Project Development Tasks Manual.
3758
3759LAYERVERSION
3760 Optionally specifies the version of a layer as a single number. You
3761 can use this within ```LAYERDEPENDS`` <#var-LAYERDEPENDS>`__ for
3762 another layer in order to depend on a specific version of the layer.
3763 This variable is used in the ``conf/layer.conf`` file and must be
3764 suffixed with the name of the specific layer (e.g.
3765 ``LAYERVERSION_mylayer``).
3766
3767LD
3768 The minimal command and arguments used to run the linker.
3769
3770LDFLAGS
3771 Specifies the flags to pass to the linker. This variable is exported
3772 to an environment variable and thus made visible to the software
3773 being built during the compilation step.
3774
3775 Default initialization for ``LDFLAGS`` varies depending on what is
3776 being built:
3777
3778 - ```TARGET_LDFLAGS`` <#var-TARGET_LDFLAGS>`__ when building for the
3779 target
3780
3781 - ```BUILD_LDFLAGS`` <#var-BUILD_LDFLAGS>`__ when building for the
3782 build host (i.e. ``-native``)
3783
3784 - ```BUILDSDK_LDFLAGS`` <#var-BUILDSDK_LDFLAGS>`__ when building for
3785 an SDK (i.e. ``nativesdk-``)
3786
3787LEAD_SONAME
3788 Specifies the lead (or primary) compiled library file (i.e. ``.so``)
3789 that the ```debian`` <#ref-classes-debian>`__ class applies its
3790 naming policy to given a recipe that packages multiple libraries.
3791
3792 This variable works in conjunction with the ``debian`` class.
3793
3794LIC_FILES_CHKSUM
3795 Checksums of the license text in the recipe source code.
3796
3797 This variable tracks changes in license text of the source code
3798 files. If the license text is changed, it will trigger a build
3799 failure, which gives the developer an opportunity to review any
3800 license change.
3801
3802 This variable must be defined for all recipes (unless
3803 ```LICENSE`` <#var-LICENSE>`__ is set to "CLOSED").
3804
3805 For more information, see the "`Tracking License
3806 Changes <&YOCTO_DOCS_DEV_URL;#usingpoky-configuring-LIC_FILES_CHKSUM>`__"
3807 section in the Yocto Project Development Tasks Manual.
3808
3809LICENSE
3810 The list of source licenses for the recipe. Follow these rules:
3811
3812 - Do not use spaces within individual license names.
3813
3814 - Separate license names using \| (pipe) when there is a choice
3815 between licenses.
3816
3817 - Separate license names using & (ampersand) when multiple licenses
3818 exist that cover different parts of the source.
3819
3820 - You can use spaces between license names.
3821
3822 - For standard licenses, use the names of the files in
3823 ``meta/files/common-licenses/`` or the
3824 ```SPDXLICENSEMAP`` <#var-SPDXLICENSEMAP>`__ flag names defined in
3825 ``meta/conf/licenses.conf``.
3826
3827 Here are some examples: LICENSE = "LGPLv2.1 \| GPLv3" LICENSE =
3828 "MPL-1 & LGPLv2.1" LICENSE = "GPLv2+" The first example is from the
3829 recipes for Qt, which the user may choose to distribute under either
3830 the LGPL version 2.1 or GPL version 3. The second example is from
3831 Cairo where two licenses cover different parts of the source code.
3832 The final example is from ``sysstat``, which presents a single
3833 license.
3834
3835 You can also specify licenses on a per-package basis to handle
3836 situations where components of the output have different licenses.
3837 For example, a piece of software whose code is licensed under GPLv2
3838 but has accompanying documentation licensed under the GNU Free
3839 Documentation License 1.2 could be specified as follows: LICENSE =
3840 "GFDL-1.2 & GPLv2" LICENSE_${PN} = "GPLv2" LICENSE_${PN}-doc =
3841 "GFDL-1.2"
3842
3843LICENSE_CREATE_PACKAGE
3844 Setting ``LICENSE_CREATE_PACKAGE`` to "1" causes the OpenEmbedded
3845 build system to create an extra package (i.e.
3846 ``${``\ ```PN`` <#var-PN>`__\ ``}-lic``) for each recipe and to add
3847 those packages to the
3848 ```RRECOMMENDS`` <#var-RRECOMMENDS>`__\ ``_${PN}``.
3849
3850 The ``${PN}-lic`` package installs a directory in
3851 ``/usr/share/licenses`` named ``${PN}``, which is the recipe's base
3852 name, and installs files in that directory that contain license and
3853 copyright information (i.e. copies of the appropriate license files
3854 from ``meta/common-licenses`` that match the licenses specified in
3855 the ```LICENSE`` <#var-LICENSE>`__ variable of the recipe metadata
3856 and copies of files marked in
3857 ```LIC_FILES_CHKSUM`` <#var-LIC_FILES_CHKSUM>`__ as containing
3858 license text).
3859
3860 For related information on providing license text, see the
3861 ```COPY_LIC_DIRS`` <#var-COPY_LIC_DIRS>`__ variable, the
3862 ```COPY_LIC_MANIFEST`` <#var-COPY_LIC_MANIFEST>`__ variable, and the
3863 "`Providing License
3864 Text <&YOCTO_DOCS_DEV_URL;#providing-license-text>`__" section in the
3865 Yocto Project Development Tasks Manual.
3866
3867LICENSE_FLAGS
3868 Specifies additional flags for a recipe you must whitelist through
3869 ```LICENSE_FLAGS_WHITELIST`` <#var-LICENSE_FLAGS_WHITELIST>`__ in
3870 order to allow the recipe to be built. When providing multiple flags,
3871 separate them with spaces.
3872
3873 This value is independent of ```LICENSE`` <#var-LICENSE>`__ and is
3874 typically used to mark recipes that might require additional licenses
3875 in order to be used in a commercial product. For more information,
3876 see the "`Enabling Commercially Licensed
3877 Recipes <&YOCTO_DOCS_DEV_URL;#enabling-commercially-licensed-recipes>`__"
3878 section in the Yocto Project Development Tasks Manual.
3879
3880LICENSE_FLAGS_WHITELIST
3881 Lists license flags that when specified in
3882 ```LICENSE_FLAGS`` <#var-LICENSE_FLAGS>`__ within a recipe should not
3883 prevent that recipe from being built. This practice is otherwise
3884 known as "whitelisting" license flags. For more information, see the
3885 "`Enabling Commercially Licensed
3886 Recipes <&YOCTO_DOCS_DEV_URL;#enabling-commercially-licensed-recipes>`__"
3887 section in the Yocto Project Development Tasks Manual.
3888
3889LICENSE_PATH
3890 Path to additional licenses used during the build. By default, the
3891 OpenEmbedded build system uses ``COMMON_LICENSE_DIR`` to define the
3892 directory that holds common license text used during the build. The
3893 ``LICENSE_PATH`` variable allows you to extend that location to other
3894 areas that have additional licenses: LICENSE_PATH +=
3895 "path-to-additional-common-licenses"
3896
3897LINUX_KERNEL_TYPE
3898 Defines the kernel type to be used in assembling the configuration.
3899 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
3900 kernel types. See the "`Kernel
3901 Types <&YOCTO_DOCS_KERNEL_DEV_URL;#kernel-types>`__" section in the
3902 Yocto Project Linux Kernel Development Manual for more information on
3903 kernel types.
3904
3905 If you do not specify a ``LINUX_KERNEL_TYPE``, it defaults to
3906 "standard". Together with ```KMACHINE`` <#var-KMACHINE>`__, the
3907 ``LINUX_KERNEL_TYPE`` variable defines the search arguments used by
3908 the kernel tools to find the appropriate description within the
3909 kernel `Metadata <#metadata>`__ with which to build out the sources
3910 and configuration.
3911
3912LINUX_VERSION
3913 The Linux version from ``kernel.org`` on which the Linux kernel image
3914 being built using the OpenEmbedded build system is based. You define
3915 this variable in the kernel recipe. For example, the
3916 ``linux-yocto-3.4.bb`` kernel recipe found in
3917 ``meta/recipes-kernel/linux`` defines the variables as follows:
3918 LINUX_VERSION ?= "3.4.24"
3919
3920 The ``LINUX_VERSION`` variable is used to define ```PV`` <#var-PV>`__
3921 for the recipe: PV = "${LINUX_VERSION}+git${SRCPV}"
3922
3923LINUX_VERSION_EXTENSION
3924 A string extension compiled into the version string of the Linux
3925 kernel built with the OpenEmbedded build system. You define this
3926 variable in the kernel recipe. For example, the linux-yocto kernel
3927 recipes all define the variable as follows: LINUX_VERSION_EXTENSION
3928 ?= "-yocto-${`LINUX_KERNEL_TYPE <#var-LINUX_KERNEL_TYPE>`__}"
3929
3930 Defining this variable essentially sets the Linux kernel
3931 configuration item ``CONFIG_LOCALVERSION``, which is visible through
3932 the ``uname`` command. Here is an example that shows the extension
3933 assuming it was set as previously shown: $ uname -r 3.7.0-rc8-custom
3934
3935LOG_DIR
3936 Specifies the directory to which the OpenEmbedded build system writes
3937 overall log files. The default directory is ``${TMPDIR}/log``.
3938
3939 For the directory containing logs specific to each task, see the
3940 ```T`` <#var-T>`__ variable.
3941
3942MACHINE
3943 Specifies the target device for which the image is built. You define
3944 ``MACHINE`` in the ``local.conf`` file found in the `Build
3945 Directory <#build-directory>`__. By default, ``MACHINE`` is set to
3946 "qemux86", which is an x86-based architecture machine to be emulated
3947 using QEMU: MACHINE ?= "qemux86"
3948
3949 The variable corresponds to a machine configuration file of the same
3950 name, through which machine-specific configurations are set. Thus,
3951 when ``MACHINE`` is set to "qemux86" there exists the corresponding
3952 ``qemux86.conf`` machine configuration file, which can be found in
3953 the `Source Directory <#source-directory>`__ in
3954 ``meta/conf/machine``.
3955
3956 The list of machines supported by the Yocto Project as shipped
3957 include the following: MACHINE ?= "qemuarm" MACHINE ?= "qemuarm64"
3958 MACHINE ?= "qemumips" MACHINE ?= "qemumips64" MACHINE ?= "qemuppc"
3959 MACHINE ?= "qemux86" MACHINE ?= "qemux86-64" MACHINE ?= "genericx86"
3960 MACHINE ?= "genericx86-64" MACHINE ?= "beaglebone" MACHINE ?=
3961 "edgerouter" The last five are Yocto Project reference hardware
3962 boards, which are provided in the ``meta-yocto-bsp`` layer.
3963
3964 .. note::
3965
3966 Adding additional Board Support Package (BSP) layers to your
3967 configuration adds new possible settings for
3968 MACHINE
3969 .
3970
3971MACHINE_ARCH
3972 Specifies the name of the machine-specific architecture. This
3973 variable is set automatically from ```MACHINE`` <#var-MACHINE>`__ or
3974 ```TUNE_PKGARCH`` <#var-TUNE_PKGARCH>`__. You should not hand-edit
3975 the ``MACHINE_ARCH`` variable.
3976
3977MACHINE_ESSENTIAL_EXTRA_RDEPENDS
3978 A list of required machine-specific packages to install as part of
3979 the image being built. The build process depends on these packages
3980 being present. Furthermore, because this is a "machine-essential"
3981 variable, the list of packages are essential for the machine to boot.
3982 The impact of this variable affects images based on
3983 ``packagegroup-core-boot``, including the ``core-image-minimal``
3984 image.
3985
3986 This variable is similar to the
3987 ``MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`` variable with the exception
3988 that the image being built has a build dependency on the variable's
3989 list of packages. In other words, the image will not build if a file
3990 in this list is not found.
3991
3992 As an example, suppose the machine for which you are building
3993 requires ``example-init`` to be run during boot to initialize the
3994 hardware. In this case, you would use the following in the machine's
3995 ``.conf`` configuration file: MACHINE_ESSENTIAL_EXTRA_RDEPENDS +=
3996 "example-init"
3997
3998MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS
3999 A list of recommended machine-specific packages to install as part of
4000 the image being built. The build process does not depend on these
4001 packages being present. However, because this is a
4002 "machine-essential" variable, the list of packages are essential for
4003 the machine to boot. The impact of this variable affects images based
4004 on ``packagegroup-core-boot``, including the ``core-image-minimal``
4005 image.
4006
4007 This variable is similar to the ``MACHINE_ESSENTIAL_EXTRA_RDEPENDS``
4008 variable with the exception that the image being built does not have
4009 a build dependency on the variable's list of packages. In other
4010 words, the image will still build if a package in this list is not
4011 found. Typically, this variable is used to handle essential kernel
4012 modules, whose functionality may be selected to be built into the
4013 kernel rather than as a module, in which case a package will not be
4014 produced.
4015
4016 Consider an example where you have a custom kernel where a specific
4017 touchscreen driver is required for the machine to be usable. However,
4018 the driver can be built as a module or into the kernel depending on
4019 the kernel configuration. If the driver is built as a module, you
4020 want it to be installed. But, when the driver is built into the
4021 kernel, you still want the build to succeed. This variable sets up a
4022 "recommends" relationship so that in the latter case, the build will
4023 not fail due to the missing package. To accomplish this, assuming the
4024 package for the module was called ``kernel-module-ab123``, you would
4025 use the following in the machine's ``.conf`` configuration file:
4026 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
4027
4028 .. note::
4029
4030 In this example, the
4031 kernel-module-ab123
4032 recipe needs to explicitly set its
4033 PACKAGES
4034 variable to ensure that BitBake does not use the kernel recipe's
4035 PACKAGES_DYNAMIC
4036 variable to satisfy the dependency.
4037
4038 Some examples of these machine essentials are flash, screen,
4039 keyboard, mouse, or touchscreen drivers (depending on the machine).
4040
4041MACHINE_EXTRA_RDEPENDS
4042 A list of machine-specific packages to install as part of the image
4043 being built that are not essential for the machine to boot. However,
4044 the build process for more fully-featured images depends on the
4045 packages being present.
4046
4047 This variable affects all images based on ``packagegroup-base``,
4048 which does not include the ``core-image-minimal`` or
4049 ``core-image-full-cmdline`` images.
4050
4051 The variable is similar to the ``MACHINE_EXTRA_RRECOMMENDS`` variable
4052 with the exception that the image being built has a build dependency
4053 on the variable's list of packages. In other words, the image will
4054 not build if a file in this list is not found.
4055
4056 An example is a machine that has WiFi capability but is not essential
4057 for the machine to boot the image. However, if you are building a
4058 more fully-featured image, you want to enable the WiFi. The package
4059 containing the firmware for the WiFi hardware is always expected to
4060 exist, so it is acceptable for the build process to depend upon
4061 finding the package. In this case, assuming the package for the
4062 firmware was called ``wifidriver-firmware``, you would use the
4063 following in the ``.conf`` file for the machine:
4064 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
4065
4066MACHINE_EXTRA_RRECOMMENDS
4067 A list of machine-specific packages to install as part of the image
4068 being built that are not essential for booting the machine. The image
4069 being built has no build dependency on this list of packages.
4070
4071 This variable affects only images based on ``packagegroup-base``,
4072 which does not include the ``core-image-minimal`` or
4073 ``core-image-full-cmdline`` images.
4074
4075 This variable is similar to the ``MACHINE_EXTRA_RDEPENDS`` variable
4076 with the exception that the image being built does not have a build
4077 dependency on the variable's list of packages. In other words, the
4078 image will build if a file in this list is not found.
4079
4080 An example is a machine that has WiFi capability but is not essential
4081 For the machine to boot the image. However, if you are building a
4082 more fully-featured image, you want to enable WiFi. In this case, the
4083 package containing the WiFi kernel module will not be produced if the
4084 WiFi driver is built into the kernel, in which case you still want
4085 the build to succeed instead of failing as a result of the package
4086 not being found. To accomplish this, assuming the package for the
4087 module was called ``kernel-module-examplewifi``, you would use the
4088 following in the ``.conf`` file for the machine:
4089 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
4090
4091MACHINE_FEATURES
4092 Specifies the list of hardware features the
4093 ```MACHINE`` <#var-MACHINE>`__ is capable of supporting. For related
4094 information on enabling features, see the
4095 ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__,
4096 ```COMBINED_FEATURES`` <#var-COMBINED_FEATURES>`__, and
4097 ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__ variables.
4098
4099 For a list of hardware features supported by the Yocto Project as
4100 shipped, see the "`Machine Features <#ref-features-machine>`__"
4101 section.
4102
4103MACHINE_FEATURES_BACKFILL
4104 Features to be added to ``MACHINE_FEATURES`` if not also present in
4105 ``MACHINE_FEATURES_BACKFILL_CONSIDERED``.
4106
4107 This variable is set in the ``meta/conf/bitbake.conf`` file. It is
4108 not intended to be user-configurable. It is best to just reference
4109 the variable to see which machine features are being backfilled for
4110 all machine configurations. See the "`Feature
4111 Backfilling <#ref-features-backfill>`__" section for more
4112 information.
4113
4114MACHINE_FEATURES_BACKFILL_CONSIDERED
4115 Features from ``MACHINE_FEATURES_BACKFILL`` that should not be
4116 backfilled (i.e. added to ``MACHINE_FEATURES``) during the build. See
4117 the "`Feature Backfilling <#ref-features-backfill>`__" section for
4118 more information.
4119
4120MACHINEOVERRIDES
4121 A colon-separated list of overrides that apply to the current
4122 machine. By default, this list includes the value of
4123 ```MACHINE`` <#var-MACHINE>`__.
4124
4125 You can extend ``MACHINEOVERRIDES`` to add extra overrides that
4126 should apply to a machine. For example, all machines emulated in QEMU
4127 (e.g. ``qemuarm``, ``qemux86``, and so forth) include a file named
4128 ``meta/conf/machine/include/qemu.inc`` that prepends the following
4129 override to ``MACHINEOVERRIDES``: MACHINEOVERRIDES =. "qemuall:" This
4130 override allows variables to be overriden for all machines emulated
4131 in QEMU, like in the following example from the ``connman-conf``
4132 recipe: SRC_URI_append_qemuall = "file://wired.config \\
4133 file://wired-setup \\ " The underlying mechanism behind
4134 ``MACHINEOVERRIDES`` is simply that it is included in the default
4135 value of ```OVERRIDES`` <#var-OVERRIDES>`__.
4136
4137MAINTAINER
4138 The email address of the distribution maintainer.
4139
4140MIRRORS
4141 Specifies additional paths from which the OpenEmbedded build system
4142 gets source code. When the build system searches for source code, it
4143 first tries the local download directory. If that location fails, the
4144 build system tries locations defined by
4145 ```PREMIRRORS`` <#var-PREMIRRORS>`__, the upstream source, and then
4146 locations specified by ``MIRRORS`` in that order.
4147
4148 Assuming your distribution (```DISTRO`` <#var-DISTRO>`__) is "poky",
4149 the default value for ``MIRRORS`` is defined in the
4150 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
4151
4152MLPREFIX
4153 Specifies a prefix has been added to ```PN`` <#var-PN>`__ to create a
4154 special version of a recipe or package (i.e. a Multilib version). The
4155 variable is used in places where the prefix needs to be added to or
4156 removed from a the name (e.g. the ```BPN`` <#var-BPN>`__ variable).
4157 ``MLPREFIX`` gets set when a prefix has been added to ``PN``.
4158
4159 .. note::
4160
4161 The "ML" in
4162 MLPREFIX
4163 stands for "MultiLib". This representation is historical and comes
4164 from a time when
4165 nativesdk
4166 was a suffix rather than a prefix on the recipe name. When
4167 nativesdk
4168 was turned into a prefix, it made sense to set
4169 MLPREFIX
4170 for it as well.
4171
4172 To help understand when ``MLPREFIX`` might be needed, consider when
4173 ```BBCLASSEXTEND`` <#var-BBCLASSEXTEND>`__ is used to provide a
4174 ``nativesdk`` version of a recipe in addition to the target version.
4175 If that recipe declares build-time dependencies on tasks in other
4176 recipes by using ```DEPENDS`` <#var-DEPENDS>`__, then a dependency on
4177 "foo" will automatically get rewritten to a dependency on
4178 "nativesdk-foo". However, dependencies like the following will not
4179 get rewritten automatically: do_foo[depends] += "recipe:do_foo" If
4180 you want such a dependency to also get transformed, you can do the
4181 following: do_foo[depends] += "${MLPREFIX}recipe:do_foo"
4182
4183module_autoload
4184 This variable has been replaced by the ``KERNEL_MODULE_AUTOLOAD``
4185 variable. You should replace all occurrences of ``module_autoload``
4186 with additions to ``KERNEL_MODULE_AUTOLOAD``, for example:
4187 module_autoload_rfcomm = "rfcomm"
4188
4189 should now be replaced with: KERNEL_MODULE_AUTOLOAD += "rfcomm" See
4190 the ```KERNEL_MODULE_AUTOLOAD`` <#var-KERNEL_MODULE_AUTOLOAD>`__
4191 variable for more information.
4192
4193module_conf
4194 Specifies ```modprobe.d`` <http://linux.die.net/man/5/modprobe.d>`__
4195 syntax lines for inclusion in the ``/etc/modprobe.d/modname.conf``
4196 file.
4197
4198 You can use this variable anywhere that it can be recognized by the
4199 kernel recipe or out-of-tree kernel module recipe (e.g. a machine
4200 configuration file, a distribution configuration file, an append file
4201 for the recipe, or the recipe itself). If you use this variable, you
4202 must also be sure to list the module name in the
4203 ```KERNEL_MODULE_AUTOLOAD`` <#var-KERNEL_MODULE_AUTOLOAD>`__
4204 variable.
4205
4206 Here is the general syntax: module_conf_module_name =
4207 "modprobe.d-syntax" You must use the kernel module name override.
4208
4209 Run ``man modprobe.d`` in the shell to find out more information on
4210 the exact syntax you want to provide with ``module_conf``.
4211
4212 Including ``module_conf`` causes the OpenEmbedded build system to
4213 populate the ``/etc/modprobe.d/modname.conf`` file with
4214 ``modprobe.d`` syntax lines. Here is an example that adds the options
4215 ``arg1`` and ``arg2`` to a module named ``mymodule``:
4216 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
4217
4218 For information on how to specify kernel modules to auto-load on
4219 boot, see the
4220 ```KERNEL_MODULE_AUTOLOAD`` <#var-KERNEL_MODULE_AUTOLOAD>`__
4221 variable.
4222
4223MODULE_TARBALL_DEPLOY
4224 Controls creation of the ``modules-*.tgz`` file. Set this variable to
4225 "0" to disable creation of this file, which contains all of the
4226 kernel modules resulting from a kernel build.
4227
4228MODULE_TARBALL_LINK_NAME
4229 The link name of the kernel module tarball. This variable is set in
4230 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
4231 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" The value
4232 of the ``KERNEL_ARTIFACT_LINK_NAME`` variable, which is set in the
4233 same file, has the following value: KERNEL_ARTIFACT_LINK_NAME ?=
4234 "${MACHINE}"
4235
4236 See the ```MACHINE`` <#var-MACHINE>`__ variable for additional
4237 information.
4238
4239MODULE_TARBALL_NAME
4240 The base name of the kernel module tarball. This variable is set in
4241 the ``meta/classes/kernel-artifact-names.bbclass`` file as follows:
4242 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" The value of the
4243 ```KERNEL_ARTIFACT_NAME`` <#var-KERNEL_ARTIFACT_NAME>`__ variable,
4244 which is set in the same file, has the following value:
4245 KERNEL_ARTIFACT_NAME ?=
4246 "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
4247
4248MULTIMACH_TARGET_SYS
4249 Uniquely identifies the type of the target system for which packages
4250 are being built. This variable allows output for different types of
4251 target systems to be put into different subdirectories of the same
4252 output directory.
4253
4254 The default value of this variable is:
4255 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS} Some classes (e.g.
4256 ```cross-canadian`` <#ref-classes-cross-canadian>`__) modify the
4257 ``MULTIMACH_TARGET_SYS`` value.
4258
4259 See the ```STAMP`` <#var-STAMP>`__ variable for an example. See the
4260 ```STAGING_DIR_TARGET`` <#var-STAGING_DIR_TARGET>`__ variable for
4261 more information.
4262
4263NATIVELSBSTRING
4264 A string identifying the host distribution. Strings consist of the
4265 host distributor ID followed by the release, as reported by the
4266 ``lsb_release`` tool or as read from ``/etc/lsb-release``. For
4267 example, when running a build on Ubuntu 12.10, the value is
4268 "Ubuntu-12.10". If this information is unable to be determined, the
4269 value resolves to "Unknown".
4270
4271 This variable is used by default to isolate native shared state
4272 packages for different distributions (e.g. to avoid problems with
4273 ``glibc`` version incompatibilities). Additionally, the variable is
4274 checked against
4275 ```SANITY_TESTED_DISTROS`` <#var-SANITY_TESTED_DISTROS>`__ if that
4276 variable is set.
4277
4278NM
4279 The minimal command and arguments to run ``nm``.
4280
4281NO_GENERIC_LICENSE
4282 Avoids QA errors when you use a non-common, non-CLOSED license in a
4283 recipe. Packages exist, such as the linux-firmware package, with many
4284 licenses that are not in any way common. Also, new licenses are added
4285 occasionally to avoid introducing a lot of common license files,
4286 which are only applicable to a specific package.
4287 ``NO_GENERIC_LICENSE`` is used to allow copying a license that does
4288 not exist in common licenses.
4289
4290 The following example shows how to add ``NO_GENERIC_LICENSE`` to a
4291 recipe: NO_GENERIC_LICENSE[license_name] =
4292 "license_file_in_fetched_source" The following is an example that
4293 uses the ``LICENSE.Abilis.txt`` file as the license from the fetched
4294 source: NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
4295
4296NO_RECOMMENDATIONS
4297 Prevents installation of all "recommended-only" packages.
4298 Recommended-only packages are packages installed only through the
4299 ```RRECOMMENDS`` <#var-RRECOMMENDS>`__ variable). Setting the
4300 ``NO_RECOMMENDATIONS`` variable to "1" turns this feature on:
4301 NO_RECOMMENDATIONS = "1"
4302
4303 You can set this variable globally in your ``local.conf`` file or you
4304 can attach it to a specific image recipe by using the recipe name
4305 override: NO_RECOMMENDATIONS_pn-target_image = "1"
4306
4307 It is important to realize that if you choose to not install packages
4308 using this variable and some other packages are dependent on them
4309 (i.e. listed in a recipe's ```RDEPENDS`` <#var-RDEPENDS>`__
4310 variable), the OpenEmbedded build system ignores your request and
4311 will install the packages to avoid dependency errors.
4312
4313 .. note::
4314
4315 Some recommended packages might be required for certain system
4316 functionality, such as kernel modules. It is up to you to add
4317 packages with the
4318 IMAGE_INSTALL
4319 variable.
4320
4321 Support for this variable exists only when using the IPK and RPM
4322 packaging backend. Support does not exist for DEB.
4323
4324 See the ```BAD_RECOMMENDATIONS`` <#var-BAD_RECOMMENDATIONS>`__ and
4325 the ```PACKAGE_EXCLUDE`` <#var-PACKAGE_EXCLUDE>`__ variables for
4326 related information.
4327
4328NOAUTOPACKAGEDEBUG
4329 Disables auto package from splitting ``.debug`` files. If a recipe
4330 requires ``FILES_${PN}-dbg`` to be set manually, the
4331 ``NOAUTOPACKAGEDEBUG`` can be defined allowing you to define the
4332 content of the debug package. For example: NOAUTOPACKAGEDEBUG = "1"
4333 FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" FILES_${PN}-dbg
4334 = "/usr/src/debug/" FILES_${QT_BASE_NAME}-demos-doc =
4335 "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
4336
4337OBJCOPY
4338 The minimal command and arguments to run ``objcopy``.
4339
4340OBJDUMP
4341 The minimal command and arguments to run ``objdump``.
4342
4343OE_BINCONFIG_EXTRA_MANGLE
4344 When inheriting the ```binconfig`` <#ref-classes-binconfig>`__ class,
4345 this variable specifies additional arguments passed to the "sed"
4346 command. The sed command alters any paths in configuration scripts
4347 that have been set up during compilation. Inheriting this class
4348 results in all paths in these scripts being changed to point into the
4349 ``sysroots/`` directory so that all builds that use the script will
4350 use the correct directories for the cross compiling layout.
4351
4352 See the ``meta/classes/binconfig.bbclass`` in the `Source
4353 Directory <#source-directory>`__ for details on how this class
4354 applies these additional sed command arguments. For general
4355 information on the ``binconfig`` class, see the
4356 "```binconfig.bbclass`` <#ref-classes-binconfig>`__" section.
4357
4358OE_IMPORTS
4359 An internal variable used to tell the OpenEmbedded build system what
4360 Python modules to import for every Python function run by the system.
4361
4362 .. note::
4363
4364 Do not set this variable. It is for internal use only.
4365
4366OE_INIT_ENV_SCRIPT
4367 The name of the build environment setup script for the purposes of
4368 setting up the environment within the extensible SDK. The default
4369 value is "oe-init-build-env".
4370
4371 If you use a custom script to set up your build environment, set the
4372 ``OE_INIT_ENV_SCRIPT`` variable to its name.
4373
4374OE_TERMINAL
4375 Controls how the OpenEmbedded build system spawns interactive
4376 terminals on the host development system (e.g. using the BitBake
4377 command with the ``-c devshell`` command-line option). For more
4378 information, see the "`Using a Development
4379 Shell <&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell>`__" section in
4380 the Yocto Project Development Tasks Manual.
4381
4382 You can use the following values for the ``OE_TERMINAL`` variable:
4383 auto gnome xfce rxvt screen konsole none
4384
4385OEROOT
4386 The directory from which the top-level build environment setup script
4387 is sourced. The Yocto Project provides a top-level build environment
4388 setup script: ````` <#structure-core-script>`__. When you run this
4389 script, the ``OEROOT`` variable resolves to the directory that
4390 contains the script.
4391
4392 For additional information on how this variable is used, see the
4393 initialization script.
4394
4395OLDEST_KERNEL
4396 Declares the oldest version of the Linux kernel that the produced
4397 binaries must support. This variable is passed into the build of the
4398 Embedded GNU C Library (``glibc``).
4399
4400 The default for this variable comes from the
4401 ``meta/conf/bitbake.conf`` configuration file. You can override this
4402 default by setting the variable in a custom distribution
4403 configuration file.
4404
4405OVERRIDES
4406 A colon-separated list of overrides that currently apply. Overrides
4407 are a BitBake mechanism that allows variables to be selectively
4408 overridden at the end of parsing. The set of overrides in
4409 ``OVERRIDES`` represents the "state" during building, which includes
4410 the current recipe being built, the machine for which it is being
4411 built, and so forth.
4412
4413 As an example, if the string "an-override" appears as an element in
4414 the colon-separated list in ``OVERRIDES``, then the following
4415 assignment will override ``FOO`` with the value "overridden" at the
4416 end of parsing: FOO_an-override = "overridden" See the "`Conditional
4417 Syntax
4418 (Overrides) <&YOCTO_DOCS_BB_URL;#conditional-syntax-overrides>`__"
4419 section in the BitBake User Manual for more information on the
4420 overrides mechanism.
4421
4422 The default value of ``OVERRIDES`` includes the values of the
4423 ```CLASSOVERRIDE`` <#var-CLASSOVERRIDE>`__,
4424 ```MACHINEOVERRIDES`` <#var-MACHINEOVERRIDES>`__, and
4425 ```DISTROOVERRIDES`` <#var-DISTROOVERRIDES>`__ variables. Another
4426 important override included by default is ``pn-${PN}``. This override
4427 allows variables to be set for a single recipe within configuration
4428 (``.conf``) files. Here is an example: FOO_pn-myrecipe =
4429 "myrecipe-specific value"
4430
4431 .. note::
4432
4433 An easy way to see what overrides apply is to search for
4434 OVERRIDES
4435 in the output of the
4436 bitbake -e
4437 command. See the "
4438 Viewing Variable Values
4439 " section in the Yocto Project Development Tasks Manual for more
4440 information.
4441
4442P
4443 The recipe name and version. ``P`` is comprised of the following:
4444 ${PN}-${PV}
4445
4446PACKAGE_ADD_METADATA
4447 This variable defines additional metdata to add to packages.
4448
4449 You may find you need to inject additional metadata into packages.
4450 This variable allows you to do that by setting the injected data as
4451 the value. Multiple fields can be added by splitting the content with
4452 the literal separator "\n".
4453
4454 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to the variable
4455 to do package type specific settings. It can also be made package
4456 specific by using the package name as a suffix.
4457
4458 You can find out more about applying this variable in the "`Adding
4459 custom metadata to
4460 packages <&YOCTO_DOCS_DEV_URL;#adding-custom-metadata-to-packages>`__"
4461 section in the Yocto Project Development Tasks Manual.
4462
4463PACKAGE_ARCH
4464 The architecture of the resulting package or packages.
4465
4466 By default, the value of this variable is set to
4467 ```TUNE_PKGARCH`` <#var-TUNE_PKGARCH>`__ when building for the
4468 target, ```BUILD_ARCH`` <#var-BUILD_ARCH>`__ when building for the
4469 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building for the
4470 SDK.
4471
4472 .. note::
4473
4474 See
4475 SDK_ARCH
4476 for more information.
4477
4478 However, if your recipe's output packages are built specific to the
4479 target machine rather than generally for the architecture of the
4480 machine, you should set ``PACKAGE_ARCH`` to the value of
4481 ```MACHINE_ARCH`` <#var-MACHINE_ARCH>`__ in the recipe as follows:
4482 PACKAGE_ARCH = "${MACHINE_ARCH}"
4483
4484PACKAGE_ARCHS
4485 Specifies a list of architectures compatible with the target machine.
4486 This variable is set automatically and should not normally be
4487 hand-edited. Entries are separated using spaces and listed in order
4488 of priority. The default value for ``PACKAGE_ARCHS`` is "all any
4489 noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
4490
4491PACKAGE_BEFORE_PN
4492 Enables easily adding packages to ``PACKAGES`` before ``${PN}`` so
4493 that those added packages can pick up files that would normally be
4494 included in the default package.
4495
4496PACKAGE_CLASSES
4497 This variable, which is set in the ``local.conf`` configuration file
4498 found in the ``conf`` folder of the `Build
4499 Directory <#build-directory>`__, specifies the package manager the
4500 OpenEmbedded build system uses when packaging data.
4501
4502 You can provide one or more of the following arguments for the
4503 variable: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk
4504 package_tar"
4505
4506 .. note::
4507
4508 While it is a legal option, the
4509 package_tar
4510 class has limited functionality due to no support for package
4511 dependencies by that backend. Therefore, it is recommended that
4512 you do not use it.
4513
4514 The build system uses only the first argument in the list as the
4515 package manager when creating your image or SDK. However, packages
4516 will be created using any additional packaging classes you specify.
4517 For example, if you use the following in your ``local.conf`` file:
4518 PACKAGE_CLASSES ?= "package_ipk" The OpenEmbedded build system uses
4519 the IPK package manager to create your image or SDK.
4520
4521 For information on packaging and build performance effects as a
4522 result of the package manager in use, see the
4523 "```package.bbclass`` <#ref-classes-package>`__" section.
4524
4525PACKAGE_DEBUG_SPLIT_STYLE
4526 Determines how to split up the binary and debug information when
4527 creating ``*-dbg`` packages to be used with the GNU Project Debugger
4528 (GDB).
4529
4530 With the ``PACKAGE_DEBUG_SPLIT_STYLE`` variable, you can control
4531 where debug information, which can include or exclude source files,
4532 is stored:
4533
4534 - ".debug": Debug symbol files are placed next to the binary in a
4535 ``.debug`` directory on the target. For example, if a binary is
4536 installed into ``/bin``, the corresponding debug symbol files are
4537 installed in ``/bin/.debug``. Source files are placed in
4538 ``/usr/src/debug``.
4539
4540 - "debug-file-directory": Debug symbol files are placed under
4541 ``/usr/lib/debug`` on the target, and separated by the path from
4542 where the binary is installed. For example, if a binary is
4543 installed in ``/bin``, the corresponding debug symbols are
4544 installed in ``/usr/lib/debug/bin``. Source files are placed in
4545 ``/usr/src/debug``.
4546
4547 - "debug-without-src": The same behavior as ".debug" previously
4548 described with the exception that no source files are installed.
4549
4550 - "debug-with-srcpkg": The same behavior as ".debug" previously
4551 described with the exception that all source files are placed in a
4552 separate ``*-src`` pkg. This is the default behavior.
4553
4554 You can find out more about debugging using GDB by reading the
4555 "`Debugging With the GNU Project Debugger (GDB)
4556 Remotely <&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug>`__" section
4557 in the Yocto Project Development Tasks Manual.
4558
4559PACKAGE_EXCLUDE_COMPLEMENTARY
4560 Prevents specific packages from being installed when you are
4561 installing complementary packages.
4562
4563 You might find that you want to prevent installing certain packages
4564 when you are installing complementary packages. For example, if you
4565 are using ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__ to install
4566 ``dev-pkgs``, you might not want to install all packages from a
4567 particular multilib. If you find yourself in this situation, you can
4568 use the ``PACKAGE_EXCLUDE_COMPLEMENTARY`` variable to specify regular
4569 expressions to match the packages you want to exclude.
4570
4571PACKAGE_EXCLUDE
4572 Lists packages that should not be installed into an image. For
4573 example: PACKAGE_EXCLUDE = "package_name package_name package_name
4574 ..."
4575
4576 You can set this variable globally in your ``local.conf`` file or you
4577 can attach it to a specific image recipe by using the recipe name
4578 override: PACKAGE_EXCLUDE_pn-target_image = "package_name"
4579
4580 If you choose to not install a package using this variable and some
4581 other package is dependent on it (i.e. listed in a recipe's
4582 ```RDEPENDS`` <#var-RDEPENDS>`__ variable), the OpenEmbedded build
4583 system generates a fatal installation error. Because the build system
4584 halts the process with a fatal error, you can use the variable with
4585 an iterative development process to remove specific components from a
4586 system.
4587
4588 Support for this variable exists only when using the IPK and RPM
4589 packaging backend. Support does not exist for DEB.
4590
4591 See the ```NO_RECOMMENDATIONS`` <#var-NO_RECOMMENDATIONS>`__ and the
4592 ```BAD_RECOMMENDATIONS`` <#var-BAD_RECOMMENDATIONS>`__ variables for
4593 related information.
4594
4595PACKAGE_EXTRA_ARCHS
4596 Specifies the list of architectures compatible with the device CPU.
4597 This variable is useful when you build for several different devices
4598 that use miscellaneous processors such as XScale and ARM926-EJS.
4599
4600PACKAGE_FEED_ARCHS
4601 Optionally specifies the package architectures used as part of the
4602 package feed URIs during the build. When used, the
4603 ``PACKAGE_FEED_ARCHS`` variable is appended to the final package feed
4604 URI, which is constructed using the
4605 ```PACKAGE_FEED_URIS`` <#var-PACKAGE_FEED_URIS>`__ and
4606 ```PACKAGE_FEED_BASE_PATHS`` <#var-PACKAGE_FEED_BASE_PATHS>`__
4607 variables.
4608
4609 .. note::
4610
4611 You can use the
4612 PACKAGE_FEEDS_ARCHS
4613 variable to whitelist specific package architectures. If you do
4614 not need to whitelist specific architectures, which is a common
4615 case, you can omit this variable. Omitting the variable results in
4616 all available architectures for the current machine being included
4617 into remote package feeds.
4618
4619 Consider the following example where the ``PACKAGE_FEED_URIS``,
4620 ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are
4621 defined in your ``local.conf`` file: PACKAGE_FEED_URIS =
4622 "https://example.com/packagerepos/release \\
4623 https://example.com/packagerepos/updates" PACKAGE_FEED_BASE_PATHS =
4624 "rpm rpm-dev" PACKAGE_FEED_ARCHS = "all core2-64" Given these
4625 settings, the resulting package feeds are as follows:
4626 https://example.com/packagerepos/release/rpm/all
4627 https://example.com/packagerepos/release/rpm/core2-64
4628 https://example.com/packagerepos/release/rpm-dev/all
4629 https://example.com/packagerepos/release/rpm-dev/core2-64
4630 https://example.com/packagerepos/updates/rpm/all
4631 https://example.com/packagerepos/updates/rpm/core2-64
4632 https://example.com/packagerepos/updates/rpm-dev/all
4633 https://example.com/packagerepos/updates/rpm-dev/core2-64
4634
4635PACKAGE_FEED_BASE_PATHS
4636 Specifies the base path used when constructing package feed URIs. The
4637 ``PACKAGE_FEED_BASE_PATHS`` variable makes up the middle portion of a
4638 package feed URI used by the OpenEmbedded build system. The base path
4639 lies between the ```PACKAGE_FEED_URIS`` <#var-PACKAGE_FEED_URIS>`__
4640 and ```PACKAGE_FEED_ARCHS`` <#var-PACKAGE_FEED_ARCHS>`__ variables.
4641
4642 Consider the following example where the ``PACKAGE_FEED_URIS``,
4643 ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are
4644 defined in your ``local.conf`` file: PACKAGE_FEED_URIS =
4645 "https://example.com/packagerepos/release \\
4646 https://example.com/packagerepos/updates" PACKAGE_FEED_BASE_PATHS =
4647 "rpm rpm-dev" PACKAGE_FEED_ARCHS = "all core2-64" Given these
4648 settings, the resulting package feeds are as follows:
4649 https://example.com/packagerepos/release/rpm/all
4650 https://example.com/packagerepos/release/rpm/core2-64
4651 https://example.com/packagerepos/release/rpm-dev/all
4652 https://example.com/packagerepos/release/rpm-dev/core2-64
4653 https://example.com/packagerepos/updates/rpm/all
4654 https://example.com/packagerepos/updates/rpm/core2-64
4655 https://example.com/packagerepos/updates/rpm-dev/all
4656 https://example.com/packagerepos/updates/rpm-dev/core2-64
4657
4658PACKAGE_FEED_URIS
4659 Specifies the front portion of the package feed URI used by the
4660 OpenEmbedded build system. Each final package feed URI is comprised
4661 of ``PACKAGE_FEED_URIS``,
4662 ```PACKAGE_FEED_BASE_PATHS`` <#var-PACKAGE_FEED_BASE_PATHS>`__, and
4663 ```PACKAGE_FEED_ARCHS`` <#var-PACKAGE_FEED_ARCHS>`__ variables.
4664
4665 Consider the following example where the ``PACKAGE_FEED_URIS``,
4666 ``PACKAGE_FEED_BASE_PATHS``, and ``PACKAGE_FEED_ARCHS`` variables are
4667 defined in your ``local.conf`` file: PACKAGE_FEED_URIS =
4668 "https://example.com/packagerepos/release \\
4669 https://example.com/packagerepos/updates" PACKAGE_FEED_BASE_PATHS =
4670 "rpm rpm-dev" PACKAGE_FEED_ARCHS = "all core2-64" Given these
4671 settings, the resulting package feeds are as follows:
4672 https://example.com/packagerepos/release/rpm/all
4673 https://example.com/packagerepos/release/rpm/core2-64
4674 https://example.com/packagerepos/release/rpm-dev/all
4675 https://example.com/packagerepos/release/rpm-dev/core2-64
4676 https://example.com/packagerepos/updates/rpm/all
4677 https://example.com/packagerepos/updates/rpm/core2-64
4678 https://example.com/packagerepos/updates/rpm-dev/all
4679 https://example.com/packagerepos/updates/rpm-dev/core2-64
4680
4681PACKAGE_INSTALL
4682 The final list of packages passed to the package manager for
4683 installation into the image.
4684
4685 Because the package manager controls actual installation of all
4686 packages, the list of packages passed using ``PACKAGE_INSTALL`` is
4687 not the final list of packages that are actually installed. This
4688 variable is internal to the image construction code. Consequently, in
4689 general, you should use the
4690 ```IMAGE_INSTALL`` <#var-IMAGE_INSTALL>`__ variable to specify
4691 packages for installation. The exception to this is when working with
4692 the
4693 ```core-image-minimal-initramfs`` <#images-core-image-minimal-initramfs>`__
4694 image. When working with an initial RAM filesystem (initramfs) image,
4695 use the ``PACKAGE_INSTALL`` variable. For information on creating an
4696 initramfs, see the "`Building an Initial RAM Filesystem (initramfs)
4697 Image <&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image>`__" section
4698 in the Yocto Project Development Tasks Manual.
4699
4700PACKAGE_INSTALL_ATTEMPTONLY
4701 Specifies a list of packages the OpenEmbedded build system attempts
4702 to install when creating an image. If a listed package fails to
4703 install, the build system does not generate an error. This variable
4704 is generally not user-defined.
4705
4706PACKAGE_PREPROCESS_FUNCS
4707 Specifies a list of functions run to pre-process the
4708 ```PKGD`` <#var-PKGD>`__ directory prior to splitting the files out
4709 to individual packages.
4710
4711PACKAGE_WRITE_DEPS
4712 Specifies a list of dependencies for post-installation and
4713 pre-installation scripts on native/cross tools. If your
4714 post-installation or pre-installation script can execute at rootfs
4715 creation time rather than on the target but depends on a native tool
4716 in order to execute, you need to list the tools in
4717 ``PACKAGE_WRITE_DEPS``.
4718
4719 For information on running post-installation scripts, see the
4720 "`Post-Installation
4721 Scripts <&YOCTO_DOCS_DEV_URL;#new-recipe-post-installation-scripts>`__"
4722 section in the Yocto Project Development Tasks Manual.
4723
4724PACKAGECONFIG
4725 This variable provides a means of enabling or disabling features of a
4726 recipe on a per-recipe basis. ``PACKAGECONFIG`` blocks are defined in
4727 recipes when you specify features and then arguments that define
4728 feature behaviors. Here is the basic block structure (broken over
4729 multiple lines for readability): PACKAGECONFIG ??= "f1 f2 f3 ..."
4730 PACKAGECONFIG[f1] = "\\ --with-f1, \\ --without-f1, \\
4731 build-deps-for-f1, \\ runtime-deps-for-f1, \\
4732 runtime-recommends-for-f1, \\ packageconfig-conflicts-for-f1 \\ "
4733 PACKAGECONFIG[f2] = "\\ ... and so on and so on ...
4734
4735 The ``PACKAGECONFIG`` variable itself specifies a space-separated
4736 list of the features to enable. Following the features, you can
4737 determine the behavior of each feature by providing up to six
4738 order-dependent arguments, which are separated by commas. You can
4739 omit any argument you like but must retain the separating commas. The
4740 order is important and specifies the following:
4741
4742 1. Extra arguments that should be added to the configure script
4743 argument list (```EXTRA_OECONF`` <#var-EXTRA_OECONF>`__ or
4744 ```PACKAGECONFIG_CONFARGS`` <#var-PACKAGECONFIG_CONFARGS>`__) if
4745 the feature is enabled.
4746
4747 2. Extra arguments that should be added to ``EXTRA_OECONF`` or
4748 ``PACKAGECONFIG_CONFARGS`` if the feature is disabled.
4749
4750 3. Additional build dependencies (```DEPENDS`` <#var-DEPENDS>`__)
4751 that should be added if the feature is enabled.
4752
4753 4. Additional runtime dependencies (```RDEPENDS`` <#var-RDEPENDS>`__)
4754 that should be added if the feature is enabled.
4755
4756 5. Additional runtime recommendations
4757 (```RRECOMMENDS`` <#var-RRECOMMENDS>`__) that should be added if
4758 the feature is enabled.
4759
4760 6. Any conflicting (that is, mutually exclusive) ``PACKAGECONFIG``
4761 settings for this feature.
4762
4763 Consider the following ``PACKAGECONFIG`` block taken from the
4764 ``librsvg`` recipe. In this example the feature is ``gtk``, which has
4765 three arguments that determine the feature's behavior.
4766 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3" The
4767 ``--with-gtk3`` and ``gtk+3`` arguments apply only if the feature is
4768 enabled. In this case, ``--with-gtk3`` is added to the configure
4769 script argument list and ``gtk+3`` is added to ``DEPENDS``. On the
4770 other hand, if the feature is disabled say through a ``.bbappend``
4771 file in another layer, then the second argument ``--without-gtk3`` is
4772 added to the configure script instead.
4773
4774 The basic ``PACKAGECONFIG`` structure previously described holds true
4775 regardless of whether you are creating a block or changing a block.
4776 When creating a block, use the structure inside your recipe.
4777
4778 If you want to change an existing ``PACKAGECONFIG`` block, you can do
4779 so one of two ways:
4780
4781 - *Append file:* Create an append file named
4782 recipename\ ``.bbappend`` in your layer and override the value of
4783 ``PACKAGECONFIG``. You can either completely override the
4784 variable: PACKAGECONFIG = "f4 f5" Or, you can just append the
4785 variable: PACKAGECONFIG_append = " f4"
4786
4787 - *Configuration file:* This method is identical to changing the
4788 block through an append file except you edit your ``local.conf``
4789 or ``mydistro.conf`` file. As with append files previously
4790 described, you can either completely override the variable:
4791 PACKAGECONFIG_pn-recipename = "f4 f5" Or, you can just amend the
4792 variable: PACKAGECONFIG_append_pn-recipename = " f4"
4793
4794PACKAGECONFIG_CONFARGS
4795 A space-separated list of configuration options generated from the
4796 ```PACKAGECONFIG`` <#var-PACKAGECONFIG>`__ setting.
4797
4798 Classes such as ```autotools`` <#ref-classes-autotools>`__ and
4799 ```cmake`` <#ref-classes-cmake>`__ use ``PACKAGECONFIG_CONFARGS`` to
4800 pass ``PACKAGECONFIG`` options to ``configure`` and ``cmake``,
4801 respectively. If you are using ``PACKAGECONFIG`` but not a class that
4802 handles the ``do_configure`` task, then you need to use
4803 ``PACKAGECONFIG_CONFARGS`` appropriately.
4804
4805PACKAGEGROUP_DISABLE_COMPLEMENTARY
4806 For recipes inheriting the
4807 ```packagegroup`` <#ref-classes-packagegroup>`__ class, setting
4808 ``PACKAGEGROUP_DISABLE_COMPLEMENTARY`` to "1" specifies that the
4809 normal complementary packages (i.e. ``-dev``, ``-dbg``, and so forth)
4810 should not be automatically created by the ``packagegroup`` recipe,
4811 which is the default behavior.
4812
4813PACKAGES
4814 The list of packages the recipe creates. The default value is the
4815 following: ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale
4816 ${PACKAGE_BEFORE_PN} ${PN}
4817
4818 During packaging, the ```do_package`` <#ref-tasks-package>`__ task
4819 goes through ``PACKAGES`` and uses the ```FILES`` <#var-FILES>`__
4820 variable corresponding to each package to assign files to the
4821 package. If a file matches the ``FILES`` variable for more than one
4822 package in ``PACKAGES``, it will be assigned to the earliest
4823 (leftmost) package.
4824
4825 Packages in the variable's list that are empty (i.e. where none of
4826 the patterns in ``FILES_``\ pkg match any files installed by the
4827 ```do_install`` <#ref-tasks-install>`__ task) are not generated,
4828 unless generation is forced through the
4829 ```ALLOW_EMPTY`` <#var-ALLOW_EMPTY>`__ variable.
4830
4831PACKAGES_DYNAMIC
4832 A promise that your recipe satisfies runtime dependencies for
4833 optional modules that are found in other recipes.
4834 ``PACKAGES_DYNAMIC`` does not actually satisfy the dependencies, it
4835 only states that they should be satisfied. For example, if a hard,
4836 runtime dependency (```RDEPENDS`` <#var-RDEPENDS>`__) of another
4837 package is satisfied at build time through the ``PACKAGES_DYNAMIC``
4838 variable, but a package with the module name is never actually
4839 produced, then the other package will be broken. Thus, if you attempt
4840 to include that package in an image, you will get a dependency
4841 failure from the packaging system during the
4842 ```do_rootfs`` <#ref-tasks-rootfs>`__ task.
4843
4844 Typically, if there is a chance that such a situation can occur and
4845 the package that is not created is valid without the dependency being
4846 satisfied, then you should use ```RRECOMMENDS`` <#var-RRECOMMENDS>`__
4847 (a soft runtime dependency) instead of ``RDEPENDS``.
4848
4849 For an example of how to use the ``PACKAGES_DYNAMIC`` variable when
4850 you are splitting packages, see the "`Handling Optional Module
4851 Packaging <&YOCTO_DOCS_DEV_URL;#handling-optional-module-packaging>`__"
4852 section in the Yocto Project Development Tasks Manual.
4853
4854PACKAGESPLITFUNCS
4855 Specifies a list of functions run to perform additional splitting of
4856 files into individual packages. Recipes can either prepend to this
4857 variable or prepend to the ``populate_packages`` function in order to
4858 perform additional package splitting. In either case, the function
4859 should set ```PACKAGES`` <#var-PACKAGES>`__,
4860 ```FILES`` <#var-FILES>`__, ```RDEPENDS`` <#var-RDEPENDS>`__ and
4861 other packaging variables appropriately in order to perform the
4862 desired splitting.
4863
4864PARALLEL_MAKE
4865 Extra options passed to the ``make`` command during the
4866 ```do_compile`` <#ref-tasks-compile>`__ task in order to specify
4867 parallel compilation on the local build host. This variable is
4868 usually in the form "-j x", where x represents the maximum number of
4869 parallel threads ``make`` can run.
4870
4871 .. note::
4872
4873 In order for
4874 PARALLEL_MAKE
4875 to be effective,
4876 make
4877 must be called with
4878 ${
4879 EXTRA_OEMAKE
4880 }
4881 . An easy way to ensure this is to use the
4882 oe_runmake
4883 function.
4884
4885 By default, the OpenEmbedded build system automatically sets this
4886 variable to be equal to the number of cores the build system uses.
4887
4888 .. note::
4889
4890 If the software being built experiences dependency issues during
4891 the
4892 do_compile
4893 task that result in race conditions, you can clear the
4894 PARALLEL_MAKE
4895 variable within the recipe as a workaround. For information on
4896 addressing race conditions, see the "
4897 Debugging Parallel Make Races
4898 " section in the Yocto Project Development Tasks Manual.
4899
4900 For single socket systems (i.e. one CPU), you should not have to
4901 override this variable to gain optimal parallelism during builds.
4902 However, if you have very large systems that employ multiple physical
4903 CPUs, you might want to make sure the ``PARALLEL_MAKE`` variable is
4904 not set higher than "-j 20".
4905
4906 For more information on speeding up builds, see the "`Speeding Up a
4907 Build <&YOCTO_DOCS_DEV_URL;#speeding-up-a-build>`__" section in the
4908 Yocto Project Development Tasks Manual.
4909
4910PARALLEL_MAKEINST
4911 Extra options passed to the ``make install`` command during the
4912 ```do_install`` <#ref-tasks-install>`__ task in order to specify
4913 parallel installation. This variable defaults to the value of
4914 ```PARALLEL_MAKE`` <#var-PARALLEL_MAKE>`__.
4915
4916 .. note::
4917
4918 In order for ``PARALLEL_MAKEINST`` to be effective, ``make`` must
4919 be called with
4920 ``${``\ ```EXTRA_OEMAKE`` <#var-EXTRA_OEMAKE>`__\ ``}``. An easy
4921 way to ensure this is to use the ``oe_runmake`` function.
4922
4923 If the software being built experiences dependency issues during
4924 the ``do_install`` task that result in race conditions, you can
4925 clear the ``PARALLEL_MAKEINST`` variable within the recipe as a
4926 workaround. For information on addressing race conditions, see the
4927 "`Debugging Parallel Make
4928 Races <&YOCTO_DOCS_DEV_URL;#debugging-parallel-make-races>`__"
4929 section in the Yocto Project Development Tasks Manual.
4930
4931PATCHRESOLVE
4932 Determines the action to take when a patch fails. You can set this
4933 variable to one of two values: "noop" and "user".
4934
4935 The default value of "noop" causes the build to simply fail when the
4936 OpenEmbedded build system cannot successfully apply a patch. Setting
4937 the value to "user" causes the build system to launch a shell and
4938 places you in the right location so that you can manually resolve the
4939 conflicts.
4940
4941 Set this variable in your ``local.conf`` file.
4942
4943PATCHTOOL
4944 Specifies the utility used to apply patches for a recipe during the
4945 ```do_patch`` <#ref-tasks-patch>`__ task. You can specify one of
4946 three utilities: "patch", "quilt", or "git". The default utility used
4947 is "quilt" except for the quilt-native recipe itself. Because the
4948 quilt tool is not available at the time quilt-native is being
4949 patched, it uses "patch".
4950
4951 If you wish to use an alternative patching tool, set the variable in
4952 the recipe using one of the following: PATCHTOOL = "patch" PATCHTOOL
4953 = "quilt" PATCHTOOL = "git"
4954
4955PE
4956 The epoch of the recipe. By default, this variable is unset. The
4957 variable is used to make upgrades possible when the versioning scheme
4958 changes in some backwards incompatible way.
4959
4960 ``PE`` is the default value of the ```PKGE`` <#var-PKGE>`__ variable.
4961
4962PF
4963 Specifies the recipe or package name and includes all version and
4964 revision numbers (i.e. ``glibc-2.13-r20+svnr15508/`` and
4965 ``bash-4.2-r1/``). This variable is comprised of the following:
4966 ${`PN <#var-PN>`__}-${`EXTENDPE <#var-EXTENDPE>`__}${`PV <#var-PV>`__}-${`PR <#var-PR>`__}
4967
4968PIXBUF_PACKAGES
4969 When inheriting the ```pixbufcache`` <#ref-classes-pixbufcache>`__
4970 class, this variable identifies packages that contain the pixbuf
4971 loaders used with ``gdk-pixbuf``. By default, the ``pixbufcache``
4972 class assumes that the loaders are in the recipe's main package (i.e.
4973 ``${``\ ```PN`` <#var-PN>`__\ ``}``). Use this variable if the
4974 loaders you need are in a package other than that main package.
4975
4976PKG
4977 The name of the resulting package created by the OpenEmbedded build
4978 system.
4979
4980 .. note::
4981
4982 When using the
4983 PKG
4984 variable, you must use a package name override.
4985
4986 For example, when the ```debian`` <#ref-classes-debian>`__ class
4987 renames the output package, it does so by setting
4988 ``PKG_packagename``.
4989
4990PKG_CONFIG_PATH
4991 The path to ``pkg-config`` files for the current build context.
4992 ``pkg-config`` reads this variable from the environment.
4993
4994PKGD
4995 Points to the destination directory for files to be packaged before
4996 they are split into individual packages. This directory defaults to
4997 the following: ${WORKDIR}/package
4998
4999 Do not change this default.
5000
5001PKGDATA_DIR
5002 Points to a shared, global-state directory that holds data generated
5003 during the packaging process. During the packaging process, the
5004 ```do_packagedata`` <#ref-tasks-packagedata>`__ task packages data
5005 for each recipe and installs it into this temporary, shared area.
5006 This directory defaults to the following, which you should not
5007 change: ${STAGING_DIR_HOST}/pkgdata For examples of how this data is
5008 used, see the "`Automatically Added Runtime
5009 Dependencies <&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies>`__"
5010 section in the Yocto Project Overview and Concepts Manual and the
5011 "`Viewing Package Information with
5012 ``oe-pkgdata-util`` <&YOCTO_DOCS_DEV_URL;#viewing-package-information-with-oe-pkgdata-util>`__"
5013 section in the Yocto Project Development Tasks Manual. For more
5014 information on the shared, global-state directory, see
5015 ```STAGING_DIR_HOST`` <#var-STAGING_DIR_HOST>`__.
5016
5017PKGDEST
5018 Points to the parent directory for files to be packaged after they
5019 have been split into individual packages. This directory defaults to
5020 the following: ${WORKDIR}/packages-split
5021
5022 Under this directory, the build system creates directories for each
5023 package specified in ```PACKAGES`` <#var-PACKAGES>`__. Do not change
5024 this default.
5025
5026PKGDESTWORK
5027 Points to a temporary work area where the
5028 ```do_package`` <#ref-tasks-package>`__ task saves package metadata.
5029 The ``PKGDESTWORK`` location defaults to the following:
5030 ${WORKDIR}/pkgdata Do not change this default.
5031
5032 The ```do_packagedata`` <#ref-tasks-packagedata>`__ task copies the
5033 package metadata from ``PKGDESTWORK`` to
5034 ```PKGDATA_DIR`` <#var-PKGDATA_DIR>`__ to make it available globally.
5035
5036PKGE
5037 The epoch of the package(s) built by the recipe. By default, ``PKGE``
5038 is set to ```PE`` <#var-PE>`__.
5039
5040PKGR
5041 The revision of the package(s) built by the recipe. By default,
5042 ``PKGR`` is set to ```PR`` <#var-PR>`__.
5043
5044PKGV
5045 The version of the package(s) built by the recipe. By default,
5046 ``PKGV`` is set to ```PV`` <#var-PV>`__.
5047
5048PN
5049 This variable can have two separate functions depending on the
5050 context: a recipe name or a resulting package name.
5051
5052 ``PN`` refers to a recipe name in the context of a file used by the
5053 OpenEmbedded build system as input to create a package. The name is
5054 normally extracted from the recipe file name. For example, if the
5055 recipe is named ``expat_2.0.1.bb``, then the default value of ``PN``
5056 will be "expat".
5057
5058 The variable refers to a package name in the context of a file
5059 created or produced by the OpenEmbedded build system.
5060
5061 If applicable, the ``PN`` variable also contains any special suffix
5062 or prefix. For example, using ``bash`` to build packages for the
5063 native machine, ``PN`` is ``bash-native``. Using ``bash`` to build
5064 packages for the target and for Multilib, ``PN`` would be ``bash``
5065 and ``lib64-bash``, respectively.
5066
5067PNBLACKLIST
5068 Lists recipes you do not want the OpenEmbedded build system to build.
5069 This variable works in conjunction with the
5070 ```blacklist`` <#ref-classes-blacklist>`__ class, which is inherited
5071 globally.
5072
5073 To prevent a recipe from being built, use the ``PNBLACKLIST``
5074 variable in your ``local.conf`` file. Here is an example that
5075 prevents ``myrecipe`` from being built: PNBLACKLIST[myrecipe] = "Not
5076 supported by our organization."
5077
5078POPULATE_SDK_POST_HOST_COMMAND
5079 Specifies a list of functions to call once the OpenEmbedded build
5080 system has created the host part of the SDK. You can specify
5081 functions separated by semicolons: POPULATE_SDK_POST_HOST_COMMAND +=
5082 "function; ... "
5083
5084 If you need to pass the SDK path to a command within a function, you
5085 can use ``${SDK_DIR}``, which points to the parent directory used by
5086 the OpenEmbedded build system when creating SDK output. See the
5087 ```SDK_DIR`` <#var-SDK_DIR>`__ variable for more information.
5088
5089POPULATE_SDK_POST_TARGET_COMMAND
5090 Specifies a list of functions to call once the OpenEmbedded build
5091 system has created the target part of the SDK. You can specify
5092 functions separated by semicolons: POPULATE_SDK_POST_TARGET_COMMAND
5093 += "function; ... "
5094
5095 If you need to pass the SDK path to a command within a function, you
5096 can use ``${SDK_DIR}``, which points to the parent directory used by
5097 the OpenEmbedded build system when creating SDK output. See the
5098 ```SDK_DIR`` <#var-SDK_DIR>`__ variable for more information.
5099
5100PR
5101 The revision of the recipe. The default value for this variable is
5102 "r0". Subsequent revisions of the recipe conventionally have the
5103 values "r1", "r2", and so forth. When ```PV`` <#var-PV>`__ increases,
5104 ``PR`` is conventionally reset to "r0".
5105
5106 .. note::
5107
5108 The OpenEmbedded build system does not need the aid of
5109 PR
5110 to know when to rebuild a recipe. The build system uses the task
5111 input checksums
5112 along with the
5113 stamp
5114 and
5115 shared state cache
5116 mechanisms.
5117
5118 The ``PR`` variable primarily becomes significant when a package
5119 manager dynamically installs packages on an already built image. In
5120 this case, ``PR``, which is the default value of
5121 ```PKGR`` <#var-PKGR>`__, helps the package manager distinguish which
5122 package is the most recent one in cases where many packages have the
5123 same ``PV`` (i.e. ``PKGV``). A component having many packages with
5124 the same ``PV`` usually means that the packages all install the same
5125 upstream version, but with later (``PR``) version packages including
5126 packaging fixes.
5127
5128 .. note::
5129
5130 PR
5131 does not need to be increased for changes that do not change the
5132 package contents or metadata.
5133
5134 Because manually managing ``PR`` can be cumbersome and error-prone,
5135 an automated solution exists. See the "`Working With a PR
5136 Service <&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service>`__" section
5137 in the Yocto Project Development Tasks Manual for more information.
5138
5139PREFERRED_PROVIDER
5140 If multiple recipes provide the same item, this variable determines
5141 which recipe is preferred and thus provides the item (i.e. the
5142 preferred provider). You should always suffix this variable with the
5143 name of the provided item. And, you should define the variable using
5144 the preferred recipe's name (```PN`` <#var-PN>`__). Here is a common
5145 example: PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" In the
5146 previous example, multiple recipes are providing "virtual/kernel".
5147 The ``PREFERRED_PROVIDER`` variable is set with the name (``PN``) of
5148 the recipe you prefer to provide "virtual/kernel".
5149
5150 Following are more examples: PREFERRED_PROVIDER_virtual/xserver =
5151 "xserver-xf86" PREFERRED_PROVIDER_virtual/libgl ?= "mesa" For more
5152 information, see the "`Using Virtual
5153 Providers <&YOCTO_DOCS_DEV_URL;#metadata-virtual-providers>`__"
5154 section in the Yocto Project Development Tasks Manual.
5155
5156 .. note::
5157
5158 If you use a
5159 virtual/\*
5160 item with
5161 PREFERRED_PROVIDER
5162 , then any recipe that
5163 PROVIDES
5164 that item but is not selected (defined) by
5165 PREFERRED_PROVIDER
5166 is prevented from building, which is usually desirable since this
5167 mechanism is designed to select between mutually exclusive
5168 alternative providers.
5169
5170PREFERRED_VERSION
5171 If multiple versions of recipes exist, this variable determines which
5172 version is given preference. You must always suffix the variable with
5173 the ```PN`` <#var-PN>`__ you want to select, and you should set the
5174 ```PV`` <#var-PV>`__ accordingly for precedence.
5175
5176 The ``PREFERRED_VERSION`` variable supports limited wildcard use
5177 through the "``%``" character. You can use the character to match any
5178 number of characters, which can be useful when specifying versions
5179 that contain long revision numbers that potentially change. Here are
5180 two examples: PREFERRED_VERSION_python = "3.4.0"
5181 PREFERRED_VERSION_linux-yocto = "5.0%"
5182
5183 .. note::
5184
5185 The use of the "
5186 %
5187 " character is limited in that it only works at the end of the
5188 string. You cannot use the wildcard character in any other
5189 location of the string.
5190
5191 The specified version is matched against ```PV`` <#var-PV>`__, which
5192 does not necessarily match the version part of the recipe's filename.
5193 For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb``
5194 where ``foo_git.bb`` contains the following assignment: PV =
5195 "1.1+git${SRCPV}" In this case, the correct way to select
5196 ``foo_git.bb`` is by using an assignment such as the following:
5197 PREFERRED_VERSION_foo = "1.1+git%" Compare that previous example
5198 against the following incorrect example, which does not work:
5199 PREFERRED_VERSION_foo = "git"
5200
5201 Sometimes the ``PREFERRED_VERSION`` variable can be set by
5202 configuration files in a way that is hard to change. You can use
5203 ```OVERRIDES`` <#var-OVERRIDES>`__ to set a machine-specific
5204 override. Here is an example: PREFERRED_VERSION_linux-yocto_qemux86 =
5205 "5.0%" Although not recommended, worst case, you can also use the
5206 "forcevariable" override, which is the strongest override possible.
5207 Here is an example: PREFERRED_VERSION_linux-yocto_forcevariable =
5208 "5.0%"
5209
5210 .. note::
5211
5212 The
5213 \_forcevariable
5214 override is not handled specially. This override only works
5215 because the default value of
5216 OVERRIDES
5217 includes "forcevariable".
5218
5219PREMIRRORS
5220 Specifies additional paths from which the OpenEmbedded build system
5221 gets source code. When the build system searches for source code, it
5222 first tries the local download directory. If that location fails, the
5223 build system tries locations defined by ``PREMIRRORS``, the upstream
5224 source, and then locations specified by
5225 ```MIRRORS`` <#var-MIRRORS>`__ in that order.
5226
5227 Assuming your distribution (```DISTRO`` <#var-DISTRO>`__) is "poky",
5228 the default value for ``PREMIRRORS`` is defined in the
5229 ``conf/distro/poky.conf`` file in the ``meta-poky`` Git repository.
5230
5231 Typically, you could add a specific server for the build system to
5232 attempt before any others by adding something like the following to
5233 the ``local.conf`` configuration file in the `Build
5234 Directory <#build-directory>`__: PREMIRRORS_prepend = "\\
5235 git://.*/.\* http://www.yoctoproject.org/sources/ \\n \\ ftp://.*/.\*
5236 http://www.yoctoproject.org/sources/ \\n \\ http://.*/.\*
5237 http://www.yoctoproject.org/sources/ \\n \\ https://.*/.\*
5238 http://www.yoctoproject.org/sources/ \\n" These changes cause the
5239 build system to intercept Git, FTP, HTTP, and HTTPS requests and
5240 direct them to the ``http://`` sources mirror. You can use
5241 ``file://`` URLs to point to local directories or network shares as
5242 well.
5243
5244PRIORITY
5245 Indicates the importance of a package.
5246
5247 ``PRIORITY`` is considered to be part of the distribution policy
5248 because the importance of any given recipe depends on the purpose for
5249 which the distribution is being produced. Thus, ``PRIORITY`` is not
5250 normally set within recipes.
5251
5252 You can set ``PRIORITY`` to "required", "standard", "extra", and
5253 "optional", which is the default.
5254
5255PRIVATE_LIBS
5256 Specifies libraries installed within a recipe that should be ignored
5257 by the OpenEmbedded build system's shared library resolver. This
5258 variable is typically used when software being built by a recipe has
5259 its own private versions of a library normally provided by another
5260 recipe. In this case, you would not want the package containing the
5261 private libraries to be set as a dependency on other unrelated
5262 packages that should instead depend on the package providing the
5263 standard version of the library.
5264
5265 Libraries specified in this variable should be specified by their
5266 file name. For example, from the Firefox recipe in meta-browser:
5267 PRIVATE_LIBS = "libmozjs.so \\ libxpcom.so \\ libnspr4.so \\
5268 libxul.so \\ libmozalloc.so \\ libplc4.so \\ libplds4.so"
5269
5270 For more information, see the "`Automatically Added Runtime
5271 Dependencies <&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies>`__"
5272 section in the Yocto Project Overview and Concepts Manual.
5273
5274PROVIDES
5275 A list of aliases by which a particular recipe can be known. By
5276 default, a recipe's own ``PN`` is implicitly already in its
5277 ``PROVIDES`` list and therefore does not need to mention that it
5278 provides itself. If a recipe uses ``PROVIDES``, the additional
5279 aliases are synonyms for the recipe and can be useful for satisfying
5280 dependencies of other recipes during the build as specified by
5281 ``DEPENDS``.
5282
5283 Consider the following example ``PROVIDES`` statement from the recipe
5284 file ``eudev_3.2.9.bb``: PROVIDES = "udev" The ``PROVIDES`` statement
5285 results in the "eudev" recipe also being available as simply "udev".
5286
5287 .. note::
5288
5289 Given that a recipe's own recipe name is already implicitly in its
5290 own
5291 PROVIDES
5292 list, it is unnecessary to add aliases with the "+=" operator;
5293 using a simple assignment will be sufficient. In other words,
5294 while you could write:
5295 ::
5296
5297 PROVIDES += "udev"
5298
5299
5300 in the above, the "+=" is overkill and unnecessary.
5301
5302 In addition to providing recipes under alternate names, the
5303 ``PROVIDES`` mechanism is also used to implement virtual targets. A
5304 virtual target is a name that corresponds to some particular
5305 functionality (e.g. a Linux kernel). Recipes that provide the
5306 functionality in question list the virtual target in ``PROVIDES``.
5307 Recipes that depend on the functionality in question can include the
5308 virtual target in ``DEPENDS`` to leave the choice of provider open.
5309
5310 Conventionally, virtual targets have names on the form
5311 "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
5312 of the name and has no syntactical significance.
5313
5314 The ```PREFERRED_PROVIDER`` <#var-PREFERRED_PROVIDER>`__ variable is
5315 used to select which particular recipe provides a virtual target.
5316
5317 .. note::
5318
5319 A corresponding mechanism for virtual runtime dependencies
5320 (packages) exists. However, the mechanism does not depend on any
5321 special functionality beyond ordinary variable assignments. For
5322 example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of
5323 the component that manages the ``/dev`` directory.
5324
5325 Setting the "preferred provider" for runtime dependencies is as
5326 simple as using the following assignment in a configuration file:
5327
5328 ::
5329
5330 VIRTUAL-RUNTIME_dev_manager = "udev"
5331
5332
5333PRSERV_HOST
5334 The network based ```PR`` <#var-PR>`__ service host and port.
5335
5336 The ``conf/local.conf.sample.extended`` configuration file in the
5337 `Source Directory <#source-directory>`__ shows how the
5338 ``PRSERV_HOST`` variable is set: PRSERV_HOST = "localhost:0" You must
5339 set the variable if you want to automatically start a local `PR
5340 service <&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service>`__. You can
5341 set ``PRSERV_HOST`` to other values to use a remote PR service.
5342
5343PTEST_ENABLED
5344 Specifies whether or not `Package
5345 Test <&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest>`__ (ptest)
5346 functionality is enabled when building a recipe. You should not set
5347 this variable directly. Enabling and disabling building Package Tests
5348 at build time should be done by adding "ptest" to (or removing it
5349 from) ```DISTRO_FEATURES`` <#var-DISTRO_FEATURES>`__.
5350
5351PV
5352 The version of the recipe. The version is normally extracted from the
5353 recipe filename. For example, if the recipe is named
5354 ``expat_2.0.1.bb``, then the default value of ``PV`` will be "2.0.1".
5355 ``PV`` is generally not overridden within a recipe unless it is
5356 building an unstable (i.e. development) version from a source code
5357 repository (e.g. Git or Subversion).
5358
5359 ``PV`` is the default value of the ```PKGV`` <#var-PKGV>`__ variable.
5360
5361PYTHON_ABI
5362 When used by recipes that inherit the
5363 ```distutils3`` <#ref-classes-distutils3>`__,
5364 ```setuptools3`` <#ref-classes-setuptools3>`__,
5365 ```distutils`` <#ref-classes-distutils>`__, or
5366 ```setuptools`` <#ref-classes-setuptools>`__ classes, denotes the
5367 Application Binary Interface (ABI) currently in use for Python. By
5368 default, the ABI is "m". You do not have to set this variable as the
5369 OpenEmbedded build system sets it for you.
5370
5371 The OpenEmbedded build system uses the ABI to construct directory
5372 names used when installing the Python headers and libraries in
5373 sysroot (e.g. ``.../python3.3m/...``).
5374
5375 Recipes that inherit the ``distutils`` class during cross-builds also
5376 use this variable to locate the headers and libraries of the
5377 appropriate Python that the extension is targeting.
5378
5379PYTHON_PN
5380 When used by recipes that inherit the
5381 ```distutils3`` <#ref-classes-distutils3>`__,
5382 ```setuptools3`` <#ref-classes-setuptools3>`__,
5383 ```distutils`` <#ref-classes-distutils>`__, or
5384 ```setuptools`` <#ref-classes-setuptools>`__ classes, specifies the
5385 major Python version being built. For Python 3.x, ``PYTHON_PN`` would
5386 be "python3". You do not have to set this variable as the
5387 OpenEmbedded build system automatically sets it for you.
5388
5389 The variable allows recipes to use common infrastructure such as the
5390 following: DEPENDS += "${PYTHON_PN}-native" In the previous example,
5391 the version of the dependency is ``PYTHON_PN``.
5392
5393RANLIB
5394 The minimal command and arguments to run ``ranlib``.
5395
5396RCONFLICTS
5397 The list of packages that conflict with packages. Note that packages
5398 will not be installed if conflicting packages are not first removed.
5399
5400 Like all package-controlling variables, you must always use them in
5401 conjunction with a package name override. Here is an example:
5402 RCONFLICTS_${PN} = "another_conflicting_package_name"
5403
5404 BitBake, which the OpenEmbedded build system uses, supports
5405 specifying versioned dependencies. Although the syntax varies
5406 depending on the packaging format, BitBake hides these differences
5407 from you. Here is the general syntax to specify versions with the
5408 ``RCONFLICTS`` variable: RCONFLICTS_${PN} = "package (operator
5409 version)" For ``operator``, you can specify the following: = < > <=
5410 >= For example, the following sets up a dependency on version 1.2 or
5411 greater of the package ``foo``: RCONFLICTS_${PN} = "foo (>= 1.2)"
5412
5413RDEPENDS
5414 Lists runtime dependencies of a package. These dependencies are other
5415 packages that must be installed in order for the package to function
5416 correctly. As an example, the following assignment declares that the
5417 package ``foo`` needs the packages ``bar`` and ``baz`` to be
5418 installed: RDEPENDS_foo = "bar baz" The most common types of package
5419 runtime dependencies are automatically detected and added. Therefore,
5420 most recipes do not need to set ``RDEPENDS``. For more information,
5421 see the "`Automatically Added Runtime
5422 Dependencies <&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies>`__"
5423 section in the Yocto Project Overview and Concepts Manual.
5424
5425 The practical effect of the above ``RDEPENDS`` assignment is that
5426 ``bar`` and ``baz`` will be declared as dependencies inside the
5427 package ``foo`` when it is written out by one of the
5428 ```do_package_write_*`` <#ref-tasks-package_write_deb>`__ tasks.
5429 Exactly how this is done depends on which package format is used,
5430 which is determined by
5431 ```PACKAGE_CLASSES`` <#var-PACKAGE_CLASSES>`__. When the
5432 corresponding package manager installs the package, it will know to
5433 also install the packages on which it depends.
5434
5435 To ensure that the packages ``bar`` and ``baz`` get built, the
5436 previous ``RDEPENDS`` assignment also causes a task dependency to be
5437 added. This dependency is from the recipe's
5438 ```do_build`` <#ref-tasks-build>`__ (not to be confused with
5439 ```do_compile`` <#ref-tasks-compile>`__) task to the
5440 ``do_package_write_*`` task of the recipes that build ``bar`` and
5441 ``baz``.
5442
5443 The names of the packages you list within ``RDEPENDS`` must be the
5444 names of other packages - they cannot be recipe names. Although
5445 package names and recipe names usually match, the important point
5446 here is that you are providing package names within the ``RDEPENDS``
5447 variable. For an example of the default list of packages created from
5448 a recipe, see the ```PACKAGES`` <#var-PACKAGES>`__ variable.
5449
5450 Because the ``RDEPENDS`` variable applies to packages being built,
5451 you should always use the variable in a form with an attached package
5452 name (remember that a single recipe can build multiple packages). For
5453 example, suppose you are building a development package that depends
5454 on the ``perl`` package. In this case, you would use the following
5455 ``RDEPENDS`` statement: RDEPENDS_${PN}-dev += "perl" In the example,
5456 the development package depends on the ``perl`` package. Thus, the
5457 ``RDEPENDS`` variable has the ``${PN}-dev`` package name as part of
5458 the variable.
5459
5460 .. note::
5461
5462 RDEPENDS_${PN}-dev
5463 includes
5464 ${
5465 PN
5466 }
5467 by default. This default is set in the BitBake configuration file
5468 (
5469 meta/conf/bitbake.conf
5470 ). Be careful not to accidentally remove
5471 ${PN}
5472 when modifying
5473 RDEPENDS_${PN}-dev
5474 . Use the "+=" operator rather than the "=" operator.
5475
5476 The package names you use with ``RDEPENDS`` must appear as they would
5477 in the ``PACKAGES`` variable. The ```PKG`` <#var-PKG>`__ variable
5478 allows a different name to be used for the final package (e.g. the
5479 ```debian`` <#ref-classes-debian>`__ class uses this to rename
5480 packages), but this final package name cannot be used with
5481 ``RDEPENDS``, which makes sense as ``RDEPENDS`` is meant to be
5482 independent of the package format used.
5483
5484 BitBake, which the OpenEmbedded build system uses, supports
5485 specifying versioned dependencies. Although the syntax varies
5486 depending on the packaging format, BitBake hides these differences
5487 from you. Here is the general syntax to specify versions with the
5488 ``RDEPENDS`` variable: RDEPENDS_${PN} = "package (operator version)"
5489 For operator, you can specify the following: = < > <= >= For version,
5490 provide the version number.
5491
5492 .. note::
5493
5494 You can use
5495 EXTENDPKGV
5496 to provide a full package version specification.
5497
5498 For example, the following sets up a dependency on version 1.2 or
5499 greater of the package ``foo``: RDEPENDS_${PN} = "foo (>= 1.2)"
5500
5501 For information on build-time dependencies, see the
5502 ```DEPENDS`` <#var-DEPENDS>`__ variable. You can also see the
5503 "`Tasks <&YOCTO_DOCS_BB_URL;#tasks>`__" and
5504 "`Dependencies <&YOCTO_DOCS_BB_URL;#dependencies>`__" sections in the
5505 BitBake User Manual for additional information on tasks and
5506 dependencies.
5507
5508REQUIRED_DISTRO_FEATURES
5509 When inheriting the
5510 ```distro_features_check`` <#ref-classes-distro_features_check>`__
5511 class, this variable identifies distribution features that must exist
5512 in the current configuration in order for the OpenEmbedded build
5513 system to build the recipe. In other words, if the
5514 ``REQUIRED_DISTRO_FEATURES`` variable lists a feature that does not
5515 appear in ``DISTRO_FEATURES`` within the current configuration, an
5516 error occurs and the build stops.
5517
5518RM_WORK_EXCLUDE
5519 With ``rm_work`` enabled, this variable specifies a list of recipes
5520 whose work directories should not be removed. See the
5521 "```rm_work.bbclass`` <#ref-classes-rm-work>`__" section for more
5522 details.
5523
5524ROOT_HOME
5525 Defines the root home directory. By default, this directory is set as
5526 follows in the BitBake configuration file: ROOT_HOME ??= "/home/root"
5527
5528 .. note::
5529
5530 This default value is likely used because some embedded solutions
5531 prefer to have a read-only root filesystem and prefer to keep
5532 writeable data in one place.
5533
5534 You can override the default by setting the variable in any layer or
5535 in the ``local.conf`` file. Because the default is set using a "weak"
5536 assignment (i.e. "??="), you can use either of the following forms to
5537 define your override: ROOT_HOME = "/root" ROOT_HOME ?= "/root" These
5538 override examples use ``/root``, which is probably the most commonly
5539 used override.
5540
5541ROOTFS
5542 Indicates a filesystem image to include as the root filesystem.
5543
5544 The ``ROOTFS`` variable is an optional variable used with the
5545 ```image-live`` <#ref-classes-image-live>`__ class.
5546
5547ROOTFS_POSTINSTALL_COMMAND
5548 Specifies a list of functions to call after the OpenEmbedded build
5549 system has installed packages. You can specify functions separated by
5550 semicolons: ROOTFS_POSTINSTALL_COMMAND += "function; ... "
5551
5552 If you need to pass the root filesystem path to a command within a
5553 function, you can use ``${IMAGE_ROOTFS}``, which points to the
5554 directory that becomes the root filesystem image. See the
5555 ```IMAGE_ROOTFS`` <#var-IMAGE_ROOTFS>`__ variable for more
5556 information.
5557
5558ROOTFS_POSTPROCESS_COMMAND
5559 Specifies a list of functions to call once the OpenEmbedded build
5560 system has created the root filesystem. You can specify functions
5561 separated by semicolons: ROOTFS_POSTPROCESS_COMMAND += "function; ...
5562 "
5563
5564 If you need to pass the root filesystem path to a command within a
5565 function, you can use ``${IMAGE_ROOTFS}``, which points to the
5566 directory that becomes the root filesystem image. See the
5567 ```IMAGE_ROOTFS`` <#var-IMAGE_ROOTFS>`__ variable for more
5568 information.
5569
5570ROOTFS_POSTUNINSTALL_COMMAND
5571 Specifies a list of functions to call after the OpenEmbedded build
5572 system has removed unnecessary packages. When runtime package
5573 management is disabled in the image, several packages are removed
5574 including ``base-passwd``, ``shadow``, and ``update-alternatives``.
5575 You can specify functions separated by semicolons:
5576 ROOTFS_POSTUNINSTALL_COMMAND += "function; ... "
5577
5578 If you need to pass the root filesystem path to a command within a
5579 function, you can use ``${IMAGE_ROOTFS}``, which points to the
5580 directory that becomes the root filesystem image. See the
5581 ```IMAGE_ROOTFS`` <#var-IMAGE_ROOTFS>`__ variable for more
5582 information.
5583
5584ROOTFS_PREPROCESS_COMMAND
5585 Specifies a list of functions to call before the OpenEmbedded build
5586 system has created the root filesystem. You can specify functions
5587 separated by semicolons: ROOTFS_PREPROCESS_COMMAND += "function; ...
5588 "
5589
5590 If you need to pass the root filesystem path to a command within a
5591 function, you can use ``${IMAGE_ROOTFS}``, which points to the
5592 directory that becomes the root filesystem image. See the
5593 ```IMAGE_ROOTFS`` <#var-IMAGE_ROOTFS>`__ variable for more
5594 information.
5595
5596RPROVIDES
5597 A list of package name aliases that a package also provides. These
5598 aliases are useful for satisfying runtime dependencies of other
5599 packages both during the build and on the target (as specified by
5600 ``RDEPENDS``).
5601
5602 .. note::
5603
5604 A package's own name is implicitly already in its
5605 RPROVIDES
5606 list.
5607
5608 As with all package-controlling variables, you must always use the
5609 variable in conjunction with a package name override. Here is an
5610 example: RPROVIDES_${PN} = "widget-abi-2"
5611
5612RRECOMMENDS
5613 A list of packages that extends the usability of a package being
5614 built. The package being built does not depend on this list of
5615 packages in order to successfully build, but rather uses them for
5616 extended usability. To specify runtime dependencies for packages, see
5617 the ``RDEPENDS`` variable.
5618
5619 The package manager will automatically install the ``RRECOMMENDS``
5620 list of packages when installing the built package. However, you can
5621 prevent listed packages from being installed by using the
5622 ```BAD_RECOMMENDATIONS`` <#var-BAD_RECOMMENDATIONS>`__,
5623 ```NO_RECOMMENDATIONS`` <#var-NO_RECOMMENDATIONS>`__, and
5624 ```PACKAGE_EXCLUDE`` <#var-PACKAGE_EXCLUDE>`__ variables.
5625
5626 Packages specified in ``RRECOMMENDS`` need not actually be produced.
5627 However, a recipe must exist that provides each package, either
5628 through the ```PACKAGES`` <#var-PACKAGES>`__ or
5629 ```PACKAGES_DYNAMIC`` <#var-PACKAGES_DYNAMIC>`__ variables or the
5630 ```RPROVIDES`` <#var-RPROVIDES>`__ variable, or an error will occur
5631 during the build. If such a recipe does exist and the package is not
5632 produced, the build continues without error.
5633
5634 Because the ``RRECOMMENDS`` variable applies to packages being built,
5635 you should always attach an override to the variable to specify the
5636 particular package whose usability is being extended. For example,
5637 suppose you are building a development package that is extended to
5638 support wireless functionality. In this case, you would use the
5639 following: RRECOMMENDS_${PN}-dev += "wireless_package_name" In the
5640 example, the package name (``${PN}-dev``) must appear as it would in
5641 the ``PACKAGES`` namespace before any renaming of the output package
5642 by classes such as ``debian.bbclass``.
5643
5644 BitBake, which the OpenEmbedded build system uses, supports
5645 specifying versioned recommends. Although the syntax varies depending
5646 on the packaging format, BitBake hides these differences from you.
5647 Here is the general syntax to specify versions with the
5648 ``RRECOMMENDS`` variable: RRECOMMENDS_${PN} = "package (operator
5649 version)" For ``operator``, you can specify the following: = < > <=
5650 >= For example, the following sets up a recommend on version 1.2 or
5651 greater of the package ``foo``: RRECOMMENDS_${PN} = "foo (>= 1.2)"
5652
5653RREPLACES
5654 A list of packages replaced by a package. The package manager uses
5655 this variable to determine which package should be installed to
5656 replace other package(s) during an upgrade. In order to also have the
5657 other package(s) removed at the same time, you must add the name of
5658 the other package to the ``RCONFLICTS`` variable.
5659
5660 As with all package-controlling variables, you must use this variable
5661 in conjunction with a package name override. Here is an example:
5662 RREPLACES_${PN} = "other_package_being_replaced"
5663
5664 BitBake, which the OpenEmbedded build system uses, supports
5665 specifying versioned replacements. Although the syntax varies
5666 depending on the packaging format, BitBake hides these differences
5667 from you. Here is the general syntax to specify versions with the
5668 ``RREPLACES`` variable: RREPLACES_${PN} = "package (operator
5669 version)" For ``operator``, you can specify the following: = < > <=
5670 >= For example, the following sets up a replacement using version 1.2
5671 or greater of the package ``foo``: RREPLACES_${PN} = "foo (>= 1.2)"
5672
5673RSUGGESTS
5674 A list of additional packages that you can suggest for installation
5675 by the package manager at the time a package is installed. Not all
5676 package managers support this functionality.
5677
5678 As with all package-controlling variables, you must always use this
5679 variable in conjunction with a package name override. Here is an
5680 example: RSUGGESTS_${PN} = "useful_package another_package"
5681
5682S
5683 The location in the `Build Directory <#build-directory>`__ where
5684 unpacked recipe source code resides. By default, this directory is
5685 ``${``\ ```WORKDIR`` <#var-WORKDIR>`__\ ``}/${``\ ```BPN`` <#var-BPN>`__\ ``}-${``\ ```PV`` <#var-PV>`__\ ``}``,
5686 where ``${BPN}`` is the base recipe name and ``${PV}`` is the recipe
5687 version. If the source tarball extracts the code to a directory named
5688 anything other than ``${BPN}-${PV}``, or if the source code is
5689 fetched from an SCM such as Git or Subversion, then you must set
5690 ``S`` in the recipe so that the OpenEmbedded build system knows where
5691 to find the unpacked source.
5692
5693 As an example, assume a `Source Directory <#source-directory>`__
5694 top-level folder named ``poky`` and a default Build Directory at
5695 ``poky/build``. In this case, the work directory the build system
5696 uses to keep the unpacked recipe for ``db`` is the following:
5697 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19 The
5698 unpacked source code resides in the ``db-5.1.19`` folder.
5699
5700 This next example assumes a Git repository. By default, Git
5701 repositories are cloned to ``${WORKDIR}/git`` during
5702 ```do_fetch`` <#ref-tasks-fetch>`__. Since this path is different
5703 from the default value of ``S``, you must set it specifically so the
5704 source can be located: SRC_URI = "git://path/to/repo.git" S =
5705 "${WORKDIR}/git"
5706
5707SANITY_REQUIRED_UTILITIES
5708 Specifies a list of command-line utilities that should be checked for
5709 during the initial sanity checking process when running BitBake. If
5710 any of the utilities are not installed on the build host, then
5711 BitBake immediately exits with an error.
5712
5713SANITY_TESTED_DISTROS
5714 A list of the host distribution identifiers that the build system has
5715 been tested against. Identifiers consist of the host distributor ID
5716 followed by the release, as reported by the ``lsb_release`` tool or
5717 as read from ``/etc/lsb-release``. Separate the list items with
5718 explicit newline characters (``\n``). If ``SANITY_TESTED_DISTROS`` is
5719 not empty and the current value of
5720 ```NATIVELSBSTRING`` <#var-NATIVELSBSTRING>`__ does not appear in the
5721 list, then the build system reports a warning that indicates the
5722 current host distribution has not been tested as a build host.
5723
5724SDK_ARCH
5725 The target architecture for the SDK. Typically, you do not directly
5726 set this variable. Instead, use ```SDKMACHINE`` <#var-SDKMACHINE>`__.
5727
5728SDK_DEPLOY
5729 The directory set up and used by the
5730 ```populate_sdk_base`` <#ref-classes-populate-sdk>`__ class to which
5731 the SDK is deployed. The ``populate_sdk_base`` class defines
5732 ``SDK_DEPLOY`` as follows: SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
5733
5734SDK_DIR
5735 The parent directory used by the OpenEmbedded build system when
5736 creating SDK output. The
5737 ```populate_sdk_base`` <#ref-classes-populate-sdk-*>`__ class defines
5738 the variable as follows: SDK_DIR = "${WORKDIR}/sdk"
5739
5740 .. note::
5741
5742 The
5743 SDK_DIR
5744 directory is a temporary directory as it is part of
5745 WORKDIR
5746 . The final output directory is
5747 SDK_DEPLOY
5748 .
5749
5750SDK_EXT_TYPE
5751 Controls whether or not shared state artifacts are copied into the
5752 extensible SDK. The default value of "full" copies all of the
5753 required shared state artifacts into the extensible SDK. The value
5754 "minimal" leaves these artifacts out of the SDK.
5755
5756 .. note::
5757
5758 If you set the variable to "minimal", you need to ensure
5759 SSTATE_MIRRORS
5760 is set in the SDK's configuration to enable the artifacts to be
5761 fetched as needed.
5762
5763SDK_HOST_MANIFEST
5764 The manifest file for the host part of the SDK. This file lists all
5765 the installed packages that make up the host part of the SDK. The
5766 file contains package information on a line-per-package basis as
5767 follows: packagename packagearch version
5768
5769 The ```populate_sdk_base`` <#ref-classes-populate-sdk-*>`__ class
5770 defines the manifest file as follows: SDK_HOST_MANIFEST =
5771 "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" The location is
5772 derived using the ```SDK_DEPLOY`` <#var-SDK_DEPLOY>`__ and
5773 ```TOOLCHAIN_OUTPUTNAME`` <#var-TOOLCHAIN_OUTPUTNAME>`__ variables.
5774
5775SDK_INCLUDE_PKGDATA
5776 When set to "1", specifies to include the packagedata for all recipes
5777 in the "world" target in the extensible SDK. Including this data
5778 allows the ``devtool search`` command to find these recipes in search
5779 results, as well as allows the ``devtool add`` command to map
5780 dependencies more effectively.
5781
5782 .. note::
5783
5784 Enabling the
5785 SDK_INCLUDE_PKGDATA
5786 variable significantly increases build time because all of world
5787 needs to be built. Enabling the variable also slightly increases
5788 the size of the extensible SDK.
5789
5790SDK_INCLUDE_TOOLCHAIN
5791 When set to "1", specifies to include the toolchain in the extensible
5792 SDK. Including the toolchain is useful particularly when
5793 ```SDK_EXT_TYPE`` <#var-SDK_EXT_TYPE>`__ is set to "minimal" to keep
5794 the SDK reasonably small but you still want to provide a usable
5795 toolchain. For example, suppose you want to use the toolchain from an
5796 IDE or from other tools and you do not want to perform additional
5797 steps to install the toolchain.
5798
5799 The ``SDK_INCLUDE_TOOLCHAIN`` variable defaults to "0" if
5800 ``SDK_EXT_TYPE`` is set to "minimal", and defaults to "1" if
5801 ``SDK_EXT_TYPE`` is set to "full".
5802
5803SDK_INHERIT_BLACKLIST
5804 A list of classes to remove from the ```INHERIT`` <#var-INHERIT>`__
5805 value globally within the extensible SDK configuration. The
5806 ```populate-sdk-ext`` <#ref-classes-populate-sdk-*>`__ class sets the
5807 default value: SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
5808
5809 Some classes are not generally applicable within the extensible SDK
5810 context. You can use this variable to disable those classes.
5811
5812 For additional information on how to customize the extensible SDK's
5813 configuration, see the "`Configuring the Extensible
5814 SDK <&YOCTO_DOCS_SDK_URL;#sdk-configuring-the-extensible-sdk>`__"
5815 section in the Yocto Project Application Development and the
5816 Extensible Software Development Kit (eSDK) manual.
5817
5818SDK_LOCAL_CONF_BLACKLIST
5819 A list of variables not allowed through from the OpenEmbedded build
5820 system configuration into the extensible SDK configuration. Usually,
5821 these are variables that are specific to the machine on which the
5822 build system is running and thus would be potentially problematic
5823 within the extensible SDK.
5824
5825 By default, ``SDK_LOCAL_CONF_BLACKLIST`` is set in the
5826 ```populate-sdk-ext`` <#ref-classes-populate-sdk-*>`__ class and
5827 excludes the following variables:
5828 `CONF_VERSION <#var-CONF_VERSION>`__
5829 `BB_NUMBER_THREADS <#var-BB_NUMBER_THREADS>`__
5830 `BB_NUMBER_PARSE_THREADS <&YOCTO_DOCS_BB_URL;#var-BB_NUMBER_PARSE_THREADS>`__
5831 `PARALLEL_MAKE <#var-PARALLEL_MAKE>`__
5832 `PRSERV_HOST <#var-PRSERV_HOST>`__
5833 `SSTATE_MIRRORS <#var-SSTATE_MIRRORS>`__ `DL_DIR <#var-DL_DIR>`__
5834 `SSTATE_DIR <#var-SSTATE_DIR>`__ `TMPDIR <#var-TMPDIR>`__
5835 `BB_SERVER_TIMEOUT <#var-BB_SERVER_TIMEOUT>`__
5836
5837 For additional information on how to customize the extensible SDK's
5838 configuration, see the "`Configuring the Extensible
5839 SDK <&YOCTO_DOCS_SDK_URL;#sdk-configuring-the-extensible-sdk>`__"
5840 section in the Yocto Project Application Development and the
5841 Extensible Software Development Kit (eSDK) manual.
5842
5843SDK_LOCAL_CONF_WHITELIST
5844 A list of variables allowed through from the OpenEmbedded build
5845 system configuration into the extensible SDK configuration. By
5846 default, the list of variables is empty and is set in the
5847 ```populate-sdk-ext`` <#ref-classes-populate-sdk-*>`__ class.
5848
5849 This list overrides the variables specified using the
5850 ```SDK_LOCAL_CONF_BLACKLIST`` <#var-SDK_LOCAL_CONF_BLACKLIST>`__
5851 variable as well as any variables identified by automatic
5852 blacklisting due to the "/" character being found at the start of the
5853 value, which is usually indicative of being a path and thus might not
5854 be valid on the system where the SDK is installed.
5855
5856 For additional information on how to customize the extensible SDK's
5857 configuration, see the "`Configuring the Extensible
5858 SDK <&YOCTO_DOCS_SDK_URL;#sdk-configuring-the-extensible-sdk>`__"
5859 section in the Yocto Project Application Development and the
5860 Extensible Software Development Kit (eSDK) manual.
5861
5862SDK_NAME
5863 The base name for SDK output files. The name is derived from the
5864 ```DISTRO`` <#var-DISTRO>`__, ```TCLIBC`` <#var-TCLIBC>`__,
5865 ```SDK_ARCH`` <#var-SDK_ARCH>`__,
5866 ```IMAGE_BASENAME`` <#var-IMAGE_BASENAME>`__, and
5867 ```TUNE_PKGARCH`` <#var-TUNE_PKGARCH>`__ variables: SDK_NAME =
5868 "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
5869
5870SDK_OS
5871 Specifies the operating system for which the SDK will be built. The
5872 default value is the value of ```BUILD_OS`` <#var-BUILD_OS>`__.
5873
5874SDK_OUTPUT
5875 The location used by the OpenEmbedded build system when creating SDK
5876 output. The ```populate_sdk_base`` <#ref-classes-populate-sdk-*>`__
5877 class defines the variable as follows: SDK_DIR = "${WORKDIR}/sdk"
5878 SDK_OUTPUT = "${SDK_DIR}/image" SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
5879
5880 .. note::
5881
5882 The
5883 SDK_OUTPUT
5884 directory is a temporary directory as it is part of
5885 WORKDIR
5886 by way of
5887 SDK_DIR
5888 . The final output directory is
5889 SDK_DEPLOY
5890 .
5891
5892SDK_PACKAGE_ARCHS
5893 Specifies a list of architectures compatible with the SDK machine.
5894 This variable is set automatically and should not normally be
5895 hand-edited. Entries are separated using spaces and listed in order
5896 of priority. The default value for ``SDK_PACKAGE_ARCHS`` is "all any
5897 noarch ${SDK_ARCH}-${SDKPKGSUFFIX}".
5898
5899SDK_POSTPROCESS_COMMAND
5900 Specifies a list of functions to call once the OpenEmbedded build
5901 system creates the SDK. You can specify functions separated by
5902 semicolons: SDK_POSTPROCESS_COMMAND += "function; ... "
5903
5904 If you need to pass an SDK path to a command within a function, you
5905 can use ``${SDK_DIR}``, which points to the parent directory used by
5906 the OpenEmbedded build system when creating SDK output. See the
5907 ```SDK_DIR`` <#var-SDK_DIR>`__ variable for more information.
5908
5909SDK_PREFIX
5910 The toolchain binary prefix used for ``nativesdk`` recipes. The
5911 OpenEmbedded build system uses the ``SDK_PREFIX`` value to set the
5912 ```TARGET_PREFIX`` <#var-TARGET_PREFIX>`__ when building
5913 ``nativesdk`` recipes. The default value is "${SDK_SYS}-".
5914
5915SDK_RECRDEP_TASKS
5916 A list of shared state tasks added to the extensible SDK. By default,
5917 the following tasks are added: do_populate_lic do_package_qa
5918 do_populate_sysroot do_deploy Despite the default value of "" for the
5919 ``SDK_RECRDEP_TASKS`` variable, the above four tasks are always added
5920 to the SDK. To specify tasks beyond these four, you need to use the
5921 ``SDK_RECRDEP_TASKS`` variable (e.g. you are defining additional
5922 tasks that are needed in order to build
5923 ```SDK_TARGETS`` <#var-SDK_TARGETS>`__).
5924
5925SDK_SYS
5926 Specifies the system, including the architecture and the operating
5927 system, for which the SDK will be built.
5928
5929 The OpenEmbedded build system automatically sets this variable based
5930 on ```SDK_ARCH`` <#var-SDK_ARCH>`__,
5931 ```SDK_VENDOR`` <#var-SDK_VENDOR>`__, and
5932 ```SDK_OS`` <#var-SDK_OS>`__. You do not need to set the ``SDK_SYS``
5933 variable yourself.
5934
5935SDK_TARGET_MANIFEST
5936 The manifest file for the target part of the SDK. This file lists all
5937 the installed packages that make up the target part of the SDK. The
5938 file contains package information on a line-per-package basis as
5939 follows: packagename packagearch version
5940
5941 The ```populate_sdk_base`` <#ref-classes-populate-sdk-*>`__ class
5942 defines the manifest file as follows: SDK_TARGET_MANIFEST =
5943 "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" The location
5944 is derived using the ```SDK_DEPLOY`` <#var-SDK_DEPLOY>`__ and
5945 ```TOOLCHAIN_OUTPUTNAME`` <#var-TOOLCHAIN_OUTPUTNAME>`__ variables.
5946
5947SDK_TARGETS
5948 A list of targets to install from shared state as part of the
5949 standard or extensible SDK installation. The default value is "${PN}"
5950 (i.e. the image from which the SDK is built).
5951
5952 The ``SDK_TARGETS`` variable is an internal variable and typically
5953 would not be changed.
5954
5955SDK_TITLE
5956 The title to be printed when running the SDK installer. By default,
5957 this title is based on the ```DISTRO_NAME`` <#var-DISTRO_NAME>`__ or
5958 ```DISTRO`` <#var-DISTRO>`__ variable and is set in the
5959 ```populate_sdk_base`` <#ref-classes-populate-sdk-*>`__ class as
5960 follows: SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or
5961 d.getVar('DISTRO')} SDK" For the default distribution "poky",
5962 ``SDK_TITLE`` is set to "Poky (Yocto Project Reference Distro)".
5963
5964 For information on how to change this default title, see the
5965 "`Changing the Extensible SDK Installer
5966 Title <&YOCTO_DOCS_SDK_URL;#sdk-changing-the-sdk-installer-title>`__"
5967 section in the Yocto Project Application Development and the
5968 Extensible Software Development Kit (eSDK) manual.
5969
5970SDK_UPDATE_URL
5971 An optional URL for an update server for the extensible SDK. If set,
5972 the value is used as the default update server when running
5973 ``devtool sdk-update`` within the extensible SDK.
5974
5975SDK_VENDOR
5976 Specifies the name of the SDK vendor.
5977
5978SDK_VERSION
5979 Specifies the version of the SDK. The distribution configuration file
5980 (e.g. ``/meta-poky/conf/distro/poky.conf``) defines the
5981 ``SDK_VERSION`` as follows: SDK_VERSION =
5982 "${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}','snapshot')}"
5983
5984 For additional information, see the
5985 ```DISTRO_VERSION`` <#var-DISTRO_VERSION>`__ and
5986 ```DATE`` <#var-DATE>`__ variables.
5987
5988SDKEXTPATH
5989 The default installation directory for the Extensible SDK. By
5990 default, this directory is based on the ```DISTRO`` <#var-DISTRO>`__
5991 variable and is set in the
5992 ```populate_sdk_base`` <#ref-classes-populate-sdk-*>`__ class as
5993 follows: SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk" For the
5994 default distribution "poky", the ``SDKEXTPATH`` is set to "poky_sdk".
5995
5996 For information on how to change this default directory, see the
5997 "`Changing the Default SDK Installation
5998 Directory <&YOCTO_DOCS_SDK_URL;#sdk-changing-the-default-sdk-installation-directory>`__"
5999 section in the Yocto Project Application Development and the
6000 Extensible Software Development Kit (eSDK) manual.
6001
6002SDKIMAGE_FEATURES
6003 Equivalent to ``IMAGE_FEATURES``. However, this variable applies to
6004 the SDK generated from an image using the following command: $
6005 bitbake -c populate_sdk imagename
6006
6007SDKMACHINE
6008 The machine for which the SDK is built. In other words, the SDK is
6009 built such that it runs on the target you specify with the
6010 ``SDKMACHINE`` value. The value points to a corresponding ``.conf``
6011 file under ``conf/machine-sdk/``.
6012
6013 You can use "i686" and "x86_64" as possible values for this variable.
6014 The variable defaults to "i686" and is set in the local.conf file in
6015 the Build Directory. SDKMACHINE ?= "i686"
6016
6017 .. note::
6018
6019 You cannot set the
6020 SDKMACHINE
6021 variable in your distribution configuration file. If you do, the
6022 configuration will not take affect.
6023
6024SDKPATH
6025 Defines the path offered to the user for installation of the SDK that
6026 is generated by the OpenEmbedded build system. The path appears as
6027 the default location for installing the SDK when you run the SDK's
6028 installation script. You can override the offered path when you run
6029 the script.
6030
6031SDKTARGETSYSROOT
6032 The full path to the sysroot used for cross-compilation within an SDK
6033 as it will be when installed into the default
6034 ```SDKPATH`` <#var-SDKPATH>`__.
6035
6036SECTION
6037 The section in which packages should be categorized. Package
6038 management utilities can make use of this variable.
6039
6040SELECTED_OPTIMIZATION
6041 Specifies the optimization flags passed to the C compiler when
6042 building for the target. The flags are passed through the default
6043 value of the ```TARGET_CFLAGS`` <#var-TARGET_CFLAGS>`__ variable.
6044
6045 The ``SELECTED_OPTIMIZATION`` variable takes the value of
6046 ``FULL_OPTIMIZATION`` unless ``DEBUG_BUILD`` = "1". If that is the
6047 case, the value of ``DEBUG_OPTIMIZATION`` is used.
6048
6049SERIAL_CONSOLE
6050 Defines a serial console (TTY) to enable using
6051 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6052 value that specifies the baud rate followed by the TTY device name
6053 separated by a space. You cannot specify more than one TTY device:
6054 SERIAL_CONSOLE = "115200 ttyS0"
6055
6056 .. note::
6057
6058 The
6059 SERIAL_CONSOLE
6060 variable is deprecated. Please use the
6061 SERIAL_CONSOLES
6062 variable.
6063
6064SERIAL_CONSOLES
6065 Defines a serial console (TTY) to enable using
6066 `getty <https://en.wikipedia.org/wiki/Getty_(Unix)>`__. Provide a
6067 value that specifies the baud rate followed by the TTY device name
6068 separated by a semicolon. Use spaces to separate multiple devices:
6069 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
6070
6071SERIAL_CONSOLES_CHECK
6072 Specifies serial consoles, which must be listed in
6073 ```SERIAL_CONSOLES`` <#var-SERIAL_CONSOLES>`__, to check against
6074 ``/proc/console`` before enabling them using getty. This variable
6075 allows aliasing in the format: <device>:<alias>. If a device was
6076 listed as "sclp_line0" in ``/dev/`` and "ttyS0" was listed in
6077 ``/proc/console``, you would do the following: SERIAL_CONSOLES_CHECK
6078 = "slcp_line0:ttyS0" This variable is currently only supported with
6079 SysVinit (i.e. not with systemd).
6080
6081SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS
6082 A list of recipe dependencies that should not be used to determine
6083 signatures of tasks from one recipe when they depend on tasks from
6084 another recipe. For example: SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS +=
6085 "intone->mplayer2"
6086
6087 In the previous example, ``intone`` depends on ``mplayer2``.
6088
6089 You can use the special token ``"*"`` on the left-hand side of the
6090 dependency to match all recipes except the one on the right-hand
6091 side. Here is an example: SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS +=
6092 "*->quilt-native"
6093
6094 In the previous example, all recipes except ``quilt-native`` ignore
6095 task signatures from the ``quilt-native`` recipe when determining
6096 their task signatures.
6097
6098 Use of this variable is one mechanism to remove dependencies that
6099 affect task signatures and thus force rebuilds when a recipe changes.
6100
6101 .. note::
6102
6103 If you add an inappropriate dependency for a recipe relationship,
6104 the software might break during runtime if the interface of the
6105 second recipe was changed after the first recipe had been built.
6106
6107SIGGEN_EXCLUDERECIPES_ABISAFE
6108 A list of recipes that are completely stable and will never change.
6109 The ABI for the recipes in the list are presented by output from the
6110 tasks run to build the recipe. Use of this variable is one way to
6111 remove dependencies from one recipe on another that affect task
6112 signatures and thus force rebuilds when the recipe changes.
6113
6114 .. note::
6115
6116 If you add an inappropriate variable to this list, the software
6117 might break at runtime if the interface of the recipe was changed
6118 after the other had been built.
6119
6120SITEINFO_BITS
6121 Specifies the number of bits for the target system CPU. The value
6122 should be either "32" or "64".
6123
6124SITEINFO_ENDIANNESS
6125 Specifies the endian byte order of the target system. The value
6126 should be either "le" for little-endian or "be" for big-endian.
6127
6128SKIP_FILEDEPS
6129 Enables removal of all files from the "Provides" section of an RPM
6130 package. Removal of these files is required for packages containing
6131 prebuilt binaries and libraries such as ``libstdc++`` and ``glibc``.
6132
6133 To enable file removal, set the variable to "1" in your
6134 ``conf/local.conf`` configuration file in your: `Build
6135 Directory <#build-directory>`__. SKIP_FILEDEPS = "1"
6136
6137SOC_FAMILY
6138 Groups together machines based upon the same family of SOC (System On
6139 Chip). You typically set this variable in a common ``.inc`` file that
6140 you include in the configuration files of all the machines.
6141
6142 .. note::
6143
6144 You must include
6145 conf/machine/include/soc-family.inc
6146 for this variable to appear in
6147 MACHINEOVERRIDES
6148 .
6149
6150SOLIBS
6151 Defines the suffix for shared libraries used on the target platform.
6152 By default, this suffix is ".so.*" for all Linux-based systems and is
6153 defined in the ``meta/conf/bitbake.conf`` configuration file.
6154
6155 You will see this variable referenced in the default values of
6156 ``FILES_${PN}``.
6157
6158SOLIBSDEV
6159 Defines the suffix for the development symbolic link (symlink) for
6160 shared libraries on the target platform. By default, this suffix is
6161 ".so" for Linux-based systems and is defined in the
6162 ``meta/conf/bitbake.conf`` configuration file.
6163
6164 You will see this variable referenced in the default values of
6165 ``FILES_${PN}-dev``.
6166
6167SOURCE_MIRROR_FETCH
6168 When you are fetching files to create a mirror of sources (i.e.
6169 creating a source mirror), setting ``SOURCE_MIRROR_FETCH`` to "1" in
6170 your ``local.conf`` configuration file ensures the source for all
6171 recipes are fetched regardless of whether or not a recipe is
6172 compatible with the configuration. A recipe is considered
6173 incompatible with the currently configured machine when either or
6174 both the ```COMPATIBLE_MACHINE`` <#var-COMPATIBLE_MACHINE>`__
6175 variable and ```COMPATIBLE_HOST`` <#var-COMPATIBLE_HOST>`__ variables
6176 specify compatibility with a machine other than that of the current
6177 machine or host.
6178
6179 .. note::
6180
6181 Do not set the
6182 SOURCE_MIRROR_FETCH
6183 variable unless you are creating a source mirror. In other words,
6184 do not set the variable during a normal build.
6185
6186SOURCE_MIRROR_URL
6187 Defines your own ```PREMIRRORS`` <#var-PREMIRRORS>`__ from which to
6188 first fetch source before attempting to fetch from the upstream
6189 specified in ```SRC_URI`` <#var-SRC_URI>`__.
6190
6191 To use this variable, you must globally inherit the
6192 ```own-mirrors`` <#ref-classes-own-mirrors>`__ class and then provide
6193 the URL to your mirrors. Here is the general syntax: INHERIT +=
6194 "own-mirrors" SOURCE_MIRROR_URL =
6195 "http://example.com/my_source_mirror"
6196
6197 .. note::
6198
6199 You can specify only a single URL in
6200 SOURCE_MIRROR_URL
6201 .
6202
6203SPDXLICENSEMAP
6204 Maps commonly used license names to their SPDX counterparts found in
6205 ``meta/files/common-licenses/``. For the default ``SPDXLICENSEMAP``
6206 mappings, see the ``meta/conf/licenses.conf`` file.
6207
6208 For additional information, see the ```LICENSE`` <#var-LICENSE>`__
6209 variable.
6210
6211SPECIAL_PKGSUFFIX
6212 A list of prefixes for ```PN`` <#var-PN>`__ used by the OpenEmbedded
6213 build system to create variants of recipes or packages. The list
6214 specifies the prefixes to strip off during certain circumstances such
6215 as the generation of the ```BPN`` <#var-BPN>`__ variable.
6216
6217SPL_BINARY
6218 The file type for the Secondary Program Loader (SPL). Some devices
6219 use an SPL from which to boot (e.g. the BeagleBone development
6220 board). For such cases, you can declare the file type of the SPL
6221 binary in the ``u-boot.inc`` include file, which is used in the
6222 U-Boot recipe.
6223
6224 The SPL file type is set to "null" by default in the ``u-boot.inc``
6225 file as follows: # Some versions of u-boot build an SPL (Second
6226 Program Loader) image that # should be packaged along with the u-boot
6227 binary as well as placed in the # deploy directory. For those
6228 versions they can set the following variables # to allow packaging
6229 the SPL. SPL_BINARY ?= "" SPL_BINARYNAME ?=
6230 "${@os.path.basename(d.getVar("SPL_BINARY"))}" SPL_IMAGE ?=
6231 "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" SPL_SYMLINK ?=
6232 "${SPL_BINARYNAME}-${MACHINE}" The ``SPL_BINARY`` variable helps form
6233 various ``SPL_*`` variables used by the OpenEmbedded build system.
6234
6235 See the BeagleBone machine configuration example in the "`Creating a
6236 new BSP Layer Using the ``bitbake-layers``
6237 Script <&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-bitbake-layers-script>`__"
6238 section in the Yocto Project Board Support Package Developer's Guide
6239 for additional information.
6240
6241SRC_URI
6242 The list of source files - local or remote. This variable tells the
6243 OpenEmbedded build system which bits to pull in for the build and how
6244 to pull them in. For example, if the recipe or append file only needs
6245 to fetch a tarball from the Internet, the recipe or append file uses
6246 a single ``SRC_URI`` entry. On the other hand, if the recipe or
6247 append file needs to fetch a tarball, apply two patches, and include
6248 a custom file, the recipe or append file would include four instances
6249 of the variable.
6250
6251 The following list explains the available URI protocols. URI
6252 protocols are highly dependent on particular BitBake Fetcher
6253 submodules. Depending on the fetcher BitBake uses, various URL
6254 parameters are employed. For specifics on the supported Fetchers, see
6255 the "`Fetchers <&YOCTO_DOCS_BB_URL;#bb-fetchers>`__" section in the
6256 BitBake User Manual.
6257
6258 - *``file://`` -* Fetches files, which are usually files shipped
6259 with the `Metadata <#metadata>`__, from the local machine (e.g.
6260 `patch <&YOCTO_DOCS_OM_URL;#patching-dev-environment>`__ files).
6261 The path is relative to the ```FILESPATH`` <#var-FILESPATH>`__
6262 variable. Thus, the build system searches, in order, from the
6263 following directories, which are assumed to be a subdirectories of
6264 the directory in which the recipe file (``.bb``) or append file
6265 (``.bbappend``) resides:
6266
6267 - *``${BPN}`` -* The base recipe name without any special suffix
6268 or version numbers.
6269
6270 - *``${BP}`` -* ``${BPN}-${PV}``. The base recipe name and
6271 version but without any special package name suffix.
6272
6273 - *files -* Files within a directory, which is named ``files``
6274 and is also alongside the recipe or append file.
6275
6276 .. note::
6277
6278 If you want the build system to pick up files specified through
6279 a
6280 SRC_URI
6281 statement from your append file, you need to be sure to extend
6282 the
6283 FILESPATH
6284 variable by also using the
6285 FILESEXTRAPATHS
6286 variable from within your append file.
6287
6288 - *``bzr://`` -* Fetches files from a Bazaar revision control
6289 repository.
6290
6291 - *``git://`` -* Fetches files from a Git revision control
6292 repository.
6293
6294 - *``osc://`` -* Fetches files from an OSC (OpenSUSE Build service)
6295 revision control repository.
6296
6297 - *``repo://`` -* Fetches files from a repo (Git) repository.
6298
6299 - *``ccrc://`` -* Fetches files from a ClearCase repository.
6300
6301 - *``http://`` -* Fetches files from the Internet using ``http``.
6302
6303 - *``https://`` -* Fetches files from the Internet using ``https``.
6304
6305 - *``ftp://`` -* Fetches files from the Internet using ``ftp``.
6306
6307 - *``cvs://`` -* Fetches files from a CVS revision control
6308 repository.
6309
6310 - *``hg://`` -* Fetches files from a Mercurial (``hg``) revision
6311 control repository.
6312
6313 - *``p4://`` -* Fetches files from a Perforce (``p4``) revision
6314 control repository.
6315
6316 - *``ssh://`` -* Fetches files from a secure shell.
6317
6318 - *``svn://`` -* Fetches files from a Subversion (``svn``) revision
6319 control repository.
6320
6321 - *``npm://`` -* Fetches JavaScript modules from a registry.
6322
6323 Standard and recipe-specific options for ``SRC_URI`` exist. Here are
6324 standard options:
6325
6326 - *``apply`` -* Whether to apply the patch or not. The default
6327 action is to apply the patch.
6328
6329 - *``striplevel`` -* Which striplevel to use when applying the
6330 patch. The default level is 1.
6331
6332 - *``patchdir`` -* Specifies the directory in which the patch should
6333 be applied. The default is ``${``\ ```S`` <#var-S>`__\ ``}``.
6334
6335 Here are options specific to recipes building code from a revision
6336 control system:
6337
6338 - *``mindate`` -* Apply the patch only if
6339 ```SRCDATE`` <#var-SRCDATE>`__ is equal to or greater than
6340 ``mindate``.
6341
6342 - *``maxdate`` -* Apply the patch only if ``SRCDATE`` is not later
6343 than ``maxdate``.
6344
6345 - *``minrev`` -* Apply the patch only if ``SRCREV`` is equal to or
6346 greater than ``minrev``.
6347
6348 - *``maxrev`` -* Apply the patch only if ``SRCREV`` is not later
6349 than ``maxrev``.
6350
6351 - *``rev`` -* Apply the patch only if ``SRCREV`` is equal to
6352 ``rev``.
6353
6354 - *``notrev`` -* Apply the patch only if ``SRCREV`` is not equal to
6355 ``rev``.
6356
6357 Here are some additional options worth mentioning:
6358
6359 - *``unpack`` -* Controls whether or not to unpack the file if it is
6360 an archive. The default action is to unpack the file.
6361
6362 - *``destsuffix`` -* Places the file (or extracts its contents) into
6363 the specified subdirectory of ```WORKDIR`` <#var-WORKDIR>`__ when
6364 the Git fetcher is used.
6365
6366 - *``subdir`` -* Places the file (or extracts its contents) into the
6367 specified subdirectory of ``WORKDIR`` when the local (``file://``)
6368 fetcher is used.
6369
6370 - *``localdir`` -* Places the file (or extracts its contents) into
6371 the specified subdirectory of ``WORKDIR`` when the CVS fetcher is
6372 used.
6373
6374 - *``subpath`` -* Limits the checkout to a specific subpath of the
6375 tree when using the Git fetcher is used.
6376
6377 - *``name`` -* Specifies a name to be used for association with
6378 ``SRC_URI`` checksums when you have more than one file specified
6379 in ``SRC_URI``.
6380
6381 - *``downloadfilename`` -* Specifies the filename used when storing
6382 the downloaded file.
6383
6384SRC_URI_OVERRIDES_PACKAGE_ARCH
6385 By default, the OpenEmbedded build system automatically detects
6386 whether ``SRC_URI`` contains files that are machine-specific. If so,
6387 the build system automatically changes ``PACKAGE_ARCH``. Setting this
6388 variable to "0" disables this behavior.
6389
6390SRCDATE
6391 The date of the source code used to build the package. This variable
6392 applies only if the source was fetched from a Source Code Manager
6393 (SCM).
6394
6395SRCPV
6396 Returns the version string of the current package. This string is
6397 used to help define the value of ```PV`` <#var-PV>`__.
6398
6399 The ``SRCPV`` variable is defined in the ``meta/conf/bitbake.conf``
6400 configuration file in the `Source Directory <#source-directory>`__ as
6401 follows: SRCPV = "${@bb.fetch2.get_srcrev(d)}"
6402
6403 Recipes that need to define ``PV`` do so with the help of the
6404 ``SRCPV``. For example, the ``ofono`` recipe (``ofono_git.bb``)
6405 located in ``meta/recipes-connectivity`` in the Source Directory
6406 defines ``PV`` as follows: PV = "0.12-git${SRCPV}"
6407
6408SRCREV
6409 The revision of the source code used to build the package. This
6410 variable applies to Subversion, Git, Mercurial, and Bazaar only. Note
6411 that if you want to build a fixed revision and you want to avoid
6412 performing a query on the remote repository every time BitBake parses
6413 your recipe, you should specify a ``SRCREV`` that is a full revision
6414 identifier and not just a tag.
6415
6416 .. note::
6417
6418 For information on limitations when inheriting the latest revision
6419 of software using
6420 SRCREV
6421 , see the
6422 AUTOREV
6423 variable description and the "
6424 Automatically Incrementing a Binary Package Revision Number
6425 " section, which is in the Yocto Project Development Tasks Manual.
6426
6427SSTATE_DIR
6428 The directory for the shared state cache.
6429
6430SSTATE_MIRROR_ALLOW_NETWORK
6431 If set to "1", allows fetches from mirrors that are specified in
6432 ```SSTATE_MIRRORS`` <#var-SSTATE_MIRRORS>`__ to work even when
6433 fetching from the network is disabled by setting ``BB_NO_NETWORK`` to
6434 "1". Using the ``SSTATE_MIRROR_ALLOW_NETWORK`` variable is useful if
6435 you have set ``SSTATE_MIRRORS`` to point to an internal server for
6436 your shared state cache, but you want to disable any other fetching
6437 from the network.
6438
6439SSTATE_MIRRORS
6440 Configures the OpenEmbedded build system to search other mirror
6441 locations for prebuilt cache data objects before building out the
6442 data. This variable works like fetcher ```MIRRORS`` <#var-MIRRORS>`__
6443 and ```PREMIRRORS`` <#var-PREMIRRORS>`__ and points to the cache
6444 locations to check for the shared state (sstate) objects.
6445
6446 You can specify a filesystem directory or a remote URL such as HTTP
6447 or FTP. The locations you specify need to contain the shared state
6448 cache (sstate-cache) results from previous builds. The sstate-cache
6449 you point to can also be from builds on other machines.
6450
6451 When pointing to sstate build artifacts on another machine that uses
6452 a different GCC version for native builds, you must configure
6453 ``SSTATE_MIRRORS`` with a regular expression that maps local search
6454 paths to server paths. The paths need to take into account
6455 ```NATIVELSBSTRING`` <#var-NATIVELSBSTRING>`__ set by the
6456 ```uninative`` <#ref-classes-uninative>`__ class. For example, the
6457 following maps the local search path ``universal-4.9`` to the
6458 server-provided path server_url_sstate_path: SSTATE_MIRRORS ?=
6459 file://universal-4.9/(.*)
6460 http://server_url_sstate_path/universal-4.8/\1 \\n
6461
6462 If a mirror uses the same structure as
6463 ```SSTATE_DIR`` <#var-SSTATE_DIR>`__, you need to add "PATH" at the
6464 end as shown in the examples below. The build system substitutes the
6465 correct path within the directory structure. SSTATE_MIRRORS ?= "\\
6466 file://.\*
6467 http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \\n \\
6468 file://.\* file:///some-local-dir/sstate/PATH"
6469
6470SSTATE_SCAN_FILES
6471 Controls the list of files the OpenEmbedded build system scans for
6472 hardcoded installation paths. The variable uses a space-separated
6473 list of filenames (not paths) with standard wildcard characters
6474 allowed.
6475
6476 During a build, the OpenEmbedded build system creates a shared state
6477 (sstate) object during the first stage of preparing the sysroots.
6478 That object is scanned for hardcoded paths for original installation
6479 locations. The list of files that are scanned for paths is controlled
6480 by the ``SSTATE_SCAN_FILES`` variable. Typically, recipes add files
6481 they want to be scanned to the value of ``SSTATE_SCAN_FILES`` rather
6482 than the variable being comprehensively set. The
6483 ```sstate`` <#ref-classes-sstate>`__ class specifies the default list
6484 of files.
6485
6486 For details on the process, see the
6487 ```staging`` <#ref-classes-staging>`__ class.
6488
6489STAGING_BASE_LIBDIR_NATIVE
6490 Specifies the path to the ``/lib`` subdirectory of the sysroot
6491 directory for the build host.
6492
6493STAGING_BASELIBDIR
6494 Specifies the path to the ``/lib`` subdirectory of the sysroot
6495 directory for the target for which the current recipe is being built
6496 (```STAGING_DIR_HOST`` <#var-STAGING_DIR_HOST>`__).
6497
6498STAGING_BINDIR
6499 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
6500 directory for the target for which the current recipe is being built
6501 (```STAGING_DIR_HOST`` <#var-STAGING_DIR_HOST>`__).
6502
6503STAGING_BINDIR_CROSS
6504 Specifies the path to the directory containing binary configuration
6505 scripts. These scripts provide configuration information for other
6506 software that wants to make use of libraries or include files
6507 provided by the software associated with the script.
6508
6509 .. note::
6510
6511 This style of build configuration has been largely replaced by
6512 pkg-config
6513 . Consequently, if
6514 pkg-config
6515 is supported by the library to which you are linking, it is
6516 recommended you use
6517 pkg-config
6518 instead of a provided configuration script.
6519
6520STAGING_BINDIR_NATIVE
6521 Specifies the path to the ``/usr/bin`` subdirectory of the sysroot
6522 directory for the build host.
6523
6524STAGING_DATADIR
6525 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
6526 directory for the target for which the current recipe is being built
6527 (```STAGING_DIR_HOST`` <#var-STAGING_DIR_HOST>`__).
6528
6529STAGING_DATADIR_NATIVE
6530 Specifies the path to the ``/usr/share`` subdirectory of the sysroot
6531 directory for the build host.
6532
6533STAGING_DIR
6534 Helps construct the ``recipe-sysroots`` directory, which is used
6535 during packaging.
6536
6537 For information on how staging for recipe-specific sysroots occurs,
6538 see the ```do_populate_sysroot`` <#ref-tasks-populate_sysroot>`__
6539 task, the "`Sharing Files Between
6540 Recipes <&YOCTO_DOCS_DEV_URL;#new-sharing-files-between-recipes>`__"
6541 section in the Yocto Project Development Tasks Manual, the
6542 "`Configuration, Compilation, and
6543 Staging <&YOCTO_DOCS_OM_URL;#configuration-compilation-and-staging-dev-environment>`__"
6544 section in the Yocto Project Overview and Concepts Manual, and the
6545 ```SYSROOT_DIRS`` <#var-SYSROOT_DIRS>`__ variable.
6546
6547 .. note::
6548
6549 Recipes should never write files directly under the
6550 STAGING_DIR
6551 directory because the OpenEmbedded build system manages the
6552 directory automatically. Instead, files should be installed to
6553 ${
6554 D
6555 }
6556 within your recipe's
6557 do_install
6558 task and then the OpenEmbedded build system will stage a subset of
6559 those files into the sysroot.
6560
6561STAGING_DIR_HOST
6562 Specifies the path to the sysroot directory for the system on which
6563 the component is built to run (the system that hosts the component).
6564 For most recipes, this sysroot is the one in which that recipe's
6565 ```do_populate_sysroot`` <#ref-tasks-populate_sysroot>`__ task copies
6566 files. Exceptions include ``-native`` recipes, where the
6567 ``do_populate_sysroot`` task instead uses
6568 ```STAGING_DIR_NATIVE`` <#var-STAGING_DIR_NATIVE>`__. Depending on
6569 the type of recipe and the build target, ``STAGING_DIR_HOST`` can
6570 have the following values:
6571
6572 - For recipes building for the target machine, the value is
6573 "${`STAGING_DIR <#var-STAGING_DIR>`__}/${`MACHINE <#var-MACHINE>`__}".
6574
6575 - For native recipes building for the build host, the value is empty
6576 given the assumption that when building for the build host, the
6577 build host's own directories should be used.
6578
6579 .. note::
6580
6581 ``-native`` recipes are not installed into host paths like such
6582 as ``/usr``. Rather, these recipes are installed into
6583 ``STAGING_DIR_NATIVE``. When compiling ``-native`` recipes,
6584 standard build environment variables such as
6585 ```CPPFLAGS`` <#var-CPPFLAGS>`__ and
6586 ```CFLAGS`` <#var-CFLAGS>`__ are set up so that both host paths
6587 and ``STAGING_DIR_NATIVE`` are searched for libraries and
6588 headers using, for example, GCC's ``-isystem`` option.
6589
6590 Thus, the emphasis is that the ``STAGING_DIR*`` variables
6591 should be viewed as input variables by tasks such as
6592 ```do_configure`` <#ref-tasks-configure>`__,
6593 ```do_compile`` <#ref-tasks-compile>`__, and
6594 ```do_install`` <#ref-tasks-install>`__. Having the real system
6595 root correspond to ``STAGING_DIR_HOST`` makes conceptual sense
6596 for ``-native`` recipes, as they make use of host headers and
6597 libraries.
6598
6599STAGING_DIR_NATIVE
6600 Specifies the path to the sysroot directory used when building
6601 components that run on the build host itself.
6602
6603STAGING_DIR_TARGET
6604 Specifies the path to the sysroot used for the system for which the
6605 component generates code. For components that do not generate code,
6606 which is the majority, ``STAGING_DIR_TARGET`` is set to match
6607 ```STAGING_DIR_HOST`` <#var-STAGING_DIR_HOST>`__.
6608
6609 Some recipes build binaries that can run on the target system but
6610 those binaries in turn generate code for another different system
6611 (e.g. cross-canadian recipes). Using terminology from GNU, the
6612 primary system is referred to as the "HOST" and the secondary, or
6613 different, system is referred to as the "TARGET". Thus, the binaries
6614 run on the "HOST" system and generate binaries for the "TARGET"
6615 system. The ``STAGING_DIR_HOST`` variable points to the sysroot used
6616 for the "HOST" system, while ``STAGING_DIR_TARGET`` points to the
6617 sysroot used for the "TARGET" system.
6618
6619STAGING_ETCDIR_NATIVE
6620 Specifies the path to the ``/etc`` subdirectory of the sysroot
6621 directory for the build host.
6622
6623STAGING_EXECPREFIXDIR
6624 Specifies the path to the ``/usr`` subdirectory of the sysroot
6625 directory for the target for which the current recipe is being built
6626 (```STAGING_DIR_HOST`` <#var-STAGING_DIR_HOST>`__).
6627
6628STAGING_INCDIR
6629 Specifies the path to the ``/usr/include`` subdirectory of the
6630 sysroot directory for the target for which the current recipe being
6631 built (```STAGING_DIR_HOST`` <#var-STAGING_DIR_HOST>`__).
6632
6633STAGING_INCDIR_NATIVE
6634 Specifies the path to the ``/usr/include`` subdirectory of the
6635 sysroot directory for the build host.
6636
6637STAGING_KERNEL_BUILDDIR
6638 Points to the directory containing the kernel build artifacts.
6639 Recipes building software that needs to access kernel build artifacts
6640 (e.g. ``systemtap-uprobes``) can look in the directory specified with
6641 the ``STAGING_KERNEL_BUILDDIR`` variable to find these artifacts
6642 after the kernel has been built.
6643
6644STAGING_KERNEL_DIR
6645 The directory with kernel headers that are required to build
6646 out-of-tree modules.
6647
6648STAGING_LIBDIR
6649 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
6650 directory for the target for which the current recipe is being built
6651 (```STAGING_DIR_HOST`` <#var-STAGING_DIR_HOST>`__).
6652
6653STAGING_LIBDIR_NATIVE
6654 Specifies the path to the ``/usr/lib`` subdirectory of the sysroot
6655 directory for the build host.
6656
6657STAMP
6658 Specifies the base path used to create recipe stamp files. The path
6659 to an actual stamp file is constructed by evaluating this string and
6660 then appending additional information. Currently, the default
6661 assignment for ``STAMP`` as set in the ``meta/conf/bitbake.conf``
6662 file is: STAMP =
6663 "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
6664
6665 For information on how BitBake uses stamp files to determine if a
6666 task should be rerun, see the "`Stamp Files and the Rerunning of
6667 Tasks <&YOCTO_DOCS_OM_URL;#stamp-files-and-the-rerunning-of-tasks>`__"
6668 section in the Yocto Project Overview and Concepts Manual.
6669
6670 See ```STAMPS_DIR`` <#var-STAMPS_DIR>`__,
6671 ```MULTIMACH_TARGET_SYS`` <#var-MULTIMACH_TARGET_SYS>`__,
6672 ```PN`` <#var-PN>`__, ```EXTENDPE`` <#var-EXTENDPE>`__,
6673 ```PV`` <#var-PV>`__, and ```PR`` <#var-PR>`__ for related variable
6674 information.
6675
6676STAMPS_DIR
6677 Specifies the base directory in which the OpenEmbedded build system
6678 places stamps. The default directory is ``${TMPDIR}/stamps``.
6679
6680STRIP
6681 The minimal command and arguments to run ``strip``, which is used to
6682 strip symbols.
6683
6684SUMMARY
6685 The short (72 characters or less) summary of the binary package for
6686 packaging systems such as ``opkg``, ``rpm``, or ``dpkg``. By default,
6687 ``SUMMARY`` is used to define the
6688 ```DESCRIPTION`` <#var-DESCRIPTION>`__ variable if ``DESCRIPTION`` is
6689 not set in the recipe.
6690
6691SVNDIR
6692 The directory in which files checked out of a Subversion system are
6693 stored.
6694
6695SYSLINUX_DEFAULT_CONSOLE
6696 Specifies the kernel boot default console. If you want to use a
6697 console other than the default, set this variable in your recipe as
6698 follows where "X" is the console number you want to use:
6699 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
6700
6701 The ```syslinux`` <#ref-classes-syslinux>`__ class initially sets
6702 this variable to null but then checks for a value later.
6703
6704SYSLINUX_OPTS
6705 Lists additional options to add to the syslinux file. You need to set
6706 this variable in your recipe. If you want to list multiple options,
6707 separate the options with a semicolon character (``;``).
6708
6709 The ```syslinux`` <#ref-classes-syslinux>`__ class uses this variable
6710 to create a set of options.
6711
6712SYSLINUX_SERIAL
6713 Specifies the alternate serial port or turns it off. To turn off
6714 serial, set this variable to an empty string in your recipe. The
6715 variable's default value is set in the
6716 ```syslinux`` <#ref-classes-syslinux>`__ class as follows:
6717 SYSLINUX_SERIAL ?= "0 115200"
6718
6719 The class checks for and uses the variable as needed.
6720
6721SYSLINUX_SPLASH
6722 An ``.LSS`` file used as the background for the VGA boot menu when
6723 you use the boot menu. You need to set this variable in your recipe.
6724
6725 The ```syslinux`` <#ref-classes-syslinux>`__ class checks for this
6726 variable and if found, the OpenEmbedded build system installs the
6727 splash screen.
6728
6729SYSLINUX_SERIAL_TTY
6730 Specifies the alternate console=tty... kernel boot argument. The
6731 variable's default value is set in the
6732 ```syslinux`` <#ref-classes-syslinux>`__ class as follows:
6733 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
6734
6735 The class checks for and uses the variable as needed.
6736
6737SYSROOT_DESTDIR
6738 Points to the temporary directory under the work directory (default
6739 "``${``\ ```WORKDIR`` <#var-WORKDIR>`__\ ``}/sysroot-destdir``")
6740 where the files populated into the sysroot are assembled during the
6741 ```do_populate_sysroot`` <#ref-tasks-populate_sysroot>`__ task.
6742
6743SYSROOT_DIRS
6744 Directories that are staged into the sysroot by the
6745 ```do_populate_sysroot`` <#ref-tasks-populate_sysroot>`__ task. By
6746 default, the following directories are staged: SYSROOT_DIRS = " \\
6747 ${includedir} \\ ${libdir} \\ ${base_libdir} \\
6748 ${nonarch_base_libdir} \\ ${datadir} \\ "
6749
6750SYSROOT_DIRS_BLACKLIST
6751 Directories that are not staged into the sysroot by the
6752 ```do_populate_sysroot`` <#ref-tasks-populate_sysroot>`__ task. You
6753 can use this variable to exclude certain subdirectories of
6754 directories listed in ```SYSROOT_DIRS`` <#var-SYSROOT_DIRS>`__ from
6755 staging. By default, the following directories are not staged:
6756 SYSROOT_DIRS_BLACKLIST = " \\ ${mandir} \\ ${docdir} \\ ${infodir} \\
6757 ${datadir}/locale \\ ${datadir}/applications \\ ${datadir}/fonts \\
6758 ${datadir}/pixmaps \\ "
6759
6760SYSROOT_DIRS_NATIVE
6761 Extra directories staged into the sysroot by the
6762 ```do_populate_sysroot`` <#ref-tasks-populate_sysroot>`__ task for
6763 ``-native`` recipes, in addition to those specified in
6764 ```SYSROOT_DIRS`` <#var-SYSROOT_DIRS>`__. By default, the following
6765 extra directories are staged: SYSROOT_DIRS_NATIVE = " \\ ${bindir} \\
6766 ${sbindir} \\ ${base_bindir} \\ ${base_sbindir} \\ ${libexecdir} \\
6767 ${sysconfdir} \\ ${localstatedir} \\ "
6768
6769 .. note::
6770
6771 Programs built by
6772 -native
6773 recipes run directly from the sysroot (
6774 STAGING_DIR_NATIVE
6775 ), which is why additional directories containing program
6776 executables and supporting files need to be staged.
6777
6778SYSROOT_PREPROCESS_FUNCS
6779 A list of functions to execute after files are staged into the
6780 sysroot. These functions are usually used to apply additional
6781 processing on the staged files, or to stage additional files.
6782
6783SYSTEMD_AUTO_ENABLE
6784 When inheriting the ```systemd`` <#ref-classes-systemd>`__ class,
6785 this variable specifies whether the specified service in
6786 ```SYSTEMD_SERVICE`` <#var-SYSTEMD_SERVICE>`__ should start
6787 automatically or not. By default, the service is enabled to
6788 automatically start at boot time. The default setting is in the
6789 ```systemd`` <#ref-classes-systemd>`__ class as follows:
6790 SYSTEMD_AUTO_ENABLE ??= "enable"
6791
6792 You can disable the service by setting the variable to "disable".
6793
6794SYSTEMD_BOOT_CFG
6795 When ```EFI_PROVIDER`` <#var-EFI_PROVIDER>`__ is set to
6796 "systemd-boot", the ``SYSTEMD_BOOT_CFG`` variable specifies the
6797 configuration file that should be used. By default, the
6798 ```systemd-boot`` <#ref-classes-systemd-boot>`__ class sets the
6799 ``SYSTEMD_BOOT_CFG`` as follows: SYSTEMD_BOOT_CFG ?=
6800 "${`S <#var-S>`__}/loader.conf"
6801
6802 For information on Systemd-boot, see the `Systemd-boot
6803 documentation <http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
6804
6805SYSTEMD_BOOT_ENTRIES
6806 When ```EFI_PROVIDER`` <#var-EFI_PROVIDER>`__ is set to
6807 "systemd-boot", the ``SYSTEMD_BOOT_ENTRIES`` variable specifies a
6808 list of entry files (``*.conf``) to install that contain one boot
6809 entry per file. By default, the
6810 ```systemd-boot`` <#ref-classes-systemd-boot>`__ class sets the
6811 ``SYSTEMD_BOOT_ENTRIES`` as follows: SYSTEMD_BOOT_ENTRIES ?= ""
6812
6813 For information on Systemd-boot, see the `Systemd-boot
6814 documentation <http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
6815
6816SYSTEMD_BOOT_TIMEOUT
6817 When ```EFI_PROVIDER`` <#var-EFI_PROVIDER>`__ is set to
6818 "systemd-boot", the ``SYSTEMD_BOOT_TIMEOUT`` variable specifies the
6819 boot menu timeout in seconds. By default, the
6820 ```systemd-boot`` <#ref-classes-systemd-boot>`__ class sets the
6821 ``SYSTEMD_BOOT_TIMEOUT`` as follows: SYSTEMD_BOOT_TIMEOUT ?= "10"
6822
6823 For information on Systemd-boot, see the `Systemd-boot
6824 documentation <http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/>`__.
6825
6826SYSTEMD_PACKAGES
6827 When inheriting the ```systemd`` <#ref-classes-systemd>`__ class,
6828 this variable locates the systemd unit files when they are not found
6829 in the main recipe's package. By default, the ``SYSTEMD_PACKAGES``
6830 variable is set such that the systemd unit files are assumed to
6831 reside in the recipes main package: SYSTEMD_PACKAGES ?= "${PN}"
6832
6833 If these unit files are not in this recipe's main package, you need
6834 to use ``SYSTEMD_PACKAGES`` to list the package or packages in which
6835 the build system can find the systemd unit files.
6836
6837SYSTEMD_SERVICE
6838 When inheriting the ```systemd`` <#ref-classes-systemd>`__ class,
6839 this variable specifies the systemd service name for a package.
6840
6841 When you specify this file in your recipe, use a package name
6842 override to indicate the package to which the value applies. Here is
6843 an example from the connman recipe: SYSTEMD_SERVICE_${PN} =
6844 "connman.service"
6845
6846SYSVINIT_ENABLED_GETTYS
6847 When using
6848 `SysVinit <&YOCTO_DOCS_DEV_URL;#new-recipe-enabling-system-services>`__,
6849 specifies a space-separated list of the virtual terminals that should
6850 run a `getty <http://en.wikipedia.org/wiki/Getty_%28Unix%29>`__
6851 (allowing login), assuming ```USE_VT`` <#var-USE_VT>`__ is not set to
6852 "0".
6853
6854 The default value for ``SYSVINIT_ENABLED_GETTYS`` is "1" (i.e. only
6855 run a getty on the first virtual terminal).
6856
6857T
6858 This variable points to a directory were BitBake places temporary
6859 files, which consist mostly of task logs and scripts, when building a
6860 particular recipe. The variable is typically set as follows: T =
6861 "${WORKDIR}/temp"
6862
6863 The ```WORKDIR`` <#var-WORKDIR>`__ is the directory into which
6864 BitBake unpacks and builds the recipe. The default ``bitbake.conf``
6865 file sets this variable.
6866
6867 The ``T`` variable is not to be confused with the
6868 ```TMPDIR`` <#var-TMPDIR>`__ variable, which points to the root of
6869 the directory tree where BitBake places the output of an entire
6870 build.
6871
6872TARGET_ARCH
6873 The target machine's architecture. The OpenEmbedded build system
6874 supports many architectures. Here is an example list of architectures
6875 supported. This list is by no means complete as the architecture is
6876 configurable: arm i586 x86_64 powerpc powerpc64 mips mipsel
6877
6878 For additional information on machine architectures, see the
6879 ```TUNE_ARCH`` <#var-TUNE_ARCH>`__ variable.
6880
6881TARGET_AS_ARCH
6882 Specifies architecture-specific assembler flags for the target
6883 system. ``TARGET_AS_ARCH`` is initialized from
6884 ```TUNE_ASARGS`` <#var-TUNE_ASARGS>`__ by default in the BitBake
6885 configuration file (``meta/conf/bitbake.conf``): TARGET_AS_ARCH =
6886 "${TUNE_ASARGS}"
6887
6888TARGET_CC_ARCH
6889 Specifies architecture-specific C compiler flags for the target
6890 system. ``TARGET_CC_ARCH`` is initialized from
6891 ```TUNE_CCARGS`` <#var-TUNE_CCARGS>`__ by default.
6892
6893 .. note::
6894
6895 It is a common workaround to append
6896 LDFLAGS
6897 to
6898 TARGET_CC_ARCH
6899 in recipes that build software for the target that would not
6900 otherwise respect the exported
6901 LDFLAGS
6902 variable.
6903
6904TARGET_CC_KERNEL_ARCH
6905 This is a specific kernel compiler flag for a CPU or Application
6906 Binary Interface (ABI) tune. The flag is used rarely and only for
6907 cases where a userspace ```TUNE_CCARGS`` <#var-TUNE_CCARGS>`__ is not
6908 compatible with the kernel compilation. The ``TARGET_CC_KERNEL_ARCH``
6909 variable allows the kernel (and associated modules) to use a
6910 different configuration. See the
6911 ``meta/conf/machine/include/arm/feature-arm-thumb.inc`` file in the
6912 `Source Directory <#source-directory>`__ for an example.
6913
6914TARGET_CFLAGS
6915 Specifies the flags to pass to the C compiler when building for the
6916 target. When building in the target context,
6917 ```CFLAGS`` <#var-CFLAGS>`__ is set to the value of this variable by
6918 default.
6919
6920 Additionally, the SDK's environment setup script sets the ``CFLAGS``
6921 variable in the environment to the ``TARGET_CFLAGS`` value so that
6922 executables built using the SDK also have the flags applied.
6923
6924TARGET_CPPFLAGS
6925 Specifies the flags to pass to the C pre-processor (i.e. to both the
6926 C and the C++ compilers) when building for the target. When building
6927 in the target context, ```CPPFLAGS`` <#var-CPPFLAGS>`__ is set to the
6928 value of this variable by default.
6929
6930 Additionally, the SDK's environment setup script sets the
6931 ``CPPFLAGS`` variable in the environment to the ``TARGET_CPPFLAGS``
6932 value so that executables built using the SDK also have the flags
6933 applied.
6934
6935TARGET_CXXFLAGS
6936 Specifies the flags to pass to the C++ compiler when building for the
6937 target. When building in the target context,
6938 ```CXXFLAGS`` <#var-CXXFLAGS>`__ is set to the value of this variable
6939 by default.
6940
6941 Additionally, the SDK's environment setup script sets the
6942 ``CXXFLAGS`` variable in the environment to the ``TARGET_CXXFLAGS``
6943 value so that executables built using the SDK also have the flags
6944 applied.
6945
6946TARGET_FPU
6947 Specifies the method for handling FPU code. For FPU-less targets,
6948 which include most ARM CPUs, the variable must be set to "soft". If
6949 not, the kernel emulation gets used, which results in a performance
6950 penalty.
6951
6952TARGET_LD_ARCH
6953 Specifies architecture-specific linker flags for the target system.
6954 ``TARGET_LD_ARCH`` is initialized from
6955 ```TUNE_LDARGS`` <#var-TUNE_LDARGS>`__ by default in the BitBake
6956 configuration file (``meta/conf/bitbake.conf``): TARGET_LD_ARCH =
6957 "${TUNE_LDARGS}"
6958
6959TARGET_LDFLAGS
6960 Specifies the flags to pass to the linker when building for the
6961 target. When building in the target context,
6962 ```LDFLAGS`` <#var-LDFLAGS>`__ is set to the value of this variable
6963 by default.
6964
6965 Additionally, the SDK's environment setup script sets the
6966 ```LDFLAGS`` <#var-LDFLAGS>`__ variable in the environment to the
6967 ``TARGET_LDFLAGS`` value so that executables built using the SDK also
6968 have the flags applied.
6969
6970TARGET_OS
6971 Specifies the target's operating system. The variable can be set to
6972 "linux" for glibc-based systems (GNU C Library) and to "linux-musl"
6973 for musl libc. For ARM/EABI targets, "linux-gnueabi" and
6974 "linux-musleabi" possible values exist.
6975
6976TARGET_PREFIX
6977 Specifies the prefix used for the toolchain binary target tools.
6978
6979 Depending on the type of recipe and the build target,
6980 ``TARGET_PREFIX`` is set as follows:
6981
6982 - For recipes building for the target machine, the value is
6983 "${`TARGET_SYS <#var-TARGET_SYS>`__}-".
6984
6985 - For native recipes, the build system sets the variable to the
6986 value of ``BUILD_PREFIX``.
6987
6988 - For native SDK recipes (``nativesdk``), the build system sets the
6989 variable to the value of ``SDK_PREFIX``.
6990
6991TARGET_SYS
6992 Specifies the system, including the architecture and the operating
6993 system, for which the build is occurring in the context of the
6994 current recipe.
6995
6996 The OpenEmbedded build system automatically sets this variable based
6997 on ```TARGET_ARCH`` <#var-TARGET_ARCH>`__,
6998 ```TARGET_VENDOR`` <#var-TARGET_VENDOR>`__, and
6999 ```TARGET_OS`` <#var-TARGET_OS>`__ variables.
7000
7001 .. note::
7002
7003 You do not need to set the
7004 TARGET_SYS
7005 variable yourself.
7006
7007 Consider these two examples:
7008
7009 - Given a native recipe on a 32-bit, x86 machine running Linux, the
7010 value is "i686-linux".
7011
7012 - Given a recipe being built for a little-endian, MIPS target
7013 running Linux, the value might be "mipsel-linux".
7014
7015TARGET_VENDOR
7016 Specifies the name of the target vendor.
7017
7018TCLIBC
7019 Specifies the GNU standard C library (``libc``) variant to use during
7020 the build process. This variable replaces ``POKYLIBC``, which is no
7021 longer supported.
7022
7023 You can select "glibc", "musl", "newlib", or "baremetal"
7024
7025TCLIBCAPPEND
7026 Specifies a suffix to be appended onto the
7027 ```TMPDIR`` <#var-TMPDIR>`__ value. The suffix identifies the
7028 ``libc`` variant for building. When you are building for multiple
7029 variants with the same `Build Directory <#build-directory>`__, this
7030 mechanism ensures that output for different ``libc`` variants is kept
7031 separate to avoid potential conflicts.
7032
7033 In the ``defaultsetup.conf`` file, the default value of
7034 ``TCLIBCAPPEND`` is "-${TCLIBC}". However, distros such as poky,
7035 which normally only support one ``libc`` variant, set
7036 ``TCLIBCAPPEND`` to "" in their distro configuration file resulting
7037 in no suffix being applied.
7038
7039TCMODE
7040 Specifies the toolchain selector. ``TCMODE`` controls the
7041 characteristics of the generated packages and images by telling the
7042 OpenEmbedded build system which toolchain profile to use. By default,
7043 the OpenEmbedded build system builds its own internal toolchain. The
7044 variable's default value is "default", which uses that internal
7045 toolchain.
7046
7047 .. note::
7048
7049 If
7050 TCMODE
7051 is set to a value other than "default", then it is your
7052 responsibility to ensure that the toolchain is compatible with the
7053 default toolchain. Using older or newer versions of these
7054 components might cause build problems. See the Release Notes for
7055 the Yocto Project release for the specific components with which
7056 the toolchain must be compatible. To access the Release Notes, go
7057 to the
7058 Downloads
7059 page on the Yocto Project website and click on the "RELEASE
7060 INFORMATION" link for the appropriate release.
7061
7062 The ``TCMODE`` variable is similar to ```TCLIBC`` <#var-TCLIBC>`__,
7063 which controls the variant of the GNU standard C library (``libc``)
7064 used during the build process: ``glibc`` or ``musl``.
7065
7066 With additional layers, it is possible to use a pre-compiled external
7067 toolchain. One example is the Sourcery G++ Toolchain. The support for
7068 this toolchain resides in the separate Mentor Graphics
7069 ``meta-sourcery`` layer at
7070 ` <http://github.com/MentorEmbedded/meta-sourcery/>`__.
7071
7072 The layer's ``README`` file contains information on how to use the
7073 Sourcery G++ Toolchain as an external toolchain. In summary, you must
7074 be sure to add the layer to your ``bblayers.conf`` file in front of
7075 the ``meta`` layer and then set the ``EXTERNAL_TOOLCHAIN`` variable
7076 in your ``local.conf`` file to the location in which you installed
7077 the toolchain.
7078
7079 The fundamentals used for this example apply to any external
7080 toolchain. You can use ``meta-sourcery`` as a template for adding
7081 support for other external toolchains.
7082
7083TEST_EXPORT_DIR
7084 The location the OpenEmbedded build system uses to export tests when
7085 the ```TEST_EXPORT_ONLY`` <#var-TEST_EXPORT_ONLY>`__ variable is set
7086 to "1".
7087
7088 The ``TEST_EXPORT_DIR`` variable defaults to
7089 ``"${TMPDIR}/testimage/${PN}"``.
7090
7091TEST_EXPORT_ONLY
7092 Specifies to export the tests only. Set this variable to "1" if you
7093 do not want to run the tests but you want them to be exported in a
7094 manner that you to run them outside of the build system.
7095
7096TEST_LOG_DIR
7097 Holds the SSH log and the boot log for QEMU machines. The
7098 ``TEST_LOG_DIR`` variable defaults to ``"${WORKDIR}/testimage"``.
7099
7100 .. note::
7101
7102 Actual test results reside in the task log (
7103 log.do_testimage
7104 ), which is in the
7105 ${WORKDIR}/temp/
7106 directory.
7107
7108TEST_POWERCONTROL_CMD
7109 For automated hardware testing, specifies the command to use to
7110 control the power of the target machine under test. Typically, this
7111 command would point to a script that performs the appropriate action
7112 (e.g. interacting with a web-enabled power strip). The specified
7113 command should expect to receive as the last argument "off", "on" or
7114 "cycle" specifying to power off, on, or cycle (power off and then
7115 power on) the device, respectively.
7116
7117TEST_POWERCONTROL_EXTRA_ARGS
7118 For automated hardware testing, specifies additional arguments to
7119 pass through to the command specified in
7120 ```TEST_POWERCONTROL_CMD`` <#var-TEST_POWERCONTROL_CMD>`__. Setting
7121 ``TEST_POWERCONTROL_EXTRA_ARGS`` is optional. You can use it if you
7122 wish, for example, to separate the machine-specific and
7123 non-machine-specific parts of the arguments.
7124
7125TEST_QEMUBOOT_TIMEOUT
7126 The time in seconds allowed for an image to boot before automated
7127 runtime tests begin to run against an image. The default timeout
7128 period to allow the boot process to reach the login prompt is 500
7129 seconds. You can specify a different value in the ``local.conf``
7130 file.
7131
7132 For more information on testing images, see the "`Performing
7133 Automated Runtime
7134 Testing <&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing>`__"
7135 section in the Yocto Project Development Tasks Manual.
7136
7137TEST_SERIALCONTROL_CMD
7138 For automated hardware testing, specifies the command to use to
7139 connect to the serial console of the target machine under test. This
7140 command simply needs to connect to the serial console and forward
7141 that connection to standard input and output as any normal terminal
7142 program does.
7143
7144 For example, to use the Picocom terminal program on serial device
7145 ``/dev/ttyUSB0`` at 115200bps, you would set the variable as follows:
7146 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
7147
7148TEST_SERIALCONTROL_EXTRA_ARGS
7149 For automated hardware testing, specifies additional arguments to
7150 pass through to the command specified in
7151 ```TEST_SERIALCONTROL_CMD`` <#var-TEST_SERIALCONTROL_CMD>`__. Setting
7152 ``TEST_SERIALCONTROL_EXTRA_ARGS`` is optional. You can use it if you
7153 wish, for example, to separate the machine-specific and
7154 non-machine-specific parts of the command.
7155
7156TEST_SERVER_IP
7157 The IP address of the build machine (host machine). This IP address
7158 is usually automatically detected. However, if detection fails, this
7159 variable needs to be set to the IP address of the build machine (i.e.
7160 where the build is taking place).
7161
7162 .. note::
7163
7164 The
7165 TEST_SERVER_IP
7166 variable is only used for a small number of tests such as the
7167 "dnf" test suite, which needs to download packages from
7168 WORKDIR/oe-rootfs-repo
7169 .
7170
7171TEST_TARGET
7172 Specifies the target controller to use when running tests against a
7173 test image. The default controller to use is "qemu": TEST_TARGET =
7174 "qemu"
7175
7176 A target controller is a class that defines how an image gets
7177 deployed on a target and how a target is started. A layer can extend
7178 the controllers by adding a module in the layer's
7179 ``/lib/oeqa/controllers`` directory and by inheriting the
7180 ``BaseTarget`` class, which is an abstract class that cannot be used
7181 as a value of ``TEST_TARGET``.
7182
7183 You can provide the following arguments with ``TEST_TARGET``:
7184
7185 - *"qemu":* Boots a QEMU image and runs the tests. See the
7186 "`Enabling Runtime Tests on
7187 QEMU <&YOCTO_DOCS_DEV_URL;#qemu-image-enabling-tests>`__" section
7188 in the Yocto Project Development Tasks Manual for more
7189 information.
7190
7191 - *"simpleremote":* Runs the tests on target hardware that is
7192 already up and running. The hardware can be on the network or it
7193 can be a device running an image on QEMU. You must also set
7194 ```TEST_TARGET_IP`` <#var-TEST_TARGET_IP>`__ when you use
7195 "simpleremote".
7196
7197 .. note::
7198
7199 This argument is defined in
7200 meta/lib/oeqa/controllers/simpleremote.py
7201 .
7202
7203 For information on running tests on hardware, see the "`Enabling
7204 Runtime Tests on
7205 Hardware <&YOCTO_DOCS_DEV_URL;#hardware-image-enabling-tests>`__"
7206 section in the Yocto Project Development Tasks Manual.
7207
7208TEST_TARGET_IP
7209 The IP address of your hardware under test. The ``TEST_TARGET_IP``
7210 variable has no effect when ```TEST_TARGET`` <#var-TEST_TARGET>`__ is
7211 set to "qemu".
7212
7213 When you specify the IP address, you can also include a port. Here is
7214 an example: TEST_TARGET_IP = "192.168.1.4:2201" Specifying a port is
7215 useful when SSH is started on a non-standard port or in cases when
7216 your hardware under test is behind a firewall or network that is not
7217 directly accessible from your host and you need to do port address
7218 translation.
7219
7220TEST_SUITES
7221 An ordered list of tests (modules) to run against an image when
7222 performing automated runtime testing.
7223
7224 The OpenEmbedded build system provides a core set of tests that can
7225 be used against images.
7226
7227 .. note::
7228
7229 Currently, there is only support for running these tests under
7230 QEMU.
7231
7232 Tests include ``ping``, ``ssh``, ``df`` among others. You can add
7233 your own tests to the list of tests by appending ``TEST_SUITES`` as
7234 follows: TEST_SUITES_append = " mytest" Alternatively, you can
7235 provide the "auto" option to have all applicable tests run against
7236 the image. TEST_SUITES_append = " auto" Using this option causes the
7237 build system to automatically run tests that are applicable to the
7238 image. Tests that are not applicable are skipped.
7239
7240 The order in which tests are run is important. Tests that depend on
7241 another test must appear later in the list than the test on which
7242 they depend. For example, if you append the list of tests with two
7243 tests (``test_A`` and ``test_B``) where ``test_B`` is dependent on
7244 ``test_A``, then you must order the tests as follows: TEST_SUITES = "
7245 test_A test_B"
7246
7247 For more information on testing images, see the "`Performing
7248 Automated Runtime
7249 Testing <&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing>`__"
7250 section in the Yocto Project Development Tasks Manual.
7251
7252TESTIMAGE_AUTO
7253 Automatically runs the series of automated tests for images when an
7254 image is successfully built. Setting ``TESTIMAGE_AUTO`` to "1" causes
7255 any image that successfully builds to automatically boot under QEMU.
7256 Using the variable also adds in dependencies so that any SDK for
7257 which testing is requested is automatically built first.
7258
7259 These tests are written in Python making use of the ``unittest``
7260 module, and the majority of them run commands on the target system
7261 over ``ssh``. You can set this variable to "1" in your ``local.conf``
7262 file in the `Build Directory <#build-directory>`__ to have the
7263 OpenEmbedded build system automatically run these tests after an
7264 image successfully builds: TESTIMAGE_AUTO = "1" For more information
7265 on enabling, running, and writing these tests, see the "`Performing
7266 Automated Runtime
7267 Testing <&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing>`__"
7268 section in the Yocto Project Development Tasks Manual and the
7269 "```testimage*.bbclass`` <#ref-classes-testimage*>`__" section.
7270
7271THISDIR
7272 The directory in which the file BitBake is currently parsing is
7273 located. Do not manually set this variable.
7274
7275TIME
7276 The time the build was started. Times appear using the hour, minute,
7277 and second (HMS) format (e.g. "140159" for one minute and fifty-nine
7278 seconds past 1400 hours).
7279
7280TMPDIR
7281 This variable is the base directory the OpenEmbedded build system
7282 uses for all build output and intermediate files (other than the
7283 shared state cache). By default, the ``TMPDIR`` variable points to
7284 ``tmp`` within the `Build Directory <#build-directory>`__.
7285
7286 If you want to establish this directory in a location other than the
7287 default, you can uncomment and edit the following statement in the
7288 ``conf/local.conf`` file in the `Source
7289 Directory <#source-directory>`__: #TMPDIR = "${TOPDIR}/tmp" An
7290 example use for this scenario is to set ``TMPDIR`` to a local disk,
7291 which does not use NFS, while having the Build Directory use NFS.
7292
7293 The filesystem used by ``TMPDIR`` must have standard filesystem
7294 semantics (i.e. mixed-case files are unique, POSIX file locking, and
7295 persistent inodes). Due to various issues with NFS and bugs in some
7296 implementations, NFS does not meet this minimum requirement.
7297 Consequently, ``TMPDIR`` cannot be on NFS.
7298
7299TOOLCHAIN_HOST_TASK
7300 This variable lists packages the OpenEmbedded build system uses when
7301 building an SDK, which contains a cross-development environment. The
7302 packages specified by this variable are part of the toolchain set
7303 that runs on the ```SDKMACHINE`` <#var-SDKMACHINE>`__, and each
7304 package should usually have the prefix ``nativesdk-``. For example,
7305 consider the following command when building an SDK: $ bitbake -c
7306 populate_sdk imagename In this case, a default list of packages is
7307 set in this variable, but you can add additional packages to the
7308 list. See the "`Adding Individual Packages to the Standard
7309 SDK <&YOCTO_DOCS_SDK_URL;#sdk-adding-individual-packages>`__" section
7310 in the Yocto Project Application Development and the Extensible
7311 Software Development Kit (eSDK) manual for more information.
7312
7313 For background information on cross-development toolchains in the
7314 Yocto Project development environment, see the "`Cross-Development
7315 Toolchain
7316 Generation <&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation>`__"
7317 section in the Yocto Project Overview and Concepts Manual. For
7318 information on setting up a cross-development environment, see the
7319 `Yocto Project Application Development and the Extensible Software
7320 Development Kit (eSDK) <&YOCTO_DOCS_SDK_URL;>`__ manual.
7321
7322TOOLCHAIN_OUTPUTNAME
7323 This variable defines the name used for the toolchain output. The
7324 ```populate_sdk_base`` <#ref-classes-populate-sdk-*>`__ class sets
7325 the ``TOOLCHAIN_OUTPUTNAME`` variable as follows:
7326 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}" See
7327 the ```SDK_NAME`` <#var-SDK_NAME>`__ and
7328 ```SDK_VERSION`` <#var-SDK_VERSION>`__ variables for additional
7329 information.
7330
7331TOOLCHAIN_TARGET_TASK
7332 This variable lists packages the OpenEmbedded build system uses when
7333 it creates the target part of an SDK (i.e. the part built for the
7334 target hardware), which includes libraries and headers. Use this
7335 variable to add individual packages to the part of the SDK that runs
7336 on the target. See the "`Adding Individual Packages to the Standard
7337 SDK <&YOCTO_DOCS_SDK_URL;#sdk-adding-individual-packages>`__" section
7338 in the Yocto Project Application Development and the Extensible
7339 Software Development Kit (eSDK) manual for more information.
7340
7341 For background information on cross-development toolchains in the
7342 Yocto Project development environment, see the "`Cross-Development
7343 Toolchain
7344 Generation <&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation>`__"
7345 section in the Yocto Project Overview and Concepts Manual. For
7346 information on setting up a cross-development environment, see the
7347 `Yocto Project Application Development and the Extensible Software
7348 Development Kit (eSDK) <&YOCTO_DOCS_SDK_URL;>`__ manual.
7349
7350TOPDIR
7351 The top-level `Build Directory <#build-directory>`__. BitBake
7352 automatically sets this variable when you initialize your build
7353 environment using ````` <#structure-core-script>`__.
7354
7355TRANSLATED_TARGET_ARCH
7356 A sanitized version of ```TARGET_ARCH`` <#var-TARGET_ARCH>`__. This
7357 variable is used where the architecture is needed in a value where
7358 underscores are not allowed, for example within package filenames. In
7359 this case, dash characters replace any underscore characters used in
7360 ``TARGET_ARCH``.
7361
7362 Do not edit this variable.
7363
7364TUNE_ARCH
7365 The GNU canonical architecture for a specific architecture (i.e.
7366 ``arm``, ``armeb``, ``mips``, ``mips64``, and so forth). BitBake uses
7367 this value to setup configuration.
7368
7369 ``TUNE_ARCH`` definitions are specific to a given architecture. The
7370 definitions can be a single static definition, or can be dynamically
7371 adjusted. You can see details for a given CPU family by looking at
7372 the architecture's ``README`` file. For example, the
7373 ``meta/conf/machine/include/mips/README`` file in the `Source
7374 Directory <#source-directory>`__ provides information for
7375 ``TUNE_ARCH`` specific to the ``mips`` architecture.
7376
7377 ``TUNE_ARCH`` is tied closely to
7378 ```TARGET_ARCH`` <#var-TARGET_ARCH>`__, which defines the target
7379 machine's architecture. The BitBake configuration file
7380 (``meta/conf/bitbake.conf``) sets ``TARGET_ARCH`` as follows:
7381 TARGET_ARCH = "${TUNE_ARCH}"
7382
7383 The following list, which is by no means complete since architectures
7384 are configurable, shows supported machine architectures: arm i586
7385 x86_64 powerpc powerpc64 mips mipsel
7386
7387TUNE_ASARGS
7388 Specifies architecture-specific assembler flags for the target
7389 system. The set of flags is based on the selected tune features.
7390 ``TUNE_ASARGS`` is set using the tune include files, which are
7391 typically under ``meta/conf/machine/include/`` and are influenced
7392 through ```TUNE_FEATURES`` <#var-TUNE_FEATURES>`__. For example, the
7393 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
7394 for the x86 architecture as follows: TUNE_ASARGS +=
7395 "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
7396
7397 .. note::
7398
7399 Board Support Packages (BSPs) select the tune. The selected tune,
7400 in turn, affects the tune variables themselves (i.e. the tune can
7401 supply its own set of flags).
7402
7403TUNE_CCARGS
7404 Specifies architecture-specific C compiler flags for the target
7405 system. The set of flags is based on the selected tune features.
7406 ``TUNE_CCARGS`` is set using the tune include files, which are
7407 typically under ``meta/conf/machine/include/`` and are influenced
7408 through ```TUNE_FEATURES`` <#var-TUNE_FEATURES>`__.
7409
7410 .. note::
7411
7412 Board Support Packages (BSPs) select the tune. The selected tune,
7413 in turn, affects the tune variables themselves (i.e. the tune can
7414 supply its own set of flags).
7415
7416TUNE_LDARGS
7417 Specifies architecture-specific linker flags for the target system.
7418 The set of flags is based on the selected tune features.
7419 ``TUNE_LDARGS`` is set using the tune include files, which are
7420 typically under ``meta/conf/machine/include/`` and are influenced
7421 through ```TUNE_FEATURES`` <#var-TUNE_FEATURES>`__. For example, the
7422 ``meta/conf/machine/include/x86/arch-x86.inc`` file defines the flags
7423 for the x86 architecture as follows: TUNE_LDARGS +=
7424 "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "",
7425 d)}"
7426
7427 .. note::
7428
7429 Board Support Packages (BSPs) select the tune. The selected tune,
7430 in turn, affects the tune variables themselves (i.e. the tune can
7431 supply its own set of flags).
7432
7433TUNE_FEATURES
7434 Features used to "tune" a compiler for optimal use given a specific
7435 processor. The features are defined within the tune files and allow
7436 arguments (i.e. ``TUNE_*ARGS``) to be dynamically generated based on
7437 the features.
7438
7439 The OpenEmbedded build system verifies the features to be sure they
7440 are not conflicting and that they are supported.
7441
7442 The BitBake configuration file (``meta/conf/bitbake.conf``) defines
7443 ``TUNE_FEATURES`` as follows: TUNE_FEATURES ??=
7444 "${TUNE_FEATURES_tune-${DEFAULTTUNE}}" See the
7445 ```DEFAULTTUNE`` <#var-DEFAULTTUNE>`__ variable for more information.
7446
7447TUNE_PKGARCH
7448 The package architecture understood by the packaging system to define
7449 the architecture, ABI, and tuning of output packages. The specific
7450 tune is defined using the "_tune" override as follows:
7451 TUNE_PKGARCH_tune-tune = "tune"
7452
7453 These tune-specific package architectures are defined in the machine
7454 include files. Here is an example of the "core2-32" tuning as used in
7455 the ``meta/conf/machine/include/tune-core2.inc`` file:
7456 TUNE_PKGARCH_tune-core2-32 = "core2-32"
7457
7458TUNEABI
7459 An underlying Application Binary Interface (ABI) used by a particular
7460 tuning in a given toolchain layer. Providers that use prebuilt
7461 libraries can use the ``TUNEABI``,
7462 ```TUNEABI_OVERRIDE`` <#var-TUNEABI_OVERRIDE>`__, and
7463 ```TUNEABI_WHITELIST`` <#var-TUNEABI_WHITELIST>`__ variables to check
7464 compatibility of tunings against their selection of libraries.
7465
7466 If ``TUNEABI`` is undefined, then every tuning is allowed. See the
7467 ```sanity`` <#ref-classes-sanity>`__ class to see how the variable is
7468 used.
7469
7470TUNEABI_OVERRIDE
7471 If set, the OpenEmbedded system ignores the
7472 ```TUNEABI_WHITELIST`` <#var-TUNEABI_WHITELIST>`__ variable.
7473 Providers that use prebuilt libraries can use the
7474 ``TUNEABI_OVERRIDE``, ``TUNEABI_WHITELIST``, and
7475 ```TUNEABI`` <#var-TUNEABI>`__ variables to check compatibility of a
7476 tuning against their selection of libraries.
7477
7478 See the ```sanity`` <#ref-classes-sanity>`__ class to see how the
7479 variable is used.
7480
7481TUNEABI_WHITELIST
7482 A whitelist of permissible ```TUNEABI`` <#var-TUNEABI>`__ values. If
7483 ``TUNEABI_WHITELIST`` is not set, all tunes are allowed. Providers
7484 that use prebuilt libraries can use the ``TUNEABI_WHITELIST``,
7485 ```TUNEABI_OVERRIDE`` <#var-TUNEABI_OVERRIDE>`__, and ``TUNEABI``
7486 variables to check compatibility of a tuning against their selection
7487 of libraries.
7488
7489 See the ```sanity`` <#ref-classes-sanity>`__ class to see how the
7490 variable is used.
7491
7492TUNECONFLICTS[feature]
7493 Specifies CPU or Application Binary Interface (ABI) tuning features
7494 that conflict with feature.
7495
7496 Known tuning conflicts are specified in the machine include files in
7497 the `Source Directory <#source-directory>`__. Here is an example from
7498 the ``meta/conf/machine/include/mips/arch-mips.inc`` include file
7499 that lists the "o32" and "n64" features as conflicting with the "n32"
7500 feature: TUNECONFLICTS[n32] = "o32 n64"
7501
7502TUNEVALID[feature]
7503 Specifies a valid CPU or Application Binary Interface (ABI) tuning
7504 feature. The specified feature is stored as a flag. Valid features
7505 are specified in the machine include files (e.g.
7506 ``meta/conf/machine/include/arm/arch-arm.inc``). Here is an example
7507 from that file: TUNEVALID[bigendian] = "Enable big-endian mode."
7508
7509 See the machine include files in the `Source
7510 Directory <#source-directory>`__ for these features.
7511
7512UBOOT_CONFIG
7513 Configures the ```UBOOT_MACHINE`` <#var-UBOOT_MACHINE>`__ and can
7514 also define ```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__ for individual
7515 cases.
7516
7517 Following is an example from the ``meta-fsl-arm`` layer. UBOOT_CONFIG
7518 ??= "sd" UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
7519 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
7520 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
7521 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config" In this example,
7522 "sd" is selected as the configuration of the possible four for the
7523 ``UBOOT_MACHINE``. The "sd" configuration defines
7524 "mx6qsabreauto_config" as the value for ``UBOOT_MACHINE``, while the
7525 "sdcard" specifies the ``IMAGE_FSTYPES`` to use for the U-boot image.
7526
7527 For more information on how the ``UBOOT_CONFIG`` is handled, see the
7528 ```uboot-config`` <http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/uboot-config.bbclass>`__
7529 class.
7530
7531UBOOT_ENTRYPOINT
7532 Specifies the entry point for the U-Boot image. During U-Boot image
7533 creation, the ``UBOOT_ENTRYPOINT`` variable is passed as a
7534 command-line parameter to the ``uboot-mkimage`` utility.
7535
7536UBOOT_LOADADDRESS
7537 Specifies the load address for the U-Boot image. During U-Boot image
7538 creation, the ``UBOOT_LOADADDRESS`` variable is passed as a
7539 command-line parameter to the ``uboot-mkimage`` utility.
7540
7541UBOOT_LOCALVERSION
7542 Appends a string to the name of the local version of the U-Boot
7543 image. For example, assuming the version of the U-Boot image built
7544 was "2013.10", the full version string reported by U-Boot would be
7545 "2013.10-yocto" given the following statement: UBOOT_LOCALVERSION =
7546 "-yocto"
7547
7548UBOOT_MACHINE
7549 Specifies the value passed on the ``make`` command line when building
7550 a U-Boot image. The value indicates the target platform
7551 configuration. You typically set this variable from the machine
7552 configuration file (i.e. ``conf/machine/machine_name.conf``).
7553
7554 Please see the "Selection of Processor Architecture and Board Type"
7555 section in the U-Boot README for valid values for this variable.
7556
7557UBOOT_MAKE_TARGET
7558 Specifies the target called in the ``Makefile``. The default target
7559 is "all".
7560
7561UBOOT_MKIMAGE_DTCOPTS
7562 Options for the device tree compiler passed to mkimage '-D'
7563 feature while creating FIT image in ``kernel-fitimage`` class.
7564
7565UBOOT_RD_LOADADDRESS
7566 Specifies the load address for the RAM disk image.
7567 During FIT image creation, the
7568 ``UBOOT_RD_LOADADDRESS`` variable is used
7569 in ``kernel-fitimage`` class to specify the
7570 load address to be used in creating the Image Tree Source for
7571 the FIT image.
7572
7573UBOOT_RD_ENTRYPOINT
7574 Specifies the entrypoint for the RAM disk image.
7575 During FIT image creation, the
7576 ``UBOOT_RD_ENTRYPOINT`` variable is used
7577 in ``kernel-fitimage`` class to specify the
7578 entrypoint to be used in creating the Image Tree Source for
7579 the FIT image.
7580
7581UBOOT_SUFFIX
7582 Points to the generated U-Boot extension. For example, ``u-boot.sb``
7583 has a ``.sb`` extension.
7584
7585 The default U-Boot extension is ``.bin``
7586
7587UBOOT_TARGET
7588 Specifies the target used for building U-Boot. The target is passed
7589 directly as part of the "make" command (e.g. SPL and AIS). If you do
7590 not specifically set this variable, the OpenEmbedded build process
7591 passes and uses "all" for the target during the U-Boot building
7592 process.
7593
7594UBOOT_SIGN_ENABLE
7595 Enable signing of FIT image. The default value is "0".
7596
7597UBOOT_SIGN_KEYDIR
7598 Location of the directory containing the RSA key and
7599 certificate used for signing FIT image.
7600
7601UBOOT_SIGN_KEYNAME
7602 The name of keys used for signing U-boot FIT image stored in
7603 :term:`UBOOT_SIGN_KEYDIR` directory. For e.g. dev.key key and dev.crt
7604 certificate stored in :term:`UBOOT_SIGN_KEYDIR` directory will have
7605 :term:`UBOOT_SIGN_KEYNAME` set to "dev".
7606
7607UNKNOWN_CONFIGURE_WHITELIST
7608 Specifies a list of options that, if reported by the configure script
7609 as being invalid, should not generate a warning during the
7610 ```do_configure`` <#ref-tasks-configure>`__ task. Normally, invalid
7611 configure options are simply not passed to the configure script (e.g.
7612 should be removed from ```EXTRA_OECONF`` <#var-EXTRA_OECONF>`__ or
7613 ```PACKAGECONFIG_CONFARGS`` <#var-PACKAGECONFIG_CONFARGS>`__).
7614 However, common options, for example, exist that are passed to all
7615 configure scripts at a class level that might not be valid for some
7616 configure scripts. It follows that no benefit exists in seeing a
7617 warning about these options. For these cases, the options are added
7618 to ``UNKNOWN_CONFIGURE_WHITELIST``.
7619
7620 The configure arguments check that uses
7621 ``UNKNOWN_CONFIGURE_WHITELIST`` is part of the
7622 ```insane`` <#ref-classes-insane>`__ class and is only enabled if the
7623 recipe inherits the ```autotools`` <#ref-classes-autotools>`__ class.
7624
7625UPDATERCPN
7626 For recipes inheriting the
7627 ```update-rc.d`` <#ref-classes-update-rc.d>`__ class, ``UPDATERCPN``
7628 specifies the package that contains the initscript that is enabled.
7629
7630 The default value is "${PN}". Given that almost all recipes that
7631 install initscripts package them in the main package for the recipe,
7632 you rarely need to set this variable in individual recipes.
7633
7634UPSTREAM_CHECK_GITTAGREGEX
7635 You can perform a per-recipe check for what the latest upstream
7636 source code version is by calling ``bitbake -c checkpkg`` recipe. If
7637 the recipe source code is provided from Git repositories, the
7638 OpenEmbedded build system determines the latest upstream version by
7639 picking the latest tag from the list of all repository tags.
7640
7641 You can use the ``UPSTREAM_CHECK_GITTAGREGEX`` variable to provide a
7642 regular expression to filter only the relevant tags should the
7643 default filter not work correctly. UPSTREAM_CHECK_GITTAGREGEX =
7644 "git_tag_regex"
7645
7646UPSTREAM_CHECK_REGEX
7647 Use the ``UPSTREAM_CHECK_REGEX`` variable to specify a different
7648 regular expression instead of the default one when the package
7649 checking system is parsing the page found using
7650 ```UPSTREAM_CHECK_URI`` <#var-UPSTREAM_CHECK_URI>`__.
7651 UPSTREAM_CHECK_REGEX = "package_regex"
7652
7653UPSTREAM_CHECK_URI
7654 You can perform a per-recipe check for what the latest upstream
7655 source code version is by calling ``bitbake -c checkpkg`` recipe. If
7656 the source code is provided from tarballs, the latest version is
7657 determined by fetching the directory listing where the tarball is and
7658 attempting to find a later tarball. When this approach does not work,
7659 you can use ``UPSTREAM_CHECK_URI`` to provide a different URI that
7660 contains the link to the latest tarball. UPSTREAM_CHECK_URI =
7661 "recipe_url"
7662
7663USE_DEVFS
7664 Determines if ``devtmpfs`` is used for ``/dev`` population. The
7665 default value used for ``USE_DEVFS`` is "1" when no value is
7666 specifically set. Typically, you would set ``USE_DEVFS`` to "0" for a
7667 statically populated ``/dev`` directory.
7668
7669 See the "`Selecting a Device
7670 Manager <&YOCTO_DOCS_DEV_URL;#selecting-dev-manager>`__" section in
7671 the Yocto Project Development Tasks Manual for information on how to
7672 use this variable.
7673
7674USE_VT
7675 When using
7676 `SysVinit <&YOCTO_DOCS_DEV_URL;#new-recipe-enabling-system-services>`__,
7677 determines whether or not to run a
7678 `getty <http://en.wikipedia.org/wiki/Getty_%28Unix%29>`__ on any
7679 virtual terminals in order to enable logging in through those
7680 terminals.
7681
7682 The default value used for ``USE_VT`` is "1" when no default value is
7683 specifically set. Typically, you would set ``USE_VT`` to "0" in the
7684 machine configuration file for machines that do not have a graphical
7685 display attached and therefore do not need virtual terminal
7686 functionality.
7687
7688USER_CLASSES
7689 A list of classes to globally inherit. These classes are used by the
7690 OpenEmbedded build system to enable extra features (e.g.
7691 ``buildstats``, ``image-mklibs``, and so forth).
7692
7693 The default list is set in your ``local.conf`` file: USER_CLASSES ?=
7694 "buildstats image-mklibs image-prelink" For more information, see
7695 ``meta-poky/conf/local.conf.sample`` in the `Source
7696 Directory <#source-directory>`__.
7697
7698USERADD_ERROR_DYNAMIC
7699 If set to ``error``, forces the OpenEmbedded build system to produce
7700 an error if the user identification (``uid``) and group
7701 identification (``gid``) values are not defined in any of the files
7702 listed in ```USERADD_UID_TABLES`` <#var-USERADD_UID_TABLES>`__ and
7703 ```USERADD_GID_TABLES`` <#var-USERADD_GID_TABLES>`__. If set to
7704 ``warn``, a warning will be issued instead.
7705
7706 The default behavior for the build system is to dynamically apply
7707 ``uid`` and ``gid`` values. Consequently, the
7708 ``USERADD_ERROR_DYNAMIC`` variable is by default not set. If you plan
7709 on using statically assigned ``gid`` and ``uid`` values, you should
7710 set the ``USERADD_ERROR_DYNAMIC`` variable in your ``local.conf``
7711 file as follows: USERADD_ERROR_DYNAMIC = "error" Overriding the
7712 default behavior implies you are going to also take steps to set
7713 static ``uid`` and ``gid`` values through use of the
7714 ```USERADDEXTENSION`` <#var-USERADDEXTENSION>`__,
7715 ```USERADD_UID_TABLES`` <#var-USERADD_UID_TABLES>`__, and
7716 ```USERADD_GID_TABLES`` <#var-USERADD_GID_TABLES>`__ variables.
7717
7718 .. note::
7719
7720 There is a difference in behavior between setting
7721 USERADD_ERROR_DYNAMIC
7722 to
7723 error
7724 and setting it to
7725 warn
7726 . When it is set to
7727 warn
7728 , the build system will report a warning for every undefined
7729 uid
7730 and
7731 gid
7732 in any recipe. But when it is set to
7733 error
7734 , it will only report errors for recipes that are actually built.
7735 This saves you from having to add static IDs for recipes that you
7736 know will never be built.
7737
7738USERADD_GID_TABLES
7739 Specifies a password file to use for obtaining static group
7740 identification (``gid``) values when the OpenEmbedded build system
7741 adds a group to the system during package installation.
7742
7743 When applying static group identification (``gid``) values, the
7744 OpenEmbedded build system looks in ```BBPATH`` <#var-BBPATH>`__ for a
7745 ``files/group`` file and then applies those ``uid`` values. Set the
7746 variable as follows in your ``local.conf`` file: USERADD_GID_TABLES =
7747 "files/group"
7748
7749 .. note::
7750
7751 Setting the
7752 USERADDEXTENSION
7753 variable to "useradd-staticids" causes the build system to use
7754 static
7755 gid
7756 values.
7757
7758USERADD_PACKAGES
7759 When inheriting the ```useradd`` <#ref-classes-useradd>`__ class,
7760 this variable specifies the individual packages within the recipe
7761 that require users and/or groups to be added.
7762
7763 You must set this variable if the recipe inherits the class. For
7764 example, the following enables adding a user for the main package in
7765 a recipe: USERADD_PACKAGES = "${PN}"
7766
7767 .. note::
7768
7769 It follows that if you are going to use the
7770 USERADD_PACKAGES
7771 variable, you need to set one or more of the
7772 USERADD_PARAM
7773 ,
7774 GROUPADD_PARAM
7775 , or
7776 GROUPMEMS_PARAM
7777 variables.
7778
7779USERADD_PARAM
7780 When inheriting the ```useradd`` <#ref-classes-useradd>`__ class,
7781 this variable specifies for a package what parameters should pass to
7782 the ``useradd`` command if you add a user to the system when the
7783 package is installed.
7784
7785 Here is an example from the ``dbus`` recipe: USERADD_PARAM_${PN} =
7786 "--system --home ${localstatedir}/lib/dbus \\ --no-create-home
7787 --shell /bin/false \\ --user-group messagebus" For information on the
7788 standard Linux shell command ``useradd``, see
7789 ` <http://linux.die.net/man/8/useradd>`__.
7790
7791USERADD_UID_TABLES
7792 Specifies a password file to use for obtaining static user
7793 identification (``uid``) values when the OpenEmbedded build system
7794 adds a user to the system during package installation.
7795
7796 When applying static user identification (``uid``) values, the
7797 OpenEmbedded build system looks in ```BBPATH`` <#var-BBPATH>`__ for a
7798 ``files/passwd`` file and then applies those ``uid`` values. Set the
7799 variable as follows in your ``local.conf`` file: USERADD_UID_TABLES =
7800 "files/passwd"
7801
7802 .. note::
7803
7804 Setting the
7805 USERADDEXTENSION
7806 variable to "useradd-staticids" causes the build system to use
7807 static
7808 uid
7809 values.
7810
7811USERADDEXTENSION
7812 When set to "useradd-staticids", causes the OpenEmbedded build system
7813 to base all user and group additions on a static ``passwd`` and
7814 ``group`` files found in ```BBPATH`` <#var-BBPATH>`__.
7815
7816 To use static user identification (``uid``) and group identification
7817 (``gid``) values, set the variable as follows in your ``local.conf``
7818 file: USERADDEXTENSION = "useradd-staticids"
7819
7820 .. note::
7821
7822 Setting this variable to use static
7823 uid
7824 and
7825 gid
7826 values causes the OpenEmbedded build system to employ the
7827 useradd-staticids
7828 class.
7829
7830 If you use static ``uid`` and ``gid`` information, you must also
7831 specify the ``files/passwd`` and ``files/group`` files by setting the
7832 ```USERADD_UID_TABLES`` <#var-USERADD_UID_TABLES>`__ and
7833 ```USERADD_GID_TABLES`` <#var-USERADD_GID_TABLES>`__ variables.
7834 Additionally, you should also set the
7835 ```USERADD_ERROR_DYNAMIC`` <#var-USERADD_ERROR_DYNAMIC>`__ variable.
7836
7837VOLATILE_LOG_DIR
7838 Specifies the persistence of the target's ``/var/log`` directory,
7839 which is used to house postinstall target log files.
7840
7841 By default, ``VOLATILE_LOG_DIR`` is set to "yes", which means the
7842 file is not persistent. You can override this setting by setting the
7843 variable to "no" to make the log directory persistent.
7844
7845WARN_QA
7846 Specifies the quality assurance checks whose failures are reported as
7847 warnings by the OpenEmbedded build system. You set this variable in
7848 your distribution configuration file. For a list of the checks you
7849 can control with this variable, see the
7850 "```insane.bbclass`` <#ref-classes-insane>`__" section.
7851
7852WKS_FILE_DEPENDS
7853 When placed in the recipe that builds your image, this variable lists
7854 build-time dependencies. The ``WKS_FILE_DEPENDS`` variable is only
7855 applicable when Wic images are active (i.e. when
7856 ```IMAGE_FSTYPES`` <#var-IMAGE_FSTYPES>`__ contains entries related
7857 to Wic). If your recipe does not create Wic images, the variable has
7858 no effect.
7859
7860 The ``WKS_FILE_DEPENDS`` variable is similar to the
7861 ```DEPENDS`` <#var-DEPENDS>`__ variable. When you use the variable in
7862 your recipe that builds the Wic image, dependencies you list in the
7863 ``WIC_FILE_DEPENDS`` variable are added to the ``DEPENDS`` variable.
7864
7865 With the ``WKS_FILE_DEPENDS`` variable, you have the possibility to
7866 specify a list of additional dependencies (e.g. native tools,
7867 bootloaders, and so forth), that are required to build Wic images.
7868 Following is an example: WKS_FILE_DEPENDS = "some-native-tool" In the
7869 previous example, some-native-tool would be replaced with an actual
7870 native tool on which the build would depend.
7871
7872WKS_FILE
7873 Specifies the location of the Wic kickstart file that is used by the
7874 OpenEmbedded build system to create a partitioned image
7875 (image\ ``.wic``). For information on how to create a partitioned
7876 image, see the "`Creating Partitioned Images Using
7877 Wic <&YOCTO_DOCS_DEV_URL;#creating-partitioned-images-using-wic>`__"
7878 section in the Yocto Project Development Tasks Manual. For details on
7879 the kickstart file format, see the "`OpenEmbedded Kickstart
7880 (``.wks``) Reference <#ref-kickstart>`__" Chapter.
7881
7882WORKDIR
7883 The pathname of the work directory in which the OpenEmbedded build
7884 system builds a recipe. This directory is located within the
7885 ```TMPDIR`` <#var-TMPDIR>`__ directory structure and is specific to
7886 the recipe being built and the system for which it is being built.
7887
7888 The ``WORKDIR`` directory is defined as follows:
7889 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
7890 The actual directory depends on several things:
7891
7892 - TMPDIR
7893 : The top-level build output directory
7894 - MULTIMACH_TARGET_SYS
7895 : The target system identifier
7896 - PN
7897 : The recipe name
7898 - EXTENDPE
7899 : The epoch - (if
7900 PE
7901 is not specified, which is usually the case for most recipes, then
7902 EXTENDPE
7903 is blank)
7904 - PV
7905 : The recipe version
7906 - PR
7907 : The recipe revision
7908
7909 As an example, assume a Source Directory top-level folder name
7910 ``poky``, a default Build Directory at ``poky/build``, and a
7911 ``qemux86-poky-linux`` machine target system. Furthermore, suppose
7912 your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
7913 directory the build system uses to build the package would be as
7914 follows: poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
7915
7916XSERVER
7917 Specifies the packages that should be installed to provide an X
7918 server and drivers for the current machine, assuming your image
7919 directly includes ``packagegroup-core-x11-xserver`` or, perhaps
7920 indirectly, includes "x11-base" in
7921 ```IMAGE_FEATURES`` <#var-IMAGE_FEATURES>`__.
7922
7923 The default value of ``XSERVER``, if not specified in the machine
7924 configuration, is "xserver-xorg xf86-video-fbdev xf86-input-evdev".
diff --git a/documentation/ref-manual/ref-varlocality.rst b/documentation/ref-manual/ref-varlocality.rst
new file mode 100644
index 0000000000..d98283c6fb
--- /dev/null
+++ b/documentation/ref-manual/ref-varlocality.rst
@@ -0,0 +1,164 @@
1****************
2Variable Context
3****************
4
5While you can use most variables in almost any context such as
6``.conf``, ``.bbclass``, ``.inc``, and ``.bb`` files, some variables are
7often associated with a particular locality or context. This chapter
8describes some common associations.
9
10.. _ref-varlocality-configuration:
11
12Configuration
13=============
14
15The following subsections provide lists of variables whose context is
16configuration: distribution, machine, and local.
17
18.. _ref-varlocality-config-distro:
19
20Distribution (Distro)
21---------------------
22
23This section lists variables whose configuration context is the
24distribution, or distro.
25
26- ``DISTRO``
27
28- ``DISTRO_NAME``
29
30- ``DISTRO_VERSION``
31
32- ``MAINTAINER``
33
34- ``PACKAGE_CLASSES``
35
36- ``TARGET_OS``
37
38- ``TARGET_FPU``
39
40- ``TCMODE``
41
42- ``TCLIBC``
43
44.. _ref-varlocality-config-machine:
45
46Machine
47-------
48
49This section lists variables whose configuration context is the machine.
50
51- ``TARGET_ARCH``
52
53- ``SERIAL_CONSOLES``
54
55- ``PACKAGE_EXTRA_ARCHS``
56
57- ``IMAGE_FSTYPES``
58
59- ``MACHINE_FEATURES``
60
61- ``MACHINE_EXTRA_RDEPENDS``
62
63- ``MACHINE_EXTRA_RRECOMMENDS``
64
65- ``MACHINE_ESSENTIAL_EXTRA_RDEPENDS``
66
67- ``MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS``
68
69.. _ref-varlocality-config-local:
70
71Local
72-----
73
74This section lists variables whose configuration context is the local
75configuration through the ``local.conf`` file.
76
77- ``DISTRO``
78
79- ``MACHINE``
80
81- ``DL_DIR``
82
83- ``BBFILES``
84
85- ``EXTRA_IMAGE_FEATURES``
86
87- ``PACKAGE_CLASSES``
88
89- ``BB_NUMBER_THREADS``
90
91- ``BBINCLUDELOGS``
92
93- ``ENABLE_BINARY_LOCALE_GENERATION``
94
95.. _ref-varlocality-recipes:
96
97Recipes
98=======
99
100The following subsections provide lists of variables whose context is
101recipes: required, dependencies, path, and extra build information.
102
103.. _ref-varlocality-recipe-required:
104
105Required
106--------
107
108This section lists variables that are required for recipes.
109
110- ``LICENSE``
111
112- ``LIC_FILES_CHKSUM``
113
114- ``SRC_URI`` - used in recipes that fetch local or remote files.
115
116.. _ref-varlocality-recipe-dependencies:
117
118Dependencies
119------------
120
121This section lists variables that define recipe dependencies.
122
123- ``DEPENDS``
124
125- ``RDEPENDS``
126
127- ``RRECOMMENDS``
128
129- ``RCONFLICTS``
130
131- ``RREPLACES``
132
133.. _ref-varlocality-recipe-paths:
134
135Paths
136-----
137
138This section lists variables that define recipe paths.
139
140- ``WORKDIR``
141
142- ``S``
143
144- ``FILES``
145
146.. _ref-varlocality-recipe-build:
147
148Extra Build Information
149-----------------------
150
151This section lists variables that define extra build information for
152recipes.
153
154- ``DEFAULT_PREFERENCE``
155
156- ``EXTRA_OECMAKE``
157
158- ``EXTRA_OECONF``
159
160- ``EXTRA_OEMAKE``
161
162- ``PACKAGECONFIG_CONFARGS``
163
164- ``PACKAGES``
diff --git a/documentation/ref-manual/resources.rst b/documentation/ref-manual/resources.rst
new file mode 100644
index 0000000000..9364ea9a64
--- /dev/null
+++ b/documentation/ref-manual/resources.rst
@@ -0,0 +1,207 @@
1****************************************
2Contributions and Additional Information
3****************************************
4
5.. _resources-intro:
6
7Introduction
8============
9
10The Yocto Project team is happy for people to experiment with the Yocto
11Project. A number of places exist to find help if you run into
12difficulties or find bugs. This presents information about contributing
13and participating in the Yocto Project.
14
15.. _resources-contributions:
16
17Contributions
18=============
19
20The Yocto Project gladly accepts contributions. You can submit changes
21to the project either by creating and sending pull requests, or by
22submitting patches through email. For information on how to do both as
23well as information on how to identify the maintainer for each area of
24code, see the "`Submitting a Change to the Yocto
25Project <&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change>`__" section in the
26Yocto Project Development Tasks Manual.
27
28.. _resources-bugtracker:
29
30Yocto Project Bugzilla
31======================
32
33The Yocto Project uses its own implementation of
34`Bugzilla <&YOCTO_BUGZILLA_URL;>`__ to track defects (bugs).
35Implementations of Bugzilla work well for group development because they
36track bugs and code changes, can be used to communicate changes and
37problems with developers, can be used to submit and review patches, and
38can be used to manage quality assurance.
39
40Sometimes it is helpful to submit, investigate, or track a bug against
41the Yocto Project itself (e.g. when discovering an issue with some
42component of the build system that acts contrary to the documentation or
43your expectations).
44
45A general procedure and guidelines exist for when you use Bugzilla to
46submit a bug. For information on how to use Bugzilla to submit a bug
47against the Yocto Project, see the following:
48
49- The "`Submitting a Defect Against the Yocto
50 Project <&YOCTO_DOCS_DEV_URL;#submitting-a-defect-against-the-yocto-project>`__"
51 section in the Yocto Project Development Tasks Manual.
52
53- The Yocto Project `Bugzilla wiki
54 page <&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking>`__
55
56For information on Bugzilla in general, see
57` <http://www.bugzilla.org/about/>`__.
58
59.. _resources-mailinglist:
60
61Mailing lists
62=============
63
64A number of mailing lists maintained by the Yocto Project exist as well
65as related OpenEmbedded mailing lists for discussion, patch submission
66and announcements. To subscribe to one of the following mailing lists,
67click on the appropriate URL in the following list and follow the
68instructions:
69
70- ` <&YOCTO_LISTS_URL;/listinfo/yocto>`__ - General Yocto Project
71 discussion mailing list.
72
73- ` <&OE_LISTS_URL;/listinfo/openembedded-core>`__ - Discussion mailing
74 list about OpenEmbedded-Core (the core metadata).
75
76- ` <&OE_LISTS_URL;/listinfo/openembedded-devel>`__ - Discussion
77 mailing list about OpenEmbedded.
78
79- ` <&OE_LISTS_URL;/listinfo/bitbake-devel>`__ - Discussion mailing
80 list about the `BitBake <#bitbake-term>`__ build tool.
81
82- ` <&YOCTO_LISTS_URL;/listinfo/poky>`__ - Discussion mailing list
83 about `Poky <#poky>`__.
84
85- ` <&YOCTO_LISTS_URL;/listinfo/yocto-announce>`__ - Mailing list to
86 receive official Yocto Project release and milestone announcements.
87
88For more Yocto Project-related mailing lists, see the
89Yocto Project Website
90.
91.. _resources-irc:
92
93Internet Relay Chat (IRC)
94=========================
95
96Two IRC channels on freenode are available for the Yocto Project and
97Poky discussions:
98
99- ``#yocto``
100
101- ``#poky``
102
103.. _resources-links-and-related-documentation:
104
105Links and Related Documentation
106===============================
107
108Here is a list of resources you might find helpful:
109
110- `The Yocto Project website <&YOCTO_HOME_URL;>`__\ *:* The home site
111 for the Yocto Project.
112
113- `The Yocto Project Main Wiki
114 Page <&YOCTO_WIKI_URL;/wiki/Main_Page>`__\ *:* The main wiki page for
115 the Yocto Project. This page contains information about project
116 planning, release engineering, QA & automation, a reference site map,
117 and other resources related to the Yocto Project.
118
119- `OpenEmbedded <&OE_HOME_URL;>`__\ *:* The build system used by the
120 Yocto Project. This project is the upstream, generic, embedded
121 distribution from which the Yocto Project derives its build system
122 (Poky) and to which it contributes.
123
124- `BitBake <http://www.openembedded.org/wiki/BitBake>`__\ *:* The tool
125 used to process metadata.
126
127- `BitBake User Manual <&YOCTO_DOCS_BB_URL;>`__\ *:* A comprehensive
128 guide to the BitBake tool. If you want information on BitBake, see
129 this manual.
130
131- `Yocto Project Quick Build <&YOCTO_DOCS_BRIEF_URL;>`__\ *:* This
132 short document lets you experience building an image using the Yocto
133 Project without having to understand any concepts or details.
134
135- `Yocto Project Overview and Concepts
136 Manual <&YOCTO_DOCS_OM_URL;>`__\ *:* This manual provides overview
137 and conceptual information about the Yocto Project.
138
139- `Yocto Project Development Tasks
140 Manual <&YOCTO_DOCS_DEV_URL;>`__\ *:* This manual is a "how-to" guide
141 that presents procedures useful to both application and system
142 developers who use the Yocto Project.
143
144- `Yocto Project Application Development and the Extensible Software
145 Development Kit (eSDK) <&YOCTO_DOCS_SDK_URL;>`__\ *manual:* This
146 guide provides information that lets you get going with the standard
147 or extensible SDK. An SDK, with its cross-development toolchains,
148 allows you to develop projects inside or outside of the Yocto Project
149 environment.
150
151- `Yocto Project Board Support Package (BSP) Developer's
152 Guide <&YOCTO_DOCS_BSP_URL;>`__\ *:* This guide defines the structure
153 for BSP components. Having a commonly understood structure encourages
154 standardization.
155
156- `Yocto Project Linux Kernel Development
157 Manual <&YOCTO_DOCS_KERNEL_DEV_URL;>`__\ *:* This manual describes
158 how to work with Linux Yocto kernels as well as provides a bit of
159 conceptual information on the construction of the Yocto Linux kernel
160 tree.
161
162- `Yocto Project Reference Manual <&YOCTO_DOCS_REF_URL;>`__\ *:* This
163 manual provides reference material such as variable, task, and class
164 descriptions.
165
166- `Yocto Project Mega-Manual <&YOCTO_DOCS_MM_URL;>`__\ *:* This manual
167 is simply a single HTML file comprised of the bulk of the Yocto
168 Project manuals. The Mega-Manual primarily exists as a vehicle by
169 which you can easily search for phrases and terms used in the Yocto
170 Project documentation set.
171
172- `Yocto Project Profiling and Tracing
173 Manual <&YOCTO_DOCS_PROF_URL;>`__\ *:* This manual presents a set of
174 common and generally useful tracing and profiling schemes along with
175 their applications (as appropriate) to each tool.
176
177- `Toaster User Manual <&YOCTO_DOCS_TOAST_URL;>`__\ *:* This manual
178 introduces and describes how to set up and use Toaster. Toaster is an
179 Application Programming Interface (API) and web-based interface to
180 the `OpenEmbedded Build System <#build-system-term>`__, which uses
181 BitBake, that reports build information.
182
183- `FAQ <&YOCTO_WIKI_URL;/wiki/FAQ>`__\ *:* A list of commonly asked
184 questions and their answers.
185
186- *Release Notes:* Features, updates and known issues for the current
187 release of the Yocto Project. To access the Release Notes, go to the
188 `Downloads <&YOCTO_HOME_URL;/software-overview/downloads/>`__ page on
189 the Yocto Project website and click on the "RELEASE INFORMATION" link
190 for the appropriate release.
191
192- `Bugzilla <&YOCTO_BUGZILLA_URL;>`__\ *:* The bug tracking application
193 the Yocto Project uses. If you find problems with the Yocto Project,
194 you should report them using this application.
195
196- `Bugzilla Configuration and Bug Tracking Wiki
197 Page <&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking>`__\ *:*
198 Information on how to get set up and use the Yocto Project
199 implementation of Bugzilla for logging and tracking Yocto Project
200 defects.
201
202- *Internet Relay Chat (IRC):* Two IRC channels on freenode are
203 available for Yocto Project and Poky discussions: ``#yocto`` and
204 ``#poky``, respectively.
205
206- `Quick EMUlator (QEMU) <http://wiki.qemu.org/Index.html>`__\ *:* An
207 open-source machine emulator and virtualizer.