blob: 32bb75b271b51904b2f33e08b71df5232e9328ca [file] [log] [blame]
Andrew Geisslerf0343792020-11-18 10:42:21 -06001.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002
3*******************
4Yocto Project Terms
5*******************
6
7Following is a list of terms and definitions users new to the Yocto Project
8development environment might find helpful. While some of these terms are
9universal, the list includes them just in case:
10
11.. glossary::
12
Andrew Geissler4c19ea12020-10-27 13:52:24 -050013 :term:`Append Files`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050014 Files that append build information to a recipe file. Append files are
15 known as BitBake append files and ``.bbappend`` files. The OpenEmbedded
16 build system expects every append file to have a corresponding recipe
17 (``.bb``) file. Furthermore, the append file and corresponding recipe file
18 must use the same root filename. The filenames can differ only in the
19 file type suffix used (e.g. ``formfactor_0.0.bb`` and
20 ``formfactor_0.0.bbappend``).
21
22 Information in append files extends or overrides the information in the
23 similarly-named recipe file. For an example of an append file in use, see
Andrew Geissler09209ee2020-12-13 08:44:15 -060024 the ":ref:`dev-manual/common-tasks:Using .bbappend Files in
Andrew Geisslerc9f78652020-09-18 14:11:35 -050025 Your Layer`" section in the Yocto Project Development Tasks Manual.
26
27 When you name an append file, you can use the "``%``" wildcard character
28 to allow for matching recipe names. For example, suppose you have an
29 append file named as follows:
30 ::
Andrew Geissler95ac1b82021-03-31 14:34:31 -050031
Andrew Geisslerc9f78652020-09-18 14:11:35 -050032 busybox_1.21.%.bbappend
33
34 That append file
35 would match any ``busybox_1.21.``\ x\ ``.bb`` version of the recipe. So,
36 the append file would match any of the following recipe names:
37
38 .. code-block:: shell
39
40 busybox_1.21.1.bb
41 busybox_1.21.2.bb
42 busybox_1.21.3.bb
43 busybox_1.21.10.bb
44 busybox_1.21.25.bb
45
46 .. note::
47
Andrew Geissler4c19ea12020-10-27 13:52:24 -050048 The use of the "%" character is limited in that it only works
Andrew Geisslerc9f78652020-09-18 14:11:35 -050049 directly in front of the .bbappend portion of the append file's
50 name. You cannot use the wildcard character in any other location of
51 the name.
52
Andrew Geissler4c19ea12020-10-27 13:52:24 -050053 :term:`BitBake`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050054 The task executor and scheduler used by the OpenEmbedded build system to
55 build images. For more information on BitBake, see the :doc:`BitBake User
56 Manual <bitbake:index>`.
57
Andrew Geissler4c19ea12020-10-27 13:52:24 -050058 :term:`Board Support Package (BSP)`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050059 A group of drivers, definitions, and other components that provide support
60 for a specific hardware configuration. For more information on BSPs, see
Andrew Geissler09209ee2020-12-13 08:44:15 -060061 the :doc:`/bsp-guide/index`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -050062
Andrew Geissler4c19ea12020-10-27 13:52:24 -050063 :term:`Build Directory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -050064 This term refers to the area used by the OpenEmbedded build system for
65 builds. The area is created when you ``source`` the setup environment
66 script that is found in the Source Directory
Andrew Geissler09209ee2020-12-13 08:44:15 -060067 (i.e. :ref:`ref-manual/structure:\`\`oe-init-build-env\`\``). The
Andrew Geisslerc9f78652020-09-18 14:11:35 -050068 :term:`TOPDIR` variable points to the Build Directory.
69
70 You have a lot of flexibility when creating the Build Directory.
71 Following are some examples that show how to create the directory. The
72 examples assume your :term:`Source Directory` is named ``poky``:
73
74 - Create the Build Directory inside your Source Directory and let
75 the name of the Build Directory default to ``build``:
76
77 .. code-block:: shell
78
Andrew Geissler95ac1b82021-03-31 14:34:31 -050079 $ cd poky
Andrew Geisslerc9f78652020-09-18 14:11:35 -050080 $ source oe-init-build-env
81
82 - Create the Build Directory inside your home directory and
83 specifically name it ``test-builds``:
84
85 .. code-block:: shell
86
Andrew Geisslerc9f78652020-09-18 14:11:35 -050087 $ source poky/oe-init-build-env test-builds
88
89 - Provide a directory path and specifically name the Build
90 Directory. Any intermediate folders in the pathname must exist.
91 This next example creates a Build Directory named
Andrew Geissler95ac1b82021-03-31 14:34:31 -050092 ``YP-&POKYVERSION;`` within the existing directory ``mybuilds``:
Andrew Geisslerc9f78652020-09-18 14:11:35 -050093
94 .. code-block:: shell
95
Andrew Geissler95ac1b82021-03-31 14:34:31 -050096 $ source poky/oe-init-build-env mybuilds/YP-&POKYVERSION;
Andrew Geisslerc9f78652020-09-18 14:11:35 -050097
98 .. note::
99
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500100 By default, the Build Directory contains :term:`TMPDIR`, which is a
101 temporary directory the build system uses for its work. ``TMPDIR`` cannot
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500102 be under NFS. Thus, by default, the Build Directory cannot be under
103 NFS. However, if you need the Build Directory to be under NFS, you can
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500104 set this up by setting ``TMPDIR`` in your ``local.conf`` file to use a local
105 drive. Doing so effectively separates ``TMPDIR`` from :term:`TOPDIR`, which is the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500106 Build Directory.
107
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500108 :term:`Build Host`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500109 The system used to build images in a Yocto Project Development
110 environment. The build system is sometimes referred to as the development
111 host.
112
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500113 :term:`Classes`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500114 Files that provide for logic encapsulation and inheritance so that
115 commonly used patterns can be defined once and then easily used in
116 multiple recipes. For reference information on the Yocto Project classes,
Andrew Geissler09209ee2020-12-13 08:44:15 -0600117 see the ":ref:`ref-manual/classes:Classes`" chapter. Class files end with the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500118 ``.bbclass`` filename extension.
119
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500120 :term:`Configuration File`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500121 Files that hold global definitions of variables, user-defined variables,
122 and hardware configuration information. These files tell the OpenEmbedded
123 build system what to build and what to put into the image to support a
124 particular platform.
125
126 Configuration files end with a ``.conf`` filename extension. The
127 :file:`conf/local.conf` configuration file in the :term:`Build Directory`
128 contains user-defined variables that affect every build. The
129 :file:`meta-poky/conf/distro/poky.conf` configuration file defines Yocto
130 "distro" configuration variables used only when building with this
131 policy. Machine configuration files, which are located throughout the
132 :term:`Source Directory`, define variables for specific hardware and are
133 only used when building for that target (e.g. the
134 :file:`machine/beaglebone.conf` configuration file defines variables for
135 the Texas Instruments ARM Cortex-A8 development board).
136
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500137 :term:`Container Layer`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500138 Layers that hold other layers. An example of a container layer is
139 OpenEmbedded's `meta-openembedded
140 <https://github.com/openembedded/meta-openembedded>`_ layer. The
141 ``meta-openembedded`` layer contains many ``meta-*`` layers.
142
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500143 :term:`Cross-Development Toolchain`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500144 In general, a cross-development toolchain is a collection of software
145 development tools and utilities that run on one architecture and allow you
146 to develop software for a different, or targeted, architecture. These
147 toolchains contain cross-compilers, linkers, and debuggers that are
148 specific to the target architecture.
149
150 The Yocto Project supports two different cross-development toolchains:
151
152 - A toolchain only used by and within BitBake when building an image for a
153 target architecture.
154
155 - A relocatable toolchain used outside of BitBake by developers when
156 developing applications that will run on a targeted device.
157
158 Creation of these toolchains is simple and automated. For information on
159 toolchain concepts as they apply to the Yocto Project, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600160 ":ref:`overview-manual/concepts:Cross-Development
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500161 Toolchain Generation`" section in the Yocto Project Overview and Concepts
162 Manual. You can also find more information on using the relocatable
Andrew Geissler09209ee2020-12-13 08:44:15 -0600163 toolchain in the :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500164
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500165 :term:`Extensible Software Development Kit (eSDK)`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500166 A custom SDK for application developers. This eSDK allows developers to
167 incorporate their library and programming changes back into the image to
168 make their code available to other application developers.
169
Andrew Geissler09209ee2020-12-13 08:44:15 -0600170 For information on the eSDK, see the :doc:`/sdk-manual/index` manual.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500171
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500172 :term:`Image`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500173 An image is an artifact of the BitBake build process given a collection of
174 recipes and related Metadata. Images are the binary output that run on
175 specific hardware or QEMU and are used for specific use-cases. For a list
176 of the supported image types that the Yocto Project provides, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600177 ":ref:`ref-manual/images:Images`" chapter.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500178
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500179 :term:`Layer`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500180 A collection of related recipes. Layers allow you to consolidate related
181 metadata to customize your build. Layers also isolate information used
182 when building for multiple architectures. Layers are hierarchical in
183 their ability to override previous specifications. You can include any
184 number of available layers from the Yocto Project and customize the build
185 by adding your layers after them. You can search the Layer Index for
186 layers used within Yocto Project.
187
188 For introductory information on layers, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600189 ":ref:`overview-manual/yp-intro:The Yocto Project Layer
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500190 Model`" section in the Yocto Project Overview and Concepts Manual. For
191 more detailed information on layers, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600192 ":ref:`dev-manual/common-tasks:Understanding and Creating
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500193 Layers`" section in the Yocto Project Development Tasks Manual. For a
194 discussion specifically on BSP Layers, see the ":ref:`bsp-guide/bsp:BSP
195 Layers`" section in the Yocto Project Board Support Packages (BSP)
196 Developer's Guide.
197
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500198 :term:`Metadata`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500199 A key element of the Yocto Project is the Metadata that
200 is used to construct a Linux distribution and is contained in the
201 files that the :term:`OpenEmbedded Build System`
202 parses when building an image. In general, Metadata includes recipes,
203 configuration files, and other information that refers to the build
204 instructions themselves, as well as the data used to control what
205 things get built and the effects of the build. Metadata also includes
206 commands and data used to indicate what versions of software are
207 used, from where they are obtained, and changes or additions to the
208 software itself (patches or auxiliary files) that are used to fix
209 bugs or customize the software for use in a particular situation.
210 OpenEmbedded-Core is an important set of validated metadata.
211
212 In the context of the kernel ("kernel Metadata"), the term refers to
213 the kernel config fragments and features contained in the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600214 :yocto_git:`yocto-kernel-cache </yocto-kernel-cache>`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500215 Git repository.
216
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500217 :term:`OpenEmbedded-Core (OE-Core)`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500218 OE-Core is metadata comprised of
219 foundational recipes, classes, and associated files that are meant to
220 be common among many different OpenEmbedded-derived systems,
221 including the Yocto Project. OE-Core is a curated subset of an
222 original repository developed by the OpenEmbedded community that has
223 been pared down into a smaller, core set of continuously validated
224 recipes. The result is a tightly controlled and an quality-assured
225 core set of recipes.
226
227 You can see the Metadata in the ``meta`` directory of the Yocto
Andrew Geissler09209ee2020-12-13 08:44:15 -0600228 Project :yocto_git:`Source Repositories </poky>`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500229
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500230 :term:`OpenEmbedded Build System`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500231 The build system specific to the Yocto
232 Project. The OpenEmbedded build system is based on another project
233 known as "Poky", which uses :term:`BitBake` as the task
234 executor. Throughout the Yocto Project documentation set, the
235 OpenEmbedded build system is sometimes referred to simply as "the
236 build system". If other build systems, such as a host or target build
237 system are referenced, the documentation clearly states the
238 difference.
239
240 .. note::
241
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500242 For some historical information about Poky, see the :term:`Poky` term.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500243
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500244 :term:`Package`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500245 In the context of the Yocto Project, this term refers to a
246 recipe's packaged output produced by BitBake (i.e. a "baked recipe").
247 A package is generally the compiled binaries produced from the
248 recipe's sources. You "bake" something by running it through BitBake.
249
250 It is worth noting that the term "package" can, in general, have
251 subtle meanings. For example, the packages referred to in the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600252 ":ref:`ref-manual/system-requirements:required packages for the build host`"
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500253 section are compiled binaries that, when installed, add functionality to
254 your Linux distribution.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500255
256 Another point worth noting is that historically within the Yocto
257 Project, recipes were referred to as packages - thus, the existence
258 of several BitBake variables that are seemingly mis-named, (e.g.
259 :term:`PR`, :term:`PV`, and
260 :term:`PE`).
261
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500262 :term:`Package Groups`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500263 Arbitrary groups of software Recipes. You use
264 package groups to hold recipes that, when built, usually accomplish a
265 single task. For example, a package group could contain the recipes
266 for a company's proprietary or value-add software. Or, the package
267 group could contain the recipes that enable graphics. A package group
268 is really just another recipe. Because package group files are
269 recipes, they end with the ``.bb`` filename extension.
270
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500271 :term:`Poky`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500272 Poky, which is pronounced *Pock*-ee, is a reference embedded
273 distribution and a reference test configuration. Poky provides the
274 following:
275
276 - A base-level functional distro used to illustrate how to customize
277 a distribution.
278
279 - A means by which to test the Yocto Project components (i.e. Poky
280 is used to validate the Yocto Project).
281
282 - A vehicle through which you can download the Yocto Project.
283
284 Poky is not a product level distro. Rather, it is a good starting
285 point for customization.
286
287 .. note::
288
289 Poky began as an open-source project initially developed by
290 OpenedHand. OpenedHand developed Poky from the existing
291 OpenEmbedded build system to create a commercially supportable
292 build system for embedded Linux. After Intel Corporation acquired
293 OpenedHand, the poky project became the basis for the Yocto
294 Project's build system.
295
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500296 :term:`Recipe`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500297 A set of instructions for building packages. A recipe
298 describes where you get source code, which patches to apply, how to
299 configure the source, how to compile it and so on. Recipes also
300 describe dependencies for libraries or for other recipes. Recipes
301 represent the logical unit of execution, the software to build, the
302 images to build, and use the ``.bb`` file extension.
303
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500304 :term:`Reference Kit`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500305 A working example of a system, which includes a
306 :term:`BSP<Board Support Package (BSP)>` as well as a
307 :term:`build host<Build Host>` and other components, that can
308 work on specific hardware.
309
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500310 :term:`Source Directory`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500311 This term refers to the directory structure
312 created as a result of creating a local copy of the ``poky`` Git
313 repository ``git://git.yoctoproject.org/poky`` or expanding a
314 released ``poky`` tarball.
315
316 .. note::
317
318 Creating a local copy of the
319 poky
320 Git repository is the recommended method for setting up your
321 Source Directory.
322
323 Sometimes you might hear the term "poky directory" used to refer to
324 this directory structure.
325
326 .. note::
327
328 The OpenEmbedded build system does not support file or directory
329 names that contain spaces. Be sure that the Source Directory you
330 use does not contain these types of names.
331
332 The Source Directory contains BitBake, Documentation, Metadata and
333 other files that all support the Yocto Project. Consequently, you
334 must have the Source Directory in place on your development system in
335 order to do any development using the Yocto Project.
336
337 When you create a local copy of the Git repository, you can name the
338 repository anything you like. Throughout much of the documentation,
339 "poky" is used as the name of the top-level folder of the local copy
340 of the poky Git repository. So, for example, cloning the ``poky`` Git
341 repository results in a local Git repository whose top-level folder
342 is also named "poky".
343
344 While it is not recommended that you use tarball expansion to set up
345 the Source Directory, if you do, the top-level directory name of the
346 Source Directory is derived from the Yocto Project release tarball.
347 For example, downloading and unpacking
Andrew Geisslerc3d88e42020-10-02 09:45:00 -0500348 :yocto_dl:`/releases/yocto/&DISTRO_REL_TAG;/&YOCTO_POKY;.tar.bz2`
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600349 results in a Source Directory whose root folder is named
350 ``&YOCTO_POKY;``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500351
352 It is important to understand the differences between the Source
353 Directory created by unpacking a released tarball as compared to
354 cloning ``git://git.yoctoproject.org/poky``. When you unpack a
355 tarball, you have an exact copy of the files based on the time of
356 release - a fixed release point. Any changes you make to your local
357 files in the Source Directory are on top of the release and will
358 remain local only. On the other hand, when you clone the ``poky`` Git
359 repository, you have an active development repository with access to
360 the upstream repository's branches and tags. In this case, any local
361 changes you make to the local Source Directory can be later applied
362 to active development branches of the upstream ``poky`` Git
363 repository.
364
365 For more information on concepts related to Git repositories,
366 branches, and tags, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600367 ":ref:`overview-manual/development-environment:repositories, tags, and branches`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500368 section in the Yocto Project Overview and Concepts Manual.
369
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500370 :term:`Task`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500371 A unit of execution for BitBake (e.g.
372 :ref:`ref-tasks-compile`,
373 :ref:`ref-tasks-fetch`,
374 :ref:`ref-tasks-patch`, and so forth).
375
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500376 :term:`Toaster`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500377 A web interface to the Yocto Project's :term:`OpenEmbedded Build System`.
378 The interface enables you to
379 configure and run your builds. Information about builds is collected
380 and stored in a database. For information on Toaster, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -0600381 :doc:`/toaster-manual/index`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500382
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500383 :term:`Upstream`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500384 A reference to source code or repositories that are not
385 local to the development system but located in a master area that is
386 controlled by the maintainer of the source code. For example, in
387 order for a developer to work on a particular piece of code, they
388 need to first get a copy of it from an "upstream" source.