Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2 | |
| 3 | ******************* |
| 4 | Yocto Project Terms |
| 5 | ******************* |
| 6 | |
| 7 | Following is a list of terms and definitions users new to the Yocto Project |
| 8 | development environment might find helpful. While some of these terms are |
| 9 | universal, the list includes them just in case: |
| 10 | |
| 11 | .. glossary:: |
| 12 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 13 | :term:`Append Files` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 14 | 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 Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 24 | the ":ref:`dev-manual/common-tasks:appending other layers metadata with your layer`" |
| 25 | section in the Yocto Project Development Tasks Manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 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 |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 29 | append file named as follows:: |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 30 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 31 | busybox_1.21.%.bbappend |
| 32 | |
| 33 | That append file |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 34 | would match any ``busybox_1.21.x.bb`` version of the recipe. So, |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 35 | the append file would match any of the following recipe names: |
| 36 | |
| 37 | .. code-block:: shell |
| 38 | |
| 39 | busybox_1.21.1.bb |
| 40 | busybox_1.21.2.bb |
| 41 | busybox_1.21.3.bb |
| 42 | busybox_1.21.10.bb |
| 43 | busybox_1.21.25.bb |
| 44 | |
| 45 | .. note:: |
| 46 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 47 | The use of the "%" character is limited in that it only works |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 48 | directly in front of the .bbappend portion of the append file's |
| 49 | name. You cannot use the wildcard character in any other location of |
| 50 | the name. |
| 51 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 52 | :term:`BitBake` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 53 | The task executor and scheduler used by the OpenEmbedded build system to |
| 54 | build images. For more information on BitBake, see the :doc:`BitBake User |
| 55 | Manual <bitbake:index>`. |
| 56 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 57 | :term:`Board Support Package (BSP)` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 58 | A group of drivers, definitions, and other components that provide support |
| 59 | for a specific hardware configuration. For more information on BSPs, see |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 60 | the :doc:`/bsp-guide/index`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 61 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 62 | :term:`Build Directory` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 63 | This term refers to the area used by the OpenEmbedded build system for |
| 64 | builds. The area is created when you ``source`` the setup environment |
| 65 | script that is found in the Source Directory |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 66 | (i.e. :ref:`ref-manual/structure:\`\`oe-init-build-env\`\``). The |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 67 | :term:`TOPDIR` variable points to the :term:`Build Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 68 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 69 | You have a lot of flexibility when creating the :term:`Build Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 70 | Following are some examples that show how to create the directory. The |
| 71 | examples assume your :term:`Source Directory` is named ``poky``: |
| 72 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 73 | - Create the :term:`Build Directory` inside your Source Directory and let |
| 74 | the name of the :term:`Build Directory` default to ``build``: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 75 | |
| 76 | .. code-block:: shell |
| 77 | |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 78 | $ cd poky |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 79 | $ source oe-init-build-env |
| 80 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 81 | - Create the :term:`Build Directory` inside your home directory and |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 82 | specifically name it ``test-builds``: |
| 83 | |
| 84 | .. code-block:: shell |
| 85 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 86 | $ source poky/oe-init-build-env test-builds |
| 87 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 88 | - Provide a directory path and specifically name the |
| 89 | :term:`Build Directory`. Any intermediate folders in the pathname |
| 90 | must exist. This next example creates a :term:`Build Directory` |
| 91 | named ``YP-&DISTRO;`` within the existing directory ``mybuilds``: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 92 | |
| 93 | .. code-block:: shell |
| 94 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 95 | $ source poky/oe-init-build-env mybuilds/YP-&DISTRO; |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 96 | |
| 97 | .. note:: |
| 98 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 99 | By default, the :term:`Build Directory` contains :term:`TMPDIR`, which is a |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 100 | temporary directory the build system uses for its work. :term:`TMPDIR` cannot |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 101 | be under NFS. Thus, by default, the :term:`Build Directory` cannot be under |
| 102 | NFS. However, if you need the :term:`Build Directory` to be under NFS, you can |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 103 | set this up by setting :term:`TMPDIR` in your ``local.conf`` file to use a local |
| 104 | drive. Doing so effectively separates :term:`TMPDIR` from :term:`TOPDIR`, which is the |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 105 | :term:`Build Directory`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 106 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 107 | :term:`Build Host` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 108 | The system used to build images in a Yocto Project Development |
| 109 | environment. The build system is sometimes referred to as the development |
| 110 | host. |
| 111 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 112 | :term:`Classes` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 113 | Files that provide for logic encapsulation and inheritance so that |
| 114 | commonly used patterns can be defined once and then easily used in |
| 115 | multiple recipes. For reference information on the Yocto Project classes, |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 116 | see the ":ref:`ref-manual/classes:Classes`" chapter. Class files end with the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 117 | ``.bbclass`` filename extension. |
| 118 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 119 | :term:`Configuration File` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 120 | Files that hold global definitions of variables, user-defined variables, |
| 121 | and hardware configuration information. These files tell the OpenEmbedded |
| 122 | build system what to build and what to put into the image to support a |
| 123 | particular platform. |
| 124 | |
| 125 | Configuration files end with a ``.conf`` filename extension. The |
| 126 | :file:`conf/local.conf` configuration file in the :term:`Build Directory` |
| 127 | contains user-defined variables that affect every build. The |
| 128 | :file:`meta-poky/conf/distro/poky.conf` configuration file defines Yocto |
| 129 | "distro" configuration variables used only when building with this |
| 130 | policy. Machine configuration files, which are located throughout the |
| 131 | :term:`Source Directory`, define variables for specific hardware and are |
| 132 | only used when building for that target (e.g. the |
| 133 | :file:`machine/beaglebone.conf` configuration file defines variables for |
| 134 | the Texas Instruments ARM Cortex-A8 development board). |
| 135 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 136 | :term:`Container Layer` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 137 | A flexible definition that typically refers to a single Git checkout |
| 138 | which contains multiple (and typically related) sub-layers which can |
| 139 | be included independently in your project's ``bblayers.conf`` file. |
| 140 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 141 | In some cases, such as with OpenEmbedded's :oe_git:`meta-openembedded </meta-openembedded>` |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 142 | layer, the top level ``meta-openembedded/`` directory is not itself an actual layer, |
| 143 | so you would never explicitly include it in a ``bblayers.conf`` file; |
| 144 | rather, you would include any number of its layer subdirectories, such as |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 145 | :oe_git:`meta-oe </meta-openembedded/tree/meta-oe>`, :oe_git:`meta-python |
| 146 | </meta-openembedded/tree/meta-python>` and so on. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 147 | |
| 148 | On the other hand, some container layers (such as |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 149 | :yocto_git:`meta-security </meta-security>`) |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 150 | have a top-level directory that is itself an actual layer, as well as |
| 151 | a variety of sub-layers, both of which could be included in your |
| 152 | ``bblayers.conf`` file. |
| 153 | |
| 154 | In either case, the phrase "container layer" is simply used to describe |
| 155 | a directory structure which contains multiple valid OpenEmbedded layers. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 156 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 157 | :term:`Cross-Development Toolchain` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 158 | In general, a cross-development toolchain is a collection of software |
| 159 | development tools and utilities that run on one architecture and allow you |
| 160 | to develop software for a different, or targeted, architecture. These |
| 161 | toolchains contain cross-compilers, linkers, and debuggers that are |
| 162 | specific to the target architecture. |
| 163 | |
| 164 | The Yocto Project supports two different cross-development toolchains: |
| 165 | |
| 166 | - A toolchain only used by and within BitBake when building an image for a |
| 167 | target architecture. |
| 168 | |
| 169 | - A relocatable toolchain used outside of BitBake by developers when |
| 170 | developing applications that will run on a targeted device. |
| 171 | |
| 172 | Creation of these toolchains is simple and automated. For information on |
| 173 | toolchain concepts as they apply to the Yocto Project, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 174 | ":ref:`overview-manual/concepts:Cross-Development |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 175 | Toolchain Generation`" section in the Yocto Project Overview and Concepts |
| 176 | Manual. You can also find more information on using the relocatable |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 177 | toolchain in the :doc:`/sdk-manual/index` manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 178 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 179 | :term:`Extensible Software Development Kit (eSDK)` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 180 | A custom SDK for application developers. This eSDK allows developers to |
| 181 | incorporate their library and programming changes back into the image to |
| 182 | make their code available to other application developers. |
| 183 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 184 | For information on the eSDK, see the :doc:`/sdk-manual/index` manual. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 185 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 186 | :term:`Image` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 187 | An image is an artifact of the BitBake build process given a collection of |
| 188 | recipes and related Metadata. Images are the binary output that run on |
| 189 | specific hardware or QEMU and are used for specific use-cases. For a list |
| 190 | of the supported image types that the Yocto Project provides, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 191 | ":ref:`ref-manual/images:Images`" chapter. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 192 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 193 | :term:`Layer` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 194 | A collection of related recipes. Layers allow you to consolidate related |
| 195 | metadata to customize your build. Layers also isolate information used |
| 196 | when building for multiple architectures. Layers are hierarchical in |
| 197 | their ability to override previous specifications. You can include any |
| 198 | number of available layers from the Yocto Project and customize the build |
| 199 | by adding your layers after them. You can search the Layer Index for |
| 200 | layers used within Yocto Project. |
| 201 | |
| 202 | For introductory information on layers, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 203 | ":ref:`overview-manual/yp-intro:The Yocto Project Layer |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 204 | Model`" section in the Yocto Project Overview and Concepts Manual. For |
| 205 | more detailed information on layers, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 206 | ":ref:`dev-manual/common-tasks:Understanding and Creating |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 207 | Layers`" section in the Yocto Project Development Tasks Manual. For a |
| 208 | discussion specifically on BSP Layers, see the ":ref:`bsp-guide/bsp:BSP |
| 209 | Layers`" section in the Yocto Project Board Support Packages (BSP) |
| 210 | Developer's Guide. |
| 211 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 212 | :term:`Metadata` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 213 | A key element of the Yocto Project is the Metadata that |
| 214 | is used to construct a Linux distribution and is contained in the |
| 215 | files that the :term:`OpenEmbedded Build System` |
| 216 | parses when building an image. In general, Metadata includes recipes, |
| 217 | configuration files, and other information that refers to the build |
| 218 | instructions themselves, as well as the data used to control what |
| 219 | things get built and the effects of the build. Metadata also includes |
| 220 | commands and data used to indicate what versions of software are |
| 221 | used, from where they are obtained, and changes or additions to the |
| 222 | software itself (patches or auxiliary files) that are used to fix |
| 223 | bugs or customize the software for use in a particular situation. |
| 224 | OpenEmbedded-Core is an important set of validated metadata. |
| 225 | |
| 226 | In the context of the kernel ("kernel Metadata"), the term refers to |
| 227 | the kernel config fragments and features contained in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 228 | :yocto_git:`yocto-kernel-cache </yocto-kernel-cache>` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 229 | Git repository. |
| 230 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 231 | :term:`OpenEmbedded-Core (OE-Core)` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 232 | OE-Core is metadata comprised of |
| 233 | foundational recipes, classes, and associated files that are meant to |
| 234 | be common among many different OpenEmbedded-derived systems, |
| 235 | including the Yocto Project. OE-Core is a curated subset of an |
| 236 | original repository developed by the OpenEmbedded community that has |
| 237 | been pared down into a smaller, core set of continuously validated |
| 238 | recipes. The result is a tightly controlled and an quality-assured |
| 239 | core set of recipes. |
| 240 | |
| 241 | You can see the Metadata in the ``meta`` directory of the Yocto |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 242 | Project :yocto_git:`Source Repositories </poky>`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 243 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 244 | :term:`OpenEmbedded Build System` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 245 | The build system specific to the Yocto |
| 246 | Project. The OpenEmbedded build system is based on another project |
| 247 | known as "Poky", which uses :term:`BitBake` as the task |
| 248 | executor. Throughout the Yocto Project documentation set, the |
| 249 | OpenEmbedded build system is sometimes referred to simply as "the |
| 250 | build system". If other build systems, such as a host or target build |
| 251 | system are referenced, the documentation clearly states the |
| 252 | difference. |
| 253 | |
| 254 | .. note:: |
| 255 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 256 | For some historical information about Poky, see the :term:`Poky` term. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 257 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 258 | :term:`Package` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 259 | In the context of the Yocto Project, this term refers to a |
| 260 | recipe's packaged output produced by BitBake (i.e. a "baked recipe"). |
| 261 | A package is generally the compiled binaries produced from the |
| 262 | recipe's sources. You "bake" something by running it through BitBake. |
| 263 | |
| 264 | It is worth noting that the term "package" can, in general, have |
| 265 | subtle meanings. For example, the packages referred to in the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 266 | ":ref:`ref-manual/system-requirements:required packages for the build host`" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 267 | section are compiled binaries that, when installed, add functionality to |
| 268 | your Linux distribution. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 269 | |
| 270 | Another point worth noting is that historically within the Yocto |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 271 | Project, recipes were referred to as packages --- thus, the existence |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 272 | of several BitBake variables that are seemingly mis-named, (e.g. |
| 273 | :term:`PR`, :term:`PV`, and |
| 274 | :term:`PE`). |
| 275 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 276 | :term:`Package Groups` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 277 | Arbitrary groups of software Recipes. You use |
| 278 | package groups to hold recipes that, when built, usually accomplish a |
| 279 | single task. For example, a package group could contain the recipes |
| 280 | for a company's proprietary or value-add software. Or, the package |
| 281 | group could contain the recipes that enable graphics. A package group |
| 282 | is really just another recipe. Because package group files are |
| 283 | recipes, they end with the ``.bb`` filename extension. |
| 284 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 285 | :term:`Poky` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 286 | Poky, which is pronounced *Pock*-ee, is a reference embedded |
| 287 | distribution and a reference test configuration. Poky provides the |
| 288 | following: |
| 289 | |
| 290 | - A base-level functional distro used to illustrate how to customize |
| 291 | a distribution. |
| 292 | |
| 293 | - A means by which to test the Yocto Project components (i.e. Poky |
| 294 | is used to validate the Yocto Project). |
| 295 | |
| 296 | - A vehicle through which you can download the Yocto Project. |
| 297 | |
| 298 | Poky is not a product level distro. Rather, it is a good starting |
| 299 | point for customization. |
| 300 | |
| 301 | .. note:: |
| 302 | |
| 303 | Poky began as an open-source project initially developed by |
| 304 | OpenedHand. OpenedHand developed Poky from the existing |
| 305 | OpenEmbedded build system to create a commercially supportable |
| 306 | build system for embedded Linux. After Intel Corporation acquired |
| 307 | OpenedHand, the poky project became the basis for the Yocto |
| 308 | Project's build system. |
| 309 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 310 | :term:`Recipe` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 311 | A set of instructions for building packages. A recipe |
| 312 | describes where you get source code, which patches to apply, how to |
| 313 | configure the source, how to compile it and so on. Recipes also |
| 314 | describe dependencies for libraries or for other recipes. Recipes |
| 315 | represent the logical unit of execution, the software to build, the |
| 316 | images to build, and use the ``.bb`` file extension. |
| 317 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 318 | :term:`Reference Kit` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 319 | A working example of a system, which includes a |
| 320 | :term:`BSP<Board Support Package (BSP)>` as well as a |
| 321 | :term:`build host<Build Host>` and other components, that can |
| 322 | work on specific hardware. |
| 323 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 324 | :term:`SBOM` |
| 325 | This term means *Software Bill of Materials*. When you distribute |
| 326 | software, it offers a description of all the components you used, |
| 327 | their corresponding licenses, their dependencies, the changes that were |
| 328 | applied and the known vulnerabilities that were fixed. |
| 329 | |
| 330 | This can be used by the recipients of the software to assess |
| 331 | their exposure to license compliance and security vulnerability issues. |
| 332 | |
| 333 | See the :wikipedia:`Software Supply Chain <Software_supply_chain>` |
| 334 | article on Wikipedia for more details. |
| 335 | |
| 336 | The OpenEmbedded Build System can generate such documentation for your |
| 337 | project, in :term:`SPDX` format, based on all the metadata it used to |
| 338 | build the software images. See the ":ref:`dev-manual/common-tasks:creating |
| 339 | a software bill of materials`" section of the Development Tasks manual. |
| 340 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 341 | :term:`Source Directory` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 342 | This term refers to the directory structure |
| 343 | created as a result of creating a local copy of the ``poky`` Git |
| 344 | repository ``git://git.yoctoproject.org/poky`` or expanding a |
| 345 | released ``poky`` tarball. |
| 346 | |
| 347 | .. note:: |
| 348 | |
| 349 | Creating a local copy of the |
| 350 | poky |
| 351 | Git repository is the recommended method for setting up your |
| 352 | Source Directory. |
| 353 | |
| 354 | Sometimes you might hear the term "poky directory" used to refer to |
| 355 | this directory structure. |
| 356 | |
| 357 | .. note:: |
| 358 | |
| 359 | The OpenEmbedded build system does not support file or directory |
| 360 | names that contain spaces. Be sure that the Source Directory you |
| 361 | use does not contain these types of names. |
| 362 | |
| 363 | The Source Directory contains BitBake, Documentation, Metadata and |
| 364 | other files that all support the Yocto Project. Consequently, you |
| 365 | must have the Source Directory in place on your development system in |
| 366 | order to do any development using the Yocto Project. |
| 367 | |
| 368 | When you create a local copy of the Git repository, you can name the |
| 369 | repository anything you like. Throughout much of the documentation, |
| 370 | "poky" is used as the name of the top-level folder of the local copy |
| 371 | of the poky Git repository. So, for example, cloning the ``poky`` Git |
| 372 | repository results in a local Git repository whose top-level folder |
| 373 | is also named "poky". |
| 374 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 375 | While it is not recommended that you use tarball extraction to set up |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 376 | the Source Directory, if you do, the top-level directory name of the |
| 377 | Source Directory is derived from the Yocto Project release tarball. |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 378 | For example, downloading and unpacking poky tarballs from |
| 379 | :yocto_dl:`/releases/yocto/&DISTRO_REL_TAG;/` |
| 380 | results in a Source Directory whose root folder is named poky. |
| 381 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 382 | |
| 383 | It is important to understand the differences between the Source |
| 384 | Directory created by unpacking a released tarball as compared to |
| 385 | cloning ``git://git.yoctoproject.org/poky``. When you unpack a |
| 386 | tarball, you have an exact copy of the files based on the time of |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 387 | release --- a fixed release point. Any changes you make to your local |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 388 | files in the Source Directory are on top of the release and will |
| 389 | remain local only. On the other hand, when you clone the ``poky`` Git |
| 390 | repository, you have an active development repository with access to |
| 391 | the upstream repository's branches and tags. In this case, any local |
| 392 | changes you make to the local Source Directory can be later applied |
| 393 | to active development branches of the upstream ``poky`` Git |
| 394 | repository. |
| 395 | |
| 396 | For more information on concepts related to Git repositories, |
| 397 | branches, and tags, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 398 | ":ref:`overview-manual/development-environment:repositories, tags, and branches`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 399 | section in the Yocto Project Overview and Concepts Manual. |
| 400 | |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 401 | :term:`SPDX` |
| 402 | This term means *Software Package Data Exchange*, and is used as a open |
| 403 | standard for providing a *Software Bill of Materials* (:term:`SBOM`). |
| 404 | This standard is developed through a `Linux Foundation project |
| 405 | <https://spdx.dev/>`__ and is used by the OpenEmbedded Build System to |
| 406 | provide an :term:`SBOM` associated to each a software image. |
| 407 | |
| 408 | For details, see Wikipedia's :wikipedia:`SPDX page <Software_Package_Data_Exchange>` |
| 409 | and the ":ref:`dev-manual/common-tasks:creating a software bill of materials`" |
| 410 | section of the Development Tasks manual. |
| 411 | |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 412 | :term:`Sysroot` |
| 413 | When cross-compiling, the target file system may be differently laid |
| 414 | out and contain different things compared to the host system. The concept |
| 415 | of a *sysroot* is directory which looks like the target filesystem and |
| 416 | can be used to cross-compile against. |
| 417 | |
| 418 | In the context of cross-compiling toolchains, a *sysroot* |
| 419 | typically contains C library and kernel headers, plus the |
| 420 | compiled binaries for the C library. A *multilib toolchain* |
| 421 | can contain multiple variants of the C library binaries, |
| 422 | each compiled for a target instruction set (such as ``armv5``, |
| 423 | ``armv7`` and ``armv8``), and possibly optimized for a specific CPU core. |
| 424 | |
| 425 | In the more specific context of the OpenEmbedded build System and |
| 426 | of the Yocto Project, each recipe has two sysroots: |
| 427 | |
| 428 | - A *target sysroot* contains all the **target** libraries and headers |
| 429 | needed to build the recipe. |
| 430 | |
| 431 | - A *native sysroot* contains all the **host** files and executables |
| 432 | needed to build the recipe. |
| 433 | |
| 434 | See the :term:`SYSROOT_* <SYSROOT_DESTDIR>` variables controlling |
| 435 | how sysroots are created and stored. |
| 436 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 437 | :term:`Task` |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 438 | A per-recipe unit of execution for BitBake (e.g. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 439 | :ref:`ref-tasks-compile`, |
| 440 | :ref:`ref-tasks-fetch`, |
| 441 | :ref:`ref-tasks-patch`, and so forth). |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 442 | One of the major benefits of the build system is that, since each |
| 443 | recipe will typically spawn the execution of numerous tasks, |
| 444 | it is entirely possible that many tasks can execute in parallel, |
| 445 | either tasks from separate recipes or independent tasks within |
| 446 | the same recipe, potentially up to the parallelism of your |
| 447 | build system. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 448 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 449 | :term:`Toaster` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 450 | A web interface to the Yocto Project's :term:`OpenEmbedded Build System`. |
| 451 | The interface enables you to |
| 452 | configure and run your builds. Information about builds is collected |
| 453 | and stored in a database. For information on Toaster, see the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 454 | :doc:`/toaster-manual/index`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 455 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 456 | :term:`Upstream` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 457 | A reference to source code or repositories that are not |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 458 | local to the development system but located in a remote area that is |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 459 | controlled by the maintainer of the source code. For example, in |
| 460 | order for a developer to work on a particular piece of code, they |
| 461 | need to first get a copy of it from an "upstream" source. |