ref-terms.xml 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  2. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
  3. [<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
  4. <chapter id='ref-terms'>
  5. <title>Yocto Project Terms</title>
  6. <para>
  7. Following is a list of terms and definitions users new to the Yocto
  8. Project development environment might find helpful.
  9. While some of these terms are universal, the list includes them
  10. just in case:
  11. <itemizedlist>
  12. <listitem><para>
  13. <emphasis>Append Files:</emphasis>
  14. Files that append build information to a recipe file.
  15. Append files are known as BitBake append files and
  16. <filename>.bbappend</filename> files.
  17. The OpenEmbedded build system expects every append file to have
  18. a corresponding recipe (<filename>.bb</filename>) file.
  19. Furthermore, the append file and corresponding recipe file
  20. must use the same root filename.
  21. The filenames can differ only in the file type suffix used
  22. (e.g.
  23. <filename>formfactor_0.0.bb</filename> and
  24. <filename>formfactor_0.0.bbappend</filename>).</para>
  25. <para>Information in append files extends or overrides the
  26. information in the similarly-named recipe file.
  27. For an example of an append file in use, see the
  28. "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer</ulink>"
  29. section in the Yocto Project Development Tasks Manual.</para>
  30. <para>When you name an append file, you can use the
  31. "<filename>%</filename>" wildcard character to allow for
  32. matching recipe names.
  33. For example, suppose you have an append file named as follows:
  34. <literallayout class='monospaced'>
  35. busybox_1.21.%.bbappend
  36. </literallayout>
  37. That append file would match any
  38. <filename>busybox_1.21.</filename><replaceable>x</replaceable><filename>.bb</filename>
  39. version of the recipe.
  40. So, the append file would match the following recipe names:
  41. <literallayout class='monospaced'>
  42. busybox_1.21.1.bb
  43. busybox_1.21.2.bb
  44. busybox_1.21.3.bb
  45. </literallayout>
  46. <note><title>Important</title>
  47. The use of the "<filename>%</filename>" character
  48. is limited in that it only works directly in front of the
  49. <filename>.bbappend</filename> portion of the append file's
  50. name.
  51. You cannot use the wildcard character in any other
  52. location of the name.
  53. </note>
  54. </para></listitem>
  55. <listitem><para id='bitbake-term'>
  56. <emphasis>BitBake:</emphasis>
  57. The task executor and scheduler used by the OpenEmbedded build
  58. system to build images.
  59. For more information on BitBake, see the
  60. <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
  61. </para></listitem>
  62. <listitem><para id='board-support-package-bsp-term'>
  63. <emphasis>Board Support Package (BSP):</emphasis>
  64. A group of drivers, definitions, and other components that
  65. provide support for a specific hardware configuration.
  66. For more information on BSPs, see the
  67. <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
  68. </para></listitem>
  69. <listitem>
  70. <para id='build-directory'>
  71. <emphasis>Build Directory:</emphasis>
  72. This term refers to the area used by the OpenEmbedded build
  73. system for builds.
  74. The area is created when you <filename>source</filename> the
  75. setup environment script that is found in the Source Directory
  76. (i.e. <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
  77. The
  78. <link linkend='var-TOPDIR'><filename>TOPDIR</filename></link>
  79. variable points to the Build Directory.</para>
  80. <para>You have a lot of flexibility when creating the Build
  81. Directory.
  82. Following are some examples that show how to create the
  83. directory.
  84. The examples assume your
  85. <link linkend='source-directory'>Source Directory</link> is
  86. named <filename>poky</filename>:
  87. <itemizedlist>
  88. <listitem><para>Create the Build Directory inside your
  89. Source Directory and let the name of the Build
  90. Directory default to <filename>build</filename>:
  91. <literallayout class='monospaced'>
  92. $ cd $HOME/poky
  93. $ source &OE_INIT_FILE;
  94. </literallayout>
  95. </para></listitem>
  96. <listitem><para>Create the Build Directory inside your
  97. home directory and specifically name it
  98. <filename>test-builds</filename>:
  99. <literallayout class='monospaced'>
  100. $ cd $HOME
  101. $ source poky/&OE_INIT_FILE; test-builds
  102. </literallayout>
  103. </para></listitem>
  104. <listitem><para>
  105. Provide a directory path and specifically name the
  106. Build Directory.
  107. Any intermediate folders in the pathname must exist.
  108. This next example creates a Build Directory named
  109. <filename>YP-&POKYVERSION;</filename>
  110. in your home directory within the existing
  111. directory <filename>mybuilds</filename>:
  112. <literallayout class='monospaced'>
  113. $cd $HOME
  114. $ source $HOME/poky/&OE_INIT_FILE; $HOME/mybuilds/YP-&POKYVERSION;
  115. </literallayout>
  116. </para></listitem>
  117. </itemizedlist>
  118. <note>
  119. By default, the Build Directory contains
  120. <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>,
  121. which is a temporary directory the build system uses for
  122. its work.
  123. <filename>TMPDIR</filename> cannot be under NFS.
  124. Thus, by default, the Build Directory cannot be under NFS.
  125. However, if you need the Build Directory to be under NFS,
  126. you can set this up by setting <filename>TMPDIR</filename>
  127. in your <filename>local.conf</filename> file
  128. to use a local drive.
  129. Doing so effectively separates <filename>TMPDIR</filename>
  130. from <filename>TOPDIR</filename>, which is the Build
  131. Directory.
  132. </note>
  133. </para></listitem>
  134. <listitem><para id='hardware-build-system-term'>
  135. <emphasis>Build Host:</emphasis>
  136. The system used to build images in a Yocto Project
  137. Development environment.
  138. The build system is sometimes referred to as the
  139. development host.
  140. </para></listitem>
  141. <listitem><para>
  142. <emphasis>Classes:</emphasis>
  143. Files that provide for logic encapsulation and inheritance so
  144. that commonly used patterns can be defined once and then
  145. easily used in multiple recipes.
  146. For reference information on the Yocto Project classes, see the
  147. "<link linkend='ref-classes'>Classes</link>" chapter.
  148. Class files end with the <filename>.bbclass</filename>
  149. filename extension.
  150. </para></listitem>
  151. <listitem><para>
  152. <emphasis>Configuration File:</emphasis>
  153. Files that hold global definitions of variables,
  154. user-defined variables, and hardware configuration
  155. information.
  156. These files tell the OpenEmbedded build system what to
  157. build and what to put into the image to support a
  158. particular platform.</para>
  159. <para>Configuration files end with a <filename>.conf</filename>
  160. filename extension.
  161. The <filename>conf/local.conf</filename> configuration file in
  162. the
  163. <link linkend='build-directory'>Build Directory</link>
  164. contains user-defined variables that affect every build.
  165. The <filename>meta-poky/conf/distro/poky.conf</filename>
  166. configuration file defines Yocto "distro" configuration
  167. variables used only when building with this policy.
  168. Machine configuration files, which
  169. are located throughout the
  170. <link linkend='source-directory'>Source Directory</link>, define
  171. variables for specific hardware and are only used when building
  172. for that target (e.g. the
  173. <filename>machine/beaglebone.conf</filename> configuration
  174. file defines variables for the Texas Instruments ARM Cortex-A8
  175. development board).
  176. </para></listitem>
  177. <listitem><para id='term-container-layer'>
  178. <emphasis>Container Layer:</emphasis>
  179. Layers that hold other layers.
  180. An example of a container layer is the
  181. <filename>meta-intel</filename> layer.
  182. This layer contains BSP layers for the Intel-core2-32
  183. <trademark class='registered'>Intel</trademark> Common Core
  184. (Intel-core2-32) and the Intel-corei7-64
  185. <trademark class='registered'>Intel</trademark> Common Core
  186. (Intel-corei7-64).
  187. the <filename>meta-intel</filename> layer also contains
  188. the <filename>common/</filename> directory, which contains
  189. common content across those layers.
  190. </para></listitem>
  191. <listitem><para id='cross-development-toolchain'>
  192. <emphasis>Cross-Development Toolchain:</emphasis>
  193. In general, a cross-development toolchain is a collection of
  194. software development tools and utilities that run on one
  195. architecture and allow you to develop software for a
  196. different, or targeted, architecture.
  197. These toolchains contain cross-compilers, linkers, and
  198. debuggers that are specific to the target architecture.</para>
  199. <para>The Yocto Project supports two different cross-development
  200. toolchains:
  201. <itemizedlist>
  202. <listitem><para>
  203. A toolchain only used by and within
  204. BitBake when building an image for a target
  205. architecture.
  206. </para></listitem>
  207. <listitem><para>A relocatable toolchain used outside of
  208. BitBake by developers when developing applications
  209. that will run on a targeted device.
  210. </para></listitem>
  211. </itemizedlist></para>
  212. <para>Creation of these toolchains is simple and automated.
  213. For information on toolchain concepts as they apply to the
  214. Yocto Project, see the
  215. "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
  216. section in the Yocto Project Overview and Concepts Manual.
  217. You can also find more information on using the
  218. relocatable toolchain in the
  219. <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
  220. manual.
  221. </para></listitem>
  222. <listitem><para>
  223. <emphasis>Extensible Software Development Kit (eSDK):</emphasis>
  224. A custom SDK for application developers.
  225. This eSDK allows developers to incorporate their library
  226. and programming changes back into the image to make
  227. their code available to other application developers.</para>
  228. <para>For information on the eSDK, see the
  229. <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
  230. manual.
  231. </para></listitem>
  232. <listitem><para>
  233. <emphasis>Image:</emphasis>
  234. An image is an artifact of the BitBake build process given
  235. a collection of recipes and related Metadata.
  236. Images are the binary output that run on specific hardware or
  237. QEMU and are used for specific use-cases.
  238. For a list of the supported image types that the Yocto Project
  239. provides, see the
  240. "<link linkend='ref-images'>Images</link>"
  241. chapter.
  242. </para></listitem>
  243. <listitem><para>
  244. <emphasis>Layer:</emphasis>
  245. A collection of related recipes.
  246. Layers allow you to consolidate related metadata to
  247. customize your build.
  248. Layers also isolate information used when building
  249. for multiple architectures.
  250. Layers are hierarchical in their ability to override
  251. previous specifications.
  252. You can include any number of available layers from the
  253. Yocto Project and customize the build by adding your
  254. layers after them.
  255. You can search the Layer Index for layers used within
  256. Yocto Project.</para>
  257. <para>For introductory information on layers, see the
  258. "<ulink url='&YOCTO_DOCS_OM_URL;#the-yocto-project-layer-model'>The Yocto Project Layer Model</ulink>"
  259. section in the Yocto Project Overview and Concepts Manual.
  260. For more detailed information on layers, see the
  261. "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
  262. section in the Yocto Project Development Tasks Manual.
  263. For a discussion specifically on BSP Layers, see the
  264. "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
  265. section in the Yocto Project Board Support Packages (BSP)
  266. Developer's Guide.
  267. </para></listitem>
  268. <listitem><para id='metadata'>
  269. <emphasis>Metadata:</emphasis>
  270. A key element of the Yocto Project is the Metadata that
  271. is used to construct a Linux distribution and is contained
  272. in the files that the
  273. <link linkend='build-system-term'>OpenEmbedded build system</link>
  274. parses when building an image.
  275. In general, Metadata includes recipes, configuration
  276. files, and other information that refers to the build
  277. instructions themselves, as well as the data used to
  278. control what things get built and the effects of the
  279. build.
  280. Metadata also includes commands and data used to
  281. indicate what versions of software are used, from
  282. where they are obtained, and changes or additions to the
  283. software itself (patches or auxiliary files) that
  284. are used to fix bugs or customize the software for use
  285. in a particular situation.
  286. OpenEmbedded-Core is an important set of validated
  287. metadata.</para>
  288. <para>In the context of the kernel ("kernel Metadata"), the
  289. term refers to the kernel config fragments and features
  290. contained in the
  291. <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/yocto-kernel-cache'><filename>yocto-kernel-cache</filename></ulink>
  292. Git repository.
  293. </para></listitem>
  294. <listitem><para id='oe-core'>
  295. <emphasis>OpenEmbedded-Core (OE-Core):</emphasis>
  296. OE-Core is metadata comprised of foundational recipes,
  297. classes, and associated files that are meant to be
  298. common among many different OpenEmbedded-derived systems,
  299. including the Yocto Project.
  300. OE-Core is a curated subset of an original repository
  301. developed by the OpenEmbedded community that has been
  302. pared down into a smaller, core set of continuously
  303. validated recipes.
  304. The result is a tightly controlled and an quality-assured
  305. core set of recipes.</para>
  306. <para>You can see the Metadata in the
  307. <filename>meta</filename> directory of the Yocto Project
  308. <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi'>Source Repositories</ulink>.
  309. </para></listitem>
  310. <listitem><para id='build-system-term'>
  311. <emphasis>OpenEmbedded Build System:</emphasis>
  312. The build system specific to the Yocto Project.
  313. The OpenEmbedded build system is based on another project known
  314. as "Poky", which uses
  315. <link linkend='bitbake-term'>BitBake</link> as the task
  316. executor.
  317. Throughout the Yocto Project documentation set, the
  318. OpenEmbedded build system is sometimes referred to simply
  319. as "the build system".
  320. If other build systems, such as a host or target build system
  321. are referenced, the documentation clearly states the
  322. difference.
  323. <note>
  324. For some historical information about Poky, see the
  325. <link linkend='poky'>Poky</link> term.
  326. </note>
  327. </para></listitem>
  328. <listitem><para>
  329. <emphasis>Package:</emphasis>
  330. In the context of the Yocto Project, this term refers to a
  331. recipe's packaged output produced by BitBake (i.e. a
  332. "baked recipe").
  333. A package is generally the compiled binaries produced from the
  334. recipe's sources.
  335. You "bake" something by running it through BitBake.</para>
  336. <para>It is worth noting that the term "package" can,
  337. in general, have subtle meanings.
  338. For example, the packages referred to in the
  339. "<link linkend='required-packages-for-the-build-host'>Required Packages for the Build Host</link>"
  340. section are compiled binaries that, when installed, add
  341. functionality to your Linux distribution.</para>
  342. <para>Another point worth noting is that historically within
  343. the Yocto Project, recipes were referred to as packages - thus,
  344. the existence of several BitBake variables that are seemingly
  345. mis-named,
  346. (e.g. <link linkend='var-PR'><filename>PR</filename></link>,
  347. <link linkend='var-PV'><filename>PV</filename></link>, and
  348. <link linkend='var-PE'><filename>PE</filename></link>).
  349. </para></listitem>
  350. <listitem><para>
  351. <emphasis>Package Groups:</emphasis>
  352. Arbitrary groups of software Recipes.
  353. You use package groups to hold recipes that, when built,
  354. usually accomplish a single task.
  355. For example, a package group could contain the recipes for a
  356. company’s proprietary or value-add software.
  357. Or, the package group could contain the recipes that enable
  358. graphics.
  359. A package group is really just another recipe.
  360. Because package group files are recipes, they end with the
  361. <filename>.bb</filename> filename extension.
  362. </para></listitem>
  363. <listitem><para id='poky'>
  364. <emphasis>Poky:</emphasis>
  365. Poky, which is pronounced <emphasis>Pock</emphasis>-ee,
  366. is a reference embedded distribution and a reference
  367. test configuration.
  368. Poky provides the following:
  369. <itemizedlist>
  370. <listitem><para>
  371. A base-level functional distro used to illustrate
  372. how to customize a distribution.
  373. </para></listitem>
  374. <listitem><para>
  375. A means by which to test the Yocto Project
  376. components (i.e. Poky is used to validate
  377. the Yocto Project).
  378. </para></listitem>
  379. <listitem><para>
  380. A vehicle through which you can download
  381. the Yocto Project.
  382. </para></listitem>
  383. </itemizedlist>
  384. Poky is not a product level distro.
  385. Rather, it is a good starting point for customization.
  386. <note>
  387. Poky began an open-source
  388. project initially developed by OpenedHand.
  389. OpenedHand developed Poky from the existing
  390. OpenEmbedded build system to create a commercially
  391. supportable build system for embedded Linux.
  392. After Intel Corporation acquired OpenedHand, the
  393. poky project became the basis for the Yocto Project's
  394. build system.
  395. </note>
  396. </para></listitem>
  397. <listitem><para>
  398. <emphasis>Recipe:</emphasis>
  399. A set of instructions for building packages.
  400. A recipe describes where you get source code, which patches
  401. to apply, how to configure the source, how to compile it and so on.
  402. Recipes also describe dependencies for libraries or for other
  403. recipes.
  404. Recipes represent the logical unit of execution, the software
  405. to build, the images to build, and use the
  406. <filename>.bb</filename> file extension.
  407. </para></listitem>
  408. <listitem><para id='reference-kit-term'>
  409. <emphasis>Reference Kit:</emphasis>
  410. A working example of a system, which includes a
  411. <link linkend='board-support-package-bsp-term'>BSP</link>
  412. as well as a
  413. <link linkend='hardware-build-system-term'>build host</link>
  414. and other components, that can work on specific hardware.
  415. </para></listitem>
  416. <listitem>
  417. <para id='source-directory'>
  418. <emphasis>Source Directory:</emphasis>
  419. This term refers to the directory structure created as a result
  420. of creating a local copy of the <filename>poky</filename> Git
  421. repository <filename>git://git.yoctoproject.org/poky</filename>
  422. or expanding a released <filename>poky</filename> tarball.
  423. <note>
  424. Creating a local copy of the <filename>poky</filename>
  425. Git repository is the recommended method for setting up
  426. your Source Directory.
  427. </note>
  428. Sometimes you might hear the term "poky directory" used to refer
  429. to this directory structure.
  430. <note>
  431. The OpenEmbedded build system does not support file or
  432. directory names that contain spaces.
  433. Be sure that the Source Directory you use does not contain
  434. these types of names.
  435. </note></para>
  436. <para>The Source Directory contains BitBake, Documentation,
  437. Metadata and other files that all support the Yocto Project.
  438. Consequently, you must have the Source Directory in place on
  439. your development system in order to do any development using
  440. the Yocto Project.</para>
  441. <para>When you create a local copy of the Git repository, you
  442. can name the repository anything you like.
  443. Throughout much of the documentation, "poky"
  444. is used as the name of the top-level folder of the local copy of
  445. the poky Git repository.
  446. So, for example, cloning the <filename>poky</filename> Git
  447. repository results in a local Git repository whose top-level
  448. folder is also named "poky".</para>
  449. <para>While it is not recommended that you use tarball expansion
  450. to set up the Source Directory, if you do, the top-level
  451. directory name of the Source Directory is derived from the
  452. Yocto Project release tarball.
  453. For example, downloading and unpacking
  454. <filename>&YOCTO_POKY_TARBALL;</filename> results in a
  455. Source Directory whose root folder is named
  456. <filename>&YOCTO_POKY;</filename>.</para>
  457. <para>It is important to understand the differences between the
  458. Source Directory created by unpacking a released tarball as
  459. compared to cloning
  460. <filename>git://git.yoctoproject.org/poky</filename>.
  461. When you unpack a tarball, you have an exact copy of the files
  462. based on the time of release - a fixed release point.
  463. Any changes you make to your local files in the Source Directory
  464. are on top of the release and will remain local only.
  465. On the other hand, when you clone the <filename>poky</filename>
  466. Git repository, you have an active development repository with
  467. access to the upstream repository's branches and tags.
  468. In this case, any local changes you make to the local
  469. Source Directory can be later applied to active development
  470. branches of the upstream <filename>poky</filename> Git
  471. repository.</para>
  472. <para>For more information on concepts related to Git
  473. repositories, branches, and tags, see the
  474. "<ulink url='&YOCTO_DOCS_OM_URL;#repositories-tags-and-branches'>Repositories, Tags, and Branches</ulink>"
  475. section in the Yocto Project Overview and Concepts Manual.
  476. </para></listitem>
  477. <listitem><para><emphasis>Task:</emphasis>
  478. A unit of execution for BitBake (e.g.
  479. <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>,
  480. <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>,
  481. <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>,
  482. and so forth).
  483. </para></listitem>
  484. <listitem><para id='toaster-term'><emphasis>Toaster:</emphasis>
  485. A web interface to the Yocto Project's
  486. <link linkend='build-system-term'>OpenEmbedded Build System</link>.
  487. The interface enables you to configure and run your builds.
  488. Information about builds is collected and stored in a database.
  489. For information on Toaster, see the
  490. <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>.
  491. </para></listitem>
  492. <listitem><para>
  493. <emphasis>Upstream:</emphasis>
  494. A reference to source code or repositories
  495. that are not local to the development system but located in a
  496. master area that is controlled by the maintainer of the source
  497. code.
  498. For example, in order for a developer to work on a particular
  499. piece of code, they need to first get a copy of it from an
  500. "upstream" source.
  501. </para></listitem>
  502. </itemizedlist>
  503. </para>
  504. </chapter>
  505. <!--
  506. vim: expandtab tw=80 ts=4
  507. -->