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