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