ref-terms.rst 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. *******************
  3. Yocto Project Terms
  4. *******************
  5. Following is a list of terms and definitions users new to the Yocto Project
  6. development environment might find helpful. While some of these terms are
  7. universal, the list includes them just in case:
  8. .. glossary::
  9. Append Files
  10. Files that append build information to a recipe file. Append files are
  11. known as BitBake append files and ``.bbappend`` files. The OpenEmbedded
  12. build system expects every append file to have a corresponding recipe
  13. (``.bb``) file. Furthermore, the append file and corresponding recipe file
  14. must use the same root filename. The filenames can differ only in the
  15. file type suffix used (e.g. ``formfactor_0.0.bb`` and
  16. ``formfactor_0.0.bbappend``).
  17. Information in append files extends or overrides the information in the
  18. similarly-named recipe file. For an example of an append file in use, see
  19. the ":ref:`dev-manual/dev-manual-common-tasks:Using .bbappend Files in
  20. Your Layer`" section in the Yocto Project Development Tasks Manual.
  21. When you name an append file, you can use the "``%``" wildcard character
  22. to allow for matching recipe names. For example, suppose you have an
  23. append file named as follows:
  24. ::
  25. busybox_1.21.%.bbappend
  26. That append file
  27. would match any ``busybox_1.21.``\ x\ ``.bb`` version of the recipe. So,
  28. the append file would match any of the following recipe names:
  29. .. code-block:: shell
  30. busybox_1.21.1.bb
  31. busybox_1.21.2.bb
  32. busybox_1.21.3.bb
  33. busybox_1.21.10.bb
  34. busybox_1.21.25.bb
  35. .. note::
  36. The use of the " % " character is limited in that it only works
  37. directly in front of the .bbappend portion of the append file's
  38. name. You cannot use the wildcard character in any other location of
  39. the name.
  40. BitBake
  41. The task executor and scheduler used by the OpenEmbedded build system to
  42. build images. For more information on BitBake, see the :doc:`BitBake User
  43. Manual <bitbake:index>`.
  44. Board Support Package (BSP)
  45. A group of drivers, definitions, and other components that provide support
  46. for a specific hardware configuration. For more information on BSPs, see
  47. the :ref:`bsp-guide/bsp-guide:Yocto Project Board Support Package
  48. Developer's Guide`.
  49. Build Directory
  50. This term refers to the area used by the OpenEmbedded build system for
  51. builds. The area is created when you ``source`` the setup environment
  52. script that is found in the Source Directory
  53. (i.e. :ref:`ref-manual/ref-structure:\`\`oe-init-build-env\`\``). The
  54. :term:`TOPDIR` variable points to the Build Directory.
  55. You have a lot of flexibility when creating the Build Directory.
  56. Following are some examples that show how to create the directory. The
  57. examples assume your :term:`Source Directory` is named ``poky``:
  58. - Create the Build Directory inside your Source Directory and let
  59. the name of the Build Directory default to ``build``:
  60. .. code-block:: shell
  61. $ cd $HOME/poky
  62. $ source oe-init-build-env
  63. - Create the Build Directory inside your home directory and
  64. specifically name it ``test-builds``:
  65. .. code-block:: shell
  66. $ cd $HOME
  67. $ source poky/oe-init-build-env test-builds
  68. - Provide a directory path and specifically name the Build
  69. Directory. Any intermediate folders in the pathname must exist.
  70. This next example creates a Build Directory named
  71. ``YP-POKYVERSION`` in your home directory within the existing
  72. directory ``mybuilds``:
  73. .. code-block:: shell
  74. $ cd $HOME
  75. $ source $HOME/poky/oe-init-build-env $HOME/mybuilds/YP-POKYVERSION
  76. .. note::
  77. By default, the Build Directory contains :term:`TMPDIR` , which is a
  78. temporary directory the build system uses for its work. TMPDIR cannot
  79. be under NFS. Thus, by default, the Build Directory cannot be under
  80. NFS. However, if you need the Build Directory to be under NFS, you can
  81. set this up by setting TMPDIR in your local.conf file to use a local
  82. drive. Doing so effectively separates TMPDIR from TOPDIR , which is the
  83. Build Directory.
  84. Build Host
  85. The system used to build images in a Yocto Project Development
  86. environment. The build system is sometimes referred to as the development
  87. host.
  88. Classes
  89. Files that provide for logic encapsulation and inheritance so that
  90. commonly used patterns can be defined once and then easily used in
  91. multiple recipes. For reference information on the Yocto Project classes,
  92. see the ":ref:`ref-manual/ref-classes:Classes`" chapter. Class files end with the
  93. ``.bbclass`` filename extension.
  94. Configuration File
  95. Files that hold global definitions of variables, user-defined variables,
  96. and hardware configuration information. These files tell the OpenEmbedded
  97. build system what to build and what to put into the image to support a
  98. particular platform.
  99. Configuration files end with a ``.conf`` filename extension. The
  100. :file:`conf/local.conf` configuration file in the :term:`Build Directory`
  101. contains user-defined variables that affect every build. The
  102. :file:`meta-poky/conf/distro/poky.conf` configuration file defines Yocto
  103. "distro" configuration variables used only when building with this
  104. policy. Machine configuration files, which are located throughout the
  105. :term:`Source Directory`, define variables for specific hardware and are
  106. only used when building for that target (e.g. the
  107. :file:`machine/beaglebone.conf` configuration file defines variables for
  108. the Texas Instruments ARM Cortex-A8 development board).
  109. Container Layer
  110. Layers that hold other layers. An example of a container layer is
  111. OpenEmbedded's `meta-openembedded
  112. <https://github.com/openembedded/meta-openembedded>`_ layer. The
  113. ``meta-openembedded`` layer contains many ``meta-*`` layers.
  114. Cross-Development Toolchain
  115. In general, a cross-development toolchain is a collection of software
  116. development tools and utilities that run on one architecture and allow you
  117. to develop software for a different, or targeted, architecture. These
  118. toolchains contain cross-compilers, linkers, and debuggers that are
  119. specific to the target architecture.
  120. The Yocto Project supports two different cross-development toolchains:
  121. - A toolchain only used by and within BitBake when building an image for a
  122. target architecture.
  123. - A relocatable toolchain used outside of BitBake by developers when
  124. developing applications that will run on a targeted device.
  125. Creation of these toolchains is simple and automated. For information on
  126. toolchain concepts as they apply to the Yocto Project, see the
  127. ":ref:`overview-manual/overview-manual-concepts:Cross-Development
  128. Toolchain Generation`" section in the Yocto Project Overview and Concepts
  129. Manual. You can also find more information on using the relocatable
  130. toolchain in the :ref:`sdk-manual/sdk-manual:Yocto Project Application
  131. Development and the Extensible Software Development Kit (eSDK)` manual.
  132. Extensible Software Development Kit (eSDK)
  133. A custom SDK for application developers. This eSDK allows developers to
  134. incorporate their library and programming changes back into the image to
  135. make their code available to other application developers.
  136. For information on the eSDK, see the :ref:`sdk-manual/sdk-manual:Yocto
  137. Project Application Development and the Extensible Software Development
  138. Kit (eSDK)` manual.
  139. Image
  140. An image is an artifact of the BitBake build process given a collection of
  141. recipes and related Metadata. Images are the binary output that run on
  142. specific hardware or QEMU and are used for specific use-cases. For a list
  143. of the supported image types that the Yocto Project provides, see the
  144. ":ref:`ref-manual/ref-images:Images`" chapter.
  145. Layer
  146. A collection of related recipes. Layers allow you to consolidate related
  147. metadata to customize your build. Layers also isolate information used
  148. when building for multiple architectures. Layers are hierarchical in
  149. their ability to override previous specifications. You can include any
  150. number of available layers from the Yocto Project and customize the build
  151. by adding your layers after them. You can search the Layer Index for
  152. layers used within Yocto Project.
  153. For introductory information on layers, see the
  154. ":ref:`overview-manual/overview-manual-yp-intro:The Yocto Project Layer
  155. Model`" section in the Yocto Project Overview and Concepts Manual. For
  156. more detailed information on layers, see the
  157. ":ref:`dev-manual/dev-manual-common-tasks:Understanding and Creating
  158. Layers`" section in the Yocto Project Development Tasks Manual. For a
  159. discussion specifically on BSP Layers, see the ":ref:`bsp-guide/bsp:BSP
  160. Layers`" section in the Yocto Project Board Support Packages (BSP)
  161. Developer's Guide.
  162. Metadata
  163. A key element of the Yocto Project is the Metadata that
  164. is used to construct a Linux distribution and is contained in the
  165. files that the :term:`OpenEmbedded Build System`
  166. parses when building an image. In general, Metadata includes recipes,
  167. configuration files, and other information that refers to the build
  168. instructions themselves, as well as the data used to control what
  169. things get built and the effects of the build. Metadata also includes
  170. commands and data used to indicate what versions of software are
  171. used, from where they are obtained, and changes or additions to the
  172. software itself (patches or auxiliary files) that are used to fix
  173. bugs or customize the software for use in a particular situation.
  174. OpenEmbedded-Core is an important set of validated metadata.
  175. In the context of the kernel ("kernel Metadata"), the term refers to
  176. the kernel config fragments and features contained in the
  177. :yocto_git:`yocto-kernel-cache </cgit/cgit.cgi/yocto-kernel-cache>`
  178. Git repository.
  179. OpenEmbedded-Core (OE-Core)
  180. OE-Core is metadata comprised of
  181. foundational recipes, classes, and associated files that are meant to
  182. be common among many different OpenEmbedded-derived systems,
  183. including the Yocto Project. OE-Core is a curated subset of an
  184. original repository developed by the OpenEmbedded community that has
  185. been pared down into a smaller, core set of continuously validated
  186. recipes. The result is a tightly controlled and an quality-assured
  187. core set of recipes.
  188. You can see the Metadata in the ``meta`` directory of the Yocto
  189. Project :yocto_git:`Source Repositories <>`.
  190. OpenEmbedded Build System
  191. The build system specific to the Yocto
  192. Project. The OpenEmbedded build system is based on another project
  193. known as "Poky", which uses :term:`BitBake` as the task
  194. executor. Throughout the Yocto Project documentation set, the
  195. OpenEmbedded build system is sometimes referred to simply as "the
  196. build system". If other build systems, such as a host or target build
  197. system are referenced, the documentation clearly states the
  198. difference.
  199. .. note::
  200. For some historical information about Poky, see the
  201. Poky
  202. term.
  203. Package
  204. In the context of the Yocto Project, this term refers to a
  205. recipe's packaged output produced by BitBake (i.e. a "baked recipe").
  206. A package is generally the compiled binaries produced from the
  207. recipe's sources. You "bake" something by running it through BitBake.
  208. It is worth noting that the term "package" can, in general, have
  209. subtle meanings. For example, the packages referred to in the
  210. "`Required Packages for the Build
  211. Host <#required-packages-for-the-build-host>`__" section are compiled
  212. binaries that, when installed, add functionality to your Linux
  213. distribution.
  214. Another point worth noting is that historically within the Yocto
  215. Project, recipes were referred to as packages - thus, the existence
  216. of several BitBake variables that are seemingly mis-named, (e.g.
  217. :term:`PR`, :term:`PV`, and
  218. :term:`PE`).
  219. Package Groups
  220. Arbitrary groups of software Recipes. You use
  221. package groups to hold recipes that, when built, usually accomplish a
  222. single task. For example, a package group could contain the recipes
  223. for a company's proprietary or value-add software. Or, the package
  224. group could contain the recipes that enable graphics. A package group
  225. is really just another recipe. Because package group files are
  226. recipes, they end with the ``.bb`` filename extension.
  227. Poky
  228. Poky, which is pronounced *Pock*-ee, is a reference embedded
  229. distribution and a reference test configuration. Poky provides the
  230. following:
  231. - A base-level functional distro used to illustrate how to customize
  232. a distribution.
  233. - A means by which to test the Yocto Project components (i.e. Poky
  234. is used to validate the Yocto Project).
  235. - A vehicle through which you can download the Yocto Project.
  236. Poky is not a product level distro. Rather, it is a good starting
  237. point for customization.
  238. .. note::
  239. Poky began as an open-source project initially developed by
  240. OpenedHand. OpenedHand developed Poky from the existing
  241. OpenEmbedded build system to create a commercially supportable
  242. build system for embedded Linux. After Intel Corporation acquired
  243. OpenedHand, the poky project became the basis for the Yocto
  244. Project's build system.
  245. Recipe
  246. A set of instructions for building packages. A recipe
  247. describes where you get source code, which patches to apply, how to
  248. configure the source, how to compile it and so on. Recipes also
  249. describe dependencies for libraries or for other recipes. Recipes
  250. represent the logical unit of execution, the software to build, the
  251. images to build, and use the ``.bb`` file extension.
  252. Reference Kit
  253. A working example of a system, which includes a
  254. :term:`BSP<Board Support Package (BSP)>` as well as a
  255. :term:`build host<Build Host>` and other components, that can
  256. work on specific hardware.
  257. Source Directory
  258. This term refers to the directory structure
  259. created as a result of creating a local copy of the ``poky`` Git
  260. repository ``git://git.yoctoproject.org/poky`` or expanding a
  261. released ``poky`` tarball.
  262. .. note::
  263. Creating a local copy of the
  264. poky
  265. Git repository is the recommended method for setting up your
  266. Source Directory.
  267. Sometimes you might hear the term "poky directory" used to refer to
  268. this directory structure.
  269. .. note::
  270. The OpenEmbedded build system does not support file or directory
  271. names that contain spaces. Be sure that the Source Directory you
  272. use does not contain these types of names.
  273. The Source Directory contains BitBake, Documentation, Metadata and
  274. other files that all support the Yocto Project. Consequently, you
  275. must have the Source Directory in place on your development system in
  276. order to do any development using the Yocto Project.
  277. When you create a local copy of the Git repository, you can name the
  278. repository anything you like. Throughout much of the documentation,
  279. "poky" is used as the name of the top-level folder of the local copy
  280. of the poky Git repository. So, for example, cloning the ``poky`` Git
  281. repository results in a local Git repository whose top-level folder
  282. is also named "poky".
  283. While it is not recommended that you use tarball expansion to set up
  284. the Source Directory, if you do, the top-level directory name of the
  285. Source Directory is derived from the Yocto Project release tarball.
  286. For example, downloading and unpacking
  287. :yocto_dl:`/releases/yocto/&DISTRO_REL_TAG;/&YOCTO_POKY;.tar.bz2`
  288. results in a Source Directory whose root folder is named ``poky``.
  289. It is important to understand the differences between the Source
  290. Directory created by unpacking a released tarball as compared to
  291. cloning ``git://git.yoctoproject.org/poky``. When you unpack a
  292. tarball, you have an exact copy of the files based on the time of
  293. release - a fixed release point. Any changes you make to your local
  294. files in the Source Directory are on top of the release and will
  295. remain local only. On the other hand, when you clone the ``poky`` Git
  296. repository, you have an active development repository with access to
  297. the upstream repository's branches and tags. In this case, any local
  298. changes you make to the local Source Directory can be later applied
  299. to active development branches of the upstream ``poky`` Git
  300. repository.
  301. For more information on concepts related to Git repositories,
  302. branches, and tags, see the
  303. ":ref:`overview-manual/overview-manual-development-environment:repositories, tags, and branches`"
  304. section in the Yocto Project Overview and Concepts Manual.
  305. Task
  306. A unit of execution for BitBake (e.g.
  307. :ref:`ref-tasks-compile`,
  308. :ref:`ref-tasks-fetch`,
  309. :ref:`ref-tasks-patch`, and so forth).
  310. Toaster
  311. A web interface to the Yocto Project's :term:`OpenEmbedded Build System`.
  312. The interface enables you to
  313. configure and run your builds. Information about builds is collected
  314. and stored in a database. For information on Toaster, see the
  315. :doc:`../toaster-manual/toaster-manual`.
  316. Upstream
  317. A reference to source code or repositories that are not
  318. local to the development system but located in a master area that is
  319. controlled by the maintainer of the source code. For example, in
  320. order for a developer to work on a particular piece of code, they
  321. need to first get a copy of it from an "upstream" source.