blob: f98546826b32912b5cc44e0d8f96378f4c845590 [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.
Brad Bishopc342db32019-05-15 21:57:59 -0400186 An example of a container layer is OpenEmbedded's
187 <ulink url='https://github.com/openembedded/meta-openembedded'><filename>meta-openembedded</filename></ulink>
188 layer.
189 The <filename>meta-openembedded</filename> layer contains
190 many <filename>meta-*</filename> layers.
Brad Bishop316dfdd2018-06-25 12:45:53 -0400191 </para></listitem>
192 <listitem><para id='cross-development-toolchain'>
193 <emphasis>Cross-Development Toolchain:</emphasis>
194 In general, a cross-development toolchain is a collection of
195 software development tools and utilities that run on one
196 architecture and allow you to develop software for a
197 different, or targeted, architecture.
198 These toolchains contain cross-compilers, linkers, and
199 debuggers that are specific to the target architecture.</para>
200
201 <para>The Yocto Project supports two different cross-development
202 toolchains:
203 <itemizedlist>
204 <listitem><para>
205 A toolchain only used by and within
206 BitBake when building an image for a target
207 architecture.
208 </para></listitem>
209 <listitem><para>A relocatable toolchain used outside of
210 BitBake by developers when developing applications
211 that will run on a targeted device.
212 </para></listitem>
213 </itemizedlist></para>
214
215 <para>Creation of these toolchains is simple and automated.
216 For information on toolchain concepts as they apply to the
217 Yocto Project, see the
218 "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
219 section in the Yocto Project Overview and Concepts Manual.
220 You can also find more information on using the
221 relocatable toolchain in the
222 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
223 manual.
224 </para></listitem>
225 <listitem><para>
226 <emphasis>Extensible Software Development Kit (eSDK):</emphasis>
227 A custom SDK for application developers.
228 This eSDK allows developers to incorporate their library
229 and programming changes back into the image to make
230 their code available to other application developers.</para>
231
232 <para>For information on the eSDK, see the
233 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
234 manual.
235 </para></listitem>
236 <listitem><para>
237 <emphasis>Image:</emphasis>
238 An image is an artifact of the BitBake build process given
239 a collection of recipes and related Metadata.
240 Images are the binary output that run on specific hardware or
241 QEMU and are used for specific use-cases.
242 For a list of the supported image types that the Yocto Project
243 provides, see the
244 "<link linkend='ref-images'>Images</link>"
245 chapter.
246 </para></listitem>
247 <listitem><para>
248 <emphasis>Layer:</emphasis>
249 A collection of related recipes.
250 Layers allow you to consolidate related metadata to
251 customize your build.
252 Layers also isolate information used when building
253 for multiple architectures.
254 Layers are hierarchical in their ability to override
255 previous specifications.
256 You can include any number of available layers from the
257 Yocto Project and customize the build by adding your
258 layers after them.
259 You can search the Layer Index for layers used within
260 Yocto Project.</para>
261
262 <para>For introductory information on layers, see the
263 "<ulink url='&YOCTO_DOCS_OM_URL;#the-yocto-project-layer-model'>The Yocto Project Layer Model</ulink>"
264 section in the Yocto Project Overview and Concepts Manual.
265 For more detailed information on layers, see the
266 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
267 section in the Yocto Project Development Tasks Manual.
268 For a discussion specifically on BSP Layers, see the
269 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
270 section in the Yocto Project Board Support Packages (BSP)
271 Developer's Guide.
272 </para></listitem>
273 <listitem><para id='metadata'>
274 <emphasis>Metadata:</emphasis>
275 A key element of the Yocto Project is the Metadata that
276 is used to construct a Linux distribution and is contained
277 in the files that the
278 <link linkend='build-system-term'>OpenEmbedded build system</link>
279 parses when building an image.
280 In general, Metadata includes recipes, configuration
281 files, and other information that refers to the build
282 instructions themselves, as well as the data used to
283 control what things get built and the effects of the
284 build.
285 Metadata also includes commands and data used to
286 indicate what versions of software are used, from
287 where they are obtained, and changes or additions to the
288 software itself (patches or auxiliary files) that
289 are used to fix bugs or customize the software for use
290 in a particular situation.
291 OpenEmbedded-Core is an important set of validated
292 metadata.</para>
293
294 <para>In the context of the kernel ("kernel Metadata"), the
295 term refers to the kernel config fragments and features
296 contained in the
297 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/yocto-kernel-cache'><filename>yocto-kernel-cache</filename></ulink>
298 Git repository.
299 </para></listitem>
300 <listitem><para id='oe-core'>
301 <emphasis>OpenEmbedded-Core (OE-Core):</emphasis>
302 OE-Core is metadata comprised of foundational recipes,
303 classes, and associated files that are meant to be
304 common among many different OpenEmbedded-derived systems,
305 including the Yocto Project.
306 OE-Core is a curated subset of an original repository
307 developed by the OpenEmbedded community that has been
308 pared down into a smaller, core set of continuously
309 validated recipes.
310 The result is a tightly controlled and an quality-assured
311 core set of recipes.</para>
312
313 <para>You can see the Metadata in the
314 <filename>meta</filename> directory of the Yocto Project
315 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi'>Source Repositories</ulink>.
316 </para></listitem>
317 <listitem><para id='build-system-term'>
318 <emphasis>OpenEmbedded Build System:</emphasis>
319 The build system specific to the Yocto Project.
320 The OpenEmbedded build system is based on another project known
321 as "Poky", which uses
322 <link linkend='bitbake-term'>BitBake</link> as the task
323 executor.
324 Throughout the Yocto Project documentation set, the
325 OpenEmbedded build system is sometimes referred to simply
326 as "the build system".
327 If other build systems, such as a host or target build system
328 are referenced, the documentation clearly states the
329 difference.
330 <note>
331 For some historical information about Poky, see the
332 <link linkend='poky'>Poky</link> term.
333 </note>
334 </para></listitem>
335 <listitem><para>
336 <emphasis>Package:</emphasis>
337 In the context of the Yocto Project, this term refers to a
338 recipe's packaged output produced by BitBake (i.e. a
339 "baked recipe").
340 A package is generally the compiled binaries produced from the
341 recipe's sources.
342 You "bake" something by running it through BitBake.</para>
343
344 <para>It is worth noting that the term "package" can,
345 in general, have subtle meanings.
346 For example, the packages referred to in the
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800347 "<link linkend='required-packages-for-the-build-host'>Required Packages for the Build Host</link>"
Brad Bishop316dfdd2018-06-25 12:45:53 -0400348 section are compiled binaries that, when installed, add
349 functionality to your Linux distribution.</para>
350
351 <para>Another point worth noting is that historically within
352 the Yocto Project, recipes were referred to as packages - thus,
353 the existence of several BitBake variables that are seemingly
354 mis-named,
355 (e.g. <link linkend='var-PR'><filename>PR</filename></link>,
356 <link linkend='var-PV'><filename>PV</filename></link>, and
357 <link linkend='var-PE'><filename>PE</filename></link>).
358 </para></listitem>
359 <listitem><para>
360 <emphasis>Package Groups:</emphasis>
361 Arbitrary groups of software Recipes.
362 You use package groups to hold recipes that, when built,
363 usually accomplish a single task.
364 For example, a package group could contain the recipes for a
365 company’s proprietary or value-add software.
366 Or, the package group could contain the recipes that enable
367 graphics.
368 A package group is really just another recipe.
369 Because package group files are recipes, they end with the
370 <filename>.bb</filename> filename extension.
371 </para></listitem>
372 <listitem><para id='poky'>
373 <emphasis>Poky:</emphasis>
374 Poky, which is pronounced <emphasis>Pock</emphasis>-ee,
375 is a reference embedded distribution and a reference
376 test configuration.
377 Poky provides the following:
378 <itemizedlist>
379 <listitem><para>
380 A base-level functional distro used to illustrate
381 how to customize a distribution.
382 </para></listitem>
383 <listitem><para>
384 A means by which to test the Yocto Project
385 components (i.e. Poky is used to validate
386 the Yocto Project).
387 </para></listitem>
388 <listitem><para>
389 A vehicle through which you can download
390 the Yocto Project.
391 </para></listitem>
392 </itemizedlist>
393 Poky is not a product level distro.
394 Rather, it is a good starting point for customization.
395 <note>
396 Poky began an open-source
397 project initially developed by OpenedHand.
398 OpenedHand developed Poky from the existing
399 OpenEmbedded build system to create a commercially
400 supportable build system for embedded Linux.
401 After Intel Corporation acquired OpenedHand, the
402 poky project became the basis for the Yocto Project's
403 build system.
404 </note>
405 </para></listitem>
406 <listitem><para>
407 <emphasis>Recipe:</emphasis>
408 A set of instructions for building packages.
409 A recipe describes where you get source code, which patches
410 to apply, how to configure the source, how to compile it and so on.
411 Recipes also describe dependencies for libraries or for other
412 recipes.
413 Recipes represent the logical unit of execution, the software
414 to build, the images to build, and use the
415 <filename>.bb</filename> file extension.
416 </para></listitem>
417 <listitem><para id='reference-kit-term'>
418 <emphasis>Reference Kit:</emphasis>
419 A working example of a system, which includes a
420 <link linkend='board-support-package-bsp-term'>BSP</link>
421 as well as a
422 <link linkend='hardware-build-system-term'>build host</link>
423 and other components, that can work on specific hardware.
424 </para></listitem>
425 <listitem>
426 <para id='source-directory'>
427 <emphasis>Source Directory:</emphasis>
428 This term refers to the directory structure created as a result
429 of creating a local copy of the <filename>poky</filename> Git
430 repository <filename>git://git.yoctoproject.org/poky</filename>
431 or expanding a released <filename>poky</filename> tarball.
432 <note>
433 Creating a local copy of the <filename>poky</filename>
434 Git repository is the recommended method for setting up
435 your Source Directory.
436 </note>
437 Sometimes you might hear the term "poky directory" used to refer
438 to this directory structure.
439 <note>
440 The OpenEmbedded build system does not support file or
441 directory names that contain spaces.
442 Be sure that the Source Directory you use does not contain
443 these types of names.
444 </note></para>
445
446 <para>The Source Directory contains BitBake, Documentation,
447 Metadata and other files that all support the Yocto Project.
448 Consequently, you must have the Source Directory in place on
449 your development system in order to do any development using
450 the Yocto Project.</para>
451
452 <para>When you create a local copy of the Git repository, you
453 can name the repository anything you like.
454 Throughout much of the documentation, "poky"
455 is used as the name of the top-level folder of the local copy of
456 the poky Git repository.
457 So, for example, cloning the <filename>poky</filename> Git
458 repository results in a local Git repository whose top-level
459 folder is also named "poky".</para>
460
461 <para>While it is not recommended that you use tarball expansion
462 to set up the Source Directory, if you do, the top-level
463 directory name of the Source Directory is derived from the
464 Yocto Project release tarball.
465 For example, downloading and unpacking
466 <filename>&YOCTO_POKY_TARBALL;</filename> results in a
467 Source Directory whose root folder is named
468 <filename>&YOCTO_POKY;</filename>.</para>
469
470 <para>It is important to understand the differences between the
471 Source Directory created by unpacking a released tarball as
472 compared to cloning
473 <filename>git://git.yoctoproject.org/poky</filename>.
474 When you unpack a tarball, you have an exact copy of the files
475 based on the time of release - a fixed release point.
476 Any changes you make to your local files in the Source Directory
477 are on top of the release and will remain local only.
478 On the other hand, when you clone the <filename>poky</filename>
479 Git repository, you have an active development repository with
480 access to the upstream repository's branches and tags.
481 In this case, any local changes you make to the local
482 Source Directory can be later applied to active development
483 branches of the upstream <filename>poky</filename> Git
484 repository.</para>
485
486 <para>For more information on concepts related to Git
487 repositories, branches, and tags, see the
488 "<ulink url='&YOCTO_DOCS_OM_URL;#repositories-tags-and-branches'>Repositories, Tags, and Branches</ulink>"
489 section in the Yocto Project Overview and Concepts Manual.
490 </para></listitem>
491 <listitem><para><emphasis>Task:</emphasis>
492 A unit of execution for BitBake (e.g.
493 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>,
494 <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>,
495 <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>,
496 and so forth).
497 </para></listitem>
498 <listitem><para id='toaster-term'><emphasis>Toaster:</emphasis>
499 A web interface to the Yocto Project's
500 <link linkend='build-system-term'>OpenEmbedded Build System</link>.
501 The interface enables you to configure and run your builds.
502 Information about builds is collected and stored in a database.
503 For information on Toaster, see the
504 <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>.
505 </para></listitem>
506 <listitem><para>
507 <emphasis>Upstream:</emphasis>
508 A reference to source code or repositories
509 that are not local to the development system but located in a
510 master area that is controlled by the maintainer of the source
511 code.
512 For example, in order for a developer to work on a particular
513 piece of code, they need to first get a copy of it from an
514 "upstream" source.
515 </para></listitem>
516 </itemizedlist>
517 </para>
518
519</chapter>
520<!--
521vim: expandtab tw=80 ts=4
522-->