summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/ref-manual')
-rw-r--r--documentation/ref-manual/TODO11
-rw-r--r--documentation/ref-manual/closer-look.xml1270
-rw-r--r--documentation/ref-manual/examples/hello-autotools/hello_2.3.bb8
-rw-r--r--documentation/ref-manual/examples/hello-single/files/helloworld.c8
-rw-r--r--documentation/ref-manual/examples/hello-single/hello.bb17
-rw-r--r--documentation/ref-manual/examples/libxpm/libxpm_3.5.6.bb14
-rw-r--r--documentation/ref-manual/examples/mtd-makefile/mtd-utils_1.0.0.bb15
-rw-r--r--documentation/ref-manual/faq.xml685
-rw-r--r--documentation/ref-manual/figures/analysis-for-package-splitting.pngbin0 -> 63291 bytes
-rw-r--r--documentation/ref-manual/figures/buildhistory-web.pngbin0 -> 49966 bytes
-rw-r--r--documentation/ref-manual/figures/buildhistory.pngbin0 -> 42532 bytes
-rw-r--r--documentation/ref-manual/figures/configuration-compile-autoreconf.pngbin0 -> 46080 bytes
-rw-r--r--documentation/ref-manual/figures/cross-development-toolchains.pngbin0 -> 59275 bytes
-rw-r--r--documentation/ref-manual/figures/image-generation.pngbin0 -> 50418 bytes
-rw-r--r--documentation/ref-manual/figures/images.pngbin0 -> 22926 bytes
-rw-r--r--documentation/ref-manual/figures/layer-input.pngbin0 -> 45856 bytes
-rw-r--r--documentation/ref-manual/figures/package-feeds.pngbin0 -> 27711 bytes
-rw-r--r--documentation/ref-manual/figures/patching.pngbin0 -> 42523 bytes
-rw-r--r--documentation/ref-manual/figures/poky-title.pngbin0 -> 11592 bytes
-rw-r--r--documentation/ref-manual/figures/sdk-generation.pngbin0 -> 45456 bytes
-rw-r--r--documentation/ref-manual/figures/sdk.pngbin0 -> 20074 bytes
-rw-r--r--documentation/ref-manual/figures/source-fetching.pngbin0 -> 38860 bytes
-rw-r--r--documentation/ref-manual/figures/source-input.pngbin0 -> 39872 bytes
-rw-r--r--documentation/ref-manual/figures/user-configuration.pngbin0 -> 23687 bytes
-rw-r--r--documentation/ref-manual/figures/yocto-environment-ref.pngbin0 -> 83206 bytes
-rw-r--r--documentation/ref-manual/introduction.xml562
-rw-r--r--documentation/ref-manual/migration.xml1630
-rw-r--r--documentation/ref-manual/ref-bitbake.xml472
-rw-r--r--documentation/ref-manual/ref-classes.xml3255
-rw-r--r--documentation/ref-manual/ref-features.xml344
-rw-r--r--documentation/ref-manual/ref-images.xml167
-rw-r--r--documentation/ref-manual/ref-manual-customization.xsl11
-rw-r--r--documentation/ref-manual/ref-manual-eclipse-customization.xsl27
-rw-r--r--documentation/ref-manual/ref-manual.xml151
-rw-r--r--documentation/ref-manual/ref-structure.xml1038
-rw-r--r--documentation/ref-manual/ref-style.css979
-rw-r--r--documentation/ref-manual/ref-variables.xml8417
-rw-r--r--documentation/ref-manual/ref-varlocality.xml196
-rw-r--r--documentation/ref-manual/resources.xml128
-rw-r--r--documentation/ref-manual/technical-details.xml1409
-rw-r--r--documentation/ref-manual/usingpoky.xml882
41 files changed, 21696 insertions, 0 deletions
diff --git a/documentation/ref-manual/TODO b/documentation/ref-manual/TODO
new file mode 100644
index 0000000000..ee0db977cc
--- /dev/null
+++ b/documentation/ref-manual/TODO
@@ -0,0 +1,11 @@
1Handbook Todo List:
2
3 * Document adding a new IMAGE_FEATURE to the customising images section
4 * Add instructions about using zaurus/openmoko emulation
5 * Add component overview/block diagrams
6 * Software Deevelopment intro should mention its software development for
7 intended target and could be a different arch etc and thus special case.
8 * Expand insane.bbclass documentation to cover tests
9 * Document remaining classes (see list in ref-classes)
10 * Document formfactor
11
diff --git a/documentation/ref-manual/closer-look.xml b/documentation/ref-manual/closer-look.xml
new file mode 100644
index 0000000000..c223bbb0ce
--- /dev/null
+++ b/documentation/ref-manual/closer-look.xml
@@ -0,0 +1,1270 @@
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
5<chapter id='closer-look'>
6<title>A Closer Look at the Yocto Project Development Environment</title>
7
8 <para>
9 This chapter takes a more detailed look at the Yocto Project
10 development environment.
11 The following diagram represents the development environment at a
12 high level.
13 The remainder of this chapter expands on the fundamental input, output,
14 process, and
15 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>) blocks
16 in the Yocto Project development environment.
17 </para>
18
19 <para id='general-yocto-environment-figure'>
20 <imagedata fileref="figures/yocto-environment-ref.png" align="center" width="8in" depth="4.25in" />
21 </para>
22
23 <para>
24 The generalized Yocto Project Development Environment consists of
25 several functional areas:
26 <itemizedlist>
27 <listitem><para><emphasis>User Configuration:</emphasis>
28 Metadata you can use to control the build process.
29 </para></listitem>
30 <listitem><para><emphasis>Metadata Layers:</emphasis>
31 Various layers that provide software, machine, and
32 distro Metadata.</para></listitem>
33 <listitem><para><emphasis>Source Files:</emphasis>
34 Upstream releases, local projects, and SCMs.</para></listitem>
35 <listitem><para><emphasis>Build System:</emphasis>
36 Processes under the control of
37 <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
38 This block expands on how BitBake fetches source, applies
39 patches, completes compilation, analyzes output for package
40 generation, creates and tests packages, generates images, and
41 generates cross-development tools.</para></listitem>
42 <listitem><para><emphasis>Package Feeds:</emphasis>
43 Directories containing output packages (RPM, DEB or IPK),
44 which are subsequently used in the construction of an image or
45 SDK, produced by the build system.
46 These feeds can also be copied and shared using a web server or
47 other means to facilitate extending or updating existing
48 images on devices at runtime if runtime package management is
49 enabled.</para></listitem>
50 <listitem><para><emphasis>Images:</emphasis>
51 Images produced by the development process.
52 </para></listitem>
53 <listitem><para><emphasis>Application Development SDK:</emphasis>
54 Cross-development tools that are produced along with an image
55 or separately with BitBake.</para></listitem>
56 </itemizedlist>
57 </para>
58
59 <section id="user-configuration">
60 <title>User Configuration</title>
61
62 <para>
63 User configuration helps define the build.
64 Through user configuration, you can tell BitBake the
65 target architecture for which you are building the image,
66 where to store downloaded source, and other build properties.
67 </para>
68
69 <para>
70 The following figure shows an expanded representation of the
71 "User Configuration" box of the
72 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>:
73 </para>
74
75 <para>
76 <imagedata fileref="figures/user-configuration.png" align="center" width="5.5in" depth="3.5in" />
77 </para>
78
79 <para>
80 BitBake needs some basic configuration files in order to complete
81 a build.
82 These files are <filename>*.conf</filename> files.
83 The minimally necessary ones reside as example files in the
84 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
85 For simplicity, this section refers to the Source Directory as
86 the "Poky Directory."
87 </para>
88
89 <para>
90 When you clone the <filename>poky</filename> Git repository or you
91 download and unpack a Yocto Project release, you can set up the
92 Source Directory to be named anything you want.
93 For this discussion, the cloned repository uses the default
94 name <filename>poky</filename>.
95 <note>
96 The Poky repository is primarily an aggregation of existing
97 repositories.
98 It is not a canonical upstream source.
99 </note>
100 </para>
101
102 <para>
103 The <filename>meta-yocto</filename> layer inside Poky contains
104 a <filename>conf</filename> directory that has example
105 configuration files.
106 These example files are used as a basis for creating actual
107 configuration files when you source the build environment
108 script
109 (i.e.
110 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
111 or
112 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
113 </para>
114
115 <para>
116 Sourcing the build environment script creates a
117 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
118 if one does not already exist.
119 BitBake uses the Build Directory for all its work during builds.
120 The Build Directory has a <filename>conf</filename> directory that
121 contains default versions of your <filename>local.conf</filename>
122 and <filename>bblayers.conf</filename> configuration files.
123 These default configuration files are created only if versions
124 do not already exist in the Build Directory at the time you
125 source the build environment setup script.
126 </para>
127
128 <para>
129 Because the Poky repository is fundamentally an aggregation of
130 existing repositories, some users might be familiar with running
131 the <filename>&OE_INIT_FILE;</filename> or
132 <filename>oe-init-build-env-memres</filename> script in the context
133 of separate OpenEmbedded-Core and BitBake repositories rather than a
134 single Poky repository.
135 This discussion assumes the script is executed from within a cloned
136 or unpacked version of Poky.
137 </para>
138
139 <para>
140 Depending on where the script is sourced, different sub-scripts
141 are called to set up the Build Directory (Yocto or OpenEmbedded).
142 Specifically, the script
143 <filename>scripts/oe-setup-builddir</filename> inside the
144 poky directory sets up the Build Directory and seeds the directory
145 (if necessary) with configuration files appropriate for the
146 Yocto Project development environment.
147 <note>
148 The <filename>scripts/oe-setup-builddir</filename> script
149 uses the <filename>$TEMPLATECONF</filename> variable to
150 determine which sample configuration files to locate.
151 </note>
152 </para>
153
154 <para>
155 The <filename>local.conf</filename> file provides many
156 basic variables that define a build environment.
157 Here is a list of a few.
158 To see the default configurations in a <filename>local.conf</filename>
159 file created by the build environment script, see the
160 <filename>local.conf.sample</filename> in the
161 <filename>meta-yocto</filename> layer:
162 <itemizedlist>
163 <listitem><para><emphasis>Parallelism Options:</emphasis>
164 Controlled by the
165 <link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>
166 and
167 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
168 variables.</para></listitem>
169 <listitem><para><emphasis>Target Machine Selection:</emphasis>
170 Controlled by the
171 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
172 variable.</para></listitem>
173 <listitem><para><emphasis>Download Directory:</emphasis>
174 Controlled by the
175 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
176 variable.</para></listitem>
177 <listitem><para><emphasis>Shared State Directory:</emphasis>
178 Controlled by the
179 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>
180 variable.</para></listitem>
181 <listitem><para><emphasis>Build Output:</emphasis>
182 Controlled by the
183 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
184 variable.</para></listitem>
185 </itemizedlist>
186 <note>
187 Configurations set in the <filename>conf/local.conf</filename>
188 file can also be set in the
189 <filename>conf/site.conf</filename> and
190 <filename>conf/auto.conf</filename> configuration files.
191 </note>
192 </para>
193
194 <para>
195 The <filename>bblayers.conf</filename> file tells BitBake what
196 layers you want considered during the build.
197 By default, the layers listed in this file include layers
198 minimally needed by the build system.
199 However, you must manually add any custom layers you have created.
200 You can find more information on working with the
201 <filename>bblayers.conf</filename> file in the
202 "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>"
203 section in the Yocto Project Development Manual.
204 </para>
205
206 <para>
207 The files <filename>site.conf</filename> and
208 <filename>auto.conf</filename> are not created by the environment
209 initialization script.
210 If you want these configuration files, you must create them
211 yourself:
212 <itemizedlist>
213 <listitem><para><emphasis><filename>site.conf</filename>:</emphasis>
214 You can use the <filename>conf/site.conf</filename>
215 configuration file to configure multiple build directories.
216 For example, suppose you had several build environments and
217 they shared some common features.
218 You can set these default build properties here.
219 A good example is perhaps the level of parallelism you want
220 to use through the
221 <link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>
222 and
223 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
224 variables.</para>
225 <para>One useful scenario for using the
226 <filename>conf/site.conf</filename> file is to extend your
227 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
228 variable to include the path to a
229 <filename>conf/site.conf</filename>.
230 Then, when BitBake looks for Metadata using
231 <filename>BBPATH</filename>, it finds the
232 <filename>conf/site.conf</filename> file and applies your
233 common configurations found in the file.
234 To override configurations in a particular build directory,
235 alter the similar configurations within that build
236 directory's <filename>conf/local.conf</filename> file.
237 </para></listitem>
238 <listitem><para><emphasis><filename>auto.conf</filename>:</emphasis>
239 This file is not hand-created.
240 Rather, the file is usually created and written to by
241 an autobuilder.
242 The settings put into the file are typically the same as
243 you would find in the <filename>conf/local.conf</filename>
244 or the <filename>conf/site.conf</filename> files.
245 </para></listitem>
246 </itemizedlist>
247 </para>
248
249 <para>
250 You can edit all configuration files to further define
251 any particular build environment.
252 This process is represented by the "User Configuration Edits"
253 box in the figure.
254 </para>
255
256 <para>
257 When you launch your build with the
258 <filename>bitbake &lt;target&gt;</filename> command, BitBake
259 sorts out the configurations to ultimately define your build
260 environment.
261 </para>
262 </section>
263
264 <section id="metadata-machine-configuration-and-policy-configuration">
265 <title>Metadata, Machine Configuration, and Policy Configuration</title>
266
267 <para>
268 The previous section described the user configurations that
269 define BitBake's global behavior.
270 This section takes a closer look at the layers the build system
271 uses to further control the build.
272 These layers provide Metadata for the software, machine, and
273 policy.
274 </para>
275
276 <para>
277 In general, three types of layer input exist:
278 <itemizedlist>
279 <listitem><para><emphasis>Policy Configuration:</emphasis>
280 Distribution Layers provide top-level or general
281 policies for the image or SDK being built.
282 For example, this layer would dictate whether BitBake
283 produces RPM or IPK packages.</para></listitem>
284 <listitem><para><emphasis>Machine Configuration:</emphasis>
285 Board Support Package (BSP) layers provide machine
286 configurations.
287 This type of information is specific to a particular
288 target architecture.</para></listitem>
289 <listitem><para><emphasis>Metadata:</emphasis>
290 Software layers contain user-supplied recipe files,
291 patches, and append files.
292 </para></listitem>
293 </itemizedlist>
294 </para>
295
296 <para>
297 The following figure shows an expanded representation of the
298 Metadata, Machine Configuration, and Policy Configuration input
299 (layers) boxes of the
300 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>:
301 </para>
302
303 <para>
304 <imagedata fileref="figures/layer-input.png" align="center" width="8in" depth="7.5in" />
305 </para>
306
307 <para>
308 In general, all layers have a similar structure.
309 They all contain a licensing file
310 (e.g. <filename>COPYING</filename>) if the layer is to be
311 distributed, a <filename>README</filename> file as good practice
312 and especially if the layer is to be distributed, a
313 configuration directory, and recipe directories.
314 </para>
315
316 <para>
317 The Yocto Project has many layers that can be used.
318 You can see a web-interface listing of them on the
319 <ulink url="http://git.yoctoproject.org/">Source Repositories</ulink>
320 page.
321 The layers are shown at the bottom categorized under
322 "Yocto Metadata Layers."
323 These layers are fundamentally a subset of the
324 <ulink url="http://layers.openembedded.org/layerindex/layers/">OpenEmbedded Metadata Index</ulink>,
325 which lists all layers provided by the OpenEmbedded community.
326 <note>
327 Layers exist in the Yocto Project Source Repositories that
328 cannot be found in the OpenEmbedded Metadata Index.
329 These layers are either deprecated or experimental in nature.
330 </note>
331 </para>
332
333 <para>
334 BitBake uses the <filename>conf/bblayers.conf</filename> file,
335 which is part of the user configuration, to find what layers it
336 should be using as part of the build.
337 </para>
338
339 <para>
340 For more information on layers, see the
341 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
342 section in the Yocto Project Development Manual.
343 </para>
344
345 <section id="distro-layer">
346 <title>Distro Layer</title>
347
348 <para>
349 The distribution layer provides policy configurations for your
350 distribution.
351 Best practices dictate that you isolate these types of
352 configurations into their own layer.
353 Settings you provide in
354 <filename>conf/distro/&lt;distro&gt;.conf</filename> override
355 similar
356 settings that BitBake finds in your
357 <filename>conf/local.conf</filename> file in the Build
358 Directory.
359 </para>
360
361 <para>
362 The following list provides some explanation and references
363 for what you typically find in the distribution layer:
364 <itemizedlist>
365 <listitem><para><emphasis>classes:</emphasis>
366 Class files (<filename>.bbclass</filename>) hold
367 common functionality that can be shared among
368 recipes in the distribution.
369 When your recipes inherit a class, they take on the
370 settings and functions for that class.
371 You can read more about class files in the
372 "<link linkend='ref-classes'>Classes</link>" section.
373 </para></listitem>
374 <listitem><para><emphasis>conf:</emphasis>
375 This area holds configuration files for the
376 layer (<filename>conf/layer.conf</filename>),
377 the distribution
378 (<filename>conf/distro/&lt;distro&gt;.conf</filename>),
379 and any distribution-wide include files.
380 </para></listitem>
381 <listitem><para><emphasis>recipes-*:</emphasis>
382 Recipes and append files that affect common
383 functionality across the distribution.
384 This area could include recipes and append files
385 to add distribution-specific configuration,
386 initialization scripts, custom image recipes,
387 and so forth.</para></listitem>
388 </itemizedlist>
389 </para>
390 </section>
391
392 <section id="bsp-layer">
393 <title>BSP Layer</title>
394
395 <para>
396 The BSP Layer provides machine configurations.
397 Everything in this layer is specific to the machine for which
398 you are building the image or the SDK.
399 A common structure or form is defined for BSP layers.
400 You can learn more about this structure in the
401 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
402 <note>
403 In order for a BSP layer to be considered compliant with the
404 Yocto Project, it must meet some structural requirements.
405 </note>
406 </para>
407
408 <para>
409 The BSP Layer's configuration directory contains
410 configuration files for the machine
411 (<filename>conf/machine/&lt;machine&gt;.conf</filename>) and,
412 of course, the layer (<filename>conf/layer.conf</filename>).
413 </para>
414
415 <para>
416 The remainder of the layer is dedicated to specific recipes
417 by function: <filename>recipes-bsp</filename>,
418 <filename>recipes-core</filename>,
419 <filename>recipes-graphics</filename>, and
420 <filename>recipes-kernel</filename>.
421 Metadata can exist for multiple formfactors, graphics
422 support systems, and so forth.
423 <note>
424 While the figure shows several <filename>recipes-*</filename>
425 directories, not all these directories appear in all
426 BSP layers.
427 </note>
428 </para>
429 </section>
430
431 <section id="software-layer">
432 <title>Software Layer</title>
433
434 <para>
435 The software layer provides the Metadata for additional
436 software packages used during the build.
437 This layer does not include Metadata that is specific to the
438 distribution or the machine, which are found in their
439 respective layers.
440 </para>
441
442 <para>
443 This layer contains any new recipes that your project needs
444 in the form of recipe files.
445 </para>
446 </section>
447 </section>
448
449 <section id="sources-dev-environment">
450 <title>Sources</title>
451
452 <para>
453 In order for the OpenEmbedded build system to create an image or
454 any target, it must be able to access source files.
455 The
456 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>
457 represents source files using the "Upstream Project Releases",
458 "Local Projects", and "SCMs (optional)" boxes.
459 The figure represents mirrors, which also play a role in locating
460 source files, with the "Source Mirror(s)" box.
461 </para>
462
463 <para>
464 The method by which source files are ultimately organized is
465 a function of the project.
466 For example, for released software, projects tend to use tarballs
467 or other archived files that can capture the state of a release
468 guaranteeing that it is statically represented.
469 On the other hand, for a project that is more dynamic or
470 experimental in nature, a project might keep source files in a
471 repository controlled by a Source Control Manager (SCM) such as
472 Git.
473 Pulling source from a repository allows you to control
474 the point in the repository (the revision) from which you want to
475 build software.
476 Finally, a combination of the two might exist, which would give the
477 consumer a choice when deciding where to get source files.
478 </para>
479
480 <para>
481 BitBake uses the
482 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
483 variable to point to source files regardless of their location.
484 Each recipe must have a <filename>SRC_URI</filename> variable
485 that points to the source.
486 </para>
487
488 <para>
489 Another area that plays a significant role in where source files
490 come from is pointed to by the
491 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
492 variable.
493 This area is a cache that can hold previously downloaded source.
494 You can also instruct the OpenEmbedded build system to create
495 tarballs from Git repositories, which is not the default behavior,
496 and store them in the <filename>DL_DIR</filename> by using the
497 <link linkend='var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></link>
498 variable.
499 </para>
500
501 <para>
502 Judicious use of a <filename>DL_DIR</filename> directory can
503 save the build system a trip across the Internet when looking
504 for files.
505 A good method for using a download directory is to have
506 <filename>DL_DIR</filename> point to an area outside of your
507 Build Directory.
508 Doing so allows you to safely delete the Build Directory
509 if needed without fear of removing any downloaded source file.
510 </para>
511
512 <para>
513 The remainder of this section provides a deeper look into the
514 source files and the mirrors.
515 Here is a more detailed look at the source file area of the
516 base figure:
517 <imagedata fileref="figures/source-input.png" align="center" width="7in" depth="7.5in" />
518 </para>
519
520 <section id='upstream-project-releases'>
521 <title>Upstream Project Releases</title>
522
523 <para>
524 Upstream project releases exist anywhere in the form of an
525 archived file (e.g. tarball or zip file).
526 These files correspond to individual recipes.
527 For example, the figure uses specific releases each for
528 BusyBox, Qt, and Dbus.
529 An archive file can be for any released product that can be
530 built using a recipe.
531 </para>
532 </section>
533
534 <section id='local-projects'>
535 <title>Local Projects</title>
536
537 <para>
538 Local projects are custom bits of software the user provides.
539 These bits reside somewhere local to a project - perhaps
540 a directory into which the user checks in items (e.g.
541 a local directory containing a development source tree
542 used by the group).
543 </para>
544
545 <para>
546 The canonical method through which to include a local project
547 is to use the
548 <link linkend='ref-classes-externalsrc'><filename>externalsrc</filename></link>
549 class to include that local project.
550 You use either the <filename>local.conf</filename> or a
551 recipe's append file to override or set the
552 recipe to point to the local directory on your disk to pull
553 in the whole source tree.
554 </para>
555
556 <para>
557 For information on how to use the
558 <filename>externalsrc</filename> class, see the
559 "<link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>"
560 section.
561 </para>
562 </section>
563
564 <section id='scms'>
565 <title>Source Control Managers (Optional)</title>
566
567 <para>
568 Another place the build system can get source files from is
569 through an SCM such as Git or Subversion.
570 In this case, a repository is cloned or checked out.
571 The <filename>do_fetch</filename> task inside BitBake uses
572 the <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
573 variable and the argument's prefix to determine the correct
574 fetcher module.
575 </para>
576
577 <note>
578 For information on how to have the OpenEmbedded build system
579 generate tarballs for Git repositories and place them in the
580 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
581 directory, see the
582 <link linkend='var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></link>
583 variable.
584 </note>
585
586 <para>
587 When fetching a repository, BitBake uses the
588 <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
589 variable to determine the specific revision from which to
590 build.
591 </para>
592 </section>
593
594 <section id='source-mirrors'>
595 <title>Source Mirror(s)</title>
596
597 <para>
598 Two kinds of mirrors exist: pre-mirrors and regular mirrors.
599 The <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
600 and
601 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
602 variables point to these, respectively.
603 BitBake checks pre-mirrors before looking upstream for any
604 source files.
605 Pre-mirrors are appropriate when you have a shared directory
606 that is not a directory defined by the
607 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
608 variable.
609 A Pre-mirror typically points to a shared directory that is
610 local to your organization.
611 </para>
612
613 <para>
614 Regular mirrors can be any site across the Internet that is
615 used as an alternative location for source code should the
616 primary site not be functioning for some reason or another.
617 </para>
618 </section>
619 </section>
620
621 <section id="package-feeds-dev-environment">
622 <title>Package Feeds</title>
623
624 <para>
625 When the OpenEmbedded build system generates an image or an SDK,
626 it gets the packages from a package feed area located in the
627 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
628 The
629 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>
630 shows this package feeds area in the upper-right corner.
631 </para>
632
633 <para>
634 This section looks a little closer into the package feeds area used
635 by the build system.
636 Here is a more detailed look at the area:
637 <imagedata fileref="figures/package-feeds.png" align="center" width="7in" depth="6in" />
638 </para>
639
640 <para>
641 Package feeds are an intermediary step in the build process.
642 BitBake generates packages whose types are defined by the
643 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
644 variable.
645 Before placing the packages into package feeds,
646 the build process validates them with generated output quality
647 assurance checks through the
648 <link linkend='ref-classes-insane'><filename>insane</filename></link>
649 class.
650 </para>
651
652 <para>
653 The package feed area resides in
654 <filename>tmp/deploy</filename> of the Build Directory.
655 Folders are created that correspond to the package type
656 (IPK, DEB, or RPM) created.
657 Further organization is derived through the value of the
658 <link linkend='var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></link>
659 variable for each package.
660 For example, packages can exist for the i586 or qemux86
661 architectures.
662 The package files themselves reside within the appropriate
663 architecture folder.
664 </para>
665
666 <para>
667 BitBake uses the <filename>do_package_write_*</filename> task to
668 place generated packages into the package holding area (e.g.
669 <filename>do_package_write_ipk</filename> for IPK packages).
670 </para>
671 </section>
672
673 <section id='bitbake-dev-environment'>
674 <title>BitBake</title>
675
676 <para>
677 The OpenEmbedded build system uses
678 <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
679 to produce images.
680 You can see from the
681 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>,
682 the BitBake area consists of several functional areas.
683 This section takes a closer look at each of those areas.
684 </para>
685
686 <para>
687 Separate documentation exists for the BitBake tool.
688 See the
689 <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>
690 for reference material on BitBake.
691 </para>
692
693 <section id='source-fetching-dev-environment'>
694 <title>Source Fetching</title>
695
696 <para>
697 The first stages of building a recipe are to fetch and unpack
698 the source code:
699 <imagedata fileref="figures/source-fetching.png" align="center" width="6.5in" depth="5in" />
700 </para>
701
702 <para>
703 The <filename>do_fetch</filename> and
704 <filename>do_unpack</filename> tasks fetch the source files
705 and unpack them into the work directory.
706 By default, everything is accomplished in the
707 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
708 which has a defined structure.
709 For additional general information on the Build Directory,
710 see the
711 "<link linkend='structure-core-build'><filename>build/</filename></link>"
712 section.
713 </para>
714
715 <para>
716 Unpacked source files are pointed to by the
717 <link linkend='var-S'><filename>S</filename></link> variable.
718 Each recipe has an area in the Build Directory where the
719 unpacked source code resides.
720 The name of that directory for any given recipe is defined from
721 several different variables.
722 You can see the variables that define these directories
723 by looking at the figure:
724 <itemizedlist>
725 <listitem><para><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link> -
726 The base directory where the OpenEmbedded build system
727 performs all its work during the build.
728 </para></listitem>
729 <listitem><para><link linkend='var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></link> -
730 The architecture of the built package or packages.
731 </para></listitem>
732 <listitem><para><link linkend='var-TARGET_OS'><filename>TARGET_OS</filename></link> -
733 The operating system of the target device.
734 </para></listitem>
735 <listitem><para><link linkend='var-PN'><filename>PN</filename></link> -
736 The name of the built package.
737 </para></listitem>
738 <listitem><para><link linkend='var-PV'><filename>PV</filename></link> -
739 The version of the recipe used to build the package.
740 </para></listitem>
741 <listitem><para><link linkend='var-PR'><filename>PR</filename></link> -
742 The revision of the recipe used to build the package.
743 </para></listitem>
744 <listitem><para><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link> -
745 The location within <filename>TMPDIR</filename> where
746 a specific package is built.
747 </para></listitem>
748 <listitem><para><link linkend='var-S'><filename>S</filename></link> -
749 Contains the unpacked source files for a given recipe.
750 </para></listitem>
751 </itemizedlist>
752 </para>
753 </section>
754
755 <section id='patching-dev-environment'>
756 <title>Patching</title>
757
758 <para>
759 Once source code is fetched and unpacked, BitBake locates
760 patch files and applies them to the source files:
761 <imagedata fileref="figures/patching.png" align="center" width="6in" depth="5in" />
762 </para>
763
764 <para>
765 The <filename>do_patch</filename> task processes recipes by
766 using the
767 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
768 variable to locate applicable patch files, which by default
769 are <filename>*.patch</filename> or
770 <filename>*.diff</filename> files, or any file if
771 "apply=yes" is specified for the file in
772 <filename>SRC_URI</filename>.
773 </para>
774
775 <para>
776 BitBake finds and applies multiple patches for a single recipe
777 in the order in which it finds the patches.
778 Patches are applied to the recipe's source files located in the
779 <link linkend='var-S'><filename>S</filename></link> directory.
780 </para>
781
782 <para>
783 For more information on how the source directories are
784 created, see the
785 "<link linkend='source-fetching-dev-environment'>Source Fetching</link>"
786 section.
787 </para>
788 </section>
789
790 <section id='configuration-and-compilation-dev-environment'>
791 <title>Configuration and Compilation</title>
792
793 <para>
794 After source code is patched, BitBake executes tasks that
795 configure and compile the source code:
796 <imagedata fileref="figures/configuration-compile-autoreconf.png" align="center" width="7in" depth="5in" />
797 </para>
798
799 <para>
800 This step in the build process consists of three tasks:
801 <itemizedlist>
802 <listitem><para><emphasis><filename>do_configure</filename>:</emphasis>
803 This task configures the source by enabling and
804 disabling any build-time and configuration options for
805 the software being built.
806 Configurations can come from the recipe itself as well
807 as from an inherited class.
808 Additionally, the software itself might configure itself
809 depending on the target for which it is being built.
810 </para>
811
812 <para>The configurations handled by the
813 <filename>do_configure</filename> task are specific
814 to source code configuration for the source code
815 being built by the recipe.</para>
816
817 <para>If you are using the
818 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
819 class,
820 you can add additional configuration options by using
821 the <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
822 variable.
823 For information on how this variable works within
824 that class, see the
825 <filename>meta/classes/autotools.bbclass</filename> file.
826 </para></listitem>
827 <listitem><para><emphasis><filename>do_compile</filename>:</emphasis>
828 Once a configuration task has been satisfied, BitBake
829 compiles the source using the
830 <filename>do_compile</filename> task.
831 Compilation occurs in the directory pointed to by the
832 <link linkend='var-B'><filename>B</filename></link>
833 variable.
834 Realize that the <filename>B</filename> directory is, by
835 default, the same as the
836 <link linkend='var-S'><filename>S</filename></link>
837 directory.</para></listitem>
838 <listitem><para><emphasis><filename>do_install</filename>:</emphasis>
839 Once compilation is done, BitBake executes the
840 <filename>do_install</filename> task.
841 This task copies files from the <filename>B</filename>
842 directory and places them in a holding area pointed to
843 by the
844 <link linkend='var-D'><filename>D</filename></link>
845 variable.</para></listitem>
846 </itemizedlist>
847 </para>
848 </section>
849
850 <section id='package-splitting-dev-environment'>
851 <title>Package Splitting</title>
852
853 <para>
854 After source code is configured and compiled, the
855 OpenEmbedded build system analyzes
856 the results and splits the output into packages:
857 <imagedata fileref="figures/analysis-for-package-splitting.png" align="center" width="7in" depth="7in" />
858 </para>
859
860 <para>
861 The <filename>do_package</filename> and
862 <filename>do_packagedata</filename> tasks combine to analyze
863 the files found in the
864 <link linkend='var-D'><filename>D</filename></link> directory
865 and split them into subsets based on available packages and
866 files.
867 The analyzing process involves the following as well as other
868 items: splitting out debugging symbols,
869 looking at shared library dependencies between packages,
870 and looking at package relationships.
871 The <filename>do_packagedata</filename> task creates package
872 metadata based on the analysis such that the
873 OpenEmbedded build system can generate the final packages.
874 Working, staged, and intermediate results of the analysis
875 and package splitting process use these areas:
876 <itemizedlist>
877 <listitem><para><link linkend='var-PKGD'><filename>PKGD</filename></link> -
878 The destination directory for packages before they are
879 split.
880 </para></listitem>
881 <listitem><para><link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link> -
882 A shared, global-state directory that holds data
883 generated during the packaging process.
884 </para></listitem>
885 <listitem><para><link linkend='var-PKGDESTWORK'><filename>PKGDESTWORK</filename></link> -
886 A temporary work area used by the
887 <filename>do_package</filename> task.
888 </para></listitem>
889 <listitem><para><link linkend='var-PKGDEST'><filename>PKGDEST</filename></link> -
890 The parent directory for packages after they have
891 been split.
892 </para></listitem>
893 </itemizedlist>
894 The <link linkend='var-FILES'><filename>FILES</filename></link>
895 variable defines the files that go into each package in
896 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>.
897 If you want details on how this is accomplished, you can
898 look at the
899 <link linkend='ref-classes-package'><filename>package</filename></link>
900 class.
901 </para>
902
903 <para>
904 Depending on the type of packages being created (RPM, DEB, or
905 IPK), the <filename>do_package_write_*</filename> task
906 creates the actual packages and places them in the
907 Package Feed area, which is
908 <filename>${TMPDIR}/deploy</filename>.
909 You can see the
910 "<link linkend='package-feeds-dev-environment'>Package Feeds</link>"
911 section for more detail on that part of the build process.
912 <note>
913 Support for creating feeds directly from the
914 <filename>deploy/*</filename> directories does not exist.
915 Creating such feeds usually requires some kind of feed
916 maintenance mechanism that would upload the new packages
917 into an official package feed (e.g. the
918 Ångström distribution).
919 This functionality is highly distribution-specific
920 and thus is not provided out of the box.
921 </note>
922 </para>
923 </section>
924
925 <section id='image-generation-dev-environment'>
926 <title>Image Generation</title>
927
928 <para>
929 Once packages are split and stored in the Package Feeds area,
930 the OpenEmbedded build system uses BitBake to generate the
931 root filesystem image:
932 <imagedata fileref="figures/image-generation.png" align="center" width="6in" depth="7in" />
933 </para>
934
935 <para>
936 The image generation process consists of several stages and
937 depends on many variables.
938 The <filename>do_rootfs</filename> task uses these key variables
939 to help create the list of packages to actually install:
940 <itemizedlist>
941 <listitem><para><link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>:
942 Lists out the base set of packages to install from
943 the Package Feeds area.</para></listitem>
944 <listitem><para><link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>:
945 Specifies packages that should not be installed.
946 </para></listitem>
947 <listitem><para><link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>:
948 Specifies features to include in the image.
949 Most of these features map to additional packages for
950 installation.</para></listitem>
951 <listitem><para><link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>:
952 Specifies the package backend to use and consequently
953 helps determine where to locate packages within the
954 Package Feeds area.</para></listitem>
955 <listitem><para><link linkend='var-IMAGE_LINGUAS'><filename>IMAGE_LINGUAS</filename></link>:
956 Determines the language(s) for which additional
957 language support packages are installed.
958 </para></listitem>
959 </itemizedlist>
960 </para>
961
962 <para>
963 Package installation is under control of the package manager
964 (e.g. smart/rpm, opkg, or apt/dpkg) regardless of whether or
965 not package management is enabled for the target.
966 At the end of the process, if package management is not
967 enabled for the target, the package manager's data files
968 are deleted from the root filesystem.
969 </para>
970
971 <para>
972 During image generation, the build system attempts to run
973 all post-installation scripts.
974 Any that fail to run on the build host are run on the
975 target when the target system is first booted.
976 If you are using a
977 <ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>read-only root filesystem</ulink>,
978 all the post installation scripts must succeed during the
979 package installation phase since the root filesystem is
980 read-only.
981 </para>
982
983 <para>
984 During Optimization, optimizing processes are run across
985 the image.
986 These processes include <filename>mklibs</filename> and
987 <filename>prelink</filename>.
988 The <filename>mklibs</filename> process optimizes the size
989 of the libraries.
990 A <filename>prelink</filename> process optimizes the dynamic
991 linking of shared libraries to reduce start up time of
992 executables.
993 </para>
994
995 <para>
996 Along with writing out the root filesystem image, the
997 <filename>do_rootfs</filename> task creates a manifest file
998 (<filename>.manifest</filename>) in the same directory as
999 the root filesystem image that lists out, line-by-line, the
1000 installed packages.
1001 This manifest file is useful for the
1002 <link linkend='ref-classes-testimage'><filename>testimage</filename></link>
1003 class, for example, to determine whether or not to run
1004 specific tests.
1005 See the
1006 <link linkend='var-IMAGE_MANIFEST'><filename>IMAGE_MANIFEST</filename></link>
1007 variable for additional information.
1008 </para>
1009
1010 <para>
1011 Part of the image generation process includes compressing the
1012 root filesystem image.
1013 Compression is accomplished through several optimization
1014 routines designed to reduce the overall size of the image.
1015 </para>
1016
1017 <para>
1018 After the root filesystem has been constructed, the image
1019 generation process turns everything into an image file or
1020 a set of image files.
1021 The formats used for the root filesystem depend on the
1022 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
1023 variable.
1024 </para>
1025
1026 <note>
1027 The entire image generation process is run under Pseudo.
1028 Running under Pseudo ensures that the files in the root
1029 filesystem have correct ownership.
1030 </note>
1031 </section>
1032
1033 <section id='sdk-generation-dev-environment'>
1034 <title>SDK Generation</title>
1035
1036 <para>
1037 The OpenEmbedded build system uses BitBake to generate the
1038 Software Development Kit (SDK) installer script:
1039 <imagedata fileref="figures/sdk-generation.png" align="center" width="6in" depth="7in" />
1040 </para>
1041
1042 <note>
1043 For more information on the cross-development toolchain
1044 generation, see the
1045 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
1046 section.
1047 For information on advantages gained when building a
1048 cross-development toolchain using the
1049 <filename>do_populate_sdk</filename> task, see the
1050 "<ulink url='&YOCTO_DOCS_ADT_URL;#optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</ulink>"
1051 section in the Yocto Project Application Developer's Guide.
1052 </note>
1053
1054 <para>
1055 Like image generation, the SDK script process consists of
1056 several stages and depends on many variables.
1057 The <filename>do_populate_sdk</filename> task uses these
1058 key variables to help create the list of packages to actually
1059 install.
1060 For information on the variables listed in the figure, see the
1061 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
1062 section.
1063 </para>
1064
1065 <para>
1066 The <filename>do_populate_sdk</filename> task handles two
1067 parts: a target part and a host part.
1068 The target part is the part built for the target hardware and
1069 includes libraries and headers.
1070 The host part is the part of the SDK that runs on the
1071 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>.
1072 </para>
1073
1074 <para>
1075 Once both parts are constructed, the
1076 <filename>do_populate_sdk</filename> task performs some cleanup
1077 on both parts.
1078 After the cleanup, the task creates a cross-development
1079 environment setup script and any configuration files that
1080 might be needed.
1081 </para>
1082
1083 <para>
1084 The final output of the task is the Cross-development
1085 toolchain installation script (<filename>.sh</filename> file),
1086 which includes the environment setup script.
1087 </para>
1088 </section>
1089 </section>
1090
1091 <section id='images-dev-environment'>
1092 <title>Images</title>
1093
1094 <para>
1095 The images produced by the OpenEmbedded build system
1096 are compressed forms of the
1097 root filesystem that are ready to boot on a target device.
1098 You can see from the
1099 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>
1100 that BitBake output, in part, consists of images.
1101 This section is going to look more closely at this output:
1102 <imagedata fileref="figures/images.png" align="center" width="5.5in" depth="5.5in" />
1103 </para>
1104
1105 <para>
1106 For a list of example images that the Yocto Project provides,
1107 see the
1108 "<link linkend='ref-images'>Images</link>" chapter.
1109 </para>
1110
1111 <para>
1112 Images are written out to the
1113 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1114 inside the <filename>tmp/deploy/images/&lt;machine&gt;/</filename>
1115 folder as shown in the figure.
1116 This folder contains any files expected to be loaded on the
1117 target device.
1118 The
1119 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>
1120 variable points to the <filename>deploy</filename> directory,
1121 while the
1122 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
1123 variable points to the appropriate directory containing images for
1124 the current configuration.
1125 <itemizedlist>
1126 <listitem><para><filename>&lt;kernel-image&gt;</filename>:
1127 A kernel binary file.
1128 The <link linkend='var-KERNEL_IMAGETYPE'><filename>KERNEL_IMAGETYPE</filename></link>
1129 variable setting determines the naming scheme for the
1130 kernel image file.
1131 Depending on that variable, the file could begin with
1132 a variety of naming strings.
1133 The <filename>deploy/images/&lt;machine&gt;</filename>
1134 directory can contain multiple image files for the
1135 machine.</para></listitem>
1136 <listitem><para><filename>&lt;root-filesystem-image&gt;</filename>:
1137 Root filesystems for the target device (e.g.
1138 <filename>*.ext3</filename> or <filename>*.bz2</filename>
1139 files).
1140 The <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
1141 variable setting determines the root filesystem image
1142 type.
1143 The <filename>deploy/images/&lt;machine&gt;</filename>
1144 directory can contain multiple root filesystems for the
1145 machine.</para></listitem>
1146 <listitem><para><filename>&lt;kernel-modules&gt;</filename>:
1147 Tarballs that contain all the modules built for the kernel.
1148 Kernel module tarballs exist for legacy purposes and
1149 can be suppressed by setting the
1150 <link linkend='var-MODULE_TARBALL_DEPLOY'><filename>MODULE_TARBALL_DEPLOY</filename></link>
1151 variable to "0".
1152 The <filename>deploy/images/&lt;machine&gt;</filename>
1153 directory can contain multiple kernel module tarballs
1154 for the machine.</para></listitem>
1155 <listitem><para><filename>&lt;bootloaders&gt;</filename>:
1156 Bootloaders supporting the image, if applicable to the
1157 target machine.
1158 The <filename>deploy/images/&lt;machine&gt;</filename>
1159 directory can contain multiple bootloaders for the
1160 machine.</para></listitem>
1161 <listitem><para><filename>&lt;symlinks&gt;</filename>:
1162 The <filename>deploy/images/&lt;machine&gt;</filename>
1163 folder contains
1164 a symbolic link that points to the most recently built file
1165 for each machine.
1166 These links might be useful for external scripts that
1167 need to obtain the latest version of each file.
1168 </para></listitem>
1169 </itemizedlist>
1170 </para>
1171 </section>
1172
1173 <section id='sdk-dev-environment'>
1174 <title>Application Development SDK</title>
1175
1176 <para>
1177 In the
1178 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>,
1179 the output labeled "Application Development SDK" represents an
1180 SDK.
1181 This section is going to take a closer look at this output:
1182 <imagedata fileref="figures/sdk.png" align="center" width="5in" depth="4in" />
1183 </para>
1184
1185 <para>
1186 The specific form of this output is a self-extracting
1187 SDK installer (<filename>*.sh</filename>) that, when run,
1188 installs the SDK, which consists of a cross-development
1189 toolchain, a set of libraries and headers, and an SDK
1190 environment setup script.
1191 Running this installer essentially sets up your
1192 cross-development environment.
1193 You can think of the cross-toolchain as the "host"
1194 part because it runs on the SDK machine.
1195 You can think of the libraries and headers as the "target"
1196 part because they are built for the target hardware.
1197 The setup script is added so that you can initialize the
1198 environment before using the tools.
1199 </para>
1200
1201 <note>
1202 <para>
1203 The Yocto Project supports several methods by which you can
1204 set up this cross-development environment.
1205 These methods include downloading pre-built SDK installers,
1206 building and installing your own SDK installer, or running
1207 an Application Development Toolkit (ADT) installer to
1208 install not just cross-development toolchains
1209 but also additional tools to help in this type of
1210 development.
1211 </para>
1212
1213 <para>
1214 For background information on cross-development toolchains
1215 in the Yocto Project development environment, see the
1216 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
1217 section.
1218 For information on setting up a cross-development
1219 environment, see the
1220 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
1221 section in the Yocto Project Application Developer's Guide.
1222 </para>
1223 </note>
1224
1225 <para>
1226 Once built, the SDK installers are written out to the
1227 <filename>deploy/sdk</filename> folder inside the
1228 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1229 as shown in the figure at the beginning of this section.
1230 Several variables exist that help configure these files:
1231 <itemizedlist>
1232 <listitem><para><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>:
1233 Points to the <filename>deploy</filename>
1234 directory.</para></listitem>
1235 <listitem><para><link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>:
1236 Specifies the architecture of the machine
1237 on which the cross-development tools are run to
1238 create packages for the target hardware.
1239 </para></listitem>
1240 <listitem><para><link linkend='var-SDKIMAGE_FEATURES'><filename>SDKIMAGE_FEATURES</filename></link>:
1241 Lists the features to include in the "target" part
1242 of the SDK.
1243 </para></listitem>
1244 <listitem><para><link linkend='var-TOOLCHAIN_HOST_TASK'><filename>TOOLCHAIN_HOST_TASK</filename></link>:
1245 Lists packages that make up the host
1246 part of the SDK (i.e. the part that runs on
1247 the <filename>SDKMACHINE</filename>).
1248 When you use
1249 <filename>bitbake -c populate_sdk &lt;imagename&gt;</filename>
1250 to create the SDK, a set of default packages
1251 apply.
1252 This variable allows you to add more packages.
1253 </para></listitem>
1254 <listitem><para><link linkend='var-TOOLCHAIN_TARGET_TASK'><filename>TOOLCHAIN_TARGET_TASK</filename></link>:
1255 Lists packages that make up the target part
1256 of the SDK (i.e. the part built for the
1257 target hardware).
1258 </para></listitem>
1259 <listitem><para><link linkend='var-SDKPATH'><filename>SDKPATH</filename></link>:
1260 Defines the default SDK installation path offered by the
1261 installation script.
1262 </para></listitem>
1263 </itemizedlist>
1264 </para>
1265 </section>
1266
1267</chapter>
1268<!--
1269vim: expandtab tw=80 ts=4
1270-->
diff --git a/documentation/ref-manual/examples/hello-autotools/hello_2.3.bb b/documentation/ref-manual/examples/hello-autotools/hello_2.3.bb
new file mode 100644
index 0000000000..5dfb0b30cf
--- /dev/null
+++ b/documentation/ref-manual/examples/hello-autotools/hello_2.3.bb
@@ -0,0 +1,8 @@
1DESCRIPTION = "GNU Helloworld application"
2SECTION = "examples"
3LICENSE = "GPLv3"
4LIC_FILES_CHKSUM = "file://COPYING;md5=adefda309052235aa5d1e99ce7557010"
5
6SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.bz2"
7
8inherit autotools
diff --git a/documentation/ref-manual/examples/hello-single/files/helloworld.c b/documentation/ref-manual/examples/hello-single/files/helloworld.c
new file mode 100644
index 0000000000..fc7169b7b8
--- /dev/null
+++ b/documentation/ref-manual/examples/hello-single/files/helloworld.c
@@ -0,0 +1,8 @@
1#include <stdio.h>
2
3int main(void)
4{
5 printf("Hello world!\n");
6
7 return 0;
8}
diff --git a/documentation/ref-manual/examples/hello-single/hello.bb b/documentation/ref-manual/examples/hello-single/hello.bb
new file mode 100644
index 0000000000..0812743e39
--- /dev/null
+++ b/documentation/ref-manual/examples/hello-single/hello.bb
@@ -0,0 +1,17 @@
1DESCRIPTION = "Simple helloworld application"
2SECTION = "examples"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
5
6SRC_URI = "file://helloworld.c"
7
8S = "${WORKDIR}"
9
10do_compile() {
11 ${CC} helloworld.c -o helloworld
12}
13
14do_install() {
15 install -d ${D}${bindir}
16 install -m 0755 helloworld ${D}${bindir}
17}
diff --git a/documentation/ref-manual/examples/libxpm/libxpm_3.5.6.bb b/documentation/ref-manual/examples/libxpm/libxpm_3.5.6.bb
new file mode 100644
index 0000000000..b58d4d7bd1
--- /dev/null
+++ b/documentation/ref-manual/examples/libxpm/libxpm_3.5.6.bb
@@ -0,0 +1,14 @@
1require xorg-lib-common.inc
2
3DESCRIPTION = "X11 Pixmap library"
4LICENSE = "X-BSD"
5LIC_FILES_CHKSUM = "file://COPYING;md5=3e07763d16963c3af12db271a31abaa5"
6DEPENDS += "libxext"
7PR = "r2"
8PE = "1"
9
10XORG_PN = "libXpm"
11
12PACKAGES =+ "sxpm cxpm"
13FILES_cxpm = "${bindir}/cxpm"
14FILES_sxpm = "${bindir}/sxpm"
diff --git a/documentation/ref-manual/examples/mtd-makefile/mtd-utils_1.0.0.bb b/documentation/ref-manual/examples/mtd-makefile/mtd-utils_1.0.0.bb
new file mode 100644
index 0000000000..5d05a437a4
--- /dev/null
+++ b/documentation/ref-manual/examples/mtd-makefile/mtd-utils_1.0.0.bb
@@ -0,0 +1,15 @@
1DESCRIPTION = "Tools for managing memory technology devices."
2SECTION = "base"
3DEPENDS = "zlib"
4HOMEPAGE = "http://www.linux-mtd.infradead.org/"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
7 file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
8
9SRC_URI = "ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-${PV}.tar.gz"
10
11CFLAGS_prepend = "-I ${S}/include "
12
13do_install() {
14 oe_runmake install DESTDIR=${D}
15}
diff --git a/documentation/ref-manual/faq.xml b/documentation/ref-manual/faq.xml
new file mode 100644
index 0000000000..035011f342
--- /dev/null
+++ b/documentation/ref-manual/faq.xml
@@ -0,0 +1,685 @@
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
5<chapter id='faq'>
6<title>FAQ</title>
7<qandaset>
8 <qandaentry>
9 <question>
10 <para>
11 How does Poky differ from <ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>?
12 </para>
13 </question>
14 <answer>
15 <para>
16 The term "<ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink>"
17 refers to the specific reference build system that
18 the Yocto Project provides.
19 Poky is based on <ulink url='&YOCTO_DOCS_DEV_URL;#oe-core'>OE-Core</ulink>
20 and <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
21 Thus, the generic term used here for the build system is
22 the "OpenEmbedded build system."
23 Development in the Yocto Project using Poky is closely tied to OpenEmbedded, with
24 changes always being merged to OE-Core or BitBake first before being pulled back
25 into Poky.
26 This practice benefits both projects immediately.
27 </para>
28 </answer>
29 </qandaentry>
30
31 <qandaentry>
32 <question>
33 <para id='faq-not-meeting-requirements'>
34 My development system does not meet the
35 required Git, tar, and Python versions.
36 In particular, I do not have Python 2.7.3 or greater, or
37 I do have Python 3.x, which is specifically not supported by
38 the Yocto Project.
39 Can I still use the Yocto Project?
40 </para>
41 </question>
42 <answer>
43 <para>
44 You can get the required tools on your host development
45 system a couple different ways (i.e. building a tarball or
46 downloading a tarball).
47 See the
48 "<link linkend='required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</link>"
49 section for steps on how to update your build tools.
50 </para>
51 </answer>
52 </qandaentry>
53
54 <qandaentry>
55 <question>
56 <para>
57 How can you claim Poky / OpenEmbedded-Core is stable?
58 </para>
59 </question>
60 <answer>
61 <para>
62 There are three areas that help with stability;
63 <itemizedlist>
64 <listitem><para>The Yocto Project team keeps
65 <ulink url='&YOCTO_DOCS_DEV_URL;#oe-core'>OE-Core</ulink> small
66 and focused, containing around 830 recipes as opposed to the thousands
67 available in other OpenEmbedded community layers.
68 Keeping it small makes it easy to test and maintain.</para></listitem>
69 <listitem><para>The Yocto Project team runs manual and automated tests
70 using a small, fixed set of reference hardware as well as emulated
71 targets.</para></listitem>
72 <listitem><para>The Yocto Project uses an autobuilder,
73 which provides continuous build and integration tests.</para></listitem>
74 </itemizedlist>
75 </para>
76 </answer>
77 </qandaentry>
78
79 <qandaentry>
80 <question>
81 <para>
82 How do I get support for my board added to the Yocto Project?
83 </para>
84 </question>
85 <answer>
86 <para>
87 Support for an additional board is added by creating a
88 Board Support Package (BSP) layer for it.
89 For more information on how to create a BSP layer, see the
90 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
91 section in the Yocto Project Development Manual and the
92 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
93 </para>
94 <para>
95 Usually, if the board is not completely exotic, adding support in
96 the Yocto Project is fairly straightforward.
97 </para>
98 </answer>
99 </qandaentry>
100
101 <qandaentry>
102 <question>
103 <para>
104 Are there any products built using the OpenEmbedded build system?
105 </para>
106 </question>
107 <answer>
108 <para>
109 The software running on the <ulink url='http://vernier.com/labquest/'>Vernier LabQuest</ulink>
110 is built using the OpenEmbedded build system.
111 See the <ulink url='http://www.vernier.com/products/interfaces/labq/'>Vernier LabQuest</ulink>
112 website for more information.
113 There are a number of pre-production devices using the OpenEmbedded build system
114 and the Yocto Project team
115 announces them as soon as they are released.
116 </para>
117 </answer>
118 </qandaentry>
119
120 <qandaentry>
121 <question>
122 <para>
123 What does the OpenEmbedded build system produce as output?
124 </para>
125 </question>
126 <answer>
127 <para>
128 Because you can use the same set of recipes to create output of
129 various formats, the output of an OpenEmbedded build depends on
130 how you start it.
131 Usually, the output is a flashable image ready for the target
132 device.
133 </para>
134 </answer>
135 </qandaentry>
136
137 <qandaentry>
138 <question>
139 <para>
140 How do I add my package to the Yocto Project?
141 </para>
142 </question>
143 <answer>
144 <para>
145 To add a package, you need to create a BitBake recipe.
146 For information on how to create a BitBake recipe, see the
147 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-writing-a-new-recipe'>Writing a New Recipe</ulink>"
148 in the Yocto Project Development Manual.
149 </para>
150 </answer>
151 </qandaentry>
152
153 <qandaentry>
154 <question>
155 <para>
156 Do I have to reflash my entire board with a new Yocto Project image when recompiling
157 a package?
158 </para>
159 </question>
160 <answer>
161 <para>
162 The OpenEmbedded build system can build packages in various
163 formats such as IPK for OPKG, Debian package
164 (<filename>.deb</filename>), or RPM.
165 You can then upgrade the packages using the package tools on
166 the device, much like on a desktop distribution such as
167 Ubuntu or Fedora.
168 However, package management on the target is entirely optional.
169 </para>
170 </answer>
171 </qandaentry>
172
173 <qandaentry>
174 <question>
175 <para>
176 What is GNOME Mobile and what is the difference between GNOME Mobile and GNOME?
177 </para>
178 </question>
179 <answer>
180 <para>
181 GNOME Mobile is a subset of the <ulink url='http://www.gnome.org'>GNOME</ulink>
182 platform targeted at mobile and embedded devices.
183 The main difference between GNOME Mobile and standard GNOME is that
184 desktop-orientated libraries have been removed, along with deprecated libraries,
185 creating a much smaller footprint.
186 </para>
187 </answer>
188 </qandaentry>
189
190 <qandaentry>
191 <question>
192 <para>
193 I see the error '<filename>chmod: XXXXX new permissions are r-xrwxrwx, not r-xr-xr-x</filename>'.
194 What is wrong?
195 </para>
196 </question>
197 <answer>
198 <para>
199 You are probably running the build on an NTFS filesystem.
200 Use <filename>ext2</filename>, <filename>ext3</filename>, or <filename>ext4</filename> instead.
201 </para>
202 </answer>
203 </qandaentry>
204
205<!-- <qandaentry>
206 <question>
207 <para>
208 How do I make the Yocto Project work in RHEL/CentOS?
209 </para>
210 </question>
211 <answer>
212 <para>
213 To get the Yocto Project working under RHEL/CentOS 5.1 you need to first
214 install some required packages.
215 The standard CentOS packages needed are:
216 <itemizedlist>
217 <listitem><para>"Development tools" (selected during installation)</para></listitem>
218 <listitem><para><filename>texi2html</filename></para></listitem>
219 <listitem><para><filename>compat-gcc-34</filename></para></listitem>
220 </itemizedlist>
221 On top of these, you need the following external packages:
222 <itemizedlist>
223 <listitem><para><filename>python-sqlite2</filename> from
224 <ulink url='http://dag.wieers.com/rpm/packages/python-sqlite2/'>DAG repository</ulink>
225 </para></listitem>
226 <listitem><para><filename>help2man</filename> from
227 <ulink url='http://centos.karan.org/el4/extras/stable/x86_64/RPMS/repodata/repoview/help2man-0-1.33.1-2.html'>Karan repository</ulink></para></listitem>
228 </itemizedlist>
229 </para>
230
231 <para>
232 Once these packages are installed, the OpenEmbedded build system will be able
233 to build standard images.
234 However, there might be a problem with the QEMU emulator segfaulting.
235 You can either disable the generation of binary locales by setting
236 <filename><link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>ENABLE_BINARY_LOCALE_GENERATION</link>
237 </filename> to "0" or by removing the <filename>linux-2.6-execshield.patch</filename>
238 from the kernel and rebuilding it since that is the patch that causes the problems with QEMU.
239 </para>
240
241 <note>
242 <para>For information on distributions that the Yocto Project
243 uses during validation, see the
244 <ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution Support</ulink>
245 Wiki page.</para>
246 <para>For notes about using the Yocto Project on a RHEL 4-based
247 host, see the
248 <ulink url='&YOCTO_WIKI_URL;/wiki/BuildingOnRHEL4'>Building on RHEL4</ulink>
249 Wiki page.</para>
250 </note>
251 </answer>
252 </qandaentry> -->
253
254 <qandaentry>
255 <question>
256 <para>
257 I see lots of 404 responses for files on
258 <filename>&YOCTO_HOME_URL;/sources/*</filename>. Is something wrong?
259 </para>
260 </question>
261 <answer>
262 <para>
263 Nothing is wrong.
264 The OpenEmbedded build system checks any configured source mirrors before downloading
265 from the upstream sources.
266 The build system does this searching for both source archives and
267 pre-checked out versions of SCM-managed software.
268 These checks help in large installations because it can reduce load on the SCM servers
269 themselves.
270 The address above is one of the default mirrors configured into the
271 build system.
272 Consequently, if an upstream source disappears, the team
273 can place sources there so builds continue to work.
274 </para>
275 </answer>
276 </qandaentry>
277
278 <qandaentry>
279 <question>
280 <para>
281 I have machine-specific data in a package for one machine only but the package is
282 being marked as machine-specific in all cases, how do I prevent this?
283 </para>
284 </question>
285 <answer>
286 <para>
287 Set <filename><link linkend='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'>SRC_URI_OVERRIDES_PACKAGE_ARCH</link>
288 </filename> = "0" in the <filename>.bb</filename> file but make sure the package is
289 manually marked as
290 machine-specific for the case that needs it.
291 The code that handles
292 <filename>SRC_URI_OVERRIDES_PACKAGE_ARCH</filename> is in
293 the <filename>meta/classes/base.bbclass</filename> file.
294 </para>
295 </answer>
296 </qandaentry>
297
298 <qandaentry>
299 <question>
300 <para>
301 I'm behind a firewall and need to use a proxy server. How do I do that?
302 </para>
303 </question>
304 <answer>
305 <para>
306 Most source fetching by the OpenEmbedded build system is done by <filename>wget</filename>
307 and you therefore need to specify the proxy settings in a
308 <filename>.wgetrc</filename> file in your home directory.
309 Here are some example settings:
310 <literallayout class='monospaced'>
311 http_proxy = http://proxy.yoyodyne.com:18023/
312 ftp_proxy = http://proxy.yoyodyne.com:18023/
313 </literallayout>
314 The Yocto Project also includes a
315 <filename>site.conf.sample</filename> file that shows how to
316 configure CVS and Git proxy servers if needed.
317 </para>
318 </answer>
319 </qandaentry>
320
321 <qandaentry>
322 <question>
323 <para>
324 What’s the difference between <filename>foo</filename> and <filename>foo-native</filename>?
325 </para>
326 </question>
327 <answer>
328 <para>
329 The <filename>*-native</filename> targets are designed to run on the system
330 being used for the build.
331 These are usually tools that are needed to assist the build in some way such as
332 <filename>quilt-native</filename>, which is used to apply patches.
333 The non-native version is the one that runs on the target device.
334 </para>
335 </answer>
336 </qandaentry>
337
338 <qandaentry>
339 <question>
340 <para>
341 I'm seeing random build failures. Help?!
342 </para>
343 </question>
344 <answer>
345 <para>
346 If the same build is failing in totally different and random
347 ways, the most likely explanation is:
348 <itemizedlist>
349 <listitem><para>The hardware you are running the build on
350 has some problem.</para></listitem>
351 <listitem><para>You are running the build under
352 virtualization, in which case the virtualization
353 probably has bugs.</para></listitem>
354 </itemizedlist>
355 The OpenEmbedded build system processes a massive amount of
356 data that causes lots of network, disk and CPU activity and
357 is sensitive to even single-bit failures in any of these areas.
358 True random failures have always been traced back to hardware
359 or virtualization issues.
360 </para>
361 </answer>
362 </qandaentry>
363
364 <qandaentry>
365 <question>
366 <para>
367 What do we need to ship for license compliance?
368 </para>
369 </question>
370 <answer>
371 <para>
372 This is a difficult question and you need to consult your lawyer
373 for the answer for your specific case.
374 It is worth bearing in mind that for GPL compliance, there needs
375 to be enough information shipped to allow someone else to
376 rebuild and produce the same end result you are shipping.
377 This means sharing the source code, any patches applied to it,
378 and also any configuration information about how that package
379 was configured and built.
380 </para>
381
382 <para>
383 You can find more information on licensing in the
384 "<ulink url='&YOCTO_DOCS_DEV_URL;#licensing'>Licensing</ulink>"
385 and "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
386 sections, both of which are in the Yocto Project Development
387 Manual.
388 </para>
389 </answer>
390 </qandaentry>
391
392 <qandaentry>
393 <question>
394 <para>
395 How do I disable the cursor on my touchscreen device?
396 </para>
397 </question>
398 <answer>
399 <para>
400 You need to create a form factor file as described in the
401 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-misc-recipes'>Miscellaneous BSP-Specific Recipe Files</ulink>"
402 section in the Yocto Project Board Support Packages (BSP)
403 Developer's Guide.
404 Set the <filename>HAVE_TOUCHSCREEN</filename> variable equal to
405 one as follows:
406 <literallayout class='monospaced'>
407 HAVE_TOUCHSCREEN=1
408 </literallayout>
409 </para>
410 </answer>
411 </qandaentry>
412
413 <qandaentry>
414 <question>
415 <para>
416 How do I make sure connected network interfaces are brought up by default?
417 </para>
418 </question>
419 <answer>
420 <para>
421 The default interfaces file provided by the netbase recipe does not
422 automatically bring up network interfaces.
423 Therefore, you will need to add a BSP-specific netbase that includes an interfaces
424 file.
425 See the "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-misc-recipes'>Miscellaneous BSP-Specific Recipe Files</ulink>"
426 section in the Yocto Project Board Support Packages (BSP)
427 Developer's Guide for information on creating these types of
428 miscellaneous recipe files.
429 </para>
430 <para>
431 For example, add the following files to your layer:
432 <literallayout class='monospaced'>
433 meta-MACHINE/recipes-bsp/netbase/netbase/MACHINE/interfaces
434 meta-MACHINE/recipes-bsp/netbase/netbase_5.0.bbappend
435 </literallayout>
436 </para>
437 </answer>
438 </qandaentry>
439
440 <qandaentry>
441 <question>
442 <para>
443 How do I create images with more free space?
444 </para>
445 </question>
446 <answer>
447 <para>
448 By default, the OpenEmbedded build system creates images
449 that are 1.3 times the size of the populated root filesystem.
450 To affect the image size, you need to set various
451 configurations:
452 <itemizedlist>
453 <listitem><para><emphasis>Image Size:</emphasis>
454 The OpenEmbedded build system uses the
455 <link linkend='var-IMAGE_ROOTFS_SIZE'><filename>IMAGE_ROOTFS_SIZE</filename></link>
456 variable to define the size of the image in Kbytes.
457 The build system determines the size by taking into
458 account the initial root filesystem size before any
459 modifications such as requested size for the image and
460 any requested additional free disk space to be
461 added to the image.</para></listitem>
462 <listitem><para><emphasis>Overhead:</emphasis>
463 Use the
464 <link linkend='var-IMAGE_OVERHEAD_FACTOR'><filename>IMAGE_OVERHEAD_FACTOR</filename></link>
465 variable to define the multiplier that the build system
466 applies to the initial image size, which is 1.3 by
467 default.</para></listitem>
468 <listitem><para><emphasis>Additional Free Space:</emphasis>
469 Use the
470 <link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'><filename>IMAGE_ROOTFS_EXTRA_SPACE</filename></link>
471 variable to add additional free space to the image.
472 The build system adds this space to the image after
473 it determines its
474 <filename>IMAGE_ROOTFS_SIZE</filename>.
475 </para></listitem>
476 </itemizedlist>
477 </para>
478 </answer>
479 </qandaentry>
480
481 <qandaentry>
482 <question>
483 <para>
484 Why don't you support directories with spaces in the pathnames?
485 </para>
486 </question>
487 <answer>
488 <para>
489 The Yocto Project team has tried to do this before but too
490 many of the tools the OpenEmbedded build system depends on,
491 such as <filename>autoconf</filename>, break when they find
492 spaces in pathnames.
493 Until that situation changes, the team will not support spaces
494 in pathnames.
495 </para>
496 </answer>
497 </qandaentry>
498
499 <qandaentry>
500 <question>
501 <para>
502 How do I use an external toolchain?
503 </para>
504 </question>
505 <answer>
506 <para>
507 The toolchain configuration is very flexible and customizable.
508 It is primarily controlled with the
509 <filename><link linkend='var-TCMODE'>TCMODE</link></filename>
510 variable.
511 This variable controls which <filename>tcmode-*.inc</filename>
512 file to include from the
513 <filename>meta/conf/distro/include</filename> directory within
514 the
515 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
516 </para>
517
518 <para>
519 The default value of <filename>TCMODE</filename> is "default",
520 which tells the OpenEmbedded build system to use its internally
521 built toolchain (i.e. <filename>tcmode-default.inc</filename>).
522 However, other patterns are accepted.
523 In particular, "external-*" refers to external toolchains.
524 One example is the Sourcery G++ Toolchain.
525 The support for this toolchain resides in the separate
526 <filename>meta-sourcery</filename> layer at
527 <ulink url='http://github.com/MentorEmbedded/meta-sourcery/'></ulink>.
528 </para>
529
530 <para>
531 In addition to the toolchain configuration, you also need a
532 corresponding toolchain recipe file.
533 This recipe file needs to package up any pre-built objects in
534 the toolchain such as <filename>libgcc</filename>,
535 <filename>libstdcc++</filename>, any locales, and
536 <filename>libc</filename>.
537 </para>
538 </answer>
539 </qandaentry>
540
541 <qandaentry>
542 <question>
543 <para id='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>
544 How does the OpenEmbedded build system obtain source code and
545 will it work behind my firewall or proxy server?
546 </para>
547 </question>
548 <answer>
549 <para>
550 The way the build system obtains source code is highly
551 configurable.
552 You can setup the build system to get source code in most
553 environments if HTTP transport is available.
554 </para>
555 <para>
556 When the build system searches for source code, it first
557 tries the local download directory.
558 If that location fails, Poky tries
559 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>,
560 the upstream source, and then
561 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
562 in that order.
563 </para>
564 <para>
565 Assuming your distribution is "poky", the OpenEmbedded build
566 system uses the Yocto Project source
567 <filename>PREMIRRORS</filename> by default for SCM-based
568 sources, upstreams for normal tarballs, and then falls back
569 to a number of other mirrors including the Yocto Project
570 source mirror if those fail.
571 </para>
572 <para>
573 As an example, you could add a specific server for the
574 build system to attempt before any others by adding something
575 like the following to the <filename>local.conf</filename>
576 configuration file:
577 <literallayout class='monospaced'>
578 PREMIRRORS_prepend = "\
579 git://.*/.* http://www.yoctoproject.org/sources/ \n \
580 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
581 http://.*/.* http://www.yoctoproject.org/sources/ \n \
582 https://.*/.* http://www.yoctoproject.org/sources/ \n"
583 </literallayout>
584 </para>
585 <para>
586 These changes cause the build system to intercept Git, FTP,
587 HTTP, and HTTPS requests and direct them to the
588 <filename>http://</filename> sources mirror.
589 You can use <filename>file://</filename> URLs to point to
590 local directories or network shares as well.
591 </para>
592 <para>
593 Aside from the previous technique, these options also exist:
594 <literallayout class='monospaced'>
595 BB_NO_NETWORK = "1"
596 </literallayout>
597 This statement tells BitBake to issue an error instead of
598 trying to access the Internet.
599 This technique is useful if you want to ensure code builds
600 only from local sources.
601 </para>
602 <para>
603 Here is another technique:
604 <literallayout class='monospaced'>
605 BB_FETCH_PREMIRRORONLY = "1"
606 </literallayout>
607 This statement limits the build system to pulling source
608 from the <filename>PREMIRRORS</filename> only.
609 Again, this technique is useful for reproducing builds.
610 </para>
611 <para>
612 Here is another technique:
613 <literallayout class='monospaced'>
614 BB_GENERATE_MIRROR_TARBALLS = "1"
615 </literallayout>
616 This statement tells the build system to generate mirror
617 tarballs.
618 This technique is useful if you want to create a mirror server.
619 If not, however, the technique can simply waste time during
620 the build.
621 </para>
622 <para>
623 Finally, consider an example where you are behind an
624 HTTP-only firewall.
625 You could make the following changes to the
626 <filename>local.conf</filename> configuration file as long as
627 the <filename>PREMIRRORS</filename> server is current:
628 <literallayout class='monospaced'>
629 PREMIRRORS_prepend = "\
630 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
631 http://.*/.* http://www.yoctoproject.org/sources/ \n \
632 https://.*/.* http://www.yoctoproject.org/sources/ \n"
633 BB_FETCH_PREMIRRORONLY = "1"
634 </literallayout>
635 These changes would cause the build system to successfully
636 fetch source over HTTP and any network accesses to anything
637 other than the <filename>PREMIRRORS</filename> would fail.
638 </para>
639 <para>
640 The build system also honors the standard shell environment
641 variables <filename>http_proxy</filename>,
642 <filename>ftp_proxy</filename>,
643 <filename>https_proxy</filename>, and
644 <filename>all_proxy</filename> to redirect requests through
645 proxy servers.
646 </para>
647 </answer>
648 </qandaentry>
649
650 <qandaentry>
651 <question>
652 <para>
653 Can I get rid of build output so I can start over?
654 </para>
655 </question>
656 <answer>
657 <para>
658 Yes - you can easily do this.
659 When you use BitBake to build an image, all the build output
660 goes into the directory created when you run the
661 build environment setup script (i.e.
662 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
663 or
664 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
665 By default, this <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
666 is named <filename>build</filename> but can be named
667 anything you want.
668 </para>
669
670 <para>
671 Within the Build Directory, is the <filename>tmp</filename>
672 directory.
673 To remove all the build output yet preserve any source code or
674 downloaded files from previous builds, simply remove the
675 <filename>tmp</filename> directory.
676 </para>
677 </answer>
678 </qandaentry>
679
680
681</qandaset>
682</chapter>
683<!--
684vim: expandtab tw=80 ts=4
685-->
diff --git a/documentation/ref-manual/figures/analysis-for-package-splitting.png b/documentation/ref-manual/figures/analysis-for-package-splitting.png
new file mode 100644
index 0000000000..04f2794ea9
--- /dev/null
+++ b/documentation/ref-manual/figures/analysis-for-package-splitting.png
Binary files differ
diff --git a/documentation/ref-manual/figures/buildhistory-web.png b/documentation/ref-manual/figures/buildhistory-web.png
new file mode 100644
index 0000000000..f6db86c977
--- /dev/null
+++ b/documentation/ref-manual/figures/buildhistory-web.png
Binary files differ
diff --git a/documentation/ref-manual/figures/buildhistory.png b/documentation/ref-manual/figures/buildhistory.png
new file mode 100644
index 0000000000..edf98d95cf
--- /dev/null
+++ b/documentation/ref-manual/figures/buildhistory.png
Binary files differ
diff --git a/documentation/ref-manual/figures/configuration-compile-autoreconf.png b/documentation/ref-manual/figures/configuration-compile-autoreconf.png
new file mode 100644
index 0000000000..a07464f04c
--- /dev/null
+++ b/documentation/ref-manual/figures/configuration-compile-autoreconf.png
Binary files differ
diff --git a/documentation/ref-manual/figures/cross-development-toolchains.png b/documentation/ref-manual/figures/cross-development-toolchains.png
new file mode 100644
index 0000000000..d36670a198
--- /dev/null
+++ b/documentation/ref-manual/figures/cross-development-toolchains.png
Binary files differ
diff --git a/documentation/ref-manual/figures/image-generation.png b/documentation/ref-manual/figures/image-generation.png
new file mode 100644
index 0000000000..ab962580c3
--- /dev/null
+++ b/documentation/ref-manual/figures/image-generation.png
Binary files differ
diff --git a/documentation/ref-manual/figures/images.png b/documentation/ref-manual/figures/images.png
new file mode 100644
index 0000000000..d99eac1fbf
--- /dev/null
+++ b/documentation/ref-manual/figures/images.png
Binary files differ
diff --git a/documentation/ref-manual/figures/layer-input.png b/documentation/ref-manual/figures/layer-input.png
new file mode 100644
index 0000000000..0a4f2e74f3
--- /dev/null
+++ b/documentation/ref-manual/figures/layer-input.png
Binary files differ
diff --git a/documentation/ref-manual/figures/package-feeds.png b/documentation/ref-manual/figures/package-feeds.png
new file mode 100644
index 0000000000..4bc311f3d6
--- /dev/null
+++ b/documentation/ref-manual/figures/package-feeds.png
Binary files differ
diff --git a/documentation/ref-manual/figures/patching.png b/documentation/ref-manual/figures/patching.png
new file mode 100644
index 0000000000..8ecd018502
--- /dev/null
+++ b/documentation/ref-manual/figures/patching.png
Binary files differ
diff --git a/documentation/ref-manual/figures/poky-title.png b/documentation/ref-manual/figures/poky-title.png
new file mode 100644
index 0000000000..2893d84620
--- /dev/null
+++ b/documentation/ref-manual/figures/poky-title.png
Binary files differ
diff --git a/documentation/ref-manual/figures/sdk-generation.png b/documentation/ref-manual/figures/sdk-generation.png
new file mode 100644
index 0000000000..c37e2748ca
--- /dev/null
+++ b/documentation/ref-manual/figures/sdk-generation.png
Binary files differ
diff --git a/documentation/ref-manual/figures/sdk.png b/documentation/ref-manual/figures/sdk.png
new file mode 100644
index 0000000000..a539cc52f0
--- /dev/null
+++ b/documentation/ref-manual/figures/sdk.png
Binary files differ
diff --git a/documentation/ref-manual/figures/source-fetching.png b/documentation/ref-manual/figures/source-fetching.png
new file mode 100644
index 0000000000..26aefb50c2
--- /dev/null
+++ b/documentation/ref-manual/figures/source-fetching.png
Binary files differ
diff --git a/documentation/ref-manual/figures/source-input.png b/documentation/ref-manual/figures/source-input.png
new file mode 100644
index 0000000000..f7515058ef
--- /dev/null
+++ b/documentation/ref-manual/figures/source-input.png
Binary files differ
diff --git a/documentation/ref-manual/figures/user-configuration.png b/documentation/ref-manual/figures/user-configuration.png
new file mode 100644
index 0000000000..f2b3f8e7fe
--- /dev/null
+++ b/documentation/ref-manual/figures/user-configuration.png
Binary files differ
diff --git a/documentation/ref-manual/figures/yocto-environment-ref.png b/documentation/ref-manual/figures/yocto-environment-ref.png
new file mode 100644
index 0000000000..650c6c8030
--- /dev/null
+++ b/documentation/ref-manual/figures/yocto-environment-ref.png
Binary files differ
diff --git a/documentation/ref-manual/introduction.xml b/documentation/ref-manual/introduction.xml
new file mode 100644
index 0000000000..2e91826d33
--- /dev/null
+++ b/documentation/ref-manual/introduction.xml
@@ -0,0 +1,562 @@
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
5<chapter id='intro'>
6<title>Introduction</title>
7
8<section id='intro-welcome'>
9 <title>Introduction</title>
10
11 <para>
12 This manual provides reference information for the current release of the Yocto Project.
13 The Yocto Project is an open-source collaboration project focused on embedded Linux
14 developers.
15 Amongst other things, the Yocto Project uses the OpenEmbedded build system, which
16 is based on the Poky project, to construct complete Linux images.
17 You can find complete introductory and getting started information on the Yocto Project
18 by reading the
19 <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
20 For task-based information using the Yocto Project, see the
21 <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Manual</ulink>
22 and the <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>.
23 For Board Support Package (BSP) structure information, see the
24 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
25 You can find information on tracing and profiling in the
26 <ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual'>Yocto Project Profiling and Tracing Manual</ulink>.
27 For information on BitBake, which is the task execution tool the
28 OpenEmbedded build system is based on, see the
29 <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>.
30 Finally, you can also find lots of Yocto Project information on the
31 <ulink url="&YOCTO_HOME_URL;">Yocto Project website</ulink>.
32 </para>
33</section>
34
35<section id='intro-manualoverview'>
36 <title>Documentation Overview</title>
37 <para>
38 This reference manual consists of the following:
39 <itemizedlist>
40 <listitem><para><emphasis>
41 <link linkend='usingpoky'>Using the Yocto Project</link>:</emphasis>
42 Provides an overview of the components that make up the Yocto Project
43 followed by information about debugging images created in the Yocto Project.
44 </para></listitem>
45 <listitem><para><emphasis>
46 <link linkend='closer-look'>A Closer Look at the Yocto Project Development Environment</link>:</emphasis>
47 Provides a more detailed look at the Yocto Project development
48 environment within the context of development.
49 </para></listitem>
50 <listitem><para><emphasis>
51 <link linkend='technical-details'>Technical Details</link>:</emphasis>
52 Describes fundamental Yocto Project components as well as an explanation
53 behind how the Yocto Project uses shared state (sstate) cache to speed build time.
54 </para></listitem>
55 <listitem><para><emphasis>
56 <link linkend='migration'>Migrating to a Newer Yocto Project Release</link>:</emphasis>
57 Describes release-specific information that helps you move from
58 one Yocto Project Release to another.
59 </para></listitem>
60 <listitem><para><emphasis>
61 <link linkend='ref-structure'>Directory Structure</link>:</emphasis>
62 Describes the
63 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> created
64 either by unpacking a released Yocto Project tarball on your host development system,
65 or by cloning the upstream
66 <ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink> Git repository.
67 </para></listitem>
68 <listitem><para><emphasis>
69 <link linkend='ref-classes'>Classes</link>:</emphasis>
70 Describes the classes used in the Yocto Project.</para></listitem>
71 <listitem><para><emphasis>
72 <link linkend='ref-images'>Images</link>:</emphasis>
73 Describes the standard images that the Yocto Project supports.
74 </para></listitem>
75 <listitem><para><emphasis>
76 <link linkend='ref-features'>Features</link>:</emphasis>
77 Describes mechanisms for creating distribution, machine, and image
78 features during the build process using the OpenEmbedded build system.</para></listitem>
79 <listitem><para><emphasis>
80 <link linkend='ref-variables-glos'>Variables Glossary</link>:</emphasis>
81 Presents most variables used by the OpenEmbedded build system, which
82 uses BitBake.
83 Entries describe the function of the variable and how to apply them.
84 </para></listitem>
85 <listitem><para><emphasis>
86 <link linkend='ref-varlocality'>Variable Context</link>:</emphasis>
87 Provides variable locality or context.</para></listitem>
88 <listitem><para><emphasis>
89 <link linkend='faq'>FAQ</link>:</emphasis>
90 Provides answers for commonly asked questions in the Yocto Project
91 development environment.</para></listitem>
92 <listitem><para><emphasis>
93 <link linkend='resources'>Contributing to the Yocto Project</link>:</emphasis>
94 Provides guidance on how you can contribute back to the Yocto
95 Project.</para></listitem>
96 </itemizedlist>
97 </para>
98</section>
99
100
101<section id='intro-requirements'>
102<title>System Requirements</title>
103 <para>
104 For general Yocto Project system requirements, see the
105 "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>What You Need and How You Get It</ulink>" section
106 in the Yocto Project Quick Start.
107 The remainder of this section provides details on system requirements
108 not covered in the Yocto Project Quick Start.
109 </para>
110
111 <section id='detailed-supported-distros'>
112 <title>Supported Linux Distributions</title>
113
114 <para>
115 Currently, the Yocto Project is supported on the following
116 distributions:
117 <note>
118 <para>
119 Yocto Project releases are tested against the stable Linux
120 distributions in the following list.
121 The Yocto Project should work on other distributions but
122 validation is not performed against them.
123 </para>
124
125 <para>
126 In particular, the Yocto Project does not support
127 and currently has no plans to support
128 rolling-releases or development distributions due to their
129 constantly changing nature.
130 We welcome patches and bug reports, but keep in mind that
131 our priority is on the supported platforms listed below.
132 </para>
133
134 <para>
135 If you encounter problems, please go to
136 <ulink url='&YOCTO_BUGZILLA_URL;'>Yocto Project Bugzilla</ulink>
137 and submit a bug.
138 We are interested in hearing about your experience.
139 </para>
140 </note>
141 <itemizedlist>
142<!-- <listitem><para>Ubuntu 10.04</para></listitem>
143 <listitem><para>Ubuntu 11.10</para></listitem> -->
144 <listitem><para>Ubuntu 12.04 (LTS)</para></listitem>
145 <listitem><para>Ubuntu 13.10</para></listitem>
146 <listitem><para>Ubuntu 14.04 (LTS)</para></listitem>
147<!-- <listitem><para>Fedora 16 (Verne)</para></listitem>
148 <listitem><para>Fedora 17 (Spherical)</para></listitem> -->
149 <listitem><para>Fedora release 19 (Schrödinger's Cat)</para></listitem>
150 <listitem><para>Fedora release 20 (Heisenbug)</para></listitem>
151<!-- <listitem><para>CentOS release 5.6 (Final)</para></listitem>
152 <listitem><para>CentOS release 5.7 (Final)</para></listitem>
153 <listitem><para>CentOS release 5.8 (Final)</para></listitem>
154 <listitem><para>CentOS release 6.3 (Final)</para></listitem> -->
155 <listitem><para>CentOS release 6.4</para></listitem>
156 <listitem><para>CentOS release 6.5</para></listitem>
157<!-- <listitem><para>Debian GNU/Linux 6.0 (Squeeze)</para></listitem> -->
158 <listitem><para>Debian GNU/Linux 7.0 (Wheezy)</para></listitem>
159 <listitem><para>Debian GNU/Linux 7.1 (Wheezy)</para></listitem>
160 <listitem><para>Debian GNU/Linux 7.2 (Wheezy)</para></listitem>
161 <listitem><para>Debian GNU/Linux 7.3 (Wheezy)</para></listitem>
162 <listitem><para>Debian GNU/Linux 7.4 (Wheezy)</para></listitem>
163<!-- <listitem><para>openSUSE 11.4</para></listitem>
164 <listitem><para>openSUSE 12.1</para></listitem> -->
165 <listitem><para>openSUSE 12.2</para></listitem>
166 <listitem><para>openSUSE 12.3</para></listitem>
167 <listitem><para>openSUSE 13.1</para></listitem>
168 </itemizedlist>
169 </para>
170
171 <note>
172 While the Yocto Project Team attempts to ensure all Yocto Project
173 releases are one hundred percent compatible with each officially
174 supported Linux distribution, instances might exist where you
175 encounter a problem while using the Yocto Project on a specific
176 distribution.
177 For example, the CentOS 6.4 distribution does not include the
178 Gtk+ 2.20.0 and PyGtk 2.21.0 (or higher) packages, which are
179 required to run
180 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink>.
181 </note>
182 </section>
183
184 <section id='required-packages-for-the-host-development-system'>
185 <title>Required Packages for the Host Development System</title>
186
187 <para>
188 The list of packages you need on the host development system can
189 be large when covering all build scenarios using the Yocto Project.
190 This section provides required packages according to
191 Linux distribution and function.
192 </para>
193
194 <section id='ubuntu-packages'>
195 <title>Ubuntu and Debian</title>
196
197 <para>
198 The following list shows the required packages by function
199 given a supported Ubuntu or Debian Linux distribution:
200 <itemizedlist>
201 <listitem><para><emphasis>Essentials:</emphasis>
202 Packages needed to build an image on a headless
203 system:
204 <literallayout class='monospaced'>
205 $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
206 </literallayout></para></listitem>
207 <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
208 Packages recommended if the host system has graphics
209 support or if you are going to use the Eclipse
210 IDE:
211 <literallayout class='monospaced'>
212 $ sudo apt-get install libsdl1.2-dev xterm
213 </literallayout></para></listitem>
214 <listitem><para><emphasis>Documentation:</emphasis>
215 Packages needed if you are going to build out the
216 Yocto Project documentation manuals:
217 <literallayout class='monospaced'>
218 $ sudo apt-get install make xsltproc docbook-utils fop dblatex xmlto
219 </literallayout></para></listitem>
220 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
221 Packages needed if you are going to be using the
222 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
223 <literallayout class='monospaced'>
224 $ sudo apt-get install autoconf automake libtool libglib2.0-dev
225 </literallayout></para></listitem>
226 </itemizedlist>
227 </para>
228 </section>
229
230 <section id='fedora-packages'>
231 <title>Fedora Packages</title>
232
233 <para>
234 The following list shows the required packages by function
235 given a supported Fedora Linux distribution:
236 <itemizedlist>
237 <listitem><para><emphasis>Essentials:</emphasis>
238 Packages needed to build an image for a headless
239 system:
240 <literallayout class='monospaced'>
241 $ sudo yum install &FEDORA_HOST_PACKAGES_ESSENTIAL;
242 </literallayout></para></listitem>
243 <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
244 Packages recommended if the host system has graphics
245 support or if you are going to use the Eclipse
246 IDE:
247 <literallayout class='monospaced'>
248 $ sudo yum install SDL-devel xterm perl-Thread-Queue
249 </literallayout></para></listitem>
250 <listitem><para><emphasis>Documentation:</emphasis>
251 Packages needed if you are going to build out the
252 Yocto Project documentation manuals:
253 <literallayout class='monospaced'>
254 $ sudo yum install make docbook-style-dsssl docbook-style-xsl \
255 docbook-dtds docbook-utils fop libxslt dblatex xmlto
256 </literallayout></para></listitem>
257 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
258 Packages needed if you are going to be using the
259 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
260 <literallayout class='monospaced'>
261 $ sudo yum install autoconf automake libtool glib2-devel
262 </literallayout></para></listitem>
263 </itemizedlist>
264 </para>
265 </section>
266
267 <section id='opensuse-packages'>
268 <title>openSUSE Packages</title>
269
270 <para>
271 The following list shows the required packages by function
272 given a supported openSUSE Linux distribution:
273 <itemizedlist>
274 <listitem><para><emphasis>Essentials:</emphasis>
275 Packages needed to build an image for a headless
276 system:
277 <literallayout class='monospaced'>
278 $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
279 </literallayout></para></listitem>
280 <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
281 Packages recommended if the host system has graphics
282 support or if you are going to use the Eclipse
283 IDE:
284 <literallayout class='monospaced'>
285 $ sudo zypper install libSDL-devel xterm
286 </literallayout></para></listitem>
287 <listitem><para><emphasis>Documentation:</emphasis>
288 Packages needed if you are going to build out the
289 Yocto Project documentation manuals:
290 <literallayout class='monospaced'>
291 $ sudo zypper install make fop xsltproc dblatex xmlto
292 </literallayout></para></listitem>
293 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
294 Packages needed if you are going to be using the
295 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
296 <literallayout class='monospaced'>
297 $ sudo zypper install autoconf automake libtool glib2-devel
298 </literallayout></para></listitem>
299 </itemizedlist>
300 </para>
301 </section>
302
303 <section id='centos-packages'>
304 <title>CentOS Packages</title>
305
306 <para>
307 The following list shows the required packages by function
308 given a supported CentOS Linux distribution:
309 <note>
310 For CentOS 6.x, some of the versions of the components
311 provided by the distribution are too old (e.g. Git, Python,
312 and tar).
313 It is recommended that you install the buildtools in order
314 to provide versions that will work with the OpenEmbedded
315 build system.
316 For information on how to install the buildtools tarball,
317 see the
318 "<link linkend='required-git-tar-and-python-versions'>Required Git, Tar, and Python Versions</link>"
319 section.
320 </note>
321 <itemizedlist>
322 <listitem><para><emphasis>Essentials:</emphasis>
323 Packages needed to build an image for a headless
324 system:
325 <literallayout class='monospaced'>
326 $ sudo yum install &CENTOS_HOST_PACKAGES_ESSENTIAL;
327 </literallayout></para></listitem>
328 <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
329 Packages recommended if the host system has graphics
330 support or if you are going to use the Eclipse
331 IDE:
332 <literallayout class='monospaced'>
333 $ sudo yum install SDL-devel xterm
334 </literallayout></para></listitem>
335 <listitem><para><emphasis>Documentation:</emphasis>
336 Packages needed if you are going to build out the
337 Yocto Project documentation manuals:
338 <literallayout class='monospaced'>
339 $ sudo yum install make docbook-style-dsssl docbook-style-xsl \
340 docbook-dtds docbook-utils fop libxslt dblatex xmlto
341 </literallayout></para></listitem>
342 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
343 Packages needed if you are going to be using the
344 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
345 <literallayout class='monospaced'>
346 $ sudo yum install autoconf automake libtool glib2-devel
347 </literallayout></para></listitem>
348 </itemizedlist>
349 </para>
350 </section>
351 </section>
352
353 <section id='required-git-tar-and-python-versions'>
354 <title>Required Git, tar, and Python Versions</title>
355
356 <para>
357 In order to use the build system, your host development system
358 must meet the following version requirements for Git, tar, and
359 Python:
360 <itemizedlist>
361 <listitem><para>Git 1.7.5 or greater</para></listitem>
362 <listitem><para>tar 1.24 or greater</para></listitem>
363 <listitem><para>Python 2.7.3 or greater not including
364 Python 3.x, which is not supported.</para></listitem>
365 </itemizedlist>
366 </para>
367
368 <para>
369 If your host development system does not meet all these requirements,
370 you can resolve this by installing a <filename>buildtools</filename>
371 tarball that contains these tools.
372 You can get the tarball one of two ways: download a pre-built
373 tarball or use BitBake to build the tarball.
374 </para>
375
376 <section id='downloading-a-pre-built-buildtools-tarball'>
377 <title>Downloading a Pre-Built <filename>buildtools</filename> Tarball</title>
378
379 <para>
380 Downloading and running a pre-built buildtools installer is
381 the easiest of the two methods by which you can get these tools:
382 <orderedlist>
383 <listitem><para>
384 Locate and download the <filename>*.sh</filename> at
385 <ulink url='&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;/buildtools/'></ulink>.
386 </para></listitem>
387 <listitem><para>
388 Execute the installation script.
389 Here is an example:
390 <literallayout class='monospaced'>
391 $ sh poky-eglibc-x86_64-buildtools-tarball-x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
392 </literallayout>
393 During execution, a prompt appears that allows you to
394 choose the installation directory.
395 For example, you could choose the following:
396 <literallayout class='monospaced'>
397 /home/your-username/buildtools
398 </literallayout>
399 </para></listitem>
400 <listitem><para>
401 Source the tools environment setup script by using a
402 command like the following:
403 <literallayout class='monospaced'>
404 $ source /home/your-username/buildtools/environment-setup-i586-poky-linux
405 </literallayout>
406 Of course, you need to supply your installation directory and be
407 sure to use the right file (i.e. i585 or x86-64).
408 </para>
409 <para>
410 After you have sourced the setup script,
411 the tools are added to <filename>PATH</filename>
412 and any other environment variables required to run the
413 tools are initialized.
414 The results are working versions versions of Git, tar,
415 Python and <filename>chrpath</filename>.
416 </para></listitem>
417 </orderedlist>
418 </para>
419 </section>
420
421 <section id='building-your-own-buildtools-tarball'>
422 <title>Building Your Own <filename>buildtools</filename> Tarball</title>
423
424 <para>
425 Building and running your own buildtools installer applies
426 only when you have a build host that can already run BitBake.
427 In this case, you use that machine to build the
428 <filename>.sh</filename> file and then
429 take steps to transfer and run it on a
430 machine that does not meet the minimal Git, tar, and Python
431 requirements.
432 </para>
433
434 <para>
435 Here are the steps to take to build and run your own
436 buildtools installer:
437 <orderedlist>
438 <listitem><para>
439 On the machine that is able to run BitBake,
440 be sure you have set up your build environment with
441 the setup script
442 (<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
443 or
444 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
445 </para></listitem>
446 <listitem><para>
447 Run the BitBake command to build the tarball:
448 <literallayout class='monospaced'>
449 $ bitbake buildtools-tarball
450 </literallayout>
451 <note>
452 The
453 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>
454 variable in your <filename>local.conf</filename> file
455 determines whether you build tools for a 32-bit
456 or 64-bit system.
457 </note>
458 Once the build completes, you can find the
459 <filename>.sh</filename> file that installs
460 the tools in the <filename>tmp/deploy/sdk</filename>
461 subdirectory of the
462 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
463 The installer file has the string "buildtools"
464 in the name.
465 </para></listitem>
466 <listitem><para>
467 Transfer the <filename>.sh</filename> file from the
468 build host to the machine that does not meet the
469 Git, tar, or Python requirements.
470 </para></listitem>
471 <listitem><para>
472 On the machine that does not meet the requirements,
473 run the <filename>.sh</filename> file
474 to install the tools.
475 Here is an example:
476 <literallayout class='monospaced'>
477 $ sh poky-eglibc-x86_64-buildtools-tarball-x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
478 </literallayout>
479 During execution, a prompt appears that allows you to
480 choose the installation directory.
481 For example, you could choose the following:
482 <literallayout class='monospaced'>
483 /home/your-username/buildtools
484 </literallayout>
485 </para></listitem>
486 <listitem><para>
487 Source the tools environment setup script by using a
488 command like the following:
489 <literallayout class='monospaced'>
490 $ source /home/your-username/buildtools/environment-setup-i586-poky-linux
491 </literallayout>
492 Of course, you need to supply your installation directory and be
493 sure to use the right file (i.e. i585 or x86-64).
494 </para>
495 <para>
496 After you have sourced the setup script,
497 the tools are added to <filename>PATH</filename>
498 and any other environment variables required to run the
499 tools are initialized.
500 The results are working versions versions of Git, tar,
501 Python and <filename>chrpath</filename>.
502 </para></listitem>
503 </orderedlist>
504 </para>
505 </section>
506 </section>
507</section>
508
509<section id='intro-getit'>
510 <title>Obtaining the Yocto Project</title>
511 <para>
512 The Yocto Project development team makes the Yocto Project available through a number
513 of methods:
514 <itemizedlist>
515 <listitem><para><emphasis>Source Repositories:</emphasis>
516 Working from a copy of the upstream
517 <filename>poky</filename> repository is the
518 preferred method for obtaining and using a Yocto Project
519 release.
520 You can view the Yocto Project Source Repositories at
521 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
522 In particular, you can find the
523 <filename>poky</filename> repository at
524 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/'></ulink>.
525 </para></listitem>
526 <listitem><para><emphasis>Releases:</emphasis> Stable, tested
527 releases are available as tarballs through
528 <ulink url='&YOCTO_DL_URL;/releases/yocto/'/>.</para></listitem>
529 <listitem><para><emphasis>Nightly Builds:</emphasis> These
530 tarball releases are available at
531 <ulink url='http://autobuilder.yoctoproject.org/nightly'/>.
532 These builds include Yocto Project releases, meta-toolchain
533 tarball installation scripts, and experimental builds.
534 </para></listitem>
535 <listitem><para><emphasis>Yocto Project Website:</emphasis> You can
536 find tarball releases of the Yocto Project and supported BSPs
537 at the
538 <ulink url='&YOCTO_HOME_URL;'>Yocto Project website</ulink>.
539 Along with these downloads, you can find lots of other
540 information at this site.
541 </para></listitem>
542 </itemizedlist>
543 </para>
544</section>
545
546<section id='intro-getit-dev'>
547 <title>Development Checkouts</title>
548 <para>
549 Development using the Yocto Project requires a local
550 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
551 You can set up the Source Directory by cloning a copy of the upstream
552 <ulink url='&YOCTO_DOCS_DEV_URL;#poky'>poky</ulink> Git repository.
553 For information on how to do this, see the
554 "<ulink url='&YOCTO_DOCS_DEV_URL;#getting-setup'>Getting Set Up</ulink>"
555 section in the Yocto Project Development Manual.
556 </para>
557</section>
558
559</chapter>
560<!--
561vim: expandtab tw=80 ts=4
562-->
diff --git a/documentation/ref-manual/migration.xml b/documentation/ref-manual/migration.xml
new file mode 100644
index 0000000000..21fa59a61d
--- /dev/null
+++ b/documentation/ref-manual/migration.xml
@@ -0,0 +1,1630 @@
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
5<chapter id='migration'>
6<title>Migrating to a Newer Yocto Project Release</title>
7
8 <para>
9 This chapter provides information you can use to migrate work to a
10 newer Yocto Project release. You can find the same information in the
11 release notes for a given release.
12 </para>
13
14<section id='moving-to-the-yocto-project-1.3-release'>
15 <title>Moving to the Yocto Project 1.3 Release</title>
16
17 <para>
18 This section provides migration information for moving to the
19 Yocto Project 1.3 Release from the prior release.
20 </para>
21
22 <section id='1.3-local-configuration'>
23 <title>Local Configuration</title>
24
25 <para>
26 Differences include changes for
27 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
28 and <filename>bblayers.conf</filename>.
29 </para>
30
31 <section id='migration-1.3-sstate-mirrors'>
32 <title>SSTATE_MIRRORS</title>
33
34 <para>
35 The shared state cache (sstate-cache), as pointed to by
36 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>, by default
37 now has two-character subdirectories to prevent issues arising
38 from too many files in the same directory.
39 Also, native sstate-cache packages will go into a subdirectory named using
40 the distro ID string.
41 If you copy the newly structured sstate-cache to a mirror location
42 (either local or remote) and then point to it in
43 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>,
44 you need to append "PATH" to the end of the mirror URL so that
45 the path used by BitBake before the mirror substitution is
46 appended to the path used to access the mirror.
47 Here is an example:
48 <literallayout class='monospaced'>
49 SSTATE_MIRRORS = "file://.* http://someserver.tld/share/sstate/PATH"
50 </literallayout>
51 </para>
52 </section>
53
54 <section id='migration-1.3-bblayers-conf'>
55 <title>bblayers.conf</title>
56
57 <para>
58 The <filename>meta-yocto</filename> layer consists of two parts
59 that correspond to the Poky reference distribution and the
60 reference hardware Board Support Packages (BSPs), respectively:
61 <filename>meta-yocto</filename> and
62 <filename>meta-yocto-bsp</filename>.
63 When running BitBake or Hob for the first time after upgrading,
64 your <filename>conf/bblayers.conf</filename> file will be
65 updated to handle this change and you will be asked to
66 re-run or restart for the changes to take effect.
67 </para>
68 </section>
69 </section>
70
71 <section id='1.3-recipes'>
72 <title>Recipes</title>
73
74 <para>
75 Differences include changes for the following:
76 <itemizedlist>
77 <listitem><para>Python function whitespace</para></listitem>
78 <listitem><para><filename>proto=</filename> in <filename>SRC_URI</filename></para></listitem>
79 <listitem><para><filename>nativesdk</filename></para></listitem>
80 <listitem><para>Task recipes</para></listitem>
81 <listitem><para><filename>IMAGE_FEATURES</filename></para></listitem>
82 <listitem><para>Removed recipes</para></listitem>
83 </itemizedlist>
84 </para>
85
86 <section id='migration-1.3-python-function-whitespace'>
87 <title>Python Function Whitespace</title>
88
89 <para>
90 All Python functions must now use four spaces for indentation.
91 Previously, an inconsistent mix of spaces and tabs existed,
92 which made extending these functions using
93 <filename>_append</filename> or <filename>_prepend</filename>
94 complicated given that Python treats whitespace as
95 syntactically significant.
96 If you are defining or extending any Python functions (e.g.
97 <filename>populate_packages</filename>, <filename>do_unpack</filename>,
98 <filename>do_patch</filename> and so forth) in custom recipes
99 or classes, you need to ensure you are using consistent
100 four-space indentation.
101 </para>
102 </section>
103
104 <section id='migration-1.3-proto=-in-src-uri'>
105 <title>proto= in SRC_URI</title>
106
107 <para>
108 Any use of <filename>proto=</filename> in
109 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
110 needs to be changed to <filename>protocol=</filename>.
111 In particular, this applies to the following URIs:
112 <itemizedlist>
113 <listitem><para><filename>svn://</filename></para></listitem>
114 <listitem><para><filename>bzr://</filename></para></listitem>
115 <listitem><para><filename>hg://</filename></para></listitem>
116 <listitem><para><filename>osc://</filename></para></listitem>
117 </itemizedlist>
118 Other URIs were already using <filename>protocol=</filename>.
119 This change improves consistency.
120 </para>
121 </section>
122
123 <section id='migration-1.3-nativesdk'>
124 <title>nativesdk</title>
125
126 <para>
127 The suffix <filename>nativesdk</filename> is now implemented
128 as a prefix, which simplifies a lot of the packaging code for
129 <filename>nativesdk</filename> recipes.
130 All custom <filename>nativesdk</filename> recipes and any
131 references need to be updated to use
132 <filename>nativesdk-*</filename> instead of
133 <filename>*-nativesdk</filename>.
134 </para>
135 </section>
136
137 <section id='migration-1.3-task-recipes'>
138 <title>Task Recipes</title>
139
140 <para>
141 "Task" recipes are now known as "Package groups" and have
142 been renamed from <filename>task-*.bb</filename> to
143 <filename>packagegroup-*.bb</filename>.
144 Existing references to the previous <filename>task-*</filename>
145 names should work in most cases as there is an automatic
146 upgrade path for most packages.
147 However, you should update references in your own recipes and
148 configurations as they could be removed in future releases.
149 You should also rename any custom <filename>task-*</filename>
150 recipes to <filename>packagegroup-*</filename>, and change
151 them to inherit <filename>packagegroup</filename> instead of
152 <filename>task</filename>, as well as taking the opportunity
153 to remove anything now handled by
154 <filename>packagegroup.bbclass</filename>, such as providing
155 <filename>-dev</filename> and <filename>-dbg</filename>
156 packages, setting
157 <link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>,
158 and so forth.
159 See the
160 "<link linkend='ref-classes-packagegroup'><filename>packagegroup.bbclass</filename></link>"
161 section for further details.
162 </para>
163 </section>
164
165 <section id='migration-1.3-image-features'>
166 <title>IMAGE_FEATURES</title>
167
168 <para>
169 Image recipes that previously included "apps-console-core"
170 in <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
171 should now include "splash" instead to enable the boot-up
172 splash screen.
173 Retaining "apps-console-core" will still include the splash
174 screen but generates a warning.
175 The "apps-x11-core" and "apps-x11-games"
176 <filename>IMAGE_FEATURES</filename> features have been removed.
177 </para>
178 </section>
179
180 <section id='migration-1.3-removed-recipes'>
181 <title>Removed Recipes</title>
182
183 <para>
184 The following recipes have been removed.
185 For most of them, it is unlikely that you would have any
186 references to them in your own
187 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>.
188 However, you should check your metadata against this list to be sure:
189 <itemizedlist>
190 <listitem><para><emphasis><filename>libx11-trim</filename></emphasis>:
191 Replaced by <filename>libx11</filename>, which has a negligible
192 size difference with modern Xorg.</para></listitem>
193 <listitem><para><emphasis><filename>xserver-xorg-lite</filename></emphasis>:
194 Use <filename>xserver-xorg</filename>, which has a negligible
195 size difference when DRI and GLX modules are not installed.</para></listitem>
196 <listitem><para><emphasis><filename>xserver-kdrive</filename></emphasis>:
197 Effectively unmaintained for many years.</para></listitem>
198 <listitem><para><emphasis><filename>mesa-xlib</filename></emphasis>:
199 No longer serves any purpose.</para></listitem>
200 <listitem><para><emphasis><filename>galago</filename></emphasis>:
201 Replaced by telepathy.</para></listitem>
202 <listitem><para><emphasis><filename>gail</filename></emphasis>:
203 Functionality was integrated into GTK+ 2.13.</para></listitem>
204 <listitem><para><emphasis><filename>eggdbus</filename></emphasis>:
205 No longer needed.</para></listitem>
206 <listitem><para><emphasis><filename>gcc-*-intermediate</filename></emphasis>:
207 The build has been restructured to avoid the need for
208 this step.</para></listitem>
209 <listitem><para><emphasis><filename>libgsmd</filename></emphasis>:
210 Unmaintained for many years.
211 Functionality now provided by
212 <filename>ofono</filename> instead.</para></listitem>
213 <listitem><para><emphasis>contacts, dates, tasks, eds-tools</emphasis>:
214 Largely unmaintained PIM application suite.
215 It has been moved to <filename>meta-gnome</filename>
216 in <filename>meta-openembedded</filename>.</para></listitem>
217 </itemizedlist>
218 In addition to the previously listed changes, the
219 <filename>meta-demoapps</filename> directory has also been removed
220 because the recipes in it were not being maintained and many
221 had become obsolete or broken.
222 Additionally, these recipes were not parsed in the default configuration.
223 Many of these recipes are already provided in an updated and
224 maintained form within the OpenEmbedded community layers such as
225 <filename>meta-oe</filename> and <filename>meta-gnome</filename>.
226 For the remainder, you can now find them in the
227 <filename>meta-extras</filename> repository, which is in the
228 Yocto Project
229 <ulink url='&YOCTO_DOCS_DEV_URL;#source-repositories'>Source Repositories</ulink>.
230 </para>
231 </section>
232 </section>
233
234 <section id='1.3-linux-kernel-naming'>
235 <title>Linux Kernel Naming</title>
236
237 <para>
238 The naming scheme for kernel output binaries has been changed to
239 now include
240 <link linkend='var-PE'><filename>PE</filename></link> as part of the
241 filename:
242 <literallayout class='monospaced'>
243 KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
244 </literallayout>
245 </para>
246
247 <para>
248 Because the <filename>PE</filename> variable is not set by default,
249 these binary files could result with names that include two dash
250 characters.
251 Here is an example:
252 <literallayout class='monospaced'>
253 bzImage--3.10.9+git0+cd502a8814_7144bcc4b8-r0-qemux86-64-20130830085431.bin
254 </literallayout>
255 </para>
256 </section>
257</section>
258
259<section id='moving-to-the-yocto-project-1.4-release'>
260 <title>Moving to the Yocto Project 1.4 Release</title>
261
262 <para>
263 This section provides migration information for moving to the
264 Yocto Project 1.4 Release from the prior release.
265 </para>
266
267 <section id='migration-1.4-bitbake'>
268 <title>BitBake</title>
269
270 <para>
271 Differences include the following:
272 <itemizedlist>
273 <listitem><para><emphasis>Comment Continuation:</emphasis>
274 If a comment ends with a line continuation (\) character,
275 then the next line must also be a comment.
276 Any instance where this is not the case, now triggers
277 a warning.
278 You must either remove the continuation character, or be
279 sure the next line is a comment.
280 </para></listitem>
281 <listitem><para><emphasis>Package Name Overrides:</emphasis>
282 The runtime package specific variables
283 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
284 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
285 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
286 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
287 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>,
288 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
289 <link linkend='var-FILES'><filename>FILES</filename></link>,
290 <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>,
291 and the pre, post, install, and uninstall script functions
292 <filename>pkg_preinst</filename>,
293 <filename>pkg_postinst</filename>,
294 <filename>pkg_prerm</filename>, and
295 <filename>pkg_postrm</filename> should always have a
296 package name override.
297 For example, use <filename>RDEPENDS_${PN}</filename> for
298 the main package instead of <filename>RDEPENDS</filename>.
299 BitBake uses more strict checks when it parses recipes.
300 </para></listitem>
301 </itemizedlist>
302 </para>
303 </section>
304
305 <section id='migration-1.4-build-behavior'>
306 <title>Build Behavior</title>
307
308 <para>
309 Differences include the following:
310 <itemizedlist>
311 <listitem><para><emphasis>Shared State Code:</emphasis>
312 The shared state code has been optimized to avoid running
313 unnecessary tasks.
314 For example,
315 <filename>bitbake -c rootfs some-image</filename> from
316 shared state no longer populates the target sysroot
317 since that is not necessary.
318 Instead, the system just needs to extract the output
319 package contents, re-create the packages, and construct
320 the root filesystem.
321 This change is unlikely to cause any problems unless
322 you have missing declared dependencies.
323 </para></listitem>
324 <listitem><para><emphasis>Scanning Directory Names:</emphasis>
325 When scanning for files in
326 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>,
327 the build system now uses
328 <link linkend='var-FILESOVERRIDES'><filename>FILESOVERRIDES</filename></link>
329 instead of <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
330 for the directory names.
331 In general, the values previously in
332 <filename>OVERRIDES</filename> are now in
333 <filename>FILESOVERRIDES</filename> as well.
334 However, if you relied upon an additional value
335 you previously added to <filename>OVERRIDES</filename>,
336 you might now need to add it to
337 <filename>FILESOVERRIDES</filename> unless you are already
338 adding it through the
339 <link linkend='var-MACHINEOVERRIDES'><filename>MACHINEOVERRIDES</filename></link>
340 or <link linkend='var-DISTROOVERRIDES'><filename>DISTROOVERRIDES</filename></link>
341 variables, as appropriate.
342 For more related changes, see the
343 "<link linkend='migration-1.4-variables'>Variables</link>"
344 section.
345 </para></listitem>
346 </itemizedlist>
347 </para>
348 </section>
349
350
351 <section id='migration-1.4-proxies-and-fetching-source'>
352 <title>Proxies and Fetching Source</title>
353
354 <para>
355 A new <filename>oe-git-proxy</filename> script has been added to
356 replace previous methods of handling proxies and fetching source
357 from Git.
358 See the <filename>meta-yocto/conf/site.conf.sample</filename> file
359 for information on how to use this script.
360 </para>
361 </section>
362
363 <section id='migration-1.4-custom-interfaces-file-netbase-change'>
364 <title>Custom Interfaces File (netbase change)</title>
365
366 <para>
367 If you have created your own custom
368 <filename>etc/network/interfaces</filename> file by creating
369 an append file for the <filename>netbase</filename> recipe,
370 you now need to create an append file for the
371 <filename>init-ifupdown</filename> recipe instead, which you can
372 find in the
373 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
374 at <filename>meta/recipes-core/init-ifupdown</filename>.
375 For information on how to use append files, see the
376 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files</ulink>"
377 in the Yocto Project Development Manual.
378 </para>
379 </section>
380
381 <section id='migration-1.4-remote-debugging'>
382 <title>Remote Debugging</title>
383
384 <para>
385 Support for remote debugging with the Eclipse IDE is now
386 separated into an image feature
387 (<filename>eclipse-debug</filename>) that corresponds to the
388 <filename>packagegroup-core-eclipse-debug</filename> package group.
389 Previously, the debugging feature was included through the
390 <filename>tools-debug</filename> image feature, which corresponds
391 to the <filename>packagegroup-core-tools-debug</filename>
392 package group.
393 </para>
394 </section>
395
396 <section id='migration-1.4-variables'>
397 <title>Variables</title>
398
399 <para>
400 The following variables have changed:
401 <itemizedlist>
402 <listitem><para><emphasis><filename>SANITY_TESTED_DISTROS</filename>:</emphasis>
403 This variable now uses a distribution ID, which is composed
404 of the host distributor ID followed by the release.
405 Previously,
406 <link linkend='var-SANITY_TESTED_DISTROS'><filename>SANITY_TESTED_DISTROS</filename></link>
407 was composed of the description field.
408 For example, "Ubuntu 12.10" becomes "Ubuntu-12.10".
409 You do not need to worry about this change if you are not
410 specifically setting this variable, or if you are
411 specifically setting it to "".
412 </para></listitem>
413 <listitem><para><emphasis><filename>SRC_URI</filename>:</emphasis>
414 The <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>,
415 <filename>${</filename><link linkend='var-PF'><filename>PF</filename></link><filename>}</filename>,
416 <filename>${</filename><link linkend='var-P'><filename>P</filename></link><filename>}</filename>,
417 and <filename>FILE_DIRNAME</filename> directories have been
418 dropped from the default value of the
419 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
420 variable, which is used as the search path for finding files
421 referred to in
422 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>.
423 If you have a recipe that relied upon these directories,
424 which would be unusual, then you will need to add the
425 appropriate paths within the recipe or, alternatively,
426 rearrange the files.
427 The most common locations are still covered by
428 <filename>${BP}</filename>, <filename>${BPN}</filename>,
429 and "files", which all remain in the default value of
430 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>.
431 </para></listitem>
432 </itemizedlist>
433 </para>
434 </section>
435
436 <section id='migration-target-package-management-with-rpm'>
437 <title>Target Package Management with RPM</title>
438
439 <para>
440 If runtime package management is enabled and the RPM backend
441 is selected, Smart is now installed for package download, dependency
442 resolution, and upgrades instead of Zypper.
443 For more information on how to use Smart, run the following command
444 on the target:
445 <literallayout class='monospaced'>
446 smart --help
447 </literallayout>
448 </para>
449 </section>
450
451 <section id='migration-1.4-recipes-moved'>
452 <title>Recipes Moved</title>
453
454 <para>
455 The following recipes were moved from their previous locations
456 because they are no longer used by anything in
457 the OpenEmbedded-Core:
458 <itemizedlist>
459 <listitem><para><emphasis><filename>clutter-box2d</filename>:</emphasis>
460 Now resides in the <filename>meta-oe</filename> layer.
461 </para></listitem>
462 <listitem><para><emphasis><filename>evolution-data-server</filename>:</emphasis>
463 Now resides in the <filename>meta-gnome</filename> layer.
464 </para></listitem>
465 <listitem><para><emphasis><filename>gthumb</filename>:</emphasis>
466 Now resides in the <filename>meta-gnome</filename> layer.
467 </para></listitem>
468 <listitem><para><emphasis><filename>gtkhtml2</filename>:</emphasis>
469 Now resides in the <filename>meta-oe</filename> layer.
470 </para></listitem>
471 <listitem><para><emphasis><filename>gupnp</filename>:</emphasis>
472 Now resides in the <filename>meta-multimedia</filename> layer.
473 </para></listitem>
474 <listitem><para><emphasis><filename>gypsy</filename>:</emphasis>
475 Now resides in the <filename>meta-oe</filename> layer.
476 </para></listitem>
477 <listitem><para><emphasis><filename>libcanberra</filename>:</emphasis>
478 Now resides in the <filename>meta-gnome</filename> layer.
479 </para></listitem>
480 <listitem><para><emphasis><filename>libgdata</filename>:</emphasis>
481 Now resides in the <filename>meta-gnome</filename> layer.
482 </para></listitem>
483 <listitem><para><emphasis><filename>libmusicbrainz</filename>:</emphasis>
484 Now resides in the <filename>meta-multimedia</filename> layer.
485 </para></listitem>
486 <listitem><para><emphasis><filename>metacity</filename>:</emphasis>
487 Now resides in the <filename>meta-gnome</filename> layer.
488 </para></listitem>
489 <listitem><para><emphasis><filename>polkit</filename>:</emphasis>
490 Now resides in the <filename>meta-oe</filename> layer.
491 </para></listitem>
492 <listitem><para><emphasis><filename>zeroconf</filename>:</emphasis>
493 Now resides in the <filename>meta-networking</filename> layer.
494 </para></listitem>
495 </itemizedlist>
496 </para>
497 </section>
498
499 <section id='migration-1.4-removals-and-renames'>
500 <title>Removals and Renames</title>
501
502 <para>
503 The following list shows what has been removed or renamed:
504 <itemizedlist>
505 <listitem><para><emphasis><filename>evieext</filename>:</emphasis>
506 Removed because it has been removed from
507 <filename>xserver</filename> since 2008.
508 </para></listitem>
509 <listitem><para><emphasis>Gtk+ DirectFB:</emphasis>
510 Removed support because upstream Gtk+ no longer supports it
511 as of version 2.18.
512 </para></listitem>
513 <listitem><para><emphasis><filename>libxfontcache / xfontcacheproto</filename>:</emphasis>
514 Removed because they were removed from the Xorg server in 2008.
515 </para></listitem>
516 <listitem><para><emphasis><filename>libxp / libxprintapputil / libxprintutil / printproto</filename>:</emphasis>
517 Removed because the XPrint server was removed from
518 Xorg in 2008.
519 </para></listitem>
520 <listitem><para><emphasis><filename>libxtrap / xtrapproto</filename>:</emphasis>
521 Removed because their functionality was broken upstream.
522 </para></listitem>
523 <listitem><para><emphasis>linux-yocto 3.0 kernel:</emphasis>
524 Removed with linux-yocto 3.8 kernel being added.
525 The linux-yocto 3.2 and linux-yocto 3.4 kernels remain
526 as part of the release.
527 </para></listitem>
528 <listitem><para><emphasis><filename>lsbsetup</filename>:</emphasis>
529 Removed with functionality now provided by
530 <filename>lsbtest</filename>.
531 </para></listitem>
532 <listitem><para><emphasis><filename>matchbox-stroke</filename>:</emphasis>
533 Removed because it was never more than a proof-of-concept.
534 </para></listitem>
535 <listitem><para><emphasis><filename>matchbox-wm-2 / matchbox-theme-sato-2</filename>:</emphasis>
536 Removed because they are not maintained.
537 However, <filename>matchbox-wm</filename> and
538 <filename>matchbox-theme-sato</filename> are still
539 provided.
540 </para></listitem>
541 <listitem><para><emphasis><filename>mesa-dri</filename>:</emphasis>
542 Renamed to <filename>mesa</filename>.
543 </para></listitem>
544 <listitem><para><emphasis><filename>mesa-xlib</filename>:</emphasis>
545 Removed because it was no longer useful.
546 </para></listitem>
547 <listitem><para><emphasis><filename>mutter</filename>:</emphasis>
548 Removed because nothing ever uses it and the recipe is
549 very old.
550 </para></listitem>
551 <listitem><para><emphasis><filename>orinoco-conf</filename>:</emphasis>
552 Removed because it has become obsolete.
553 </para></listitem>
554 <listitem><para><emphasis><filename>update-modules</filename>:</emphasis>
555 Removed because it is no longer used.
556 The kernel module <filename>postinstall</filename> and
557 <filename>postrm</filename> scripts can now do the same
558 task without the use of this script.
559 </para></listitem>
560 <listitem><para><emphasis><filename>web</filename>:</emphasis>
561 Removed because it is not maintained. Superseded by
562 <filename>web-webkit</filename>.
563 </para></listitem>
564 <listitem><para><emphasis><filename>xf86bigfontproto</filename>:</emphasis>
565 Removed because upstream it has been disabled by default
566 since 2007.
567 Nothing uses <filename>xf86bigfontproto</filename>.
568 </para></listitem>
569 <listitem><para><emphasis><filename>xf86rushproto</filename>:</emphasis>
570 Removed because its dependency in
571 <filename>xserver</filename> was spurious and it was
572 removed in 2005.
573 </para></listitem>
574 <listitem><para><emphasis><filename>zypper / libzypp / sat-solver</filename>:</emphasis>
575 Removed and been functionally replaced with Smart
576 (<filename>python-smartpm</filename>) when RPM packaging
577 is used and package management is enabled on the target.
578 </para></listitem>
579 </itemizedlist>
580 </para>
581 </section>
582</section>
583
584<section id='moving-to-the-yocto-project-1.5-release'>
585 <title>Moving to the Yocto Project 1.5 Release</title>
586
587 <para>
588 This section provides migration information for moving to the
589 Yocto Project 1.5 Release from the prior release.
590 </para>
591
592 <section id='migration-1.5-host-dependency-changes'>
593 <title>Host Dependency Changes</title>
594
595 <para>
596 The OpenEmbedded build system now has some additional requirements
597 on the host system:
598 <itemizedlist>
599 <listitem><para>Python 2.7.3+</para></listitem>
600 <listitem><para>Tar 1.24+</para></listitem>
601 <listitem><para>Git 1.7.5+</para></listitem>
602 <listitem><para>Patched version of Make if you are using
603 3.82.
604 Most distributions that provide Make 3.82 use the patched
605 version.</para></listitem>
606 </itemizedlist>
607 If the Linux distribution you are using on your build host
608 does not provide packages for these, you can install and use
609 the Buildtools tarball, which provides an SDK-like environment
610 containing them.
611 </para>
612
613 <para>
614 For more information on this requirement, see the
615 "<link linkend='required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</link>"
616 section.
617 </para>
618 </section>
619
620 <section id='migration-1.5-atom-pc-bsp'>
621 <title><filename>atom-pc</filename> Board Support Package (BSP)</title>
622
623 <para>
624 The <filename>atom-pc</filename> hardware reference BSP has been
625 replaced by a <filename>genericx86</filename> BSP.
626 This BSP is not necessarily guaranteed to work on all x86
627 hardware, but it will run on a wider range of systems than the
628 <filename>atom-pc</filename> did.
629 <note>
630 Additionally, a <filename>genericx86-64</filename> BSP has
631 been added for 64-bit Atom systems.
632 </note>
633 </para>
634 </section>
635
636 <section id='migration-1.5-bitbake'>
637 <title>BitBake</title>
638
639 <para>
640 The following changes have been made that relate to BitBake:
641 <itemizedlist>
642 <listitem><para>
643 BitBake now supports a <filename>_remove</filename>
644 operator.
645 The addition of this operator means you will have to
646 rename any items in recipe space (functions, variables)
647 whose names currently contain
648 <filename>_remove_</filename> or end with
649 <filename>_remove</filename> to avoid unexpected behavior.
650 </para></listitem>
651 <listitem><para>
652 BitBake's global method pool has been removed.
653 This method is not particularly useful and led to clashes
654 between recipes containing functions that had the
655 same name.</para></listitem>
656 <listitem><para>
657 The "none" server backend has been removed.
658 The "process" server backend has been serving well as the
659 default for a long time now.</para></listitem>
660 <listitem><para>
661 The <filename>bitbake-runtask</filename> script has been
662 removed.</para></listitem>
663 <listitem><para>
664 <filename>${</filename><link linkend='var-P'><filename>P</filename></link><filename>}</filename>
665 and
666 <filename>${</filename><link linkend='var-PF'><filename>PF</filename></link><filename>}</filename>
667 are no longer added to
668 <link linkend='var-PROVIDES'><filename>PROVIDES</filename></link>
669 by default in <filename>bitbake.conf</filename>.
670 These version-specific <filename>PROVIDES</filename>
671 items were seldom used.
672 Attempting to use them could result in two versions being
673 built simultaneously rather than just one version due to
674 the way BitBake resolves dependencies.</para></listitem>
675 </itemizedlist>
676 </para>
677 </section>
678
679 <section id='migration-1.5-qa-warnings'>
680 <title>QA Warnings</title>
681
682 <para>
683 The following changes have been made to the package QA checks:
684 <itemizedlist>
685 <listitem><para>
686 If you have customized
687 <link linkend='var-ERROR_QA'><filename>ERROR_QA</filename></link>
688 or <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link>
689 values in your configuration, check that they contain all of
690 the issues that you wish to be reported.
691 Previous Yocto Project versions contained a bug that meant
692 that any item not mentioned in <filename>ERROR_QA</filename>
693 or <filename>WARN_QA</filename> would be treated as a
694 warning.
695 Consequently, several important items were not already in
696 the default value of <filename>WARN_QA</filename>.
697 All of the possible QA checks are now documented in the
698 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
699 section.</para></listitem>
700 <listitem><para>
701 An additional QA check has been added to check if
702 <filename>/usr/share/info/dir</filename> is being installed.
703 Your recipe should delete this file within
704 <filename>do_install</filename> if "make install" is
705 installing it.</para></listitem>
706 <listitem><para>
707 If you are using the buildhistory class, the check for the
708 package version going backwards is now controlled using a
709 standard QA check.
710 Thus, if you have customized your
711 <filename>ERROR_QA</filename> or
712 <filename>WARN_QA</filename> values and still wish to have
713 this check performed, you should add
714 "version-going-backwards" to your value for one or the
715 other variables depending on how you wish it to be handled.
716 See the documented QA checks in the
717 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
718 section.
719 </para></listitem>
720 </itemizedlist>
721 </para>
722 </section>
723
724 <section id='migration-1.5-directory-layout-changes'>
725 <title>Directory Layout Changes</title>
726
727 <para>
728 The following directory changes exist:
729 <itemizedlist>
730 <listitem><para>
731 Output SDK installer files are now named to include the
732 image name and tuning architecture through the
733 <link linkend='var-SDK_NAME'><filename>SDK_NAME</filename></link>
734 variable.</para></listitem>
735 <listitem><para>
736 Images and related files are now installed into a directory
737 that is specific to the machine, instead of a parent
738 directory containing output files for multiple machines.
739 The
740 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
741 variable continues to point to the directory containing
742 images for the current
743 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
744 and should be used anywhere there is a need to refer to
745 this directory.
746 The <filename>runqemu</filename> script now uses this
747 variable to find images and kernel binaries and will use
748 BitBake to determine the directory.
749 Alternatively, you can set the
750 <filename>DEPLOY_DIR_IMAGE</filename> variable in the
751 external environment.</para></listitem>
752 <listitem><para>
753 When buildhistory is enabled, its output is now written
754 under the
755 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
756 rather than
757 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>.
758 Doing so makes it easier to delete
759 <filename>TMPDIR</filename> and preserve the build history.
760 Additionally, data for produced SDKs is now split by
761 <link linkend='var-IMAGE_NAME'><filename>IMAGE_NAME</filename></link>.
762 </para></listitem>
763 <listitem><para>
764 The <filename>pkgdata</filename> directory produced as
765 part of the packaging process has been collapsed into a
766 single machine-specific directory.
767 This directory is located under
768 <filename>sysroots</filename> and uses a machine-specific
769 name (i.e.
770 <filename>tmp/sysroots/&lt;machine&gt;/pkgdata</filename>).
771 </para></listitem>
772 </itemizedlist>
773 </para>
774 </section>
775
776 <section id='migration-1.5-shortened-git-srcrev-values'>
777 <title>Shortened Git <filename>SRCREV</filename> Values</title>
778
779 <para>
780 BitBake will now shorten revisions from Git repositories from the
781 normal 40 characters down to 10 characters within
782 <link linkend='var-SRCPV'><filename>SRCPV</filename></link>
783 for improved usability in path and file names.
784 This change should be safe within contexts where these revisions
785 are used because the chances of spatially close collisions
786 is very low.
787 Distant collisions are not a major issue in the way
788 the values are used.
789 </para>
790 </section>
791
792 <section id='migration-1.5-image-features'>
793 <title><filename>IMAGE_FEATURES</filename></title>
794
795 <para>
796 The following changes have been made that relate to
797 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>:
798 <itemizedlist>
799 <listitem><para>
800 The value of
801 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
802 is now validated to ensure invalid feature items are not
803 added.
804 Some users mistakenly add package names to this variable
805 instead of using
806 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>
807 in order to have the package added to the image, which does
808 not work.
809 This change is intended to catch those kinds of situations.
810 Valid <filename>IMAGE_FEATURES</filename> are drawn from
811 <link linkend='var-PACKAGE_GROUP'><filename>PACKAGE_GROUP</filename></link>
812 definitions,
813 <link linkend='var-COMPLEMENTARY_GLOB'><filename>COMPLEMENTARY_GLOB</filename></link>
814 and a new "validitems" varflag on
815 <filename>IMAGE_FEATURES</filename>.
816 The "validitems" varflag change allows additional features
817 to be added if they are not provided using the previous
818 two mechanisms.
819 </para></listitem>
820 <listitem><para>
821 The previously deprecated "apps-console-core"
822 <filename>IMAGE_FEATURES</filename> item is no longer
823 supported.
824 Add "splash" to <filename>IMAGE_FEATURES</filename> if you
825 wish to have the splash screen enabled, since this is
826 all that apps-console-core was doing.</para></listitem>
827 </itemizedlist>
828 </para>
829 </section>
830
831 <section id='migration-1.5-run'>
832 <title><filename>/run</filename></title>
833
834 <para>
835 The <filename>/run</filename> directory from the Filesystem
836 Hierarchy Standard 3.0 has been introduced.
837 You can find some of the implications for this change
838 <ulink url='http://cgit.openembedded.org/openembedded-core/commit/?id=0e326280a15b0f2c4ef2ef4ec441f63f55b75873'>here</ulink>.
839 The change also means that recipes that install files to
840 <filename>/var/run</filename> must be changed.
841 You can find a guide on how to make these changes
842 <ulink url='http://permalink.gmane.org/gmane.comp.handhelds.openembedded/58530'>here</ulink>.
843 </para>
844 </section>
845
846 <section id='migration-1.5-removal-of-package-manager-database-within-image-recipes'>
847 <title>Removal of Package Manager Database Within Image Recipes</title>
848
849 <para>
850 The image <filename>core-image-minimal</filename> no longer adds
851 <filename>remove_packaging_data_files</filename> to
852 <link linkend='var-ROOTFS_POSTPROCESS_COMMAND'><filename>ROOTFS_POSTPROCESS_COMMAND</filename></link>.
853 This addition is now handled automatically when "package-management"
854 is not in
855 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
856 If you have custom image recipes that make this addition,
857 you should remove the lines, as they are not needed and might
858 interfere with correct operation of postinstall scripts.
859 </para>
860 </section>
861
862 <section id='migration-1.5-images-now-rebuild-only-on-changes-instead-of-every-time'>
863 <title>Images Now Rebuild Only on Changes Instead of Every Time</title>
864
865 <para>
866 The <filename>do_rootfs</filename> and other related image
867 construction tasks are no longer marked as "nostamp".
868 Consequently, they will only be re-executed when their inputs have
869 changed.
870 Previous versions of the OpenEmbedded build system always rebuilt
871 the image when requested rather when necessary.
872 </para>
873 </section>
874
875 <section id='migration-1.5-task-recipes'>
876 <title>Task Recipes</title>
877
878 <para>
879 The previously deprecated <filename>task.bbclass</filename> has
880 now been dropped.
881 For recipes that previously inherited from this class, you should
882 rename them from <filename>task-*</filename> to
883 <filename>packagegroup-*</filename> and inherit packagegroup
884 instead.
885 </para>
886
887 <para>
888 For more information, see the
889 "<link linkend='ref-classes-packagegroup'><filename>packagegroup.bbclass</filename></link>"
890 section.
891 </para>
892 </section>
893
894 <section id='migration-1.5-busybox'>
895 <title>BusyBox</title>
896
897 <para>
898 By default, we now split BusyBox into two binaries:
899 one that is suid root for those components that need it, and
900 another for the rest of the components.
901 Splitting BusyBox allows for optimization that eliminates the
902 <filename>tinylogin</filename> recipe as recommended by upstream.
903 You can disable this split by setting
904 <link linkend='var-BUSYBOX_SPLIT_SUID'><filename>BUSYBOX_SPLIT_SUID</filename></link>
905 to "0".
906 </para>
907 </section>
908
909 <section id='migration-1.5-automated-image-testing'>
910 <title>Automated Image Testing</title>
911
912 <para>
913 A new automated image testing framework has been added
914 through the
915 <link linkend='ref-classes-testimage'><filename>testimage*.bbclass</filename></link>
916 class.
917 This framework replaces the older
918 <filename>imagetest-qemu</filename> framework.
919 </para>
920
921 <para>
922 You can learn more about performing automated image tests in the
923 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
924 section.
925 </para>
926 </section>
927
928 <section id='migration-1.5-build-history'>
929 <title>Build History</title>
930
931 <para>
932 Following are changes to Build History:
933 <itemizedlist>
934 <listitem><para>
935 Installed package sizes:
936 <filename>installed-package-sizes.txt</filename> for an
937 image now records the size of the files installed by each
938 package instead of the size of each compressed package
939 archive file.</para></listitem>
940 <listitem><para>
941 The dependency graphs (<filename>depends*.dot</filename>)
942 now use the actual package names instead of replacing
943 dashes, dots and plus signs with underscores.
944 </para></listitem>
945 <listitem><para>
946 The <filename>buildhistory-diff</filename> and
947 <filename>buildhistory-collect-srcrevs</filename>
948 utilities have improved command-line handling.
949 Use the <filename>&dash;&dash;help</filename> option for
950 each utility for more information on the new syntax.
951 </para></listitem>
952 </itemizedlist>
953 For more information on Build History, see the
954 "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
955 section.
956 </para>
957 </section>
958
959 <section id='migration-1.5-udev'>
960 <title><filename>udev</filename></title>
961
962 <para>
963 Following are changes to <filename>udev</filename>:
964 <itemizedlist>
965 <listitem><para>
966 <filename>udev</filename> no longer brings in
967 <filename>udev-extraconf</filename> automatically
968 through
969 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
970 since this was originally intended to be optional.
971 If you need the extra rules, then add
972 <filename>udev-extraconf</filename> to your image.
973 </para></listitem>
974 <listitem><para>
975 <filename>udev</filename> no longer brings in
976 <filename>pciutils-ids</filename> or
977 <filename>usbutils-ids</filename> through
978 <filename>RRECOMMENDS</filename>.
979 These are not needed by <filename>udev</filename> itself
980 and removing them saves around 350KB.
981 </para></listitem>
982 </itemizedlist>
983 </para>
984 </section>
985
986 <section id='migration-1.5-removed-renamed-recipes'>
987 <title>Removed and Renamed Recipes</title>
988
989 <itemizedlist>
990 <listitem><para>
991 The <filename>linux-yocto</filename> 3.2 kernel has been
992 removed.</para></listitem>
993 <listitem><para>
994 <filename>libtool-nativesdk</filename> has been renamed to
995 <filename>nativesdk-libtool</filename>.</para></listitem>
996 <listitem><para>
997 <filename>tinylogin</filename> has been removed.
998 It has been replaced by a suid portion of Busybox.
999 See the
1000 "<link linkend='migration-1.5-busybox'>BusyBox</link>" section
1001 for more information.</para></listitem>
1002 <listitem><para>
1003 <filename>external-python-tarball</filename> has been renamed
1004 to <filename>buildtools-tarball</filename>.
1005 </para></listitem>
1006 <listitem><para>
1007 <filename>web-webkit</filename> has been removed.
1008 It has been functionally replaced by
1009 <filename>midori</filename>.</para></listitem>
1010 <listitem><para>
1011 <filename>imake</filename> has been removed.
1012 It is no longer needed by any other recipe.
1013 </para></listitem>
1014 <listitem><para>
1015 <filename>transfig-native</filename> has been removed.
1016 It is no longer needed by any other recipe.
1017 </para></listitem>
1018 <listitem><para>
1019 <filename>anjuta-remote-run</filename> has been removed.
1020 Anjuta IDE integration has not been officially supported for
1021 several releases.</para></listitem>
1022 </itemizedlist>
1023 </section>
1024
1025 <section id='migration-1.5-other-changes'>
1026 <title>Other Changes</title>
1027
1028 <para>
1029 Following is a list of short entries describing other changes:
1030 <itemizedlist>
1031 <listitem><para>
1032 <filename>run-postinsts</filename>: Make this generic.
1033 </para></listitem>
1034 <listitem><para>
1035 <filename>base-files</filename>: Remove the unnecessary
1036 <filename>media/xxx</filename> directories.
1037 </para></listitem>
1038 <listitem><para>
1039 <filename>alsa-state</filename>: Provide an empty
1040 <filename>asound.conf</filename> by default.
1041 </para></listitem>
1042 <listitem><para>
1043 <filename>classes/image</filename>: Ensure
1044 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
1045 supports pre-renamed package names.</para></listitem>
1046 <listitem><para>
1047 <filename>classes/rootfs_rpm</filename>: Implement
1048 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
1049 for RPM.</para></listitem>
1050 <listitem><para>
1051 <filename>systemd</filename>: Remove
1052 <filename>systemd_unitdir</filename> if
1053 <filename>systemd</filename> is not in
1054 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
1055 </para></listitem>
1056 <listitem><para>
1057 <filename>systemd</filename>: Remove
1058 <filename>init.d</filename> dir if
1059 <filename>systemd</filename> unit file is present and
1060 <filename>sysvinit</filename> is not a distro feature.
1061 </para></listitem>
1062 <listitem><para>
1063 <filename>libpam</filename>: Deny all services for the
1064 <filename>OTHER</filename> entries.
1065 </para></listitem>
1066 <listitem><para>
1067 <filename>image.bbclass</filename>: Move
1068 <filename>runtime_mapping_rename</filename> to avoid
1069 conflict with <filename>multilib</filename>.
1070 See
1071 <ulink url='https://bugzilla.yoctoproject.org/show_bug.cgi?id=4993'><filename>YOCTO #4993</filename></ulink>
1072 in Bugzilla for more information.
1073 </para></listitem>
1074 <listitem><para>
1075 <filename>linux-dtb</filename>: Use kernel build system
1076 to generate the <filename>dtb</filename> files.
1077 </para></listitem>
1078 <listitem><para>
1079 <filename>kern-tools</filename>: Switch from guilt to
1080 new <filename>kgit-s2q</filename> tool.
1081 </para></listitem>
1082 </itemizedlist>
1083 </para>
1084 </section>
1085</section>
1086
1087<section id='moving-to-the-yocto-project-1.6-release'>
1088 <title>Moving to the Yocto Project 1.6 Release</title>
1089
1090 <para>
1091 This section provides migration information for moving to the
1092 Yocto Project 1.6 Release from the prior release.
1093 </para>
1094
1095
1096 <section id='migration-1.6-archiver-class'>
1097 <title><filename>archiver</filename> Class</title>
1098
1099 <para>
1100 The
1101 <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
1102 class has been rewritten and its configuration has been simplified.
1103 For more details on the source archiver, see the
1104 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
1105 section in the Yocto Project Development Manual.
1106 </para>
1107 </section>
1108
1109 <section id='migration-1.6-packaging-changes'>
1110 <title>Packaging Changes</title>
1111
1112 <para>
1113 The following packaging changes have been made:
1114 <itemizedlist>
1115 <listitem><para>
1116 The <filename>binutils</filename> recipe no longer produces
1117 a <filename>binutils-symlinks</filename> package.
1118 <filename>update-alternatives</filename> is now used to
1119 handle the preferred <filename>binutils</filename>
1120 variant on the target instead.
1121 </para></listitem>
1122 <listitem><para>
1123 The tc (traffic control) utilities have been split out of
1124 the main <filename>iproute2</filename> package and put
1125 into the <filename>iproute2-tc</filename> package.
1126 </para></listitem>
1127 <listitem><para>
1128 The <filename>gtk-engines</filename> schemas have been
1129 moved to a dedicated
1130 <filename>gtk-engines-schemas</filename> package.
1131 </para></listitem>
1132 <listitem><para>
1133 The <filename>armv7a</filename> with thumb package
1134 architecture suffix has changed.
1135 The suffix for these packages with the thumb
1136 optimization enabled is "t2" as it should be.
1137 Use of this suffix was not the case in the 1.5 release.
1138 Architecture names will change within package feeds as a
1139 result.
1140 </para></listitem>
1141 </itemizedlist>
1142 </para>
1143 </section>
1144
1145 <section id='migration-1.6-bitbake'>
1146 <title>BitBake</title>
1147
1148 <para>
1149 The following changes have been made to
1150 <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
1151 </para>
1152
1153 <section id='migration-1.6-matching-branch-requirement-for-git-fetching'>
1154 <title>Matching Branch Requirement for Git Fetching</title>
1155
1156 <para>
1157 When fetching source from a Git repository using
1158 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>,
1159 BitBake will now validate the
1160 <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
1161 value against the branch.
1162 You can specify the branch using the following form:
1163 <literallayout class='monospaced'>
1164 SRC_URI = "git://server.name/repository;branch=&lt;branchname&gt;"
1165 </literallayout>
1166 If you do not specify a branch, BitBake looks
1167 in the default "master" branch.
1168 </para>
1169
1170 <para>
1171 Alternatively, if you need to bypass this check (e.g.
1172 if you are fetching a revision corresponding to a tag that
1173 is not on any branch), you can add ";nobranch=1" to
1174 the end of the URL within <filename>SRC_URI</filename>.
1175 </para>
1176 </section>
1177
1178 <section id='migration-1.6-bitbake-deps'>
1179 <title>Python Definition substitutions</title>
1180
1181 <para>
1182 BitBake had some previously deprecated Python definitions
1183 within its <filename>bb</filename> module removed.
1184 You should use their sub-module counterparts instead:
1185 <itemizedlist>
1186 <listitem><para><filename>bb.MalformedUrl</filename>:
1187 Use <filename>bb.fetch.MalformedUrl</filename>.
1188 </para></listitem>
1189 <listitem><para><filename>bb.fetch.encodeurl</filename>:
1190 Use <filename>bb.fetch.encodeurl</filename>.
1191 </para></listitem>
1192 <listitem><para><filename>bb.decodeurl</filename>:
1193 Use <filename>bb.fetch.decodeurl</filename>
1194 </para></listitem>
1195 <listitem><para><filename>bb.mkdirhier</filename>:
1196 Use <filename>bb.utils.mkdirhier</filename>.
1197 </para></listitem>
1198 <listitem><para><filename>bb.movefile</filename>:
1199 Use <filename>bb.utils.movefile</filename>.
1200 </para></listitem>
1201 <listitem><para><filename>bb.copyfile</filename>:
1202 Use <filename>bb.utils.copyfile</filename>.
1203 </para></listitem>
1204 <listitem><para><filename>bb.which</filename>:
1205 Use <filename>bb.utils.which</filename>.
1206 </para></listitem>
1207 <listitem><para><filename>bb.vercmp_string</filename>:
1208 Use <filename>bb.utils.vercmp_string</filename>.
1209 </para></listitem>
1210 <listitem><para><filename>bb.vercmp</filename>:
1211 Use <filename>bb.utils.vercmp</filename>.
1212 </para></listitem>
1213 </itemizedlist>
1214 </para>
1215 </section>
1216
1217 <section id='migration-1.6-bitbake-fetcher'>
1218 <title>SVK Fetcher</title>
1219
1220 <para>
1221 The SVK fetcher has been removed from BitBake.
1222 </para>
1223 </section>
1224
1225 <section id='migration-1.6-bitbake-console-output'>
1226 <title>Console Output Error Redirection</title>
1227
1228 <para>
1229 The BitBake console UI will now output errors to
1230 <filename>stderr</filename> instead of
1231 <filename>stdout</filename>.
1232 Consequently, if you are piping or redirecting the output of
1233 <filename>bitbake</filename> to somewhere else, and you wish
1234 to retain the errors, you will need to add
1235 <filename>2>&amp;1</filename> (or something similar) to the
1236 end of your <filename>bitbake</filename> command line.
1237 </para>
1238 </section>
1239
1240 <section id='migration-1.6-task-taskname-overrides'>
1241 <title><filename>task-&lt;taskname&gt;</filename> Overrides</title>
1242
1243 <para>
1244 <filename>task-&lt;taskname&gt;</filename> overrides have been
1245 adjusted so that tasks whose names contain underscores have the
1246 underscores replaced by hyphens for the override so that they
1247 now function properly.
1248 For example, the task override for
1249 <filename>do_populate_sdk</filename> is
1250 <filename>task-populate-sdk</filename>.
1251 </para>
1252 </section>
1253 </section>
1254
1255 <section id='migration-1.6-variable-changes'>
1256 <title>Changes to Variables</title>
1257
1258 <para>
1259 The following variables have changed.
1260 For information on the OpenEmbedded build system variables, see the
1261 "<link linkend='ref-variables-glos'>Variables Glossary</link>" Chapter.
1262 </para>
1263
1264 <section id='migration-1.6-variable-changes-TMPDIR'>
1265 <title><filename>TMPDIR</filename></title>
1266
1267 <para>
1268 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
1269 can no longer be on an NFS mount.
1270 NFS does not offer full POSIX locking and inode consistency
1271 and can cause unexpected issues if used to store
1272 <filename>TMPDIR</filename>.
1273 </para>
1274
1275 <para>
1276 The check for this occurs on startup.
1277 If <filename>TMPDIR</filename> is detected on an NFS mount,
1278 an error occurs.
1279 </para>
1280 </section>
1281
1282 <section id='migration-1.6-variable-changes-PRINC'>
1283 <title><filename>PRINC</filename></title>
1284
1285 <para>
1286 The
1287 <link linkend='var-PRINC'><filename>PRINC</filename></link>
1288 variable has been deprecated and triggers a warning if
1289 detected during a build.
1290 For
1291 <link linkend='var-PR'><filename>PR</filename></link>
1292 increments on changes, use the PR service instead.
1293 You can find out more about this service in the
1294 "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>Working With a PR Service</ulink>"
1295 section in the Yocto Project Development Manual.
1296 </para>
1297 </section>
1298
1299 <section id='migration-1.6-variable-changes-IMAGE_TYPES'>
1300 <title><filename>IMAGE_TYPES</filename></title>
1301
1302 <para>
1303 The "sum.jffs2" option for
1304 <link linkend='var-IMAGE_TYPES'><filename>IMAGE_TYPES</filename></link>
1305 has been replaced by the "jffs2.sum" option, which fits the
1306 processing order.
1307 </para>
1308 </section>
1309
1310 <section id='migration-1.6-variable-changes-COPY_LIC_MANIFEST'>
1311 <title><filename>COPY_LIC_MANIFEST</filename></title>
1312
1313 <para>
1314 The
1315 <link linkend='var-COPY_LIC_MANIFEST'><filename>COPY_LIC_MANIFEST</filename></link>
1316 variable must
1317 now be set to "1" rather than any value in order to enable
1318 it.
1319 </para>
1320 </section>
1321
1322 <section id='migration-1.6-variable-changes-COPY_LIC_DIRS'>
1323 <title><filename>COPY_LIC_DIRS</filename></title>
1324
1325 <para>
1326 The
1327 <link linkend='var-COPY_LIC_DIRS'><filename>COPY_LIC_DIRS</filename></link>
1328 variable must
1329 now be set to "1" rather than any value in order to enable
1330 it.
1331 </para>
1332 </section>
1333
1334 <section id='migration-1.6-variable-changes-PACKAGE_GROUP'>
1335 <title><filename>PACKAGE_GROUP</filename></title>
1336
1337 <para>
1338 The
1339 <link linkend='var-PACKAGE_GROUP'><filename>PACKAGE_GROUP</filename></link>
1340 variable has been renamed to
1341 <link linkend='var-FEATURE_PACKAGES'><filename>FEATURE_PACKAGES</filename></link>
1342 to more accurately reflect its purpose.
1343 You can still use <filename>PACKAGE_GROUP</filename> but
1344 the OpenEmbedded build system produces a warning message when
1345 it encounters the variable.
1346 </para>
1347 </section>
1348 </section>
1349
1350 <section id='migration-1.6-directory-layout-changes'>
1351 <title>Directory Layout Changes</title>
1352
1353 <para>
1354 The <filename>meta-hob</filename> layer has been removed from
1355 the top-level of the
1356 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1357 The contents of this layer are no longer needed by the Hob
1358 user interface for building images and toolchains.
1359 </para>
1360 </section>
1361
1362 <section id='migration-1.6-package-test-ptest'>
1363 <title>Package Test (ptest)</title>
1364
1365 <para>
1366 Package Tests (ptest) are built but not installed by default.
1367 For information on using Package Tests, see the
1368 "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Setting up and running package test (ptest)</ulink>"
1369 section in the Yocto Project Development Manual.
1370 For information on the <filename>ptest</filename> class, see the
1371 "<link linkend='ref-classes-ptest'><filename>ptest.bbclass</filename></link>"
1372 section.
1373 </para>
1374 </section>
1375
1376 <section id='migration-1.6-build-changes'>
1377 <title>Build Changes</title>
1378
1379 <para>
1380 Separate build and source directories have been enabled
1381 by default for selected recipes where it is known to work
1382 (a whitelist) and for all recipes that inherit the
1383 <link linkend='ref-classes-cmake'><filename>cmake</filename></link>
1384 class.
1385 In future releases the
1386 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
1387 class will enable a separate build directory by default as
1388 well.
1389 Recipes building Autotools-based
1390 software that fails to build with a separate build directory
1391 should be changed to inherit from the
1392 <link linkend='ref-classes-autotools-brokensep'><filename>autotools-brokensep</filename></link>
1393 class instead of the <filename>autotools</filename> class.
1394 </para>
1395 </section>
1396
1397 <section id='migration-1.6-building-qemu-native'>
1398 <title><filename>qemu-native</filename></title>
1399
1400 <para>
1401 <filename>qemu-native</filename> now builds without
1402 SDL-based graphical output support by default.
1403 The following additional lines are needed in your
1404 <filename>local.conf</filename> to enable it:
1405 <literallayout class='monospaced'>
1406 PACKAGECONFIG_pn-qemu-native = "sdl"
1407 ASSUME_PROVIDED += "libsdl-native"
1408 </literallayout>
1409 <note>
1410 The default <filename>local.conf</filename>
1411 contains these statements.
1412 Consequently, if you are building a headless system and using
1413 a default <filename>local.conf</filename> file, you will need
1414 comment these two lines out.
1415 </note>
1416 </para>
1417 </section>
1418
1419 <section id='migration-1.6-core-image-basic'>
1420 <title><filename>core-image-basic</filename></title>
1421
1422 <para>
1423 <filename>core-image-basic</filename> has been renamed to
1424 <filename>core-image-full-cmdline</filename>.
1425 </para>
1426
1427 <para>
1428 In addition to <filename>core-image-basic</filename> being renamed,
1429 <filename>packagegroup-core-basic</filename> has been renamed to
1430 <filename>packagegroup-core-full-cmdline</filename> to match.
1431 </para>
1432 </section>
1433
1434 <section id='migration-1.6-licensing'>
1435 <title>Licensing</title>
1436
1437 <para>
1438 The top-level <filename>LICENSE</filename> file has been changed
1439 to better describe the license of the various components of
1440 OE-Core.
1441 However, the licensing itself remains unchanged.
1442 </para>
1443
1444 <para>
1445 Normally, this change would not cause any side-effects.
1446 However, some recipes point to this file within
1447 <link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>
1448 (as <filename>${COREBASE}/LICENSE</filename>) and thus the
1449 accompanying checksum must be changed from
1450 3f40d7994397109285ec7b81fdeb3b58 to
1451 4d92cd373abda3937c2bc47fbc49d690.
1452 A better alternative is to have
1453 <filename>LIC_FILES_CHKSUM</filename> point to a file
1454 describing the license that is distributed with the source
1455 that the recipe is building, if possible, rather than pointing
1456 to <filename>${COREBASE}/LICENSE</filename>.
1457 </para>
1458 </section>
1459
1460 <section id='migration-1.6-cflags-options'>
1461 <title><filename>CFLAGS</filename> Options</title>
1462
1463 <para>
1464 The "-fpermissive" option has been removed from the default
1465 <link linkend='var-CFLAGS'><filename>CFLAGS</filename></link>
1466 value.
1467 You need to take action on individual recipes that fail when
1468 building with this option.
1469 You need to either patch the recipes to fix the issues reported by
1470 the compiler, or you need to add "-fpermissive" to
1471 <filename>CFLAGS</filename> in the recipes.
1472 </para>
1473 </section>
1474
1475 <section id='migration-1.6-custom-images'>
1476 <title>Custom Image Output Types</title>
1477
1478 <para>
1479 Custom image output types, as selected using
1480 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>,
1481 must declare their dependencies on other image types (if any) using
1482 a new
1483 <link linkend='var-IMAGE_TYPEDEP'><filename>IMAGE_TYPEDEP</filename></link>
1484 variable.
1485 </para>
1486 </section>
1487
1488 <section id='migration-1.6-do-package-write-task'>
1489 <title>Tasks</title>
1490
1491 <para>
1492 The <filename>do_package_write</filename> task has been removed.
1493 The task is no longer needed.
1494 </para>
1495 </section>
1496
1497 <section id='migration-1.6-update-alternatives-provider'>
1498 <title><filename>update-alternative</filename> Provider</title>
1499
1500 <para>
1501 The default <filename>update-alternatives</filename> provider has
1502 been changed from <filename>opkg</filename> to
1503 <filename>opkg-utils</filename>.
1504 This change resolves some troublesome circular dependencies.
1505 The runtime package has also been renamed from
1506 <filename>update-alternatives-cworth</filename>
1507 to <filename>update-alternatives-opkg</filename>.
1508 </para>
1509 </section>
1510
1511 <section id='migration-1.6-virtclass-overrides'>
1512 <title><filename>virtclass</filename> Overrides</title>
1513
1514 <para>
1515 The <filename>virtclass</filename> overrides are now deprecated.
1516 Use the equivalent class overrides instead (e.g.
1517 <filename>virtclass-native</filename> becomes
1518 <filename>class-native</filename>.)
1519 </para>
1520 </section>
1521
1522 <section id='migration-1.6-removed-renamed-recipes'>
1523 <title>Removed and Renamed Recipes</title>
1524
1525 <para>
1526 The following recipes have been removed:
1527 <itemizedlist>
1528 <listitem><para><filename>packagegroup-toolset-native</filename> -
1529 This recipe is largely unused.
1530 </para></listitem>
1531 <listitem><para><filename>linux-yocto-3.8</filename> -
1532 Support for the Linux yocto 3.8 kernel has been dropped.
1533 Support for the 3.10 and 3.14 kernels have been added
1534 with the <filename>linux-yocto-3.10</filename> and
1535 <filename>linux-yocto-3.14</filename> recipes.
1536 </para></listitem>
1537 <listitem><para><filename>ocf-linux</filename> -
1538 This recipe has been functionally replaced using
1539 <filename>cryptodev-linux</filename>.
1540 </para></listitem>
1541 <listitem><para><filename>genext2fs</filename> -
1542 <filename>genext2fs</filename> is no longer used by the
1543 build system and is unmaintained upstream.
1544 </para></listitem>
1545 <listitem><para><filename>js</filename> -
1546 This provided an ancient version of Mozilla's javascript
1547 engine that is no longer needed.
1548 </para></listitem>
1549 <listitem><para><filename>zaurusd</filename> -
1550 The recipe has been moved to the
1551 <filename>meta-handheld</filename> layer.
1552 </para></listitem>
1553 <listitem><para><filename>eglibc 2.17</filename> -
1554 Replaced by the <filename>eglibc 2.19</filename>
1555 recipe.
1556 </para></listitem>
1557 <listitem><para><filename>gcc 4.7.2</filename> -
1558 Replaced by the now stable
1559 <filename>gcc 4.8.2</filename>.
1560 </para></listitem>
1561 <listitem><para><filename>external-sourcery-toolchain</filename> -
1562 this recipe is now maintained in the
1563 <filename>meta-sourcery</filename> layer.
1564 </para></listitem>
1565 <listitem><para><filename>linux-libc-headers-yocto 3.4+git</filename> -
1566 Now using version 3.10 of the
1567 <filename>linux-libc-headers</filename> by default.
1568 </para></listitem>
1569 <listitem><para><filename>meta-toolchain-gmae</filename> -
1570 This recipe is obsolete.
1571 </para></listitem>
1572 <listitem><para><filename>packagegroup-core-sdk-gmae</filename> -
1573 This recipe is obsolete.
1574 </para></listitem>
1575 <listitem><para><filename>packagegroup-core-standalone-gmae-sdk-target</filename> -
1576 This recipe is obsolete.
1577 </para></listitem>
1578 </itemizedlist>
1579 </para>
1580 </section>
1581
1582 <section id='migration-1.6-removed-classes'>
1583 <title>Removed Classes</title>
1584
1585 <para>
1586 The following classes have become obsolete and have been removed:
1587 <itemizedlist>
1588 <listitem><para><filename>module_strip</filename>
1589 </para></listitem>
1590 <listitem><para><filename>pkg_metainfo</filename>
1591 </para></listitem>
1592 <listitem><para><filename>pkg_distribute</filename>
1593 </para></listitem>
1594 <listitem><para><filename>image-empty</filename>
1595 </para></listitem>
1596 </itemizedlist>
1597 </para>
1598 </section>
1599
1600 <section id='migration-1.6-reference-bsps'>
1601 <title>Reference Board Support Packages (BSPs)</title>
1602
1603 <para>
1604 The following reference BSPs changes occurred:
1605 <itemizedlist>
1606 <listitem><para>The BeagleBoard
1607 (<filename>beagleboard</filename>) ARM reference hardware
1608 has been replaced by the BeagleBone
1609 (<filename>beaglebone</filename>) hardware.
1610 </para></listitem>
1611 <listitem><para>The RouterStation Pro
1612 (<filename>routerstationpro</filename>) MIPS reference
1613 hardware has been replaced by the EdgeRouter Lite
1614 (<filename>edgerouter</filename>) hardware.
1615 </para></listitem>
1616 </itemizedlist>
1617 The previous reference BSPs for the
1618 <filename>beagleboard</filename> and
1619 <filename>routerstationpro</filename> machines are still available
1620 in a new <filename>meta-yocto-bsp-old</filename> layer in the
1621 <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>
1622 at
1623 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/meta-yocto-bsp-old/'>http://git.yoctoproject.org/cgit/cgit.cgi/meta-yocto-bsp-old/</ulink>.
1624 </para>
1625 </section>
1626</section>
1627</chapter>
1628<!--
1629vim: expandtab tw=80 ts=4
1630-->
diff --git a/documentation/ref-manual/ref-bitbake.xml b/documentation/ref-manual/ref-bitbake.xml
new file mode 100644
index 0000000000..28496dec9a
--- /dev/null
+++ b/documentation/ref-manual/ref-bitbake.xml
@@ -0,0 +1,472 @@
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
5<chapter id='ref-bitbake'>
6
7 <title>BitBake</title>
8
9 <para>
10 BitBake is a program written in Python that interprets the
11 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> used by
12 the OpenEmbedded build system.
13 At some point, developers wonder what actually happens when you enter:
14 <literallayout class='monospaced'>
15 $ bitbake core-image-sato
16 </literallayout>
17 </para>
18
19 <para>
20 This chapter provides an overview of what happens behind the scenes from BitBake's perspective.
21 </para>
22
23 <note>
24 BitBake strives to be a generic "task" executor that is capable of handling complex dependency relationships.
25 As such, it has no real knowledge of what the tasks being executed actually do.
26 BitBake just considers a list of tasks with dependencies and handles
27 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
28 consisting of variables in a certain format that get passed to the tasks.
29 </note>
30
31 <section id='ref-bitbake-parsing'>
32 <title>Parsing</title>
33
34 <para>
35 BitBake parses configuration files, classes, and <filename>.bb</filename> files.
36 </para>
37
38 <para>
39 The first thing BitBake does is look for the <filename>bitbake.conf</filename> file.
40 This file resides in the
41 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
42 within the <filename>meta/conf/</filename> directory.
43 BitBake finds it by examining its
44 <link linkend='var-BBPATH'><filename>BBPATH</filename></link> environment
45 variable and looking for the <filename>meta/conf/</filename>
46 directory.
47 </para>
48
49 <para>
50 The <filename>bitbake.conf</filename> file lists other configuration
51 files to include from a <filename>conf/</filename>
52 directory below the directories listed in <filename>BBPATH</filename>.
53 In general, the most important configuration file from a user's perspective
54 is <filename>local.conf</filename>, which contains a user's customized
55 settings for the OpenEmbedded build environment.
56 Other notable configuration files are the distribution
57 configuration file (set by the
58 <filename><link linkend='var-DISTRO'>DISTRO</link></filename> variable)
59 and the machine configuration file
60 (set by the
61 <filename><link linkend='var-MACHINE'>MACHINE</link></filename> variable).
62 The <filename>DISTRO</filename> and <filename>MACHINE</filename> BitBake environment
63 variables are both usually set in
64 the <filename>local.conf</filename> file.
65 Valid distribution
66 configuration files are available in the <filename>meta/conf/distro/</filename> directory
67 and valid machine configuration
68 files in the <filename>meta/conf/machine/</filename> directory.
69 Within the <filename>meta/conf/machine/include/</filename>
70 directory are various <filename>tune-*.inc</filename> configuration files that provide common
71 "tuning" settings specific to and shared between particular architectures and machines.
72 </para>
73
74 <para>
75 After the parsing of the configuration files, some standard classes are included.
76 The <filename>base.bbclass</filename> file is always included.
77 Other classes that are specified in the configuration using the
78 <filename><link linkend='var-INHERIT'>INHERIT</link></filename>
79 variable are also included.
80 Class files are searched for in a <filename>classes</filename> subdirectory
81 under the paths in <filename>BBPATH</filename> in the same way as
82 configuration files.
83 </para>
84
85 <para>
86 After classes are included, the variable
87 <filename><link linkend='var-BBFILES'>BBFILES</link></filename>
88 is set, usually in
89 <filename>local.conf</filename>, and defines the list of places to search for
90 <filename>.bb</filename> files.
91 By default, the <filename>BBFILES</filename> variable specifies the
92 <filename>meta/recipes-*/</filename> directory within Poky.
93 Adding extra content to <filename>BBFILES</filename> is best achieved through the use of
94 BitBake layers as described in the
95 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and
96 Creating Layers</ulink>" section of the Yocto Project Development Manual.
97 </para>
98
99 <para>
100 BitBake parses each <filename>.bb</filename> file in <filename>BBFILES</filename> and
101 stores the values of various variables.
102 In summary, for each <filename>.bb</filename>
103 file the configuration plus the base class of variables are set, followed
104 by the data in the <filename>.bb</filename> file
105 itself, followed by any inherit commands that
106 <filename>.bb</filename> file might contain.
107 </para>
108
109 <para>
110 Because parsing <filename>.bb</filename> files is a time
111 consuming process, a cache is kept to speed up subsequent parsing.
112 This cache is invalid if the timestamp of the <filename>.bb</filename>
113 file itself changes, or if the timestamps of any of the include,
114 configuration files or class files on which the
115 <filename>.bb</filename> file depends change.
116 </para>
117
118 <note>
119 <para>
120 You need to be aware of how BitBake parses curly braces.
121 If a recipe uses a closing curly brace within the function and
122 the character has no leading spaces, BitBake produces a parsing
123 error.
124 If you use a pair of curly brace in a shell function, the
125 closing curly brace must not be located at the start of the line
126 without leading spaces.
127 </para>
128
129 <para>
130 Here is an example that causes BitBake to produce a parsing
131 error:
132 <literallayout class='monospaced'>
133 fakeroot create_shar() {
134 cat &lt;&lt; "EOF" &gt; ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
135 usage()
136 {
137 echo "test"
138 ###### The following "}" at the start of the line causes a parsing error ######
139 }
140 EOF
141 }
142 </literallayout>
143 Writing the recipe this way avoids the error:
144 <literallayout class='monospaced'>
145 fakeroot create_shar() {
146 cat &lt;&lt; "EOF" &gt; ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
147 usage()
148 {
149 echo "test"
150 ######The following "}" with a leading space at the start of the line avoids the error ######
151 }
152 EOF
153 }
154 </literallayout>
155 </para>
156 </note>
157 </section>
158
159 <section id='ref-bitbake-providers'>
160 <title>Preferences and Providers</title>
161
162 <para>
163 Once all the <filename>.bb</filename> files have been
164 parsed, BitBake starts to build the target (<filename>core-image-sato</filename>
165 in the previous section's example) and looks for providers of that target.
166 Once a provider is selected, BitBake resolves all the dependencies for
167 the target.
168 In the case of <filename>core-image-sato</filename>, it would lead to
169 <filename>packagegroup-core-x11-sato</filename>,
170 which in turn leads to recipes like <filename>matchbox-terminal</filename>,
171 <filename>pcmanfm</filename> and <filename>gthumb</filename>.
172 These recipes in turn depend on <filename>eglibc</filename> and the toolchain.
173 </para>
174
175 <para>
176 Sometimes a target might have multiple providers.
177 A common example is "virtual/kernel", which is provided by each kernel package.
178 Each machine often selects the best kernel provider by using a line similar to the
179 following in the machine configuration file:
180 </para>
181
182 <literallayout class='monospaced'>
183 PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
184 </literallayout>
185
186 <para>
187 The default <filename><link linkend='var-PREFERRED_PROVIDER'>PREFERRED_PROVIDER</link></filename>
188 is the provider with the same name as the target.
189 </para>
190
191 <para>
192 Understanding how providers are chosen is made complicated by the fact
193 that multiple versions might exist.
194 BitBake defaults to the highest version of a provider.
195 Version comparisons are made using the same method as Debian.
196 You can use the
197 <filename><link linkend='var-PREFERRED_VERSION'>PREFERRED_VERSION</link></filename>
198 variable to specify a particular version (usually in the distro configuration).
199 You can influence the order by using the
200 <filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE</link></filename>
201 variable.
202 By default, files have a preference of "0".
203 Setting the <filename>DEFAULT_PREFERENCE</filename> to "-1" makes the
204 package unlikely to be used unless it is explicitly referenced.
205 Setting the <filename>DEFAULT_PREFERENCE</filename> to "1" makes it likely the package is used.
206 <filename>PREFERRED_VERSION</filename> overrides any <filename>DEFAULT_PREFERENCE</filename> setting.
207 <filename>DEFAULT_PREFERENCE</filename> is often used to mark newer and more experimental package
208 versions until they have undergone sufficient testing to be considered stable.
209 </para>
210
211 <para>
212 In summary, BitBake has created a list of providers, which is prioritized, for each target.
213 </para>
214 </section>
215
216 <section id='ref-bitbake-dependencies'>
217 <title>Dependencies</title>
218
219 <para>
220 Each target BitBake builds consists of multiple tasks such as
221 <filename>fetch</filename>, <filename>unpack</filename>,
222 <filename>patch</filename>, <filename>configure</filename>,
223 and <filename>compile</filename>.
224 For best performance on multi-core systems, BitBake considers each task as an independent
225 entity with its own set of dependencies.
226 </para>
227
228 <para>
229 Dependencies are defined through several variables.
230 You can find information about variables BitBake uses in the BitBake documentation,
231 which is found in the <filename>bitbake/doc/manual</filename> directory within the
232 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
233 At a basic level, it is sufficient to know that BitBake uses the
234 <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename> and
235 <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename> variables when
236 calculating dependencies.
237 </para>
238 </section>
239
240 <section id='ref-bitbake-tasklist'>
241 <title>The Task List</title>
242
243 <para>
244 Based on the generated list of providers and the dependency information,
245 BitBake can now calculate exactly what tasks it needs to run and in what
246 order it needs to run them.
247 The build now starts with BitBake forking off threads up to the limit set in the
248 <filename><link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link></filename> variable.
249 BitBake continues to fork threads as long as there are tasks ready to run,
250 those tasks have all their dependencies met, and the thread threshold has not been
251 exceeded.
252 </para>
253
254 <para>
255 It is worth noting that you can greatly speed up the build time by properly setting
256 the <filename>BB_NUMBER_THREADS</filename> variable.
257 See the
258 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
259 section in the Yocto Project Quick Start for more information.
260 </para>
261
262 <para>
263 As each task completes, a timestamp is written to the directory specified by the
264 <filename><link linkend='var-STAMP'>STAMP</link></filename> variable.
265 On subsequent runs, BitBake looks within the <filename>build/tmp/stamps</filename>
266 directory and does not rerun
267 tasks that are already completed unless a timestamp is found to be invalid.
268 Currently, invalid timestamps are only considered on a per
269 <filename>.bb</filename> file basis.
270 So, for example, if the configure stamp has a timestamp greater than the
271 compile timestamp for a given target, then the compile task would rerun.
272 Running the compile task again, however, has no effect on other providers
273 that depend on that target.
274 This behavior could change or become configurable in future versions of BitBake.
275 </para>
276
277 <note>
278 Some tasks are marked as "nostamp" tasks.
279 No timestamp file is created when these tasks are run.
280 Consequently, "nostamp" tasks are always rerun.
281 </note>
282 </section>
283
284 <section id='ref-bitbake-runtask'>
285 <title>Running a Task</title>
286
287 <para>
288 Tasks can either be a shell task or a Python task.
289 For shell tasks, BitBake writes a shell script to
290 <filename>${WORKDIR}/temp/run.do_taskname.pid</filename> and then executes the script.
291 The generated shell script contains all the exported variables, and the shell functions
292 with all variables expanded.
293 Output from the shell script goes to the file <filename>${WORKDIR}/temp/log.do_taskname.pid</filename>.
294 Looking at the expanded shell functions in the run file and the output in the log files
295 is a useful debugging technique.
296 </para>
297
298 <para>
299 For Python tasks, BitBake executes the task internally and logs information to the
300 controlling terminal.
301 Future versions of BitBake will write the functions to files similar to the way
302 shell tasks are handled.
303 Logging will be handled in a way similar to shell tasks as well.
304 </para>
305
306 <para>
307 Once all the tasks have been completed BitBake exits.
308 </para>
309
310 <para>
311 When running a task, BitBake tightly controls the execution environment
312 of the build tasks to make sure unwanted contamination from the build machine
313 cannot influence the build.
314 Consequently, if you do want something to get passed into the build
315 task's environment, you must take a few steps:
316 <orderedlist>
317 <listitem><para>Tell BitBake to load what you want from the environment
318 into the data store.
319 You can do so through the <filename>BB_ENV_EXTRAWHITE</filename>
320 variable.
321 For example, assume you want to prevent the build system from
322 accessing your <filename>$HOME/.ccache</filename> directory.
323 The following command tells BitBake to load
324 <filename>CCACHE_DIR</filename> from the environment into the data
325 store:
326 <literallayout class='monospaced'>
327 export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR"
328 </literallayout></para></listitem>
329 <listitem><para>Tell BitBake to export what you have loaded into the
330 environment store to the task environment of every running task.
331 Loading something from the environment into the data store
332 (previous step) only makes it available in the datastore.
333 To export it to the task environment of every running task,
334 use a command similar to the following in your
335 <filename>local.conf</filename> or distro configuration file:
336 <literallayout class='monospaced'>
337 export CCACHE_DIR
338 </literallayout></para></listitem>
339 </orderedlist>
340 </para>
341
342 <note>
343 A side effect of the previous steps is that BitBake records the variable
344 as a dependency of the build process in things like the shared state
345 checksums.
346 If doing so results in unnecessary rebuilds of tasks, you can whitelist the
347 variable so that the shared state code ignores the dependency when it creates
348 checksums.
349 For information on this process, see the <filename>BB_HASHBASE_WHITELIST</filename>
350 example in the "<link linkend='checksums'>Checksums (Signatures)</link>" section.
351 </note>
352 </section>
353
354 <section id='ref-bitbake-commandline'>
355 <title>BitBake Command Line</title>
356
357 <para>
358 Following is the BitBake help output:
359 </para>
360
361 <screen>
362$ bitbake --help
363Usage: bitbake [options] [recipename/target ...]
364
365 Executes the specified task (default is 'build') for a given set of target recipes (.bb files).
366 It is assumed there is a conf/bblayers.conf available in cwd or in BBPATH which
367 will provide the layer, BBFILES and other configuration information.
368
369Options:
370 --version show program's version number and exit
371 -h, --help show this help message and exit
372 -b BUILDFILE, --buildfile=BUILDFILE
373 Execute tasks from a specific .bb recipe directly.
374 WARNING: Does not handle any dependencies from other
375 recipes.
376 -k, --continue Continue as much as possible after an error. While the
377 target that failed and anything depending on it cannot
378 be built, as much as possible will be built before
379 stopping.
380 -a, --tryaltconfigs Continue with builds by trying to use alternative
381 providers where possible.
382 -f, --force Force the specified targets/task to run (invalidating
383 any existing stamp file).
384 -c CMD, --cmd=CMD Specify the task to execute. The exact options
385 available depend on the metadata. Some examples might
386 be 'compile' or 'populate_sysroot' or 'listtasks' may
387 give a list of the tasks available.
388 -C INVALIDATE_STAMP, --clear-stamp=INVALIDATE_STAMP
389 Invalidate the stamp for the specified task such as
390 'compile' and then run the default task for the
391 specified target(s).
392 -r PREFILE, --read=PREFILE
393 Read the specified file before bitbake.conf.
394 -R POSTFILE, --postread=POSTFILE
395 Read the specified file after bitbake.conf.
396 -v, --verbose Output more log message data to the terminal.
397 -D, --debug Increase the debug level. You can specify this more
398 than once.
399 -n, --dry-run Don't execute, just go through the motions.
400 -S, --dump-signatures
401 Don't execute, just dump out the signature
402 construction information.
403 -p, --parse-only Quit after parsing the BB recipes.
404 -s, --show-versions Show current and preferred versions of all recipes.
405 -e, --environment Show the global or per-package environment complete
406 with information about where variables were
407 set/changed.
408 -g, --graphviz Save dependency tree information for the specified
409 targets in the dot syntax.
410 -I EXTRA_ASSUME_PROVIDED, --ignore-deps=EXTRA_ASSUME_PROVIDED
411 Assume these dependencies don't exist and are already
412 provided (equivalent to ASSUME_PROVIDED). Useful to
413 make dependency graphs more appealing
414 -l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS
415 Show debug logging for the specified logging domains
416 -P, --profile Profile the command and save reports.
417 -u UI, --ui=UI The user interface to use (e.g. knotty, hob, depexp).
418 -t SERVERTYPE, --servertype=SERVERTYPE
419 Choose which server to use, process or xmlrpc.
420 --revisions-changed Set the exit code depending on whether upstream
421 floating revisions have changed or not.
422 --server-only Run bitbake without a UI, only starting a server
423 (cooker) process.
424 -B BIND, --bind=BIND The name/address for the bitbake server to bind to.
425 --no-setscene Do not run any setscene tasks. sstate will be ignored
426 and everything needed, built.
427 --remote-server=REMOTE_SERVER
428 Connect to the specified server.
429 -m, --kill-server Terminate the remote server.
430 --observe-only Connect to a server as an observing-only client.
431 </screen>
432 </section>
433
434 <section id='ref-bitbake-fetchers'>
435 <title>Fetchers</title>
436
437 <para>
438 BitBake also contains a set of "fetcher" modules that allow
439 retrieval of source code from various types of sources.
440 For example, BitBake can get source code from a disk with the metadata, from websites,
441 from remote shell accounts, or from Source Code Management (SCM) systems
442 like <filename>cvs/subversion/git</filename>.
443 </para>
444
445 <para>
446 Fetchers are usually triggered by entries in
447 <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>.
448 You can find information about the options and formats of entries for specific
449 fetchers in the BitBake manual located in the
450 <filename>bitbake/doc/manual</filename> directory of the
451 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
452 </para>
453
454 <para>
455 One useful feature for certain Source Code Manager (SCM) fetchers is the ability to
456 "auto-update" when the upstream SCM changes version.
457 Since this ability requires certain functionality from the SCM, not all
458 systems support it.
459 Currently Subversion, Bazaar and to a limited extent, Git support the ability to "auto-update".
460 This feature works using the <filename><link linkend='var-SRCREV'>SRCREV</link></filename>
461 variable.
462 See the
463 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-srcrev'>Using an External SCM</ulink>" section
464 in the Yocto Project Development Manual for more information.
465 </para>
466
467 </section>
468
469</chapter>
470<!--
471vim: expandtab tw=80 ts=4 spell spelllang=en_gb
472-->
diff --git a/documentation/ref-manual/ref-classes.xml b/documentation/ref-manual/ref-classes.xml
new file mode 100644
index 0000000000..da546080a3
--- /dev/null
+++ b/documentation/ref-manual/ref-classes.xml
@@ -0,0 +1,3255 @@
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
5<chapter id='ref-classes'>
6<title>Classes</title>
7
8<para>
9 Class files are used to abstract common functionality and share it amongst
10 multiple recipe (<filename>.bb</filename>) files.
11 To use a class file, you simply make sure the recipe inherits the class.
12 In most cases, when a recipe inherits a class it is enough to enable its
13 features.
14 There are cases, however, where in the recipe you might need to set
15 variables or override some default behavior.
16</para>
17
18<para>
19 Any <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> usually
20 found in a recipe can also be placed in a class file.
21 Class files are identified by the extension <filename>.bbclass</filename>
22 and are usually placed in a <filename>classes/</filename> directory beneath
23 the <filename>meta*/</filename> directory found in the
24 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
25 Class files can also be pointed to by
26 <link linkend='var-BUILDDIR'><filename>BUILDDIR</filename></link>
27 (e.g. <filename>build/</filename>) in the same way as
28 <filename>.conf</filename> files in the <filename>conf</filename> directory.
29 Class files are searched for in
30 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
31 using the same method by which <filename>.conf</filename> files are
32 searched.
33</para>
34
35<para>
36 This chapter discusses only the most useful and important classes.
37 Other classes do exist within the <filename>meta/classes</filename>
38 directory in the
39 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
40 You can reference the <filename>.bbclass</filename> files directly
41 for more information.
42</para>
43
44<section id='ref-classes-allarch'>
45 <title><filename>allarch.bbclass</filename></title>
46
47 <para>
48 The <filename>allarch</filename> class is inherited
49 by recipes that do not produce architecture-specific output.
50 The class disables functionality that is normally needed for recipes
51 that produce executable binaries (such as building the cross-compiler
52 and a C library as pre-requisites, and splitting out of debug symbols
53 during packaging).
54 </para>
55
56 <para>
57 By default, all recipes inherit the
58 <link linkend='ref-classes-base'><filename>base</filename></link> and
59 <link linkend='ref-classes-package'><filename>package</filename></link>
60 classes, which enable functionality
61 needed for recipes that produce executable output.
62 If your recipe, for example, only produces packages that contain
63 configuration files, media files, or scripts (e.g. Python and Perl),
64 then it should inherit the <filename>allarch</filename> class.
65 </para>
66</section>
67
68<section id='ref-classes-archiver'>
69 <title><filename>archiver.bbclass</filename></title>
70
71 <para>
72 The <filename>archiver</filename> class supports releasing
73 source code and other materials with the binaries.
74 </para>
75
76 <para>
77 For more details on the source archiver, see the
78 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
79 section in the Yocto Project Development Manual.
80 </para>
81</section>
82
83<section id='ref-classes-autotools'>
84 <title><filename>autotools.bbclass</filename></title>
85
86 <para>
87 The <filename>autotools</filename> class supports Autotooled
88 packages.
89 </para>
90
91 <para>
92 The <filename>autoconf</filename>, <filename>automake</filename>,
93 and <filename>libtool</filename> bring standardization.
94 This class defines a set of tasks (configure, compile etc.) that
95 work for all Autotooled packages.
96 It should usually be enough to define a few standard variables
97 and then simply <filename>inherit autotools</filename>.
98 This class can also work with software that emulates Autotools.
99 For more information, see the
100 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-autotooled-package'>Autotooled Package</ulink>"
101 section in the Yocto Project Development Manual.
102 </para>
103
104 <para>
105 It's useful to have some idea of how the tasks defined by this class work
106 and what they do behind the scenes.
107 <itemizedlist>
108 <listitem><para><filename>do_configure</filename> &dash; Regenerates the
109 configure script (using <filename>autoreconf</filename>) and then launches it
110 with a standard set of arguments used during cross-compilation.
111 You can pass additional parameters to <filename>configure</filename> through the
112 <filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></filename> variable.
113 </para></listitem>
114 <listitem><para><filename>do_compile</filename> &dash; Runs <filename>make</filename> with
115 arguments that specify the compiler and linker.
116 You can pass additional arguments through
117 the <filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></filename> variable.
118 </para></listitem>
119 <listitem><para><filename>do_install</filename> &dash; Runs <filename>make install</filename>
120 and passes in
121 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>
122 as <filename>DESTDIR</filename>.
123 </para></listitem>
124 </itemizedlist>
125 </para>
126
127 <note>
128 It is planned for future Yocto Project releases that by default, the
129 <filename>autotools</filename> class supports out-of-tree builds
130 (<link linkend='var-B'><filename>B</filename></link> !=
131 <link linkend='var-S'><filename>S</filename></link>).
132 If your recipes do not support out-of-tree builds, you should
133 have them inherit the
134 <link linkend='ref-classes-autotools-brokensep'><filename>autotools-brokensep</filename></link>
135 class.
136 </note>
137</section>
138
139<section id='ref-classes-autotools-brokensep'>
140 <title><filename>autotools-brokensep.bbclass</filename></title>
141
142 <para>
143 The <filename>autotools-brokensep</filename> class behaves the same
144 as the
145 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
146 class but builds with
147 <link linkend='var-B'><filename>B</filename></link> ==
148 <link linkend='var-S'><filename>S</filename></link>.
149 This method is useful when out-of-tree build support is either not
150 present or is broken.
151 <note>
152 It is recommended that out-of-tree support be fixed and used
153 if at all possible.
154 </note>
155 </para>
156</section>
157
158<section id='ref-classes-base'>
159 <title><filename>base.bbclass</filename></title>
160
161 <para>
162 The <filename>base</filename> class is special in that every
163 <filename>.bb</filename> file implicitly inherits the class.
164 This class contains definitions for standard basic
165 tasks such as fetching, unpacking, configuring (empty by default),
166 compiling (runs any <filename>Makefile</filename> present), installing
167 (empty by default) and packaging (empty by default).
168 These classes are often overridden or extended by other classes
169 such as the
170 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
171 class or the
172 <link linkend='ref-classes-package'><filename>package</filename></link>
173 class.
174 The class also contains some commonly used functions such as
175 <filename>oe_runmake</filename>.
176 </para>
177</section>
178
179<section id='ref-classes-bin-package'>
180 <title><filename>bin_package.bbclass</filename></title>
181
182 <para>
183 The <filename>bin_package</filename> class is a
184 helper class for recipes that extract the contents of a binary package
185 (e.g. an RPM) and install those contents rather than building the
186 binary from source.
187 The binary package is extracted and new packages in the configured
188 output package format are created.
189 <note>
190 For RPMs and other packages that do not contain a subdirectory,
191 you should specify a "subdir" parameter.
192 Here is an example where <filename>${BP}</filename> is used so that
193 the files are extracted into the subdirectory expected by the
194 default value of
195 <link linkend='var-S'><filename>S</filename></link>:
196 <literallayout class='monospaced'>
197 SRC_URI = "http://example.com/downloads/somepackage.rpm;subdir=${BP}"
198 </literallayout>
199 </note>
200 </para>
201</section>
202
203<section id='ref-classes-binconfig'>
204 <title><filename>binconfig.bbclass</filename></title>
205
206 <para>
207 The <filename>binconfig</filename> class helps to correct paths in
208 shell scripts.
209 </para>
210
211 <para>
212 Before <filename>pkg-config</filename> had become widespread, libraries
213 shipped shell scripts to give information about the libraries and
214 include paths needed to build software (usually named
215 <filename>LIBNAME-config</filename>).
216 This class assists any recipe using such scripts.
217 </para>
218
219 <para>
220 During staging, the OpenEmbedded build system installs such scripts
221 into the <filename>sysroots/</filename> directory.
222 Inheriting this class results in all paths in these scripts being
223 changed to point into the <filename>sysroots/</filename> directory so
224 that all builds that use the script use the correct directories
225 for the cross compiling layout.
226 See the
227 <link linkend='var-BINCONFIG_GLOB'><filename>BINCONFIG_GLOB</filename></link>
228 variable for more information.
229 </para>
230</section>
231
232<section id='ref-classes-blacklist'>
233 <title><filename>blacklist.bbclass</filename></title>
234
235 <para>
236 The <filename>blacklist</filename> class prevents
237 the OpenEmbedded build system from building specific recipes
238 (blacklists them).
239 To use this class, inherit the class globally and set
240 <link linkend='var-PNBLACKLIST'><filename>PNBLACKLIST</filename></link>
241 for each recipe you wish to blacklist.
242 Specify the <link linkend='var-PN'><filename>PN</filename></link>
243 value as a variable flag (varflag) and provide a reason, which is
244 reported, if the package is requested to be built as the value.
245 For example, if you want to blacklist a recipe called "exoticware",
246 you add the following to your <filename>local.conf</filename>
247 or distribution configuration:
248 <literallayout class='monospaced'>
249 INHERIT += "blacklist"
250 PNBLACKLIST[exoticware] = "Not supported by our organization."
251 </literallayout>
252 </para>
253</section>
254
255<section id='ref-classes-boot-directdisk'>
256 <title><filename>boot-directdisk.bbclass</filename></title>
257
258 <para>
259 The <filename>boot-directdisk</filename> class
260 creates an image that can be placed directly onto a hard disk using
261 <filename>dd</filename> and then booted.
262 The image uses SYSLINUX.
263 </para>
264
265 <para>
266 The end result is a 512 boot sector populated with a
267 Master Boot Record (MBR) and partition table followed by an MSDOS
268 FAT16 partition containing SYSLINUX and a Linux kernel completed by
269 the <filename>ext2</filename> and <filename>ext3</filename>
270 root filesystems.
271 </para>
272</section>
273
274<section id='ref-classes-bootimg'>
275 <title><filename>bootimg.bbclass</filename></title>
276
277 <para>
278 The <filename>bootimg</filename> class creates a bootable
279 image using SYSLINUX, your kernel, and an optional initial RAM disk
280 (<filename>initrd</filename>).
281 </para>
282
283 <para>
284 When you use this class, two things happen:
285 <itemizedlist>
286 <listitem><para>
287 A <filename>.hddimg</filename> file is created.
288 This file is an MSDOS filesystem that contains SYSLINUX,
289 a kernel, an <filename>initrd</filename>, and a root filesystem
290 image.
291 All three of these can be written to hard drives directly and
292 also booted on a USB flash disks using <filename>dd</filename>.
293 </para></listitem>
294 <listitem><para>
295 A CD <filename>.iso</filename> image is created.
296 When this file is booted, the <filename>initrd</filename>
297 boots and processes the label selected in SYSLINUX.
298 Actions based on the label are then performed (e.g. installing
299 to a hard drive).</para></listitem>
300 </itemizedlist>
301 </para>
302
303 <para>
304 The <filename>bootimg</filename> class supports the
305 <link linkend='var-INITRD'><filename>INITRD</filename></link>,
306 <link linkend='var-NOISO'><filename>NOISO</filename></link>,
307 <link linkend='var-NOHDD'><filename>NOHDD</filename></link>, and
308 <link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>
309 variables.
310 </para>
311</section>
312
313<section id='ref-classes-bugzilla'>
314 <title><filename>bugzilla.bbclass</filename></title>
315
316 <para>
317 The <filename>bugzilla</filename> class supports setting up an
318 instance of Bugzilla in which you can automatically files bug reports
319 in response to build failures.
320 For this class to work, you need to enable the XML-RPC interface in
321 the instance of Bugzilla.
322 </para>
323</section>
324
325<section id='ref-classes-buildhistory'>
326 <title><filename>buildhistory.bbclass</filename></title>
327
328 <para>
329 The <filename>buildhistory</filename> class records a
330 history of build output metadata, which can be used to detect possible
331 regressions as well as used for analysis of the build output.
332 For more information on using Build History, see the
333 "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
334 section.
335 </para>
336</section>
337
338<section id='ref-classes-buildstats'>
339 <title><filename>buildstats.bbclass</filename></title>
340
341 <para>
342 The <filename>buildstats</filename> class records
343 performance statistics about each task executed during the build
344 (e.g. elapsed time, CPU usage, and I/O usage).
345 </para>
346
347 <para>
348 When you use this class, the output goes into the
349 <link linkend='var-BUILDSTATS_BASE'><filename>BUILDSTATS_BASE</filename></link>
350 directory, which defaults to <filename>${TMPDIR}/buildstats/</filename>.
351 You can analyze the elapsed time using
352 <filename>scripts/pybootchartgui/pybootchartgui.py</filename>, which
353 produces a cascading chart of the entire build process and can be
354 useful for highlighting bottlenecks.
355 </para>
356
357 <para>
358 Collecting build statistics is enabled by default through the
359 <link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link>
360 variable from your <filename>local.conf</filename> file.
361 Consequently, you do not have to do anything to enable the class.
362 However, if you want to disable the class, simply remove "buildstats"
363 from the <filename>USER_CLASSES</filename> list.
364 </para>
365</section>
366
367<section id='ref-classes-ccache'>
368 <title><filename>ccache.bbclass</filename></title>
369
370 <para>
371 The <filename>ccache</filename> class enables the
372 <ulink url='http://ccache.samba.org/'>C/C++ Compiler Cache</ulink>
373 for the build.
374 This class is used to give a minor performance boost during the build.
375 However, using the class can lead to unexpected side-effects.
376 Thus, it is recommended that you do not use this class.
377 See <ulink url='http://ccache.samba.org/'></ulink> for information on
378 the C/C++ Compiler Cache.
379 </para>
380</section>
381
382<section id='ref-classes-chrpath'>
383 <title><filename>chrpath.bbclass</filename></title>
384
385 <para>
386 The <filename>chrpath</filename> class
387 is a wrapper around the "chrpath" utility, which is used during the
388 build process for <filename>nativesdk</filename>,
389 <filename>cross</filename>, and
390 <filename>cross-canadian</filename> recipes to change
391 <filename>RPATH</filename> records within binaries in order to make
392 them relocatable.
393 </para>
394</section>
395
396<section id='ref-classes-clutter'>
397 <title><filename>clutter.bbclass</filename></title>
398
399 <para>
400 The <filename>clutter</filename> class consolidates the
401 major and minor version naming and other common items used by Clutter
402 and related recipes.
403 <note>
404 Unlike some other classes related to specific libraries, recipes
405 building other software that uses Clutter do not need to
406 inherit this class unless they use the same recipe versioning
407 scheme that the Clutter and related recipes do.
408 </note>
409 </para>
410</section>
411
412<section id='ref-classes-cmake'>
413 <title><filename>cmake.bbclass</filename></title>
414
415 <para>
416 The <filename>cmake</filename> class allows for
417 recipes that need to build software using the CMake build system.
418 You can use the
419 <link linkend='var-EXTRA_OECMAKE'><filename>EXTRA_OECMAKE</filename></link>
420 variable to specify additional configuration options to be passed on
421 the <filename>cmake</filename> command line.
422 </para>
423</section>
424
425<section id='ref-classes-cml1'>
426 <title><filename>cml1.bbclass</filename></title>
427
428 <para>
429 The <filename>cml1</filename> class provides basic support for the
430 Linux kernel style build configuration system.
431 </para>
432</section>
433
434<section id='ref-classes-copyleft_compliance'>
435 <title><filename>copyleft_compliance.bbclass</filename></title>
436
437 <para>
438 The <filename>copyleft_compliance</filename> class
439 preserves source code for the purposes of license compliance.
440 This class is an alternative to the <filename>archiver</filename>
441 class and is still used by some users even though it has been
442 deprecated in favor of the
443 <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
444 class.
445 </para>
446</section>
447
448<section id='ref-classes-core-image'>
449 <title><filename>core-image.bbclass</filename></title>
450
451 <para>
452 The <filename>core-image</filename> class
453 provides common definitions for the
454 <filename>core-image-*</filename> image recipes, such as support for
455 additional
456 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
457 </para>
458</section>
459
460<section id='ref-classes-cpan'>
461 <title><filename>cpan.bbclass</filename></title>
462
463 <para>
464 The <filename>cpan</filename> class supports Perl modules.
465 </para>
466
467 <para>
468 Recipes for Perl modules are simple.
469 These recipes usually only need to point to the source's archive and
470 then inherit the proper class file.
471 Building is split into two methods depending on which method the module
472 authors used.
473 <itemizedlist>
474 <listitem><para>Modules that use old
475 <filename>Makefile.PL</filename>-based build system require
476 <filename>cpan.bbclass</filename> in their recipes.
477 </para></listitem>
478 <listitem><para>Modules that use
479 <filename>Build.PL</filename>-based build system require
480 using <filename>cpan_build.bbclass</filename> in their recipes.
481 </para></listitem>
482 </itemizedlist>
483 </para>
484</section>
485
486<section id='ref-classes-cross'>
487 <title><filename>cross.bbclass</filename></title>
488
489 <para>
490 The <filename>cross</filename> class provides support for the recipes
491 that build the cross-compilation tools.
492 </para>
493</section>
494
495<section id='ref-classes-cross-canadian'>
496 <title><filename>cross-canadian.bbclass</filename></title>
497
498 <para>
499 The <filename>cross-canadian</filename> class
500 provides support for the recipes that build the Canadian
501 Cross-compilation tools for SDKs.
502 See the
503 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
504 section for more discussion on these cross-compilation tools.
505 </para>
506</section>
507
508<section id='ref-classes-crosssdk'>
509 <title><filename>crosssdk.bbclass</filename></title>
510
511 <para>
512 The <filename>crosssdk</filename> class
513 provides support for the recipes that build the cross-compilation
514 tools used for building SDKs.
515 See the
516 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
517 section for more discussion on these cross-compilation tools.
518 </para>
519</section>
520
521<section id='ref-classes-debian'>
522 <title><filename>debian.bbclass</filename></title>
523
524 <para>
525 The <filename>debian</filename> class renames output packages so that
526 they follow the Debian naming policy (i.e. <filename>eglibc</filename>
527 becomes <filename>libc6</filename> and <filename>eglibc-devel</filename>
528 becomes <filename>libc6-dev</filename>.)
529 Renaming includes the library name and version as part of the package
530 name.
531 </para>
532
533 <para>
534 If a recipe creates packages for multiple libraries
535 (shared object files of <filename>.so</filename> type), use the
536 <link linkend='var-LEAD_SONAME'><filename>LEAD_SONAME</filename></link>
537 variable in the recipe to specify the library on which to apply the
538 naming scheme.
539 </para>
540</section>
541
542<section id='ref-classes-deploy'>
543 <title><filename>deploy.bbclass</filename></title>
544
545 <para>
546 The <filename>deploy</filename> class handles deploying files
547 to the
548 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
549 directory.
550 The main function of this class is to allow the deploy step to be
551 accelerated by shared state.
552 Recipes that inherit this class should define their own
553 <filename>do_deploy</filename> function to copy the files to be
554 deployed to
555 <link linkend='var-DEPLOYDIR'><filename>DEPLOYDIR</filename></link>,
556 and use <filename>addtask</filename> to add the task at the appropriate
557 place, which is usually after <filename>do_compile</filename> or
558 <filename>do_install</filename>.
559 The class then takes care of staging the files from
560 <filename>DEPLOYDIR</filename> to
561 <filename>DEPLOY_DIR_IMAGE</filename>.
562 </para>
563</section>
564
565<section id='ref-classes-devshell'>
566 <title><filename>devshell.bbclass</filename></title>
567
568 <para>
569 The <filename>devshell</filename> class adds the
570 <filename>devshell</filename> task.
571 Distribution policy dictates whether to include this class.
572 See the
573 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section
574 in the Yocto Project Development Manual for more information about
575 using <filename>devshell</filename>.
576 </para>
577</section>
578
579<section id='ref-classes-distro_features_check'>
580 <title><filename>distro_features_check.bbclass</filename></title>
581
582 <para>
583 The <filename>distro_features_check</filename> class
584 allows individual recipes to check for required and conflicting
585 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
586 </para>
587
588 <para>
589 This class provides support for the
590 <link linkend='var-REQUIRED_DISTRO_FEATURES'><filename>REQUIRED_DISTRO_FEATURES</filename></link>
591 and
592 <link linkend='var-CONFLICT_DISTRO_FEATURES'><filename>CONFLICT_DISTRO_FEATURES</filename></link>
593 variables.
594 If any conditions specified in the recipe using the above variables are
595 not met, the recipe will be skipped.
596 </para>
597</section>
598
599<section id='ref-classes-distrodata'>
600 <title><filename>distrodata.bbclass</filename></title>
601
602 <para>
603 The <filename>distrodata</filename> class
604 provides for automatic checking for upstream recipe updates.
605 The class creates a comma-separated value (CSV) spreadsheet that
606 contains information about the recipes.
607 The information provides the <filename>distrodata</filename> and
608 <filename>distro_check</filename> tasks, which do upstream checking
609 and also verify if a package is used in multiple major distributions.
610 </para>
611
612 <para>
613 The class is not included by default.
614 To use it, you must include the following files and set the
615 <link linkend='var-INHERIT'><filename>INHERIT</filename></link>
616 variable:
617 <literallayout class='monospaced'>
618 include conf/distro/include/distro_alias.inc
619 include conf/distro/include/recipe_color.inc
620 include conf/distro/include/maintainers.inc
621 include conf/distro/include/upstream_tracking.inc
622 include conf/distro/include/package_regex.inc
623 INHERIT+= "distrodata"
624 </literallayout>
625 </para>
626</section>
627
628<section id='ref-classes-distutils'>
629 <title><filename>distutils.bbclass</filename></title>
630
631 <para>
632 The <filename>distutils</filename> class supports recipes for Python
633 version 2.x extensions, which are simple.
634 These recipes usually only need to point to the source's archive and
635 then inherit the proper class.
636 Building is split into two methods depending on which method the
637 module authors used.
638 <itemizedlist>
639 <listitem><para>Extensions that use an Autotools-based build system
640 require Autotools and
641 <filename>distutils</filename>-based classes in their recipes.
642 </para></listitem>
643 <listitem><para>Extensions that use build systems based on
644 <filename>distutils</filename> require
645 the <filename>distutils</filename> class in their recipes.
646 </para></listitem>
647 <listitem><para>Extensions that use build systems based on
648 <filename>setuptools</filename> require the
649 <link linkend='ref-classes-setuptools'><filename>setuptools</filename></link>
650 class in their recipes.
651 </para></listitem>
652 </itemizedlist>
653 </para>
654</section>
655
656<section id='ref-classes-distutils3'>
657 <title><filename>distutils3.bbclass</filename></title>
658
659 <para>
660 The <filename>distutils3</filename> class supports recipes for Python
661 version 3.x extensions, which are simple.
662 These recipes usually only need to point to the source's archive and
663 then inherit the proper class.
664 Building is split into two methods depending on which method the
665 module authors used.
666 <itemizedlist>
667 <listitem><para>Extensions that use an Autotools-based build system
668 require Autotools and
669 <filename>distutils</filename>-based classes in their recipes.
670 </para></listitem>
671 <listitem><para>Extensions that use
672 <filename>distutils</filename>-based build systems require
673 the <filename>distutils</filename> class in their recipes.
674 </para></listitem>
675 <listitem><para>Extensions that use build systems based on
676 <filename>setuptools3</filename> require the
677 <link linkend='ref-classes-setuptools'><filename>setuptools3</filename></link>
678 class in their recipes.
679 </para></listitem>
680 </itemizedlist>
681 </para>
682</section>
683
684<section id='ref-classes-externalsrc'>
685 <title><filename>externalsrc.bbclass</filename></title>
686
687 <para>
688 The <filename>externalsrc</filename> class supports building software
689 from source code that is external to the OpenEmbedded build system.
690 Building software from an external source tree means that the build
691 system's normal fetch, unpack, and patch process is not used.
692 </para>
693
694 <para>
695 By default, the OpenEmbedded build system uses the
696 <link linkend='var-S'><filename>S</filename></link> and
697 <link linkend='var-B'><filename>B</filename></link> variables to
698 locate unpacked recipe source code and to build it, respectively.
699 When your recipe inherits the <filename>externalsrc</filename> class,
700 you use the
701 <link linkend='var-EXTERNALSRC'><filename>EXTERNALSRC</filename></link>
702 and
703 <link linkend='var-EXTERNALSRC_BUILD'><filename>EXTERNALSRC_BUILD</filename></link>
704 variables to ultimately define <filename>S</filename> and
705 <filename>B</filename>.
706 </para>
707
708 <para>
709 By default, this class expects the source code to support recipe builds
710 that use the <link linkend='var-B'><filename>B</filename></link>
711 variable to point to the directory in which the OpenEmbedded build
712 system places the generated objects built from the recipes.
713 By default, the <filename>B</filename> directory is set to the
714 following, which is separate from the source directory
715 (<filename>S</filename>):
716 <literallayout class='monospaced'>
717 ${WORKDIR}/${BPN}/{PV}/
718 </literallayout>
719 See these variables for more information:
720 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
721 <link linkend='var-BPN'><filename>BPN</filename></link>, and
722 <link linkend='var-PV'><filename>PV</filename></link>,
723 </para>
724
725 <para>
726 For more information on the
727 <filename>externalsrc</filename> class, see the comments in
728 <filename>meta/classes/externalsrc.bbclass</filename> in the
729 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
730 For information on how to use the <filename>externalsrc</filename>
731 class, see the
732 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
733 section in the Yocto Project Development Manual.
734 </para>
735</section>
736
737<section id='ref-classes-extrausers'>
738 <title><filename>extrausers.bbclass</filename></title>
739
740 <para>
741 The <filename>extrausers</filename> class allows
742 additional user and group configuration to be applied at the image
743 level.
744 Inheriting this class either globally or from an image recipe allows
745 additional user and group operations to be performed using the
746 <link linkend='var-EXTRA_USERS_PARAMS'><filename>EXTRA_USERS_PARAMS</filename></link>
747 variable.
748 <note>
749 The user and group operations added using the
750 <filename>extrausers</filename> class are not tied to a specific
751 recipe outside of the recipe for the image.
752 Thus, the operations can be performed across the image as a whole.
753 Use the
754 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
755 class to add user and group configuration to a specific recipe.
756 </note>
757 </para>
758
759 <para>
760 Here is an example that uses this class in an image recipe:
761 <literallayout class='monospaced'>
762 inherit extrausers
763 EXTRA_USERS_PARAMS = "\
764 useradd -p '' tester; \
765 groupadd developers; \
766 userdel nobody; \
767 groupdel -g video; \
768 groupmod -g 1020 developers; \
769 usermod -s /bin/sh tester; \
770 "
771 </literallayout>
772 </para>
773</section>
774
775<section id='ref-classes-fontcache'>
776 <title><filename>fontcache.bbclass</filename></title>
777
778 <para>
779 The <filename>fontcache</filename> class generates the
780 proper post-install and post-remove (postinst and postrm)
781 scriptlets for font packages.
782 These scriptlets call <filename>fc-cache</filename> (part of
783 <filename>Fontconfig</filename>) to add the fonts to the font
784 information cache.
785 Since the cache files are architecture-specific,
786 <filename>fc-cache</filename> runs using QEMU if the postinst
787 scriptlets need to be run on the build host during image creation.
788 </para>
789
790 <para>
791 If the fonts being installed are in packages other than the main
792 package, set
793 <link linkend='var-FONT_PACKAGES'><filename>FONT_PACKAGES</filename></link>
794 to specify the packages containing the fonts.
795 </para>
796</section>
797
798<section id='ref-classes-gconf'>
799 <title><filename>gconf.bbclass</filename></title>
800
801 <para>
802 The <filename>gconf</filename> class provides common
803 functionality for recipes that need to install GConf schemas.
804 The schemas will be put into a separate package
805 (<filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-gconf</filename>)
806 that is created automatically when this class is inherited.
807 This package uses the appropriate post-install and post-remove
808 (postinst/postrm) scriptlets to register and unregister the schemas
809 in the target image.
810 </para>
811</section>
812
813<section id='ref-classes-gettext'>
814 <title><filename>gettext.bbclass</filename></title>
815
816 <para>
817 The <filename>gettext</filename> class provides support for
818 building software that uses the GNU <filename>gettext</filename>
819 internationalization and localization system.
820 All recipes building software that use
821 <filename>gettext</filename> should inherit this class.
822 </para>
823</section>
824
825<section id='ref-classes-gnome'>
826 <title><filename>gnome.bbclass</filename></title>
827
828 <para>
829 The <filename>gnome</filename> class supports recipes that
830 build software from the GNOME stack.
831 This class inherits the
832 <link linkend='ref-classes-gnomebase'><filename>gnomebase</filename></link>,
833 <link linkend='ref-classes-gtk-icon-cache'><filename>gtk-icon-cache</filename></link>,
834 <link linkend='ref-classes-gconf'><filename>gconf</filename></link> and
835 <link linkend='ref-classes-mime'><filename>mime</filename></link> classes.
836 The class also disables GObject introspection where applicable.
837 </para>
838</section>
839
840<section id='ref-classes-gnomebase'>
841 <title><filename>gnomebase.bbclass</filename></title>
842
843 <para>
844 The <filename>gnomebase</filename> class is the base
845 class for recipes that build software from the GNOME stack.
846 This class sets
847 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link> to
848 download the source from the GNOME mirrors as well as extending
849 <link linkend='var-FILES'><filename>FILES</filename></link>
850 with the typical GNOME installation paths.
851 </para>
852</section>
853
854<section id='ref-classes-grub-efi'>
855 <title><filename>grub-efi.bbclass</filename></title>
856
857 <para>
858 The <filename>grub-efi</filename>
859 class provides <filename>grub-efi</filename>-specific functions for
860 building bootable images.
861 </para>
862
863 <para>
864 This class supports several variables:
865 <itemizedlist>
866 <listitem><para>
867 <link linkend='var-INITRD'><filename>INITRD</filename></link>:
868 Indicates a filesystem image to use as an initrd (optional).
869 </para></listitem>
870 <listitem><para>
871 <link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>:
872 Indicates a filesystem image to include as the root filesystem
873 (optional).</para></listitem>
874 <listitem><para>
875 <link linkend='var-GRUB_GFXSERIAL'><filename>GRUB_GFXSERIAL</filename></link>:
876 Set this to "1" to have graphics and serial in the boot menu.
877 </para></listitem>
878 <listitem><para>
879 <link linkend='var-LABELS'><filename>LABELS</filename></link>:
880 A list of targets for the automatic configuration.
881 </para></listitem>
882 <listitem><para>
883 <link linkend='var-APPEND'><filename>APPEND</filename></link>:
884 An override list of append strings for each
885 <filename>LABEL</filename>.
886 </para></listitem>
887 <listitem><para>
888 <link linkend='var-GRUB_OPTS'><filename>GRUB_OPTS</filename></link>:
889 Additional options to add to the configuration (optional).
890 Options are delimited using semi-colon characters
891 (<filename>;</filename>).</para></listitem>
892 <listitem><para>
893 <link linkend='var-GRUB_TIMEOUT'><filename>GRUB_TIMEOUT</filename></link>:
894 Timeout before executing the default <filename>LABEL</filename>
895 (optional).
896 </para></listitem>
897 </itemizedlist>
898 </para>
899</section>
900
901<section id='ref-classes-gsettings'>
902 <title><filename>gsettings.bbclass</filename></title>
903
904 <para>
905 The <filename>gsettings</filename> class
906 provides common functionality for recipes that need to install
907 GSettings (glib) schemas.
908 The schemas are assumed to be part of the main package.
909 Appropriate post-install and post-remove (postinst/postrm)
910 scriptlets are added to register and unregister the schemas in the
911 target image.
912 </para>
913</section>
914
915<section id='ref-classes-gtk-doc'>
916 <title><filename>gtk-doc.bbclass</filename></title>
917
918 <para>
919 The <filename>gtk-doc</filename> class
920 is a helper class to pull in the appropriate
921 <filename>gtk-doc</filename> dependencies and disable
922 <filename>gtk-doc</filename>.
923 </para>
924</section>
925
926<section id='ref-classes-gtk-icon-cache'>
927 <title><filename>gtk-icon-cache.bbclass</filename></title>
928
929 <para>
930 The <filename>gtk-icon-cache</filename> class
931 generates the proper post-install and post-remove (postinst/postrm)
932 scriptlets for packages that use GTK+ and install icons.
933 These scriptlets call <filename>gtk-update-icon-cache</filename> to add
934 the fonts to GTK+'s icon cache.
935 Since the cache files are architecture-specific,
936 <filename>gtk-update-icon-cache</filename> is run using QEMU if the
937 postinst scriptlets need to be run on the build host during image
938 creation.
939 </para>
940</section>
941
942<section id='ref-classes-gtk-immodules-cache'>
943 <title><filename>gtk-immodules-cache.bbclass</filename></title>
944
945 <para>
946 The <filename>gtk-immodules-cache</filename> class
947 generates the proper post-install and post-remove (postinst/postrm)
948 scriptlets for packages that install GTK+ input method modules for
949 virtual keyboards.
950 These scriptlets call <filename>gtk-update-icon-cache</filename> to add
951 the input method modules to the cache.
952 Since the cache files are architecture-specific,
953 <filename>gtk-update-icon-cache</filename> is run using QEMU if the
954 postinst scriptlets need to be run on the build host during image
955 creation.
956 </para>
957
958 <para>
959 If the input method modules being installed are in packages other than
960 the main package, set
961 <link linkend='var-GTKIMMODULES_PACKAGES'><filename>GTKIMMODULES_PACKAGES</filename></link>
962 to specify the packages containing the modules.
963 </para>
964</section>
965
966<section id='ref-classes-gzipnative'>
967 <title><filename>gzipnative.bbclass</filename></title>
968
969 <para>
970 The <filename>gzipnative</filename>
971 class enables the use of native versions of <filename>gzip</filename>
972 and <filename>pigz</filename> rather than the versions of these tools
973 from the build host.
974 </para>
975</section>
976
977<section id='ref-classes-icecc'>
978 <title><filename>icecc.bbclass</filename></title>
979
980 <para>
981 The <filename>icecc</filename> class supports
982 <ulink url='https://github.com/icecc/icecream'>Icecream</ulink>, which
983 facilitates taking compile jobs and distributing them among remote
984 machines.
985 </para>
986
987 <para>
988 The class stages directories with symlinks from <filename>gcc</filename>
989 and <filename>g++</filename> to <filename>icecc</filename>, for both
990 native and cross compilers.
991 Depending on each configure or compile, the OpenEmbedded build system
992 adds the directories at the head of the <filename>PATH</filename> list
993 and then sets the <filename>ICECC_CXX</filename> and
994 <filename>ICEC_CC</filename> variables, which are the paths to the
995 <filename>g++</filename> and <filename>gcc</filename> compilers,
996 respectively.
997 </para>
998
999 <para>
1000 For the cross compiler, the class creates a <filename>tar.gz</filename>
1001 file that contains the Yocto Project toolchain and sets
1002 <filename>ICECC_VERSION</filename>, which is the version of the
1003 cross-compiler used in the cross-development toolchain, accordingly.
1004 </para>
1005
1006 <para>
1007 The class handles all three different compile stages
1008 (i.e native ,cross-kernel and target) and creates the necessary
1009 environment <filename>tar.gz</filename> file to be used by the remote
1010 machines.
1011 The class also supports SDK generation.
1012 </para>
1013
1014 <para>
1015 If <link linkend='var-ICECC_PATH'><filename>ICECC_PATH</filename></link>
1016 is not set in your <filename>local.conf</filename> file, then the
1017 class tries to locate the <filename>icecc</filename> binary
1018 using <filename>which</filename>.
1019
1020 If
1021 <link linkend='var-ICECC_ENV_EXEC'><filename>ICECC_ENV_EXEC</filename></link>
1022 is set in your <filename>local.conf</filename> file, the variable should
1023 point to the <filename>icecc-create-env</filename> script
1024 provided by the user.
1025 If you do not point to a user-provided script, the build system
1026 uses the default script provided by the recipe
1027 <filename>icecc-create-env-native.bb</filename>.
1028 <note>
1029 This script is a modified version and not the one that comes with
1030 <filename>icecc</filename>.
1031 </note>
1032 </para>
1033
1034 <para>
1035 If you do not want the Icecream distributed compile support to apply
1036 to specific recipes or classes, you can effectively "blacklist" them
1037 by listing the recipes and classes using the
1038 <link linkend='var-ICECC_USER_PACKAGE_BL'><filename>ICECC_USER_PACKAGE_BL</filename></link>
1039 and
1040 <link linkend='var-ICECC_USER_CLASS_BL'><filename>ICECC_USER_CLASS_BL</filename></link>,
1041 variables, respectively, in your <filename>local.conf</filename> file.
1042 Doing so causes the OpenEmbedded build system to handle these
1043 compilations locally.
1044 </para>
1045
1046 <para>
1047 Additionally, you can list recipes using the
1048 <link linkend='var-ICECC_USER_PACKAGE_WL'><filename>ICECC_USER_PACKAGE_WL</filename></link>
1049 variable in your <filename>local.conf</filename> file to force
1050 <filename>icecc</filename> to be enabled for recipes using an empty
1051 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
1052 variable.
1053 </para>
1054
1055 <para>
1056 Inheriting the <filename>icecc</filename> class changes all sstate
1057 signatures.
1058 Consequently, if a development team has a dedicated build system
1059 that populates
1060 <link linkend='var-SSTATE_MIRRORS'><filename>STATE_MIRRORS</filename></link>
1061 and they want to reuse sstate from
1062 <filename>STATE_MIRRORS</filename>, then all developers and the
1063 build system need to either inherit the <filename>icecc</filename>
1064 class or nobody should.
1065 </para>
1066
1067 <para>
1068 At the distribution level, you can inherit the
1069 <filename>icecc</filename> class to be sure that all builders start
1070 with the same sstate signatures.
1071 After inheriting the class, you can then disable the feature by setting
1072 the
1073 <link linkend='var-ICECC_DISABLED'><filename>ICECC_DISABLED</filename></link>
1074 variable to "1" as follows:
1075 <literallayout class='monospaced'>
1076 INHERIT_DISTRO += "icecc"
1077 ICECC_DISABLED ??= "1"
1078 </literallayout>
1079 This practice makes sure everyone is using the same signatures but also
1080 requires individuals that do want to use Icecream to enable the feature
1081 individually as follows in your <filename>local.conf</filename> file:
1082 <literallayout class='monospaced'>
1083 ICECC_DISABLED = ""
1084 </literallayout>
1085 </para>
1086</section>
1087
1088<section id='ref-classes-image'>
1089 <title><filename>image.bbclass</filename></title>
1090
1091 <para>
1092 The <filename>image</filename> class helps support creating images
1093 in different formats.
1094 First, the root filesystem is created from packages using
1095 one of the <filename>rootfs*.bbclass</filename>
1096 files (depending on the package format used) and then one or more image
1097 files are created.
1098 <itemizedlist>
1099 <listitem><para>The
1100 <filename><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link></filename>
1101 variable controls the types of images to generate.
1102 </para></listitem>
1103 <listitem><para>The
1104 <filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename>
1105 variable controls the list of packages to install into the
1106 image.</para></listitem>
1107 </itemizedlist>
1108 For information on customizing images, see the
1109 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage'>Customizing Images</ulink>"
1110 section in the Yocto Project Development Manual.
1111 For information on how images are created, see the
1112 "<link linkend='images-dev-environment'>Images</link>" section elsewhere
1113 in this manual.
1114 </para>
1115</section>
1116
1117<section id='ref-classes-image_types'>
1118 <title><filename>image_types.bbclass</filename></title>
1119
1120 <para>
1121 The <filename>image_types</filename> class defines all of
1122 the standard image output types that you can enable through the
1123 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
1124 variable.
1125 You can use this class as a reference on how to add support for custom
1126 image output types.
1127 </para>
1128
1129 <para>
1130 By default, this class is enabled through the
1131 <link linkend='var-IMAGE_CLASSES'><filename>IMAGE_CLASSES</filename></link>
1132 variable in
1133 <link linkend='ref-classes-image'><filename>image.bbclass</filename></link>.
1134 If you define your own image types using a custom BitBake class and
1135 then use <filename>IMAGE_CLASSES</filename> to enable it, the custom
1136 class must either inherit <filename>image_types</filename> or
1137 <filename>image_types</filename> must also appear in
1138 <filename>IMAGE_CLASSES</filename>.
1139 </para>
1140</section>
1141
1142<section id='ref-classes-image_types_uboot'>
1143 <title><filename>image_types_uboot.bbclass</filename></title>
1144
1145 <para>
1146 The <filename>image_types_uboot</filename> class
1147 defines additional image types specifically for the U-Boot bootloader.
1148 </para>
1149</section>
1150
1151<section id='ref-classes-image-live'>
1152 <title><filename>image-live.bbclass</filename></title>
1153
1154 <para>
1155 The <filename>image-live</filename> class supports building "live"
1156 images.
1157 </para>
1158
1159 <para>
1160 Normally, you do not use this class directly.
1161 Instead, you add "live" to
1162 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>.
1163 For example, if you were building an ISO image, you would add "live"
1164 to <filename>IMAGE_FSTYPES</filename>, set the
1165 <link linkend='var-NOISO'><filename>NOISO</filename></link> variable to
1166 "0" and the build system would use the <filename>image-live</filename>
1167 class to build the ISO image.
1168 </para>
1169</section>
1170
1171<section id='ref-classes-image-mklibs'>
1172 <title><filename>image-mklibs.bbclass</filename></title>
1173
1174 <para>
1175 The <filename>image-mklibs</filename> class
1176 enables the use of the <filename>mklibs</filename> utility during the
1177 <filename>do_rootfs</filename> task, which optimizes the size of
1178 libraries contained in the image.
1179 </para>
1180
1181 <para>
1182 By default, the class is enabled in the
1183 <filename>local.conf.template</filename> using the
1184 <link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link>
1185 variable as follows:
1186 <literallayout class='monospaced'>
1187 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
1188 </literallayout>
1189 </para>
1190</section>
1191
1192<section id='ref-classes-image-prelink'>
1193 <title><filename>image-prelink.bbclass</filename></title>
1194
1195 <para>
1196 The <filename>image-prelink</filename> class
1197 enables the use of the <filename>prelink</filename> utility during
1198 the <filename>do_rootfs</filename> task, which optimizes the dynamic
1199 linking of shared libraries to reduce executable startup time.
1200 </para>
1201
1202 <para>
1203 By default, the class is enabled in the
1204 <filename>local.conf.template</filename> using the
1205 <link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link>
1206 variable as follows:
1207 <literallayout class='monospaced'>
1208 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
1209 </literallayout>
1210 </para>
1211</section>
1212
1213<section id='ref-classes-image-swab'>
1214 <title><filename>image-swab.bbclass</filename></title>
1215
1216 <para>
1217 The <filename>image-swab</filename> class enables the
1218 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/swabber'>Swabber</ulink>
1219 tool in order to detect and log accesses to the host system during
1220 the OpenEmbedded build process.
1221 <note>
1222 This class is currently unmaintained.
1223 </note>
1224 </para>
1225</section>
1226
1227<section id='ref-classes-image-vmdk'>
1228 <title><filename>image-vmdk.bbclass</filename></title>
1229
1230 <para>
1231 The <filename>image-vmdk</filename> class supports building VMware
1232 VMDK images.
1233 Normally, you do not use this class directly.
1234 Instead, you add "vmdk" to
1235 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>.
1236 </para>
1237</section>
1238
1239<section id='ref-classes-insane'>
1240 <title><filename>insane.bbclass</filename></title>
1241
1242 <para>
1243 The <filename>insane</filename> class adds a step to the package
1244 generation process so that output quality assurance checks are
1245 generated by the OpenEmbedded build system.
1246 A range of checks are performed that check the build's output
1247 for common problems that show up during runtime.
1248 Distribution policy usually dictates whether to include this class.
1249 </para>
1250
1251 <para>
1252 You can configure the sanity checks so that specific test failures
1253 either raise a warning or an error message.
1254 Typically, failures for new tests generate a warning.
1255 Subsequent failures for the same test would then generate an error
1256 message once the metadata is in a known and good condition.
1257 </para>
1258
1259 <para>
1260 Use the
1261 <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link> and
1262 <link linkend='var-ERROR_QA'><filename>ERROR_QA</filename></link>
1263 variables to control the behavior of
1264 these checks at the global level (i.e. in your custom distro
1265 configuration).
1266 However, to skip one or more checks in recipes, you should use
1267 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>.
1268 For example, to skip the check for symbolic link
1269 <filename>.so</filename> files in the main package of a recipe,
1270 add the following to the recipe.
1271 You need to realize that the package name override, in this example
1272 <filename>${PN}</filename>, must be used:
1273 <literallayout class='monospaced'>
1274 INSANE_SKIP_${PN} += "dev-so"
1275 </literallayout>
1276 Please keep in mind that the QA checks exist in order to detect real
1277 or potential problems in the packaged output.
1278 So exercise caution when disabling these checks.
1279 </para>
1280
1281 <para>
1282 The following list shows the tests you can list with the
1283 <filename>WARN_QA</filename> and <filename>ERROR_QA</filename>
1284 variables:
1285 <itemizedlist>
1286 <listitem><para><emphasis><filename>already-stripped:</filename></emphasis>
1287 Checks that produced binaries have not already been
1288 stripped prior to the build system extracting debug symbols.
1289 It is common for upstream software projects to default to
1290 stripping debug symbols for output binaries.
1291 In order for debugging to work on the target using
1292 <filename>-dbg</filename> packages, this stripping must be
1293 disabled.
1294 </para></listitem>
1295 <listitem><para><emphasis><filename>arch:</filename></emphasis>
1296 Checks the Executable and Linkable Format (ELF) type, bit size,
1297 and endianness of any binaries to ensure they match the target
1298 architecture.
1299 This test fails if any binaries do not match the type since
1300 there would be an incompatibility.
1301 The test could indicate that the
1302 wrong compiler or compiler options have been used.
1303 Sometimes software, like bootloaders, might need to bypass
1304 this check.
1305 </para></listitem>
1306 <listitem><para><emphasis><filename>buildpaths:</filename></emphasis>
1307 Checks for paths to locations on the build host inside the
1308 output files.
1309 Currently, this test triggers too many false positives and
1310 thus is not normally enabled.
1311 </para></listitem>
1312 <listitem><para><emphasis><filename>compile-host-path:</filename></emphasis>
1313 Checks the <filename>do_compile</filename> log for indications
1314 that paths to locations on the build host were used.
1315 Using such paths might result in host contamination of the
1316 build output.
1317 </para></listitem>
1318 <listitem><para><emphasis><filename>debug-deps:</filename></emphasis>
1319 Checks that <filename>-dbg</filename> packages only depend on other
1320 <filename>-dbg</filename> packages and not on any other types of packages,
1321 which would cause a packaging bug.</para></listitem>
1322 <listitem><para><emphasis><filename>debug-files:</filename></emphasis>
1323 Checks for <filename>.debug</filename> directories in anything but the
1324 <filename>-dbg</filename> package.
1325 The debug files should all be in the <filename>-dbg</filename> package.
1326 Thus, anything packaged elsewhere is incorrect packaging.</para></listitem>
1327 <listitem><para><emphasis><filename>dep-cmp:</filename></emphasis>
1328 Checks for invalid version comparison statements in runtime
1329 dependency relationships between packages (i.e. in
1330 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
1331 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
1332 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
1333 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
1334 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
1335 and
1336 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>
1337 variable values).
1338 Any invalid comparisons might trigger failures or undesirable
1339 behavior when passed to the package manager.
1340 </para></listitem>
1341 <listitem><para><emphasis><filename>desktop:</filename></emphasis>
1342 Runs the <filename>desktop-file-validate</filename> program
1343 against any <filename>.desktop</filename> files to validate
1344 their contents against the specification for
1345 <filename>.desktop</filename> files.</para></listitem>
1346 <listitem><para><emphasis><filename>dev-deps:</filename></emphasis>
1347 Checks that <filename>-dev</filename> packages only depend on other
1348 <filename>-dev</filename> packages and not on any other types of packages,
1349 which would be a packaging bug.</para></listitem>
1350 <listitem><para><emphasis><filename>dev-so:</filename></emphasis>
1351 Checks that the <filename>.so</filename> symbolic links are in the
1352 <filename>-dev</filename> package and not in any of the other packages.
1353 In general, these symlinks are only useful for development purposes.
1354 Thus, the <filename>-dev</filename> package is the correct location for
1355 them.
1356 Some very rare cases do exist for dynamically loaded modules where
1357 these symlinks are needed instead in the main package.
1358 </para></listitem>
1359 <listitem><para><emphasis><filename>files-invalid:</filename></emphasis>
1360 Checks for
1361 <link linkend='var-FILES'><filename>FILES</filename></link>
1362 variable values that contain "//", which is invalid.
1363 </para></listitem>
1364 <listitem><para><emphasis><filename>incompatible-license:</filename></emphasis>
1365 Report when packages are excluded from being created due to
1366 being marked with a license that is in
1367 <link linkend='var-INCOMPATIBLE_LICENSE'><filename>INCOMPATIBLE_LICENSE</filename></link>.
1368 </para></listitem>
1369 <listitem><para><emphasis><filename>install-host-path:</filename></emphasis>
1370 Checks the <filename>do_install</filename> log for indications
1371 that paths to locations on the build host were used.
1372 Using such paths might result in host contamination of the
1373 build output.
1374 </para></listitem>
1375 <listitem><para><emphasis><filename>installed-vs-shipped:</filename></emphasis>
1376 Reports when files have been installed within
1377 <filename>do_install</filename> but have not been included in
1378 any package by way of the
1379 <link linkend='var-FILES'><filename>FILES</filename></link>
1380 variable.
1381 Files that do not appear in any package cannot be present in
1382 an image later on in the build process.
1383 Ideally, all installed files should be packaged or not
1384 installed at all.
1385 These files can be deleted at the end of
1386 <filename>do_install</filename> if the files are not
1387 needed in any package.
1388 </para></listitem>
1389 <listitem><para><emphasis><filename>la:</filename></emphasis>
1390 Checks <filename>.la</filename> files for any <filename>TMPDIR</filename>
1391 paths.
1392 Any <filename>.la</filename> file containing these paths is incorrect since
1393 <filename>libtool</filename> adds the correct sysroot prefix when using the
1394 files automatically itself.</para></listitem>
1395 <listitem><para><emphasis><filename>ldflags:</filename></emphasis>
1396 Ensures that the binaries were linked with the
1397 <filename>LDFLAGS</filename> options provided by the build system.
1398 If this test fails, check that the <filename>LDFLAGS</filename> variable
1399 is being passed to the linker command.</para></listitem>
1400 <listitem><para><emphasis><filename>libdir:</filename></emphasis>
1401 Checks for libraries being installed into incorrect
1402 (possibly hardcoded) installation paths.
1403 For example, this test will catch recipes that install
1404 <filename>/lib/bar.so</filename> when
1405 <filename>${base_libdir}</filename> is "lib32".
1406 Another example is when recipes install
1407 <filename>/usr/lib64/foo.so</filename> when
1408 <filename>${libdir}</filename> is "/usr/lib".
1409 </para></listitem>
1410 <listitem><para><emphasis><filename>libexec:</filename></emphasis>
1411 Checks if a package contains files in
1412 <filename>/usr/libexec</filename>.
1413 This check is not performed if the
1414 <filename>libexecdir</filename> variable has been set
1415 explicitly to <filename>/usr/libexec</filename>.
1416 </para></listitem>
1417 <listitem><para><emphasis><filename>packages-list:</filename></emphasis>
1418 Checks for the same package being listed multiple times through
1419 the <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
1420 variable value.
1421 Installing the package in this manner can cause errors during
1422 packaging.
1423 </para></listitem>
1424 <listitem><para><emphasis><filename>perm-config:</filename></emphasis>
1425 Reports lines in <filename>fs-perms.txt</filename> that have
1426 an invalid format.
1427 </para></listitem>
1428 <listitem><para><emphasis><filename>perm-line:</filename></emphasis>
1429 Reports lines in <filename>fs-perms.txt</filename> that have
1430 an invalid format.
1431 </para></listitem>
1432 <listitem><para><emphasis><filename>perm-link:</filename></emphasis>
1433 Reports lines in <filename>fs-perms.txt</filename> that
1434 specify 'link' where the specified target already exists.
1435 </para></listitem>
1436 <listitem><para><emphasis><filename>perms:</filename></emphasis>
1437 Currently, this check is unused but reserved.
1438 </para></listitem>
1439 <listitem><para><emphasis><filename>pkgconfig:</filename></emphasis>
1440 Checks <filename>.pc</filename> files for any
1441 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>/<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
1442 paths.
1443 Any <filename>.pc</filename> file containing these paths is incorrect
1444 since <filename>pkg-config</filename> itself adds the correct sysroot prefix
1445 when the files are accessed.</para></listitem>
1446 <listitem><para><emphasis><filename>pkgname:</filename></emphasis>
1447 Checks that all packages in
1448 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
1449 have names that do not contain invalid characters (i.e.
1450 characters other than 0-9, a-z, ., +, and -).
1451 </para></listitem>
1452 <listitem><para><emphasis><filename>pkgv-undefined:</filename></emphasis>
1453 Checks to see if the <filename>PKGV</filename> variable
1454 is undefined during <filename>do_package</filename>.
1455 </para></listitem>
1456 <listitem><para><emphasis><filename>pkgvarcheck:</filename></emphasis>
1457 Checks through the variables
1458 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
1459 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
1460 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
1461 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>,
1462 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
1463 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
1464 <link linkend='var-FILES'><filename>FILES</filename></link>,
1465 <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>,
1466 <filename>pkg_preinst</filename>,
1467 <filename>pkg_postinst</filename>,
1468 <filename>pkg_prerm</filename>
1469 and <filename>pkg_postrm</filename>, and reports if there are
1470 variable sets that are not package-specific.
1471 Using these variables without a package suffix is bad practice,
1472 and might unnecessarily complicate dependencies of other packages
1473 within the same recipe or have other unintended consequences.
1474 </para></listitem>
1475 <listitem><para><emphasis><filename>pn-overrides:</filename></emphasis>
1476 Checks that a recipe does not have a name
1477 (<link linkend='var-PN'><filename>PN</filename></link>) value
1478 that appears in
1479 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
1480 If a recipe is named such that its <filename>PN</filename>
1481 value matches something already in
1482 <filename>OVERRIDES</filename> (e.g. <filename>PN</filename>
1483 happens to be the same as
1484 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
1485 or
1486 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>),
1487 it can have unexpected consequences.
1488 For example, assignments such as
1489 <filename>FILES_${PN} = "xyz"</filename> effectively turn into
1490 <filename>FILES = "xyz"</filename>.
1491 </para></listitem>
1492 <listitem><para><emphasis><filename>rpaths:</filename></emphasis>
1493 Checks for rpaths in the binaries that contain build system paths such
1494 as <filename>TMPDIR</filename>.
1495 If this test fails, bad <filename>-rpath</filename> options are being
1496 passed to the linker commands and your binaries have potential security
1497 issues.</para></listitem>
1498 <listitem><para><emphasis><filename>split-strip:</filename></emphasis>
1499 Reports that splitting or stripping debug symbols from binaries
1500 has failed.
1501 </para></listitem>
1502 <listitem><para><emphasis><filename>staticdev:</filename></emphasis>
1503 Checks for static library files (<filename>*.a</filename>) in
1504 non-<filename>staticdev</filename> packages.
1505 </para></listitem>
1506 <listitem><para><emphasis><filename>symlink-to-sysroot:</filename></emphasis>
1507 Checks for symlinks in packages that point into
1508 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
1509 on the host.
1510 Such symlinks will work on the host, but are clearly invalid
1511 when running on the target.
1512 </para></listitem>
1513 <listitem><para><emphasis><filename>textrel:</filename></emphasis>
1514 Checks for ELF binaries that contain relocations in their
1515 <filename>.text</filename> sections, which can result in a
1516 performance impact at runtime.</para></listitem>
1517 <listitem><para><emphasis><filename>unsafe-references-in-binaries:</filename></emphasis>
1518 Reports when a binary installed in
1519 <filename>${base_libdir}</filename>,
1520 <filename>${base_bindir}</filename>, or
1521 <filename>${base_sbindir}</filename>, depends on another
1522 binary installed under <filename>${exec_prefix}</filename>.
1523 This dependency is a concern if you want the system to remain
1524 basically operable if <filename>/usr</filename> is mounted
1525 separately and is not mounted.
1526 <note>
1527 Defaults for binaries installed in
1528 <filename>${base_libdir}</filename>,
1529 <filename>${base_bindir}</filename>, and
1530 <filename>${base_sbindir}</filename> are
1531 <filename>/lib</filename>, <filename>/bin</filename>, and
1532 <filename>/sbin</filename>, respectively.
1533 The default for a binary installed
1534 under <filename>${exec_prefix}</filename> is
1535 <filename>/usr</filename>.
1536 </note>
1537 </para></listitem>
1538 <listitem><para><emphasis><filename>unsafe-references-in-scripts:</filename></emphasis>
1539 Reports when a script file installed in
1540 <filename>${base_libdir}</filename>,
1541 <filename>${base_bindir}</filename>, or
1542 <filename>${base_sbindir}</filename>, depends on files
1543 installed under <filename>${exec_prefix}</filename>.
1544 This dependency is a concern if you want the system to remain
1545 basically operable if <filename>/usr</filename> is mounted
1546 separately and is not mounted.
1547 <note>
1548 Defaults for binaries installed in
1549 <filename>${base_libdir}</filename>,
1550 <filename>${base_bindir}</filename>, and
1551 <filename>${base_sbindir}</filename> are
1552 <filename>/lib</filename>, <filename>/bin</filename>, and
1553 <filename>/sbin</filename>, respectively.
1554 The default for a binary installed
1555 under <filename>${exec_prefix}</filename> is
1556 <filename>/usr</filename>.
1557 </note>
1558 </para></listitem>
1559 <listitem><para><emphasis><filename>useless-rpaths:</filename></emphasis>
1560 Checks for dynamic library load paths (rpaths) in the binaries that
1561 by default on a standard system are searched by the linker (e.g.
1562 <filename>/lib</filename> and <filename>/usr/lib</filename>).
1563 While these paths will not cause any breakage, they do waste space and
1564 are unnecessary.</para></listitem>
1565 <listitem><para><emphasis><filename>var-undefined:</filename></emphasis>
1566 Reports when variables fundamental to packaging (i.e.
1567 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
1568 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>,
1569 <link linkend='var-D'><filename>D</filename></link>,
1570 <link linkend='var-PN'><filename>PN</filename></link>, and
1571 <link linkend='var-PKGD'><filename>PKGD</filename></link>) are
1572 undefined during <filename>do_package</filename>.
1573 </para></listitem>
1574 <listitem><para><emphasis><filename>version-going-backwards:</filename></emphasis>
1575 If Build History is enabled, reports when a package
1576 being written out has a lower version than the previously
1577 written package under the same name.
1578 If you are placing output packages into a feed and
1579 upgrading packages on a target system using that feed, the
1580 version of a package going backwards can result in the target
1581 system not correctly upgrading to the "new" version of the
1582 package.
1583 <note>
1584 If you are not using runtime package management on your
1585 target system, then you do not need to worry about
1586 this situation.
1587 </note>
1588 </para></listitem>
1589 <listitem><para><emphasis><filename>xorg-driver-abi:</filename></emphasis>
1590 Checks that all packages containing Xorg drivers have ABI
1591 dependencies.
1592 The <filename>xserver-xorg</filename> recipe provides driver
1593 ABI names.
1594 All drivers should depend on the ABI versions that they have
1595 been built against.
1596 Driver recipes that include
1597 <filename>xorg-driver-input.inc</filename>
1598 or <filename>xorg-driver-video.inc</filename> will
1599 automatically get these versions.
1600 Consequently, you should only need to explicitly add
1601 dependencies to binary driver recipes.
1602 </para></listitem>
1603 </itemizedlist>
1604 </para>
1605</section>
1606
1607<section id='ref-classes-insserv'>
1608 <title><filename>insserv.bbclass</filename></title>
1609
1610 <para>
1611 The <filename>insserv</filename> class
1612 uses the <filename>insserv</filename> utility to update the order of
1613 symbolic links in <filename>/etc/rc?.d/</filename> within an image
1614 based on dependencies specified by LSB headers in the
1615 <filename>init.d</filename> scripts themselves.
1616 </para>
1617</section>
1618
1619<section id='ref-classes-kernel'>
1620 <title><filename>kernel.bbclass</filename></title>
1621
1622 <para>
1623 The <filename>kernel</filename> class handles building Linux kernels.
1624 The class contains code to build all kernel trees.
1625 All needed headers are staged into the
1626 <filename><link linkend='var-STAGING_KERNEL_DIR'>STAGING_KERNEL_DIR</link></filename>
1627 directory to allow out-of-tree module builds using
1628 the
1629 <link linkend='ref-classes-module'><filename>module</filename></link>
1630 class.
1631 </para>
1632
1633 <para>
1634 This means that each built kernel module is packaged separately and inter-module
1635 dependencies are created by parsing the <filename>modinfo</filename> output.
1636 If all modules are required, then installing the <filename>kernel-modules</filename>
1637 package installs all packages with modules and various other kernel packages
1638 such as <filename>kernel-vmlinux</filename>.
1639 </para>
1640
1641 <para>
1642 Various other classes are used by the <filename>kernel</filename>
1643 and <filename>module</filename> classes internally including the
1644 <link linkend='ref-classes-kernel-arch'><filename>kernel-arch</filename></link>,
1645 <link linkend='ref-classes-module-base'><filename>module-base</filename></link>,
1646 and
1647 <link linkend='ref-classes-linux-kernel-base'><filename>linux-kernel-base</filename></link>
1648 classes.
1649 </para>
1650</section>
1651
1652<section id='ref-classes-kernel-arch'>
1653 <title><filename>kernel-arch.bbclass</filename></title>
1654
1655 <para>
1656 The <filename>kernel-arch</filename> class
1657 sets the <filename>ARCH</filename> environment variable for Linux
1658 kernel compilation (including modules).
1659 </para>
1660</section>
1661
1662<section id='ref-classes-kernel-module-split'>
1663 <title><filename>kernel-module-split.bbclass</filename></title>
1664
1665 <para>
1666 The <filename>kernel-module-split</filename> class
1667 provides common functionality for splitting Linux kernel modules into
1668 separate packages.
1669 </para>
1670</section>
1671
1672<section id='ref-classes-kernel-yocto'>
1673 <title><filename>kernel-yocto.bbclass</filename></title>
1674
1675 <para>
1676 The <filename>kernel-yocto</filename> class
1677 provides common functionality for building from linux-yocto style
1678 kernel source repositories.
1679 </para>
1680</section>
1681
1682<section id='ref-classes-lib_package'>
1683 <title><filename>lib_package.bbclass</filename></title>
1684
1685 <para>
1686 The <filename>lib_package</filename> class
1687 supports recipes that build libraries and produce executable
1688 binaries, where those binaries should not be installed by default
1689 along with the library.
1690 Instead, the binaries are added to a separate
1691 <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-bin</filename>
1692 package to make their installation optional.
1693 </para>
1694</section>
1695
1696<section id='ref-classes-license'>
1697 <title><filename>license.bbclass</filename></title>
1698
1699 <para>
1700 The <filename>license</filename> class provides license
1701 manifest creation and license exclusion.
1702 This class is enabled by default using the default value for the
1703 <link linkend='var-INHERIT_DISTRO'><filename>INHERIT_DISTRO</filename></link>
1704 variable.
1705 </para>
1706</section>
1707
1708<section id='ref-classes-linux-kernel-base'>
1709 <title><filename>linux-kernel-base.bbclass</filename></title>
1710
1711 <para>
1712 The <filename>linux-kernel-base</filename> class
1713 provides common functionality for recipes that build out of the Linux
1714 kernel source tree.
1715 These builds goes beyond the kernel itself.
1716 For example, the Perf recipe also inherits this class.
1717 </para>
1718</section>
1719
1720<section id='ref-classes-logging'>
1721 <title><filename>logging.bbclass</filename></title>
1722
1723 <para>
1724 The <filename>logging</filename> class provides the standard
1725 shell functions used to log messages for various BitBake severity levels
1726 (i.e. <filename>bbplain</filename>, <filename>bbnote</filename>,
1727 <filename>bbwarn</filename>, <filename>bberror</filename>,
1728 <filename>bbfatal</filename>, and <filename>bbdebug</filename>).
1729 </para>
1730
1731 <para>
1732 This class is enabled by default since it is inherited by
1733 the <filename>base</filename> class.
1734 </para>
1735</section>
1736
1737<section id='ref-classes-meta'>
1738 <title><filename>meta.bbclass</filename></title>
1739
1740 <para>
1741 The <filename>meta</filename> class is inherited by recipes
1742 that do not build any output packages themselves, but act as a "meta"
1743 target for building other recipes.
1744 </para>
1745</section>
1746
1747<section id='ref-classes-metadata_scm'>
1748 <title><filename>metadata_scm.bbclass</filename></title>
1749
1750 <para>
1751 The <filename>metadata_scm</filename> class provides functionality for
1752 querying the branch and revision of a Source Code Manager (SCM)
1753 repository.
1754 </para>
1755
1756 <para>
1757 The <link linkend='ref-classes-base'><filename>base</filename></link>
1758 class uses this class to print the revisions of each layer before
1759 starting every build.
1760 The <filename>metadata_scm</filename> class is enabled by default
1761 because it is inherited by the <filename>base</filename> class.
1762 </para>
1763</section>
1764
1765<section id='ref-classes-mime'>
1766 <title><filename>mime.bbclass</filename></title>
1767
1768 <para>
1769 The <filename>mime</filename> class generates the proper
1770 post-install and post-remove (postinst/postrm) scriptlets for packages
1771 that install MIME type files.
1772 These scriptlets call <filename>update-mime-database</filename> to add
1773 the MIME types to the shared database.
1774 </para>
1775</section>
1776
1777<section id='ref-classes-mirrors'>
1778 <title><filename>mirrors.bbclass</filename></title>
1779
1780 <para>
1781 The <filename>mirrors</filename> class sets up some standard
1782 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link> entries
1783 for source code mirrors.
1784 These mirrors provide a fall-back path in case the upstream source
1785 specified in
1786 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
1787 within recipes is unavailable.
1788 </para>
1789
1790 <para>
1791 This class is enabled by default since it is inherited by the
1792 <link linkend='ref-classes-base'><filename>base</filename></link> class.
1793 </para>
1794</section>
1795
1796<section id='ref-classes-module'>
1797 <title><filename>module.bbclass</filename></title>
1798
1799 <para>
1800 The <filename>module</filename> class provides support for building
1801 out-of-tree Linux kernel modules.
1802 The class inherits the
1803 <link linkend='ref-classes-module-base'><filename>module-base</filename></link>
1804 and
1805 <link linkend='ref-classes-kernel-module-split'><filename>kernel-module-split</filename></link>
1806 classes, and implements <filename>do_compile</filename> and
1807 <filename>do_install</filename> functions.
1808 The class provides everything needed to build and package a kernel
1809 module.
1810 </para>
1811
1812 <para>
1813 For general information on out-of-tree Linux kernel modules, see the
1814 "<ulink url='&YOCTO_DOCS_KERNEL_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
1815 section in the Yocto Project Linux Kernel Development Manual.
1816 </para>
1817</section>
1818
1819<section id='ref-classes-module-base'>
1820 <title><filename>module-base.bbclass</filename></title>
1821
1822 <para>
1823 The <filename>module-base</filename> class provides the base
1824 functionality for building Linux kernel modules.
1825 Typically, a recipe that builds software that includes one or
1826 more kernel modules and has its own means of building
1827 the module inherits this class as opposed to inheriting the
1828 <link linkend='ref-classes-module'><filename>module</filename></link>
1829 class.
1830 </para>
1831</section>
1832
1833<section id='ref-classes-multilib*'>
1834 <title><filename>multilib*.bbclass</filename></title>
1835
1836 <para>
1837 The <filename>multilib*</filename> classes provide support
1838 for building libraries with different target optimizations or target
1839 architectures and installing them side-by-side in the same image.
1840 </para>
1841
1842 <para>
1843 For more information on using the Multilib feature, see the
1844 "<ulink url='&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image'>Combining Multiple Versions of Library Files into One Image</ulink>"
1845 section in the Yocto Project Development Manual.
1846 </para>
1847</section>
1848
1849<section id='ref-classes-native'>
1850 <title><filename>native.bbclass</filename></title>
1851
1852 <para>
1853 The <filename>native</filename> class provides common
1854 functionality for recipes that wish to build tools to run on the build
1855 host (i.e. tools that use the compiler or other tools from the
1856 build host).
1857 </para>
1858
1859 <para>
1860 You can create a recipe that builds tools that run natively on the
1861 host a couple different ways:
1862 <itemizedlist>
1863 <listitem><para>Create a <filename>myrecipe-native.bb</filename>
1864 that inherits the <filename>native</filename> class.
1865 If you use this method, you must order the inherit statement
1866 in the recipe after all other inherit statements so that the
1867 <filename>native</filename> class is inherited last.
1868 </para></listitem>
1869 <listitem><para>Create or modify a target recipe that has adds
1870 the following:
1871 <literallayout class='monospaced'>
1872 <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> = "native"
1873 </literallayout>
1874 Inside the recipe, use <filename>_class-native</filename> and
1875 <filename>_class-target</filename> overrides to specify any
1876 functionality specific to the respective native or target
1877 case.</para></listitem>
1878 </itemizedlist>
1879 </para>
1880
1881 <para>
1882 Although applied differently, the <filename>native</filename> class is
1883 used with both methods.
1884 The advantage of the second method is that you do not need to have two
1885 separate recipes (assuming you need both) for native and target.
1886 All common parts of the recipe are automatically shared.
1887 </para>
1888</section>
1889
1890<section id='ref-classes-nativesdk'>
1891 <title><filename>nativesdk.bbclass</filename></title>
1892
1893 <para>
1894 The <filename>nativesdk</filename> class provides common
1895 functionality for recipes that wish to build tools to run as part of
1896 an SDK (i.e. tools that run on
1897 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>).
1898 </para>
1899
1900 <para>
1901 You can create a recipe that builds tools that run on the SDK machine
1902 a couple different ways:
1903 <itemizedlist>
1904 <listitem><para>Create a <filename>myrecipe-nativesdk.bb</filename>
1905 recipe that inherits the <filename>nativesdk</filename> class.
1906 If you use this method, you must order the inherit statement
1907 in the recipe after all other inherit statements so that the
1908 <filename>nativesdk</filename> class is inherited last.
1909 </para></listitem>
1910 <listitem><para>Create a <filename>nativesdk</filename> variant
1911 of any recipe by adding the following:
1912 <literallayout class='monospaced'>
1913 <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> = "nativesdk"
1914 </literallayout>
1915 Inside the recipe, use <filename>_class-nativesdk</filename> and
1916 <filename>_class-target</filename> overrides to specify any
1917 functionality specific to the respective SDK machine or target
1918 case.</para></listitem>
1919 </itemizedlist>
1920 </para>
1921
1922 <para>
1923 Although applied differently, the <filename>nativesdk</filename> class
1924 is used with both methods.
1925 The advantage of the second method is that you do not need to have two
1926 separate recipes (assuming you need both) for the SDK machine and the
1927 target.
1928 All common parts of the recipe are automatically shared.
1929 </para>
1930</section>
1931
1932<section id='ref-classes-oelint'>
1933 <title><filename>oelint.bbclass</filename></title>
1934
1935 <para>
1936 The <filename>oelint</filename> class is an
1937 obsolete lint checking tool that exists in
1938 <filename>meta/classes</filename> in the
1939 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1940 </para>
1941
1942 <para>
1943 A number of classes exist that are could be generally useful in
1944 OE-Core but are never actually used within OE-Core itself.
1945 The <filename>oelint</filename> class is one such example.
1946 However, being aware of this class can reduce the proliferation of
1947 different versions of similar classes across multiple layers.
1948 </para>
1949</section>
1950
1951<section id='ref-classes-own-mirrors'>
1952 <title><filename>own-mirrors.bbclass</filename></title>
1953
1954 <para>
1955 The <filename>own-mirrors</filename> class makes it
1956 easier to set up your own
1957 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
1958 from which to first fetch source before attempting to fetch it from the
1959 upstream specified in
1960 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
1961 within each recipe.
1962 </para>
1963
1964 <para>
1965 To use this class, inherit it globally and specify
1966 <link linkend='var-SOURCE_MIRROR_URL'><filename>SOURCE_MIRROR_URL</filename></link>.
1967 Here is an example:
1968 <literallayout class='monospaced'>
1969 INHERIT += "own-mirrors"
1970 SOURCE_MIRROR_URL = "http://example.com/my-source-mirror"
1971 </literallayout>
1972 You can specify only a single URL in
1973 <filename>SOURCE_MIRROR_URL</filename>.
1974 </para>
1975</section>
1976
1977<section id='ref-classes-package'>
1978 <title><filename>package.bbclass</filename></title>
1979
1980 <para>
1981 The <filename>package</filename> class supports generating
1982 packages from a build's output.
1983 The core generic functionality is in
1984 <filename>package.bbclass</filename>.
1985 The code specific to particular package types resides in these
1986 package-specific classes:
1987 <link linkend='ref-classes-package_deb'><filename>package_deb</filename></link>,
1988 <link linkend='ref-classes-package_rpm'><filename>package_rpm</filename></link>,
1989 <link linkend='ref-classes-package_ipk'><filename>package_ipk</filename></link>,
1990 and
1991 <link linkend='ref-classes-package_tar'><filename>package_tar</filename></link>.
1992 </para>
1993
1994 <para>
1995 You can control the list of resulting package formats by using the
1996 <filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></filename>
1997 variable defined in your <filename>conf/local.conf</filename>
1998 configuration file, which is located in the
1999 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
2000 When defining the variable, you can specify one or more package types.
2001 Since images are generated from packages, a packaging class is
2002 needed to enable image generation.
2003 The first class listed in this variable is used for image generation.
2004 </para>
2005
2006 <para>
2007 If you take the optional step to set up a repository (package feed)
2008 on the development host that can be used by Smart, you can
2009 install packages from the feed while you are running the image
2010 on the target (i.e. runtime installation of packages).
2011 For more information, see the
2012 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-runtime-package-management'>Using Runtime Package Management</ulink>"
2013 section in the Yocto Project Development Manual.
2014 </para>
2015
2016 <para>
2017 The package-specific class you choose can affect build-time performance
2018 and has space ramifications.
2019 In general, building a package with IPK takes about thirty percent less
2020 time as compared to using RPM to build the same or similar package.
2021 This comparison takes into account a complete build of the package with
2022 all dependencies previously built.
2023 The reason for this discrepancy is because the RPM package manager
2024 creates and processes more
2025 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> than the
2026 IPK package manager.
2027 Consequently, you might consider setting
2028 <filename>PACKAGE_CLASSES</filename> to "package_ipk" if you are
2029 building smaller systems.
2030 </para>
2031
2032 <para>
2033 Before making your package manager decision, however, you should
2034 consider some further things about using RPM:
2035 <itemizedlist>
2036 <listitem><para>
2037 RPM starts to provide more abilities than IPK due to
2038 the fact that it processes more Metadata.
2039 For example, this information includes individual file types,
2040 file checksum generation and evaluation on install, sparse file
2041 support, conflict detection and resolution for Multilib systems,
2042 ACID style upgrade, and repackaging abilities for rollbacks.
2043 </para></listitem>
2044 <listitem><para>
2045 For smaller systems, the extra space used for the Berkeley
2046 Database and the amount of metadata when using RPM can affect
2047 your ability to perform on-device upgrades.
2048 </para></listitem>
2049 </itemizedlist>
2050 </para>
2051
2052 <para>
2053 You can find additional information on the effects of the package
2054 class at these two Yocto Project mailing list links:
2055 <itemizedlist>
2056 <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006362.html'>
2057 https://lists.yoctoproject.org/pipermail/poky/2011-May/006362.html</ulink></para></listitem>
2058 <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006363.html'>
2059 https://lists.yoctoproject.org/pipermail/poky/2011-May/006363.html</ulink></para></listitem>
2060 </itemizedlist>
2061 </para>
2062</section>
2063
2064<section id='ref-classes-package_deb'>
2065 <title><filename>package_deb.bbclass</filename></title>
2066
2067 <para>
2068 The <filename>package_deb</filename> class
2069 provides support for creating packages that use the
2070 <filename>.deb</filename> file format.
2071 The class ensures the packages are written out to the
2072 <filename>${</filename><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link><filename>}/deb</filename>
2073 directory in a <filename>.deb</filename> file format.
2074 </para>
2075
2076 <para>
2077 This class inherits the
2078 <link linkend='ref-classes-package'><filename>package</filename></link>
2079 class and is enabled through the
2080 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
2081 variable in the <filename>local.conf</filename> file.
2082 </para>
2083</section>
2084
2085<section id='ref-classes-package_ipk'>
2086 <title><filename>package_ipk.bbclass</filename></title>
2087
2088 <para>
2089 The <filename>package_ipk</filename> class
2090 provides support for creating packages that use the
2091 <filename>.ipk</filename> file format.
2092 The class ensures the packages are written out to the
2093 <filename>${</filename><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link><filename>}/ipk</filename>
2094 directory in a <filename>.ipk</filename> file format.
2095 </para>
2096
2097 <para>
2098 This class inherits the
2099 <link linkend='ref-classes-package'><filename>package</filename></link>
2100 class and is enabled through the
2101 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
2102 variable in the <filename>local.conf</filename> file.
2103 </para>
2104</section>
2105
2106<section id='ref-classes-package_rpm'>
2107 <title><filename>package_rpm.bbclass</filename></title>
2108
2109 <para>
2110 The <filename>package_deb</filename> class
2111 provides support for creating packages that use the
2112 <filename>.rpm</filename> file format.
2113 The class ensures the packages are written out to the
2114 <filename>${</filename><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link><filename>}/rpm</filename>
2115 directory in a <filename>.rpm</filename> file format.
2116 </para>
2117
2118 <para>
2119 This class inherits the
2120 <link linkend='ref-classes-package'><filename>package</filename></link>
2121 class and is enabled through the
2122 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
2123 variable in the <filename>local.conf</filename> file.
2124 </para>
2125</section>
2126
2127<section id='ref-classes-package_tar'>
2128 <title><filename>package_tar.bbclass</filename></title>
2129
2130 <para>
2131 The <filename>package_tar</filename>
2132 class provides support for creating packages that use the
2133 <filename>.tar</filename> file format.
2134 The class ensures the packages are written out to the
2135 <filename>${</filename><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link><filename>}/tar</filename>
2136 directory in a <filename>.tar</filename> file format.
2137 </para>
2138
2139 <para>
2140 This class inherits the
2141 <link linkend='ref-classes-package'><filename>package</filename></link>
2142 class and is enabled through the
2143 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
2144 variable in the <filename>local.conf</filename> file.
2145 <note>
2146 You cannot specify the <filename>package_tar</filename> class
2147 first using the <filename>PACKAGE_CLASSES</filename> variable.
2148 You must use <filename>.deb</filename>,
2149 <filename>.ipk</filename>, or <filename>.rpm</filename> file
2150 formats for your image or SDK.
2151 </note>
2152 </para>
2153</section>
2154
2155<section id='ref-classes-packagedata'>
2156 <title><filename>packagedata.bbclass</filename></title>
2157
2158 <para>
2159 The <filename>packagedata</filename> class provides
2160 common functionality for reading <filename>pkgdata</filename> files
2161 found in
2162 <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>.
2163 These files contain information about each output package produced by
2164 the OpenEmbedded build system.
2165 </para>
2166
2167 <para>
2168 This class is enabled by default because it is inherited by the
2169 <link linkend='ref-classes-package'><filename>package</filename></link>
2170 class.
2171 </para>
2172</section>
2173
2174<section id='ref-classes-packagegroup'>
2175 <title><filename>packagegroup.bbclass</filename></title>
2176
2177 <para>
2178 The <filename>packagegroup</filename> class sets default values
2179 appropriate for package group recipes (e.g.
2180 <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>,
2181 <filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>,
2182 <filename><link linkend='var-ALLOW_EMPTY'>ALLOW_EMPTY</link></filename>,
2183 and so forth).
2184 It is highly recommended that all package group recipes inherit this class.
2185 </para>
2186
2187 <para>
2188 For information on how to use this class, see the
2189 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-customtasks'>Customizing Images Using Custom Package Groups</ulink>"
2190 section in the Yocto Project Development Manual.
2191 </para>
2192
2193 <para>
2194 Previously, this class was called the <filename>task</filename> class.
2195 </para>
2196</section>
2197
2198<section id='ref-classes-packageinfo'>
2199 <title><filename>packageinfo.bbclass</filename></title>
2200
2201 <para>
2202 The <filename>packageinfo</filename> class
2203 gives a BitBake user interface the ability to retrieve information
2204 about output packages from the <filename>pkgdata</filename> files.
2205 </para>
2206
2207 <para>
2208 This class is enabled automatically when using the
2209 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink>
2210 user interface.
2211 </para>
2212</section>
2213
2214<section id='ref-classes-patch'>
2215 <title><filename>patch.bbclass</filename></title>
2216
2217 <para>
2218 The <filename>patch</filename> class provides all functionality for
2219 applying patches during the <filename>do_patch</filename> task.
2220 </para>
2221
2222 <para>
2223 This class is enabled by default because it is inherited by the
2224 <link linkend='ref-classes-base'><filename>base</filename></link>
2225 class.
2226 </para>
2227</section>
2228
2229<section id='ref-classes-perlnative'>
2230 <title><filename>perlnative.bbclass</filename></title>
2231
2232 <para>
2233 When inherited by a recipe, the <filename>perlnative</filename> class
2234 supports using the native version of Perl built by the build system
2235 rather than using the version provided by the build host.
2236 </para>
2237</section>
2238
2239<section id='ref-classes-pixbufcache'>
2240 <title><filename>pixbufcache.bbclass</filename></title>
2241
2242 <para>
2243 The <filename>pixbufcache</filename> class generates the proper
2244 post-install and post-remove (postinst/postrm) scriptlets for packages
2245 that install pixbuf loaders, which are used with
2246 <filename>gdk-pixbuf</filename>.
2247 These scriptlets call <filename>update_pixbuf_cache</filename>
2248 to add the pixbuf loaders to the cache.
2249 Since the cache files are architecture-specific,
2250 <filename>update_pixbuf_cache</filename> is run using QEMU if the
2251 postinst scriptlets need to be run on the build host during image
2252 creation.
2253 </para>
2254
2255 <para>
2256 If the pixbuf loaders being installed are in packages other
2257 than the recipe's main package, set
2258 <link linkend='var-PIXBUF_PACKAGES'><filename>PIXBUF_PACKAGES</filename></link>
2259 to specify the packages containing the loaders.
2260 </para>
2261</section>
2262
2263<section id='ref-classes-pkgconfig'>
2264 <title><filename>pkgconfig.bbclass</filename></title>
2265
2266 <para>
2267 The <filename>pkg-config</filename> class provides a standard way to get
2268 header and library information.
2269 This class aims to smooth integration of
2270 <filename>pkg-config</filename> into libraries that use it.
2271 </para>
2272
2273 <para>
2274 During staging, BitBake installs <filename>pkg-config</filename> data into the
2275 <filename>sysroots/</filename> directory.
2276 By making use of sysroot functionality within <filename>pkg-config</filename>,
2277 this class no longer has to manipulate the files.
2278 </para>
2279</section>
2280
2281<section id='ref-classes-populate-sdk'>
2282 <title><filename>populate_sdk.bbclass</filename></title>
2283
2284 <para>
2285 The <filename>populate_sdk</filename> class provides support for
2286 SDK-only recipes.
2287 For information on advantages gained when building a cross-development
2288 toolchain using the <filename>do_populate_sdk</filename> task, see the
2289 "<ulink url='&YOCTO_DOCS_ADT_URL;#optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</ulink>"
2290 section in the Yocto Project Application Developer's Guide.
2291 </para>
2292</section>
2293
2294<section id='ref-classes-populate-sdk-*'>
2295 <title><filename>populate_sdk_*.bbclass</filename></title>
2296
2297 <para>
2298 The <filename>populate_sdk_*</filename> classes support SDK creation
2299 and consist of the following classes:
2300 <itemizedlist>
2301 <listitem><para><emphasis><filename>populate_sdk_base</filename>:</emphasis>
2302 The base class supporting SDK creation under all package
2303 managers (i.e. DEB, RPM, and IPK).</para></listitem>
2304 <listitem><para><emphasis><filename>populate_sdk_deb</filename>:</emphasis>
2305 Supports creation of the SDK given the Debian package manager.
2306 </para></listitem>
2307 <listitem><para><emphasis><filename>populate_sdk_rpm</filename>:</emphasis>
2308 Supports creation of the SDK given the RPM package manager.
2309 </para></listitem>
2310 <listitem><para><emphasis><filename>populate_sdk_ipk</filename>:</emphasis>
2311 Supports creation of the SDK given the IPK package manager.
2312 </para></listitem>
2313 </itemizedlist>
2314 </para>
2315
2316 <para>
2317 The <filename>populate_sdk_base</filename> package inherits the
2318 appropriate <filename>populate_sdk_*</filename> (i.e.
2319 <filename>deb</filename>, <filename>rpm</filename>, and
2320 <filename>ipk</filename>) based on
2321 <link linkend='var-IMAGE_PKGTYPE'><filename>IMAGE_PKGTYPE</filename></link>.
2322 </para>
2323
2324 <para>
2325 The base class ensures all source and destination directories are
2326 established and then populates the SDK.
2327 After populating the SDK, the <filename>populate_sdk_base</filename>
2328 class constructs two images:
2329 <link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link><filename>-nativesdk</filename>,
2330 which contains the cross-compiler and associated tooling, and the
2331 target, which contains a target root filesystem that is configured for
2332 the SDK usage.
2333 These two images reside in
2334 <link linkend='var-SDK_OUTPUT'><filename>SDK_OUTPUT</filename></link>,
2335 which consists of the following:
2336 <literallayout class='monospaced'>
2337 ${SDK_OUTPUT}/&lt;sdk_arch-nativesdk pkgs&gt;
2338 ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/&lt;target pkgs&gt;
2339 </literallayout>
2340 </para>
2341
2342 <para>
2343 Finally, the base populate SDK class creates the toolchain
2344 environment setup script, the tarball of the SDK, and the installer.
2345 </para>
2346
2347 <para>
2348 The respective <filename>populate_sdk_deb</filename>,
2349 <filename>populate_sdk_rpm</filename>, and
2350 <filename>populate_sdk_ipk</filename> classes each support the
2351 specific type of SDK.
2352 These classes are inherited by and used with the
2353 <filename>populate_sdk_base</filename> class.
2354 </para>
2355
2356 <para>
2357 For more information on the cross-development toolchain
2358 generation, see the
2359 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
2360 section.
2361 For information on advantages gained when building a
2362 cross-development toolchain using the
2363 <filename>do_populate_sdk</filename> task, see the
2364 "<ulink url='&YOCTO_DOCS_ADT_URL;#optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</ulink>"
2365 section in the Yocto Project Application Developer's Guide.
2366 </para>
2367</section>
2368
2369<section id='ref-classes-prexport'>
2370 <title><filename>prexport.bbclass</filename></title>
2371
2372 <para>
2373 The <filename>prexport</filename> class provides functionality for
2374 exporting
2375 <link linkend='var-PR'><filename>PR</filename></link> values.
2376 <note>
2377 This class is not intended to be used directly.
2378 Rather, it is enabled when using
2379 "<filename>bitbake-prserv-tool export</filename>".
2380 </note>
2381 </para>
2382</section>
2383
2384<section id='ref-classes-primport'>
2385 <title><filename>primport.bbclass</filename></title>
2386
2387 <para>
2388 The <filename>primport</filename> class provides functionality for
2389 importing
2390 <link linkend='var-PR'><filename>PR</filename></link> values.
2391 <note>
2392 This class is not intended to be used directly.
2393 Rather, it is enabled when using
2394 "<filename>bitbake-prserv-tool import</filename>".
2395 </note>
2396 </para>
2397</section>
2398
2399<section id='ref-classes-prserv'>
2400 <title><filename>prserv.bbclass</filename></title>
2401
2402 <para>
2403 The <filename>prserv</filename> class provides functionality for
2404 using a
2405 <ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>PR service</ulink>
2406 in order to automatically manage the incrementing of the
2407 <link linkend='var-PR'><filename>PR</filename></link> variable for
2408 each recipe.
2409 </para>
2410
2411 <para>
2412 This class is enabled by default because it is inherited by the
2413 <link linkend='ref-classes-package'><filename>package</filename></link>
2414 class.
2415 However, the OpenEmbedded build system will not enable the
2416 functionality of this class unless
2417 <link linkend='var-PRSERV_HOST'><filename>PRSERV_HOST</filename></link>
2418 has been set.
2419 </para>
2420</section>
2421
2422<section id='ref-classes-ptest'>
2423 <title><filename>ptest.bbclass</filename></title>
2424
2425 <para>
2426 The <filename>ptest</filename> class provides functionality for
2427 packaging and installing runtime tests for recipes that build software
2428 that provides these tests.
2429 </para>
2430
2431 <para>
2432 This class is intended to be inherited by individual recipes.
2433 However, the class' functionality is largely disabled unless "ptest"
2434 appears in
2435 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
2436 See the
2437 "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>"
2438 section in the Yocto Project Development Manual for more information
2439 on ptest.
2440 </para>
2441</section>
2442
2443<section id='ref-classes-python-dir'>
2444 <title><filename>python-dir.bbclass</filename></title>
2445
2446 <para>
2447 The <filename>python-dir</filename> class provides the base version,
2448 location, and site package location for Python.
2449 </para>
2450</section>
2451
2452<section id='ref-classes-pythonnative'>
2453 <title><filename>pythonnative.bbclass</filename></title>
2454
2455 <para>
2456 When inherited by a recipe, the <filename>pythonnative</filename> class
2457 supports using the native version of Python built by the build system
2458 rather than using the version provided by the build host.
2459 </para>
2460</section>
2461
2462<section id='ref-classes-qemu'>
2463 <title><filename>qemu.bbclass</filename></title>
2464
2465 <para>
2466 The <filename>qemu</filename> class provides functionality for recipes
2467 that either need QEMU or test for the existence of QEMU.
2468 Typically, this class is used to run programs for a target system on
2469 the build host using QEMU's application emulation mode.
2470 </para>
2471</section>
2472
2473<section id='ref-classes-qmake*'>
2474 <title><filename>qmake*.bbclass</filename></title>
2475
2476 <para>
2477 The <filename>qmake*</filename> classes support recipes that
2478 need to build software that uses Qt's <filename>qmake</filename>
2479 build system and are comprised of the following:
2480 <itemizedlist>
2481 <listitem><para><emphasis><filename>qmake_base</filename>:</emphasis>
2482 Provides base functionality for all versions of
2483 <filename>qmake</filename>.</para></listitem>
2484 <listitem><para><emphasis><filename>qmake2</filename>:</emphasis>
2485 Extends base functionality for <filename>qmake</filename> 2.x as
2486 used by Qt 4.x.</para></listitem>
2487 </itemizedlist>
2488 </para>
2489
2490 <para>
2491 If you need to set any configuration variables or pass any options to
2492 <filename>qmake</filename>, you can add these to the
2493 <link linkend='var-EXTRA_QMAKEVARS_PRE'><filename>EXTRA_QMAKEVARS_PRE</filename></link>
2494 or
2495 <link linkend='var-EXTRA_QMAKEVARS_POST'><filename>EXTRA_QMAKEVARS_POST</filename></link>
2496 variables, depending on whether the arguments need to be before or
2497 after the <filename>.pro</filename> file list on the command line,
2498 respectively.
2499 </para>
2500
2501 <para>
2502 By default, all <filename>.pro</filename> files are built.
2503 If you want to specify your own subset of <filename>.pro</filename>
2504 files to be built, specify them in the
2505 <link linkend='var-QMAKE_PROFILES'><filename>QMAKE_PROFILES</filename></link>
2506 variable.
2507 </para>
2508</section>
2509
2510<section id='ref-classes-qt4*'>
2511 <title><filename>qt4*.bbclass</filename></title>
2512
2513 <para>
2514 The <filename>qt4*</filename> classes support recipes that need to
2515 build software that uses the Qt development framework version 4.x
2516 and consist of the following:
2517 <itemizedlist>
2518 <listitem><para><emphasis><filename>qt4e</filename>:</emphasis>
2519 Supports building against Qt/Embedded, which uses the
2520 framebuffer for graphical output.</para></listitem>
2521 <listitem><para><emphasis><filename>qt4x11</filename>:</emphasis>
2522 Supports building against Qt/X11.</para></listitem>
2523 </itemizedlist>
2524 </para>
2525
2526 <para>
2527 The classes inherit the
2528 <link linkend='ref-classes-qmake*'><filename>qmake2</filename></link>
2529 class.
2530 </para>
2531</section>
2532
2533<section id='ref-classes-relocatable'>
2534 <title><filename>relocatable.bbclass</filename></title>
2535
2536 <para>
2537 The <filename>relocatable</filename> class enables relocation of
2538 binaries when they are installed into the sysroot.
2539 </para>
2540
2541 <para>
2542 This class makes use of the
2543 <link linkend='ref-classes-chrpath'><filename>chrpath</filename></link>
2544 class and is used by both the
2545 <link linkend='ref-classes-cross'><filename>cross</filename></link>
2546 and
2547 <link linkend='ref-classes-native'><filename>native</filename></link>
2548 classes.
2549 </para>
2550</section>
2551
2552<section id='ref-classes-report-error'>
2553 <title><filename>report-error.bbclass</filename></title>
2554
2555 <para>
2556 The <filename>report-error</filename> class supports enabling the
2557 <ulink url='&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool'>error reporting tool</ulink>,
2558 which allows you to submit build error information to a central
2559 database.
2560 </para>
2561
2562 <para>
2563 The class collects debug information for recipe, recipe version, task,
2564 machine, distro, build system, target system, host distro, branch,
2565 commit, and log.
2566 From the information, report files using a JSON format are created and
2567 stored in
2568 <filename>${</filename><link linkend='var-LOG_DIR'><filename>LOG_DIR</filename></link><filename>}/error-report</filename>.
2569 </para>
2570</section>
2571
2572<section id='ref-classes-rm-work'>
2573 <title><filename>rm_work.bbclass</filename></title>
2574
2575 <para>
2576 The <filename>rm_work</filename> class supports deletion of temporary
2577 workspace, which can ease your hard drive demands during builds.
2578 </para>
2579
2580 <para>
2581 The OpenEmbedded build system can use a substantial amount of disk
2582 space during the build process.
2583 A portion of this space is the work files under the
2584 <filename>${TMPDIR}/work</filename> directory for each recipe.
2585 Once the build system generates the packages for a recipe, the work
2586 files for that recipe are no longer needed.
2587 However, by default, the build system preserves these files
2588 for inspection and possible debugging purposes.
2589 If you would rather have these files deleted to save disk space
2590 as the build progresses, you can enable <filename>rm_work</filename>
2591 by adding the following to your <filename>local.conf</filename> file,
2592 which is found in the
2593 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
2594 <literallayout class='monospaced'>
2595 INHERIT += "rm_work"
2596 </literallayout>
2597 If you are modifying and building source code out of the work directory
2598 for a recipe, enabling <filename>rm_work</filename> will potentially
2599 result in your changes to the source being lost.
2600 To exclude some recipes from having their work directories deleted by
2601 <filename>rm_work</filename>, you can add the names of the recipe or
2602 recipes you are working on to the <filename>RM_WORK_EXCLUDE</filename>
2603 variable, which can also be set in your <filename>local.conf</filename>
2604 file.
2605 Here is an example:
2606 <literallayout class='monospaced'>
2607 RM_WORK_EXCLUDE += "busybox eglibc"
2608 </literallayout>
2609 </para>
2610</section>
2611
2612<section id='ref-classes-rootfs*'>
2613 <title><filename>rootfs*.bbclass</filename></title>
2614
2615 <para>
2616 The <filename>rootfs*</filename> classes support creating
2617 the root filesystem for an image and consist of the following classes:
2618 <itemizedlist>
2619 <listitem><para>
2620 The <filename>rootfs_deb</filename> class, which supports
2621 creation of root filesystems for images built using
2622 <filename>.deb</filename> packages.</para></listitem>
2623 <listitem><para>
2624 The <filename>rootfs_rpm</filename> class, which supports
2625 creation of root filesystems for images built using
2626 <filename>.rpm</filename> packages.</para></listitem>
2627 <listitem><para>
2628 The <filename>rootfs_ipk</filename> class, which supports
2629 creation of root filesystems for images built using
2630 <filename>.ipk</filename> packages.</para></listitem>
2631 </itemizedlist>
2632 </para>
2633
2634 <para>
2635 The root filesystem is created from packages using one of the
2636 <filename>rootfs*.bbclass</filename> files as determined by the
2637 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
2638 variable.
2639 </para>
2640
2641 <para>
2642 For information on how root filesystem images are created, see the
2643 "<link linkend='image-generation-dev-environment'>Image Generation</link>"
2644 section.
2645 </para>
2646</section>
2647
2648<section id='ref-classes-sanity'>
2649 <title><filename>sanity.bbclass</filename></title>
2650
2651 <para>
2652 The <filename>sanity</filename> class checks to see if prerequisite
2653 software is present on the host system so that users can be notified
2654 of potential problems that might affect their build.
2655 The class also performs basic user configuration checks from
2656 the <filename>local.conf</filename> configuration file to
2657 prevent common mistakes that cause build failures.
2658 Distribution policy usually determines whether to include this class.
2659 </para>
2660</section>
2661
2662<section id='ref-classes-scons'>
2663 <title><filename>scons.bbclass</filename></title>
2664
2665 <para>
2666 The <filename>scons</filename> class supports recipes that need to
2667 build software that uses the SCons build system.
2668 You can use the
2669 <link linkend='var-EXTRA_OESCONS'><filename>EXTRA_OESCONS</filename></link>
2670 variable to specify additional configuration options you want to pass
2671 SCons command line.
2672 </para>
2673</section>
2674
2675<section id='ref-classes-sdl'>
2676 <title><filename>sdl.bbclass</filename></title>
2677
2678 <para>
2679 The <filename>sdl</filename> class supports recipes that need to build
2680 software that uses the Simple DirectMedia Layer (SDL) library.
2681 </para>
2682</section>
2683
2684<section id='ref-classes-setuptools'>
2685 <title><filename>setuptools.bbclass</filename></title>
2686
2687 <para>
2688 The <filename>setuptools</filename> class supports Python
2689 version 2.x extensions that use build systems based on
2690 <filename>setuptools</filename>.
2691 If your recipe uses these build systems, the recipe needs to
2692 inherit the <filename>setuptools</filename> class.
2693 </para>
2694</section>
2695
2696<section id='ref-classes-setuptools3'>
2697 <title><filename>setuptools3.bbclass</filename></title>
2698
2699 <para>
2700 The <filename>setuptools3</filename> class supports Python
2701 version 3.x extensions that use build systems based on
2702 <filename>setuptools3</filename>.
2703 If your recipe uses these build systems, the recipe needs to
2704 inherit the <filename>setuptools3</filename> class.
2705 </para>
2706</section>
2707
2708<section id='ref-classes-sip'>
2709 <title><filename>sip.bbclass</filename></title>
2710
2711 <para>
2712 The <filename>sip</filename> class
2713 supports recipes that build or package SIP-based Python bindings.
2714 </para>
2715</section>
2716
2717<section id='ref-classes-siteconfig'>
2718 <title><filename>siteconfig.bbclass</filename></title>
2719
2720 <para>
2721 The <filename>siteconfig</filename> class
2722 provides functionality for handling site configuration.
2723 The class is used by the
2724 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
2725 class to accelerate the <filename>do_configure</filename> task.
2726 </para>
2727</section>
2728
2729<section id='ref-classes-siteinfo'>
2730 <title><filename>siteinfo.bbclass</filename></title>
2731
2732 <para>
2733 The <filename>siteinfo</filename> class provides information about
2734 the targets that might be needed by other classes or recipes.
2735 </para>
2736
2737 <para>
2738 As an example, consider Autotools, which can require tests that must
2739 execute on the target hardware.
2740 Since this is not possible in general when cross compiling, site
2741 information is used to provide cached test results so these tests can
2742 be skipped over but still make the correct values available.
2743 The
2744 <filename><link linkend='structure-meta-site'>meta/site directory</link></filename>
2745 contains test results sorted into different categories such as
2746 architecture, endianness, and the <filename>libc</filename> used.
2747 Site information provides a list of files containing data relevant to
2748 the current build in the
2749 <filename><link linkend='var-CONFIG_SITE'>CONFIG_SITE</link></filename> variable
2750 that Autotools automatically picks up.
2751 </para>
2752
2753 <para>
2754 The class also provides variables like
2755 <filename><link linkend='var-SITEINFO_ENDIANNESS'>SITEINFO_ENDIANNESS</link></filename>
2756 and <filename><link linkend='var-SITEINFO_BITS'>SITEINFO_BITS</link></filename>
2757 that can be used elsewhere in the metadata.
2758 </para>
2759
2760 <para>
2761 Because the
2762 <link linkend='ref-classes-base'><filename>base</filename></link> class
2763 includes the <filename>siteinfo</filename> class, it is always active.
2764 </para>
2765</section>
2766
2767<section id='ref-classes-spdx'>
2768 <title><filename>spdx.bbclass</filename></title>
2769
2770 <para>
2771 The <filename>spdx</filename> class integrates real-time license
2772 scanning, generation of SPDX standard output, and verification
2773 of license information during the build.
2774 <note>
2775 This class is currently at the prototype stage in the 1.5
2776 release.
2777 </note>
2778 </para>
2779</section>
2780
2781<section id='ref-classes-sstate'>
2782 <title><filename>sstate.bbclass</filename></title>
2783
2784 <para>
2785 The <filename>sstate</filename> class provides support for Shared
2786 State (sstate).
2787 By default, the class is enabled through the
2788 <link linkend='var-INHERIT_DISTRO'><filename>INHERIT_DISTRO</filename></link>
2789 variable's default value.
2790 </para>
2791
2792 <para>
2793 For more information on sstate, see the
2794 "<link linkend='shared-state-cache'>Shared State Cache</link>"
2795 section.
2796 </para>
2797</section>
2798
2799<section id='ref-classes-staging'>
2800 <title><filename>staging.bbclass</filename></title>
2801
2802 <para>
2803 The <filename>staging</filename> class provides support for staging
2804 files into the sysroot during the
2805 <filename>do_populate_sysroot</filename> task.
2806 The class is enabled by default because it is inherited by the
2807 <link linkend='ref-classes-base'><filename>base</filename></link>
2808 class.
2809 </para>
2810</section>
2811
2812<section id='ref-classes-syslinux'>
2813 <title><filename>syslinux.bbclass</filename></title>
2814
2815 <para>
2816 The <filename>syslinux</filename> class provides syslinux-specific
2817 functions for building bootable images.
2818 </para>
2819
2820 <para>
2821 The class supports the following variables:
2822 <itemizedlist>
2823 <listitem><para><emphasis><link linkend='var-INITRD'><filename>INITRD</filename></link>:</emphasis>
2824 Indicates a filesystem image to use as an initial RAM disk
2825 (initrd).
2826 This variable is optional.</para></listitem>
2827 <listitem><para><emphasis><link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>:</emphasis>
2828 Indicates a filesystem image to include as the root filesystem.
2829 This variable is optional.</para></listitem>
2830 <listitem><para><emphasis><link linkend='var-AUTO_SYSLINUXMENU'><filename>AUTO_SYSLINUXMENU</filename></link>:</emphasis>
2831 Enables creating an automatic menu when set to "1".
2832 </para></listitem>
2833 <listitem><para><emphasis><link linkend='var-LABELS'><filename>LABELS</filename></link>:</emphasis>
2834 Lists targets for automatic configuration.
2835 </para></listitem>
2836 <listitem><para><emphasis><link linkend='var-APPEND'><filename>APPEND</filename></link>:</emphasis>
2837 Lists append string overrides for each label.
2838 </para></listitem>
2839 <listitem><para><emphasis><link linkend='var-SYSLINUX_OPTS'><filename>SYSLINUX_OPTS</filename></link>:</emphasis>
2840 Lists additional options to add to the syslinux file.
2841 Semicolon characters separate multiple options.
2842 </para></listitem>
2843 <listitem><para><emphasis><link linkend='var-SYSLINUX_SPLASH'><filename>SYSLINUX_SPLASH</filename></link>:</emphasis>
2844 Lists a background for the VGA boot menu when you are using the
2845 boot menu.</para></listitem>
2846 <listitem><para><emphasis><link linkend='var-SYSLINUX_DEFAULT_CONSOLE'><filename>SYSLINUX_DEFAULT_CONSOLE</filename></link>:</emphasis>
2847 Set to "console=ttyX" to change kernel boot default console.
2848 </para></listitem>
2849 <listitem><para><emphasis><link linkend='var-SYSLINUX_SERIAL'><filename>SYSLINUX_SERIAL</filename></link>:</emphasis>
2850 Sets an alternate serial port.
2851 Or, turns off serial when the variable is set with an
2852 empty string.</para></listitem>
2853 <listitem><para><emphasis><link linkend='var-SYSLINUX_SERIAL_TTY'><filename>SYSLINUX_SERIAL_TTY</filename></link>:</emphasis>
2854 Sets an alternate "console=tty..." kernel boot argument.
2855 </para></listitem>
2856 </itemizedlist>
2857 </para>
2858</section>
2859
2860<section id='ref-classes-systemd'>
2861 <title><filename>systemd.bbclass</filename></title>
2862
2863 <para>
2864 The <filename>systemd</filename> class provides support for recipes
2865 that install systemd unit files.
2866 </para>
2867
2868 <para>
2869 The functionality for this class is disabled unless you have "systemd"
2870 in
2871 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
2872 </para>
2873
2874 <para>
2875 Under this class, the recipe or Makefile (i.e. whatever the recipe is
2876 calling during the <filename>do_install</filename> task) installs unit
2877 files into
2878 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}${systemd_unitdir}/system</filename>.
2879 If the unit files being installed go into packages other than the
2880 main package, you need to set
2881 <link linkend='var-SYSTEMD_PACKAGES'><filename>SYSTEMD_PACKAGES</filename></link>
2882 in your recipe to identify the packages in which the files will be
2883 installed.
2884 </para>
2885
2886 <para>
2887 You should set
2888 <link linkend='var-SYSTEMD_SERVICE'><filename>SYSTEMD_SERVICE</filename></link>
2889 to the name of the service file.
2890 You should also use a package name override to indicate the package
2891 to which the value applies.
2892 If the value applies to the recipe's main package, use
2893 <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>.
2894 Here is an example from the connman recipe:
2895 <literallayout class='monospaced'>
2896 SYSTEMD_SERVICE_${PN} = "connman.service"
2897 </literallayout>
2898 Services are set up to start on boot automatically unless
2899 you have set
2900 <link linkend='var-SYSTEMD_AUTO_ENABLE'><filename>SYSTEMD_AUTO_ENABLE</filename></link>
2901 to "disable".
2902 </para>
2903
2904 <para>
2905 For more information on <filename>systemd</filename>, see the
2906 "<ulink url='&YOCTO_DOCS_DEV_URL;#selecting-an-initialization-manager'>Selecting an Initialization Manager</ulink>"
2907 section in the Yocto Project Development Manual.
2908 </para>
2909</section>
2910
2911<section id='ref-classes-terminal'>
2912 <title><filename>terminal.bbclass</filename></title>
2913
2914 <para>
2915 The <filename>terminal</filename> class provides support for starting
2916 a terminal session.
2917 The
2918 <link linkend='var-OE_TERMINAL'><filename>OE_TERMINAL</filename></link>
2919 variable controls which terminal emulator is used for the session.
2920 </para>
2921
2922 <para>
2923 Other classes use the <filename>terminal</filename> class anywhere a
2924 separate terminal session needs to be started.
2925 For example, the
2926 <link linkend='ref-classes-patch'><filename>patch</filename></link>
2927 class assuming
2928 <link linkend='var-PATCHRESOLVE'><filename>PATCHRESOLVE</filename></link>
2929 is set to "user", the
2930 <link linkend='ref-classes-cml1'><filename>cml1</filename></link>
2931 class, and the
2932 <link linkend='ref-classes-devshell'><filename>devshell</filename></link>
2933 class all use the <filename>terminal</filename> class.
2934 </para>
2935</section>
2936
2937<section id='ref-classes-testimage'>
2938 <title><filename>testimage.bbclass</filename></title>
2939
2940 <para>
2941 The <filename>testimage</filename> class supports running automated
2942 tests against images using QEMU and on actual hardware.
2943 The class handles loading the tests and starting the image.
2944 </para>
2945
2946 <para>
2947 To use the class, you need to perform steps to set up the
2948 environment.
2949 The tests are commands that run on the target system over
2950 <filename>ssh</filename>.
2951 they are written in Python and make use of the
2952 <filename>unittest</filename> module.
2953 </para>
2954
2955 <para>
2956 For information on how to enable, run, and create new tests, see the
2957 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
2958 section.
2959 </para>
2960</section>
2961
2962<section id='ref-classes-tinderclient'>
2963 <title><filename>tinderclient.bbclass</filename></title>
2964
2965 <para>
2966 The <filename>tinderclient</filename> class submits build results to
2967 an external Tinderbox instance.
2968 <note>
2969 This class is currently unmaintained.
2970 </note>
2971 </para>
2972</section>
2973
2974<section id='ref-classes-toaster'>
2975 <title><filename>toaster.bbclass</filename></title>
2976
2977 <para>
2978 The <filename>toaster</filename> class collects information about
2979 packages and images and sends them as events that the BitBake
2980 user interface can receive.
2981 The class is enabled when the Toaster user interface is running.
2982 </para>
2983
2984 <para>
2985 This class is not intended to be used directly.
2986 </para>
2987</section>
2988
2989<section id='ref-classes-toolchain-scripts'>
2990 <title><filename>toolchain-scripts.bbclass</filename></title>
2991
2992 <para>
2993 The <filename>toolchain-scripts</filename> class provides the scripts
2994 used for setting up the environment for installed SDKs.
2995 </para>
2996</section>
2997
2998<section id='ref-classes-typecheck'>
2999 <title><filename>typecheck.bbclass</filename></title>
3000
3001 <para>
3002 The <filename>typecheck</filename> class provides support for
3003 validating the values of variables set at the configuration level
3004 against their defined types.
3005 The OpenEmbedded build system allows you to define the type of a
3006 variable using the "type" varflag.
3007 Here is an example:
3008 <literallayout class='monospaced'>
3009 IMAGE_FEATURES[type] = "list"
3010 </literallayout>
3011 </para>
3012</section>
3013
3014<section id='ref-classes-uboot-config'>
3015 <title><filename>uboot-config.bbclass</filename></title>
3016
3017 <para>
3018 The <filename>uboot-config</filename> class provides support for
3019 U-Boot configuration for a machine.
3020 Specify the machine in your recipe as follows:
3021 <literallayout class='monospaced'>
3022 UBOOT_CONFIG ??= &lt;default&gt;
3023 UBOOT_CONFIG[foo] = "config,images"
3024 </literallayout>
3025 You can also specify the machine using this method:
3026 <literallayout class='monospaced'>
3027 UBOOT_MACHINE = "config"
3028 </literallayout>
3029 See the
3030 <link linkend='var-UBOOT_CONFIG'><filename>UBOOT_CONFIG</filename></link>
3031 and
3032 <link linkend='var-UBOOT_MACHINE'><filename>UBOOT_MACHINE</filename></link>
3033 variables for additional information.
3034 </para>
3035</section>
3036
3037<section id='ref-classes-update-alternatives'>
3038 <title><filename>update-alternatives.bbclass</filename></title>
3039
3040 <para>
3041 The <filename>update-alternatives</filename> class helps the
3042 alternatives system when multiple sources provide the same command.
3043 This situation occurs when several programs that have the same or
3044 similar function are installed with the same name.
3045 For example, the <filename>ar</filename> command is available from the
3046 <filename>busybox</filename>, <filename>binutils</filename> and
3047 <filename>elfutils</filename> packages.
3048 The <filename>update-alternatives</filename> class handles
3049 renaming the binaries so that multiple packages can be installed
3050 without conflicts.
3051 The <filename>ar</filename> command still works regardless of which
3052 packages are installed or subsequently removed.
3053 The class renames the conflicting binary in each package and symlinks
3054 the highest priority binary during installation or removal of packages.
3055 </para>
3056
3057 <para>
3058 To use this class, you need to define a number of variables:
3059 <itemizedlist>
3060 <listitem><para><link linkend='var-ALTERNATIVE'><filename>ALTERNATIVE</filename></link>
3061 </para></listitem>
3062 <listitem><para><link linkend='var-ALTERNATIVE_LINK_NAME'><filename>ALTERNATIVE_LINK_NAME</filename></link>
3063 </para></listitem>
3064 <listitem><para><link linkend='var-ALTERNATIVE_TARGET'><filename>ALTERNATIVE_TARGET</filename></link>
3065 </para></listitem>
3066 <listitem><para><link linkend='var-ALTERNATIVE_PRIORITY'><filename>ALTERNATIVE_PRIORITY</filename></link>
3067 </para></listitem>
3068 </itemizedlist>
3069 These variables list alternative commands needed by a package,
3070 provide pathnames for links, default links for targets, and
3071 so forth.
3072 For details on how to use this class, see the comments in the
3073 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/update-alternatives.bbclass'><filename>update-alternatives.bbclass</filename></ulink>.
3074 </para>
3075
3076 <note>
3077 You can use the <filename>update-alternatives</filename> command
3078 directly in your recipes.
3079 However, this class simplifies things in most cases.
3080 </note>
3081</section>
3082
3083<section id='ref-classes-update-rc.d'>
3084 <title><filename>update-rc.d.bbclass</filename></title>
3085
3086 <para>
3087 The <filename>update-rc.d</filename> class uses
3088 <filename>update-rc.d</filename> to safely install an
3089 initialization script on behalf of the package.
3090 The OpenEmbedded build system takes care of details such as making
3091 sure the script is stopped before a package is removed and started when
3092 the package is installed.
3093 </para>
3094
3095 <para>
3096 Three variables control this class:
3097 <filename><link linkend='var-INITSCRIPT_PACKAGES'>INITSCRIPT_PACKAGES</link></filename>,
3098 <filename><link linkend='var-INITSCRIPT_NAME'>INITSCRIPT_NAME</link></filename> and
3099 <filename><link linkend='var-INITSCRIPT_PARAMS'>INITSCRIPT_PARAMS</link></filename>.
3100 See the variable links for details.
3101 </para>
3102</section>
3103
3104<section id='ref-classes-useradd'>
3105 <title><filename>useradd.bbclass</filename></title>
3106
3107 <para>
3108 The <filename>useradd</filename> class supports the addition of users
3109 or groups for usage by the package on the target.
3110 For example, if you have packages that contain system services that
3111 should be run under their own user or group, you can use this class to
3112 enable creation of the user or group.
3113 The <filename>meta-skeleton/recipes-skeleton/useradd/useradd-example.bb</filename>
3114 recipe in the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
3115 provides a simple example that shows how to add three
3116 users and groups to two packages.
3117 See the <filename>useradd-example.bb</filename> recipe for more
3118 information on how to use this class.
3119 </para>
3120
3121 <para>
3122 The <filename>useradd</filename> class supports the
3123 <link linkend='var-USERADD_PACKAGES'><filename>USERADD_PACKAGES</filename></link>,
3124 <link linkend='var-USERADD_PARAM'><filename>USERADD_PARAM</filename></link>,
3125 <link linkend='var-GROUPADD_PARAM'><filename>GROUPADD_PARAM</filename></link>,
3126 and
3127 <link linkend='var-GROUPMEMS_PARAM'><filename>GROUPMEMS_PARAM</filename></link>
3128 variables.
3129 </para>
3130</section>
3131
3132<section id='ref-classes-useradd-staticids'>
3133 <title><filename>useradd-staticids.bbclass</filename></title>
3134
3135 <para>
3136 The <filename>useradd-staticids</filename> class supports the addition
3137 of users or groups that have static user identification
3138 (<filename>uid</filename>) and group identification
3139 (<filename>gid</filename>) values.
3140 </para>
3141
3142 <para>
3143 The default behavior of the OpenEmbedded build system for assigning
3144 <filename>uid</filename> and <filename>gid</filename> values when
3145 packages add users and groups during package install time is to
3146 add them dynamically.
3147 This works fine for programs that do not care what the values of the
3148 resulting users and groups become.
3149 In these cases, the order of the installation determines the final
3150 <filename>uid</filename> and <filename>gid</filename> values.
3151 However, if non-deterministic
3152 <filename>uid</filename> and <filename>gid</filename> values are a
3153 problem, you can override the default, dynamic application of these
3154 values by setting static values.
3155 When you set static values, the OpenEmbedded build system looks in
3156 <link linkend='var-BBPATH'><filename>BBPATH</filename></link> for
3157 <filename>files/passwd</filename> and <filename>files/group</filename>
3158 files for the values.
3159 </para>
3160
3161 <para>
3162 To use static <filename>uid</filename> and <filename>gid</filename>
3163 values, you need to set some variables.
3164 See the
3165 <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>,
3166 <link linkend='var-USERADD_UID_TABLES'><filename>USERADD_UID_TABLES</filename></link>,
3167 <link linkend='var-USERADD_GID_TABLES'><filename>USERADD_GID_TABLES</filename></link>,
3168 and
3169 <link linkend='var-USERADD_ERROR_DYNAMIC'><filename>USERADD_ERROR_DYNAMIC</filename></link>
3170 variables.
3171 You can also see the
3172 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
3173 class for additional information.
3174 </para>
3175
3176 <note><title>Notes</title>
3177 You do not use this class directly.
3178 You either enable or disable the class by setting the
3179 <filename>USERADDEXTENSION</filename> variable.
3180 If you enable or disable the class in a configured system,
3181 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
3182 might contain incorrect <filename>uid</filename> and
3183 <filename>gid</filename> values.
3184 Deleting the <filename>TMPDIR</filename> directory
3185 will correct this condition.
3186 </note>
3187</section>
3188
3189<section id='ref-classes-utility-tasks'>
3190 <title><filename>utility-tasks.bbclass</filename></title>
3191
3192 <para>
3193 The <filename>utility-tasks</filename> class provides support for
3194 various "utility" type tasks that are applicable to all recipes,
3195 such as <filename>do_clean</filename> and
3196 <filename>do_listtasks</filename>.
3197 </para>
3198
3199 <para>
3200 This class is enabled by default because it is inherited by
3201 the
3202 <link linkend='ref-classes-base'><filename>base</filename></link>
3203 class.
3204 </para>
3205</section>
3206
3207<section id='ref-classes-utils'>
3208 <title><filename>utils.bbclass</filename></title>
3209
3210 <para>
3211 The <filename>utils</filename> class provides some useful Python
3212 functions that are typically used in inline Python expressions
3213 (e.g. <filename>${@...}</filename>).
3214 One example use is for <filename>base_contains()</filename>.
3215 </para>
3216
3217 <para>
3218 This class is enabled by default because it is inherited by the
3219 <link linkend='ref-classes-base'><filename>base</filename></link>
3220 class.
3221 </para>
3222</section>
3223
3224<section id='ref-classes-vala'>
3225 <title><filename>vala.bbclass</filename></title>
3226
3227 <para>
3228 The <filename>vala</filename> class supports recipes that need to
3229 build software written using the Vala programming language.
3230 </para>
3231</section>
3232
3233<section id='ref-classes-waf'>
3234 <title><filename>waf.bbclass</filename></title>
3235
3236 <para>
3237 The <filename>waf</filename> class supports recipes that need to build
3238 software that uses the Waf build system.
3239 You can use the
3240 <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
3241 variable to specify additional configuration options to be passed on
3242 the Waf command line.
3243 </para>
3244</section>
3245
3246<!-- Undocumented classes are:
3247 image-empty.bbclass (possibly being dropped)
3248 migrate_localcount.bbclass (still need a description)
3249-->
3250
3251
3252</chapter>
3253<!--
3254vim: expandtab tw=80 ts=4
3255-->
diff --git a/documentation/ref-manual/ref-features.xml b/documentation/ref-manual/ref-features.xml
new file mode 100644
index 0000000000..f351931ab6
--- /dev/null
+++ b/documentation/ref-manual/ref-features.xml
@@ -0,0 +1,344 @@
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
5<chapter id='ref-features'>
6 <title>Features</title>
7
8 <para>
9 This chapter provides a reference of shipped machine and distro features
10 you can include as part of the image, a reference on image types you can
11 build, and a reference on feature backfilling.
12 </para>
13
14 <para>
15 Features provide a mechanism for working out which packages
16 should be included in the generated images.
17 Distributions can select which features they want to support through the
18 <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>
19 variable, which is set in the <filename>poky.conf</filename> distribution configuration file.
20 Machine features are set in the
21 <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>
22 variable, which is set in the machine configuration file and
23 specifies the hardware features for a given machine.
24 </para>
25
26 <para>
27 These two variables combine to work out which kernel modules,
28 utilities, and other packages to include.
29 A given distribution can support a selected subset of features so some machine features might not
30 be included if the distribution itself does not support them.
31 </para>
32
33 <para>
34 One method you can use to determine which recipes are checking to see if a
35 particular feature is contained or not is to <filename>grep</filename> through
36 the <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
37 for the feature.
38 Here is an example that discovers the recipes whose build is potentially
39 changed based on a given feature:
40 <literallayout class='monospaced'>
41 $ cd poky
42 $ git grep 'contains.*MACHINE_FEATURES.*&lt;feature&gt;'
43 </literallayout>
44 </para>
45
46 <section id='ref-features-machine'>
47 <title>Machine Features</title>
48
49 <para>
50 The items below are features you can use with
51 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>.
52 Features do not have a one-to-one correspondence to packages, and they can
53 go beyond simply controlling the installation of a package or packages.
54 Sometimes a feature can influence how certain recipes are built.
55 For example, a feature might determine whether a particular configure option
56 is specified within <filename>do_configure</filename> for a particular
57 recipe.
58 </para>
59
60 <para>
61 This feature list only represents features as shipped with the Yocto Project metadata:
62 <itemizedlist>
63 <listitem><para><emphasis>acpi:</emphasis> Hardware has ACPI (x86/x86_64 only)
64 </para></listitem>
65 <listitem><para><emphasis>alsa:</emphasis> Hardware has ALSA audio drivers
66 </para></listitem>
67 <listitem><para><emphasis>apm:</emphasis> Hardware uses APM (or APM emulation)
68 </para></listitem>
69 <listitem><para><emphasis>bluetooth:</emphasis> Hardware has integrated BT
70 </para></listitem>
71 <listitem><para><emphasis>ext2:</emphasis> Hardware HDD or Microdrive
72 </para></listitem>
73 <listitem><para><emphasis>irda:</emphasis> Hardware has IrDA support
74 </para></listitem>
75 <listitem><para><emphasis>keyboard:</emphasis> Hardware has a keyboard
76 </para></listitem>
77 <listitem><para><emphasis>pci:</emphasis> Hardware has a PCI bus
78 </para></listitem>
79 <listitem><para><emphasis>pcmcia:</emphasis> Hardware has PCMCIA or CompactFlash sockets
80 </para></listitem>
81 <listitem><para><emphasis>screen:</emphasis> Hardware has a screen
82 </para></listitem>
83 <listitem><para><emphasis>serial:</emphasis> Hardware has serial support (usually RS232)
84 </para></listitem>
85 <listitem><para><emphasis>touchscreen:</emphasis> Hardware has a touchscreen
86 </para></listitem>
87 <listitem><para><emphasis>usbgadget:</emphasis> Hardware is USB gadget device capable
88 </para></listitem>
89 <listitem><para><emphasis>usbhost:</emphasis> Hardware is USB Host capable
90 </para></listitem>
91 <listitem><para><emphasis>wifi:</emphasis> Hardware has integrated WiFi
92 </para></listitem>
93 </itemizedlist>
94 </para>
95 </section>
96
97 <section id='ref-features-distro'>
98 <title>Distro Features</title>
99
100 <para>
101 The items below are features you can use with
102 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
103 to enable features across your distribution.
104 Features do not have a one-to-one correspondence to packages,
105 and they can go beyond simply controlling the installation of a
106 package or packages.
107 In most cases, the presence or absence of a feature translates to
108 the appropriate option supplied to the configure script during
109 <filename>do_configure</filename> for the recipes that optionally
110 support the feature.
111 </para>
112
113 <para>
114 Some distro features are also machine features.
115 These select features make sense to be controlled both at
116 the machine and distribution configuration level.
117 See the
118 <ulink url='&YOCTO_DOCS_REF_URL;#var-COMBINED_FEATURES'><filename>COMBINED_FEATURES</filename></ulink>
119 variable for more information.
120 </para>
121
122 <para>
123 This list only represents features as shipped with the Yocto Project metadata:
124 <itemizedlist>
125 <listitem><para><emphasis>alsa:</emphasis> Include ALSA support
126 (OSS compatibility kernel modules installed if available).
127 </para></listitem>
128 <listitem><para><emphasis>bluetooth:</emphasis> Include
129 bluetooth support (integrated BT only).</para></listitem>
130 <listitem><para><emphasis>cramfs:</emphasis> Include CramFS
131 support.</para></listitem>
132 <listitem><para><emphasis>directfb:</emphasis>
133 Include DirectFB support.
134 </para></listitem>
135 <listitem><para><emphasis>ext2:</emphasis> Include tools for
136 supporting for devices with internal HDD/Microdrive for
137 storing files (instead of Flash only devices).
138 </para></listitem>
139 <listitem><para><emphasis>ipsec:</emphasis> Include IPSec
140 support.</para></listitem>
141 <listitem><para><emphasis>ipv6:</emphasis> Include IPv6 support.
142 </para></listitem>
143 <listitem><para><emphasis>irda:</emphasis> Include IrDA support.
144 </para></listitem>
145 <listitem><para><emphasis>keyboard:</emphasis> Include keyboard
146 support (e.g. keymaps will be loaded during boot).
147 </para></listitem>
148 <listitem><para><emphasis>nfs:</emphasis> Include NFS client
149 support (for mounting NFS exports on device).
150 </para></listitem>
151 <listitem><para><emphasis>opengl:</emphasis>
152 Include the Open Graphics Library, which is a
153 cross-language, multi-platform application programming
154 interface used for rendering two and three-dimensional
155 graphics.</para></listitem>
156 <listitem><para><emphasis>pci:</emphasis> Include PCI bus
157 support.</para></listitem>
158 <listitem><para><emphasis>pcmcia:</emphasis> Include
159 PCMCIA/CompactFlash support.</para></listitem>
160 <listitem><para><emphasis>ppp:</emphasis> Include PPP dialup
161 support.</para></listitem>
162 <listitem><para><emphasis>smbfs:</emphasis> Include SMB networks
163 client support (for mounting Samba/Microsoft Windows shares
164 on device).</para></listitem>
165 <listitem><para><emphasis>systemd:</emphasis> Include support
166 for this <filename>init</filename> manager, which is a full
167 replacement of for <filename>init</filename> with parallel
168 starting of services, reduced shell overhead, and other
169 features.
170 This <filename>init</filename> manager is used by many
171 distributions.</para></listitem>
172 <listitem><para><emphasis>usbgadget:</emphasis> Include USB
173 Gadget Device support (for USB networking/serial/storage).
174 </para></listitem>
175 <listitem><para><emphasis>usbhost:</emphasis> Include USB Host
176 support (allows to connect external keyboard, mouse,
177 storage, network etc).</para></listitem>
178 <listitem><para><emphasis>wayland:</emphasis> Include the
179 Wayland display server protocol and the library that
180 supports it.</para></listitem>
181 <listitem><para><emphasis>wifi:</emphasis> Include WiFi support
182 (integrated only).</para></listitem>
183 <listitem><para><emphasis>x11:</emphasis> Include the X server
184 and libraries.</para></listitem>
185 </itemizedlist>
186 </para>
187 </section>
188
189 <section id='ref-features-image'>
190 <title>Image Features</title>
191
192 <para>
193 The contents of images generated by the OpenEmbedded build system can be controlled by the
194 <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>
195 and <filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename>
196 variables that you typically configure in your image recipes.
197 Through these variables, you can add several different
198 predefined packages such as development utilities or packages with debug
199 information needed to investigate application problems or profile applications.
200 </para>
201
202 <para>
203 Current list of
204 <filename>IMAGE_FEATURES</filename> contains the following:
205 <itemizedlist>
206 <listitem><para><emphasis>dbg-pkgs:</emphasis> Installs debug symbol packages for all packages
207 installed in a given image.</para></listitem>
208 <listitem><para><emphasis>dev-pkgs:</emphasis> Installs development packages (headers and
209 extra library links) for all packages installed in a given image.</para></listitem>
210 <listitem><para><emphasis>doc-pkgs:</emphasis> Installs documentation packages for all packages
211 installed in a given image.</para></listitem>
212 <listitem><para><emphasis>nfs-server:</emphasis> Installs an NFS server.</para></listitem>
213 <listitem><para><emphasis>read-only-rootfs:</emphasis> Creates
214 an image whose root filesystem is read-only.
215 See the
216 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>Creating a Read-Only Root Filesystem</ulink>"
217 section in the Yocto Project Development Manual for more
218 information.</para></listitem>
219 <listitem><para><emphasis>splash:</emphasis> Enables showing a splash screen during boot.
220 By default, this screen is provided by <filename>psplash</filename>, which does
221 allow customization.
222 If you prefer to use an alternative splash screen package, you can do so by
223 setting the <filename>SPLASH</filename> variable
224 to a different package name (or names) within the image recipe or at the distro
225 configuration level.</para></listitem>
226 <listitem><para><emphasis>ssh-server-dropbear:</emphasis> Installs the Dropbear minimal
227 SSH server.
228 </para></listitem>
229 <listitem><para><emphasis>ssh-server-openssh:</emphasis> Installs the OpenSSH SSH server,
230 which is more full-featured than Dropbear.
231 Note that if both the OpenSSH SSH server and the Dropbear minimal SSH server
232 are present in <filename>IMAGE_FEATURES</filename>, then OpenSSH will take
233 precedence and Dropbear will not be installed.</para></listitem>
234 <listitem><para><emphasis>staticdev-pkgs:</emphasis> Installs static development
235 packages (i.e. static libraries containing <filename>*.a</filename> files) for all
236 packages installed in a given image.</para></listitem>
237 <listitem><para><emphasis>tools-debug:</emphasis> Installs debugging tools such as
238 <filename>strace</filename> and <filename>gdb</filename>.
239 For information on GDB, see the
240 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
241 section in the Yocto Project Development Manual.
242 For information on tracing and profiling, see the
243 <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>.
244 </para></listitem>
245 <listitem><para><emphasis>tools-profile:</emphasis> Installs profiling tools such as
246 <filename>oprofile</filename>, <filename>exmap</filename>, and
247 <filename>LTTng</filename>.
248 For general information on user-space tools, see the
249 "<ulink url='&YOCTO_DOCS_ADT_URL;#user-space-tools'>User-Space Tools</ulink>"
250 section in the Yocto Project Application Developer's Guide.</para></listitem>
251 <listitem><para><emphasis>tools-sdk:</emphasis> Installs a full SDK that runs on the device.
252 </para></listitem>
253 <listitem><para><emphasis>tools-testapps:</emphasis> Installs device testing tools (e.g.
254 touchscreen debugging).</para></listitem>
255 <listitem><para><emphasis>x11:</emphasis> Installs the X server</para></listitem>
256 <listitem><para><emphasis>x11-base:</emphasis> Installs the X server with a
257 minimal environment.</para></listitem>
258 <listitem><para><emphasis>x11-sato:</emphasis> Installs the OpenedHand Sato environment.
259 </para></listitem>
260 </itemizedlist>
261 </para>
262 </section>
263
264 <section id='ref-features-backfill'>
265 <title>Feature Backfilling</title>
266
267 <para>
268 Sometimes it is necessary in the OpenEmbedded build system to extend
269 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
270 or <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
271 to control functionality that was previously enabled and not able
272 to be disabled.
273 For these cases, we need to add an
274 additional feature item to appear in one of these variables,
275 but we do not want to force developers who have existing values
276 of the variables in their configuration to add the new feature
277 in order to retain the same overall level of functionality.
278 Thus, the OpenEmbedded build system has a mechanism to
279 automatically "backfill" these added features into existing
280 distro or machine configurations.
281 You can see the list of features for which this is done by
282 finding the
283 <link linkend='var-DISTRO_FEATURES_BACKFILL'><filename>DISTRO_FEATURES_BACKFILL</filename></link>
284 and <link linkend='var-MACHINE_FEATURES_BACKFILL'><filename>MACHINE_FEATURES_BACKFILL</filename></link>
285 variables in the <filename>meta/conf/bitbake.conf</filename> file.
286 </para>
287
288 <para>
289 Because such features are backfilled by default into all
290 configurations as described in the previous paragraph, developers
291 who wish to disable the new features need to be able to selectively
292 prevent the backfilling from occurring.
293 They can do this by adding the undesired feature or features to the
294 <link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
295 or <link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename></link>
296 variables for distro features and machine features respectively.
297 </para>
298
299 <para>
300 Here are two examples to help illustrate feature backfilling:
301 <itemizedlist>
302 <listitem><para><emphasis>The "pulseaudio" distro feature option</emphasis>:
303 Previously, PulseAudio support was enabled within the Qt and
304 GStreamer frameworks.
305 Because of this, the feature is backfilled and thus
306 enabled for all distros through the
307 <filename>DISTRO_FEATURES_BACKFILL</filename>
308 variable in the <filename>meta/conf/bitbake.conf</filename> file.
309 However, your distro needs to disable the feature.
310 You can disable the feature without affecting
311 other existing distro configurations that need PulseAudio support
312 by adding "pulseaudio" to
313 <filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename>
314 in your distro's <filename>.conf</filename> file.
315 Adding the feature to this variable when it also
316 exists in the <filename>DISTRO_FEATURES_BACKFILL</filename>
317 variable prevents the build system from adding the feature to
318 your configuration's <filename>DISTRO_FEATURES</filename>, effectively disabling
319 the feature for that particular distro.</para></listitem>
320 <listitem><para><emphasis>The "rtc" machine feature option</emphasis>:
321 Previously, real time clock (RTC) support was enabled for all
322 target devices.
323 Because of this, the feature is backfilled and thus enabled
324 for all machines through the <filename>MACHINE_FEATURES_BACKFILL</filename>
325 variable in the <filename>meta/conf/bitbake.conf</filename> file.
326 However, your target device does not have this capability.
327 You can disable RTC support for your device without
328 affecting other machines that need RTC support
329 by adding the feature to your machine's
330 <filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename>
331 list in the machine's <filename>.conf</filename> file.
332 Adding the feature to this variable when it also
333 exists in the <filename>MACHINE_FEATURES_BACKFILL</filename>
334 variable prevents the build system from adding the feature to
335 your configuration's <filename>MACHINE_FEATURES</filename>, effectively
336 disabling RTC support for that particular machine.</para></listitem>
337 </itemizedlist>
338 </para>
339 </section>
340</chapter>
341
342<!--
343vim: expandtab tw=80 ts=4 spell spelllang=en_gb
344-->
diff --git a/documentation/ref-manual/ref-images.xml b/documentation/ref-manual/ref-images.xml
new file mode 100644
index 0000000000..e7d76f2b1b
--- /dev/null
+++ b/documentation/ref-manual/ref-images.xml
@@ -0,0 +1,167 @@
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
5<chapter id='ref-images'>
6 <title>Images</title>
7
8 <para>
9 The OpenEmbedded build system provides several example
10 images to satisfy different needs.
11 When you issue the <filename>bitbake</filename> command you provide a “top-level” recipe
12 that essentially begins the build for the type of image you want.
13 </para>
14
15 <note>
16 Building an image without GNU General Public License Version 3 (GPLv3) components
17 is only supported for minimal and base images.
18 Furthermore, if you are going to build an image using non-GPLv3 components,
19 you must make the following changes in the <filename>local.conf</filename> file
20 before using the BitBake command to build the minimal or base image:
21 <literallayout class='monospaced'>
22 1. Comment out the EXTRA_IMAGE_FEATURES line
23 2. Set INCOMPATIBLE_LICENSE = "GPLv3"
24 </literallayout>
25 </note>
26
27 <para>
28 From within the <filename>poky</filename> Git repository, use the following command to list
29 the supported images:
30 <literallayout class='monospaced'>
31 $ ls meta*/recipes*/images/*.bb
32 </literallayout>
33 These recipes reside in the <filename>meta/recipes-core/images</filename>,
34 <filename>meta/recipes-extended/images</filename>,
35 <filename>meta/recipes-graphics/images</filename>,
36 <filename>meta/recipes-qt/images</filename>,
37 <filename>meta/recipes-rt/images</filename>,
38 <filename>meta/recipes-sato/images</filename>, and
39 <filename>meta-skeleton/recipes-multilib/images</filename> directories
40 within the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
41 Although the recipe names are somewhat explanatory, here is a list that describes them:
42 </para>
43
44 <itemizedlist>
45 <listitem><para><emphasis><filename>build-appliance-image</filename>:</emphasis>
46 An example virtual machine that contains all the pieces required to
47 run builds using the build system as well as the build system itself.
48 You can boot and run the image using either the
49 <ulink url='http://www.vmware.com/products/player/overview.html'>VMware Player</ulink>
50 or <ulink url='http://www.vmware.com/products/workstation/overview.html'>VMware Workstation</ulink>.
51 For more information on this image, see the
52 <ulink url='&YOCTO_HOME_URL;/documentation/build-appliance'>Build Appliance</ulink> page on
53 the Yocto Project website.</para></listitem>
54 <listitem><para><emphasis><filename>core-image-base</filename>:</emphasis>
55 A console-only image that fully supports the target device hardware.</para></listitem>
56 <listitem><para><emphasis><filename>core-image-minimal</filename>:</emphasis>
57 A small image just capable of allowing a device to boot.</para></listitem>
58 <listitem><para><emphasis><filename>core-image-minimal-dev</filename>:</emphasis>
59 A <filename>core-image-minimal</filename> image suitable for development work
60 using the host.
61 The image includes headers and libraries you can use in a host development
62 environment.
63 </para></listitem>
64 <listitem><para id='images-core-image-minimal-initramfs'><emphasis><filename>core-image-minimal-initramfs</filename>:</emphasis>
65 A <filename>core-image-minimal</filename> image that has the Minimal RAM-based
66 Initial Root Filesystem (initramfs) as part of the kernel,
67 which allows the system to find the first “init” program more efficiently.
68 See the
69 <link linkend='var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></link>
70 variable for additional information helpful when working with
71 initramfs images.
72 </para></listitem>
73 <listitem><para><emphasis><filename>core-image-minimal-mtdutils</filename>:</emphasis>
74 A <filename>core-image-minimal</filename> image that has support
75 for the Minimal MTD Utilities, which let the user interact with the
76 MTD subsystem in the kernel to perform operations on flash devices.
77 </para></listitem>
78 <listitem><para><emphasis><filename>core-image-full-cmdline</filename>:</emphasis>
79 A console-only image with more full-featured Linux system
80 functionality installed.</para></listitem>
81 <listitem><para><emphasis><filename>core-image-lsb</filename>:</emphasis>
82 An image that conforms to the Linux Standard Base (LSB) specification.
83 </para></listitem>
84 <listitem><para><emphasis><filename>core-image-testmaster</filename>:</emphasis>
85 A "master" image designed to be used for automated runtime testing.
86 Provides a "known good" image that is deployed to a separate
87 partition so that you can boot into it and use it to deploy a
88 second image to be tested.
89 You can find more information about runtime testing in the
90 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
91 section in the Yocto Project Development Manual.
92 </para></listitem>
93 <listitem><para><emphasis><filename>core-image-lsb-dev</filename>:</emphasis>
94 A <filename>core-image-lsb</filename> image that is suitable for development work
95 using the host.
96 The image includes headers and libraries you can use in a host development
97 environment.
98 </para></listitem>
99 <listitem><para><emphasis><filename>core-image-lsb-sdk</filename>:</emphasis>
100 A <filename>core-image-lsb</filename> that includes everything in meta-toolchain
101 but also includes development headers and libraries to form a complete standalone SDK.
102 This image is suitable for development using the target.</para></listitem>
103 <listitem><para><emphasis><filename>core-image-clutter</filename>:</emphasis>
104 An image with support for the Open GL-based toolkit Clutter, which enables development of
105 rich and animated graphical user interfaces.</para></listitem>
106 <listitem><para><emphasis><filename>core-image-directfb</filename>:</emphasis>
107 An image that uses <filename>directfb</filename> instead of X11.
108 </para></listitem>
109 <listitem><para><emphasis><filename>core-image-x11</filename>:</emphasis>
110 A very basic X11 image with a terminal.
111 </para></listitem>
112 <listitem><para><emphasis><filename>core-image-weston</filename>:</emphasis>
113 An image that provides the Wayland protocol libraries and the
114 reference Weston compositor.
115 For more information, see the
116 "<link linkend='wayland'>Wayland</link>" section.
117 </para></listitem>
118 <listitem><para><emphasis><filename>qt4e-demo-image</filename>:</emphasis>
119 An image that launches into the demo application for the embedded
120 (not based on X11) version of Qt.</para></listitem>
121 <listitem><para><emphasis><filename>core-image-rt</filename>:</emphasis>
122 A <filename>core-image-minimal</filename> image plus a real-time test suite and
123 tools appropriate for real-time use.</para></listitem>
124 <listitem><para><emphasis><filename>core-image-rt-sdk</filename>:</emphasis>
125 A <filename>core-image-rt</filename> image that includes everything in
126 <filename>meta-toolchain</filename>.
127 The image also includes development headers and libraries to form a complete
128 stand-alone SDK and is suitable for development using the target.
129 </para></listitem>
130 <listitem><para><emphasis><filename>core-image-sato</filename>:</emphasis>
131 An image with Sato support, a mobile environment and visual style that works well
132 with mobile devices.
133 The image supports X11 with a Sato theme and applications such as
134 a terminal, editor, file manager, media player, and so forth.
135 </para></listitem>
136 <listitem><para><emphasis><filename>core-image-sato-dev</filename>:</emphasis>
137 A <filename>core-image-sato</filename> image suitable for development
138 using the host.
139 The image includes libraries needed to build applications on the device itself,
140 testing and profiling tools, and debug symbols.
141 This image was formerly <filename>core-image-sdk</filename>.
142 </para></listitem>
143 <listitem><para><emphasis><filename>core-image-sato-sdk</filename>:</emphasis>
144 A <filename>core-image-sato</filename> image that includes everything in meta-toolchain.
145 The image also includes development headers and libraries to form a complete standalone SDK
146 and is suitable for development using the target.</para></listitem>
147 <listitem><para><emphasis><filename>core-image-multilib-example</filename>:</emphasis>
148 An example image that includes a <filename>lib32</filename> version
149 of Bash into an otherwise standard <filename>sato</filename> image.
150 The image assumes a "lib32" multilib has been enabled in the your
151 configuration.</para></listitem>
152 </itemizedlist>
153
154 <tip>
155 From the Yocto Project release 1.1 onwards, <filename>-live</filename> and
156 <filename>-directdisk</filename> images have been replaced by a "live"
157 option in <filename>IMAGE_FSTYPES</filename> that will work with any image to produce an
158 image file that can be
159 copied directly to a CD or USB device and run as is.
160 To build a live image, simply add
161 "live" to <filename>IMAGE_FSTYPES</filename> within the <filename>local.conf</filename>
162 file or wherever appropriate and then build the desired image as normal.
163 </tip>
164</chapter>
165<!--
166vim: expandtab tw=80 ts=4
167-->
diff --git a/documentation/ref-manual/ref-manual-customization.xsl b/documentation/ref-manual/ref-manual-customization.xsl
new file mode 100644
index 0000000000..3ad3a315c0
--- /dev/null
+++ b/documentation/ref-manual/ref-manual-customization.xsl
@@ -0,0 +1,11 @@
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
3
4 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
5
6 <xsl:param name="html.stylesheet" select="'ref-style.css'" />
7 <xsl:param name="chapter.autolabel" select="1" />
8 <xsl:param name="appendix.autolabel" select="A" />
9 <xsl:param name="section.autolabel" select="1" />
10 <xsl:param name="section.label.includes.component.label" select="1" />
11</xsl:stylesheet>
diff --git a/documentation/ref-manual/ref-manual-eclipse-customization.xsl b/documentation/ref-manual/ref-manual-eclipse-customization.xsl
new file mode 100644
index 0000000000..4e6b7997b8
--- /dev/null
+++ b/documentation/ref-manual/ref-manual-eclipse-customization.xsl
@@ -0,0 +1,27 @@
1<?xml version='1.0'?>
2<xsl:stylesheet
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/1999/xhtml"
5 xmlns:fo="http://www.w3.org/1999/XSL/Format"
6 version="1.0">
7
8 <xsl:import
9 href="http://docbook.sourceforge.net/release/xsl/current/eclipse/eclipse3.xsl" />
10
11 <xsl:param name="chunker.output.indent" select="'yes'"/>
12 <xsl:param name="chunk.quietly" select="1"/>
13 <xsl:param name="chunk.first.sections" select="1"/>
14 <xsl:param name="chunk.section.depth" select="10"/>
15 <xsl:param name="use.id.as.filename" select="1"/>
16 <xsl:param name="ulink.target" select="'_self'" />
17 <xsl:param name="base.dir" select="'html/ref-manual/'"/>
18 <xsl:param name="html.stylesheet" select="'../book.css'"/>
19 <xsl:param name="eclipse.manifest" select="0"/>
20 <xsl:param name="create.plugin.xml" select="0"/>
21 <xsl:param name="suppress.navigation" select="1"/>
22 <xsl:param name="generate.index" select="0"/>
23 <xsl:param name="chapter.autolabel" select="1" />
24 <xsl:param name="appendix.autolabel">A</xsl:param>
25 <xsl:param name="section.autolabel" select="1" />
26 <xsl:param name="section.label.includes.component.label" select="1" />
27</xsl:stylesheet>
diff --git a/documentation/ref-manual/ref-manual.xml b/documentation/ref-manual/ref-manual.xml
new file mode 100644
index 0000000000..6a5191591a
--- /dev/null
+++ b/documentation/ref-manual/ref-manual.xml
@@ -0,0 +1,151 @@
1<!DOCTYPE book 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<book id='ref-manual' lang='en'
6 xmlns:xi="http://www.w3.org/2003/XInclude"
7 xmlns="http://docbook.org/ns/docbook"
8 >
9 <bookinfo>
10
11 <mediaobject>
12 <imageobject>
13 <imagedata fileref='figures/poky-title.png'
14 format='SVG'
15 align='left' scalefit='1' width='100%'/>
16 </imageobject>
17 </mediaobject>
18
19 <title>
20 Yocto Project Reference Manual
21 </title>
22
23 <authorgroup>
24 <author>
25 <firstname>Richard</firstname> <surname>Purdie</surname>
26 <affiliation>
27 <orgname>Linux Foundation</orgname>
28 </affiliation>
29 <email>richard.purdie@linuxfoundation.org</email>
30 </author>
31
32 </authorgroup>
33
34 <revhistory>
35 <revision>
36 <revnumber>4.0+git</revnumber>
37 <date>24 November 2010</date>
38 <revremark>Released with the Yocto Project 0.9 Release</revremark>
39 </revision>
40 <revision>
41 <revnumber>1.0</revnumber>
42 <date>6 April 2011</date>
43 <revremark>Released with the Yocto Project 1.0 Release.</revremark>
44 </revision>
45 <revision>
46 <revnumber>1.0.1</revnumber>
47 <date>23 May 2011</date>
48 <revremark>Released with the Yocto Project 1.0.1 Release.</revremark>
49 </revision>
50 <revision>
51 <revnumber>1.1</revnumber>
52 <date>6 October 2011</date>
53 <revremark>Released with the Yocto Project 1.1 Release.</revremark>
54 </revision>
55 <revision>
56 <revnumber>1.2</revnumber>
57 <date>April 2012</date>
58 <revremark>Released with the Yocto Project 1.2 Release.</revremark>
59 </revision>
60 <revision>
61 <revnumber>1.3</revnumber>
62 <date>October 2012</date>
63 <revremark>Released with the Yocto Project 1.3 Release.</revremark>
64 </revision>
65 <revision>
66 <revnumber>1.4</revnumber>
67 <date>April 2013</date>
68 <revremark>Released with the Yocto Project 1.4 Release.</revremark>
69 </revision>
70 <revision>
71 <revnumber>1.5</revnumber>
72 <date>October 2013</date>
73 <revremark>Released with the Yocto Project 1.5 Release.</revremark>
74 </revision>
75 <revision>
76 <revnumber>1.5.1</revnumber>
77 <date>January 2014</date>
78 <revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
79 </revision>
80 <revision>
81 <revnumber>1.6</revnumber>
82 <date>April 2014</date>
83 <revremark>Released with the Yocto Project 1.6 Release.</revremark>
84 </revision>
85 <revision>
86 <revnumber>1.6.1</revnumber>
87 <date>July 2014</date>
88 <revremark>Released with the Yocto Project 1.6.1 Release.</revremark>
89 </revision>
90 <revision>
91 <revnumber>1.6.2</revnumber>
92 <date>November 2014</date>
93 <revremark>Released with the Yocto Project 1.6.2 Release.</revremark>
94 </revision>
95 </revhistory>
96
97 <copyright>
98 <year>&COPYRIGHT_YEAR;</year>
99 <holder>Linux Foundation</holder>
100 </copyright>
101
102 <legalnotice>
103 <para>
104 Permission is granted to copy, distribute and/or modify this document under
105 the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
106 </para>
107 <note>
108 For the latest version of this manual associated with this
109 Yocto Project release, see the
110 <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>
111 from the Yocto Project website.
112 </note>
113 </legalnotice>
114
115 </bookinfo>
116
117 <xi:include href="introduction.xml"/>
118
119 <xi:include href="usingpoky.xml"/>
120
121 <xi:include href="closer-look.xml"/>
122
123 <xi:include href="technical-details.xml"/>
124
125 <xi:include href="migration.xml"/>
126
127 <xi:include href="ref-structure.xml"/>
128
129 <xi:include href="ref-classes.xml"/>
130
131 <xi:include href="ref-images.xml"/>
132
133 <xi:include href="ref-features.xml"/>
134
135 <xi:include href="ref-variables.xml"/>
136
137 <xi:include href="ref-varlocality.xml"/>
138
139 <xi:include href="faq.xml"/>
140
141 <xi:include href="resources.xml"/>
142
143<!-- <index id='index'>
144 <title>Index</title>
145 </index>
146-->
147
148</book>
149<!--
150vim: expandtab tw=80 ts=4
151-->
diff --git a/documentation/ref-manual/ref-structure.xml b/documentation/ref-manual/ref-structure.xml
new file mode 100644
index 0000000000..fdbefb8f25
--- /dev/null
+++ b/documentation/ref-manual/ref-structure.xml
@@ -0,0 +1,1038 @@
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
5<chapter id='ref-structure'>
6
7<title>Source Directory Structure</title>
8
9<para>
10 The <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> consists of several components.
11 Understanding them and knowing where they are located is key to using the Yocto Project well.
12 This chapter describes the Source Directory and gives information about the various
13 files and directories.
14</para>
15
16<para>
17 For information on how to establish a local Source Directory on your development system, see the
18 "<ulink url='&YOCTO_DOCS_DEV_URL;#getting-setup'>Getting Set Up</ulink>"
19 section in the Yocto Project Development Manual.
20</para>
21
22<note>
23 The OpenEmbedded build system does not support file or directory names that
24 contain spaces.
25 Be sure that the Source Directory you use does not contain these types
26 of names.
27</note>
28
29<section id='structure-core'>
30 <title>Top-Level Core Components</title>
31
32 <para>
33 This section describes the top-level components of the
34 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
35 </para>
36
37 <section id='structure-core-bitbake'>
38 <title><filename>bitbake/</filename></title>
39
40 <para>
41 This directory includes a copy of BitBake for ease of use.
42 The copy usually matches the current stable BitBake release from
43 the BitBake project.
44 BitBake, a
45 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
46 interpreter, reads the Yocto Project Metadata and runs the tasks
47 defined by that data.
48 Failures are usually from the Metadata and not from BitBake itself.
49 Consequently, most users do not need to worry about BitBake.
50 </para>
51
52 <para>
53 When you run the <filename>bitbake</filename> command, the
54 main BitBake executable, which resides in the
55 <filename>bitbake/bin/</filename> directory, starts.
56 Sourcing an environment setup script (e.g.
57 <link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>
58 or
59 <link linkend="structure-memres-core-script"><filename>oe-init-build-env-memres</filename></link>)
60 places the <filename>scripts</filename> and
61 <filename>bitbake/bin</filename> directories (in that order) into
62 the shell's <filename>PATH</filename> environment variable.
63 </para>
64
65 <para>
66 For more information on BitBake, see the
67 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
68 </para>
69 </section>
70
71 <section id='structure-core-build'>
72 <title><filename>build/</filename></title>
73
74 <para>
75 This directory contains user configuration files and the output
76 generated by the OpenEmbedded build system in its standard configuration where
77 the source tree is combined with the output.
78 The <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
79 is created initially when you <filename>source</filename>
80 the OpenEmbedded build environment setup script
81 (i.e.
82 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
83 or
84 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
85 </para>
86
87 <para>
88 It is also possible to place output and configuration
89 files in a directory separate from the
90 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
91 by providing a directory name when you <filename>source</filename>
92 the setup script.
93 For information on separating output from your local
94 Source Directory files, see the
95 "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
96 and
97 "<link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>"
98 sections.
99 </para>
100 </section>
101
102 <section id='handbook'>
103 <title><filename>documentation/</filename></title>
104
105 <para>
106 This directory holds the source for the Yocto Project documentation
107 as well as templates and tools that allow you to generate PDF and HTML
108 versions of the manuals.
109 Each manual is contained in a sub-folder.
110 For example, the files for this manual reside in
111 the <filename>ref-manual/</filename> directory.
112 </para>
113 </section>
114
115 <section id='structure-core-meta'>
116 <title><filename>meta/</filename></title>
117
118 <para>
119 This directory contains the OpenEmbedded Core metadata.
120 The directory holds recipes, common classes, and machine
121 configuration for emulated targets (<filename>qemux86</filename>,
122 <filename>qemuarm</filename>, and so forth.)
123 </para>
124 </section>
125
126 <section id='structure-core-meta-yocto'>
127 <title><filename>meta-yocto/</filename></title>
128
129 <para>
130 This directory contains the configuration for the Poky
131 reference distribution.
132 </para>
133 </section>
134
135 <section id='structure-core-meta-yocto-bsp'>
136 <title><filename>meta-yocto-bsp/</filename></title>
137
138 <para>
139 This directory contains the Yocto Project reference
140 hardware Board Support Packages (BSPs).
141 For more information on BSPs, see the
142 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support
143 Package (BSP) Developer's Guide</ulink>.
144 </para>
145 </section>
146
147 <section id='structure-meta-selftest'>
148 <title><filename>meta-selftest/</filename></title>
149
150 <para>
151 This directory adds additional recipes and append files
152 used by the OpenEmbedded selftests to verify the behavior
153 of the build system.
154 </para>
155
156 <para>
157 You do not have to add this layer to your
158 <filename>bblayers.conf</filename> file unless you want to run the
159 selftests.
160 </para>
161 </section>
162
163 <section id='structure-meta-skeleton'>
164 <title><filename>meta-skeleton/</filename></title>
165
166 <para>
167 This directory contains template recipes for BSP and kernel development.
168 </para>
169 </section>
170
171 <section id='structure-core-scripts'>
172 <title><filename>scripts/</filename></title>
173
174 <para>
175 This directory contains various integration scripts that implement
176 extra functionality in the Yocto Project environment (e.g. QEMU scripts).
177 The <link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>
178 and
179 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
180 scripts append this directory to the shell's
181 <filename>PATH</filename> environment variable.
182 </para>
183
184 <para>
185 The <filename>scripts</filename> directory has useful scripts that assist in contributing
186 back to the Yocto Project, such as <filename>create-pull-request</filename> and
187 <filename>send-pull-request</filename>.
188 </para>
189 </section>
190
191 <section id='structure-core-script'>
192 <title><filename>&OE_INIT_FILE;</filename></title>
193
194 <para>
195 This script is one of two scripts that set up the OpenEmbedded build
196 environment.
197 For information on the other script, see the
198 "<link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>"
199 section.
200 </para>
201
202 <para>
203 Running this script with the <filename>source</filename> command in
204 a shell makes changes to <filename>PATH</filename> and sets other
205 core BitBake variables based on the current working directory.
206 You need to run an environment setup script before running BitBake
207 commands.
208 The script uses other scripts within the
209 <filename>scripts</filename> directory to do the bulk of the work.
210 </para>
211
212 <para>
213 By default, running this script without a
214 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
215 argument creates the <filename>build</filename> directory
216 in your current working directory.
217 If you provide a Build Directory argument when you
218 <filename>source</filename> the script, you direct the OpenEmbedded
219 build system to create a Build Directory of your choice.
220 For example, the following command creates a Build Directory named
221 <filename>mybuilds</filename> that is outside of the
222 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
223 <literallayout class='monospaced'>
224 $ source &OE_INIT_FILE; ~/mybuilds
225 </literallayout>
226 <note>
227 The OpenEmbedded build system does not support file or directory names that
228 contain spaces.
229 If you attempt to run the <filename>&OE_INIT_FILE;</filename> script
230 from a Source Directory that contains spaces in either the filenames
231 or directory names, the script returns an error indicating no such
232 file or directory.
233 Be sure to use a Source Directory free of names containing spaces.
234 </note>
235 </para>
236 </section>
237
238 <section id='structure-memres-core-script'>
239 <title><filename>oe-init-build-env-memres</filename></title>
240
241 <para>
242 This script is one of two scripts that set up the OpenEmbedded
243 build environment.
244 Aside from setting up the environment, this script starts a
245 memory-resident BitBake server.
246 For information on the other setup script, see the
247 "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>"
248 section.
249 </para>
250
251 <para>
252 Memory-resident BitBake resides in memory until you specifically
253 remove it using the following BitBake command:
254 <literallayout class='monospaced'>
255 $ bitbake -m
256 </literallayout>
257 </para>
258
259 <para>
260 Running this script with the <filename>source</filename> command in
261 a shell makes changes to <filename>PATH</filename> and sets other
262 core BitBake variables based on the current working directory.
263 One of these variables is the
264 <link linkend='var-BBSERVER'><filename>BBSERVER</filename></link>
265 variable, which allows the OpenEmbedded build system to locate
266 the server that is running BitBake.
267 </para>
268
269 <para>
270 You need to run an environment setup script before using BitBake
271 commands.
272 Following is the script syntax:
273 <literallayout class='monospaced'>
274 $ source oe-init-build-env-memres &lt;port_number&gt; &lt;build_dir&gt;
275 </literallayout>
276 The script uses other scripts within the
277 <filename>scripts</filename> directory to do the bulk of the work.
278 </para>
279
280 <para>
281 If you do not provide a port number with the script, the
282 BitBake server at port "12345" is started.
283 </para>
284
285 <para>
286 By default, running this script without a
287 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
288 argument creates a build directory named
289 <filename>build</filename>.
290 If you provide a Build Directory argument when you
291 <filename>source</filename> the script, the Build Directory is
292 created using that name.
293 For example, the following command starts the BitBake server using
294 the default port "12345" and creates a Build Directory named
295 <filename>mybuilds</filename> that is outside of the
296 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
297 <literallayout class='monospaced'>
298 $ source oe-init-build-env-memres ~/mybuilds
299 </literallayout>
300 <note>
301 The OpenEmbedded build system does not support file or
302 directory names that contain spaces.
303 If you attempt to run the
304 <filename>oe-init-build-env-memres</filename> script
305 from a Source Directory that contains spaces in either the
306 filenames or directory names, the script returns an error
307 indicating no such file or directory.
308 Be sure to use a Source Directory free of names containing
309 spaces.
310 </note>
311 </para>
312 </section>
313
314 <section id='structure-basic-top-level'>
315 <title><filename>LICENSE, README, and README.hardware</filename></title>
316
317 <para>
318 These files are standard top-level files.
319 </para>
320 </section>
321</section>
322
323<section id='structure-build'>
324 <title>The Build Directory - <filename>build/</filename></title>
325
326 <para>
327 The OpenEmbedded build system creates the
328 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
329 when you run one of the build environment setup scripts (i.e.
330 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
331 or
332 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
333 </para>
334
335 <para>
336 If you do not give the Build Directory a specific name when you run
337 a setup script, the name defaults to <filename>build</filename>.
338 </para>
339
340 <para>
341 The
342 <link linkend='var-TOPDIR'><filename>TOPDIR</filename></link> variable
343 points to the Build Directory.
344 </para>
345
346 <section id='structure-build-buildhistory'>
347 <title><filename>build/buildhistory</filename></title>
348
349 <para>
350 The OpenEmbedded build system creates this directory when you
351 enable the build history feature.
352 The directory tracks build information into image, packages, and
353 SDK subdirectories.
354 For information on the build history feature, see the
355 "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
356 section.
357 </para>
358 </section>
359
360 <section id='structure-build-conf-local.conf'>
361 <title><filename>build/conf/local.conf</filename></title>
362
363 <para>
364 This configuration file contains all the local user configurations
365 for your build environment.
366 The <filename>local.conf</filename> file contains documentation on
367 the various configuration options.
368 Any variable set here overrides any variable set elsewhere within
369 the environment unless that variable is hard-coded within a file
370 (e.g. by using '=' instead of '?=').
371 Some variables are hard-coded for various reasons but these
372 variables are relatively rare.
373 </para>
374
375 <para>
376 Edit this file to set the
377 <filename><link linkend='var-MACHINE'>MACHINE</link></filename>
378 for which you want to build, which package types you wish to use
379 (<link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>),
380 the location from which you want to access downloaded files
381 (<filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>),
382 and how you want your host machine to use resources
383 (<link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>
384 and
385 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>).
386 </para>
387
388 <para>
389 If <filename>local.conf</filename> is not present when you
390 start the build, the OpenEmbedded build system creates it from
391 <filename>local.conf.sample</filename> when
392 you <filename>source</filename> the top-level build environment
393 setup script (i.e.
394 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
395 or
396 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
397 </para>
398
399 <para>
400 The source <filename>local.conf.sample</filename> file used
401 depends on the <filename>$TEMPLATECONF</filename> script variable,
402 which defaults to <filename>meta-yocto/conf</filename>
403 when you are building from the Yocto Project development
404 environment and defaults to <filename>meta/conf</filename> when
405 you are building from the OpenEmbedded Core environment.
406 Because the script variable points to the source of the
407 <filename>local.conf.sample</filename> file, this implies that
408 you can configure your build environment from any layer by setting
409 the variable in the top-level build environment setup script as
410 follows:
411 <literallayout class='monospaced'>
412 TEMPLATECONF=&lt;your_layer&gt;/conf
413 </literallayout>
414 Once the build process gets the sample file, it uses
415 <filename>sed</filename> to substitute final
416 <filename>${</filename><link linkend='var-OEROOT'><filename>OEROOT</filename></link><filename>}</filename>
417 values for all <filename>##OEROOT##</filename> values.
418 <note>
419 You can see how the <filename>TEMPLATECONF</filename> variable
420 is used by looking at the
421 <filename>scripts/oe-setup-builddir</filename> script in the
422 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
423 You can find the Yocto Project version of the
424 <filename>local.conf.sample</filename> file in the
425 <filename>meta-yocto/conf</filename> directory.
426 </note>
427 </para>
428 </section>
429
430 <section id='structure-build-conf-bblayers.conf'>
431 <title><filename>build/conf/bblayers.conf</filename></title>
432
433 <para>
434 This configuration file defines
435 <ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>layers</ulink>,
436 which are directory trees, traversed (or walked) by BitBake.
437 The <filename>bblayers.conf</filename> file uses the
438 <link linkend='var-BBLAYERS'><filename>BBLAYERS</filename></link>
439 variable to list the layers BitBake tries to find, and uses the
440 <link linkend='var-BBLAYERS_NON_REMOVABLE'><filename>BBLAYERS_NON_REMOVABLE</filename></link>
441 variable to list layers that must not be removed.
442 </para>
443
444 <para>
445 If <filename>bblayers.conf</filename> is not present when you
446 start the build, the OpenEmbedded build system creates it from
447 <filename>bblayers.conf.sample</filename> when
448 you <filename>source</filename> the top-level build environment
449 setup script (i.e.
450 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
451 or
452 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
453 </para>
454
455 <para>
456 The source <filename>bblayers.conf.sample</filename> file used
457 depends on the <filename>$TEMPLATECONF</filename> script variable,
458 which defaults to <filename>meta-yocto/conf</filename>
459 when you are building from the Yocto Project development
460 environment and defaults to <filename>meta/conf</filename> when
461 you are building from the OpenEmbedded Core environment.
462 Because the script variable points to the source of the
463 <filename>bblayers.conf.sample</filename> file, this implies that
464 you can base your build from any layer by setting the variable in
465 the top-level build environment setup script as follows:
466 <literallayout class='monospaced'>
467 TEMPLATECONF=&lt;your_layer&gt;/conf
468 </literallayout>
469 Once the build process gets the sample file, it uses
470 <filename>sed</filename> to substitute final
471 <filename>${</filename><link linkend='var-OEROOT'><filename>OEROOT</filename></link><filename>}</filename>
472 values for all <filename>##OEROOT##</filename> values.
473 <note>
474 You can see how the <filename>TEMPLATECONF</filename> variable
475 <filename>scripts/oe-setup-builddir</filename> script in the
476 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
477 You can find the Yocto Project version of the
478 <filename>bblayers.conf.sample</filename> file in the
479 <filename>meta-yocto/conf</filename> directory.
480 </note>
481 </para>
482 </section>
483
484 <section id='structure-build-conf-sanity_info'>
485 <title><filename>build/conf/sanity_info</filename></title>
486
487 <para>
488 This file indicates the state of the sanity checks and is created
489 during the build.
490 </para>
491 </section>
492
493 <section id='structure-build-downloads'>
494 <title><filename>build/downloads/</filename></title>
495
496 <para>
497 This directory contains downloaded upstream source tarballs.
498 You can reuse the directory for multiple builds or move
499 the directory to another location.
500 You can control the location of this directory through the
501 <filename><link linkend='var-DL_DIR'>DL_DIR</link></filename> variable.
502 </para>
503 </section>
504
505 <section id='structure-build-sstate-cache'>
506 <title><filename>build/sstate-cache/</filename></title>
507
508 <para>
509 This directory contains the shared state cache.
510 You can reuse the directory for multiple builds or move
511 the directory to another location.
512 You can control the location of this directory through the
513 <filename><link linkend='var-SSTATE_DIR'>SSTATE_DIR</link></filename> variable.
514 </para>
515 </section>
516
517 <section id='structure-build-tmp'>
518 <title><filename>build/tmp/</filename></title>
519
520 <para>
521 The OpenEmbedded build system creates and uses this directory
522 for all the build system's output.
523 The
524 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
525 variable points to this directory.
526 </para>
527
528 <para>
529 BitBake creates this directory if it does not exist.
530 As a last resort, to clean up a build and start it from scratch
531 (other than the downloads), you can remove everything in the
532 <filename>tmp</filename> directory or get rid of the
533 directory completely.
534 If you do, you should also completely remove the
535 <filename>build/sstate-cache</filename> directory.
536 </para>
537 </section>
538
539 <section id='structure-build-tmp-buildstats'>
540 <title><filename>build/tmp/buildstats/</filename></title>
541
542 <para>
543 This directory stores the build statistics.
544 </para>
545 </section>
546
547 <section id='structure-build-tmp-cache'>
548 <title><filename>build/tmp/cache/</filename></title>
549
550 <para>
551 When BitBake parses the metadata, it creates a cache file of the result that can
552 be used when subsequently running commands.
553 BitBake stores these results here on a per-machine basis.
554 </para>
555 </section>
556
557 <section id='structure-build-tmp-deploy'>
558 <title><filename>build/tmp/deploy/</filename></title>
559
560 <para>
561 This directory contains any "end result" output from the
562 OpenEmbedded build process.
563 The <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>
564 variable points to this directory.
565 For more detail on the contents of the <filename>deploy</filename>
566 directory, see the
567 "<link linkend='images-dev-environment'>Images</link>" and
568 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
569 sections.
570 </para>
571 </section>
572
573 <section id='structure-build-tmp-deploy-deb'>
574 <title><filename>build/tmp/deploy/deb/</filename></title>
575
576 <para>
577 This directory receives any <filename>.deb</filename> packages produced by
578 the build process.
579 The packages are sorted into feeds for different architecture types.
580 </para>
581 </section>
582
583 <section id='structure-build-tmp-deploy-rpm'>
584 <title><filename>build/tmp/deploy/rpm/</filename></title>
585
586 <para>
587 This directory receives any <filename>.rpm</filename> packages produced by
588 the build process.
589 The packages are sorted into feeds for different architecture types.
590 </para>
591 </section>
592
593 <section id='structure-build-tmp-deploy-ipk'>
594 <title><filename>build/tmp/deploy/ipk/</filename></title>
595
596 <para>
597 This directory receives <filename>.ipk</filename> packages produced by
598 the build process.
599 </para>
600 </section>
601
602 <section id='structure-build-tmp-deploy-licenses'>
603 <title><filename>build/tmp/deploy/licenses/</filename></title>
604
605 <para>
606 This directory receives package licensing information.
607 For example, the directory contains sub-directories for <filename>bash</filename>,
608 <filename>busybox</filename>, and <filename>eglibc</filename> (among others) that in turn
609 contain appropriate <filename>COPYING</filename> license files with other licensing information.
610 For information on licensing, see the
611 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
612 section.
613 </para>
614 </section>
615
616 <section id='structure-build-tmp-deploy-images'>
617 <title><filename>build/tmp/deploy/images/</filename></title>
618
619 <para>
620 This directory receives complete filesystem images.
621 If you want to flash the resulting image from a build onto a device, look here for the image.
622 </para>
623
624 <para>
625 Be careful when deleting files in this directory.
626 You can safely delete old images from this directory (e.g.
627 <filename>core-image-*</filename>, <filename>hob-image-*</filename>,
628 etc.).
629 However, the kernel (<filename>*zImage*</filename>, <filename>*uImage*</filename>, etc.),
630 bootloader and other supplementary files might be deployed here prior to building an
631 image.
632 Because these files are not directly produced from the image, if you
633 delete them they will not be automatically re-created when you build the image again.
634 </para>
635
636 <para>
637 If you do accidentally delete files here, you will need to force them to be
638 re-created.
639 In order to do that, you will need to know the target that produced them.
640 For example, these commands rebuild and re-create the kernel files:
641 <literallayout class='monospaced'>
642 $ bitbake -c clean virtual/kernel
643 $ bitbake virtual/kernel
644 </literallayout>
645 </para>
646 </section>
647
648 <section id='structure-build-tmp-deploy-sdk'>
649 <title><filename>build/tmp/deploy/sdk/</filename></title>
650
651 <para>
652 The OpenEmbedded build system creates this directory to hold
653 toolchain installer scripts, which when executed, install the
654 sysroot that matches your target hardware.
655 You can find out more about these installers in the
656 "<ulink url='&YOCTO_DOCS_ADT_URL;#optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</ulink>"
657 section in the Yocto Project Application Developer's Guide.
658 </para>
659 </section>
660
661 <section id='structure-build-tmp-sstate-control'>
662 <title><filename>build/tmp/sstate-control/</filename></title>
663
664 <para>
665 The OpenEmbedded build system uses this directory for the
666 shared state manifest files.
667 The shared state code uses these files to record the files
668 installed by each sstate task so that the files can be removed
669 when cleaning the recipe or when a newer version is about to
670 be installed.
671 The build system also uses the manifests to detect and produce
672 a warning when files from one task are overwriting those from
673 another.
674 </para>
675 </section>
676
677 <section id='structure-build-tmp-sysroots'>
678 <title><filename>build/tmp/sysroots/</filename></title>
679
680 <para>
681 This directory contains shared header files and libraries as well as other shared
682 data.
683 Packages that need to share output with other packages do so within this directory.
684 The directory is subdivided by architecture so multiple builds can run within
685 the one Build Directory.
686 </para>
687 </section>
688
689 <section id='structure-build-tmp-stamps'>
690 <title><filename>build/tmp/stamps/</filename></title>
691
692 <para>
693 This directory holds information that BitBake uses for accounting purposes
694 to track what tasks have run and when they have run.
695 The directory is sub-divided by architecture, package name, and
696 version.
697 Following is an example:
698 <literallayout class='monospaced'>
699 stamps/all-poky-linux/distcc-config/1.0-r0.do_build-2fdd....2do
700 </literallayout>
701 Although the files in the directory are empty of data,
702 BitBake uses the filenames and timestamps for tracking purposes.
703 </para>
704 </section>
705
706 <section id='structure-build-tmp-log'>
707 <title><filename>build/tmp/log/</filename></title>
708
709 <para>
710 This directory contains general logs that are not otherwise placed using the
711 package's <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>.
712 Examples of logs are the output from the <filename>check_pkg</filename> or
713 <filename>distro_check</filename> tasks.
714 Running a build does not necessarily mean this directory is created.
715 </para>
716 </section>
717
718 <section id='structure-build-tmp-work'>
719 <title><filename>build/tmp/work/</filename></title>
720
721 <para>
722 This directory contains architecture-specific work sub-directories
723 for packages built by BitBake.
724 All tasks execute from the appropriate work directory.
725 For example, the source for a particular package is unpacked,
726 patched, configured and compiled all within its own work directory.
727 Within the work directory, organization is based on the package group
728 and version for which the source is being compiled
729 as defined by the
730 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
731 </para>
732
733 <para>
734 It is worth considering the structure of a typical work directory.
735 As an example, consider <filename>linux-yocto-kernel-3.0</filename>
736 on the machine <filename>qemux86</filename>
737 built within the Yocto Project.
738 For this package, a work directory of
739 <filename>tmp/work/qemux86-poky-linux/linux-yocto/3.0+git1+&lt;.....&gt;</filename>,
740 referred to as the
741 <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>, is created.
742 Within this directory, the source is unpacked to
743 <filename>linux-qemux86-standard-build</filename> and then patched by Quilt.
744 (See the
745 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-a-quilt-workflow'>Using a Quilt Flow</ulink>"
746 section in the Yocto Project Development Manual for more information.)
747 Within the <filename>linux-qemux86-standard-build</filename> directory,
748 standard Quilt directories <filename>linux-3.0/patches</filename>
749 and <filename>linux-3.0/.pc</filename> are created,
750 and standard Quilt commands can be used.
751 </para>
752
753 <para>
754 There are other directories generated within <filename>WORKDIR</filename>.
755 The most important directory is <filename>WORKDIR/temp/</filename>,
756 which has log files for each task (<filename>log.do_*.pid</filename>)
757 and contains the scripts BitBake runs for each task
758 (<filename>run.do_*.pid</filename>).
759 The <filename>WORKDIR/image/</filename> directory is where "make
760 install" places its output that is then split into sub-packages
761 within <filename>WORKDIR/packages-split/</filename>.
762 </para>
763 </section>
764
765 <section id='structure-build-work-shared'>
766 <title><filename>build/tmp/work-shared/</filename></title>
767
768 <para>
769 For efficiency, the OpenEmbedded build system creates and uses
770 this directory to hold recipes that share a work directory with
771 other recipes.
772 In practice, this is only used for <filename>gcc</filename>
773 and its variants (e.g. <filename>gcc-cross</filename>,
774 <filename>libgcc</filename>, <filename>gcc-runtime</filename>,
775 and so forth).
776 </para>
777 </section>
778</section>
779
780<section id='structure-meta'>
781 <title>The Metadata - <filename>meta/</filename></title>
782
783 <para>
784 As mentioned previously,
785 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> is the core
786 of the Yocto Project.
787 Metadata has several important subdivisions:
788 </para>
789
790 <section id='structure-meta-classes'>
791 <title><filename>meta/classes/</filename></title>
792
793 <para>
794 This directory contains the <filename>*.bbclass</filename> files.
795 Class files are used to abstract common code so it can be reused by multiple
796 packages.
797 Every package inherits the <filename>base.bbclass</filename> file.
798 Examples of other important classes are <filename>autotools.bbclass</filename>, which
799 in theory allows any Autotool-enabled package to work with the Yocto Project with minimal effort.
800 Another example is <filename>kernel.bbclass</filename> that contains common code and functions
801 for working with the Linux kernel.
802 Functions like image generation or packaging also have their specific class files
803 such as <filename>image.bbclass</filename>, <filename>rootfs_*.bbclass</filename> and
804 <filename>package*.bbclass</filename>.
805 </para>
806
807 <para>
808 For reference information on classes, see the
809 "<link linkend='ref-classes'>Classes</link>" chapter.
810 </para>
811 </section>
812
813 <section id='structure-meta-conf'>
814 <title><filename>meta/conf/</filename></title>
815
816 <para>
817 This directory contains the core set of configuration files that start from
818 <filename>bitbake.conf</filename> and from which all other configuration
819 files are included.
820 See the include statements at the end of the
821 <filename>bitbake.conf</filename> file and you will note that even
822 <filename>local.conf</filename> is loaded from there.
823 While <filename>bitbake.conf</filename> sets up the defaults, you can often override
824 these by using the (<filename>local.conf</filename>) file, machine file or
825 the distribution configuration file.
826 </para>
827 </section>
828
829 <section id='structure-meta-conf-machine'>
830 <title><filename>meta/conf/machine/</filename></title>
831
832 <para>
833 This directory contains all the machine configuration files.
834 If you set <filename>MACHINE = "qemux86"</filename>,
835 the OpenEmbedded build system looks for a <filename>qemux86.conf</filename> file in this
836 directory.
837 The <filename>include</filename> directory contains various data common to multiple machines.
838 If you want to add support for a new machine to the Yocto Project, look in this directory.
839 </para>
840 </section>
841
842 <section id='structure-meta-conf-distro'>
843 <title><filename>meta/conf/distro/</filename></title>
844
845 <para>
846 The contents of this directory controls any distribution-specific
847 configurations.
848 For the Yocto Project, the <filename>defaultsetup.conf</filename> is the main file here.
849 This directory includes the versions and the
850 <filename>SRCDATE</filename> definitions for applications that are configured here.
851 An example of an alternative configuration might be <filename>poky-bleeding.conf</filename>.
852 Although this file mainly inherits its configuration from Poky.
853 </para>
854 </section>
855
856 <section id='structure-meta-conf-machine-sdk'>
857 <title><filename>meta/conf/machine-sdk/</filename></title>
858
859 <para>
860 The OpenEmbedded build system searches this directory for
861 configuration files that correspond to the value of
862 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>.
863 By default, 32-bit and 64-bit x86 files ship with the Yocto
864 Project that support some SDK hosts.
865 However, it is possible to extend that support to other SDK hosts
866 by adding additional configuration files in this subdirectory
867 within another layer.
868 </para>
869 </section>
870
871 <section id='structure-meta-files'>
872 <title><filename>meta/files/</filename></title>
873
874 <para>
875 This directory contains common license files and several text files
876 used by the build system.
877 The text files contain minimal device information and
878 lists of files and directories with known permissions.
879 </para>
880 </section>
881
882 <section id='structure-meta-lib'>
883 <title><filename>meta/lib/</filename></title>
884
885 <para>
886 This directory contains OpenEmbedded Python library code
887 used during the build process.
888 </para>
889 </section>
890
891 <section id='structure-meta-recipes-bsp'>
892 <title><filename>meta/recipes-bsp/</filename></title>
893
894 <para>
895 This directory contains anything linking to specific hardware or hardware
896 configuration information such as "u-boot" and "grub".
897 </para>
898 </section>
899
900 <section id='structure-meta-recipes-connectivity'>
901 <title><filename>meta/recipes-connectivity/</filename></title>
902
903 <para>
904 This directory contains libraries and applications related to communication with other devices.
905 </para>
906 </section>
907
908 <section id='structure-meta-recipes-core'>
909 <title><filename>meta/recipes-core/</filename></title>
910
911 <para>
912 This directory contains what is needed to build a basic working Linux image
913 including commonly used dependencies.
914 </para>
915 </section>
916
917 <section id='structure-meta-recipes-devtools'>
918 <title><filename>meta/recipes-devtools/</filename></title>
919
920 <para>
921 This directory contains tools that are primarily used by the build system.
922 The tools, however, can also be used on targets.
923 </para>
924 </section>
925
926 <section id='structure-meta-recipes-extended'>
927 <title><filename>meta/recipes-extended/</filename></title>
928
929 <para>
930 This directory contains non-essential applications that add features compared to the
931 alternatives in core.
932 You might need this directory for full tool functionality or for Linux Standard Base (LSB)
933 compliance.
934 </para>
935 </section>
936
937 <section id='structure-meta-recipes-gnome'>
938 <title><filename>meta/recipes-gnome/</filename></title>
939
940 <para>
941 This directory contains all things related to the GTK+ application framework.
942 </para>
943 </section>
944
945 <section id='structure-meta-recipes-graphics'>
946 <title><filename>meta/recipes-graphics/</filename></title>
947
948 <para>
949 This directory contains X and other graphically related system libraries
950 </para>
951 </section>
952
953 <section id='structure-meta-recipes-kernel'>
954 <title><filename>meta/recipes-kernel/</filename></title>
955
956 <para>
957 This directory contains the kernel and generic applications and libraries that
958 have strong kernel dependencies.
959 </para>
960 </section>
961
962 <section id='structure-meta-recipes-lsb4'>
963 <title><filename>meta/recipes-lsb4/</filename></title>
964
965 <para>
966 This directory contains recipes specifically added to support
967 the Linux Standard Base (LSB) version 4.x.
968 </para>
969 </section>
970
971 <section id='structure-meta-recipes-multimedia'>
972 <title><filename>meta/recipes-multimedia/</filename></title>
973
974 <para>
975 This directory contains codecs and support utilities for audio, images and video.
976 </para>
977 </section>
978
979 <section id='structure-meta-recipes-qt'>
980 <title><filename>meta/recipes-qt/</filename></title>
981
982 <para>
983 This directory contains all things related to the Qt application framework.
984 </para>
985 </section>
986
987 <section id='structure-meta-recipes-rt'>
988 <title><filename>meta/recipes-rt/</filename></title>
989
990 <para>
991 This directory contains package and image recipes for using and testing
992 the <filename>PREEMPT_RT</filename> kernel.
993 </para>
994 </section>
995
996 <section id='structure-meta-recipes-sato'>
997 <title><filename>meta/recipes-sato/</filename></title>
998
999 <para>
1000 This directory contains the Sato demo/reference UI/UX and its associated applications
1001 and configuration data.
1002 </para>
1003 </section>
1004
1005 <section id='structure-meta-recipes-support'>
1006 <title><filename>meta/recipes-support/</filename></title>
1007
1008 <para>
1009 This directory contains recipes used by other recipes, but that are
1010 not directly included in images (i.e. dependencies of other
1011 recipes).
1012 </para>
1013 </section>
1014
1015 <section id='structure-meta-site'>
1016 <title><filename>meta/site/</filename></title>
1017
1018 <para>
1019 This directory contains a list of cached results for various architectures.
1020 Because certain "autoconf" test results cannot be determined when cross-compiling due to
1021 the tests not able to run on a live system, the information in this directory is
1022 passed to "autoconf" for the various architectures.
1023 </para>
1024 </section>
1025
1026 <section id='structure-meta-recipes-txt'>
1027 <title><filename>meta/recipes.txt</filename></title>
1028
1029 <para>
1030 This file is a description of the contents of <filename>recipes-*</filename>.
1031 </para>
1032 </section>
1033</section>
1034
1035</chapter>
1036<!--
1037vim: expandtab tw=80 ts=4
1038-->
diff --git a/documentation/ref-manual/ref-style.css b/documentation/ref-manual/ref-style.css
new file mode 100644
index 0000000000..e896a39d33
--- /dev/null
+++ b/documentation/ref-manual/ref-style.css
@@ -0,0 +1,979 @@
1/*
2 Generic XHTML / DocBook XHTML CSS Stylesheet.
3
4 Browser wrangling and typographic design by
5 Oyvind Kolas / pippin@gimp.org
6
7 Customised for Poky by
8 Matthew Allum / mallum@o-hand.com
9
10 Thanks to:
11 Liam R. E. Quin
12 William Skaggs
13 Jakub Steiner
14
15 Structure
16 ---------
17
18 The stylesheet is divided into the following sections:
19
20 Positioning
21 Margins, paddings, width, font-size, clearing.
22 Decorations
23 Borders, style
24 Colors
25 Colors
26 Graphics
27 Graphical backgrounds
28 Nasty IE tweaks
29 Workarounds needed to make it work in internet explorer,
30 currently makes the stylesheet non validating, but up until
31 this point it is validating.
32 Mozilla extensions
33 Transparency for footer
34 Rounded corners on boxes
35
36*/
37
38
39 /*************** /
40 / Positioning /
41/ ***************/
42
43body {
44 font-family: Verdana, Sans, sans-serif;
45
46 min-width: 640px;
47 width: 80%;
48 margin: 0em auto;
49 padding: 2em 5em 5em 5em;
50 color: #333;
51}
52
53h1,h2,h3,h4,h5,h6,h7 {
54 font-family: Arial, Sans;
55 color: #00557D;
56 clear: both;
57}
58
59h1 {
60 font-size: 2em;
61 text-align: left;
62 padding: 0em 0em 0em 0em;
63 margin: 2em 0em 0em 0em;
64}
65
66h2.subtitle {
67 margin: 0.10em 0em 3.0em 0em;
68 padding: 0em 0em 0em 0em;
69 font-size: 1.8em;
70 padding-left: 20%;
71 font-weight: normal;
72 font-style: italic;
73}
74
75h2 {
76 margin: 2em 0em 0.66em 0em;
77 padding: 0.5em 0em 0em 0em;
78 font-size: 1.5em;
79 font-weight: bold;
80}
81
82h3.subtitle {
83 margin: 0em 0em 1em 0em;
84 padding: 0em 0em 0em 0em;
85 font-size: 142.14%;
86 text-align: right;
87}
88
89h3 {
90 margin: 1em 0em 0.5em 0em;
91 padding: 1em 0em 0em 0em;
92 font-size: 140%;
93 font-weight: bold;
94}
95
96h4 {
97 margin: 1em 0em 0.5em 0em;
98 padding: 1em 0em 0em 0em;
99 font-size: 120%;
100 font-weight: bold;
101}
102
103h5 {
104 margin: 1em 0em 0.5em 0em;
105 padding: 1em 0em 0em 0em;
106 font-size: 110%;
107 font-weight: bold;
108}
109
110h6 {
111 margin: 1em 0em 0em 0em;
112 padding: 1em 0em 0em 0em;
113 font-size: 110%;
114 font-weight: bold;
115}
116
117.authorgroup {
118 background-color: transparent;
119 background-repeat: no-repeat;
120 padding-top: 256px;
121 background-image: url("figures/poky-title.png");
122 background-position: left top;
123 margin-top: -256px;
124 padding-right: 50px;
125 margin-left: 0px;
126 text-align: right;
127 width: 740px;
128}
129
130h3.author {
131 margin: 0em 0me 0em 0em;
132 padding: 0em 0em 0em 0em;
133 font-weight: normal;
134 font-size: 100%;
135 color: #333;
136 clear: both;
137}
138
139.author tt.email {
140 font-size: 66%;
141}
142
143.titlepage hr {
144 width: 0em;
145 clear: both;
146}
147
148.revhistory {
149 padding-top: 2em;
150 clear: both;
151}
152
153.toc,
154.list-of-tables,
155.list-of-examples,
156.list-of-figures {
157 padding: 1.33em 0em 2.5em 0em;
158 color: #00557D;
159}
160
161.toc p,
162.list-of-tables p,
163.list-of-figures p,
164.list-of-examples p {
165 padding: 0em 0em 0em 0em;
166 padding: 0em 0em 0.3em;
167 margin: 1.5em 0em 0em 0em;
168}
169
170.toc p b,
171.list-of-tables p b,
172.list-of-figures p b,
173.list-of-examples p b{
174 font-size: 100.0%;
175 font-weight: bold;
176}
177
178.toc dl,
179.list-of-tables dl,
180.list-of-figures dl,
181.list-of-examples dl {
182 margin: 0em 0em 0.5em 0em;
183 padding: 0em 0em 0em 0em;
184}
185
186.toc dt {
187 margin: 0em 0em 0em 0em;
188 padding: 0em 0em 0em 0em;
189}
190
191.toc dd {
192 margin: 0em 0em 0em 2.6em;
193 padding: 0em 0em 0em 0em;
194}
195
196div.glossary dl,
197div.variablelist dl {
198}
199
200.glossary dl dt,
201.variablelist dl dt,
202.variablelist dl dt span.term {
203 font-weight: normal;
204 width: 20em;
205 text-align: right;
206}
207
208.variablelist dl dt {
209 margin-top: 0.5em;
210}
211
212.glossary dl dd,
213.variablelist dl dd {
214 margin-top: -1em;
215 margin-left: 25.5em;
216}
217
218.glossary dd p,
219.variablelist dd p {
220 margin-top: 0em;
221 margin-bottom: 1em;
222}
223
224
225div.calloutlist table td {
226 padding: 0em 0em 0em 0em;
227 margin: 0em 0em 0em 0em;
228}
229
230div.calloutlist table td p {
231 margin-top: 0em;
232 margin-bottom: 1em;
233}
234
235div p.copyright {
236 text-align: left;
237}
238
239div.legalnotice p.legalnotice-title {
240 margin-bottom: 0em;
241}
242
243p {
244 line-height: 1.5em;
245 margin-top: 0em;
246
247}
248
249dl {
250 padding-top: 0em;
251}
252
253hr {
254 border: solid 1px;
255}
256
257
258.mediaobject,
259.mediaobjectco {
260 text-align: center;
261}
262
263img {
264 border: none;
265}
266
267ul {
268 padding: 0em 0em 0em 1.5em;
269}
270
271ul li {
272 padding: 0em 0em 0em 0em;
273}
274
275ul li p {
276 text-align: left;
277}
278
279table {
280 width :100%;
281}
282
283th {
284 padding: 0.25em;
285 text-align: left;
286 font-weight: normal;
287 vertical-align: top;
288}
289
290td {
291 padding: 0.25em;
292 vertical-align: top;
293}
294
295p a[id] {
296 margin: 0px;
297 padding: 0px;
298 display: inline;
299 background-image: none;
300}
301
302a {
303 text-decoration: underline;
304 color: #444;
305}
306
307pre {
308 overflow: auto;
309}
310
311a:hover {
312 text-decoration: underline;
313 /*font-weight: bold;*/
314}
315
316
317div.informalfigure,
318div.informalexample,
319div.informaltable,
320div.figure,
321div.table,
322div.example {
323 margin: 1em 0em;
324 padding: 1em;
325 page-break-inside: avoid;
326}
327
328
329div.informalfigure p.title b,
330div.informalexample p.title b,
331div.informaltable p.title b,
332div.figure p.title b,
333div.example p.title b,
334div.table p.title b{
335 padding-top: 0em;
336 margin-top: 0em;
337 font-size: 100%;
338 font-weight: normal;
339}
340
341.mediaobject .caption,
342.mediaobject .caption p {
343 text-align: center;
344 font-size: 80%;
345 padding-top: 0.5em;
346 padding-bottom: 0.5em;
347}
348
349.epigraph {
350 padding-left: 55%;
351 margin-bottom: 1em;
352}
353
354.epigraph p {
355 text-align: left;
356}
357
358.epigraph .quote {
359 font-style: italic;
360}
361.epigraph .attribution {
362 font-style: normal;
363 text-align: right;
364}
365
366span.application {
367 font-style: italic;
368}
369
370.programlisting {
371 font-family: monospace;
372 font-size: 80%;
373 white-space: pre;
374 margin: 1.33em 0em;
375 padding: 1.33em;
376}
377
378.tip,
379.warning,
380.caution,
381.note {
382 margin-top: 1em;
383 margin-bottom: 1em;
384
385}
386
387/* force full width of table within div */
388.tip table,
389.warning table,
390.caution table,
391.note table {
392 border: none;
393 width: 100%;
394}
395
396
397.tip table th,
398.warning table th,
399.caution table th,
400.note table th {
401 padding: 0.8em 0.0em 0.0em 0.0em;
402 margin : 0em 0em 0em 0em;
403}
404
405.tip p,
406.warning p,
407.caution p,
408.note p {
409 margin-top: 0.5em;
410 margin-bottom: 0.5em;
411 padding-right: 1em;
412 text-align: left;
413}
414
415.acronym {
416 text-transform: uppercase;
417}
418
419b.keycap,
420.keycap {
421 padding: 0.09em 0.3em;
422 margin: 0em;
423}
424
425.itemizedlist li {
426 clear: none;
427}
428
429.filename {
430 font-size: medium;
431 font-family: Courier, monospace;
432}
433
434
435div.navheader, div.heading{
436 position: absolute;
437 left: 0em;
438 top: 0em;
439 width: 100%;
440 background-color: #cdf;
441 width: 100%;
442}
443
444div.navfooter, div.footing{
445 position: fixed;
446 left: 0em;
447 bottom: 0em;
448 background-color: #eee;
449 width: 100%;
450}
451
452
453div.navheader td,
454div.navfooter td {
455 font-size: 66%;
456}
457
458div.navheader table th {
459 /*font-family: Georgia, Times, serif;*/
460 /*font-size: x-large;*/
461 font-size: 80%;
462}
463
464div.navheader table {
465 border-left: 0em;
466 border-right: 0em;
467 border-top: 0em;
468 width: 100%;
469}
470
471div.navfooter table {
472 border-left: 0em;
473 border-right: 0em;
474 border-bottom: 0em;
475 width: 100%;
476}
477
478div.navheader table td a,
479div.navfooter table td a {
480 color: #777;
481 text-decoration: none;
482}
483
484/* normal text in the footer */
485div.navfooter table td {
486 color: black;
487}
488
489div.navheader table td a:visited,
490div.navfooter table td a:visited {
491 color: #444;
492}
493
494
495/* links in header and footer */
496div.navheader table td a:hover,
497div.navfooter table td a:hover {
498 text-decoration: underline;
499 background-color: transparent;
500 color: #33a;
501}
502
503div.navheader hr,
504div.navfooter hr {
505 display: none;
506}
507
508
509.qandaset tr.question td p {
510 margin: 0em 0em 1em 0em;
511 padding: 0em 0em 0em 0em;
512}
513
514.qandaset tr.answer td p {
515 margin: 0em 0em 1em 0em;
516 padding: 0em 0em 0em 0em;
517}
518.answer td {
519 padding-bottom: 1.5em;
520}
521
522.emphasis {
523 font-weight: bold;
524}
525
526
527 /************* /
528 / decorations /
529/ *************/
530
531.titlepage {
532}
533
534.part .title {
535}
536
537.subtitle {
538 border: none;
539}
540
541/*
542h1 {
543 border: none;
544}
545
546h2 {
547 border-top: solid 0.2em;
548 border-bottom: solid 0.06em;
549}
550
551h3 {
552 border-top: 0em;
553 border-bottom: solid 0.06em;
554}
555
556h4 {
557 border: 0em;
558 border-bottom: solid 0.06em;
559}
560
561h5 {
562 border: 0em;
563}
564*/
565
566.programlisting {
567 border: solid 1px;
568}
569
570div.figure,
571div.table,
572div.informalfigure,
573div.informaltable,
574div.informalexample,
575div.example {
576 border: 1px solid;
577}
578
579
580
581.tip,
582.warning,
583.caution,
584.note {
585 border: 1px solid;
586}
587
588.tip table th,
589.warning table th,
590.caution table th,
591.note table th {
592 border-bottom: 1px solid;
593}
594
595.question td {
596 border-top: 1px solid black;
597}
598
599.answer {
600}
601
602
603b.keycap,
604.keycap {
605 border: 1px solid;
606}
607
608
609div.navheader, div.heading{
610 border-bottom: 1px solid;
611}
612
613
614div.navfooter, div.footing{
615 border-top: 1px solid;
616}
617
618 /********* /
619 / colors /
620/ *********/
621
622body {
623 color: #333;
624 background: white;
625}
626
627a {
628 background: transparent;
629}
630
631a:hover {
632 background-color: #dedede;
633}
634
635
636h1,
637h2,
638h3,
639h4,
640h5,
641h6,
642h7,
643h8 {
644 background-color: transparent;
645}
646
647hr {
648 border-color: #aaa;
649}
650
651
652.tip, .warning, .caution, .note {
653 border-color: #fff;
654}
655
656
657.tip table th,
658.warning table th,
659.caution table th,
660.note table th {
661 border-bottom-color: #fff;
662}
663
664
665.warning {
666 background-color: #f0f0f2;
667}
668
669.caution {
670 background-color: #f0f0f2;
671}
672
673.tip {
674 background-color: #f0f0f2;
675}
676
677.note {
678 background-color: #f0f0f2;
679}
680
681.glossary dl dt,
682.variablelist dl dt,
683.variablelist dl dt span.term {
684 color: #044;
685}
686
687div.figure,
688div.table,
689div.example,
690div.informalfigure,
691div.informaltable,
692div.informalexample {
693 border-color: #aaa;
694}
695
696pre.programlisting {
697 color: black;
698 background-color: #fff;
699 border-color: #aaa;
700 border-width: 2px;
701}
702
703.guimenu,
704.guilabel,
705.guimenuitem {
706 background-color: #eee;
707}
708
709
710b.keycap,
711.keycap {
712 background-color: #eee;
713 border-color: #999;
714}
715
716
717div.navheader {
718 border-color: black;
719}
720
721
722div.navfooter {
723 border-color: black;
724}
725
726
727 /*********** /
728 / graphics /
729/ ***********/
730
731/*
732body {
733 background-image: url("images/body_bg.jpg");
734 background-attachment: fixed;
735}
736
737.navheader,
738.note,
739.tip {
740 background-image: url("images/note_bg.jpg");
741 background-attachment: fixed;
742}
743
744.warning,
745.caution {
746 background-image: url("images/warning_bg.jpg");
747 background-attachment: fixed;
748}
749
750.figure,
751.informalfigure,
752.example,
753.informalexample,
754.table,
755.informaltable {
756 background-image: url("images/figure_bg.jpg");
757 background-attachment: fixed;
758}
759
760*/
761h1,
762h2,
763h3,
764h4,
765h5,
766h6,
767h7{
768}
769
770/*
771Example of how to stick an image as part of the title.
772
773div.article .titlepage .title
774{
775 background-image: url("figures/white-on-black.png");
776 background-position: center;
777 background-repeat: repeat-x;
778}
779*/
780
781div.preface .titlepage .title,
782div.colophon .title,
783div.chapter .titlepage .title,
784div.article .titlepage .title
785{
786}
787
788div.section div.section .titlepage .title,
789div.sect2 .titlepage .title {
790 background: none;
791}
792
793
794h1.title {
795 background-color: transparent;
796 background-image: url("figures/poky-title.png");
797 background-repeat: no-repeat;
798 height: 256px;
799 text-indent: -9000px;
800 overflow:hidden;
801}
802
803h2.subtitle {
804 background-color: transparent;
805 text-indent: -9000px;
806 overflow:hidden;
807 width: 0px;
808 display: none;
809}
810
811 /*************************************** /
812 / pippin.gimp.org specific alterations /
813/ ***************************************/
814
815/*
816div.heading, div.navheader {
817 color: #777;
818 font-size: 80%;
819 padding: 0;
820 margin: 0;
821 text-align: left;
822 position: absolute;
823 top: 0px;
824 left: 0px;
825 width: 100%;
826 height: 50px;
827 background: url('/gfx/heading_bg.png') transparent;
828 background-repeat: repeat-x;
829 background-attachment: fixed;
830 border: none;
831}
832
833div.heading a {
834 color: #444;
835}
836
837div.footing, div.navfooter {
838 border: none;
839 color: #ddd;
840 font-size: 80%;
841 text-align:right;
842
843 width: 100%;
844 padding-top: 10px;
845 position: absolute;
846 bottom: 0px;
847 left: 0px;
848
849 background: url('/gfx/footing_bg.png') transparent;
850}
851*/
852
853
854
855 /****************** /
856 / nasty ie tweaks /
857/ ******************/
858
859/*
860div.heading, div.navheader {
861 width:expression(document.body.clientWidth + "px");
862}
863
864div.footing, div.navfooter {
865 width:expression(document.body.clientWidth + "px");
866 margin-left:expression("-5em");
867}
868body {
869 padding:expression("4em 5em 0em 5em");
870}
871*/
872
873 /**************************************** /
874 / mozilla vendor specific css extensions /
875/ ****************************************/
876/*
877div.navfooter, div.footing{
878 -moz-opacity: 0.8em;
879}
880
881div.figure,
882div.table,
883div.informalfigure,
884div.informaltable,
885div.informalexample,
886div.example,
887.tip,
888.warning,
889.caution,
890.note {
891 -moz-border-radius: 0.5em;
892}
893
894b.keycap,
895.keycap {
896 -moz-border-radius: 0.3em;
897}
898*/
899
900table tr td table tr td {
901 display: none;
902}
903
904
905hr {
906 display: none;
907}
908
909table {
910 border: 0em;
911}
912
913 .photo {
914 float: right;
915 margin-left: 1.5em;
916 margin-bottom: 1.5em;
917 margin-top: 0em;
918 max-width: 17em;
919 border: 1px solid gray;
920 padding: 3px;
921 background: white;
922}
923 .seperator {
924 padding-top: 2em;
925 clear: both;
926 }
927
928 #validators {
929 margin-top: 5em;
930 text-align: right;
931 color: #777;
932 }
933 @media print {
934 body {
935 font-size: 8pt;
936 }
937 .noprint {
938 display: none;
939 }
940 }
941
942
943.tip,
944.note {
945 background: #f0f0f2;
946 color: #333;
947 padding: 20px;
948 margin: 20px;
949}
950
951.tip h3,
952.note h3 {
953 padding: 0em;
954 margin: 0em;
955 font-size: 2em;
956 font-weight: bold;
957 color: #333;
958}
959
960.tip a,
961.note a {
962 color: #333;
963 text-decoration: underline;
964}
965
966.footnote {
967 font-size: small;
968 color: #333;
969}
970
971/* Changes the announcement text */
972.tip h3,
973.warning h3,
974.caution h3,
975.note h3 {
976 font-size:large;
977 color: #00557D;
978}
979
diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml
new file mode 100644
index 0000000000..71369ab0a2
--- /dev/null
+++ b/documentation/ref-manual/ref-variables.xml
@@ -0,0 +1,8417 @@
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
5<!-- Dummy chapter -->
6<chapter id='ref-variables-glos'>
7
8<title>Variables Glossary</title>
9
10<para>
11 This chapter lists common variables used in the OpenEmbedded build system and gives an overview
12 of their function and contents.
13</para>
14
15<glossary id='ref-variables-glossary'>
16
17
18 <para>
19 <link linkend='var-ALLOW_EMPTY'>A</link>
20 <link linkend='var-B'>B</link>
21 <link linkend='var-CFLAGS'>C</link>
22 <link linkend='var-D'>D</link>
23 <link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>E</link>
24 <link linkend='var-FEATURE_PACKAGES'>F</link>
25 <link linkend='var-GROUPADD_PARAM'>G</link>
26 <link linkend='var-HOMEPAGE'>H</link>
27 <link linkend='var-ICECC_DISABLED'>I</link>
28<!-- <link linkend='var-glossary-j'>J</link> -->
29 <link linkend='var-KARCH'>K</link>
30 <link linkend='var-LABELS'>L</link>
31 <link linkend='var-MACHINE'>M</link>
32<!-- <link linkend='var-glossary-n'>N</link> -->
33 <link linkend='var-OE_BINCONFIG_EXTRA_MANGLE'>O</link>
34 <link linkend='var-P'>P</link>
35 <link linkend='var-QMAKE_PROFILES'>Q</link>
36 <link linkend='var-RCONFLICTS'>R</link>
37 <link linkend='var-S'>S</link>
38 <link linkend='var-T'>T</link>
39 <link linkend='var-UBOOT_CONFIG'>U</link>
40<!-- <link linkend='var-glossary-v'>V</link> -->
41 <link linkend='var-WARN_QA'>W</link>
42<!-- <link linkend='var-glossary-x'>X</link> -->
43<!-- <link linkend='var-glossary-y'>Y</link> -->
44<!-- <link linkend='var-glossary-z'>Z</link>-->
45 </para>
46
47 <glossdiv id='var-glossary-a'><title>A</title>
48
49 <glossentry id='var-ALLOW_EMPTY'><glossterm>ALLOW_EMPTY</glossterm>
50 <glossdef>
51 <para>
52 Specifies if an output package should still be produced if it is empty.
53 By default, BitBake does not produce empty packages.
54 This default behavior can cause issues when there is an
55 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link> or
56 some other hard runtime requirement on the existence of the package.
57 </para>
58
59 <para>
60 Like all package-controlling variables, you must always use them in
61 conjunction with a package name override, as in:
62 <literallayout class='monospaced'>
63 ALLOW_EMPTY_${PN} = "1"
64 ALLOW_EMPTY_${PN}-dev = "1"
65 ALLOW_EMPTY_${PN}-staticdev = "1"
66 </literallayout>
67 </para>
68 </glossdef>
69 </glossentry>
70
71 <glossentry id='var-ALTERNATIVE'><glossterm>ALTERNATIVE</glossterm>
72 <glossdef>
73 <para>
74 Lists commands in a package that need an alternative
75 binary naming scheme.
76 Sometimes the same command is provided in multiple packages.
77 When this occurs, the OpenEmbedded build system needs to
78 use the alternatives system to create a different binary
79 naming scheme so the commands can co-exist.
80 </para>
81
82 <para>
83 To use the variable, list out the package's commands
84 that also exist as part of another package.
85 For example, if the <filename>busybox</filename> package
86 has four commands that also exist as part of another
87 package, you identify them as follows:
88 <literallayout class='monospaced'>
89 ALTERNATIVE_busybox = "sh sed test bracket"
90 </literallayout>
91 For more information on the alternatives system, see the
92 "<link linkend='ref-classes-update-alternatives'><filename>update-alternatives.bbclass</filename></link>"
93 section.
94 </para>
95 </glossdef>
96 </glossentry>
97
98 <glossentry id='var-ALTERNATIVE_LINK_NAME'><glossterm>ALTERNATIVE_LINK_NAME</glossterm>
99 <glossdef>
100 <para>
101 Used by the alternatives system to map duplicated commands
102 to actual locations.
103 For example, if the <filename>bracket</filename> command
104 provided by the <filename>busybox</filename> package is
105 duplicated through another package, you must use the
106 <filename>ALTERNATIVE_LINK_NAME</filename> variable to
107 specify the actual location:
108 <literallayout class='monospaced'>
109 ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/["
110 </literallayout>
111 In this example, the binary for the
112 <filename>bracket</filename> command (i.e.
113 <filename>[</filename>) from the
114 <filename>busybox</filename> package resides in
115 <filename>/usr/bin/</filename>.
116 <note>
117 If <filename>ALTERNATIVE_LINK_NAME</filename> is not
118 defined, it defaults to
119 <filename>${bindir}/&lt;name&gt;</filename>.
120 </note>
121 </para>
122
123 <para>
124 For more information on the alternatives system, see the
125 "<link linkend='ref-classes-update-alternatives'><filename>update-alternatives.bbclass</filename></link>"
126 section.
127 </para>
128 </glossdef>
129 </glossentry>
130
131 <glossentry id='var-ALTERNATIVE_PRIORITY'><glossterm>ALTERNATIVE_PRIORITY</glossterm>
132 <glossdef>
133 <para>
134 Used by the alternatives system to create default
135 priorities for duplicated commands.
136 You can use the variable to create a single default
137 regardless of the command name or package, a default for
138 specific duplicated commands regardless of the package, or
139 a default for specific commands tied to particular packages.
140 Here are the available syntax forms:
141 <literallayout class='monospaced'>
142 ALTERNATIVE_PRIORITY = "&lt;priority&gt;"
143 ALTERNATIVE_PRIORITY[&lt;name&gt;] = "&lt;priority&gt;"
144 ALTERNATIVE_PRIORITY_&lt;pkg&gt;[&lt;name&gt;] = "&lt;priority&gt;"
145 </literallayout>
146 </para>
147
148 <para>
149 For more information on the alternatives system, see the
150 "<link linkend='ref-classes-update-alternatives'><filename>update-alternatives.bbclass</filename></link>"
151 section.
152 </para>
153 </glossdef>
154 </glossentry>
155
156 <glossentry id='var-ALTERNATIVE_TARGET'><glossterm>ALTERNATIVE_TARGET</glossterm>
157 <glossdef>
158 <para>
159 Used by the alternatives system to create default link
160 locations for duplicated commands.
161 You can use the variable to create a single default
162 location for all duplicated commands regardless of the
163 command name or package, a default for
164 specific duplicated commands regardless of the package, or
165 a default for specific commands tied to particular packages.
166 Here are the available syntax forms:
167 <literallayout class='monospaced'>
168 ALTERNATIVE_TARGET = "&lt;target&gt;"
169 ALTERNATIVE_TARGET[&lt;name&gt;] = "&lt;target&gt;"
170 ALTERNATIVE_TARGET_&lt;pkg&gt;[&lt;name&gt;] = "&lt;target&gt;"
171 </literallayout>
172 <note>
173 <para>
174 If <filename>ALTERNATIVE_TARGET</filename> is not
175 defined, it inherits the value from the
176 <link linkend='var-ALTERNATIVE_LINK_NAME'><filename>ALTERNATIVE_LINK_NAME</filename></link>
177 variable.
178 </para>
179
180 <para>
181 If <filename>ALTERNATIVE_LINK_NAME</filename> and
182 <filename>ALTERNATIVE_TARGET</filename> are the
183 same, the target for
184 <filename>ALTERNATIVE_TARGET</filename>
185 has "<filename>.{BPN}</filename>" appended to it.
186 </para>
187
188 <para>
189 Finally, if the file referenced has not been
190 renamed, the alternatives system will rename it to
191 avoid the need to rename alternative files in the
192 <filename>do_install</filename> task while
193 retaining support for the command if necessary.
194 </para>
195 </note>
196 </para>
197
198 <para>
199 For more information on the alternatives system, see the
200 "<link linkend='ref-classes-update-alternatives'><filename>update-alternatives.bbclass</filename></link>"
201 section.
202 </para>
203 </glossdef>
204 </glossentry>
205
206 <glossentry id='var-APPEND'><glossterm>APPEND</glossterm>
207 <glossdef>
208 <para>
209 An override list of append strings for each
210 <link linkend='var-LABELS'><filename>LABEL</filename></link>.
211 </para>
212
213 <para>
214 See the
215 <link linkend='ref-classes-grub-efi'><filename>grub-efi</filename></link>
216 class for more information on how this variable is used.
217 </para>
218 </glossdef>
219 </glossentry>
220
221 <glossentry id='var-AUTHOR'><glossterm>AUTHOR</glossterm>
222 <glossdef>
223 <para>The email address used to contact the original author
224 or authors in order to send patches and forward bugs.</para>
225 </glossdef>
226 </glossentry>
227
228 <glossentry id='var-AUTO_SYSLINUXMENU'><glossterm>AUTO_SYSLINUXMENU</glossterm>
229 <glossdef>
230 <para>
231 Enables creating an automatic menu.
232 You must set this in your recipe.
233 The
234 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
235 class checks this variable.
236 </para>
237 </glossdef>
238 </glossentry>
239
240 <glossentry id='var-AUTOREV'><glossterm>AUTOREV</glossterm>
241 <glossdef>
242 <para>When <filename><link linkend='var-SRCREV'>SRCREV</link></filename>
243 is set to the value of this variable, it specifies to use the latest
244 source revision in the repository.
245 Here is an example:
246 <literallayout class='monospaced'>
247 SRCREV = "${AUTOREV}"
248 </literallayout>
249 </para>
250 </glossdef>
251 </glossentry>
252
253 </glossdiv>
254
255 <glossdiv id='var-glossary-b'><title>B</title>
256
257 <glossentry id='var-B'><glossterm>B</glossterm>
258 <glossdef>
259 <para>
260 The directory within the
261 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
262 in which the OpenEmbedded build system places generated
263 objects during a recipe's build process.
264 By default, this directory is the same as the <link linkend='var-S'><filename>S</filename></link>
265 directory, which is defined as:
266 <literallayout class='monospaced'>
267 S = "${WORKDIR}/${BP}/"
268 </literallayout>
269 You can separate the (<filename>S</filename>) directory
270 and the directory pointed to by the <filename>B</filename>
271 variable.
272 Most Autotools-based recipes support separating these
273 directories.
274 The build system defaults to using separate directories for
275 <filename>gcc</filename> and some kernel recipes.
276 </para>
277 </glossdef>
278 </glossentry>
279
280 <glossentry id='var-BAD_RECOMMENDATIONS'><glossterm>BAD_RECOMMENDATIONS</glossterm>
281 <glossdef>
282 <para>
283 Lists "recommended-only" packages to not install.
284 Recommended-only packages are packages installed only
285 through the
286 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
287 variable.
288 You can prevent any of these "recommended" packages from
289 being installed by listing them with the
290 <filename>BAD_RECOMMENDATIONS</filename> variable:
291 <literallayout class='monospaced'>
292 BAD_RECOMMENDATIONS = "&lt;package_name&gt; &lt;package_name&gt; &lt;package_name&gt; ..."
293 </literallayout>
294 You can set this variable globally in your
295 <filename>local.conf</filename> file or you can attach it to
296 a specific image recipe by using the recipe name override:
297 <literallayout class='monospaced'>
298 BAD_RECOMMENDATIONS_pn-&lt;target_image&gt; = "&lt;package_name&gt;"
299 </literallayout>
300 </para>
301
302 <para>
303 It is important to realize that if you choose to not install
304 packages using this variable and some other packages are
305 dependent on them (i.e. listed in a recipe's
306 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
307 variable), the OpenEmbedded build system ignores your
308 request and will install the packages to avoid dependency
309 errors.
310 </para>
311
312 <para>
313 Support for this variable exists only when using the
314 IPK and RPM packaging backend.
315 Support does not exist for DEB.
316 </para>
317
318 <para>
319 See the
320 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>
321 and the
322 <link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
323 variables for related information.
324 </para>
325 </glossdef>
326 </glossentry>
327
328 <glossentry id='var-BB_DANGLINGAPPENDS_WARNONLY'><glossterm>BB_DANGLINGAPPENDS_WARNONLY</glossterm>
329 <glossdef>
330 <para>
331 Defines how BitBake handles situations where an append
332 file (<filename>.bbappend</filename>) has no
333 corresponding recipe file (<filename>.bb</filename>).
334 This condition often occurs when layers get out of sync
335 (e.g. <filename>oe-core</filename> bumps a
336 recipe version and the old recipe no longer exists and the
337 other layer has not been updated to the new version
338 of the recipe yet).
339 </para>
340
341 <para>
342 The default fatal behavior is safest because it is
343 the sane reaction given something is out of sync.
344 It is important to realize when your changes are no longer
345 being applied.
346 </para>
347
348 <para>
349 You can change the default behavior by setting this
350 variable to "1", "yes", or "true"
351 in your <filename>local.conf</filename> file, which is
352 located in the
353 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
354 Here is an example:
355 <literallayout class='monospaced'>
356 BB_DANGLINGAPPENDS_WARNONLY = "1"
357 </literallayout>
358 </para>
359 </glossdef>
360 </glossentry>
361
362 <glossentry id='var-BB_DISKMON_DIRS'><glossterm>BB_DISKMON_DIRS</glossterm>
363 <glossdef>
364 <para>
365 Monitors disk space and available inodes during the build
366 and allows you to control the build based on these
367 parameters.
368 </para>
369
370 <para>
371 Disk space monitoring is disabled by default.
372 To enable monitoring, add the <filename>BB_DISKMON_DIRS</filename>
373 variable to your <filename>conf/local.conf</filename> file found in the
374 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
375 Use the following form:
376 <literallayout class='monospaced'>
377 BB_DISKMON_DIRS = "&lt;action&gt;,&lt;dir&gt;,&lt;threshold&gt; [...]"
378
379 where:
380
381 &lt;action&gt; is:
382 ABORT: Immediately abort the build when
383 a threshold is broken.
384 STOPTASKS: Stop the build after the currently
385 executing tasks have finished when
386 a threshold is broken.
387 WARN: Issue a warning but continue the
388 build when a threshold is broken.
389 Subsequent warnings are issued as
390 defined by the
391 <link linkend='var-BB_DISKMON_WARNINTERVAL'>BB_DISKMON_WARNINTERVAL</link> variable,
392 which must be defined in the
393 conf/local.conf file.
394
395 &lt;dir&gt; is:
396 Any directory you choose. You can specify one or
397 more directories to monitor by separating the
398 groupings with a space. If two directories are
399 on the same device, only the first directory
400 is monitored.
401
402 &lt;threshold&gt; is:
403 Either the minimum available disk space,
404 the minimum number of free inodes, or
405 both. You must specify at least one. To
406 omit one or the other, simply omit the value.
407 Specify the threshold using G, M, K for Gbytes,
408 Mbytes, and Kbytes, respectively. If you do
409 not specify G, M, or K, Kbytes is assumed by
410 default. Do not use GB, MB, or KB.
411 </literallayout>
412 </para>
413
414 <para>
415 Here are some examples:
416 <literallayout class='monospaced'>
417 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
418 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
419 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
420 </literallayout>
421 The first example works only if you also provide
422 the <link linkend='var-BB_DISKMON_WARNINTERVAL'><filename>BB_DISKMON_WARNINTERVAL</filename></link> variable
423 in the <filename>conf/local.conf</filename>.
424 This example causes the build system to immediately
425 abort when either the disk space in <filename>${TMPDIR}</filename> drops
426 below 1 Gbyte or the available free inodes drops below
427 100 Kbytes.
428 Because two directories are provided with the variable, the
429 build system also issue a
430 warning when the disk space in the
431 <filename>${SSTATE_DIR}</filename> directory drops
432 below 1 Gbyte or the number of free inodes drops
433 below 100 Kbytes.
434 Subsequent warnings are issued during intervals as
435 defined by the <filename>BB_DISKMON_WARNINTERVAL</filename>
436 variable.
437 </para>
438
439 <para>
440 The second example stops the build after all currently
441 executing tasks complete when the minimum disk space
442 in the <filename>${<link linkend='var-TMPDIR'>TMPDIR</link>}</filename>
443 directory drops below 1 Gbyte.
444 No disk monitoring occurs for the free inodes in this case.
445 </para>
446
447 <para>
448 The final example immediately aborts the build when the
449 number of free inodes in the <filename>${TMPDIR}</filename> directory
450 drops below 100 Kbytes.
451 No disk space monitoring for the directory itself occurs
452 in this case.
453 </para>
454 </glossdef>
455 </glossentry>
456
457 <glossentry id='var-BB_DISKMON_WARNINTERVAL'><glossterm>BB_DISKMON_WARNINTERVAL</glossterm>
458 <glossdef>
459 <para>
460 Defines the disk space and free inode warning intervals.
461 To set these intervals, define the variable in your
462 <filename>conf/local.conf</filename> file in the
463 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
464 </para>
465
466 <para>
467 If you are going to use the
468 <filename>BB_DISKMON_WARNINTERVAL</filename> variable, you must
469 also use the
470 <link linkend='var-BB_DISKMON_DIRS'><filename>BB_DISKMON_DIRS</filename></link> variable
471 and define its action as "WARN".
472 During the build, subsequent warnings are issued each time
473 disk space or number of free inodes further reduces by
474 the respective interval.
475 </para>
476
477 <para>
478 If you do not provide a <filename>BB_DISKMON_WARNINTERVAL</filename>
479 variable and you do use <filename>BB_DISKMON_DIRS</filename> with
480 the "WARN" action, the disk monitoring interval defaults to
481 the following:
482 <literallayout class='monospaced'>
483 BB_DISKMON_WARNINTERVAL = "50M,5K"
484 </literallayout>
485 </para>
486
487 <para>
488 When specifying the variable in your configuration file,
489 use the following form:
490 <literallayout class='monospaced'>
491 BB_DISKMON_WARNINTERVAL = "&lt;disk_space_interval&gt;,&lt;disk_inode_interval&gt;"
492
493 where:
494
495 &lt;disk_space_interval&gt; is:
496 An interval of memory expressed in either
497 G, M, or K for Gbytes, Mbytes, or Kbytes,
498 respectively. You cannot use GB, MB, or KB.
499
500 &lt;disk_inode_interval&gt; is:
501 An interval of free inodes expressed in either
502 G, M, or K for Gbytes, Mbytes, or Kbytes,
503 respectively. You cannot use GB, MB, or KB.
504 </literallayout>
505 </para>
506
507 <para>
508 Here is an example:
509 <literallayout class='monospaced'>
510 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
511 BB_DISKMON_WARNINTERVAL = "50M,5K"
512 </literallayout>
513 These variables cause the OpenEmbedded build system to
514 issue subsequent warnings each time the available
515 disk space further reduces by 50 Mbytes or the number
516 of free inodes further reduces by 5 Kbytes in the
517 <filename>${SSTATE_DIR}</filename> directory.
518 Subsequent warnings based on the interval occur each time
519 a respective interval is reached beyond the initial warning
520 (i.e. 1 Gbytes and 100 Kbytes).
521 </para>
522 </glossdef>
523 </glossentry>
524
525 <glossentry id='var-BB_GENERATE_MIRROR_TARBALLS'><glossterm>BB_GENERATE_MIRROR_TARBALLS</glossterm>
526 <glossdef>
527 <para>
528 Causes tarballs of the Git repositories, including the
529 Git metadata, to be placed in the
530 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
531 directory.
532 </para>
533
534 <para>
535 For performance reasons, creating and placing tarballs of
536 the Git repositories is not the default action by the
537 OpenEmbedded build system.
538 <literallayout class='monospaced'>
539 BB_GENERATE_MIRROR_TARBALLS = "1"
540 </literallayout>
541 Set this variable in your <filename>local.conf</filename>
542 file in the
543 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
544 </para>
545 </glossdef>
546 </glossentry>
547
548 <glossentry id='var-BB_NUMBER_THREADS'><glossterm>BB_NUMBER_THREADS</glossterm>
549 <glossdef>
550 <para>
551 The maximum number of tasks BitBake should run in parallel
552 at any one time.
553 If your host development system supports multiple cores,
554 a good rule of thumb is to set this variable to twice the
555 number of cores.
556 </para>
557
558 <para>
559 The default value for <filename>BB_NUMBER_THREADS</filename>
560 is equal to the number of cores your build system has.
561 </para>
562 </glossdef>
563 </glossentry>
564
565 <glossentry id='var-BBCLASSEXTEND'><glossterm>BBCLASSEXTEND</glossterm>
566 <glossdef>
567 <para>
568 Allows you to extend a recipe so that it builds variants of the software.
569 Common variants for recipes exist such as "natives" like <filename>quilt-native</filename>,
570 which is a copy of Quilt built to run on the build system;
571 "crosses" such as <filename>gcc-cross</filename>,
572 which is a compiler built to run on the build machine but produces binaries
573 that run on the target <link linkend='var-MACHINE'><filename>MACHINE</filename></link>;
574 "nativesdk", which targets the SDK machine instead of <filename>MACHINE</filename>;
575 and "mulitlibs" in the form "<filename>multilib:&lt;multilib_name&gt;</filename>".
576 </para>
577
578 <para>
579 To build a different variant of the recipe with a minimal amount of code, it usually
580 is as simple as adding the following to your recipe:
581 <literallayout class='monospaced'>
582 BBCLASSEXTEND =+ "native nativesdk"
583 BBCLASSEXTEND =+ "multilib:&lt;multilib_name&gt;"
584 </literallayout>
585 </para>
586 </glossdef>
587 </glossentry>
588
589 <glossentry id='var-BBFILE_COLLECTIONS'><glossterm>BBFILE_COLLECTIONS</glossterm>
590 <glossdef>
591 <para>Lists the names of configured layers.
592 These names are used to find the other <filename>BBFILE_*</filename>
593 variables.
594 Typically, each layer will append its name to this variable in its
595 <filename>conf/layer.conf</filename> file.
596 </para>
597 </glossdef>
598 </glossentry>
599
600 <glossentry id='var-BBFILE_PATTERN'><glossterm>BBFILE_PATTERN</glossterm>
601 <glossdef>
602 <para>Variable that expands to match files from
603 <link linkend='var-BBFILES'><filename>BBFILES</filename></link>
604 in a particular layer.
605 This variable is used in the <filename>conf/layer.conf</filename> file and must
606 be suffixed with the name of the specific layer (e.g.
607 <filename>BBFILE_PATTERN_emenlow</filename>).</para>
608 </glossdef>
609 </glossentry>
610
611 <glossentry id='var-BBFILE_PRIORITY'><glossterm>BBFILE_PRIORITY</glossterm>
612 <glossdef>
613 <para>Assigns the priority for recipe files in each layer.</para>
614 <para>This variable is useful in situations where the same recipe appears in
615 more than one layer.
616 Setting this variable allows you to prioritize a
617 layer against other layers that contain the same recipe - effectively
618 letting you control the precedence for the multiple layers.
619 The precedence established through this variable stands regardless of a
620 recipe's version
621 (<link linkend='var-PV'><filename>PV</filename></link> variable).
622 For example, a layer that has a recipe with a higher <filename>PV</filename> value but for
623 which the <filename>BBFILE_PRIORITY</filename> is set to have a lower precedence still has a
624 lower precedence.</para>
625 <para>A larger value for the <filename>BBFILE_PRIORITY</filename> variable results in a higher
626 precedence.
627 For example, the value 6 has a higher precedence than the value 5.
628 If not specified, the <filename>BBFILE_PRIORITY</filename> variable is set based on layer
629 dependencies (see the
630 <filename><link linkend='var-LAYERDEPENDS'>LAYERDEPENDS</link></filename> variable for
631 more information.
632 The default priority, if unspecified
633 for a layer with no dependencies, is the lowest defined priority + 1
634 (or 1 if no priorities are defined).</para>
635 <tip>
636 You can use the command <filename>bitbake-layers show-layers</filename> to list
637 all configured layers along with their priorities.
638 </tip>
639 </glossdef>
640 </glossentry>
641
642 <glossentry id='var-BBFILES'><glossterm>BBFILES</glossterm>
643 <glossdef>
644 <para>List of recipe files used by BitBake to build software.</para>
645 </glossdef>
646 </glossentry>
647
648 <glossentry id='var-BBINCLUDELOGS'><glossterm>BBINCLUDELOGS</glossterm>
649 <glossdef>
650 <para>Variable that controls how BitBake displays logs on build failure.</para>
651 </glossdef>
652 </glossentry>
653
654 <glossentry id='var-BBLAYERS'><glossterm>BBLAYERS</glossterm>
655 <glossdef>
656 <para>Lists the layers to enable during the build.
657 This variable is defined in the <filename>bblayers.conf</filename> configuration
658 file in the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
659 Here is an example:
660 <literallayout class='monospaced'>
661 BBLAYERS = " \
662 /home/scottrif/poky/meta \
663 /home/scottrif/poky/meta-yocto \
664 /home/scottrif/poky/meta-yocto-bsp \
665 /home/scottrif/poky/meta-mykernel \
666 "
667
668 BBLAYERS_NON_REMOVABLE ?= " \
669 /home/scottrif/poky/meta \
670 /home/scottrif/poky/meta-yocto \
671 "
672 </literallayout>
673 This example enables four layers, one of which is a custom, user-defined layer
674 named <filename>meta-mykernel</filename>.
675 </para>
676 </glossdef>
677 </glossentry>
678
679 <glossentry id='var-BBLAYERS_NON_REMOVABLE'><glossterm>BBLAYERS_NON_REMOVABLE</glossterm>
680 <glossdef>
681 <para>Lists core layers that cannot be removed from the
682 <filename>bblayers.conf</filename> file during a build
683 using the
684 <ulink url='https://www.yoctoproject.org/tools-resources/projects/hob'>Hob</ulink>.
685 <note>
686 When building an image outside of Hob, this variable
687 is ignored.
688 </note>
689 In order for BitBake to build your image using Hob, your
690 <filename>bblayers.conf</filename> file must include the
691 <filename>meta</filename> and <filename>meta-yocto</filename>
692 core layers.
693 Here is an example that shows these two layers listed in
694 the <filename>BBLAYERS_NON_REMOVABLE</filename> statement:
695 <literallayout class='monospaced'>
696 BBLAYERS = " \
697 /home/scottrif/poky/meta \
698 /home/scottrif/poky/meta-yocto \
699 /home/scottrif/poky/meta-yocto-bsp \
700 /home/scottrif/poky/meta-mykernel \
701 "
702
703 BBLAYERS_NON_REMOVABLE ?= " \
704 /home/scottrif/poky/meta \
705 /home/scottrif/poky/meta-yocto \
706 "
707 </literallayout>
708 </para>
709 </glossdef>
710 </glossentry>
711
712 <glossentry id='var-BBMASK'><glossterm>BBMASK</glossterm>
713 <glossdef>
714 <para>
715 Prevents BitBake from processing recipes and recipe
716 append files.
717 Use the <filename>BBMASK</filename> variable from within the
718 <filename>conf/local.conf</filename> file found
719 in the
720 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
721 </para>
722
723 <para>
724 You can use the <filename>BBMASK</filename> variable
725 to "hide" these <filename>.bb</filename> and
726 <filename>.bbappend</filename> files.
727 BitBake ignores any recipe or recipe append files that
728 match the expression.
729 It is as if BitBake does not see them at all.
730 Consequently, matching files are not parsed or otherwise
731 used by BitBake.</para>
732 <para>
733 The value you provide is passed to Python's regular
734 expression compiler.
735 The expression is compared against the full paths to
736 the files.
737 For complete syntax information, see Python's
738 documentation at
739 <ulink url='http://docs.python.org/release/2.3/lib/re-syntax.html'></ulink>.
740 </para>
741
742 <para>
743 The following example uses a complete regular expression
744 to tell BitBake to ignore all recipe and recipe append
745 files in the <filename>meta-ti/recipes-misc/</filename>
746 directory:
747 <literallayout class='monospaced'>
748 BBMASK = "meta-ti/recipes-misc/"
749 </literallayout>
750 If you want to mask out multiple directories or recipes,
751 use the vertical bar to separate the regular expression
752 fragments.
753 This next example masks out multiple directories and
754 individual recipes:
755 <literallayout class='monospaced'>
756 BBMASK = "meta-ti/recipes-misc/|meta-ti/recipes-ti/packagegroup/"
757 BBMASK .= "|.*meta-oe/recipes-support/"
758 BBMASK .= "|.*openldap"
759 BBMASK .= "|.*opencv"
760 BBMASK .= "|.*lzma"
761 </literallayout>
762 Notice how the vertical bar is used to append the fragments.
763 <note>
764 When specifying a directory name, use the trailing
765 slash character to ensure you match just that directory
766 name.
767 </note>
768 </para>
769 </glossdef>
770 </glossentry>
771
772 <glossentry id='var-BBPATH'><glossterm>BBPATH</glossterm>
773 <glossdef>
774 <para>
775 Used by BitBake to locate
776 <filename>.bbclass</filename> and configuration files.
777 This variable is analogous to the
778 <filename>PATH</filename> variable.
779 <note>
780 If you run BitBake from a directory outside of the
781 <ulink url='&YOCTO_DOCS_DEV_URL;build-directory'>Build Directory</ulink>,
782 you must be sure to set
783 <filename>BBPATH</filename> to point to the
784 Build Directory.
785 Set the variable as you would any environment variable
786 and then run BitBake:
787 <literallayout class='monospaced'>
788 $ BBPATH = "&lt;build_directory&gt;"
789 $ export BBPATH
790 $ bitbake &lt;target&gt;
791 </literallayout>
792 </note>
793 </para>
794 </glossdef>
795 </glossentry>
796
797 <glossentry id='var-BBSERVER'><glossterm>BBSERVER</glossterm>
798 <glossdef>
799 <para>
800 Points to the server that runs memory-resident BitBake.
801 This variable is set by the
802 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
803 setup script and should not be hand-edited.
804 The variable is only used when you employ memory-resident
805 BitBake.
806 The setup script exports the value as follows:
807 <literallayout class='monospaced'>
808 export BBSERVER=localhost:$port
809 </literallayout>
810 For more information on how the
811 <filename>BBSERVER</filename> is used, see the
812 <filename>oe-init-build-env-memres</filename> script, which
813 is located in the
814 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
815 </para>
816 </glossdef>
817 </glossentry>
818
819 <glossentry id='var-BINCONFIG_GLOB'><glossterm>BINCONFIG_GLOB</glossterm>
820 <glossdef>
821 <para>
822 When inheriting <filename>binconfig.bbclass</filename>
823 from a recipe, this variable specifies a wildcard for
824 configuration scripts that need editing.
825 The scripts are edited to correct any paths that have been
826 set up during compilation so that they are correct for
827 use when installed into the sysroot and called by the
828 build processes of other recipes.
829 </para>
830
831 <para>
832 For more information on how this variable works, see
833 <filename>meta/classes/binconfig.bbclass</filename> in the
834 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
835 You can also find general information on the class in the
836 "<link linkend='ref-classes-binconfig'><filename>binconfig.bbclass</filename></link>"
837 section.
838 </para>
839 </glossdef>
840 </glossentry>
841
842 <glossentry id='var-BP'><glossterm>BP</glossterm>
843 <glossdef>
844 <para>The base recipe name and version but without any special
845 recipe name suffix (i.e. <filename>-native</filename>, <filename>lib64-</filename>,
846 and so forth).
847 <filename>BP</filename> is comprised of the following:
848 <literallayout class="monospaced">
849 ${BPN}-${PV}
850 </literallayout></para>
851 </glossdef>
852 </glossentry>
853
854 <glossentry id='var-BPN'><glossterm>BPN</glossterm>
855 <glossdef>
856 <para>The bare name of the recipe.
857 This variable is a version of the <link linkend='var-PN'><filename>PN</filename></link> variable
858 but removes common suffixes such as "-native" and "-cross" as well
859 as removes common prefixes such as multilib's "lib64-" and "lib32-".
860 The exact list of suffixes removed is specified by the
861 <link linkend='var-SPECIAL_PKGSUFFIX'><filename>SPECIAL_PKGSUFFIX</filename></link> variable.
862 The exact list of prefixes removed is specified by the
863 <link linkend='var-MLPREFIX'><filename>MLPREFIX</filename></link> variable.
864 Prefixes are removed for <filename>multilib</filename>
865 and <filename>nativesdk</filename> cases.</para>
866 </glossdef>
867 </glossentry>
868
869 <glossentry id='var-BUGTRACKER'><glossterm>BUGTRACKER</glossterm>
870 <glossdef>
871 <para>
872 Specifies a URL for an upstream bug tracking website for
873 a recipe.
874 The OpenEmbedded build system does not use this variable.
875 Rather, the variable is a useful pointer in case a bug
876 in the software being built needs to be manually reported.
877 </para>
878 </glossdef>
879 </glossentry>
880
881 <glossentry id='var-BUILDDIR'><glossterm>BUILDDIR</glossterm>
882 <glossdef>
883 <para>
884 Points to the location of the
885 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
886 You can define this directory indirectly through the
887 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
888 and
889 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
890 scripts by passing in a Build Directory path when you run
891 the scripts.
892 If you run the scripts and do not provide a Build Directory
893 path, the <filename>BUILDDIR</filename> defaults to
894 <filename>build</filename> in the current directory.
895 </para>
896 </glossdef>
897 </glossentry>
898
899 <glossentry id='var-BUILDHISTORY_COMMIT'><glossterm>BUILDHISTORY_COMMIT</glossterm>
900 <glossdef>
901 <para>
902 When inheriting the
903 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
904 class, specifies whether or not to commit the build
905 history output in a local Git repository.
906 If set to "1", this local repository will be maintained
907 automatically by the
908 <filename>buildhistory</filename>
909 class and a commit will be created on every
910 build for changes to each top-level subdirectory of the
911 build history output (images, packages, and sdk).
912 If you want to track changes to build history over
913 time, you should set this value to "1".
914 </para>
915
916 <para>
917 By default, the <filename>buildhistory</filename> class
918 does not commit the build history output in a local
919 Git repository:
920 <literallayout class='monospaced'>
921 BUILDHISTORY_COMMIT ?= "0"
922 </literallayout>
923 </para>
924 </glossdef>
925 </glossentry>
926
927 <glossentry id='var-BUILDHISTORY_COMMIT_AUTHOR'><glossterm>BUILDHISTORY_COMMIT_AUTHOR</glossterm>
928 <glossdef>
929 <para>
930 When inheriting the
931 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
932 class, specifies the author to use for each Git commit.
933 In order for the <filename>BUILDHISTORY_COMMIT_AUTHOR</filename>
934 variable to work, the
935 <link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></link>
936 variable must be set to "1".
937 </para>
938
939 <para>
940 Git requires that the value you provide for the
941 <filename>BUILDHISTORY_COMMIT_AUTHOR</filename> variable
942 takes the form of "name &lt;email@host&gt;".
943 Providing an email address or host that is not valid does
944 not produce an error.
945 </para>
946
947 <para>
948 By default, the <filename>buildhistory</filename> class
949 sets the variable as follows:
950 <literallayout class='monospaced'>
951 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory &lt;buildhistory@${DISTRO}&gt;"
952 </literallayout>
953 </para>
954 </glossdef>
955 </glossentry>
956
957 <glossentry id='var-BUILDHISTORY_DIR'><glossterm>BUILDHISTORY_DIR</glossterm>
958 <glossdef>
959 <para>
960 When inheriting the
961 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
962 class, specifies the directory in which build history
963 information is kept.
964 For more information on how the variable works, see the
965 <filename>buildhistory.class</filename>.
966 </para>
967
968 <para>
969 By default, the <filename>buildhistory</filename> class
970 sets the directory as follows:
971 <literallayout class='monospaced'>
972 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
973 </literallayout>
974 </para>
975 </glossdef>
976 </glossentry>
977
978 <glossentry id='var-BUILDHISTORY_FEATURES'><glossterm>BUILDHISTORY_FEATURES</glossterm>
979 <glossdef>
980 <para>
981 When inheriting the
982 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
983 class, specifies the build history features to be enabled.
984 For more information on how build history works, see the
985 "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
986 section.
987 </para>
988
989 <para>
990 You can specify three features in the form of a
991 space-separated list:
992 <itemizedlist>
993 <listitem><para><emphasis>image:</emphasis>
994 Analysis of the contents of images, which
995 includes the list of installed packages among other
996 things.
997 </para></listitem>
998 <listitem><para><emphasis>package:</emphasis>
999 Analysis of the contents of individual packages.
1000 </para></listitem>
1001 <listitem><para><emphasis>sdk:</emphasis>
1002 Analysis of the contents of the software
1003 development kit (SDK).
1004 </para></listitem>
1005 </itemizedlist>
1006 </para>
1007
1008 <para>
1009 By default, the <filename>buildhistory</filename> class
1010 enables all three features:
1011 <literallayout class='monospaced'>
1012 BUILDHISTORY_FEATURES ?= "image package sdk"
1013 </literallayout>
1014 </para>
1015 </glossdef>
1016 </glossentry>
1017
1018 <glossentry id='var-BUILDHISTORY_IMAGE_FILES'><glossterm>BUILDHISTORY_IMAGE_FILES</glossterm>
1019 <glossdef>
1020 <para>
1021 When inheriting the
1022 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
1023 class, specifies a list of paths to files copied from the
1024 image contents into the build history directory under
1025 an "image-files" directory in the directory for
1026 the image, so that you can track the contents of each file.
1027 The default is to copy <filename>/etc/passwd</filename>
1028 and <filename>/etc/group</filename>, which allows you to
1029 monitor for changes in user and group entries.
1030 You can modify the list to include any file.
1031 Specifying an invalid path does not produce an error.
1032 Consequently, you can include files that might
1033 not always be present.
1034 </para>
1035
1036 <para>
1037 By default, the <filename>buildhistory</filename> class
1038 provides paths to the following files:
1039 <literallayout class='monospaced'>
1040 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
1041 </literallayout>
1042 </para>
1043 </glossdef>
1044 </glossentry>
1045
1046 <glossentry id='var-BUILDHISTORY_PUSH_REPO'><glossterm>BUILDHISTORY_PUSH_REPO</glossterm>
1047 <glossdef>
1048 <para>
1049 When inheriting the
1050 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
1051 class, optionally specifies a remote repository
1052 to which build history pushes Git changes.
1053 In order for <filename>BUILDHISTORY_PUSH_REPO</filename>
1054 to work,
1055 <link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></link>
1056 must be set to "1".
1057 </para>
1058
1059 <para>
1060 The repository should correspond to a remote
1061 address that specifies a repository as understood by
1062 Git, or alternatively to a remote name that you have
1063 set up manually using <filename>git remote</filename>
1064 within the local repository.
1065 </para>
1066
1067 <para>
1068 By default, the <filename>buildhistory</filename> class
1069 sets the variable as follows:
1070 <literallayout class='monospaced'>
1071 BUILDHISTORY_PUSH_REPO ?= ""
1072 </literallayout>
1073 </para>
1074 </glossdef>
1075 </glossentry>
1076
1077 <glossentry id='var-BUILDSTATS_BASE'><glossterm>BUILDSTATS_BASE</glossterm>
1078 <glossdef>
1079 <para>
1080 Points to the location of the directory that holds build
1081 statistics when you use and enable the
1082 <link linkend='ref-classes-buildstats'><filename>buildstats</filename></link>
1083 class.
1084 The <filename>BUILDSTATS_BASE</filename> directory defaults
1085 to
1086 <filename>${</filename><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link><filename>}/buildstats/</filename>.
1087 </para>
1088 </glossdef>
1089 </glossentry>
1090
1091 <glossentry id='var-BUSYBOX_SPLIT_SUID'><glossterm>BUSYBOX_SPLIT_SUID</glossterm>
1092 <glossdef>
1093 <para>
1094 For the BusyBox recipe, specifies whether to split the
1095 output executable file into two parts: one for features
1096 that require <filename>setuid root</filename>, and one for
1097 the remaining features (i.e. those that do not require
1098 <filename>setuid root</filename>).
1099 </para>
1100
1101 <para>
1102 The <filename>BUSYBOX_SPLIT_SUID</filename> variable
1103 defaults to "1", which results in a single output
1104 executable file.
1105 Set the variable to "0" to split the output file.
1106 </para>
1107 </glossdef>
1108 </glossentry>
1109
1110 </glossdiv>
1111
1112 <glossdiv id='var-glossary-c'><title>C</title>
1113
1114 <glossentry id='var-CFLAGS'><glossterm>CFLAGS</glossterm>
1115 <glossdef>
1116 <para>
1117 Flags passed to the C compiler for the target system.
1118 This variable evaluates to the same as
1119 <filename><link linkend='var-TARGET_CFLAGS'>TARGET_CFLAGS</link></filename>.
1120 </para>
1121
1122 <para>
1123 For information on flags that help with creating more
1124 secure code, see the
1125 "<ulink url='&YOCTO_DOCS_DEV_URL;#making-images-more-secure'>Making Images More Secure</ulink>"
1126 section in the Yocto Project Development Manual.
1127 </para>
1128 </glossdef>
1129 </glossentry>
1130
1131 <glossentry id='var-CLASSOVERRIDE'><glossterm>CLASSOVERRIDE</glossterm>
1132 <glossdef>
1133 <para>
1134 An internal variable specifying the special class override
1135 that should currently apply (e.g. "class-target",
1136 "class-native", and so forth).
1137 The classes that use this variable set it to
1138 appropriate values.
1139 </para>
1140
1141 <para>
1142 You do not normally directly interact with this variable.
1143 The value for the <filename>CLASSOVERRIDE</filename>
1144 variable goes into
1145 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
1146 and then can be used as an override.
1147 Here is an example where "python-native" is added to
1148 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
1149 only when building for the native case:
1150 <literallayout class='monospaced'>
1151 DEPENDS_append_class-native = " python-native"
1152 </literallayout>
1153 </para>
1154 </glossdef>
1155 </glossentry>
1156
1157 <glossentry id='var-COMBINED_FEATURES'><glossterm>COMBINED_FEATURES</glossterm>
1158 <glossdef>
1159 <para>
1160 Provides a list of hardware features that are enabled in
1161 both
1162 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
1163 and
1164 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
1165 This select list of features contains features that make
1166 sense to be controlled both at the machine and distribution
1167 configuration level.
1168 For example, the "bluetooth" feature requires hardware
1169 support but should also be optional at the distribution
1170 level, in case the hardware supports Bluetooth but you
1171 do not ever intend to use it.
1172 </para>
1173
1174 <para>
1175 For more information, see the
1176 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
1177 and <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
1178 variables.
1179 </para>
1180 </glossdef>
1181 </glossentry>
1182
1183 <glossentry id='var-COMMON_LICENSE_DIR'><glossterm>COMMON_LICENSE_DIR</glossterm>
1184 <glossdef>
1185 <para>
1186 Points to <filename>meta/files/common-licenses</filename>
1187 in the
1188 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
1189 which is where generic license files reside.
1190 </para>
1191 </glossdef>
1192 </glossentry>
1193
1194 <glossentry id='var-COMPATIBLE_HOST'><glossterm>COMPATIBLE_HOST</glossterm>
1195 <glossdef>
1196 <para>A regular expression that resolves to one or more hosts
1197 (when the recipe is native) or one or more targets (when
1198 the recipe is non-native) with which a recipe is compatible.
1199 The regular expression is matched against
1200 <link linkend="var-HOST_SYS"><filename>HOST_SYS</filename></link>.
1201 You can use the variable to stop recipes from being built
1202 for classes of systems with which the recipes are not
1203 compatible.
1204 Stopping these builds is particularly useful with kernels.
1205 The variable also helps to increase parsing speed
1206 since the build system skips parsing recipes not
1207 compatible with the current system.</para>
1208 </glossdef>
1209 </glossentry>
1210
1211 <glossentry id='var-COMPATIBLE_MACHINE'><glossterm>COMPATIBLE_MACHINE</glossterm>
1212 <glossdef>
1213 <para>A regular expression that resolves to one or more
1214 target machines with which a recipe is compatible.
1215 The regular expression is matched against
1216 <link linkend="var-MACHINEOVERRIDES"><filename>MACHINEOVERRIDES</filename></link>.
1217 You can use the variable to stop recipes from being built
1218 for machines with which the recipes are not compatible.
1219 Stopping these builds is particularly useful with kernels.
1220 The variable also helps to increase parsing speed
1221 since the build system skips parsing recipes not
1222 compatible with the current machine.</para>
1223 </glossdef>
1224 </glossentry>
1225
1226 <glossentry id='var-COMPLEMENTARY_GLOB'><glossterm>COMPLEMENTARY_GLOB</glossterm>
1227 <glossdef>
1228 <para>
1229 Defines wildcards to match when installing a list of
1230 complementary packages for all the packages explicitly
1231 (or implicitly) installed in an image.
1232 The resulting list of complementary packages is associated
1233 with an item that can be added to
1234 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
1235 An example usage of this is the "dev-pkgs" item that when
1236 added to <filename>IMAGE_FEATURES</filename> will
1237 install -dev packages (containing headers and other
1238 development files) for every package in the image.
1239 </para>
1240
1241 <para>
1242 To add a new feature item pointing to a wildcard, use a
1243 variable flag to specify the feature item name and
1244 use the value to specify the wildcard.
1245 Here is an example:
1246 <literallayout class='monospaced'>
1247 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1248 </literallayout>
1249 </para>
1250 </glossdef>
1251 </glossentry>
1252
1253 <glossentry id='var-CONFFILES'><glossterm>CONFFILES</glossterm>
1254 <glossdef>
1255 <para>
1256 Identifies editable or configurable files that are part of a package.
1257 If the Package Management System (PMS) is being used to update
1258 packages on the target system, it is possible that
1259 configuration files you have changed after the original installation
1260 and that you now want to remain unchanged are overwritten.
1261 In other words, editable files might exist in the package that you do not
1262 want reset as part of the package update process.
1263 You can use the <filename>CONFFILES</filename> variable to list the files in the
1264 package that you wish to prevent the PMS from overwriting during this update process.
1265 </para>
1266
1267 <para>
1268 To use the <filename>CONFFILES</filename> variable, provide a package name
1269 override that identifies the resulting package.
1270 Then, provide a space-separated list of files.
1271 Here is an example:
1272 <literallayout class='monospaced'>
1273 CONFFILES_${PN} += "${sysconfdir}/file1 \
1274 ${sysconfdir}/file2 ${sysconfdir}/file3"
1275 </literallayout>
1276 </para>
1277
1278 <para>
1279 A relationship exists between the <filename>CONFFILES</filename> and
1280 <filename><link linkend='var-FILES'>FILES</link></filename> variables.
1281 The files listed within <filename>CONFFILES</filename> must be a subset of
1282 the files listed within <filename>FILES</filename>.
1283 Because the configuration files you provide with <filename>CONFFILES</filename>
1284 are simply being identified so that the PMS will not overwrite them,
1285 it makes sense that
1286 the files must already be included as part of the package through the
1287 <filename>FILES</filename> variable.
1288 </para>
1289
1290 <note>
1291 When specifying paths as part of the <filename>CONFFILES</filename> variable,
1292 it is good practice to use appropriate path variables.
1293 For example, <filename>${sysconfdir}</filename> rather than
1294 <filename>/etc</filename> or <filename>${bindir}</filename> rather
1295 than <filename>/usr/bin</filename>.
1296 You can find a list of these variables at the top of the
1297 <filename>meta/conf/bitbake.conf</filename> file in the
1298 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1299 </note>
1300 </glossdef>
1301 </glossentry>
1302
1303 <glossentry id='var-CONFIG_INITRAMFS_SOURCE'><glossterm>CONFIG_INITRAMFS_SOURCE</glossterm>
1304 <glossdef>
1305 <para>
1306 Identifies the initial RAM disk (initramfs) source files.
1307 The OpenEmbedded build system receives and uses
1308 this kernel Kconfig variable as an environment variable.
1309 By default, the variable is set to null ("").
1310 </para>
1311
1312 <para>
1313 The <filename>CONFIG_INITRAMFS_SOURCE</filename> can be
1314 either a single cpio archive with a
1315 <filename>.cpio</filename> suffix or a
1316 space-separated list of directories and files for building
1317 the initramfs image.
1318 A cpio archive should contain a filesystem archive
1319 to be used as an initramfs image.
1320 Directories should contain a filesystem layout to be
1321 included in the initramfs image.
1322 Files should contain entries according to the format
1323 described by the
1324 <filename>usr/gen_init_cpio</filename> program in the
1325 kernel tree.
1326 </para>
1327
1328 <para>
1329 If you specify multiple directories and files, the
1330 initramfs image will be the aggregate of all of them.
1331 </para>
1332 </glossdef>
1333 </glossentry>
1334
1335 <glossentry id='var-CONFIG_SITE'><glossterm>CONFIG_SITE</glossterm>
1336 <glossdef>
1337 <para>
1338 A list of files that contains <filename>autoconf</filename> test results relevant
1339 to the current build.
1340 This variable is used by the Autotools utilities when running
1341 <filename>configure</filename>.
1342 </para>
1343 </glossdef>
1344 </glossentry>
1345
1346 <glossentry id='var-CONFLICT_DISTRO_FEATURES'><glossterm>CONFLICT_DISTRO_FEATURES</glossterm>
1347 <glossdef>
1348 <para>
1349 When a recipe inherits the
1350 <filename>distro_features_check</filename> class, this
1351 variable identifies distribution features that would
1352 be in conflict should the recipe
1353 be built.
1354 In other words, if the
1355 <filename>CONFLICT_DISTRO_FEATURES</filename> variable
1356 lists a feature that also appears in
1357 <filename>DISTRO_FEATURES</filename> within the
1358 current configuration, an error occurs and the
1359 build stops.
1360 </para>
1361 </glossdef>
1362 </glossentry>
1363
1364 <glossentry id='var-COPY_LIC_DIRS'><glossterm>COPY_LIC_DIRS</glossterm>
1365 <glossdef>
1366 <para>
1367 If set to "1" along with the
1368 <link linkend='var-COPY_LIC_MANIFEST'><filename>COPY_LIC_MANIFEST</filename></link>
1369 variable, the OpenEmbedded build system copies
1370 into the image the license files, which are located in
1371 <filename>/usr/share/common-licenses</filename>,
1372 for each package.
1373 The license files are placed
1374 in directories within the image itself.
1375 </para>
1376 </glossdef>
1377 </glossentry>
1378
1379 <glossentry id='var-COPY_LIC_MANIFEST'><glossterm>COPY_LIC_MANIFEST</glossterm>
1380 <glossdef>
1381 <para>
1382 If set to "1", the OpenEmbedded build system copies
1383 the license manifest for the image to
1384 <filename>/usr/share/common-licenses/license.manifest</filename>
1385 within the image itself.
1386 </para>
1387 </glossdef>
1388 </glossentry>
1389
1390 <glossentry id='var-CORE_IMAGE_EXTRA_INSTALL'><glossterm>CORE_IMAGE_EXTRA_INSTALL</glossterm>
1391 <glossdef>
1392 <para>
1393 Specifies the list of packages to be added to the image.
1394 You should only set this variable in the
1395 <filename>local.conf</filename> configuration file found
1396 in the
1397 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
1398 </para>
1399
1400 <para>
1401 This variable replaces <filename>POKY_EXTRA_INSTALL</filename>, which is no longer supported.
1402 </para>
1403 </glossdef>
1404 </glossentry>
1405
1406 <glossentry id='var-COREBASE'><glossterm>COREBASE</glossterm>
1407 <glossdef>
1408 <para>
1409 Specifies the parent directory of the OpenEmbedded
1410 Core Metadata layer (i.e. <filename>meta</filename>).
1411 </para>
1412
1413 <para>
1414 It is an important distinction that
1415 <filename>COREBASE</filename> points to the parent of this
1416 layer and not the layer itself.
1417 Consider an example where you have cloned the Poky Git
1418 repository and retained the <filename>poky</filename>
1419 name for your local copy of the repository.
1420 In this case, <filename>COREBASE</filename> points to
1421 the <filename>poky</filename> folder because it is the
1422 parent directory of the <filename>poky/meta</filename>
1423 layer.
1424 </para>
1425 </glossdef>
1426 </glossentry>
1427
1428 </glossdiv>
1429
1430 <glossdiv id='var-glossary-d'><title>D</title>
1431
1432 <glossentry id='var-D'><glossterm>D</glossterm>
1433 <glossdef>
1434 <para>
1435 The destination directory.
1436 The location in the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1437 where components are installed by the <filename>do_install</filename> task.
1438 This location defaults to:
1439 <literallayout class='monospaced'>
1440 ${WORKDIR}/image
1441 </literallayout>
1442 </para>
1443 </glossdef>
1444 </glossentry>
1445
1446 <glossentry id='var-DATETIME'><glossterm>DATETIME</glossterm>
1447 <glossdef>
1448 <para>
1449 The date and time on which the current build started.
1450 The format is suitable for timestamps.
1451 </para>
1452 </glossdef>
1453 </glossentry>
1454
1455 <glossentry id='var-DEBUG_BUILD'><glossterm>DEBUG_BUILD</glossterm>
1456 <glossdef>
1457 <para>
1458 Specifies to build packages with debugging information.
1459 This influences the value of the
1460 <filename><link linkend='var-SELECTED_OPTIMIZATION'>SELECTED_OPTIMIZATION</link></filename>
1461 variable.
1462 </para>
1463 </glossdef>
1464 </glossentry>
1465
1466 <glossentry id='var-DEBUG_OPTIMIZATION'><glossterm>DEBUG_OPTIMIZATION</glossterm>
1467 <glossdef>
1468 <para>
1469 The options to pass in
1470 <filename><link linkend='var-TARGET_CFLAGS'>TARGET_CFLAGS</link></filename>
1471 and <filename><link linkend='var-CFLAGS'>CFLAGS</link></filename> when compiling
1472 a system for debugging.
1473 This variable defaults to "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1474 </para>
1475 </glossdef>
1476 </glossentry>
1477
1478 <glossentry id='var-DEFAULT_PREFERENCE'><glossterm>DEFAULT_PREFERENCE</glossterm>
1479 <glossdef>
1480 <para>
1481 Specifies a weak bias for recipe selection priority.
1482 </para>
1483 <para>
1484 The most common usage of this is variable is to set
1485 it to "-1" within a recipe for a development version of a
1486 piece of software.
1487 Using the variable in this way causes the stable version
1488 of the recipe to build by default in the absence of
1489 <filename><link linkend='var-PREFERRED_VERSION'>PREFERRED_VERSION</link></filename>
1490 being used to build the development version.
1491 </para>
1492 <note>
1493 The bias provided by <filename>DEFAULT_PREFERENCE</filename>
1494 is weak and is overridden by
1495 <filename><link linkend='var-BBFILE_PRIORITY'>BBFILE_PRIORITY</link></filename>
1496 if that variable is different between two layers
1497 that contain different versions of the same recipe.
1498 </note>
1499 </glossdef>
1500 </glossentry>
1501
1502 <glossentry id='var-DEPENDS'><glossterm>DEPENDS</glossterm>
1503 <glossdef>
1504 <para>
1505 Lists a recipe's build-time dependencies
1506 (i.e. other recipe files).
1507 The system ensures that all the dependencies listed
1508 have been built and have their contents in the appropriate
1509 sysroots before the recipe's configure task is executed.
1510 </para>
1511
1512 <para>
1513 Consider this simple example for two recipes named "a" and
1514 "b" that produce similarly named packages.
1515 In this example, the <filename>DEPENDS</filename>
1516 statement appears in the "a" recipe:
1517 <literallayout class='monospaced'>
1518 DEPENDS = "b"
1519 </literallayout>
1520 Here, the dependency is such that the
1521 <filename>do_configure</filename> task for recipe "a"
1522 depends on the <filename>do_populate_sysroot</filename>
1523 task of recipe "b".
1524 This means anything that recipe "b" puts into sysroot
1525 is available when recipe "a" is configuring itself.
1526 </para>
1527
1528 <para>
1529 For information on runtime dependencies, see the
1530 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
1531 variable.
1532 </para>
1533 </glossdef>
1534 </glossentry>
1535
1536 <glossentry id='var-DEPLOY_DIR'><glossterm>DEPLOY_DIR</glossterm>
1537 <glossdef>
1538 <para>
1539 Points to the general area that the OpenEmbedded build
1540 system uses to place images, packages, SDKs and other output
1541 files that are ready to be used outside of the build system.
1542 By default, this directory resides within the
1543 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1544 as <filename>${TMPDIR}/deploy</filename>.
1545 </para>
1546
1547 <para>
1548 For more information on the structure of the Build
1549 Directory, see
1550 "<link linkend='structure-build'>The Build Directory - <filename>build/</filename></link>"
1551 section.
1552 For more detail on the contents of the
1553 <filename>deploy</filename> directory, see the
1554 "<link linkend='images-dev-environment'>Images</link>" and
1555 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
1556 sections.
1557 </para>
1558 </glossdef>
1559 </glossentry>
1560
1561 <glossentry id='var-DEPLOY_DIR_IMAGE'><glossterm>DEPLOY_DIR_IMAGE</glossterm>
1562 <glossdef>
1563 <para>
1564 Points to the area that the OpenEmbedded build system uses
1565 to place images and other associated output files that are
1566 ready to be deployed onto the target machine.
1567 The directory is machine-specific as it contains the
1568 <filename>${MACHINE}</filename> name.
1569 By default, this directory resides within the
1570 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1571 as <filename>${DEPLOY_DIR}/images/${MACHINE}/</filename>.
1572 </para>
1573
1574 <para>
1575 For more information on the structure of the Build
1576 Directory, see
1577 "<link linkend='structure-build'>The Build Directory - <filename>build/</filename></link>"
1578 section.
1579 For more detail on the contents of the
1580 <filename>deploy</filename> directory, see the
1581 "<link linkend='images-dev-environment'>Images</link>" and
1582 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
1583 sections.
1584 </para>
1585 </glossdef>
1586 </glossentry>
1587
1588 <glossentry id='var-DEPLOYDIR'><glossterm>DEPLOYDIR</glossterm>
1589 <glossdef>
1590 <para>
1591 For recipes that inherit the
1592 <link linkend='ref-classes-deploy'><filename>deploy</filename></link>
1593 class, the <filename>DEPLOYDIR</filename> points to a
1594 temporary work area for deployed files that is set in the
1595 <filename>deploy</filename> class as follows:
1596 <literallayout class='monospaced'>
1597 DEPLOYDIR = "${WORKDIR}/deploy-${<link linkend='var-PN'><filename>PN</filename></link>}"
1598 </literallayout>
1599 Recipes inheriting the <filename>deploy</filename> class
1600 should copy files to be deployed into
1601 <filename>DEPLOYDIR</filename>, and the class will take
1602 care of copying them into
1603 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
1604 afterwards.
1605 </para>
1606 </glossdef>
1607 </glossentry>
1608
1609 <glossentry id='var-DESCRIPTION'><glossterm>DESCRIPTION</glossterm>
1610 <glossdef>
1611 <para>The package description used by package managers.
1612 If not set, <filename>DESCRIPTION</filename> takes
1613 the value of the
1614 <link linkend='var-SUMMARY'><filename>SUMMARY</filename></link>
1615 variable.
1616 </para>
1617 </glossdef>
1618 </glossentry>
1619
1620 <glossentry id='var-DISK_SIGNATURE'><glossterm>DISK_SIGNATURE</glossterm>
1621 <glossdef>
1622 <para>
1623 A 32-bit MBR disk signature used by
1624 <filename>directdisk</filename> images.
1625 </para>
1626
1627 <para>
1628 By default, the signature is set to an automatically
1629 generated random value that allows the OpenEmbedded
1630 build system to create a boot loader.
1631 You can override the signature in the image recipe
1632 by setting <filename>DISK_SIGNATURE</filename> to an
1633 8-digit hex string.
1634 You might want to override
1635 <filename>DISK_SIGNATURE</filename> if you want the disk
1636 signature to remain constant between image builds.
1637 </para>
1638
1639 <para>
1640 When using Linux 3.8 or later, you can use
1641 <filename>DISK_SIGNATURE</filename> to specify the root
1642 by UUID to allow the kernel to locate the root device
1643 even if the device name changes due to differences in
1644 hardware configuration.
1645 By default, <filename>SYSLINUX_ROOT</filename> is set
1646 as follows:
1647 <literallayout class='monospaced'>
1648 SYSLINUX_ROOT = "root=/dev/sda2"
1649 </literallayout>
1650 However, you can change this to locate the root device
1651 using the disk signature instead:
1652 <literallayout class='monospaced'>
1653 SYSLINUX_ROOT = "root=PARTUUID=${DISK_SIGNATURE}-02"
1654 </literallayout>
1655 </para>
1656
1657 <para>
1658 As previously mentioned, it is possible to set the
1659 <filename>DISK_SIGNATURE</filename> variable in your
1660 <filename>local.conf</filename> file to a fixed
1661 value if you do not want <filename>syslinux.cfg</filename>
1662 changing for each build.
1663 You might find this useful when you want to upgrade the
1664 root filesystem on a device without having to recreate or
1665 modify the master boot record.
1666 </para>
1667 </glossdef>
1668 </glossentry>
1669
1670 <glossentry id='var-DISTRO'><glossterm>DISTRO</glossterm>
1671 <glossdef>
1672 <para>
1673 The short name of the distribution.
1674 This variable corresponds to a distribution
1675 configuration file whose root name is the same as the
1676 variable's argument and whose filename extension is
1677 <filename>.conf</filename>.
1678 For example, the distribution configuration file for the
1679 Poky distribution is named <filename>poky.conf</filename>
1680 and resides in the
1681 <filename>meta-yocto/conf/distro</filename> directory of
1682 the
1683 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1684 </para>
1685
1686 <para>
1687 Within that <filename>poky.conf</filename> file, the
1688 <filename>DISTRO</filename> variable is set as follows:
1689 <literallayout class='monospaced'>
1690 DISTRO = "poky"
1691 </literallayout>
1692 </para>
1693
1694 <para>
1695 Distribution configuration files are located in a
1696 <filename>conf/distro</filename> directory within the
1697 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
1698 that contains the distribution configuration.
1699 The value for <filename>DISTRO</filename> must not contain
1700 spaces, and is typically all lower-case.
1701 <note>
1702 If the <filename>DISTRO</filename> variable is blank, a set
1703 of default configurations are used, which are specified
1704 within
1705 <filename>meta/conf/distro/defaultsetup.conf</filename>
1706 also in the Source Directory.
1707 </note>
1708 </para>
1709 </glossdef>
1710 </glossentry>
1711
1712 <glossentry id='var-DISTRO_EXTRA_RDEPENDS'><glossterm>DISTRO_EXTRA_RDEPENDS</glossterm>
1713 <glossdef>
1714 <para>
1715 Specifies a list of distro-specific packages to add to all images.
1716 This variable takes affect through
1717 <filename>packagegroup-base</filename> so the
1718 variable only really applies to the more full-featured
1719 images that include <filename>packagegroup-base</filename>.
1720 You can use this variable to keep distro policy out of
1721 generic images.
1722 As with all other distro variables, you set this variable
1723 in the distro <filename>.conf</filename> file.
1724 </para>
1725 </glossdef>
1726 </glossentry>
1727
1728 <glossentry id='var-DISTRO_EXTRA_RRECOMMENDS'><glossterm>DISTRO_EXTRA_RRECOMMENDS</glossterm>
1729 <glossdef>
1730 <para>
1731 Specifies a list of distro-specific packages to add to all images
1732 if the packages exist.
1733 The packages might not exist or be empty (e.g. kernel modules).
1734 The list of packages are automatically installed but you can
1735 remove them.
1736 </para>
1737 </glossdef>
1738 </glossentry>
1739
1740 <glossentry id='var-DISTRO_FEATURES'><glossterm>DISTRO_FEATURES</glossterm>
1741 <glossdef>
1742 <para>
1743 The software support you want in your distribution for
1744 various features.
1745 You define your distribution features in the distribution
1746 configuration file.
1747 </para>
1748
1749 <para>
1750 In most cases, the presence or absence of a feature in
1751 <filename>DISTRO_FEATURES</filename> is translated to the
1752 appropriate option supplied to the configure script
1753 during <filename>do_configure</filename> for recipes that
1754 optionally support the feature.
1755 For example, specifying "x11" in
1756 <filename>DISTRO_FEATURES</filename>, causes
1757 every piece of software built for the target that can
1758 optionally support X11 to have its X11 support enabled.
1759 </para>
1760
1761 <para>
1762 Two more examples are Bluetooth and NFS support.
1763 For a more complete list of features that ships with the
1764 Yocto Project and that you can provide with this variable,
1765 see the
1766 "<link linkend='ref-features-distro'>Distro Features</link>"
1767 section.
1768 </para>
1769 </glossdef>
1770 </glossentry>
1771
1772 <glossentry id='var-DISTRO_FEATURES_BACKFILL'><glossterm>DISTRO_FEATURES_BACKFILL</glossterm>
1773 <glossdef>
1774 <para>Features to be added to
1775 <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>
1776 if not also present in
1777 <filename><link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'>DISTRO_FEATURES_BACKFILL_CONSIDERED</link></filename>.
1778 </para>
1779
1780 <para>
1781 This variable is set in the <filename>meta/conf/bitbake.conf</filename> file.
1782 It is not intended to be user-configurable.
1783 It is best to just reference the variable to see which distro features are
1784 being backfilled for all distro configurations.
1785 See the <link linkend='ref-features-backfill'>Feature backfilling</link> section for
1786 more information.
1787 </para>
1788 </glossdef>
1789 </glossentry>
1790
1791 <glossentry id='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><glossterm>DISTRO_FEATURES_BACKFILL_CONSIDERED</glossterm>
1792 <glossdef>
1793 <para>Features from
1794 <filename><link linkend='var-DISTRO_FEATURES_BACKFILL'>DISTRO_FEATURES_BACKFILL</link></filename>
1795 that should not be backfilled (i.e. added to
1796 <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>)
1797 during the build.
1798 See the "<link linkend='ref-features-backfill'>Feature Backfilling</link>" section for
1799 more information.
1800 </para>
1801 </glossdef>
1802 </glossentry>
1803
1804 <glossentry id='var-DISTRO_NAME'><glossterm>DISTRO_NAME</glossterm>
1805 <glossdef>
1806 <para>The long name of the distribution.</para>
1807 </glossdef>
1808 </glossentry>
1809
1810 <glossentry id='var-DISTRO_PN_ALIAS'><glossterm>DISTRO_PN_ALIAS</glossterm>
1811 <glossdef>
1812 <para>Alias names used for the recipe in various Linux distributions.</para>
1813 <para>See the
1814 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-configuring-DISTRO_PN_ALIAS'>Handling
1815 a Package Name Alias</ulink>" section in the Yocto Project Development
1816 Manual for more information.</para>
1817 </glossdef>
1818 </glossentry>
1819
1820 <glossentry id='var-DISTRO_VERSION'><glossterm>DISTRO_VERSION</glossterm>
1821 <glossdef>
1822 <para>The version of the distribution.</para>
1823 </glossdef>
1824 </glossentry>
1825
1826 <glossentry id='var-DISTROOVERRIDES'><glossterm>DISTROOVERRIDES</glossterm>
1827 <glossdef>
1828 <para>
1829 This variable lists overrides specific to the current
1830 distribution.
1831 By default, the variable list includes the value of the
1832 <filename><link linkend='var-DISTRO'>DISTRO</link></filename>
1833 variable.
1834 You can extend the variable to apply any variable overrides
1835 you want as part of the distribution and are not
1836 already in <filename>OVERRIDES</filename> through
1837 some other means.
1838 </para>
1839 </glossdef>
1840 </glossentry>
1841
1842 <glossentry id='var-DL_DIR'><glossterm>DL_DIR</glossterm>
1843 <glossdef>
1844 <para>
1845 The central download directory used by the build process to
1846 store downloads.
1847 By default, <filename>DL_DIR</filename> gets files
1848 suitable for mirroring for everything except Git
1849 repositories.
1850 If you want tarballs of Git repositories, use the
1851 <link linkend='var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></link>
1852 variable.
1853 </para>
1854
1855 <para>
1856 You can set this directory by defining the
1857 <filename>DL_DIR</filename> variable in the
1858 <filename>conf/local.conf</filename> file.
1859 This directory is self-maintaining and you should not have
1860 to touch it.
1861 By default, the directory is <filename>downloads</filename>
1862 in the
1863 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
1864 <literallayout class='monospaced'>
1865 #DL_DIR ?= "${TOPDIR}/downloads"
1866 </literallayout>
1867 To specify a different download directory, simply remove
1868 the comment from the line and provide your directory.
1869 </para>
1870
1871 <para>
1872 During a first build, the system downloads many different
1873 source code tarballs from various upstream projects.
1874 Downloading can take a while, particularly if your network
1875 connection is slow.
1876 Tarballs are all stored in the directory defined by
1877 <filename>DL_DIR</filename> and the build system looks there
1878 first to find source tarballs.
1879 <note>
1880 When wiping and rebuilding, you can preserve this
1881 directory to speed up this part of subsequent
1882 builds.
1883 </note>
1884 </para>
1885
1886 <para>
1887 You can safely share this directory between multiple builds
1888 on the same development machine.
1889 For additional information on how the build process gets
1890 source files when working behind a firewall or proxy server,
1891 see this specific question in the
1892 "<link linkend='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>FAQ</link>"
1893 chapter.
1894 </para>
1895 </glossdef>
1896
1897 </glossentry>
1898 </glossdiv>
1899
1900 <glossdiv id='var-glossary-e'><title>E</title>
1901
1902 <glossentry id='var-ENABLE_BINARY_LOCALE_GENERATION'><glossterm>ENABLE_BINARY_LOCALE_GENERATION</glossterm>
1903 <glossdef>
1904 <para></para>
1905 <para>Variable that controls which locales for
1906 <filename>eglibc</filename> are generated during the
1907 build (useful if the target device has 64Mbytes
1908 of RAM or less).</para>
1909 </glossdef>
1910 </glossentry>
1911
1912 <glossentry id='var-ERROR_QA'><glossterm>ERROR_QA</glossterm>
1913 <glossdef>
1914 <para>
1915 Specifies the quality assurance checks whose failures are
1916 reported as errors by the OpenEmbedded build system.
1917 You set this variable in your distribution configuration
1918 file.
1919 For a list of the checks you can control with this variable,
1920 see the
1921 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
1922 section.
1923 </para>
1924 </glossdef>
1925 </glossentry>
1926
1927 <glossentry id='var-ERR_REPORT_DIR'><glossterm>ERR_REPORT_DIR</glossterm>
1928 <glossdef>
1929 <para>
1930 When used with the
1931 <link linkend='ref-classes-report-error'><filename>report-error</filename></link>
1932 class, specifies the path used for storing the debug files
1933 created by the
1934 <ulink url='&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool'>error reporting tool</ulink>,
1935 which allows you to submit build errors you encounter to a
1936 central database.
1937 By default, the value of this variable is
1938 <filename>${</filename><link linkend='var-LOG_DIR'><filename>LOG_DIR</filename></link><filename>}/error-report</filename>.
1939 </para>
1940
1941 <para>
1942 You can set <filename>ERR_REPORT_DIR</filename> to the path
1943 you want the error reporting tool to store the debug files
1944 as follows in your <filename>local.conf</filename> file:
1945 <literallayout class='monospaced'>
1946 ERR_REPORT_DIR = "path"
1947 </literallayout>
1948 </para>
1949 </glossdef>
1950 </glossentry>
1951
1952 <glossentry id='var-EXCLUDE_FROM_WORLD'><glossterm>EXCLUDE_FROM_WORLD</glossterm>
1953 <glossdef>
1954 <para>
1955 Directs BitBake to exclude a recipe from world builds (i.e.
1956 <filename>bitbake world</filename>).
1957 During world builds, BitBake locates, parses and builds all
1958 recipes found in every layer exposed in the
1959 <filename>bblayers.conf</filename> configuration file.
1960 </para>
1961
1962 <para>
1963 To exclude a recipe from a world build using this variable,
1964 set the variable to "1" in the recipe.
1965 </para>
1966
1967 <note>
1968 Recipes added to <filename>EXCLUDE_FROM_WORLD</filename>
1969 may still be built during a world build in order to satisfy
1970 dependencies of other recipes.
1971 Adding a recipe to <filename>EXCLUDE_FROM_WORLD</filename>
1972 only ensures that the recipe is not explicitly added
1973 to the list of build targets in a world build.
1974 </note>
1975 </glossdef>
1976 </glossentry>
1977
1978 <glossentry id='var-EXTENDPE'><glossterm>EXTENDPE</glossterm>
1979 <glossdef>
1980 <para>
1981 Used with file and pathnames to create a prefix for a recipe's
1982 version based on the recipe's
1983 <link linkend='var-PE'><filename>PE</filename></link> value.
1984 If <filename>PE</filename> is set and greater than zero for a recipe,
1985 <filename>EXTENDPE</filename> becomes that value (e.g if
1986 <filename>PE</filename> is equal to "1" then <filename>EXTENDPE</filename>
1987 becomes "1_").
1988 If a recipe's <filename>PE</filename> is not set (the default) or is equal to
1989 zero, <filename>EXTENDPE</filename> becomes "".</para>
1990 <para>See the <link linkend='var-STAMP'><filename>STAMP</filename></link>
1991 variable for an example.
1992 </para>
1993 </glossdef>
1994 </glossentry>
1995
1996 <glossentry id='var-EXTENDPKGV'><glossterm>EXTENDPKGV</glossterm>
1997 <glossdef>
1998 <para>
1999 The full package version specification as it appears on the
2000 final packages produced by a recipe.
2001 The variable's value is normally used to fix a runtime
2002 dependency to the exact same version of another package
2003 in the same recipe:
2004 <literallayout class='monospaced'>
2005 RDEPENDS_${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
2006 </literallayout>
2007 </para>
2008
2009 <para>
2010 The dependency relationships are intended to force the
2011 package manager to upgrade these types of packages in
2012 lock-step.
2013 </para>
2014 </glossdef>
2015 </glossentry>
2016
2017 <glossentry id='var-EXTERNALSRC'><glossterm>EXTERNALSRC</glossterm>
2018 <glossdef>
2019 <para>
2020 If <filename>externalsrc.bbclass</filename> is inherited,
2021 this variable points to the source tree, which is
2022 outside of the OpenEmbedded build system.
2023 When set, this variable sets the
2024 <link linkend='var-S'><filename>S</filename></link>
2025 variable, which is what the OpenEmbedded build system uses
2026 to locate unpacked recipe source code.
2027 </para>
2028
2029 <para>
2030 For more information on
2031 <filename>externalsrc.bbclass</filename>, see the
2032 "<link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>"
2033 section.
2034 You can also find information on how to use this variable
2035 in the
2036 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
2037 section in the Yocto Project Development Manual.
2038 </para>
2039 </glossdef>
2040 </glossentry>
2041
2042 <glossentry id='var-EXTERNALSRC_BUILD'><glossterm>EXTERNALSRC_BUILD</glossterm>
2043 <glossdef>
2044 <para>
2045 If <filename>externalsrc.bbclass</filename> is inherited,
2046 this variable points to the directory in which the recipe's
2047 source code is built,
2048 which is outside of the OpenEmbedded build system.
2049 When set, this variable sets the
2050 <link linkend='var-B'><filename>B</filename></link>
2051 variable, which is what the OpenEmbedded build system uses
2052 to locate the Build Directory.
2053 </para>
2054
2055 <para>
2056 For more information on
2057 <filename>externalsrc.bbclass</filename>, see the
2058 "<link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>"
2059 section.
2060 You can also find information on how to use this variable
2061 in the
2062 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
2063 section in the Yocto Project Development Manual.
2064 </para>
2065 </glossdef>
2066 </glossentry>
2067
2068 <glossentry id='var-EXTRA_IMAGE_FEATURES'><glossterm>EXTRA_IMAGE_FEATURES</glossterm>
2069 <glossdef>
2070 <para>
2071 The list of additional features to include in an image.
2072 Typically, you configure this variable in your
2073 <filename>local.conf</filename> file, which is found in the
2074 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
2075 Although you can use this variable from within a recipe,
2076 best practices dictate that you do not.
2077 <note>
2078 To enable primary features from within the image
2079 recipe, use the
2080 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
2081 variable.
2082 </note>
2083 </para>
2084
2085 <para>
2086 Here are some examples of features you can add:
2087 <literallayout class='monospaced'>
2088"dbg-pkgs" - Adds -dbg packages for all installed packages
2089 including symbol information for debugging and
2090 profiling.
2091
2092"debug-tweaks" - Makes an image suitable for development.
2093 For example, ssh root access has a blank
2094 password. You should remove this feature
2095 before you produce a production image.
2096
2097"dev-pkgs" - Adds -dev packages for all installed packages.
2098 This is useful if you want to develop against
2099 the libraries in the image.
2100
2101"read-only-rootfs" - Creates an image whose root
2102 filesystem is read-only. See the
2103 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>Creating a Read-Only Root Filesystem</ulink>"
2104 section in the Yocto Project
2105 Development Manual for more
2106 information
2107
2108"tools-debug" - Adds debugging tools such as gdb and
2109 strace.
2110
2111"tools-profile" - Adds profiling tools such as oprofile,
2112 exmap, lttng and valgrind (x86 only).
2113
2114"tools-sdk" - Adds development tools such as gcc, make,
2115 pkgconfig and so forth.
2116
2117"tools-testapps" - Adds useful testing tools such as
2118 ts_print, aplay, arecord and so
2119 forth.
2120
2121 </literallayout>
2122 </para>
2123
2124 <para>
2125 For a complete list of image features that ships with the
2126 Yocto Project, see the
2127 "<link linkend="ref-features-image">Image Features</link>"
2128 section.
2129 </para>
2130
2131 <para>
2132 For an example that shows how to customize your image by
2133 using this variable, see the
2134 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-imagefeatures'>Customizing Images Using Custom <filename>IMAGE_FEATURES</filename> and <filename>EXTRA_IMAGE_FEATURES</filename></ulink>"
2135 section in the Yocto Project Development Manual.
2136 </para>
2137 </glossdef>
2138 </glossentry>
2139
2140 <glossentry id='var-EXTRA_IMAGEDEPENDS'><glossterm>EXTRA_IMAGEDEPENDS</glossterm>
2141 <glossdef>
2142 <para>A list of recipes to build that do not provide packages
2143 for installing into the root filesystem.
2144 </para>
2145 <para>Sometimes a recipe is required to build the final image but is not
2146 needed in the root filesystem.
2147 You can use the <filename>EXTRA_IMAGEDEPENDS</filename> variable to
2148 list these recipes and thus specify the dependencies.
2149 A typical example is a required bootloader in a machine configuration.
2150 </para>
2151 <note>
2152 To add packages to the root filesystem, see the various
2153 <filename>*<link linkend='var-RDEPENDS'>RDEPENDS</link></filename>
2154 and <filename>*<link linkend='var-RRECOMMENDS'>RRECOMMENDS</link></filename>
2155 variables.
2156 </note>
2157 </glossdef>
2158 </glossentry>
2159
2160 <glossentry id='var-EXTRA_OECMAKE'><glossterm>EXTRA_OECMAKE</glossterm>
2161 <glossdef>
2162 <para>Additional <filename>cmake</filename> options.</para>
2163 </glossdef>
2164 </glossentry>
2165
2166 <glossentry id='var-EXTRA_OECONF'><glossterm>EXTRA_OECONF</glossterm>
2167 <glossdef>
2168 <para>Additional <filename>configure</filename> script options.</para>
2169 </glossdef>
2170 </glossentry>
2171
2172 <glossentry id='var-EXTRA_OEMAKE'><glossterm>EXTRA_OEMAKE</glossterm>
2173 <glossdef>
2174 <para>Additional GNU <filename>make</filename> options.</para>
2175 </glossdef>
2176 </glossentry>
2177
2178 <glossentry id='var-EXTRA_OESCONS'><glossterm>EXTRA_OESCONS</glossterm>
2179 <glossdef>
2180 <para>
2181 When a recipe inherits the
2182 <link linkend='ref-classes-scons'><filename>scons</filename></link>
2183 class, this variable specifies additional configuration
2184 options you want to pass to the
2185 <filename>scons</filename> command line.
2186 </para>
2187 </glossdef>
2188 </glossentry>
2189
2190 <glossentry id='var-EXTRA_QMAKEVARS_POST'><glossterm>EXTRA_QMAKEVARS_POST</glossterm>
2191 <glossdef>
2192 <para>
2193 Configuration variables or options you want to pass to
2194 <filename>qmake</filename>.
2195 Use this variable when the arguments need to be after the
2196 <filename>.pro</filename> file list on the command line.
2197 </para>
2198
2199 <para>
2200 This variable is used with recipes that inherit the
2201 <link linkend='ref-classes-qmake*'><filename>qmake_base</filename></link>
2202 class or other classes that inherit
2203 <filename>qmake_base</filename>.
2204 </para>
2205 </glossdef>
2206 </glossentry>
2207
2208 <glossentry id='var-EXTRA_QMAKEVARS_PRE'><glossterm>EXTRA_QMAKEVARS_PRE</glossterm>
2209 <glossdef>
2210 <para>
2211 Configuration variables or options you want to pass to
2212 <filename>qmake</filename>.
2213 Use this variable when the arguments need to be before the
2214 <filename>.pro</filename> file list on the command line.
2215 </para>
2216
2217 <para>
2218 This variable is used with recipes that inherit the
2219 <link linkend='ref-classes-qmake*'><filename>qmake_base</filename></link>
2220 class or other classes that inherit
2221 <filename>qmake_base</filename>.
2222 </para>
2223 </glossdef>
2224 </glossentry>
2225
2226 <glossentry id='var-EXTRA_USERS_PARAMS'><glossterm>EXTRA_USERS_PARAMS</glossterm>
2227 <glossdef>
2228 <para>
2229 When a recipe inherits the
2230 <link linkend='ref-classes-extrausers'><filename>extrausers</filename></link>
2231 class, this variable provides image level user and group
2232 operations.
2233 This is a more global method of providing user and group
2234 configuration as compared to using the
2235 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
2236 class, which ties user and group configurations to a
2237 specific recipe.
2238 </para>
2239
2240 <para>
2241 The set list of commands you can configure using the
2242 <filename>EXTRA_USERS_PARAMS</filename> is shown in the
2243 <filename>extrausers</filename> class.
2244 These commands map to the normal Unix commands of the same
2245 names:
2246 <literallayout class='monospaced'>
2247 # EXTRA_USERS_PARAMS = "\
2248 # useradd -p '' tester; \
2249 # groupadd developers; \
2250 # userdel nobody; \
2251 # groupdel -g video; \
2252 # groupmod -g 1020 developers; \
2253 # usermod -s /bin/sh tester; \
2254 # "
2255 </literallayout>
2256 </para>
2257 </glossdef>
2258 </glossentry>
2259
2260 </glossdiv>
2261
2262 <glossdiv id='var-glossary-f'><title>F</title>
2263
2264 <glossentry id='var-FEATURE_PACKAGES'><glossterm>FEATURE_PACKAGES</glossterm>
2265 <glossdef>
2266 <para>
2267 Defines one or more packages to include in an image when
2268 a specific item is included in
2269 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
2270 When setting the value, <filename>FEATURE_PACKAGES</filename>
2271 should have the name of the feature item as an override.
2272 Here is an example:
2273 <literallayout class='monospaced'>
2274 FEATURE_PACKAGES_widget = "package1 package2"
2275 </literallayout>
2276 In this example, if "widget" were added to
2277 <filename>IMAGE_FEATURES</filename>, "package1" and
2278 "package2" would be included in the image.
2279 <note>
2280 Packages installed by features defined through
2281 <filename>FEATURE_PACKAGES</filename> are often package
2282 groups.
2283 While similarly named, you should not confuse the
2284 <filename>FEATURE_PACKAGES</filename> variable with
2285 package groups, which are discussed elsewhere in the
2286 documentation.
2287 </note>
2288 </para>
2289 </glossdef>
2290 </glossentry>
2291
2292 <glossentry id='var-FEED_DEPLOYDIR_BASE_URI'><glossterm>FEED_DEPLOYDIR_BASE_URI</glossterm>
2293 <glossdef>
2294 <para>
2295 Points to the base URL of the server and location within
2296 the document-root that provides the metadata and
2297 packages required by OPKG to support runtime package
2298 management of IPK packages.
2299 You set this variable in your
2300 <filename>local.conf</filename> file.
2301 </para>
2302
2303 <para>
2304 Consider the following example:
2305 <literallayout class='monospaced'>
2306 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
2307 </literallayout>
2308 This example assumes you are serving your packages over
2309 HTTP and your databases are located in a directory
2310 named <filename>BOARD-dir</filename>, which is underneath
2311 your HTTP server's document-root.
2312 In this case, the OpenEmbedded build system generates a set
2313 of configuration files for you in your target that work
2314 with the feed.
2315 </para>
2316 </glossdef>
2317 </glossentry>
2318
2319 <glossentry id='var-FILES'><glossterm>FILES</glossterm>
2320 <glossdef>
2321 <para>
2322 The list of directories or files that are placed in packages.
2323 </para>
2324
2325 <para>
2326 To use the <filename>FILES</filename> variable, provide a package name
2327 override that identifies the resulting package.
2328 Then, provide a space-separated list of files or paths that identifies the
2329 files you want included as part of the resulting package.
2330 Here is an example:
2331 <literallayout class='monospaced'>
2332 FILES_${PN} += "${bindir}/mydir1/ ${bindir}/mydir2/myfile"
2333 </literallayout>
2334 </para>
2335
2336 <note>
2337 When specifying paths as part of the <filename>FILES</filename> variable,
2338 it is good practice to use appropriate path variables.
2339 For example, use <filename>${sysconfdir}</filename> rather than
2340 <filename>/etc</filename>, or <filename>${bindir}</filename> rather
2341 than <filename>/usr/bin</filename>.
2342 You can find a list of these variables at the top of the
2343 <filename>meta/conf/bitbake.conf</filename> file in the
2344 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
2345 </note>
2346
2347 <para>
2348 If some of the files you provide with the <filename>FILES</filename> variable
2349 are editable and you know they should not be
2350 overwritten during the package update process by the Package Management
2351 System (PMS), you can identify these files so that the PMS will not
2352 overwrite them.
2353 See the <filename><link linkend='var-CONFFILES'>CONFFILES</link></filename>
2354 variable for information on how to identify these files to the PMS.
2355 </para>
2356
2357 </glossdef>
2358 </glossentry>
2359
2360 <glossentry id='var-FILESEXTRAPATHS'><glossterm>FILESEXTRAPATHS</glossterm>
2361 <glossdef>
2362 <para>
2363 Extends the search path the OpenEmbedded build system uses
2364 when looking for files and patches as it processes recipes
2365 and append files.
2366 The default directories BitBake uses when it processes
2367 recipes are initially defined by the
2368 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
2369 variable.
2370 You can extend <filename>FILESPATH</filename> variable
2371 by using <filename>FILESEXTRAPATHS</filename>.
2372 </para>
2373
2374 <para>
2375 Best practices dictate that you accomplish this by using
2376 <filename>FILESEXTRAPATHS</filename> from within a
2377 <filename>.bbappend</filename> file and that you prepend
2378 paths as follows:
2379 <literallayout class='monospaced'>
2380 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2381 </literallayout>
2382 In the above example, the build system first looks for files
2383 in a directory that has the same name as the corresponding
2384 append file.
2385 <note>
2386 <para>When extending <filename>FILESEXTRAPATHS</filename>,
2387 be sure to use the immediate expansion
2388 (<filename>:=</filename>) operator.
2389 Immediate expansion makes sure that BitBake evaluates
2390 <link linkend='var-THISDIR'><filename>THISDIR</filename></link>
2391 at the time the directive is encountered rather than at
2392 some later time when expansion might result in a
2393 directory that does not contain the files you need.
2394 </para>
2395 <para>Also, include the trailing separating colon
2396 character if you are prepending.
2397 The trailing colon character is necessary because you
2398 are directing BitBake to extend the path by prepending
2399 directories to the search path.</para>
2400 </note>
2401 Here is another common use:
2402 <literallayout class='monospaced'>
2403 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
2404 </literallayout>
2405 In this example, the build system extends the
2406 <filename>FILESPATH</filename> variable to include a
2407 directory named <filename>files</filename> that is in the
2408 same directory as the corresponding append file.
2409 </para>
2410
2411 <para>
2412 Here is a final example that specifically adds three paths:
2413 <literallayout class='monospaced'>
2414 FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:"
2415 </literallayout>
2416 </para>
2417
2418 <para>
2419 By prepending paths in <filename>.bbappend</filename>
2420 files, you allow multiple append files that reside in
2421 different layers but are used for the same recipe to
2422 correctly extend the path.
2423 </para>
2424 </glossdef>
2425 </glossentry>
2426
2427 <glossentry id='var-FILESOVERRIDES'><glossterm>FILESOVERRIDES</glossterm>
2428 <glossdef>
2429 <para>
2430 A subset of <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
2431 used by the OpenEmbedded build system for creating
2432 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>.
2433 You can find more information on how overrides are handled
2434 in the
2435 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake Manual</ulink>.
2436 </para>
2437
2438 <para>
2439 By default, the <filename>FILESOVERRIDES</filename>
2440 variable is defined as:
2441 <literallayout class='monospaced'>
2442 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2443 </literallayout>
2444
2445 <note>
2446 Do not hand-edit the <filename>FILESOVERRIDES</filename>
2447 variable.
2448 The values match up with expected overrides and are
2449 used in an expected manner by the build system.
2450 </note>
2451 </para>
2452 </glossdef>
2453 </glossentry>
2454
2455 <glossentry id='var-FILESPATH'><glossterm>FILESPATH</glossterm>
2456 <glossdef>
2457 <para>
2458 The default set of directories the OpenEmbedded build system
2459 uses when searching for patches and files.
2460 During the build process, BitBake searches each directory in
2461 <filename>FILESPATH</filename> in the specified order when
2462 looking for files and patches specified by each
2463 <filename>file://</filename> URI in a recipe.
2464 </para>
2465
2466 <para>
2467 The default value for the <filename>FILESPATH</filename>
2468 variable is defined in the <filename>base.bbclass</filename>
2469 class found in <filename>meta/classes</filename> in the
2470 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
2471 <literallayout class='monospaced'>
2472 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
2473 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
2474 </literallayout>
2475 <note>
2476 Do not hand-edit the <filename>FILESPATH</filename>
2477 variable.
2478 If you want the build system to look in directories
2479 other than the defaults, extend the
2480 <filename>FILESPATH</filename> variable by using the
2481 <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
2482 variable.
2483 </note>
2484 Be aware that the default <filename>FILESPATH</filename>
2485 directories do not map to directories in custom layers
2486 where append files (<filename>.bbappend</filename>)
2487 are used.
2488 If you want the build system to find patches or files
2489 that reside with your append files, you need to extend
2490 the <filename>FILESPATH</filename> variable by using
2491 the
2492 <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
2493 variable.
2494 </para>
2495 </glossdef>
2496 </glossentry>
2497
2498 <glossentry id='var-FILESYSTEM_PERMS_TABLES'><glossterm>FILESYSTEM_PERMS_TABLES</glossterm>
2499 <glossdef>
2500 <para>Allows you to define your own file permissions settings table as part of
2501 your configuration for the packaging process.
2502 For example, suppose you need a consistent set of custom permissions for
2503 a set of groups and users across an entire work project.
2504 It is best to do this in the packages themselves but this is not always
2505 possible.
2506 </para>
2507 <para>
2508 By default, the OpenEmbedded build system uses the <filename>fs-perms.txt</filename>, which
2509 is located in the <filename>meta/files</filename> folder in the
2510 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
2511 If you create your own file permissions setting table, you should place it in your
2512 layer or the distro's layer.
2513 </para>
2514 <para>
2515 You define the <filename>FILESYSTEM_PERMS_TABLES</filename> variable in the
2516 <filename>conf/local.conf</filename> file, which is found in the
2517 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>, to
2518 point to your custom <filename>fs-perms.txt</filename>.
2519 You can specify more than a single file permissions setting table.
2520 The paths you specify to these files must be defined within the
2521 <link linkend='var-BBPATH'><filename>BBPATH</filename></link> variable.
2522 </para>
2523 <para>
2524 For guidance on how to create your own file permissions settings table file,
2525 examine the existing <filename>fs-perms.txt</filename>.
2526 </para>
2527 </glossdef>
2528 </glossentry>
2529
2530 <glossentry id='var-FONT_PACKAGES'><glossterm>FONT_PACKAGES</glossterm>
2531 <glossdef>
2532 <para>
2533 When a recipe inherits the
2534 <link linkend='ref-classes-fontcache'><filename>fontcache</filename></link>
2535 class, this variable identifies packages containing font
2536 files that need to be cached by Fontconfig.
2537 By default, the <filename>fontcache</filename> class assumes
2538 that fonts are in the recipe's main package
2539 (i.e. <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>).
2540 Use this variable if fonts you need are in a package
2541 other than that main package.
2542 </para>
2543 </glossdef>
2544 </glossentry>
2545
2546 <glossentry id='var-FULL_OPTIMIZATION'><glossterm>FULL_OPTIMIZATION</glossterm>
2547 <glossdef>
2548 <para>
2549 The options to pass in
2550 <filename><link linkend='var-TARGET_CFLAGS'>TARGET_CFLAGS</link></filename>
2551 and <filename><link linkend='var-CFLAGS'>CFLAGS</link></filename>
2552 when compiling an optimized system.
2553 This variable defaults to
2554 "-O2 -pipe ${DEBUG_FLAGS}".
2555 </para>
2556 </glossdef>
2557 </glossentry>
2558 </glossdiv>
2559
2560 <glossdiv id='var-glossary-g'><title>G</title>
2561
2562 <glossentry id='var-GROUPADD_PARAM'><glossterm>GROUPADD_PARAM</glossterm>
2563 <glossdef>
2564 <para>
2565 When a recipe inherits the
2566 <filename>useradd</filename> class, this variable
2567 specifies for a package what parameters should be passed
2568 to the <filename>groupadd</filename> command
2569 if you wish to add a group to the system when the package
2570 is installed.
2571 </para>
2572
2573 <para>
2574 Here is an example from the <filename>dbus</filename>
2575 recipe:
2576 <literallayout class='monospaced'>
2577 GROUPADD_PARAM_${PN} = "-r netdev"
2578 </literallayout>
2579 For information on the standard Linux shell command
2580 <filename>groupadd</filename>, see
2581 <ulink url='http://linux.die.net/man/8/groupadd'></ulink>.
2582 </para>
2583 </glossdef>
2584 </glossentry>
2585
2586 <glossentry id='var-GROUPMEMS_PARAM'><glossterm>GROUPMEMS_PARAM</glossterm>
2587 <glossdef>
2588 <para>
2589 When a recipe inherits the
2590 <filename>useradd</filename> class, this variable
2591 specifies for a package what parameters should be passed
2592 to the <filename>groupmems</filename> command
2593 if you wish to modify the members of a group when the
2594 package is installed.
2595 </para>
2596
2597 <para>
2598 For information on the standard Linux shell command
2599 <filename>groupmems</filename>, see
2600 <ulink url='http://linux.die.net/man/8/groupmems'></ulink>.
2601 </para>
2602 </glossdef>
2603 </glossentry>
2604
2605 <glossentry id='var-GRUB_GFXSERIAL'><glossterm>GRUB_GFXSERIAL</glossterm>
2606 <glossdef>
2607 <para>
2608 Configures the GNU GRand Unified Bootloader (GRUB) to have
2609 graphics and serial in the boot menu.
2610 Set this variable to "1" in your
2611 <filename>local.conf</filename> or distribution
2612 configuration file to enable graphics and serial
2613 in the menu.
2614 </para>
2615
2616 <para>
2617 See the
2618 <link linkend='ref-classes-grub-efi'><filename>grub-efi</filename></link>
2619 class for more information on how this variable is used.
2620 </para>
2621 </glossdef>
2622 </glossentry>
2623
2624 <glossentry id='var-GRUB_OPTS'><glossterm>GRUB_OPTS</glossterm>
2625 <glossdef>
2626 <para>
2627 Additional options to add to the GNU GRand Unified
2628 Bootloader (GRUB) configuration.
2629 Use a semi-colon character (<filename>;</filename>) to
2630 separate multiple options.
2631 </para>
2632
2633 <para>
2634 The <filename>GRUB_OPTS</filename> variable is optional.
2635 See the
2636 <link linkend='ref-classes-grub-efi'><filename>grub-efi</filename></link>
2637 class for more information on how this variable is used.
2638 </para>
2639 </glossdef>
2640 </glossentry>
2641
2642 <glossentry id='var-GRUB_TIMEOUT'><glossterm>GRUB_TIMEOUT</glossterm>
2643 <glossdef>
2644 <para>
2645 Specifies the timeout before executing the default
2646 <filename>LABEL</filename> in the GNU GRand Unified
2647 Bootloader (GRUB).
2648 </para>
2649
2650 <para>
2651 The <filename>GRUB_TIMEOUT</filename> variable is optional.
2652 See the
2653 <link linkend='ref-classes-grub-efi'><filename>grub-efi</filename></link>
2654 class for more information on how this variable is used.
2655 </para>
2656 </glossdef>
2657 </glossentry>
2658
2659 <glossentry id='var-GTKIMMODULES_PACKAGES'><glossterm>GTKIMMODULES_PACKAGES</glossterm>
2660 <glossdef>
2661 <para>
2662 For recipes that inherit the
2663 <link linkend='ref-classes-gtk-immodules-cache'><filename>gtk-immodules-cache</filename></link>
2664 class, this variable specifies the packages that contain the
2665 GTK+ input method modules being installed when the modules
2666 are in packages other than the main package.
2667 </para>
2668 </glossdef>
2669 </glossentry>
2670
2671 </glossdiv>
2672
2673 <glossdiv id='var-glossary-h'><title>H</title>
2674
2675 <glossentry id='var-HOMEPAGE'><glossterm>HOMEPAGE</glossterm>
2676 <glossdef>
2677 <para>Website where more information about the software the recipe is building
2678 can be found.</para>
2679 </glossdef>
2680 </glossentry>
2681
2682 <glossentry id='var-HOST_SYS'><glossterm>HOST_SYS</glossterm>
2683 <glossdef>
2684 <para>
2685 Specifies the system, including the architecture and the
2686 operating system, for with the build is occurring
2687 in the context of the current
2688 recipe.
2689 The OpenEmbedded build system automatically sets this
2690 variable.
2691 You do not need to set the variable yourself.
2692 </para>
2693
2694 <para>
2695 Here are two examples:
2696 <itemizedlist>
2697 <listitem><para>Given a native recipe on a 32-bit
2698 x86 machine running Linux, the value is
2699 "i686-linux".
2700 </para></listitem>
2701 <listitem><para>Given a recipe being built for a
2702 little-endian MIPS target running Linux,
2703 the value might be "mipsel-linux".
2704 </para></listitem>
2705 </itemizedlist>
2706 </para>
2707 </glossdef>
2708 </glossentry>
2709
2710 </glossdiv>
2711
2712 <glossdiv id='var-glossary-i'><title>I</title>
2713
2714 <glossentry id='var-ICECC_DISABLED'><glossterm>ICECC_DISABLED</glossterm>
2715 <glossdef>
2716 <para>
2717 Disables or enables the <filename>icecc</filename>
2718 (Icecream) function.
2719 For more information on this function and best practices
2720 for using this variable, see the
2721 "<link linkend='ref-classes-icecc'><filename>icecc.bbclass</filename></link>"
2722 section.
2723 </para>
2724
2725 <para>
2726 Setting this variable to "1" in your
2727 <filename>local.conf</filename> disables the function:
2728 <literallayout class='monospaced'>
2729 ICECC_DISABLED ??= "1"
2730 </literallayout>
2731 To enable the function, set the variable as follows:
2732 <literallayout class='monospaced'>
2733 ICECC_DISABLED = ""
2734 </literallayout>
2735 </para>
2736 </glossdef>
2737 </glossentry>
2738
2739 <glossentry id='var-ICECC_ENV_EXEC'><glossterm>ICECC_ENV_EXEC</glossterm>
2740 <glossdef>
2741 <para>
2742 Points to the <filename>icecc-create-env</filename> script
2743 that you provide.
2744 This variable is used by the
2745 <link linkend='ref-classes-icecc'><filename>icecc</filename></link>
2746 class.
2747 You set this variable in your
2748 <filename>local.conf</filename> file.
2749 </para>
2750
2751 <para>
2752 If you do not point to a script that you provide, the
2753 OpenEmbedded build system uses the default script provided
2754 by the <filename>icecc-create-env.bb</filename> recipe,
2755 which is a modified version and not the one that comes with
2756 <filename>icecc</filename>.
2757 </para>
2758 </glossdef>
2759 </glossentry>
2760
2761 <glossentry id='var-ICECC_PARALLEL_MAKE'><glossterm>ICECC_PARALLEL_MAKE</glossterm>
2762 <glossdef>
2763 <para>
2764 Extra options passed to the <filename>make</filename>
2765 command during the <filename>do_compile</filename> task
2766 that specify parallel compilation.
2767 This variable usually takes the form of
2768 <filename>-j 4</filename>, where the number
2769 represents the maximum number of parallel threads
2770 <filename>make</filename> can run.
2771 <note>
2772 The options passed affect builds on all enabled
2773 machines on the network, which are machines running the
2774 <filename>iceccd</filename> daemon.
2775 </note>
2776 </para>
2777
2778 <para>
2779 If your enabled machines support multiple cores,
2780 coming up with the maximum number of parallel threads
2781 that gives you the best performance could take some
2782 experimentation since machine speed, network lag,
2783 available memory, and existing machine loads can all
2784 affect build time.
2785 Consequently, unlike the
2786 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
2787 variable, there is no rule-of-thumb for setting
2788 <filename>ICECC_PARALLEL_MAKE</filename> to achieve
2789 optimal performance.
2790 </para>
2791
2792 <para>
2793 If you do not set <filename>ICECC_PARALLEL_MAKE</filename>,
2794 the build system does not use it (i.e. the system does
2795 not detect and assign the number of cores as is done with
2796 <filename>PARALLEL_MAKE</filename>).
2797 </para>
2798 </glossdef>
2799 </glossentry>
2800
2801 <glossentry id='var-ICECC_PATH'><glossterm>ICECC_PATH</glossterm>
2802 <glossdef>
2803 <para>
2804 The location of the <filename>icecc</filename> binary.
2805 You can set this variable in your
2806 <filename>local.conf</filename> file.
2807 If your <filename>local.conf</filename> file does not define
2808 this variable, the
2809 <link linkend='ref-classes-icecc'><filename>icecc</filename></link>
2810 class attempts to define it by locating
2811 <filename>icecc</filename> using <filename>which</filename>.
2812 </para>
2813 </glossdef>
2814 </glossentry>
2815
2816 <glossentry id='var-ICECC_USER_CLASS_BL'><glossterm>ICECC_USER_CLASS_BL</glossterm>
2817 <glossdef>
2818 <para>
2819 Identifies user classes that you do not want the
2820 Icecream distributed compile support to consider.
2821 This variable is used by the
2822 <link linkend='ref-classes-icecc'><filename>icecc</filename></link>
2823 class.
2824 You set this variable in your
2825 <filename>local.conf</filename> file.
2826 </para>
2827
2828 <para>
2829 When you list classes using this variable, you are
2830 "blacklisting" them from distributed compilation across
2831 remote hosts.
2832 Any classes you list will be distributed and compiled
2833 locally.
2834 </para>
2835 </glossdef>
2836 </glossentry>
2837
2838 <glossentry id='var-ICECC_USER_PACKAGE_BL'><glossterm>ICECC_USER_PACKAGE_BL</glossterm>
2839 <glossdef>
2840 <para>
2841 Identifies user recipes that you do not want the
2842 Icecream distributed compile support to consider.
2843 This variable is used by the
2844 <link linkend='ref-classes-icecc'><filename>icecc</filename></link>
2845 class.
2846 You set this variable in your
2847 <filename>local.conf</filename> file.
2848 </para>
2849
2850 <para>
2851 When you list packages using this variable, you are
2852 "blacklisting" them from distributed compilation across
2853 remote hosts.
2854 Any packages you list will be distributed and compiled
2855 locally.
2856 </para>
2857 </glossdef>
2858 </glossentry>
2859
2860 <glossentry id='var-ICECC_USER_PACKAGE_WL'><glossterm>ICECC_USER_PACKAGE_WL</glossterm>
2861 <glossdef>
2862 <para>
2863 Identifies user recipes that use an empty
2864 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
2865 variable that you want to force remote distributed
2866 compilation on using the Icecream distributed compile
2867 support.
2868 This variable is used by the
2869 <link linkend='ref-classes-icecc'><filename>icecc</filename></link>
2870 class.
2871 You set this variable in your
2872 <filename>local.conf</filename> file.
2873 </para>
2874 </glossdef>
2875 </glossentry>
2876
2877 <glossentry id='var-IMAGE_BASENAME'><glossterm>IMAGE_BASENAME</glossterm>
2878 <glossdef>
2879 <para>
2880 The base name of image output files.
2881 This variable defaults to the recipe name
2882 (<filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>).
2883 </para>
2884 </glossdef>
2885 </glossentry>
2886
2887 <glossentry id='var-IMAGE_CLASSES'><glossterm>IMAGE_CLASSES</glossterm>
2888 <glossdef>
2889 <para>
2890 A list of classes that all images should inherit.
2891 You typically use this variable to specify the list of
2892 classes that register the different types of images
2893 the OpenEmbedded build system creates.
2894 </para>
2895
2896 <para>
2897 The default value for <filename>IMAGE_CLASSES</filename> is
2898 <filename>image_types</filename>.
2899 You can set this variable in your
2900 <filename>local.conf</filename> or in a distribution
2901 configuration file.
2902 </para>
2903
2904 <para>
2905 For more information, see
2906 <filename>meta/classes/image_types.bbclass</filename> in the
2907 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
2908 </para>
2909 </glossdef>
2910 </glossentry>
2911
2912 <glossentry id='var-IMAGE_FEATURES'><glossterm>IMAGE_FEATURES</glossterm>
2913 <glossdef>
2914 <para>
2915 The primary list of features to include in an image.
2916 Typically, you configure this variable in an image recipe.
2917 Although you can use this variable from your
2918 <filename>local.conf</filename> file, which is found in the
2919 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
2920 best practices dictate that you do not.
2921 <note>
2922 To enable extra features from outside the image recipe,
2923 use the
2924 <filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename> variable.
2925 </note>
2926 For a list of image features that ships with the Yocto
2927 Project, see the
2928 "<link linkend="ref-features-image">Image Features</link>"
2929 section.
2930 </para>
2931
2932 <para>
2933 For an example that shows how to customize your image by
2934 using this variable, see the
2935 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-imagefeatures'>Customizing Images Using Custom <filename>IMAGE_FEATURES</filename> and <filename>EXTRA_IMAGE_FEATURES</filename></ulink>"
2936 section in the Yocto Project Development Manual.
2937 </para>
2938 </glossdef>
2939 </glossentry>
2940
2941 <glossentry id='var-IMAGE_FSTYPES'><glossterm>IMAGE_FSTYPES</glossterm>
2942 <glossdef>
2943 <para>
2944 Specifies the formats the OpenEmbedded build system uses
2945 during the build when creating the root filesystem.
2946 For example, setting <filename>IMAGE_FSTYPES</filename>
2947 as follows causes the build system to create root
2948 filesystems using two formats: <filename>.ext3</filename>
2949 and <filename>.tar.bz2</filename>:
2950 <literallayout class='monospaced'>
2951 IMAGE_FSTYPES = "ext3 tar.bz2"
2952 </literallayout>
2953 For the complete list of supported image formats from which
2954 you can choose, see
2955 <link linkend='var-IMAGE_TYPES'><filename>IMAGE_TYPES</filename></link>.
2956 </para>
2957
2958 <note>
2959 If you add "live" to <filename>IMAGE_FSTYPES</filename>
2960 inside an image recipe, be sure that you do so prior to the
2961 "inherit image" line of the recipe or the live image will
2962 not build.
2963 </note>
2964
2965 <note>
2966 Due to the way this variable is processed, it is not
2967 possible to update its contents using
2968 <filename>_append</filename> or
2969 <filename>_prepend</filename>. To add one or more
2970 additional options to this variable the
2971 <filename>+=</filename> operator must be used.
2972 </note>
2973 </glossdef>
2974 </glossentry>
2975
2976 <glossentry id='var-IMAGE_INSTALL'><glossterm>IMAGE_INSTALL</glossterm>
2977 <glossdef>
2978 <para>
2979 Specifies the packages to install into an image.
2980 The <filename>IMAGE_INSTALL</filename> variable is a
2981 mechanism for an image recipe and you should use it
2982 with care to avoid ordering issues.
2983 <note>
2984 When working with an
2985 <link linkend='images-core-image-minimal-initramfs'><filename>core-image-minimal-initramfs</filename></link>
2986 image, do not use the <filename>IMAGE_INSTALL</filename>
2987 variable to specify packages for installation.
2988 Instead, use the
2989 <link linkend='var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></link>
2990 variable, which allows the initial RAM disk (initramfs)
2991 recipe to use a fixed set of packages and not be
2992 affected by <filename>IMAGE_INSTALL</filename>.
2993 </note>
2994 </para>
2995
2996 <para>
2997 Image recipes set <filename>IMAGE_INSTALL</filename>
2998 to specify the packages to install into an image through
2999 <filename>image.bbclass</filename>.
3000 Additionally, "helper" classes exist, such as
3001 <filename>core-image.bbclass</filename>, that can take
3002 <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>
3003 lists and turn these into auto-generated entries in
3004 <filename>IMAGE_INSTALL</filename> in addition to its
3005 default contents.
3006 </para>
3007
3008 <para>
3009 Using <filename>IMAGE_INSTALL</filename> with the
3010 <filename>+=</filename> operator from the
3011 <filename>/conf/local.conf</filename> file or from within
3012 an image recipe is not recommended as it can cause ordering
3013 issues.
3014 Since <filename>core-image.bbclass</filename> sets
3015 <filename>IMAGE_INSTALL</filename> to a default value using
3016 the <filename>?=</filename> operator, using a
3017 <filename>+=</filename> operation against
3018 <filename>IMAGE_INSTALL</filename> will result in
3019 unexpected behavior when used in
3020 <filename>conf/local.conf</filename>.
3021 Furthermore, the same operation from within an image
3022 recipe may or may not succeed depending on the specific
3023 situation.
3024 In both these cases, the behavior is contrary to how most
3025 users expect the <filename>+=</filename> operator to work.
3026 </para>
3027
3028 <para>
3029 When you use this variable, it is best to use it as follows:
3030 <literallayout class='monospaced'>
3031 IMAGE_INSTALL_append = " package-name"
3032 </literallayout>
3033 Be sure to include the space between the quotation character
3034 and the start of the package name or names.
3035 </para>
3036 </glossdef>
3037 </glossentry>
3038
3039 <glossentry id='var-IMAGE_LINGUAS'><glossterm>IMAGE_LINGUAS</glossterm>
3040 <glossdef>
3041 <para>
3042 Specifies the list of locales to install into the image
3043 during the root filesystem construction process.
3044 The OpenEmbedded build system automatically splits locale
3045 files, which are used for localization, into separate
3046 packages.
3047 Setting the <filename>IMAGE_LINGUAS</filename> variable
3048 ensures that any locale packages that correspond to packages
3049 already selected for installation into the image are also
3050 installed.
3051 Here is an example:
3052 <literallayout class='monospaced'>
3053 IMAGE_LINGUAS = "pt-br de-de"
3054 </literallayout>
3055 In this example, the build system ensures any Brazilian
3056 Portuguese and German locale files that correspond to
3057 packages in the image are installed (i.e.
3058 <filename>*-locale-pt-br</filename>
3059 and <filename>*-locale-de-de</filename> as well as
3060 <filename>*-locale-pt</filename>
3061 and <filename>*-locale-de</filename>, since some software
3062 packages only provide locale files by language and not by
3063 country-specific language).
3064 </para>
3065 </glossdef>
3066 </glossentry>
3067
3068 <glossentry id='var-IMAGE_MANIFEST'><glossterm>IMAGE_MANIFEST</glossterm>
3069 <glossdef>
3070 <para>
3071 The manifest file for the image.
3072 This file lists all the installed packages that make up
3073 the image.
3074 The file contains package information on a line-per-package
3075 basis as follows:
3076 <literallayout class='monospaced'>
3077 &lt;packagename&gt; &lt;packagearch&gt; &lt;version&gt;
3078 </literallayout>
3079 </para>
3080
3081 <para>
3082 The
3083 <link linkend='ref-classes-image'><filename>image</filename></link>
3084 class defines the manifest file as follows:
3085 <literallayout class='monospaced'>
3086 IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest"
3087 </literallayout>
3088 The location is derived using the
3089 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
3090 and
3091 <link linkend='var-IMAGE_NAME'><filename>IMAGE_NAME</filename></link>
3092 variables.
3093 You can find information on how the image
3094 is created in the
3095 "<link linkend='image-generation-dev-environment'>Image Generation</link>"
3096 section.
3097 </para>
3098 </glossdef>
3099 </glossentry>
3100
3101 <glossentry id='var-IMAGE_NAME'><glossterm>IMAGE_NAME</glossterm>
3102 <glossdef>
3103 <para>
3104 The name of the output image files minus the extension.
3105 This variable is derived using the
3106 <link linkend='var-IMAGE_BASENAME'><filename>IMAGE_BASENAME</filename></link>,
3107 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
3108 and
3109 <link linkend='var-DATETIME'><filename>DATETIME</filename></link>
3110 variables:
3111 <literallayout class='monospaced'>
3112 IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
3113 </literallayout>
3114 </para>
3115 </glossdef>
3116 </glossentry>
3117
3118 <glossentry id='var-IMAGE_OVERHEAD_FACTOR'><glossterm>IMAGE_OVERHEAD_FACTOR</glossterm>
3119 <glossdef>
3120 <para>
3121 Defines a multiplier that the build system applies to the initial image
3122 size for cases when the multiplier times the returned disk usage value
3123 for the image is greater than the sum of
3124 <filename><link linkend='var-IMAGE_ROOTFS_SIZE'>IMAGE_ROOTFS_SIZE</link></filename>
3125 and
3126 <filename><link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'>IMAGE_ROOTFS_EXTRA_SPACE</link></filename>.
3127 The result of the multiplier applied to the initial image size creates
3128 free disk space in the image as overhead.
3129 By default, the build process uses a multiplier of 1.3 for this variable.
3130 This default value results in 30% free disk space added to the image when this
3131 method is used to determine the final generated image size.
3132 You should be aware that post install scripts and the package management
3133 system uses disk space inside this overhead area.
3134 Consequently, the multiplier does not produce an image with
3135 all the theoretical free disk space.
3136 See <filename><link linkend='var-IMAGE_ROOTFS_SIZE'>IMAGE_ROOTFS_SIZE</link></filename>
3137 for information on how the build system determines the overall image size.
3138 </para>
3139
3140 <para>
3141 The default 30% free disk space typically gives the image enough room to boot
3142 and allows for basic post installs while still leaving a small amount of
3143 free disk space.
3144 If 30% free space is inadequate, you can increase the default value.
3145 For example, the following setting gives you 50% free space added to the image:
3146 <literallayout class='monospaced'>
3147 IMAGE_OVERHEAD_FACTOR = "1.5"
3148 </literallayout>
3149 </para>
3150
3151 <para>
3152 Alternatively, you can ensure a specific amount of free disk space is added
3153 to the image by using the
3154 <filename><link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'>IMAGE_ROOTFS_EXTRA_SPACE</link></filename>
3155 variable.
3156 </para>
3157 </glossdef>
3158 </glossentry>
3159
3160 <glossentry id='var-IMAGE_PKGTYPE'><glossterm>IMAGE_PKGTYPE</glossterm>
3161 <glossdef>
3162 <para>
3163 Defines the package type (DEB, RPM, IPK, or TAR) used
3164 by the OpenEmbedded build system.
3165 The variable is defined appropriately by the
3166 <link linkend='ref-classes-package_deb'><filename>package_deb</filename></link>,
3167 <link linkend='ref-classes-package_rpm'><filename>package_rpm</filename></link>,
3168 <link linkend='ref-classes-package_ipk'><filename>package_ipk</filename></link>,
3169 or
3170 <link linkend='ref-classes-package_tar'><filename>package_tar</filename></link>
3171 class.
3172 </para>
3173
3174 <para>
3175 The
3176 <link linkend='ref-classes-populate-sdk-*'><filename>package_sdk_base</filename></link>
3177 and
3178 <link linkend='ref-classes-image'><filename>image</filename></link>
3179 classes use the <filename>IMAGE_PKGTYPE</filename> for
3180 packaging up images and SDKs.
3181 </para>
3182
3183 <para>
3184 You should not set the <filename>IMAGE_PKGTYPE</filename>
3185 manually.
3186 Rather, the variable is set indirectly through the
3187 appropriate
3188 <link linkend='ref-classes-package'><filename>package_*</filename></link>
3189 class using the
3190 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
3191 variable.
3192 The OpenEmbedded build system uses the first package type
3193 (e.g. DEB, RPM, or IPK) that appears with the variable
3194 <note>
3195 Files using the <filename>.tar</filename> format are
3196 never used as a substitute packaging format for DEB,
3197 RPM, and IPK formatted files for your image or SDK.
3198 </note>
3199 </para>
3200 </glossdef>
3201 </glossentry>
3202
3203 <glossentry id='var-IMAGE_POSTPROCESS_COMMAND'><glossterm>IMAGE_POSTPROCESS_COMMAND</glossterm>
3204 <glossdef>
3205 <para>
3206 Added by classes to run post processing commands once the
3207 OpenEmbedded build system has created the image.
3208 You can specify shell commands separated by semicolons:
3209 <literallayout class='monospaced'>
3210 IMAGE_POSTPROCESS_COMMAND += "&lt;shell_command&gt;; ... "
3211 </literallayout>
3212 If you need to pass the path to the root filesystem within
3213 the command, you can use
3214 <filename>${IMAGE_ROOTFS}</filename>, which points to
3215 the root filesystem image.
3216 </para>
3217 </glossdef>
3218 </glossentry>
3219
3220 <glossentry id='var-IMAGE_ROOTFS'><glossterm>IMAGE_ROOTFS</glossterm>
3221 <glossdef>
3222 <para>
3223 The location of the root filesystem while it is under
3224 construction (i.e. during <filename>do_rootfs</filename>).
3225 This variable is not configurable.
3226 Do not change it.
3227 </para>
3228 </glossdef>
3229 </glossentry>
3230
3231 <glossentry id='var-IMAGE_ROOTFS_EXTRA_SPACE'><glossterm>IMAGE_ROOTFS_EXTRA_SPACE</glossterm>
3232 <glossdef>
3233 <para>
3234 Defines additional free disk space created in the image in Kbytes.
3235 By default, this variable is set to "0".
3236 This free disk space is added to the image after the build system determines
3237 the image size as described in
3238 <filename><link linkend='var-IMAGE_ROOTFS_SIZE'>IMAGE_ROOTFS_SIZE</link></filename>.
3239 </para>
3240
3241 <para>
3242 This variable is particularly useful when you want to ensure that a
3243 specific amount of free disk space is available on a device after an image
3244 is installed and running.
3245 For example, to be sure 5 Gbytes of free disk space is available, set the
3246 variable as follows:
3247 <literallayout class='monospaced'>
3248 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3249 </literallayout>
3250 </para>
3251
3252 <para>
3253 For example, the Yocto Project Build Appliance specifically requests 40 Gbytes
3254 of extra space with the line:
3255 <literallayout class='monospaced'>
3256 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3257 </literallayout>
3258 </para>
3259 </glossdef>
3260 </glossentry>
3261
3262 <glossentry id='var-IMAGE_ROOTFS_SIZE'><glossterm>IMAGE_ROOTFS_SIZE</glossterm>
3263 <glossdef>
3264 <para>
3265 Defines the size in Kbytes for the generated image.
3266 The OpenEmbedded build system determines the final size for the generated
3267 image using an algorithm that takes into account the initial disk space used
3268 for the generated image, a requested size for the image, and requested
3269 additional free disk space to be added to the image.
3270 Programatically, the build system determines the final size of the
3271 generated image as follows:
3272 <literallayout class='monospaced'>
3273 if (image-du * overhead) &lt; rootfs-size:
3274 internal-rootfs-size = rootfs-size + xspace
3275 else:
3276 internal-rootfs-size = (image-du * overhead) + xspace
3277
3278 where:
3279
3280 image-du = Returned value of the du command on
3281 the image.
3282
3283 overhead = IMAGE_OVERHEAD_FACTOR
3284
3285 rootfs-size = IMAGE_ROOTFS_SIZE
3286
3287 internal-rootfs-size = Initial root filesystem
3288 size before any modifications.
3289
3290 xspace = IMAGE_ROOTFS_EXTRA_SPACE
3291 </literallayout>
3292 See the <link linkend='var-IMAGE_OVERHEAD_FACTOR'><filename>IMAGE_OVERHEAD_FACTOR</filename></link>
3293 and <link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'><filename>IMAGE_ROOTFS_EXTRA_SPACE</filename></link>
3294 variables for related information.
3295<!-- In the above example, <filename>overhead</filename> is defined by the
3296 <filename><link linkend='var-IMAGE_OVERHEAD_FACTOR'>IMAGE_OVERHEAD_FACTOR</link></filename>
3297 variable, <filename>xspace</filename> is defined by the
3298 <filename><link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'>IMAGE_ROOTFS_EXTRA_SPACE</link></filename>
3299 variable, and <filename>du</filename> is the results of the disk usage command
3300 on the initially generated image. -->
3301 </para>
3302 </glossdef>
3303 </glossentry>
3304
3305 <glossentry id='var-IMAGE_TYPEDEP'><glossterm>IMAGE_TYPEDEP</glossterm>
3306 <glossdef>
3307 <para>
3308 Specifies a dependency from one image type on another.
3309 Here is an example from the
3310 <link linkend='ref-classes-image-live'><filename>image-live</filename></link>
3311 class:
3312 <literallayout class='monospaced'>
3313 IMAGE_TYPEDEP_live = "ext3"
3314 </literallayout>
3315 In the previous example, the variable ensures that when
3316 "live" is listed with the
3317 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
3318 variable, the OpenEmbedded build system produces an
3319 <filename>ext3</filename> image first since one of the
3320 components of the live
3321 image is an <filename>ext3</filename>
3322 formatted partition containing the root
3323 filesystem.
3324 </para>
3325 </glossdef>
3326 </glossentry>
3327
3328 <glossentry id='var-IMAGE_TYPES'><glossterm>IMAGE_TYPES</glossterm>
3329 <glossdef>
3330 <para>
3331 Specifies the complete list of supported image types
3332 by default:
3333 <literallayout class='monospaced'>
3334 jffs2
3335 jffs2.sum
3336 cramfs
3337 ext2
3338 ext2.gz
3339 ext2.bz2
3340 ext3
3341 ext3.gz
3342 ext2.lzma
3343 btrfs
3344 live
3345 squashfs
3346 squashfs-xz
3347 ubi
3348 ubifs
3349 tar
3350 tar.gz
3351 tar.bz2
3352 tar.xz
3353 cpio
3354 cpio.gz
3355 cpio.xz
3356 cpio.lzma
3357 vmdk
3358 elf
3359 </literallayout>
3360 For more information on how these types of images, see
3361 <filename>meta/classes/image_types*.bbclass</filename>
3362 in the
3363 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
3364 </para>
3365 </glossdef>
3366 </glossentry>
3367
3368 <glossentry id='var-INC_PR'><glossterm>INC_PR</glossterm>
3369 <glossdef>
3370 <para>Helps define the recipe revision for recipes that share
3371 a common <filename>include</filename> file.
3372 You can think of this variable as part of the recipe revision
3373 as set from within an include file.</para>
3374 <para>Suppose, for example, you have a set of recipes that
3375 are used across several projects.
3376 And, within each of those recipes the revision
3377 (its <link linkend='var-PR'><filename>PR</filename></link>
3378 value) is set accordingly.
3379 In this case, when the revision of those recipes changes,
3380 the burden is on you to find all those recipes and
3381 be sure that they get changed to reflect the updated
3382 version of the recipe.
3383 In this scenario, it can get complicated when recipes
3384 that are used in many places and provide common functionality
3385 are upgraded to a new revision.</para>
3386 <para>A more efficient way of dealing with this situation is
3387 to set the <filename>INC_PR</filename> variable inside
3388 the <filename>include</filename> files that the recipes
3389 share and then expand the <filename>INC_PR</filename>
3390 variable within the recipes to help
3391 define the recipe revision.
3392 </para>
3393 <para>
3394 The following provides an example that shows how to use
3395 the <filename>INC_PR</filename> variable
3396 given a common <filename>include</filename> file that
3397 defines the variable.
3398 Once the variable is defined in the
3399 <filename>include</filename> file, you can use the
3400 variable to set the <filename>PR</filename> values in
3401 each recipe.
3402 You will notice that when you set a recipe's
3403 <filename>PR</filename> you can provide more granular
3404 revisioning by appending values to the
3405 <filename>INC_PR</filename> variable:
3406 <literallayout class='monospaced'>
3407recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
3408recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
3409recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
3410recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
3411 </literallayout>
3412 The first line of the example establishes the baseline
3413 revision to be used for all recipes that use the
3414 <filename>include</filename> file.
3415 The remaining lines in the example are from individual
3416 recipes and show how the <filename>PR</filename> value
3417 is set.</para>
3418 </glossdef>
3419 </glossentry>
3420
3421 <glossentry id='var-INCOMPATIBLE_LICENSE'><glossterm>INCOMPATIBLE_LICENSE</glossterm>
3422 <glossdef>
3423 <para>
3424 Specifies a space-separated list of license names
3425 (as they would appear in
3426 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>)
3427 that should be excluded from the build.
3428 Recipes that provide no alternatives to listed incompatible
3429 licenses are not built.
3430 Packages that are individually licensed with the specified
3431 incompatible licenses will be deleted.
3432 </para>
3433
3434 <note>
3435 This functionality is only regularly tested using
3436 the following setting:
3437 <literallayout class='monospaced'>
3438 INCOMPATIBLE_LICENSE = "GPLv3"
3439 </literallayout>
3440 Although you can use other settings, you might be required
3441 to remove dependencies on or provide alternatives to
3442 components that are required to produce a functional system
3443 image.
3444 </note>
3445 </glossdef>
3446 </glossentry>
3447
3448 <glossentry id='var-INHIBIT_DEFAULT_DEPS'><glossterm>INHIBIT_DEFAULT_DEPS</glossterm>
3449 <glossdef>
3450 <para>
3451 Prevents the default dependencies, namely the C compiler
3452 and standard C library (libc), from being added to
3453 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>.
3454 This variable is usually used within recipes that do not
3455 require any compilation using the C compiler.
3456 </para>
3457
3458 <para>
3459 Set the variable to "1" to prevent the default dependencies
3460 from being added.
3461 </para>
3462 </glossdef>
3463 </glossentry>
3464
3465 <glossentry id='var-INHIBIT_PACKAGE_STRIP'><glossterm>INHIBIT_PACKAGE_STRIP</glossterm>
3466 <glossdef>
3467 <para>
3468 If set to "1", causes the build to not strip binaries in resulting packages.
3469 </para>
3470 </glossdef>
3471 </glossentry>
3472
3473 <glossentry id='var-INHERIT'><glossterm>INHERIT</glossterm>
3474 <glossdef>
3475 <para>
3476 Causes the named class to be inherited at
3477 this point during parsing.
3478 The variable is only valid in configuration files.
3479 </para>
3480 </glossdef>
3481 </glossentry>
3482
3483 <glossentry id='var-INHERIT_DISTRO'><glossterm>INHERIT_DISTRO</glossterm>
3484 <glossdef>
3485 <para>
3486 Lists classes that will be inherited at the
3487 distribution level.
3488 It is unlikely that you want to edit this variable.
3489 </para>
3490
3491 <para>
3492 The default value of the variable is set as follows in the
3493 <filename>meta/conf/distro/defaultsetup.conf</filename>
3494 file:
3495 <literallayout class='monospaced'>
3496 INHERIT_DISTRO ?= "debian devshell sstate license"
3497 </literallayout>
3498 </para>
3499 </glossdef>
3500 </glossentry>
3501
3502 <glossentry id='var-INITRAMFS_FSTYPES'><glossterm>INITRAMFS_FSTYPES</glossterm>
3503 <glossdef>
3504 <para>
3505 Defines the format for the output image of an initial
3506 RAM disk (initramfs), which is used during boot.
3507 Supported formats are the same as those supported by the
3508 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
3509 variable.
3510 </para>
3511 </glossdef>
3512 </glossentry>
3513
3514 <glossentry id='var-INITRAMFS_IMAGE'><glossterm>INITRAMFS_IMAGE</glossterm>
3515 <glossdef>
3516 <para>
3517 Causes the OpenEmbedded build system to build an additional
3518 recipe as a dependency to your root filesystem recipe
3519 (e.g. <filename>core-image-sato</filename>).
3520 The additional recipe is used to create an initial RAM disk
3521 (initramfs) that might be needed during the initial boot of
3522 the target system to accomplish such things as loading
3523 kernel modules prior to mounting the root file system.
3524 </para>
3525
3526 <para>
3527 When you set the variable, specify the name of the
3528 initramfs you want created.
3529 The following example, which is set in the
3530 <filename>local.conf</filename> configuration file, causes
3531 a separate recipe to be created that results in an
3532 initramfs image named
3533 <filename>core-image-sato-initramfs.bb</filename> to be
3534 created:
3535 <literallayout class='monospaced'>
3536 INITRAMFS_IMAGE = "core-image-minimal-initramfs"
3537 </literallayout>
3538 By default, the
3539 <link linkend='ref-classes-kernel'><filename>kernel</filename></link>
3540 class sets this variable to a null string as follows:
3541 <literallayout class='monospaced'>
3542 INITRAMFS_IMAGE = ""
3543 </literallayout>
3544 </para>
3545
3546 <para>
3547 See the
3548 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-yocto/conf/local.conf.sample.extended'><filename>local.conf.sample.extended</filename></ulink>
3549 file for additional information.
3550 You can also reference the
3551 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/kernel.bbclass'><filename>kernel.bbclass</filename></ulink>
3552 file to see how the variable is used.
3553 </para>
3554 </glossdef>
3555 </glossentry>
3556
3557 <glossentry id='var-INITRAMFS_IMAGE_BUNDLE'><glossterm>INITRAMFS_IMAGE_BUNDLE</glossterm>
3558 <glossdef>
3559 <para>
3560 Controls whether or not the image recipe specified by
3561 <link linkend='var-INITRAMFS_IMAGE'><filename>INITRAMFS_IMAGE</filename></link>
3562 is run through an extra pass during kernel compilation
3563 in order to build a single binary that contains both the
3564 kernel image and the initial RAM disk (initramfs).
3565 Using an extra compilation pass ensures that when a kernel
3566 attempts to use an initramfs, it does not encounter
3567 circular dependencies should the initramfs include kernel
3568 modules.
3569 </para>
3570
3571 <para>
3572 The combined binary is deposited into the
3573 <filename>tmp/deploy</filename> directory, which is part
3574 of the
3575 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
3576 </para>
3577
3578 <para>
3579 Setting the variable to "1" in a configuration file causes
3580 the OpenEmbedded build system to make the extra pass during
3581 kernel compilation:
3582 <literallayout class='monospaced'>
3583 INITRAMFS_IMAGE_BUNDLE = "1"
3584 </literallayout>
3585 By default, the
3586 <link linkend='ref-classes-kernel'><filename>kernel</filename></link>
3587 class sets this variable to a null string as follows:
3588 <literallayout class='monospaced'>
3589 INITRAMFS_IMAGE_BUNDLE = ""
3590 </literallayout>
3591 <note>
3592 You must set the
3593 <filename>INITRAMFS_IMAGE_BUNDLE</filename> variable in
3594 a configuration file.
3595 You cannot set the variable in a recipe file.
3596 </note>
3597 See the
3598 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-yocto/conf/local.conf.sample.extended'><filename>local.conf.sample.extended</filename></ulink>
3599 file for additional information.
3600 </para>
3601 </glossdef>
3602 </glossentry>
3603
3604 <glossentry id='var-INITRD'><glossterm>INITRD</glossterm>
3605 <glossdef>
3606 <para>
3607 Indicates a filesystem image to use as an initial RAM
3608 disk (<filename>initrd</filename>).
3609 </para>
3610
3611 <para>
3612 The <filename>INITRD</filename> variable is an optional
3613 variable used with the
3614 <link linkend='ref-classes-bootimg'><filename>buildimg</filename></link>
3615 class.
3616 </para>
3617 </glossdef>
3618 </glossentry>
3619
3620 <glossentry id='var-INITSCRIPT_NAME'><glossterm>INITSCRIPT_NAME</glossterm>
3621 <glossdef>
3622 <para>
3623 The filename of the initialization script as installed to
3624 <filename>${sysconfdir}/init.d</filename>.
3625 </para>
3626 <para>
3627 This variable is used in recipes when using <filename>update-rc.d.bbclass</filename>.
3628 The variable is mandatory.
3629 </para>
3630 </glossdef>
3631 </glossentry>
3632
3633 <glossentry id='var-INITSCRIPT_PACKAGES'><glossterm>INITSCRIPT_PACKAGES</glossterm>
3634 <glossdef>
3635 <para>
3636 A list of the packages that contain initscripts.
3637 If multiple packages are specified, you need to append the package name
3638 to the other <filename>INITSCRIPT_*</filename> as an override.</para>
3639 <para>
3640 This variable is used in recipes when using <filename>update-rc.d.bbclass</filename>.
3641 The variable is optional and defaults to the
3642 <link linkend='var-PN'><filename>PN</filename></link> variable.
3643 </para>
3644 </glossdef>
3645 </glossentry>
3646
3647 <glossentry id='var-INITSCRIPT_PARAMS'><glossterm>INITSCRIPT_PARAMS</glossterm>
3648 <glossdef>
3649 <para>
3650 Specifies the options to pass to <filename>update-rc.d</filename>.
3651 Here is an example:
3652 <literallayout class='monospaced'>
3653 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
3654 </literallayout>
3655 In this example, the script has a runlevel of 99,
3656 starts the script in initlevels 2 and 5, and
3657 stops the script in levels 0, 1 and 6.
3658 </para>
3659 <para>
3660 The variable is mandatory and is used in recipes when using
3661 <filename>update-rc.d.bbclass</filename>.
3662 </para>
3663 </glossdef>
3664 </glossentry>
3665
3666 <glossentry id='var-INSANE_SKIP'><glossterm>INSANE_SKIP</glossterm>
3667 <glossdef>
3668 <para>
3669 Specifies the QA checks to skip for a specific package
3670 within a recipe.
3671 For example, to skip the check for symbolic link
3672 <filename>.so</filename> files in the main package of a
3673 recipe, add the following to the recipe.
3674 The package name override must be used, which in this
3675 example is <filename>${PN}</filename>:
3676 <literallayout class='monospaced'>
3677 INSANE_SKIP_${PN} += "dev-so"
3678 </literallayout>
3679 </para>
3680 <para>
3681 See the "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
3682 section for a list of the valid QA checks you can
3683 specify using this variable.
3684 </para>
3685 </glossdef>
3686 </glossentry>
3687
3688 <glossentry id='var-IPK_FEED_URIS'><glossterm>IPK_FEED_URIS</glossterm>
3689 <glossdef>
3690 <para>
3691 When the IPK backend is in use and package management
3692 is enabled on the target, you can use this variable to
3693 set up <filename>opkg</filename> in the target image
3694 to point to package feeds on a nominated server.
3695 Once the feed is established, you can perform
3696 installations or upgrades using the package manager
3697 at runtime.
3698 </para>
3699 </glossdef>
3700 </glossentry>
3701
3702<!--
3703 <glossentry id='var-INTERCEPT_DIR'><glossterm>INTERCEPT_DIR</glossterm>
3704 <glossdef>
3705 <para>
3706 An environment variable that defines the directory where
3707 post installation hooks are installed for the
3708 post install environment.
3709 This variable is fixed as follows:
3710 <literallayout class='monospaced'>
3711 ${WORKDIR}/intercept_scripts
3712 </literallayout>
3713 </para>
3714
3715 <para>
3716 After installation of a target's root filesystem,
3717 post installation scripts, which are essentially bash scripts,
3718 are all executed just a single time.
3719 Limiting execution of these scripts minimizes installation
3720 time that would be lengthened due to certain packages
3721 triggering redundant operations.
3722 For example, consider the installation of font packages
3723 as a common example.
3724 Without limiting the execution of post installation scripts,
3725 all font directories would be rescanned to create the
3726 cache after each individual font package was installed.
3727 </para>
3728
3729 <para>
3730 Do not edit the <filename>INTERCEPT_DIR</filename>
3731 variable.
3732 </para>
3733 </glossdef>
3734 </glossentry>
3735-->
3736
3737 </glossdiv>
3738
3739<!-- <glossdiv id='var-glossary-j'><title>J</title>-->
3740<!-- </glossdiv>-->
3741
3742 <glossdiv id='var-glossary-k'><title>K</title>
3743
3744 <glossentry id='var-KARCH'><glossterm>KARCH</glossterm>
3745 <glossdef>
3746 <para>
3747 Defines the kernel architecture used when assembling
3748 the configuration.
3749 Architectures supported for this release are:
3750 <literallayout class='monospaced'>
3751 powerpc
3752 i386
3753 x86_64
3754 arm
3755 qemu
3756 mips
3757 </literallayout>
3758 </para>
3759
3760 <para>
3761 You define the <filename>KARCH</filename> variable in the
3762 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#bsp-descriptions'>BSP Descriptions</ulink>.
3763 </para>
3764 </glossdef>
3765 </glossentry>
3766
3767 <glossentry id='var-KBRANCH'><glossterm>KBRANCH</glossterm>
3768 <glossdef>
3769 <para>
3770 A regular expression used by the build process to explicitly
3771 identify the kernel branch that is validated, patched
3772 and configured during a build.
3773 The <filename>KBRANCH</filename> variable is optional.
3774 You can use it to trigger checks to ensure the exact kernel
3775 branch you want is being used by the build process.
3776 </para>
3777
3778 <para>
3779 Values for this variable are set in the kernel's recipe
3780 file and the kernel's append file.
3781 For example, if you are using the Yocto Project kernel that
3782 is based on the Linux 3.10 kernel, the kernel recipe file
3783 is the
3784 <filename>meta/recipes-kernel/linux/linux-yocto_3.10.bb</filename>
3785 file.
3786 Following is the default value for <filename>KBRANCH</filename>
3787 and the default override for the architectures the Yocto
3788 Project supports:
3789 <literallayout class='monospaced'>
3790 KBRANCH_DEFAULT = "standard/base"
3791 KBRANCH = "${KBRANCH_DEFAULT}"
3792 </literallayout>
3793 This branch exists in the <filename>linux-yocto-3.10</filename>
3794 kernel Git repository
3795 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/linux-yocto-3.10/refs/heads'></ulink>.
3796 </para>
3797
3798 <para>
3799 This variable is also used from the kernel's append file
3800 to identify the kernel branch specific to a particular
3801 machine or target hardware.
3802 The kernel's append file is located in the BSP layer for
3803 a given machine.
3804 For example, the kernel append file for the Crown Bay BSP is in the
3805 <filename>meta-intel</filename> Git repository and is named
3806 <filename>meta-crownbay/recipes-kernel/linux/linux-yocto_3.10.bbappend</filename>.
3807 Here are the related statements from the append file:
3808 <literallayout class='monospaced'>
3809 COMPATIBLE_MACHINE_crownbay = "crownbay"
3810 KMACHINE_crownbay = "crownbay"
3811 KBRANCH_crownbay = "standard/crownbay"
3812 KERNEL_FEATURES_append_crownbay = " features/drm-emgd/drm-emgd-1.18 cfg/vesafb"
3813
3814 COMPATIBLE_MACHINE_crownbay-noemgd = "crownbay-noemgd"
3815 KMACHINE_crownbay-noemgd = "crownbay"
3816 KBRANCH_crownbay-noemgd = "standard/crownbay"
3817 KERNEL_FEATURES_append_crownbay-noemgd = " cfg/vesafb"
3818 </literallayout>
3819 The <filename>KBRANCH_*</filename> statements identify
3820 the kernel branch to use when building for the Crown
3821 Bay BSP.
3822 In this case there are two identical statements: one
3823 for each type of Crown Bay machine.
3824 </para>
3825 </glossdef>
3826 </glossentry>
3827
3828 <glossentry id='var-KBRANCH_DEFAULT'><glossterm>KBRANCH_DEFAULT</glossterm>
3829 <glossdef>
3830 <para>
3831 Defines the Linux kernel source repository's default
3832 branch used to build the Linux kernel.
3833 The <filename>KBRANCH_DEFAULT</filename> value is
3834 the default value for
3835 <link linkend='var-KBRANCH'><filename>KBRANCH</filename></link>.
3836 Unless you specify otherwise,
3837 <filename>KBRANCH_DEFAULT</filename> initializes to
3838 "master".
3839 </para>
3840 </glossdef>
3841 </glossentry>
3842
3843 <glossentry id='var-KERNEL_EXTRA_ARGS'><glossterm>KERNEL_EXTRA_ARGS</glossterm>
3844 <glossdef>
3845 <para>
3846 Specifies additional <filename>make</filename>
3847 command-line arguments the OpenEmbedded build system
3848 passes on when compiling the kernel.
3849 </para>
3850 </glossdef>
3851 </glossentry>
3852
3853 <glossentry id='var-KERNEL_FEATURES'><glossterm>KERNEL_FEATURES</glossterm>
3854 <glossdef>
3855 <para>Includes additional metadata from the Yocto Project kernel Git repository.
3856 In the OpenEmbedded build system, the default Board Support Packages (BSPs)
3857 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
3858 is provided through
3859 the <link linkend='var-KMACHINE'><filename>KMACHINE</filename></link>
3860 and <link linkend='var-KBRANCH'><filename>KBRANCH</filename></link> variables.
3861 You can use the <filename>KERNEL_FEATURES</filename> variable to further
3862 add metadata for all BSPs.</para>
3863 <para>The metadata you add through this variable includes config fragments and
3864 features descriptions,
3865 which usually includes patches as well as config fragments.
3866 You typically override the <filename>KERNEL_FEATURES</filename> variable
3867 for a specific machine.
3868 In this way, you can provide validated, but optional, sets of kernel
3869 configurations and features.</para>
3870 <para>For example, the following adds <filename>netfilter</filename> to all
3871 the Yocto Project kernels and adds sound support to the <filename>qemux86</filename>
3872 machine:
3873 <literallayout class='monospaced'>
3874 # Add netfilter to all linux-yocto kernels
3875 KERNEL_FEATURES="features/netfilter"
3876
3877 # Add sound support to the qemux86 machine
3878 KERNEL_FEATURES_append_qemux86=" cfg/sound"
3879 </literallayout></para>
3880 </glossdef>
3881 </glossentry>
3882
3883 <glossentry id='var-KERNEL_IMAGE_BASE_NAME'><glossterm>KERNEL_IMAGE_BASE_NAME</glossterm>
3884 <glossdef>
3885 <para>
3886 The base name of the kernel image.
3887 This variable is set in the
3888 <link linkend='ref-classes-kernel'>kernel</link> class
3889 as follows:
3890 <literallayout class='monospaced'>
3891 KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
3892 </literallayout>
3893 See the
3894 <link linkend='var-KERNEL_IMAGETYPE'><filename>KERNEL_IMAGETYPE</filename></link>,
3895 <link linkend='var-PKGE'><filename>PKGE</filename></link>,
3896 <link linkend='var-PKGV'><filename>PKGV</filename></link>,
3897 <link linkend='var-PKGR'><filename>PKGR</filename></link>,
3898 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
3899 and
3900 <link linkend='var-DATETIME'><filename>DATETIME</filename></link>
3901 variables for additional information.
3902 </para>
3903 </glossdef>
3904 </glossentry>
3905
3906 <glossentry id='var-KERNEL_IMAGETYPE'><glossterm>KERNEL_IMAGETYPE</glossterm>
3907 <glossdef>
3908 <para>The type of kernel to build for a device, usually set by the
3909 machine configuration files and defaults to "zImage".
3910 This variable is used
3911 when building the kernel and is passed to <filename>make</filename> as the target to
3912 build.</para>
3913 </glossdef>
3914 </glossentry>
3915
3916 <glossentry id='var-KERNEL_PATH'><glossterm>KERNEL_PATH</glossterm>
3917 <glossdef>
3918 <para>
3919 The location of the kernel sources.
3920 This variable is set to the value of the
3921 <link linkend='var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></link>
3922 within the <filename>module.bbclass</filename> class.
3923 For information on how this variable is used, see the
3924 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
3925 section.
3926 </para>
3927
3928 <para>
3929 To help maximize compatibility with out-of-tree drivers
3930 used to build modules, the OpenEmbedded build system also
3931 recognizes and uses the
3932 <link linkend='var-KERNEL_SRC'><filename>KERNEL_SRC</filename></link>
3933 variable, which is identical to the
3934 <filename>KERNEL_PATH</filename> variable.
3935 Both variables are common variables used by external
3936 Makefiles to point to the kernel source directory.
3937 </para>
3938 </glossdef>
3939 </glossentry>
3940
3941 <glossentry id='var-KERNEL_SRC'><glossterm>KERNEL_SRC</glossterm>
3942 <glossdef>
3943 <para>
3944 The location of the kernel sources.
3945 This variable is set to the value of the
3946 <link linkend='var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></link>
3947 within the <filename>module.bbclass</filename> class.
3948 For information on how this variable is used, see the
3949 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
3950 section.
3951 </para>
3952
3953 <para>
3954 To help maximize compatibility with out-of-tree drivers
3955 used to build modules, the OpenEmbedded build system also
3956 recognizes and uses the
3957 <link linkend='var-KERNEL_PATH'><filename>KERNEL_PATH</filename></link>
3958 variable, which is identical to the
3959 <filename>KERNEL_SRC</filename> variable.
3960 Both variables are common variables used by external
3961 Makefiles to point to the kernel source directory.
3962 </para>
3963 </glossdef>
3964 </glossentry>
3965
3966 <glossentry id='var-KFEATURE_DESCRIPTION'><glossterm>KFEATURE_DESCRIPTION</glossterm>
3967 <glossdef>
3968 <para>
3969 Provides a short description of a configuration fragment.
3970 You use this variable in the <filename>.scc</filename>
3971 file that describes a configuration fragment file.
3972 Here is the variable used in a file named
3973 <filename>smp.scc</filename> to describe SMP being
3974 enabled:
3975 <literallayout class='monospaced'>
3976 define KFEATURE_DESCRIPTION "Enable SMP"
3977 </literallayout>
3978 </para>
3979 </glossdef>
3980 </glossentry>
3981
3982 <glossentry id='var-KMACHINE'><glossterm>KMACHINE</glossterm>
3983 <glossdef>
3984 <para>
3985 The machine as known by the kernel.
3986 Sometimes the machine name used by the kernel does not match the machine name
3987 used by the OpenEmbedded build system.
3988 For example, the machine name that the OpenEmbedded build system understands as
3989 <filename>qemuarm</filename> goes by a different name in the Linux Yocto kernel.
3990 The kernel understands that machine as <filename>arm_versatile926ejs</filename>.
3991 For cases like these, the <filename>KMACHINE</filename> variable maps the
3992 kernel machine name to the OpenEmbedded build system machine name.
3993 </para>
3994
3995 <para>
3996 Kernel machine names are initially defined in the
3997 Yocto Linux Kernel's <filename>meta</filename> branch.
3998 From the <filename>meta</filename> branch, look in
3999 the <filename>meta/cfg/kernel-cache/bsp/&lt;bsp_name&gt;/&lt;bsp-name&gt;-&lt;kernel-type&gt;.scc</filename> file.
4000 For example, from the <filename>meta</filename> branch in the
4001 <filename>linux-yocto-3.0</filename> kernel, the
4002 <filename>meta/cfg/kernel-cache/bsp/cedartrail/cedartrail-standard.scc</filename> file
4003 has the following:
4004 <literallayout class='monospaced'>
4005 define KMACHINE cedartrail
4006 define KTYPE standard
4007 define KARCH i386
4008
4009 include ktypes/standard
4010 branch cedartrail
4011
4012 include cedartrail.scc
4013 </literallayout>
4014 You can see that the kernel understands the machine name for
4015 the Cedar Trail Board Support Package (BSP) as
4016 <filename>cedartrail</filename>.
4017 </para>
4018
4019 <para>
4020 If you look in the Cedar Trail BSP layer in the
4021 <filename>meta-intel</filename>
4022 <ulink url='&YOCTO_DOCS_DEV_URL;#source-repositories'>Source Repositories</ulink>
4023 at <filename>meta-cedartrail/recipes-kernel/linux/linux-yocto_3.0.bbappend</filename>,
4024 you will find the following statements among others:
4025 <literallayout class='monospaced'>
4026 COMPATIBLE_MACHINE_cedartrail = "cedartrail"
4027 KMACHINE_cedartrail = "cedartrail"
4028 KBRANCH_cedartrail = "yocto/standard/cedartrail"
4029 KERNEL_FEATURES_append_cedartrail += "bsp/cedartrail/cedartrail-pvr-merge.scc"
4030 KERNEL_FEATURES_append_cedartrail += "cfg/efi-ext.scc"
4031
4032 COMPATIBLE_MACHINE_cedartrail-nopvr = "cedartrail"
4033 KMACHINE_cedartrail-nopvr = "cedartrail"
4034 KBRANCH_cedartrail-nopvr = "yocto/standard/cedartrail"
4035 KERNEL_FEATURES_append_cedartrail-nopvr += " cfg/smp.scc"
4036 </literallayout>
4037 The <filename>KMACHINE</filename> statements in the kernel's append file make sure that
4038 the OpenEmbedded build system and the Yocto Linux kernel understand the same machine
4039 names.
4040 </para>
4041
4042 <para>
4043 This append file uses two <filename>KMACHINE</filename> statements.
4044 The first is not really necessary but does ensure that the machine known to the
4045 OpenEmbedded build system as <filename>cedartrail</filename> maps to the machine
4046 in the kernel also known as <filename>cedartrail</filename>:
4047 <literallayout class='monospaced'>
4048 KMACHINE_cedartrail = "cedartrail"
4049 </literallayout>
4050 </para>
4051
4052 <para>
4053 The second statement is a good example of why the <filename>KMACHINE</filename> variable
4054 is needed.
4055 In this example, the OpenEmbedded build system uses the <filename>cedartrail-nopvr</filename>
4056 machine name to refer to the Cedar Trail BSP that does not support the proprietary
4057 PowerVR driver.
4058 The kernel, however, uses the machine name <filename>cedartrail</filename>.
4059 Thus, the append file must map the <filename>cedartrail-nopvr</filename> machine name to
4060 the kernel's <filename>cedartrail</filename> name:
4061 <literallayout class='monospaced'>
4062 KMACHINE_cedartrail-nopvr = "cedartrail"
4063 </literallayout>
4064 </para>
4065
4066 <para>
4067 BSPs that ship with the Yocto Project release provide all mappings between the Yocto
4068 Project kernel machine names and the OpenEmbedded machine names.
4069 Be sure to use the <filename>KMACHINE</filename> if you create a BSP and the machine
4070 name you use is different than that used in the kernel.
4071 </para>
4072 </glossdef>
4073 </glossentry>
4074
4075 <glossentry id='var-KTYPE'><glossterm>KTYPE</glossterm>
4076 <glossdef>
4077 <para>
4078 Defines the kernel type to be used in assembling the
4079 configuration.
4080 The linux-yocto recipes define "standard", "tiny",
4081 and "preempt-rt" kernel types.
4082 See the
4083 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#kernel-types'>Kernel Types</ulink>"
4084 section in the Yocto Project Linux Kernel Development
4085 Manual for more information on kernel types.
4086 </para>
4087
4088 <para>
4089 You define the <filename>KTYPE</filename> variable in the
4090 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#bsp-descriptions'>BSP Descriptions</ulink>.
4091 The value you use must match the value used for the
4092 <link linkend='var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></link>
4093 value used by the kernel recipe.
4094 </para>
4095 </glossdef>
4096 </glossentry>
4097 </glossdiv>
4098
4099 <glossdiv id='var-glossary-l'><title>L</title>
4100
4101 <glossentry id='var-LABELS'><glossterm>LABELS</glossterm>
4102 <glossdef>
4103 <para>
4104 Provides a list of targets for automatic configuration.
4105 </para>
4106
4107 <para>
4108 See the
4109 <link linkend='ref-classes-grub-efi'><filename>grub-efi</filename></link>
4110 class for more information on how this variable is used.
4111 </para>
4112 </glossdef>
4113 </glossentry>
4114
4115 <glossentry id='var-LAYERDEPENDS'><glossterm>LAYERDEPENDS</glossterm>
4116 <glossdef>
4117 <para>Lists the layers that this recipe depends upon, separated by spaces.
4118 Optionally, you can specify a specific layer version for a dependency
4119 by adding it to the end of the layer name with a colon, (e.g. "anotherlayer:3"
4120 to be compared against
4121 <link linkend='var-LAYERVERSION'><filename>LAYERVERSION</filename></link><filename>_anotherlayer</filename>
4122 in this case).
4123 An error will be produced if any dependency is missing or
4124 the version numbers do not match exactly (if specified).
4125 This variable is used in the <filename>conf/layer.conf</filename> file
4126 and must be suffixed with the name of the specific layer (e.g.
4127 <filename>LAYERDEPENDS_mylayer</filename>).</para>
4128 </glossdef>
4129 </glossentry>
4130
4131 <glossentry id='var-LAYERDIR'><glossterm>LAYERDIR</glossterm>
4132 <glossdef>
4133 <para>When used inside the <filename>layer.conf</filename> configuration
4134 file, this variable provides the path of the current layer.
4135 This variable is not available outside of <filename>layer.conf</filename>
4136 and references are expanded immediately when parsing of the file completes.</para>
4137 </glossdef>
4138 </glossentry>
4139
4140 <glossentry id='var-LAYERVERSION'><glossterm>LAYERVERSION</glossterm>
4141 <glossdef>
4142 <para>Optionally specifies the version of a layer as a single number.
4143 You can use this within
4144 <link linkend='var-LAYERDEPENDS'><filename>LAYERDEPENDS</filename></link>
4145 for another layer in order to depend on a specific version
4146 of the layer.
4147 This variable is used in the <filename>conf/layer.conf</filename> file
4148 and must be suffixed with the name of the specific layer (e.g.
4149 <filename>LAYERVERSION_mylayer</filename>).</para>
4150 </glossdef>
4151 </glossentry>
4152
4153 <glossentry id='var-LEAD_SONAME'><glossterm>LEAD_SONAME</glossterm>
4154 <glossdef>
4155 <para>
4156 Specifies the lead (or primary) compiled library file
4157 (<filename>.so</filename>) that the
4158 <link linkend='ref-classes-debian'><filename>debian</filename></link>
4159 class applies its naming policy to given a recipe that
4160 packages multiple libraries.
4161 </para>
4162
4163 <para>
4164 This variable works in conjunction with the
4165 <filename>debian</filename> class.
4166 </para>
4167 </glossdef>
4168 </glossentry>
4169
4170 <glossentry id='var-LIC_FILES_CHKSUM'><glossterm>LIC_FILES_CHKSUM</glossterm>
4171 <glossdef>
4172 <para>Checksums of the license text in the recipe source code.</para>
4173 <para>This variable tracks changes in license text of the source
4174 code files.
4175 If the license text is changed, it will trigger a build
4176 failure, which gives the developer an opportunity to review any
4177 license change.</para>
4178 <para>
4179 This variable must be defined for all recipes (unless
4180 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
4181 is set to "CLOSED")</para>
4182 <para>For more information, see the
4183 <link linkend='usingpoky-configuring-LIC_FILES_CHKSUM'>
4184 Tracking License Changes</link> section</para>
4185 </glossdef>
4186 </glossentry>
4187
4188 <glossentry id='var-LICENSE'><glossterm>LICENSE</glossterm>
4189 <glossdef>
4190 <para>
4191 The list of source licenses for the recipe.
4192 Follow these rules:
4193 <itemizedlist>
4194 <listitem><para>Do not use spaces within individual
4195 license names.</para></listitem>
4196 <listitem><para>Separate license names using
4197 | (pipe) when there is a choice between licenses.
4198 </para></listitem>
4199 <listitem><para>Separate license names using
4200 &amp; (ampersand) when multiple licenses exist
4201 that cover different parts of the source.
4202 </para></listitem>
4203 <listitem><para>You can use spaces between license
4204 names.</para></listitem>
4205 <listitem><para>For standard licenses, use the names
4206 of the files in
4207 <filename>meta/files/common-licenses/</filename>
4208 or the
4209 <link linkend='var-SPDXLICENSEMAP'><filename>SPDXLICENSEMAP</filename></link>
4210 flag names defined in
4211 <filename>meta/conf/licenses.conf</filename>.
4212 </para></listitem>
4213 </itemizedlist>
4214 </para>
4215
4216 <para>
4217 Here are some examples:
4218 <literallayout class='monospaced'>
4219 LICENSE = "LGPLv2.1 | GPLv3"
4220 LICENSE = "MPL-1 &amp; LGPLv2.1"
4221 LICENSE = "GPLv2+"
4222 </literallayout>
4223 The first example is from the recipes for Qt, which the user
4224 may choose to distribute under either the LGPL version
4225 2.1 or GPL version 3.
4226 The second example is from Cairo where two licenses cover
4227 different parts of the source code.
4228 The final example is from <filename>sysstat</filename>,
4229 which presents a single license.
4230 </para>
4231
4232 <para>
4233 You can also specify licenses on a per-package basis to
4234 handle situations where components of the output have
4235 different licenses.
4236 For example, a piece of software whose code is
4237 licensed under GPLv2 but has accompanying documentation
4238 licensed under the GNU Free Documentation License 1.2 could
4239 be specified as follows:
4240 <literallayout class='monospaced'>
4241 LICENSE = "GFDL-1.2 &amp; GPLv2"
4242 LICENSE_${PN} = "GPLv2"
4243 LICENSE_${PN}-doc = "GFDL-1.2"
4244 </literallayout>
4245 </para>
4246 </glossdef>
4247 </glossentry>
4248
4249 <glossentry id='var-LICENSE_PATH'><glossterm>LICENSE_PATH</glossterm>
4250 <glossdef>
4251 <para>Path to additional licenses used during the build.
4252 By default, the OpenEmbedded build system uses <filename>COMMON_LICENSE_DIR</filename>
4253 to define the directory that holds common license text used during the build.
4254 The <filename>LICENSE_PATH</filename> variable allows you to extend that
4255 location to other areas that have additional licenses:
4256 <literallayout class='monospaced'>
4257 LICENSE_PATH += "/path/to/additional/common/licenses"
4258 </literallayout></para>
4259 </glossdef>
4260 </glossentry>
4261
4262 <glossentry id='var-LINUX_KERNEL_TYPE'><glossterm>LINUX_KERNEL_TYPE</glossterm>
4263 <glossdef>
4264 <para>
4265 Defines the kernel type to be used in assembling the
4266 configuration.
4267 The linux-yocto recipes define "standard", "tiny", and
4268 "preempt-rt" kernel types.
4269 See the
4270 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#kernel-types'>Kernel Types</ulink>"
4271 section in the Yocto Project Linux Kernel Development
4272 Manual for more information on kernel types.
4273 </para>
4274
4275 <para>
4276 If you do not specify a
4277 <filename>LINUX_KERNEL_TYPE</filename>, it defaults to
4278 "standard".
4279 Together with
4280 <link linkend='var-KMACHINE'><filename>KMACHINE</filename></link>,
4281 the <filename>LINUX_KERNEL_TYPE</filename> variable
4282 defines the search
4283 arguments used by the kernel tools to find the appropriate
4284 description within the kernel
4285 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
4286 with which to build out the sources and configuration.
4287 </para>
4288 </glossdef>
4289 </glossentry>
4290
4291 <glossentry id='var-LINUX_VERSION'><glossterm>LINUX_VERSION</glossterm>
4292 <glossdef>
4293 <para>The Linux version from <filename>kernel.org</filename>
4294 on which the Linux kernel image being built using the
4295 OpenEmbedded build system is based.
4296 You define this variable in the kernel recipe.
4297 For example, the <filename>linux-yocto-3.4.bb</filename>
4298 kernel recipe found in
4299 <filename>meta/recipes-kernel/linux</filename>
4300 defines the variables as follows:
4301 <literallayout class='monospaced'>
4302 LINUX_VERSION ?= "3.4.24"
4303 </literallayout>
4304 The <filename>LINUX_VERSION</filename> variable is used to
4305 define <link linkend='var-PV'><filename>PV</filename></link>
4306 for the recipe:
4307 <literallayout class='monospaced'>
4308 PV = "${LINUX_VERSION}+git${SRCPV}"
4309 </literallayout></para>
4310 </glossdef>
4311 </glossentry>
4312
4313 <glossentry id='var-LINUX_VERSION_EXTENSION'><glossterm>LINUX_VERSION_EXTENSION</glossterm>
4314 <glossdef>
4315 <para>A string extension compiled into the version
4316 string of the Linux kernel built with the OpenEmbedded
4317 build system.
4318 You define this variable in the kernel recipe.
4319 For example, the linux-yocto kernel recipes all define
4320 the variable as follows:
4321 <literallayout class='monospaced'>
4322 LINUX_VERSION_EXTENSION ?= "-yocto-${<link linkend='var-LINUX_KERNEL_TYPE'>LINUX_KERNEL_TYPE</link>}"
4323 </literallayout>
4324 Defining this variable essentially sets the
4325 Linux kernel configuration item
4326 <filename>CONFIG_LOCALVERSION</filename>, which is visible
4327 through the <filename>uname</filename> command.
4328 Here is an example that shows the extension assuming it
4329 was set as previously shown:
4330 <literallayout class='monospaced'>
4331 $ uname -r
4332 3.7.0-rc8-custom
4333 </literallayout>
4334 </para>
4335 </glossdef>
4336 </glossentry>
4337
4338 <glossentry id='var-LOG_DIR'><glossterm>LOG_DIR</glossterm>
4339 <glossdef>
4340 <para>
4341 Specifies the directory to which the OpenEmbedded build
4342 system writes overall log files.
4343 The default directory is <filename>${TMPDIR}/log</filename>.
4344 </para>
4345 <para>
4346 For the directory containing logs specific to each task,
4347 see the <link linkend='var-T'><filename>T</filename></link>
4348 variable.
4349 </para>
4350 </glossdef>
4351 </glossentry>
4352
4353 </glossdiv>
4354
4355 <glossdiv id='var-glossary-m'><title>M</title>
4356
4357 <glossentry id='var-MACHINE'><glossterm>MACHINE</glossterm>
4358 <glossdef>
4359 <para>
4360 Specifies the target device for which the image is built.
4361 You define <filename>MACHINE</filename> in the
4362 <filename>local.conf</filename> file found in the
4363 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
4364 By default, <filename>MACHINE</filename> is set to
4365 "qemux86", which is an x86-based architecture machine to
4366 be emulated using QEMU:
4367 <literallayout class='monospaced'>
4368 MACHINE ?= "qemux86"
4369 </literallayout>
4370 The variable corresponds to a machine configuration file of the
4371 same name, through which machine-specific configurations are set.
4372 Thus, when <filename>MACHINE</filename> is set to "qemux86" there
4373 exists the corresponding <filename>qemux86.conf</filename> machine
4374 configuration file, which can be found in the
4375 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
4376 in <filename>meta/conf/machine</filename>.
4377 </para>
4378
4379 <para>
4380 The list of machines supported by the Yocto Project as
4381 shipped include the following:
4382 <literallayout class='monospaced'>
4383 MACHINE ?= "qemuarm"
4384 MACHINE ?= "qemumips"
4385 MACHINE ?= "qemuppc"
4386 MACHINE ?= "qemux86"
4387 MACHINE ?= "qemux86-64"
4388 MACHINE ?= "genericx86"
4389 MACHINE ?= "genericx86-64"
4390 MACHINE ?= "beaglebone"
4391 MACHINE ?= "mpc8315e-rdb"
4392 MACHINE ?= "edgerouter"
4393 </literallayout>
4394 The last five are Yocto Project reference hardware boards, which
4395 are provided in the <filename>meta-yocto-bsp</filename> layer.
4396 <note>Adding additional Board Support Package (BSP) layers
4397 to your configuration adds new possible settings for
4398 <filename>MACHINE</filename>.
4399 </note>
4400 </para>
4401 </glossdef>
4402 </glossentry>
4403
4404 <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</glossterm>
4405 <glossdef>
4406 <para></para>
4407 <para>
4408 A list of required machine-specific packages to install as part of
4409 the image being built.
4410 The build process depends on these packages being present.
4411 Furthermore, because this is a "machine essential" variable, the list of
4412 packages are essential for the machine to boot.
4413 The impact of this variable affects images based on
4414 <filename>packagegroup-core-boot</filename>,
4415 including the <filename>core-image-minimal</filename> image.
4416 </para>
4417 <para>
4418 This variable is similar to the
4419 <filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</link></filename>
4420 variable with the exception that the image being built has a build
4421 dependency on the variable's list of packages.
4422 In other words, the image will not build if a file in this list is not found.
4423 </para>
4424 <para>
4425 As an example, suppose the machine for which you are building requires
4426 <filename>example-init</filename> to be run during boot to initialize the hardware.
4427 In this case, you would use the following in the machine's
4428 <filename>.conf</filename> configuration file:
4429 <literallayout class='monospaced'>
4430 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
4431 </literallayout>
4432 </para>
4433 </glossdef>
4434 </glossentry>
4435
4436 <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</glossterm>
4437 <glossdef>
4438 <para></para>
4439 <para>
4440 A list of recommended machine-specific packages to install as part of
4441 the image being built.
4442 The build process does not depend on these packages being present.
4443 However, because this is a "machine essential" variable, the list of
4444 packages are essential for the machine to boot.
4445 The impact of this variable affects images based on
4446 <filename>packagegroup-core-boot</filename>,
4447 including the <filename>core-image-minimal</filename> image.
4448 </para>
4449 <para>
4450 This variable is similar to the
4451 <filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</link></filename>
4452 variable with the exception that the image being built does not have a build
4453 dependency on the variable's list of packages.
4454 In other words, the image will still build if a package in this list is not found.
4455 Typically, this variable is used to handle essential kernel modules, whose
4456 functionality may be selected to be built into the kernel rather than as a module,
4457 in which case a package will not be produced.
4458 </para>
4459 <para>
4460 Consider an example where you have a custom kernel where a specific touchscreen
4461 driver is required for the machine to be usable.
4462 However, the driver can be built as a module or
4463 into the kernel depending on the kernel configuration.
4464 If the driver is built as a module, you want it to be installed.
4465 But, when the driver is built into the kernel, you still want the
4466 build to succeed.
4467 This variable sets up a "recommends" relationship so that in the latter case,
4468 the build will not fail due to the missing package.
4469 To accomplish this, assuming the package for the module was called
4470 <filename>kernel-module-ab123</filename>, you would use the
4471 following in the machine's <filename>.conf</filename> configuration
4472 file:
4473 <literallayout class='monospaced'>
4474 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
4475 </literallayout>
4476 </para>
4477 <para>
4478 Some examples of these machine essentials are flash, screen, keyboard, mouse,
4479 or touchscreen drivers (depending on the machine).
4480 </para>
4481 </glossdef>
4482 </glossentry>
4483
4484 <glossentry id='var-MACHINE_EXTRA_RDEPENDS'><glossterm>MACHINE_EXTRA_RDEPENDS</glossterm>
4485 <glossdef>
4486 <para>
4487 A list of machine-specific packages to install as part of the
4488 image being built that are not essential for the machine to boot.
4489 However, the build process for more fully-featured images
4490 depends on the packages being present.
4491 </para>
4492 <para>
4493 This variable affects all images based on
4494 <filename>packagegroup-base</filename>, which does not include the
4495 <filename>core-image-minimal</filename> or <filename>core-image-full-cmdline</filename>
4496 images.
4497 </para>
4498 <para>
4499 The variable is similar to the
4500 <filename><link linkend='var-MACHINE_EXTRA_RRECOMMENDS'>MACHINE_EXTRA_RRECOMMENDS</link></filename>
4501 variable with the exception that the image being built has a build
4502 dependency on the variable's list of packages.
4503 In other words, the image will not build if a file in this list is not found.
4504 </para>
4505 <para>
4506 An example is a machine that has WiFi capability but is not
4507 essential for the machine to boot the image.
4508 However, if you are building a more fully-featured image, you want to enable
4509 the WiFi.
4510 The package containing the firmware for the WiFi hardware is always
4511 expected to exist, so it is acceptable for the build process to depend upon
4512 finding the package.
4513 In this case, assuming the package for the firmware was called
4514 <filename>wifidriver-firmware</filename>, you would use the following in the
4515 <filename>.conf</filename> file for the machine:
4516 <literallayout class='monospaced'>
4517 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
4518 </literallayout>
4519 </para>
4520 </glossdef>
4521 </glossentry>
4522
4523 <glossentry id='var-MACHINE_EXTRA_RRECOMMENDS'><glossterm>MACHINE_EXTRA_RRECOMMENDS</glossterm>
4524 <glossdef>
4525 <para></para>
4526 <para>
4527 A list of machine-specific packages to install as part of the
4528 image being built that are not essential for booting the machine.
4529 The image being built has no build dependency on this list of packages.
4530 </para>
4531 <para>
4532 This variable affects only images based on
4533 <filename>packagegroup-base</filename>, which does not include the
4534 <filename>core-image-minimal</filename> or <filename>core-image-full-cmdline</filename>
4535 images.
4536 </para>
4537 <para>
4538 This variable is similar to the
4539 <filename><link linkend='var-MACHINE_EXTRA_RDEPENDS'>MACHINE_EXTRA_RDEPENDS</link></filename>
4540 variable with the exception that the image being built does not have a build
4541 dependency on the variable's list of packages.
4542 In other words, the image will build if a file in this list is not found.
4543 </para>
4544 <para>
4545 An example is a machine that has WiFi capability but is not essential
4546 For the machine to boot the image.
4547 However, if you are building a more fully-featured image, you want to enable
4548 WiFi.
4549 In this case, the package containing the WiFi kernel module will not be produced
4550 if the WiFi driver is built into the kernel, in which case you still want the
4551 build to succeed instead of failing as a result of the package not being found.
4552 To accomplish this, assuming the package for the module was called
4553 <filename>kernel-module-examplewifi</filename>, you would use the
4554 following in the <filename>.conf</filename> file for the machine:
4555 <literallayout class='monospaced'>
4556 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
4557 </literallayout>
4558 </para>
4559 </glossdef>
4560 </glossentry>
4561
4562 <glossentry id='var-MACHINE_FEATURES'><glossterm>MACHINE_FEATURES</glossterm>
4563 <glossdef>
4564 <para>
4565 Specifies the list of hardware features the
4566 <link linkend='var-MACHINE'><filename>MACHINE</filename></link> is capable
4567 of supporting.
4568 For related information on enabling features, see the
4569 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>,
4570 <link linkend='var-COMBINED_FEATURES'><filename>COMBINED_FEATURES</filename></link>,
4571 and
4572 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
4573 variables.
4574 </para>
4575
4576 <para>
4577 For a list of hardware features supported by the Yocto
4578 Project as shipped, see the
4579 "<link linkend='ref-features-machine'>Machine Features</link>"
4580 section.
4581 </para>
4582 </glossdef>
4583 </glossentry>
4584
4585 <glossentry id='var-MACHINE_FEATURES_BACKFILL'><glossterm>MACHINE_FEATURES_BACKFILL</glossterm>
4586 <glossdef>
4587 <para>Features to be added to
4588 <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>
4589 if not also present in
4590 <filename><link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'>MACHINE_FEATURES_BACKFILL_CONSIDERED</link></filename>.
4591 </para>
4592
4593 <para>
4594 This variable is set in the <filename>meta/conf/bitbake.conf</filename> file.
4595 It is not intended to be user-configurable.
4596 It is best to just reference the variable to see which machine features are
4597 being backfilled for all machine configurations.
4598 See the "<link linkend='ref-features-backfill'>Feature backfilling</link>" section for
4599 more information.
4600 </para>
4601 </glossdef>
4602 </glossentry>
4603
4604 <glossentry id='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><glossterm>MACHINE_FEATURES_BACKFILL_CONSIDERED</glossterm>
4605 <glossdef>
4606 <para>Features from
4607 <filename><link linkend='var-MACHINE_FEATURES_BACKFILL'>MACHINE_FEATURES_BACKFILL</link></filename>
4608 that should not be backfilled (i.e. added to
4609 <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>)
4610 during the build.
4611 See the "<link linkend='ref-features-backfill'>Feature backfilling</link>" section for
4612 more information.
4613 </para>
4614 </glossdef>
4615 </glossentry>
4616
4617 <glossentry id='var-MACHINEOVERRIDES'><glossterm>MACHINEOVERRIDES</glossterm>
4618 <glossdef>
4619 <para>
4620 Lists overrides specific to the current machine.
4621 By default, this list includes the value
4622 of <filename><link linkend='var-MACHINE'>MACHINE</link></filename>.
4623 You can extend the list to apply variable overrides for
4624 classes of machines.
4625 For example, all QEMU emulated machines (e.g. qemuarm,
4626 qemux86, and so forth) include a common file named
4627 <filename>meta/conf/machine/include/qemu.inc</filename>
4628 that prepends <filename>MACHINEOVERRIDES</filename> with
4629 the following variable override:
4630 <literallayout class='monospaced'>
4631 MACHINEOVERRIDES =. "qemuall:"
4632 </literallayout>
4633 Applying an override like <filename>qemuall</filename>
4634 affects all QEMU emulated machines elsewhere.
4635 Here is an example from the
4636 <filename>connman-conf</filename> recipe:
4637 <literallayout class='monospaced'>
4638 SRC_URI_append_qemuall = "file://wired.config \
4639 file://wired-setup \
4640 "
4641 </literallayout>
4642 </para>
4643 </glossdef>
4644 </glossentry>
4645
4646 <glossentry id='var-MAINTAINER'><glossterm>MAINTAINER</glossterm>
4647 <glossdef>
4648 <para>The email address of the distribution maintainer.</para>
4649 </glossdef>
4650 </glossentry>
4651
4652 <glossentry id='var-MIRRORS'><glossterm>MIRRORS</glossterm>
4653 <glossdef>
4654 <para>
4655 Specifies additional paths from which the OpenEmbedded
4656 build system gets source code.
4657 When the build system searches for source code, it first
4658 tries the local download directory.
4659 If that location fails, the build system tries locations
4660 defined by
4661 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>,
4662 the upstream source, and then locations specified by
4663 <filename>MIRRORS</filename> in that order.
4664 </para>
4665
4666 <para>
4667 Assuming your distribution
4668 (<link linkend='var-DISTRO'><filename>DISTRO</filename></link>)
4669 is "poky", the default value for
4670 <filename>MIRRORS</filename> is defined in the
4671 <filename>conf/distro/poky.conf</filename> file in the
4672 <filename>meta-yocto</filename> Git repository.
4673 </para>
4674 </glossdef>
4675 </glossentry>
4676
4677 <glossentry id='var-MLPREFIX'><glossterm>MLPREFIX</glossterm>
4678 <glossdef>
4679 <para>
4680 Specifies a prefix has been added to
4681 <link linkend='var-PN'><filename>PN</filename></link> to create a special version
4682 of a recipe or package, such as a Multilib version.
4683 The variable is used in places where the prefix needs to be
4684 added to or removed from a the name (e.g. the
4685 <link linkend='var-BPN'><filename>BPN</filename></link> variable).
4686 <filename>MLPREFIX</filename> gets set when a prefix has been
4687 added to <filename>PN</filename>.
4688 </para>
4689 </glossdef>
4690 </glossentry>
4691
4692 <glossentry id='var-module_autoload'><glossterm>module_autoload</glossterm>
4693 <glossdef>
4694 <para>
4695 Lists kernel modules that need to be auto-loaded during
4696 boot.
4697 </para>
4698
4699 <para>
4700 You can use this variable anywhere that it can be
4701 recognized by the kernel recipe or out-of-tree kernel
4702 module recipe (e.g. a machine configuration file, a
4703 distribution configuration file, an append file for the
4704 recipe, or the recipe itself).
4705 </para>
4706
4707 <para>
4708 Specify it as follows:
4709 <literallayout class='monospaced'>
4710 module_autoload_&lt;modname&gt; = "modname1 modname2 modname3"
4711 </literallayout>
4712 You must use the kernel module name override.
4713 </para>
4714
4715 <para>
4716 Including <filename>module_autoload</filename> causes the
4717 OpenEmbedded build system to populate the
4718 <filename>/etc/modules-load.d/modname.conf</filename>
4719 file with the list of modules to be auto-loaded on boot.
4720 The modules appear one-per-line in the file.
4721 Here is an example of the most common use case:
4722 <literallayout class='monospaced'>
4723 module_autoload_modname = "modname"
4724 </literallayout>
4725 </para>
4726
4727 <para>
4728 For information on how to populate the
4729 <filename>modname.conf</filename> file with
4730 <filename>modprobe.d</filename> syntax lines, see the
4731 <link linkend='var-module_conf'><filename>module_conf</filename></link>
4732 variable.
4733 </para>
4734 </glossdef>
4735 </glossentry>
4736
4737 <glossentry id='var-module_conf'><glossterm>module_conf</glossterm>
4738 <glossdef>
4739 <para>
4740 Specifies <filename>modprobe.d</filename> syntax lines
4741 for inclusion in the
4742 <filename>/etc/modprobe.d/modname.conf</filename> file.
4743 </para>
4744
4745 <para>
4746 You can use this variable anywhere that it can be
4747 recognized by the kernel recipe or out-of-tree kernel
4748 module recipe (e.g. a machine configuration file, a
4749 distribution configuration file, an append file for the
4750 recipe, or the recipe itself).
4751 </para>
4752
4753 <para>
4754 Here is the general syntax:
4755 <literallayout class='monospaced'>
4756 module_conf_&lt;modname&gt; = "modprobe.d-syntax"
4757 </literallayout>
4758 You must use the kernel module name override.
4759 </para>
4760
4761 <para>
4762 Run <filename>man modprobe.d</filename> in the shell to
4763 find out more information on the exact syntax for lines
4764 you want to provide with <filename>module_conf</filename>.
4765 </para>
4766
4767 <para>
4768 Including <filename>module_conf</filename> causes the
4769 OpenEmbedded build system to populate the
4770 <filename>/etc/modprobe.d/modname.conf</filename>
4771 file with <filename>modprobe.d</filename> syntax lines.
4772 Here is an example:
4773 <literallayout class='monospaced'>
4774 module_conf_&lt;modname&gt; = "options modname arg1=val1 arg2=val2"
4775 </literallayout>
4776 </para>
4777
4778 <para>
4779 For information on how to specify kernel modules to
4780 auto-load on boot, see the
4781 <link linkend='var-module_autoload'><filename>module_autoload</filename></link>
4782 variable.
4783 </para>
4784 </glossdef>
4785 </glossentry>
4786
4787 <glossentry id='var-MODULE_IMAGE_BASE_NAME'><glossterm>MODULE_IMAGE_BASE_NAME</glossterm>
4788 <glossdef>
4789 <para>
4790 The base name of the kernel modules tarball.
4791 This variable is set in the
4792 <link linkend='ref-classes-kernel'>kernel</link> class
4793 as follows:
4794 <literallayout class='monospaced'>
4795 MODULE_IMAGE_BASE_NAME ?= "modules-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
4796 </literallayout>
4797 See the
4798 <link linkend='var-PKGE'><filename>PKGE</filename></link>,
4799 <link linkend='var-PKGV'><filename>PKGV</filename></link>,
4800 <link linkend='var-PKGR'><filename>PKGR</filename></link>,
4801 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
4802 and
4803 <link linkend='var-DATETIME'><filename>DATETIME</filename></link>
4804 variables for additional information.
4805 </para>
4806 </glossdef>
4807 </glossentry>
4808
4809 <glossentry id='var-MODULE_TARBALL_DEPLOY'><glossterm>MODULE_TARBALL_DEPLOY</glossterm>
4810 <glossdef>
4811 <para>
4812 Controls creation of the <filename>modules-*.tgz</filename>
4813 file.
4814 Set this variable to "0" to disable creation of this
4815 file, which contains all of the kernel modules resulting
4816 from a kernel build.
4817 </para>
4818 </glossdef>
4819 </glossentry>
4820
4821 <glossentry id='var-MULTIMACH_TARGET_SYS'><glossterm>MULTIMACH_TARGET_SYS</glossterm>
4822 <glossdef>
4823 <para>
4824 Separates files for different machines such that you can build
4825 for multiple target machines using the same output directories.
4826 See the <link linkend='var-STAMP'><filename>STAMP</filename></link> variable
4827 for an example.
4828 </para>
4829 </glossdef>
4830 </glossentry>
4831
4832 </glossdiv>
4833
4834 <glossdiv id='var-glossary-n'><title>N</title>
4835
4836 <glossentry id='var-NATIVELSBSTRING'><glossterm>NATIVELSBSTRING</glossterm>
4837 <glossdef>
4838 <para>
4839 A string identifying the host distribution.
4840 Strings consist of the host distributor ID
4841 followed by the release, as reported by the
4842 <filename>lsb_release</filename> tool
4843 or as read from <filename>/etc/lsb-release</filename>.
4844 For example, when running a build on Ubuntu 12.10, the value
4845 is "Ubuntu-12.10".
4846 If this information is unable to be determined, the value
4847 resolves to "Unknown".
4848 </para>
4849 <para>
4850 This variable is used by default to isolate native shared
4851 state packages for different distributions (e.g. to avoid
4852 problems with <filename>glibc</filename> version
4853 incompatibilities).
4854 Additionally, the variable is checked against
4855 <link linkend='var-SANITY_TESTED_DISTROS'><filename>SANITY_TESTED_DISTROS</filename></link>
4856 if that variable is set.
4857 </para>
4858 </glossdef>
4859 </glossentry>
4860
4861 <glossentry id='var-NO_RECOMMENDATIONS'><glossterm>NO_RECOMMENDATIONS</glossterm>
4862 <glossdef>
4863 <para>
4864 Prevents installation of all "recommended-only" packages.
4865 Recommended-only packages are packages installed only
4866 through the
4867 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
4868 variable).
4869 Setting the <filename>NO_RECOMMENDATIONS</filename> variable
4870 to "1" turns this feature on:
4871 <literallayout class='monospaced'>
4872 NO_RECOMMENDATIONS = "1"
4873 </literallayout>
4874 You can set this variable globally in your
4875 <filename>local.conf</filename> file or you can attach it to
4876 a specific image recipe by using the recipe name override:
4877 <literallayout class='monospaced'>
4878 NO_RECOMMENDATIONS_pn-&lt;target_image&gt; = "&lt;package_name&gt;"
4879 </literallayout>
4880 </para>
4881
4882 <para>
4883 It is important to realize that if you choose to not install
4884 packages using this variable and some other packages are
4885 dependent on them (i.e. listed in a recipe's
4886 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
4887 variable), the OpenEmbedded build system ignores your
4888 request and will install the packages to avoid dependency
4889 errors.
4890 <note>
4891 Some recommended packages might be required for certain
4892 system functionality, such as kernel modules.
4893 It is up to you to add packages with the
4894 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>
4895 variable.
4896 </note>
4897 </para>
4898
4899 <para>
4900 Support for this variable exists only when using the
4901 IPK and RPM packaging backend.
4902 Support does not exist for DEB.
4903 </para>
4904
4905 <para>
4906 See the
4907 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
4908 and the
4909 <link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
4910 variables for related information.
4911 </para>
4912 </glossdef>
4913 </glossentry>
4914
4915 <glossentry id='var-NOHDD'><glossterm>NOHDD</glossterm>
4916 <glossdef>
4917 <para>
4918 Causes the OpenEmbedded build system to skip building the
4919 <filename>.hddimg</filename> image.
4920 The <filename>NOHDD</filename> variable is used with the
4921 <link linkend='ref-classes-bootimg'><filename>buildimg</filename></link>
4922 class.
4923 Set the variable to "1" to prevent the
4924 <filename>.hddimg</filename> image from being built.
4925 </para>
4926 </glossdef>
4927 </glossentry>
4928
4929 <glossentry id='var-NOISO'><glossterm>NOISO</glossterm>
4930 <glossdef>
4931 <para>
4932 Causes the OpenEmbedded build system to skip building the
4933 ISO image.
4934 The <filename>NOISO</filename> variable is used with the
4935 <link linkend='ref-classes-bootimg'><filename>buildimg</filename></link>
4936 class.
4937 Set the variable to "1" to prevent the ISO image from
4938 being built.
4939 To enable building an ISO image, set the variable to "0".
4940 </para>
4941 </glossdef>
4942 </glossentry>
4943
4944 </glossdiv>
4945
4946 <glossdiv id='var-glossary-o'><title>O</title>
4947
4948 <glossentry id='var-OE_BINCONFIG_EXTRA_MANGLE'><glossterm>OE_BINCONFIG_EXTRA_MANGLE</glossterm>
4949 <glossdef>
4950 <para>
4951 When a recipe inherits the
4952 <filename>binconfig.bbclass</filename> class, this variable
4953 specifies additional arguments passed to the "sed" command.
4954 The sed command alters any paths in configuration scripts
4955 that have been set up during compilation.
4956 Inheriting this class results in all paths in these scripts
4957 being changed to point into the
4958 <filename>sysroots/</filename> directory so that all builds
4959 that use the script will use the correct directories
4960 for the cross compiling layout.
4961 </para>
4962
4963 <para>
4964 See the <filename>meta/classes/binconfig.bbclass</filename>
4965 in the
4966 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
4967 for details on how this class applies these additional
4968 sed command arguments.
4969 For general information on the
4970 <filename>binconfig.bbclass</filename> class, see the
4971 "<link linkend='ref-classes-binconfig'>Binary Configuration Scripts - <filename>binconfig.bbclass</filename></link>"
4972 section.
4973 </para>
4974 </glossdef>
4975 </glossentry>
4976
4977 <glossentry id='var-OE_IMPORTS'><glossterm>OE_IMPORTS</glossterm>
4978 <glossdef>
4979 <para>
4980 An internal variable used to tell the OpenEmbedded build
4981 system what Python modules to import for every Python
4982 function run by the system.
4983 </para>
4984
4985 <note>
4986 Do not set this variable.
4987 It is for internal use only.
4988 </note>
4989 </glossdef>
4990 </glossentry>
4991
4992 <glossentry id='var-OE_TERMINAL'><glossterm>OE_TERMINAL</glossterm>
4993 <glossdef>
4994 <para>
4995 Controls how the OpenEmbedded build system spawns
4996 interactive terminals on the host development system
4997 (e.g. using the BitBake command with the
4998 <filename>-c devshell</filename> command-line option).
4999 For more information, see the
5000 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section
5001 in the Yocto Project Development Manual.
5002 </para>
5003
5004 <para>
5005 You can use the following values for the
5006 <filename>OE_TERMINAL</filename> variable:
5007 <literallayout class='monospaced'>
5008 auto
5009 gnome
5010 xfce
5011 rxvt
5012 screen
5013 konsole
5014 none
5015 </literallayout>
5016 <note>Konsole support only works for KDE 3.x.
5017 Also, "auto" is the default behavior for
5018 <filename>OE_TERMINAL</filename></note>
5019 </para>
5020 </glossdef>
5021 </glossentry>
5022
5023 <glossentry id='var-OEROOT'><glossterm>OEROOT</glossterm>
5024 <glossdef>
5025 <para>
5026 The directory from which the top-level build environment
5027 setup script is sourced.
5028 The Yocto Project makes two top-level build environment
5029 setup scripts available:
5030 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
5031 and
5032 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>.
5033 When you run one of these scripts, the
5034 <filename>OEROOT</filename> variable resolves to the
5035 directory that contains the script.
5036 </para>
5037
5038 <para>
5039 For additional information on how this variable is used,
5040 see the initialization scripts.
5041 </para>
5042 </glossdef>
5043 </glossentry>
5044
5045 <glossentry id='var-OLDEST_KERNEL'><glossterm>OLDEST_KERNEL</glossterm>
5046 <glossdef>
5047 <para>
5048 Declares the oldest version of the Linux kernel that the
5049 produced binaries must support.
5050 This variable is passed into the build of the Embedded
5051 GNU C Library (<filename>eglibc</filename>).
5052 </para>
5053
5054 <para>
5055 The default for this variable comes from the
5056 <filename>meta/conf/bitbake.conf</filename> configuration
5057 file.
5058 You can override this default by setting the variable
5059 in a custom distribution configuration file.
5060 </para>
5061 </glossdef>
5062 </glossentry>
5063
5064 <glossentry id='var-OVERRIDES'><glossterm>OVERRIDES</glossterm>
5065 <glossdef>
5066 <para>
5067 BitBake uses <filename>OVERRIDES</filename> to control
5068 what variables are overridden after BitBake parses
5069 recipes and configuration files.
5070 You can find more information on how overrides are handled
5071 in the
5072 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake Manual</ulink>.
5073 </para>
5074 </glossdef>
5075 </glossentry>
5076 </glossdiv>
5077
5078 <glossdiv id='var-glossary-p'><title>P</title>
5079
5080 <glossentry id='var-P'><glossterm>P</glossterm>
5081 <glossdef>
5082 <para>The recipe name and version.
5083 <filename>P</filename> is comprised of the following:
5084 <literallayout class='monospaced'>
5085 ${PN}-${PV}
5086 </literallayout></para>
5087 </glossdef>
5088 </glossentry>
5089
5090 <glossentry id='var-PACKAGE_ARCH'><glossterm>PACKAGE_ARCH</glossterm>
5091 <glossdef>
5092 <para>The architecture of the resulting package or packages.</para>
5093 </glossdef>
5094 </glossentry>
5095
5096 <glossentry id='var-PACKAGE_BEFORE_PN'><glossterm>PACKAGE_BEFORE_PN</glossterm>
5097 <glossdef>
5098 <para>Enables easily adding packages to
5099 <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
5100 before <filename>${<link linkend='var-PN'>PN</link>}</filename>
5101 so that those added packages can pick up files that would normally be
5102 included in the default package.</para>
5103 </glossdef>
5104 </glossentry>
5105
5106 <glossentry id='var-PACKAGE_CLASSES'><glossterm>PACKAGE_CLASSES</glossterm>
5107 <glossdef>
5108 <para>
5109 This variable, which is set in the
5110 <filename>local.conf</filename> configuration file found in
5111 the <filename>conf</filename> folder of the
5112 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
5113 specifies the package manager the OpenEmbedded build system
5114 uses when packaging data.
5115 </para>
5116
5117 <para>
5118 You can provide one or more of the following arguments for
5119 the variable:
5120 <literallayout class='monospaced'>
5121 PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk package_tar"
5122 </literallayout>
5123 The build system uses only the first argument in the list
5124 as the package manager when creating your image or SDK.
5125 However, packages will be created using any additional
5126 packaging classes you specify.
5127 For example, if you use the following in your
5128 <filename>local.conf</filename> file:
5129 <literallayout class='monospaced'>
5130 PACKAGE_CLASSES ?= "package_ipk package_tar"
5131 </literallayout>
5132 The OpenEmbedded build system uses the IPK package manager
5133 to create your image or SDK as well as generating
5134 TAR packages.
5135 </para>
5136
5137 <para>
5138 You cannot specify the
5139 <link linkend='ref-classes-package_tar'><filename>package_tar</filename></link>
5140 class first in the list.
5141 Files using the <filename>.tar</filename> format cannot
5142 be used as a substitute packaging format
5143 for DEB, RPM, and IPK formatted files for your image or SDK.
5144 </para>
5145
5146 <para>
5147 For information on packaging and build performance effects
5148 as a result of the package manager in use, see the
5149 "<link linkend='ref-classes-package'><filename>package.bbclass</filename></link>"
5150 section.
5151 </para>
5152 </glossdef>
5153 </glossentry>
5154
5155 <glossentry id='var-PACKAGE_EXCLUDE'><glossterm>PACKAGE_EXCLUDE</glossterm>
5156 <glossdef>
5157 <para>
5158 Lists packages that should not be installed into an image.
5159 For example:
5160 <literallayout class='monospaced'>
5161 PACKAGE_EXCLUDE = "&lt;package_name&gt; &lt;package_name&gt; &lt;package_name&gt; ..."
5162 </literallayout>
5163 You can set this variable globally in your
5164 <filename>local.conf</filename> file or you can attach it to
5165 a specific image recipe by using the recipe name override:
5166 <literallayout class='monospaced'>
5167 PACKAGE_EXCLUDE_pn-&lt;target_image&gt; = "&lt;package_name&gt;"
5168 </literallayout>
5169 </para>
5170
5171 <para>
5172 If you choose to not install
5173 a package using this variable and some other package is
5174 dependent on it (i.e. listed in a recipe's
5175 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
5176 variable), the OpenEmbedded build system generates a fatal
5177 installation error.
5178 Because the build system halts the process with a fatal
5179 error, you can use the variable with an iterative
5180 development process to remove specific components from a
5181 system.
5182 </para>
5183
5184 <para>
5185 Support for this variable exists only when using the
5186 IPK and RPM packaging backend.
5187 Support does not exist for DEB.
5188 </para>
5189
5190 <para>
5191 See the
5192 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>
5193 and the
5194 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
5195 variables for related information.
5196 </para>
5197 </glossdef>
5198 </glossentry>
5199
5200 <glossentry id='var-PACKAGE_EXTRA_ARCHS'><glossterm>PACKAGE_EXTRA_ARCHS</glossterm>
5201 <glossdef>
5202 <para>Specifies the list of architectures compatible with the device CPU.
5203 This variable is useful when you build for several different devices that use
5204 miscellaneous processors such as XScale and ARM926-EJS).</para>
5205 </glossdef>
5206 </glossentry>
5207
5208 <glossentry id='var-PACKAGE_GROUP'><glossterm>PACKAGE_GROUP</glossterm>
5209 <glossdef>
5210
5211 <para>
5212 The <filename>PACKAGE_GROUP</filename> variable has been
5213 renamed to
5214 <link linkend='var-FEATURE_PACKAGES'><filename>FEATURE_PACKAGES</filename></link>.
5215 See the variable description for
5216 <filename>FEATURE_PACKAGES</filename> for information.
5217 </para>
5218
5219 <para>
5220 If if you use the <filename>PACKAGE_GROUP</filename>
5221 variable, the OpenEmbedded build system issues a warning
5222 message.
5223 </para>
5224 </glossdef>
5225 </glossentry>
5226
5227 <glossentry id='var-PACKAGE_INSTALL'><glossterm>PACKAGE_INSTALL</glossterm>
5228 <glossdef>
5229 <para>
5230 The final list of packages passed to the package manager
5231 for installation into the image.
5232 </para>
5233
5234 <para>
5235 Because the package manager controls actual installation
5236 of all packages, the list of packages passed using
5237 <filename>PACKAGE_INSTALL</filename> is not the final list
5238 of packages that are actually installed.
5239 This variable is internal to the image construction
5240 code.
5241 Consequently, in general, you should use the
5242 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>
5243 variable to specify packages for installation.
5244 The exception to this is when working with
5245 the
5246 <link linkend='images-core-image-minimal-initramfs'><filename>core-image-minimal-initramfs</filename></link>
5247 image.
5248 When working with an initial RAM disk (initramfs)
5249 image, use the <filename>PACKAGE_INSTALL</filename>
5250 variable.
5251 </para>
5252 </glossdef>
5253 </glossentry>
5254
5255 <glossentry id='var-PACKAGECONFIG'><glossterm>PACKAGECONFIG</glossterm>
5256 <glossdef>
5257 <para>
5258 This variable provides a means of enabling or disabling
5259 features of a recipe on a per-recipe basis.
5260 <filename>PACKAGECONFIG</filename> blocks are defined
5261 in recipes when you specify features and then arguments
5262 that define feature behaviors.
5263 Here is the basic block structure:
5264 <literallayout class='monospaced'>
5265 PACKAGECONFIG ??= "f1 f2 f3 ..."
5266 PACKAGECONFIG[f1] = "--with-f1,--without-f1,build-deps-f1,rt-deps-f1"
5267 PACKAGECONFIG[f2] = "--with-f2,--without-f2,build-deps-f2,rt-deps-f2"
5268 PACKAGECONFIG[f3] = "--with-f3,--without-f3,build-deps-f3,rt-deps-f3"
5269 </literallayout>
5270 The <filename>PACKAGECONFIG</filename>
5271 variable itself specifies a space-separated list of the
5272 features to enable.
5273 Following the features, you can determine the behavior of
5274 each feature by providing up to four order-dependent
5275 arguments, which are separated by commas.
5276 You can omit any argument you like but must retain the
5277 separating commas.
5278 The order is important and specifies the following:
5279 <orderedlist>
5280 <listitem><para>Extra arguments
5281 that should be added to the configure script
5282 argument list
5283 (<link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>)
5284 if the feature is enabled.</para></listitem>
5285 <listitem><para>Extra arguments
5286 that should be added to <filename>EXTRA_OECONF</filename>
5287 if the feature is disabled.
5288 </para></listitem>
5289 <listitem><para>Additional build dependencies
5290 (<link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>)
5291 that should be added if the feature is enabled.
5292 </para></listitem>
5293 <listitem><para>Additional runtime dependencies
5294 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
5295 that should be added if the feature is enabled.
5296 </para></listitem>
5297 </orderedlist>
5298 </para>
5299
5300 <para>
5301 Consider the following
5302 <filename>PACKAGECONFIG</filename> block taken from the
5303 <filename>librsvg</filename> recipe.
5304 In this example the feature is <filename>croco</filename>,
5305 which has three arguments that determine the feature's
5306 behavior.
5307 <literallayout class='monospaced'>
5308 PACKAGECONFIG ??= "croco"
5309 PACKAGECONFIG[croco] = "--with-croco,--without-croco,libcroco"
5310 </literallayout>
5311 The <filename>--with-croco</filename> and
5312 <filename>libcroco</filename> arguments apply only if
5313 the feature is enabled.
5314 In this case, <filename>--with-croco</filename> is
5315 added to the configure script argument list and
5316 <filename>libcroco</filename> is added to
5317 <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename>.
5318 On the other hand, if the feature is disabled say through
5319 a <filename>.bbappend</filename> file in another layer, then
5320 the second argument <filename>--without-croco</filename> is
5321 added to the configure script rather than
5322 <filename>--with-croco</filename>.
5323 </para>
5324
5325 <para>
5326 The basic <filename>PACKAGECONFIG</filename> structure
5327 previously described holds true regardless of whether you
5328 are creating a block or changing a block.
5329 When creating a block, use the structure inside your
5330 recipe.
5331 </para>
5332
5333 <para>
5334 If you want to change an existing
5335 <filename>PACKAGECONFIG</filename> block, you can do so
5336 one of two ways:
5337 <itemizedlist>
5338 <listitem><para><emphasis>Append file:</emphasis>
5339 Create an append file named
5340 <filename>&lt;recipename&gt;.bbappend</filename> in your
5341 layer and override the value of
5342 <filename>PACKAGECONFIG</filename>.
5343 You can either completely override the variable:
5344 <literallayout class='monospaced'>
5345 PACKAGECONFIG="f4 f5"
5346 </literallayout>
5347 Or, you can just append the variable:
5348 <literallayout class='monospaced'>
5349 PACKAGECONFIG_append = " f4"
5350 </literallayout></para></listitem>
5351 <listitem><para><emphasis>Configuration file:</emphasis>
5352 This method is identical to changing the block
5353 through an append file except you edit your
5354 <filename>local.conf</filename> or
5355 <filename>&lt;mydistro&gt;.conf</filename> file.
5356 As with append files previously described,
5357 you can either completely override the variable:
5358 <literallayout class='monospaced'>
5359 PACKAGECONFIG_pn-&lt;recipename&gt;="f4 f5"
5360 </literallayout>
5361 Or, you can just amend the variable:
5362 <literallayout class='monospaced'>
5363 PACKAGECONFIG_append_pn-&lt;recipename&gt; = " f4"
5364 </literallayout></para></listitem>
5365 </itemizedlist>
5366 </para>
5367 </glossdef>
5368 </glossentry>
5369
5370 <glossentry id='var-PACKAGES'><glossterm>PACKAGES</glossterm>
5371 <glossdef>
5372 <para>The list of packages to be created from the recipe.
5373 The default value is the following:
5374 <literallayout class='monospaced'>
5375 ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
5376 </literallayout></para>
5377 </glossdef>
5378 </glossentry>
5379
5380 <glossentry id='var-PACKAGES_DYNAMIC'><glossterm>PACKAGES_DYNAMIC</glossterm>
5381 <glossdef>
5382 <para>
5383 A promise that your recipe satisfies runtime dependencies
5384 for optional modules that are found in other recipes.
5385 <filename>PACKAGES_DYNAMIC</filename>
5386 does not actually satisfy the dependencies, it only states that
5387 they should be satisfied.
5388 For example, if a hard, runtime dependency
5389 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
5390 of another package is satisfied
5391 at build time through the <filename>PACKAGES_DYNAMIC</filename>
5392 variable, but a package with the module name is never actually
5393 produced, then the other package will be broken.
5394 Thus, if you attempt to include that package in an image,
5395 you will get a dependency failure from the packaging system
5396 during <filename>do_rootfs</filename>.
5397 </para>
5398 <para>
5399 Typically, if there is a chance that such a situation can
5400 occur and the package that is not created is valid
5401 without the dependency being satisfied, then you should use
5402 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
5403 (a soft runtime dependency) instead of
5404 <filename>RDEPENDS</filename>.
5405 </para>
5406
5407 <para>
5408 For an example of how to use the <filename>PACKAGES_DYNAMIC</filename>
5409 variable when you are splitting packages, see the
5410 "<ulink url='&YOCTO_DOCS_DEV_URL;#handling-optional-module-packaging'>Handling Optional Module Packaging</ulink>" section
5411 in the Yocto Project Development Manual.
5412 </para>
5413 </glossdef>
5414 </glossentry>
5415
5416 <glossentry id='var-PARALLEL_MAKE'><glossterm>PARALLEL_MAKE</glossterm>
5417 <glossdef>
5418 <para>
5419 Extra options passed to the <filename>make</filename>
5420 command during the <filename>do_compile</filename> task
5421 in order to specify parallel compilation on the local
5422 build host.
5423 This variable is usually in the form "-j &lt;x&gt;",
5424 where x represents the maximum number of parallel threads
5425 <filename>make</filename> can run.
5426 </para>
5427
5428 <para>
5429 If your development host supports multiple cores, a good
5430 rule of thumb is to set this variable to twice the number
5431 of cores on the host.
5432 If you do not set <filename>PARALLEL_MAKE</filename>, it
5433 defaults to the number of cores your build system has.
5434 <note>
5435 Individual recipes might clear out this variable if
5436 the software being built has problems running its
5437 <filename>make</filename> process in parallel.
5438 </note>
5439 </para>
5440 </glossdef>
5441 </glossentry>
5442
5443 <glossentry id='var-PARALLEL_MAKEINST'><glossterm>PARALLEL_MAKEINST</glossterm>
5444 <glossdef>
5445 <para>
5446 Extra options passed to the
5447 <filename>make install</filename> command during the
5448 <filename>do_install</filename> task in order to specify
5449 parallel installation.
5450 This variable defaults to the value of
5451 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>.
5452 <note>
5453 Individual recipes might clear out this variable if
5454 the software being built has problems running its
5455 <filename>make install</filename> process in parallel.
5456 </note>
5457 </para>
5458 </glossdef>
5459 </glossentry>
5460
5461 <glossentry id='var-PATCHRESOLVE'><glossterm>PATCHRESOLVE</glossterm>
5462 <glossdef>
5463 <para>
5464 Determines the action to take when a patch fails.
5465 You can set this variable to one of two values: "noop" and
5466 "user".
5467 </para>
5468
5469 <para>
5470 The default value of "noop" causes the build to simply fail
5471 when the OpenEmbedded build system cannot successfully
5472 apply a patch.
5473 Setting the value to "user" causes the build system to
5474 launch a shell and places you in the right location so that
5475 you can manually resolve the conflicts.
5476 </para>
5477
5478 <para>
5479 Set this variable in your
5480 <filename>local.conf</filename> file.
5481 </para>
5482 </glossdef>
5483 </glossentry>
5484
5485 <glossentry id='var-PATCHTOOL'><glossterm>PATCHTOOL</glossterm>
5486 <glossdef>
5487 <para>
5488 Specifies the utility used to apply patches for a recipe
5489 during <filename>do_patch</filename>.
5490 You can specify one of three utilities: "patch", "quilt", or
5491 "git".
5492 The default utility used is "quilt" except for the
5493 quilt-native recipe itself.
5494 Because the quilt tool is not available at the
5495 time quilt-native is being patched, it uses "patch".
5496 </para>
5497
5498 <para>
5499 If you wish to use an alternative patching tool, set the
5500 variable in the recipe using one of the following:
5501 <literallayout class='monospaced'>
5502 PATCHTOOL = "patch"
5503 PATCHTOOL = "quilt"
5504 PATCHTOOL = "git"
5505 </literallayout>
5506 </para>
5507 </glossdef>
5508 </glossentry>
5509
5510 <glossentry id='var-PE'><glossterm>PE</glossterm>
5511 <glossdef>
5512 <para>
5513 The epoch of the recipe.
5514 By default, this variable is unset.
5515 The variable is used to make upgrades possible when the
5516 versioning scheme changes in some backwards incompatible
5517 way.
5518 </para>
5519 </glossdef>
5520 </glossentry>
5521
5522 <glossentry id='var-PF'><glossterm>PF</glossterm>
5523 <glossdef>
5524 <para>Specifies the recipe or package name and includes all version and revision
5525 numbers (i.e. <filename>eglibc-2.13-r20+svnr15508/</filename> and
5526 <filename>bash-4.2-r1/</filename>).
5527 This variable is comprised of the following:
5528 <literallayout class='monospaced'>
5529 ${<link linkend='var-PN'>PN</link>}-${<link linkend='var-EXTENDPE'>EXTENDPE</link>}${<link linkend='var-PV'>PV</link>}-${<link linkend='var-PR'>PR</link>}
5530 </literallayout></para>
5531 </glossdef>
5532 </glossentry>
5533
5534 <glossentry id='var-PIXBUF_PACKAGES'><glossterm>PIXBUF_PACKAGES</glossterm>
5535 <glossdef>
5536 <para>
5537 When a recipe inherits the
5538 <link linkend='ref-classes-pixbufcache'><filename>pixbufcache</filename></link>
5539 class, this variable identifies packages that contain
5540 the pixbuf loaders used with
5541 <filename>gdk-pixbuf</filename>.
5542 By default, the <filename>pixbufcache</filename> class
5543 assumes that the loaders are in the recipe's main package
5544 (i.e. <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>).
5545 Use this variable if the loaders you need are in a package
5546 other than that main package.
5547 </para>
5548 </glossdef>
5549 </glossentry>
5550
5551 <glossentry id='var-PKG'><glossterm>PKG</glossterm>
5552 <glossdef>
5553 <para>
5554 The name of the resulting package created by the
5555 OpenEmbedded build system.
5556 <note>
5557 When using the <filename>PKG</filename> variable, you
5558 must use a package name override.
5559 </note>
5560 For example, when the
5561 <link linkend='ref-classes-debian'><filename>debian</filename></link>
5562 class renames the output package, it does so by setting
5563 <filename>PKG_&lt;packagename&gt;</filename>.
5564 </para>
5565 </glossdef>
5566 </glossentry>
5567
5568 <glossentry id='var-PKGD'><glossterm>PKGD</glossterm>
5569 <glossdef>
5570 <para>
5571 Points to the destination directory for files to be
5572 packaged before they are split into individual packages.
5573 This directory defaults to the following:
5574 <literallayout class='monospaced'>
5575 ${WORKDIR}/package
5576 </literallayout>
5577 Do not change this default.
5578 </para>
5579 </glossdef>
5580 </glossentry>
5581
5582 <glossentry id='var-PKGDATA_DIR'><glossterm>PKGDATA_DIR</glossterm>
5583 <glossdef>
5584 <para>
5585 Points to a shared, global-state directory that holds data
5586 generated during the packaging process.
5587 During the packaging process, the
5588 <filename>do_packagedata</filename> task packages
5589 data for each recipe and installs it into this temporary,
5590 shared area.
5591 This directory defaults to the following:
5592 <literallayout class='monospaced'>
5593 ${STAGING_DIR_HOST}/pkgdata
5594 </literallayout>
5595 Do not change this default.
5596 </para>
5597 </glossdef>
5598 </glossentry>
5599
5600 <glossentry id='var-PKGDEST'><glossterm>PKGDEST</glossterm>
5601 <glossdef>
5602 <para>
5603 Points to the parent directory for files to be packaged
5604 after they have been split into individual packages.
5605 This directory defaults to the following:
5606 <literallayout class='monospaced'>
5607 ${WORKDIR}/packages-split
5608 </literallayout>
5609 Under this directory, the build system creates
5610 directories for each package specified in
5611 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>.
5612 Do not change this default.
5613 </para>
5614 </glossdef>
5615 </glossentry>
5616
5617 <glossentry id='var-PKGDESTWORK'><glossterm>PKGDESTWORK</glossterm>
5618 <glossdef>
5619 <para>
5620 Points to a temporary work area used by the
5621 <filename>do_package</filename> task to write output
5622 from the <filename>do_packagedata</filename> task.
5623 The <filename>PKGDESTWORK</filename> location defaults to
5624 the following:
5625 <literallayout class='monospaced'>
5626 ${WORKDIR}/pkgdata
5627 </literallayout>
5628 The <filename>do_packagedata</filename> task then packages
5629 the data in the temporary work area and installs it into a
5630 shared directory pointed to by
5631 <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>.
5632 </para>
5633
5634 <para>
5635 Do not change this default.
5636 </para>
5637 </glossdef>
5638 </glossentry>
5639
5640 <glossentry id='var-PKGE'><glossterm>PKGE</glossterm>
5641 <glossdef>
5642 <para>
5643 The epoch of the output package built by the
5644 OpenEmbedded build system.
5645 By default, <filename>PKGE</filename> is set to
5646 <link linkend='var-PE'><filename>PE</filename></link>.
5647 </para>
5648 </glossdef>
5649 </glossentry>
5650
5651 <glossentry id='var-PKGR'><glossterm>PKGR</glossterm>
5652 <glossdef>
5653 <para>
5654 The revision of the output package built by the
5655 OpenEmbedded build system.
5656 By default, <filename>PKGR</filename> is set to
5657 <link linkend='var-PR'><filename>PR</filename></link>.
5658 </para>
5659 </glossdef>
5660 </glossentry>
5661
5662 <glossentry id='var-PKGV'><glossterm>PKGV</glossterm>
5663 <glossdef>
5664 <para>
5665 The version of the output package built by the
5666 OpenEmbedded build system.
5667 By default, <filename>PKGV</filename> is set to
5668 <link linkend='var-PV'><filename>PV</filename></link>.
5669 </para>
5670 </glossdef>
5671 </glossentry>
5672
5673 <glossentry id='var-PN'><glossterm>PN</glossterm>
5674 <glossdef>
5675 <para>This variable can have two separate functions depending on the context: a recipe
5676 name or a resulting package name.</para>
5677 <para><filename>PN</filename> refers to a recipe name in the context of a file used
5678 by the OpenEmbedded build system as input to create a package.
5679 The name is normally extracted from the recipe file name.
5680 For example, if the recipe is named
5681 <filename>expat_2.0.1.bb</filename>, then the default value of <filename>PN</filename>
5682 will be "expat".</para>
5683 <para>
5684 The variable refers to a package name in the context of a file created or produced by the
5685 OpenEmbedded build system.</para>
5686 <para>If applicable, the <filename>PN</filename> variable also contains any special
5687 suffix or prefix.
5688 For example, using <filename>bash</filename> to build packages for the native
5689 machine, <filename>PN</filename> is <filename>bash-native</filename>.
5690 Using <filename>bash</filename> to build packages for the target and for Multilib,
5691 <filename>PN</filename> would be <filename>bash</filename> and
5692 <filename>lib64-bash</filename>, respectively.
5693 </para>
5694 </glossdef>
5695 </glossentry>
5696
5697 <glossentry id='var-PNBLACKLIST'><glossterm>PNBLACKLIST</glossterm>
5698 <glossdef>
5699 <para>
5700 Lists recipes you do not want the OpenEmbedded build system
5701 to build.
5702 This variable works in conjunction with the
5703 <link linkend='ref-classes-blacklist'><filename>blacklist</filename></link>
5704 class, which the recipe must inherit globally.
5705 </para>
5706
5707 <para>
5708 To prevent a recipe from being built, inherit the class
5709 globally and use the variable in your
5710 <filename>local.conf</filename> file.
5711 Here is an example that prevents
5712 <filename>myrecipe</filename> from being built:
5713 <literallayout class='monospaced'>
5714 INHERIT += "blacklist"
5715 PNBLACKLIST[myrecipe] = "Not supported by our organization."
5716 </literallayout>
5717 </para>
5718 </glossdef>
5719 </glossentry>
5720
5721 <glossentry id='var-PR'><glossterm>PR</glossterm>
5722 <glossdef>
5723 <para>
5724 The revision of the recipe.
5725 The default value for this variable is "r0".
5726 </para>
5727 </glossdef>
5728 </glossentry>
5729
5730 <glossentry id='var-PREFERRED_PROVIDER'><glossterm>PREFERRED_PROVIDER</glossterm>
5731 <glossdef>
5732 <para>
5733 If multiple recipes provide an item, this variable
5734 determines which recipe should be given preference.
5735 You should always suffix the variable with the name of the
5736 provided item, and you should set it to the
5737 <link linkend='var-PN'><filename>PN</filename></link>
5738 of the recipe to which you want to give precedence.
5739 Some examples:
5740 <literallayout class='monospaced'>
5741 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
5742 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
5743 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
5744 </literallayout>
5745 </para>
5746 </glossdef>
5747 </glossentry>
5748
5749 <glossentry id='var-PREFERRED_VERSION'><glossterm>PREFERRED_VERSION</glossterm>
5750 <glossdef>
5751 <para>
5752 If there are multiple versions of recipes available, this
5753 variable determines which recipe should be given preference.
5754 You must always suffix the variable with the
5755 <link linkend='var-PN'><filename>PN</filename></link>
5756 you want to select, and you should set the
5757 <link linkend='var-PV'><filename>PV</filename></link>
5758 accordingly for precedence.
5759 You can use the "<filename>%</filename>" character as a
5760 wildcard to match any number of characters, which can be
5761 useful when specifying versions that contain long revision
5762 numbers that could potentially change.
5763 Here are two examples:
5764 <literallayout class='monospaced'>
5765 PREFERRED_VERSION_python = "2.7.3"
5766 PREFERRED_VERSION_linux-yocto = "3.10%"
5767 </literallayout>
5768 </para>
5769 </glossdef>
5770 </glossentry>
5771
5772 <glossentry id='var-PREMIRRORS'><glossterm>PREMIRRORS</glossterm>
5773 <glossdef>
5774 <para>
5775 Specifies additional paths from which the OpenEmbedded
5776 build system gets source code.
5777 When the build system searches for source code, it first
5778 tries the local download directory.
5779 If that location fails, the build system tries locations
5780 defined by <filename>PREMIRRORS</filename>, the upstream
5781 source, and then locations specified by
5782 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
5783 in that order.
5784 </para>
5785
5786 <para>
5787 Assuming your distribution
5788 (<link linkend='var-DISTRO'><filename>DISTRO</filename></link>)
5789 is "poky", the default value for
5790 <filename>PREMIRRORS</filename> is defined in the
5791 <filename>conf/distro/poky.conf</filename> file in the
5792 <filename>meta-yocto</filename> Git repository.
5793 </para>
5794
5795 <para>
5796 Typically, you could add a specific server for the
5797 build system to attempt before any others by adding
5798 something like the following to the
5799 <filename>local.conf</filename> configuration file in the
5800 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
5801 <literallayout class='monospaced'>
5802 PREMIRRORS_prepend = "\
5803 git://.*/.* http://www.yoctoproject.org/sources/ \n \
5804 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
5805 http://.*/.* http://www.yoctoproject.org/sources/ \n \
5806 https://.*/.* http://www.yoctoproject.org/sources/ \n"
5807 </literallayout>
5808 These changes cause the build system to intercept
5809 Git, FTP, HTTP, and HTTPS requests and direct them to
5810 the <filename>http://</filename> sources mirror.
5811 You can use <filename>file://</filename> URLs to point
5812 to local directories or network shares as well.
5813 </para>
5814 </glossdef>
5815 </glossentry>
5816
5817 <glossentry id='var-PRINC'><glossterm>PRINC</glossterm>
5818 <glossdef>
5819
5820 <para>
5821 The <filename>PRINC</filename> variable has been deprecated
5822 and triggers a warning if detected during a build.
5823 For
5824 <link linkend='var-PR'><filename>PR</filename></link>
5825 increments on changes, use the PR service instead.
5826 You can find out more about this service in the
5827 "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>Working With a PR Service</ulink>"
5828 section in the Yocto Project Development Manual.
5829 </para>
5830<!--
5831
5832 <para>
5833 Causes the
5834 <link linkend='var-PR'><filename>PR</filename></link>
5835 variable of <filename>.bbappend</filename> files to
5836 dynamically increment.
5837 This increment minimizes the impact of layer ordering.
5838 </para>
5839
5840 <para>
5841 In order to ensure multiple <filename>.bbappend</filename>
5842 files can co-exist,
5843 <filename>PRINC</filename> should be self-referencing.
5844 This variable defaults to 0.
5845 </para>
5846
5847 <para>
5848 Following is an example that increments
5849 <filename>PR</filename> by two:
5850 <literallayout class='monospaced'>
5851 PRINC := "${@int(PRINC) + 2}"
5852 </literallayout>
5853 It is advisable not to use strings such as ".= '.1'" with the variable because
5854 this usage is very sensitive to layer ordering.
5855 You should avoid explicit assignments as they cannot
5856 adequately represent multiple
5857 <filename>.bbappend</filename> files.
5858 </para>
5859-->
5860 </glossdef>
5861 </glossentry>
5862
5863 <glossentry id='var-PROVIDES'><glossterm>PROVIDES</glossterm>
5864 <glossdef>
5865 <para>
5866 A list of aliases that a recipe also provides.
5867 These aliases are useful for satisfying dependencies of
5868 other recipes during the build (as specified by
5869 <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename>).
5870 <note>
5871 A recipe's own
5872 <filename><link linkend='var-PN'>PN</link></filename>
5873 is implicitly already in its
5874 <filename>PROVIDES</filename> list.
5875 </note>
5876 </para>
5877 </glossdef>
5878 </glossentry>
5879
5880 <glossentry id='var-PRSERV_HOST'><glossterm>PRSERV_HOST</glossterm>
5881 <glossdef>
5882 <para>
5883 The network based
5884 <link linkend='var-PR'><filename>PR</filename></link>
5885 service host and port.
5886 </para>
5887
5888 <para>
5889 The <filename>conf/local.conf.sample.extended</filename>
5890 configuration file in the
5891 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
5892 shows how the <filename>PRSERV_HOST</filename> variable is
5893 set:
5894 <literallayout class='monospaced'>
5895 PRSERV_HOST = "localhost:0"
5896 </literallayout>
5897 You must set the variable if you want to automatically
5898 start a local
5899 <ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>PR service</ulink>.
5900 You can set <filename>PRSERV_HOST</filename> to other
5901 values to use a remote PR service.
5902 </para>
5903 </glossdef>
5904 </glossentry>
5905
5906 <glossentry id='var-PV'><glossterm>PV</glossterm>
5907 <glossdef>
5908 <para>
5909 The version of the recipe.
5910 The version is normally extracted from the recipe filename.
5911 For example, if the recipe is named
5912 <filename>expat_2.0.1.bb</filename>, then the default value of <filename>PV</filename>
5913 will be "2.0.1".
5914 <filename>PV</filename> is generally not overridden within
5915 a recipe unless it is building an unstable (i.e. development) version from a source code repository
5916 (e.g. Git or Subversion).
5917 </para>
5918 </glossdef>
5919 </glossentry>
5920
5921 <glossentry id='var-PYTHON_ABI'><glossterm>PYTHON_ABI</glossterm>
5922 <glossdef>
5923 <para>
5924 When used by recipes that inherit the
5925 <link linkend='ref-classes-distutils3'><filename>distutils3</filename></link>,
5926 <link linkend='ref-classes-setuptools3'><filename>setuptools3</filename></link>,
5927 <link linkend='ref-classes-distutils'><filename>distutils</filename></link>,
5928 or
5929 <link linkend='ref-classes-setuptools'><filename>setuptools</filename></link>
5930 classes, denotes the Application Binary Interface (ABI)
5931 currently in use for Python.
5932 By default, the ABI is "m".
5933 You do not have to set this variable as the OpenEmbedded
5934 build system sets it for you.
5935 </para>
5936
5937 <para>
5938 The OpenEmbedded build system uses the ABI to construct
5939 directory names used when installing the Python headers
5940 and libraries in sysroot
5941 (e.g. <filename>.../python3.3m/...</filename>).
5942 </para>
5943
5944 <para>
5945 Recipes that inherit the
5946 <link linkend='ref-classes-distutils'><filename>distutils</filename></link>
5947 class during cross-builds also use this variable to
5948 locate the headers and libraries of the appropriate Python
5949 that the extension is targeting.
5950 </para>
5951 </glossdef>
5952 </glossentry>
5953
5954 <glossentry id='var-PYTHON_PN'><glossterm>PYTHON_PN</glossterm>
5955 <glossdef>
5956 <para>
5957 When used by recipes that inherit the
5958 <link linkend='ref-classes-distutils3'><filename>distutils3</filename></link>,
5959 <link linkend='ref-classes-setuptools3'><filename>setuptools3</filename></link>,
5960 <link linkend='ref-classes-distutils'><filename>distutils</filename></link>,
5961 or
5962 <link linkend='ref-classes-setuptools'><filename>setuptools</filename></link>
5963 classes, specifies the major Python version being built.
5964 For Python 2.x, <filename>PYTHON_PN</filename> would
5965 be "python2". For Python 3.x, the variable would be
5966 "python3".
5967 You do not have to set this variable as the
5968 OpenEmbedded build system automatically sets it for you.
5969 </para>
5970
5971 <para>
5972 The variable allows recipes to use common infrastructure
5973 such as the following:
5974 <literallayout class='monospaced'>
5975 DEPENDS += "${PYTHON_PN}-native"
5976 </literallayout>
5977 In the previous example, the version of the dependency
5978 is <filename>PYTHON_PN</filename>.
5979 </para>
5980 </glossdef>
5981 </glossentry>
5982
5983 </glossdiv>
5984
5985 <glossdiv id='var-glossary-q'><title>Q</title>
5986
5987 <glossentry id='var-QMAKE_PROFILES'><glossterm>QMAKE_PROFILES</glossterm>
5988 <glossdef>
5989 <para>
5990 Specifies your own subset of <filename>.pro</filename>
5991 files to be built for use with
5992 <filename>qmake</filename>.
5993 If you do not set this variable, all
5994 <filename>.pro</filename> files in the directory pointed to
5995 by <link linkend='var-S'><filename>S</filename></link>
5996 will be built by default.
5997 </para>
5998
5999 <para>
6000 This variable is used with recipes that inherit the
6001 <link linkend='ref-classes-qmake*'><filename>qmake_base</filename></link>
6002 class or other classes that inherit
6003 <filename>qmake_base</filename>.
6004 </para>
6005 </glossdef>
6006 </glossentry>
6007
6008 </glossdiv>
6009
6010 <glossdiv id='var-glossary-r'><title>R</title>
6011
6012 <glossentry id='var-RCONFLICTS'><glossterm>RCONFLICTS</glossterm>
6013 <glossdef>
6014 <para>
6015 The list of packages that conflict with packages.
6016 Note that packages will not be installed if conflicting
6017 packages are not first removed.
6018 </para>
6019
6020 <para>
6021 Like all package-controlling variables, you must always use
6022 them in conjunction with a package name override.
6023 Here is an example:
6024 <literallayout class='monospaced'>
6025 RCONFLICTS_${PN} = "another-conflicting-package-name"
6026 </literallayout>
6027 </para>
6028
6029 <para>
6030 BitBake, which the OpenEmbedded build system uses, supports
6031 specifying versioned dependencies.
6032 Although the syntax varies depending on the packaging
6033 format, BitBake hides these differences from you.
6034 Here is the general syntax to specify versions with
6035 the <filename>RCONFLICTS</filename> variable:
6036 <literallayout class='monospaced'>
6037 RCONFLICTS_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
6038 </literallayout>
6039 For <filename>operator</filename>, you can specify the
6040 following:
6041 <literallayout class='monospaced'>
6042 =
6043 &lt;
6044 &gt;
6045 &lt;=
6046 &gt;=
6047 </literallayout>
6048 For example, the following sets up a dependency on version
6049 1.2 or greater of the package <filename>foo</filename>:
6050 <literallayout class='monospaced'>
6051 RCONFLICTS_${PN} = "foo (>= 1.2)"
6052 </literallayout>
6053 </para>
6054 </glossdef>
6055 </glossentry>
6056
6057 <glossentry id='var-RDEPENDS'><glossterm>RDEPENDS</glossterm>
6058 <glossdef>
6059 <para>
6060 Lists a package's runtime dependencies (i.e. other packages)
6061 that must be installed in order for the built package to run
6062 correctly.
6063 If a package in this list cannot be found during the build,
6064 you will get a build error.
6065 </para>
6066
6067 <para>
6068 When you use the <filename>RDEPENDS</filename> variable
6069 in a recipe, you are essentially stating that the recipe's
6070 <filename>do_build</filename> task depends on the existence
6071 of a specific package.
6072 Consider this simple example for two recipes named "a" and
6073 "b" that produce similarly named IPK packages.
6074 In this example, the <filename>RDEPENDS</filename>
6075 statement appears in the "a" recipe:
6076 <literallayout class='monospaced'>
6077 RDEPENDS_${PN} = "b"
6078 </literallayout>
6079 Here, the dependency is such that the
6080 <filename>do_build</filename> task for recipe "a" depends
6081 on the <filename>do_package_write_ipk</filename> task
6082 of recipe "b".
6083 This means the package file for "b" must be available when
6084 the output for recipe "a" has been completely built.
6085 More importantly, package "a" will be marked as depending
6086 on package "b" in a manner that is understood by the
6087 package manager.
6088 </para>
6089
6090 <para>
6091 The names of the packages you list within
6092 <filename>RDEPENDS</filename> must be the names of other
6093 packages - they cannot be recipe names.
6094 Although package names and recipe names usually match,
6095 the important point here is that you are
6096 providing package names within the
6097 <filename>RDEPENDS</filename> variable.
6098 For an example of the default list of packages created from
6099 a recipe, see the
6100 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
6101 variable.
6102 </para>
6103
6104 <para>
6105 Because the <filename>RDEPENDS</filename> variable applies
6106 to packages being built, you should always use the variable
6107 in a form with an attached package name.
6108 For example, suppose you are building a development package
6109 that depends on the <filename>perl</filename> package.
6110 In this case, you would use the following
6111 <filename>RDEPENDS</filename> statement:
6112 <literallayout class='monospaced'>
6113 RDEPENDS_${PN}-dev += "perl"
6114 </literallayout>
6115 In the example, the development package depends on
6116 the <filename>perl</filename> package.
6117 Thus, the <filename>RDEPENDS</filename> variable has the
6118 <filename>${PN}-dev</filename> package name as part of the
6119 variable.
6120 </para>
6121
6122 <para>
6123 The package name you attach to the
6124 <filename>RDEPENDS</filename> variable must appear
6125 as it would in the <filename>PACKAGES</filename>
6126 namespace before any renaming of the output package by
6127 classes like <filename>debian.bbclass</filename>.
6128 </para>
6129
6130 <para>
6131 In many cases you do not need to explicitly add
6132 runtime dependencies using
6133 <filename>RDEPENDS</filename> since some automatic
6134 handling occurs:
6135 <itemizedlist>
6136 <listitem><para><emphasis><filename>shlibdeps</filename></emphasis>: If
6137 a runtime package contains a shared library
6138 (<filename>.so</filename>), the build
6139 processes the library in order to determine other
6140 libraries to which it is dynamically linked.
6141 The build process adds these libraries to
6142 <filename>RDEPENDS</filename> when creating the runtime
6143 package.</para></listitem>
6144 <listitem><para><emphasis><filename>pcdeps</filename></emphasis>: If
6145 the package ships a <filename>pkg-config</filename>
6146 information file, the build process uses this file
6147 to add items to the <filename>RDEPENDS</filename>
6148 variable to create the runtime packages.
6149 </para></listitem>
6150 </itemizedlist>
6151 </para>
6152
6153 <para>
6154 BitBake, which the OpenEmbedded build system uses, supports
6155 specifying versioned dependencies.
6156 Although the syntax varies depending on the packaging
6157 format, BitBake hides these differences from you.
6158 Here is the general syntax to specify versions with
6159 the <filename>RDEPENDS</filename> variable:
6160 <literallayout class='monospaced'>
6161 RDEPENDS_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
6162 </literallayout>
6163 For <filename>operator</filename>, you can specify the
6164 following:
6165 <literallayout class='monospaced'>
6166 =
6167 &lt;
6168 &gt;
6169 &lt;=
6170 &gt;=
6171 </literallayout>
6172 For example, the following sets up a dependency on version
6173 1.2 or greater of the package <filename>foo</filename>:
6174 <literallayout class='monospaced'>
6175 RDEPENDS_${PN} = "foo (>= 1.2)"
6176 </literallayout>
6177 </para>
6178
6179 <para>
6180 For information on build-time dependencies, see the
6181 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
6182 variable.
6183 </para>
6184 </glossdef>
6185 </glossentry>
6186
6187 <glossentry id='var-REQUIRED_DISTRO_FEATURES'><glossterm>REQUIRED_DISTRO_FEATURES</glossterm>
6188 <glossdef>
6189 <para>
6190 When a recipe inherits the
6191 <filename>distro_features_check</filename> class, this
6192 variable identifies distribution features that must
6193 exist in the current configuration in order for the
6194 OpenEmbedded build system to build the recipe.
6195 In other words, if the
6196 <filename>REQUIRED_DISTRO_FEATURES</filename> variable
6197 lists a feature that does not appear in
6198 <filename>DISTRO_FEATURES</filename> within the
6199 current configuration, an error occurs and the
6200 build stops.
6201 </para>
6202 </glossdef>
6203 </glossentry>
6204
6205 <glossentry id='var-RM_OLD_IMAGE'><glossterm>RM_OLD_IMAGE</glossterm>
6206 <glossdef>
6207 <para>
6208 Reclaims disk space by removing previously built
6209 versions of the same image from the
6210 <filename>images</filename> directory pointed to by the
6211 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>
6212 variable.
6213 </para>
6214
6215 <para>
6216 Set this variable to "1" in your
6217 <filename>local.conf</filename> file to remove these
6218 images.
6219 </para>
6220 </glossdef>
6221 </glossentry>
6222
6223 <glossentry id='var-RM_WORK_EXCLUDE'><glossterm>RM_WORK_EXCLUDE</glossterm>
6224 <glossdef>
6225 <para>
6226 With <filename>rm_work</filename> enabled, this
6227 variable specifies a list of recipes whose work directories
6228 should not be removed.
6229 See the "<link linkend='ref-classes-rm-work'><filename>rm_work.bbclass</filename></link>"
6230 section for more details.
6231 </para>
6232 </glossdef>
6233 </glossentry>
6234
6235 <glossentry id='var-ROOT_HOME'><glossterm>ROOT_HOME</glossterm>
6236 <glossdef>
6237 <para>
6238 Defines the root home directory.
6239 By default, this directory is set as follows in the
6240 BitBake configuration file:
6241 <literallayout class='monospaced'>
6242 ROOT_HOME ??= "/home/root"
6243 </literallayout>
6244 <note>
6245 This default value is likely used because some
6246 embedded solutions prefer to have a read-only root
6247 filesystem and prefer to keep writeable data in one
6248 place.
6249 </note>
6250 </para>
6251
6252 <para>
6253 You can override the default by setting the variable
6254 in any layer or in the <filename>local.conf</filename> file.
6255 Because the default is set using a "weak" assignment
6256 (i.e. "??="), you can use either of the following forms
6257 to define your override:
6258 <literallayout class='monospaced'>
6259 ROOT_HOME = "/root"
6260 ROOT_HOME ?= "/root"
6261 </literallayout>
6262 These override examples use <filename>/root</filename>,
6263 which is probably the most commonly used override.
6264 </para>
6265 </glossdef>
6266 </glossentry>
6267
6268 <glossentry id='var-ROOTFS'><glossterm>ROOTFS</glossterm>
6269 <glossdef>
6270 <para>
6271 Indicates a filesystem image to include as the root
6272 filesystem.
6273 </para>
6274
6275 <para>
6276 The <filename>ROOTFS</filename> variable is an optional
6277 variable used with the
6278 <link linkend='ref-classes-bootimg'><filename>buildimg</filename></link>
6279 class.
6280 </para>
6281 </glossdef>
6282 </glossentry>
6283
6284 <glossentry id='var-ROOTFS_POSTPROCESS_COMMAND'><glossterm>ROOTFS_POSTPROCESS_COMMAND</glossterm>
6285 <glossdef>
6286 <para>
6287 Added by classes to run post processing commands once the
6288 OpenEmbedded build system has created the root filesystem.
6289 You can specify shell commands separated by semicolons:
6290 <literallayout class='monospaced'>
6291 ROOTFS_POSTPROCESS_COMMAND += "&lt;shell_command&gt;; ... "
6292 </literallayout>
6293 If you need to pass the path to the root filesystem within
6294 the command, you can use
6295 <filename>${IMAGE_ROOTFS}</filename>, which points to
6296 the root filesystem image.
6297 </para>
6298 </glossdef>
6299 </glossentry>
6300
6301 <glossentry id='var-RPROVIDES'><glossterm>RPROVIDES</glossterm>
6302 <glossdef>
6303 <para>
6304 A list of package name aliases that a package also provides.
6305 These aliases are useful for satisfying runtime dependencies
6306 of other packages both during the build and on the target
6307 (as specified by
6308 <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename>).
6309 <note>
6310 A package's own name is implicitly already in its
6311 <filename>RPROVIDES</filename> list.
6312 </note>
6313 </para>
6314 <para>
6315 As with all package-controlling variables, you must always
6316 use the variable in conjunction with a package name override.
6317 Here is an example:
6318 <literallayout class='monospaced'>
6319 RPROVIDES_${PN} = "widget-abi-2"
6320 </literallayout>
6321 </para>
6322 </glossdef>
6323 </glossentry>
6324
6325 <glossentry id='var-RRECOMMENDS'><glossterm>RRECOMMENDS</glossterm>
6326 <glossdef>
6327 <para>
6328 A list of packages that extends the usability of a package
6329 being built.
6330 The package being built does not depend on this list of
6331 packages in order to successfully build, but needs them for
6332 the extended usability.
6333 To specify runtime dependencies for packages, see the
6334 <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename>
6335 variable.
6336 </para>
6337
6338 <para>
6339 The OpenEmbedded build process automatically installs the
6340 list of packages as part of the built package.
6341 However, you can remove these packages later if you want.
6342 If, during the build, a package from the
6343 <filename>RRECOMMENDS</filename> list cannot be
6344 found, the build process continues without an error.
6345 </para>
6346
6347 <para>
6348 You can also prevent packages in the list from being
6349 installed by using several variables.
6350 See the
6351 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>,
6352 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>,
6353 and
6354 <link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
6355 variables for more information.
6356 </para>
6357
6358 <para>
6359 Because the <filename>RRECOMMENDS</filename> variable
6360 applies to packages being built, you should always attach
6361 an override to the variable to specify the particular
6362 package whose usability is being extended.
6363 For example, suppose you are building a development package
6364 that is extended to support wireless functionality.
6365 In this case, you would use the following:
6366 <literallayout class='monospaced'>
6367 RRECOMMENDS_${PN}-dev += "&lt;wireless_package_name&gt;"
6368 </literallayout>
6369 In the example, the package name
6370 (<filename>${<link linkend='var-PN'>PN</link>}-dev</filename>)
6371 must appear as it would in the
6372 <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
6373 namespace before any renaming of the output package by
6374 classes such as <filename>debian.bbclass</filename>.
6375 </para>
6376
6377 <para>
6378 BitBake, which the OpenEmbedded build system uses, supports
6379 specifying versioned recommends.
6380 Although the syntax varies depending on the packaging
6381 format, BitBake hides these differences from you.
6382 Here is the general syntax to specify versions with
6383 the <filename>RRECOMMENDS</filename> variable:
6384 <literallayout class='monospaced'>
6385 RRECOMMENDS_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
6386 </literallayout>
6387 For <filename>operator</filename>, you can specify the
6388 following:
6389 <literallayout class='monospaced'>
6390 =
6391 &lt;
6392 &gt;
6393 &lt;=
6394 &gt;=
6395 </literallayout>
6396 For example, the following sets up a recommend on version
6397 1.2 or greater of the package <filename>foo</filename>:
6398 <literallayout class='monospaced'>
6399 RRECOMMENDS_${PN} = "foo (>= 1.2)"
6400 </literallayout>
6401 </para>
6402 </glossdef>
6403 </glossentry>
6404
6405 <glossentry id='var-RREPLACES'><glossterm>RREPLACES</glossterm>
6406 <glossdef>
6407 <para>
6408 A list of packages replaced by a package.
6409 The package manager uses this variable to determine which
6410 package should be installed to replace other package(s)
6411 during an upgrade.
6412 In order to also have the other package(s) removed at the
6413 same time, you must add the name of the other
6414 package to the
6415 <filename><link linkend='var-RCONFLICTS'>RCONFLICTS</link></filename> variable.
6416 </para>
6417 <para>
6418 As with all package-controlling variables, you must use
6419 this variable in conjunction with a package name
6420 override.
6421 Here is an example:
6422 <literallayout class='monospaced'>
6423 RREPLACES_${PN} = "other-package-being-replaced"
6424 </literallayout>
6425 </para>
6426
6427 <para>
6428 BitBake, which the OpenEmbedded build system uses, supports
6429 specifying versioned replacements.
6430 Although the syntax varies depending on the packaging
6431 format, BitBake hides these differences from you.
6432 Here is the general syntax to specify versions with
6433 the <filename>RREPLACES</filename> variable:
6434 <literallayout class='monospaced'>
6435 RREPLACES_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
6436 </literallayout>
6437 For <filename>operator</filename>, you can specify the
6438 following:
6439 <literallayout class='monospaced'>
6440 =
6441 &lt;
6442 &gt;
6443 &lt;=
6444 &gt;=
6445 </literallayout>
6446 For example, the following sets up a replacement using
6447 version 1.2 or greater of the package
6448 <filename>foo</filename>:
6449 <literallayout class='monospaced'>
6450 RREPLACES_${PN} = "foo (>= 1.2)"
6451 </literallayout>
6452 </para>
6453 </glossdef>
6454 </glossentry>
6455
6456 <glossentry id='var-RSUGGESTS'><glossterm>RSUGGESTS</glossterm>
6457 <glossdef>
6458 <para>
6459 A list of additional packages that you can suggest for
6460 installation by the package manager at the time a package
6461 is installed.
6462 Not all package managers support this functionality.
6463 </para>
6464 <para>
6465 As with all package-controlling variables, you must always
6466 use this variable in conjunction with a package name
6467 override.
6468 Here is an example:
6469 <literallayout class='monospaced'>
6470 RSUGGESTS_${PN} = "useful-package another-package"
6471 </literallayout>
6472 </para>
6473 </glossdef>
6474 </glossentry>
6475
6476 </glossdiv>
6477
6478 <glossdiv id='var-glossary-s'><title>S</title>
6479
6480 <glossentry id='var-S'><glossterm>S</glossterm>
6481 <glossdef>
6482 <para>
6483 The location in the
6484 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
6485 where unpacked recipe source code resides.
6486 This location is within the work directory
6487 (<filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>),
6488 which is not static.
6489 The unpacked source location depends on the recipe name
6490 (<filename><link linkend='var-PN'>PN</link></filename>) and
6491 recipe version
6492 (<filename><link linkend='var-PV'>PV</link></filename>) as
6493 follows:
6494 <literallayout class='monospaced'>
6495 ${WORKDIR}/${PN}-${PV}
6496 </literallayout>
6497 As an example, assume a
6498 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
6499 top-level folder named <filename>poky</filename> and a
6500 default Build Directory at <filename>poky/build</filename>.
6501 In this case, the work directory the build system uses
6502 to keep the unpacked recipe for <filename>db</filename>
6503 is the following:
6504 <literallayout class='monospaced'>
6505 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
6506 </literallayout>
6507 </para>
6508 </glossdef>
6509 </glossentry>
6510
6511 <glossentry id='var-SANITY_TESTED_DISTROS'><glossterm>SANITY_TESTED_DISTROS</glossterm>
6512 <glossdef>
6513 <para>
6514 A list of the host distribution identifiers that the
6515 build system has been tested against.
6516 Identifiers consist of the host distributor ID
6517 followed by the release,
6518 as reported by the <filename>lsb_release</filename> tool
6519 or as read from <filename>/etc/lsb-release</filename>.
6520 Separate the list items with explicit newline
6521 characters (<filename>\n</filename>).
6522 If <filename>SANITY_TESTED_DISTROS</filename> is not empty
6523 and the current value of
6524 <link linkend='var-NATIVELSBSTRING'><filename>NATIVELSBSTRING</filename></link>
6525 does not appear in the list, then the build system reports
6526 a warning that indicates the current host distribution has
6527 not been tested as a build host.
6528 </para>
6529 </glossdef>
6530 </glossentry>
6531
6532 <glossentry id='var-SDK_ARCH'><glossterm>SDK_ARCH</glossterm>
6533 <glossdef>
6534 <para>
6535 The target architecture for the SDK.
6536 Typically, you do not directly set this variable.
6537 Instead, use
6538 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>.
6539 </para>
6540 </glossdef>
6541 </glossentry>
6542
6543 <glossentry id='var-SDK_DEPLOY'><glossterm>SDK_DEPLOY</glossterm>
6544 <glossdef>
6545 <para>
6546 The directory set up and used by the
6547 <link linkend='ref-classes-populate-sdk'><filename>populate_sdk_base</filename></link>
6548 to which the SDK is deployed.
6549 The <filename>populate_sdk_base</filename> class defines
6550 <filename>SDK_DEPLOY</filename> as follows:
6551 <literallayout class='monospaced'>
6552 SDK_DEPLOY = "${<link linkend='var-TMPDIR'>TMPDIR</link>}/deploy/sdk"
6553 </literallayout>
6554 </para>
6555 </glossdef>
6556 </glossentry>
6557
6558 <glossentry id='var-SDK_DIR'><glossterm>SDK_DIR</glossterm>
6559 <glossdef>
6560 <para>
6561 The parent directory used by the OpenEmbedded build system
6562 when creating SDK output.
6563 The
6564 <link linkend='ref-classes-populate-sdk-*'><filename>populate_sdk_base</filename></link>
6565 class defines the variable as follows:
6566 <literallayout class='monospaced'>
6567 SDK_DIR = "${<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>}/sdk"
6568 </literallayout>
6569 <note>
6570 The <filename>SDK_DIR</filename> directory is a
6571 temporary directory as it is part of
6572 <filename>WORKDIR</filename>.
6573 The final output directory is
6574 <link linkend='var-SDK_DEPLOY'><filename>SDK_DEPLOY</filename></link>.
6575 </note>
6576 </para>
6577 </glossdef>
6578 </glossentry>
6579
6580 <glossentry id='var-SDK_NAME'><glossterm>SDK_NAME</glossterm>
6581 <glossdef>
6582 <para>
6583 The base name for SDK output files.
6584 The name is derived from the
6585 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>,
6586 <link linkend='var-TCLIBC'><filename>TCLIBC</filename></link>,
6587 <link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link>,
6588 <link linkend='var-IMAGE_BASENAME'><filename>IMAGE_BASENAME</filename></link>,
6589 and
6590 <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link>
6591 variables:
6592 <literallayout class='monospaced'>
6593 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
6594 </literallayout>
6595 </para>
6596 </glossdef>
6597 </glossentry>
6598
6599 <glossentry id='var-SDK_OUTPUT'><glossterm>SDK_OUTPUT</glossterm>
6600 <glossdef>
6601 <para>
6602 The location used by the OpenEmbedded build system when
6603 creating SDK output.
6604 The
6605 <link linkend='ref-classes-populate-sdk-*'><filename>populate_sdk_base</filename></link>
6606 class defines the variable as follows:
6607 <literallayout class='monospaced'>
6608 SDK_OUTPUT = "${<link linkend='var-SDK_DIR'>SDK_DIR</link>}/image"
6609 </literallayout>
6610 <note>
6611 The <filename>SDK_OUTPUT</filename> directory is a
6612 temporary directory as it is part of
6613 <filename>WORKDIR</filename> by way of
6614 <filename>SDK_DIR</filename>.
6615 The final output directory is
6616 <link linkend='var-SDK_DEPLOY'><filename>SDK_DEPLOY</filename></link>.
6617 </note>
6618
6619 </para>
6620 </glossdef>
6621 </glossentry>
6622
6623 <glossentry id='var-SDKIMAGE_FEATURES'><glossterm>SDKIMAGE_FEATURES</glossterm>
6624 <glossdef>
6625 <para>Equivalent to
6626 <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>.
6627 However, this variable applies to the SDK generated from an
6628 image using the following command:
6629 <literallayout class='monospaced'>
6630 $ bitbake -c populate_sdk imagename
6631 </literallayout>
6632 </para>
6633 </glossdef>
6634 </glossentry>
6635
6636 <glossentry id='var-SDKMACHINE'><glossterm>SDKMACHINE</glossterm>
6637 <glossdef>
6638 <para>
6639 The architecture of the machine that runs Application
6640 Development Toolkit (ADT) items.
6641 In other words, packages are built so that they will run
6642 on the target you specify with the argument.
6643 This implies that you can build out ADT/SDK items that
6644 run on an architecture other than that of your build host.
6645 For example, you can use an x86_64-based build host to
6646 create packages that will run on an i686-based
6647 SDK Machine.
6648 </para>
6649
6650 <para>
6651 You can use "i686" and "x86_64" as possible values for this
6652 variable.
6653 The variable defaults to "i686" and is set in the
6654 <filename>local.conf</filename> file in the
6655 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
6656 <literallayout class='monospaced'>
6657 SDKMACHINE ?= "i686"
6658 </literallayout>
6659 <note>
6660 You cannot set the <filename>SDKMACHINE</filename>
6661 variable in your distribution configuration file.
6662 If you do, the configuration will not take affect.
6663 </note>
6664 </para>
6665 </glossdef>
6666 </glossentry>
6667
6668 <glossentry id='var-SDKPATH'><glossterm>SDKPATH</glossterm>
6669 <glossdef>
6670 <para>
6671 Defines the path offered to the user for installation
6672 of the SDK that is generated by the OpenEmbedded build
6673 system.
6674 The path appears as the default location for installing
6675 the SDK when you run the SDK's installation script.
6676 You can override the offered path when you run the
6677 script.
6678 </para>
6679 </glossdef>
6680 </glossentry>
6681
6682 <glossentry id='var-SECTION'><glossterm>SECTION</glossterm>
6683 <glossdef>
6684 <para>The section in which packages should be categorized.
6685 Package management utilities can make use of this variable.</para>
6686 </glossdef>
6687 </glossentry>
6688
6689 <glossentry id='var-SELECTED_OPTIMIZATION'><glossterm>SELECTED_OPTIMIZATION</glossterm>
6690 <glossdef>
6691 <para>
6692 The variable takes the value of
6693 <filename><link linkend='var-FULL_OPTIMIZATION'>FULL_OPTIMIZATION</link></filename>
6694 unless <filename><link linkend='var-DEBUG_BUILD'>DEBUG_BUILD</link></filename> = "1".
6695 In this case the value of
6696 <filename><link linkend='var-DEBUG_OPTIMIZATION'>DEBUG_OPTIMIZATION</link></filename> is used.
6697 </para>
6698 </glossdef>
6699 </glossentry>
6700
6701 <glossentry id='var-SERIAL_CONSOLE'><glossterm>SERIAL_CONSOLE</glossterm>
6702 <glossdef>
6703 <para>
6704 Defines a serial console (TTY) to enable using getty.
6705 Provide a value that specifies the baud rate followed by
6706 the TTY device name separated by a space.
6707 You cannot specify more than one TTY device:
6708 <literallayout class='monospaced'>
6709 SERIAL_CONSOLE = "115200 ttyS0"
6710 </literallayout>
6711 <note>
6712 The <filename>SERIAL_CONSOLE</filename> variable
6713 is deprecated.
6714 Please use the
6715 <link linkend='var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></link>
6716 variable.
6717 </note>
6718 </para>
6719 </glossdef>
6720 </glossentry>
6721
6722 <glossentry id='var-SERIAL_CONSOLES'><glossterm>SERIAL_CONSOLES</glossterm>
6723 <glossdef>
6724 <para>
6725 Defines the serial consoles (TTYs) to enable using getty.
6726 Provide a value that specifies the baud rate followed by
6727 the TTY device name separated by a semicolon.
6728 Use spaces to separate multiple devices:
6729 <literallayout class='monospaced'>
6730 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
6731 </literallayout>
6732 </para>
6733 </glossdef>
6734 </glossentry>
6735
6736 <glossentry id='var-SERIAL_CONSOLES_CHECK'><glossterm>SERIAL_CONSOLES_CHECK</glossterm>
6737 <glossdef>
6738 <para>
6739 Similar to
6740 <link linkend='var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></link>
6741 except the device is checked for existence before attempting
6742 to enable it.
6743 This variable is currently only supported with SysVinit
6744 (i.e. not with systemd).
6745 </para>
6746 </glossdef>
6747 </glossentry>
6748
6749 <glossentry id='var-SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS'><glossterm>SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS</glossterm>
6750 <glossdef>
6751 <para>
6752 A list of recipe dependencies that should not be used to
6753 determine signatures of tasks from one recipe when they
6754 depend on tasks from another recipe.
6755 For example:
6756 <literallayout class='monospaced'>
6757 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
6758 </literallayout>
6759 In this example, <filename>intone</filename> depends on
6760 <filename>mplayer2</filename>.
6761 </para>
6762
6763 <para>
6764 Use of this variable is one mechanism to remove dependencies
6765 that affect task signatures and thus force rebuilds when a
6766 recipe changes.
6767 <note><title>Caution</title>
6768 If you add an inappropriate dependency for a recipe
6769 relationship, the software might break during
6770 runtime if the interface of the second recipe was
6771 changed after the first recipe had been built.
6772 </note>
6773 </para>
6774 </glossdef>
6775 </glossentry>
6776
6777 <glossentry id='var-SIGGEN_EXCLUDERECIPES_ABISAFE'><glossterm>SIGGEN_EXCLUDERECIPES_ABISAFE</glossterm>
6778 <glossdef>
6779 <para>
6780 A list of recipes that are completely stable and will
6781 never change.
6782 The ABI for the recipes in the list are presented by
6783 output from the tasks run to build the recipe.
6784 Use of this variable is one way to remove dependencies from
6785 one recipe on another that affect task signatures and
6786 thus force rebuilds when the recipe changes.
6787 <note><title>Caution</title>
6788 If you add an inappropriate variable to this list,
6789 the software might break at runtime if the
6790 interface of the recipe was changed after the other
6791 had been built.
6792 </note>
6793 </para>
6794 </glossdef>
6795 </glossentry>
6796
6797 <glossentry id='var-SITEINFO_BITS'><glossterm>SITEINFO_BITS</glossterm>
6798 <glossdef>
6799 <para>
6800 Specifies the number of bits for the target system CPU.
6801 The value should be either "32" or "64".
6802 </para>
6803 </glossdef>
6804 </glossentry>
6805
6806 <glossentry id='var-SITEINFO_ENDIANNESS'><glossterm>SITEINFO_ENDIANNESS</glossterm>
6807 <glossdef>
6808 <para>
6809 Specifies the endian byte order of the target system.
6810 The value should be either "le" for little-endian or "be" for big-endian.
6811 </para>
6812 </glossdef>
6813 </glossentry>
6814
6815 <glossentry id='var-SOC_FAMILY'><glossterm>SOC_FAMILY</glossterm>
6816 <glossdef>
6817 <para>
6818 Groups together machines based upon the same family
6819 of SOC (System On Chip).
6820 You typically set this variable in a common
6821 <filename>.inc</filename> file that you include in the
6822 configuration files of all the machines.
6823 <note>
6824 You must include
6825 <filename>conf/machine/include/soc-family.inc</filename>
6826 for this variable to appear in
6827 <link linkend='var-MACHINEOVERRIDES'><filename>MACHINEOVERRIDES</filename></link>.
6828 </note>
6829 </para>
6830 </glossdef>
6831 </glossentry>
6832
6833 <glossentry id='var-SOLIBS'><glossterm>SOLIBS</glossterm>
6834 <glossdef>
6835 <para>
6836 Defines the suffix for shared libraries used on the
6837 target platform.
6838 By default, this suffix is ".so.*" for all Linux-based
6839 systems and is defined in the
6840 <filename>meta/conf/bitbake.conf</filename> configuration
6841 file.
6842 </para>
6843
6844 <para>
6845 You will see this variable referenced in the default values
6846 of <filename>FILES_${PN}</filename>.
6847 </para>
6848 </glossdef>
6849 </glossentry>
6850
6851 <glossentry id='var-SOLIBSDEV'><glossterm>SOLIBSDEV</glossterm>
6852 <glossdef>
6853 <para>
6854 Defines the suffix for the development symbolic link
6855 (symlink) for shared libraries on the target platform.
6856 By default, this suffix is ".so" for Linux-based
6857 systems and is defined in the
6858 <filename>meta/conf/bitbake.conf</filename> configuration
6859 file.
6860 </para>
6861
6862 <para>
6863 You will see this variable referenced in the default values
6864 of <filename>FILES_${PN}-dev</filename>.
6865 </para>
6866 </glossdef>
6867 </glossentry>
6868
6869 <glossentry id='var-SOURCE_MIRROR_URL'><glossterm>SOURCE_MIRROR_URL</glossterm>
6870 <glossdef>
6871 <para>
6872 Defines your own
6873 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
6874 from which to first fetch source before attempting to fetch
6875 from the upstream specified in
6876 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>.
6877 </para>
6878
6879 <para>
6880 To use this variable, you must globally inherit the
6881 <link linkend='ref-classes-own-mirrors'><filename>own-mirrors</filename></link>
6882 class and then provide the URL to your mirrors.
6883 Here is an example:
6884 <literallayout class='monospaced'>
6885 INHERIT += "own-mirrors"
6886 SOURCE_MIRROR_URL = "http://example.com/my-source-mirror"
6887 </literallayout>
6888 <note>
6889 You can specify only a single URL in
6890 <filename>SOURCE_MIRROR_URL</filename>.
6891 </note>
6892 </para>
6893 </glossdef>
6894 </glossentry>
6895
6896 <glossentry id='var-SPDXLICENSEMAP'><glossterm>SPDXLICENSEMAP</glossterm>
6897 <glossdef>
6898 <para>
6899 Maps commonly used license names to their SPDX counterparts
6900 found in <filename>meta/files/common-licenses/</filename>.
6901 For the default <filename>SPDXLICENSEMAP</filename>
6902 mappings, see the
6903 <filename>meta/conf/licenses.conf</filename> file.
6904 </para>
6905
6906 <para>
6907 For additional information, see the
6908 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
6909 variable.
6910 </para>
6911 </glossdef>
6912 </glossentry>
6913
6914 <glossentry id='var-SPECIAL_PKGSUFFIX'><glossterm>SPECIAL_PKGSUFFIX</glossterm>
6915 <glossdef>
6916 <para>
6917 A list of prefixes for <link linkend='var-PN'><filename>PN</filename></link> used by the
6918 OpenEmbedded build system to create variants of recipes or packages.
6919 The list specifies the prefixes to strip off during certain circumstances
6920 such as the generation of the <link linkend='var-BPN'><filename>BPN</filename></link> variable.
6921 </para>
6922 </glossdef>
6923 </glossentry>
6924
6925 <glossentry id='var-SRC_URI'><glossterm>SRC_URI</glossterm>
6926 <glossdef>
6927 <para>The list of source files - local or remote.
6928 This variable tells the OpenEmbedded build system which bits
6929 to pull in for the build and how to pull them in.
6930 For example, if the recipe or append file only needs to
6931 fetch a tarball from the Internet, the recipe or
6932 append file uses a single <filename>SRC_URI</filename>
6933 entry.
6934 On the other hand, if the recipe or append file needs to
6935 fetch a tarball, apply two patches, and include a custom
6936 file, the recipe or append file would include four
6937 instances of the variable.</para>
6938 <para>The following list explains the available URI protocols:
6939 <itemizedlist>
6940 <listitem><para><emphasis><filename>file://</filename> -</emphasis>
6941 Fetches files, which are usually files shipped with
6942 the
6943 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>,
6944 from the local machine.
6945 The path is relative to the
6946 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
6947 variable.
6948 Thus, the build system searches, in order, from the
6949 following directories, which are assumed to be a
6950 subdirectories of the directory in which the
6951 recipe file (<filename>.bb</filename>) or
6952 append file (<filename>.bbappend</filename>)
6953 resides:
6954 <itemizedlist>
6955 <listitem><para><emphasis><filename>${BPN}</filename> -</emphasis>
6956 The base recipe name without any special
6957 suffix or version numbers.
6958 </para></listitem>
6959 <listitem><para><emphasis><filename>${BP}</filename> -</emphasis>
6960 <filename>${<link linkend='var-BPN'>BPN</link>}-${PV}</filename>.
6961 The base recipe name and version but without
6962 any special package name suffix.
6963 </para></listitem>
6964 <listitem><para><emphasis>files -</emphasis>
6965 Files within a directory, which is named
6966 <filename>files</filename> and is also
6967 alongside the recipe or append file.
6968 </para></listitem>
6969 </itemizedlist>
6970 <note>
6971 If you want the build system to pick up files
6972 specified through a
6973 <filename>SRC_URI</filename>
6974 statement from your append file, you need to be
6975 sure to extend the
6976 <filename>FILESPATH</filename>
6977 variable by also using the
6978 <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
6979 variable from within your append file.
6980 </note>
6981 </para></listitem>
6982 <listitem><para><emphasis><filename>bzr://</filename> -</emphasis> Fetches files from a
6983 Bazaar revision control repository.</para></listitem>
6984 <listitem><para><emphasis><filename>git://</filename> -</emphasis> Fetches files from a
6985 Git revision control repository.</para></listitem>
6986 <listitem><para><emphasis><filename>osc://</filename> -</emphasis> Fetches files from
6987 an OSC (OpenSUSE Build service) revision control repository.</para></listitem>
6988 <listitem><para><emphasis><filename>repo://</filename> -</emphasis> Fetches files from
6989 a repo (Git) repository.</para></listitem>
6990 <listitem><para><emphasis><filename>svk://</filename> -</emphasis> Fetches files from
6991 an SVK revision control repository.</para></listitem>
6992 <listitem><para><emphasis><filename>http://</filename> -</emphasis> Fetches files from
6993 the Internet using <filename>http</filename>.</para></listitem>
6994 <listitem><para><emphasis><filename>https://</filename> -</emphasis> Fetches files
6995 from the Internet using <filename>https</filename>.</para></listitem>
6996 <listitem><para><emphasis><filename>ftp://</filename> -</emphasis> Fetches files
6997 from the Internet using <filename>ftp</filename>.</para></listitem>
6998 <listitem><para><emphasis><filename>cvs://</filename> -</emphasis> Fetches files from
6999 a CVS revision control repository.</para></listitem>
7000 <listitem><para><emphasis><filename>hg://</filename> -</emphasis> Fetches files from
7001 a Mercurial (<filename>hg</filename>) revision control repository.</para></listitem>
7002 <listitem><para><emphasis><filename>p4://</filename> -</emphasis> Fetches files from
7003 a Perforce (<filename>p4</filename>) revision control repository.</para></listitem>
7004 <listitem><para><emphasis><filename>ssh://</filename> -</emphasis> Fetches files from
7005 a secure shell.</para></listitem>
7006 <listitem><para><emphasis><filename>svn://</filename> -</emphasis> Fetches files from
7007 a Subversion (<filename>svn</filename>) revision control repository.</para></listitem>
7008 </itemizedlist>
7009 </para>
7010 <para>Standard and recipe-specific options for <filename>SRC_URI</filename> exist.
7011 Here are standard options:
7012 <itemizedlist>
7013 <listitem><para><emphasis><filename>apply</filename> -</emphasis> Whether to apply
7014 the patch or not.
7015 The default action is to apply the patch.</para></listitem>
7016 <listitem><para><emphasis><filename>striplevel</filename> -</emphasis> Which
7017 striplevel to use when applying the patch.
7018 The default level is 1.</para></listitem>
7019 <listitem><para><emphasis><filename>patchdir</filename> -</emphasis> Specifies
7020 the directory in which the patch should be applied.
7021 The default is <filename>${</filename><link linkend='var-S'><filename>S</filename></link><filename>}</filename>.
7022 </para></listitem>
7023 </itemizedlist>
7024 </para>
7025 <para>Here are options specific to recipes building code from a revision control system:
7026 <itemizedlist>
7027 <listitem><para><emphasis><filename>mindate</filename> -</emphasis>
7028 Apply the patch only if
7029 <link linkend='var-SRCDATE'><filename>SRCDATE</filename></link>
7030 is equal to or greater than <filename>mindate</filename>.
7031 </para></listitem>
7032 <listitem><para><emphasis><filename>maxdate</filename> -</emphasis>
7033 Apply the patch only if <filename>SRCDATE</filename>
7034 is not later than <filename>mindate</filename>.
7035 </para></listitem>
7036 <listitem><para><emphasis><filename>minrev</filename> -</emphasis>
7037 Apply the patch only if <filename>SRCREV</filename>
7038 is equal to or greater than <filename>minrev</filename>.
7039 </para></listitem>
7040 <listitem><para><emphasis><filename>maxrev</filename> -</emphasis>
7041 Apply the patch only if <filename>SRCREV</filename>
7042 is not later than <filename>maxrev</filename>.
7043 </para></listitem>
7044 <listitem><para><emphasis><filename>rev</filename> -</emphasis>
7045 Apply the patch only if <filename>SRCREV</filename>
7046 is equal to <filename>rev</filename>.
7047 </para></listitem>
7048 <listitem><para><emphasis><filename>notrev</filename> -</emphasis>
7049 Apply the patch only if <filename>SRCREV</filename>
7050 is not equal to <filename>rev</filename>.
7051 </para></listitem>
7052 </itemizedlist>
7053 </para>
7054 <para>Here are some additional options worth mentioning:
7055 <itemizedlist>
7056 <listitem><para><emphasis><filename>unpack</filename> -</emphasis> Controls
7057 whether or not to unpack the file if it is an archive.
7058 The default action is to unpack the file.</para></listitem>
7059 <listitem><para><emphasis><filename>subdir</filename> -</emphasis> Places the file
7060 (or extracts its contents) into the specified
7061 subdirectory of <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
7062 This option is useful for unusual tarballs or other archives that
7063 do not have their files already in a subdirectory within the archive.
7064 </para></listitem>
7065 <listitem><para><emphasis><filename>name</filename> -</emphasis> Specifies a
7066 name to be used for association with <filename>SRC_URI</filename> checksums
7067 when you have more than one file specified in <filename>SRC_URI</filename>.
7068 </para></listitem>
7069 <listitem><para><emphasis><filename>downloadfilename</filename> -</emphasis> Specifies
7070 the filename used when storing the downloaded file.</para></listitem>
7071 </itemizedlist>
7072 </para>
7073 </glossdef>
7074 </glossentry>
7075
7076 <glossentry id='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'><glossterm>SRC_URI_OVERRIDES_PACKAGE_ARCH</glossterm>
7077 <glossdef>
7078 <para></para>
7079 <para>
7080 By default, the OpenEmbedded build system automatically detects whether
7081 <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>
7082 contains files that are machine-specific.
7083 If so, the build system automatically changes
7084 <filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>.
7085 Setting this variable to "0" disables this behavior.
7086 </para>
7087 </glossdef>
7088 </glossentry>
7089
7090 <glossentry id='var-SRCDATE'><glossterm>SRCDATE</glossterm>
7091 <glossdef>
7092 <para>
7093 The date of the source code used to build the package.
7094 This variable applies only if the source was fetched from a Source Code Manager (SCM).
7095 </para>
7096 </glossdef>
7097 </glossentry>
7098
7099 <glossentry id='var-SRCPV'><glossterm>SRCPV</glossterm>
7100 <glossdef>
7101 <para>
7102 Returns the version string of the current package.
7103 This string is used to help define the value of
7104 <link linkend='var-PV'><filename>PV</filename></link>.
7105 </para>
7106
7107 <para>
7108 The <filename>SRCPV</filename> variable is defined in the
7109 <filename>meta/conf/bitbake.conf</filename> configuration
7110 file in the
7111 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
7112 as follows:
7113 <literallayout class='monospaced'>
7114 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
7115 </literallayout>
7116 </para>
7117
7118 <para>
7119 Recipes that need to define <filename>PV</filename> do so
7120 with the help of the <filename>SRCPV</filename>.
7121 For example, the <filename>ofono</filename> recipe
7122 (<filename>ofono_git.bb</filename>) located in
7123 <filename>meta/recipes-connectivity</filename> in the
7124 Source Directory defines <filename>PV</filename> as
7125 follows:
7126 <literallayout class='monospaced'>
7127 PV = "0.12-git${SRCPV}"
7128 </literallayout>
7129 </para>
7130 </glossdef>
7131 </glossentry>
7132
7133 <glossentry id='var-SRCREV'><glossterm>SRCREV</glossterm>
7134 <glossdef>
7135 <para>
7136 The revision of the source code used to build the package.
7137 This variable applies to Subversion, Git, Mercurial and Bazaar
7138 only.
7139 Note that if you wish to build a fixed revision and you wish
7140 to avoid performing a query on the remote repository every time
7141 BitBake parses your recipe, you should specify a <filename>SRCREV</filename> that is a
7142 full revision identifier and not just a tag.
7143 </para>
7144 </glossdef>
7145 </glossentry>
7146
7147 <glossentry id='var-SSTATE_DIR'><glossterm>SSTATE_DIR</glossterm>
7148 <glossdef>
7149 <para>The directory for the shared state cache.</para>
7150 </glossdef>
7151 </glossentry>
7152
7153 <glossentry id='var-SSTATE_MIRRORS'><glossterm>SSTATE_MIRRORS</glossterm>
7154 <glossdef>
7155 <para>
7156 Configures the OpenEmbedded build system to search other
7157 mirror locations for prebuilt cache data objects before
7158 building out the data.
7159 This variable works like fetcher
7160 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
7161 and <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
7162 and points to the cache locations to check for the shared
7163 objects.
7164 </para>
7165
7166 <para>
7167 You can specify a filesystem directory or a remote URL such
7168 as HTTP or FTP.
7169 The locations you specify need to contain the shared state
7170 cache (sstate-cache) results from previous builds.
7171 The sstate-cache you point to can also be from builds on
7172 other machines.
7173 </para>
7174
7175 <para>
7176 If a mirror uses the same structure as
7177 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>,
7178 you need to add
7179 "PATH" at the end as shown in the examples below.
7180 The build system substitutes the correct path within the
7181 directory structure.
7182 <literallayout class='monospaced'>
7183 SSTATE_MIRRORS ?= "\
7184 file://.* http://someserver.tld/share/sstate/PATH \n \
7185 file://.* file:///some/local/dir/sstate/PATH"
7186 </literallayout>
7187 </para>
7188 </glossdef>
7189 </glossentry>
7190
7191 <glossentry id='var-STAGING_KERNEL_DIR'><glossterm>STAGING_KERNEL_DIR</glossterm>
7192 <glossdef>
7193 <para>
7194 The directory with kernel headers that are required to build out-of-tree
7195 modules.
7196 </para>
7197 </glossdef>
7198 </glossentry>
7199
7200 <glossentry id='var-STAMP'><glossterm>STAMP</glossterm>
7201 <glossdef>
7202 <para>
7203 Specifies the base path used to create recipe stamp files.
7204 The path to an actual stamp file is constructed by evaluating this
7205 string and then appending additional information.
7206 Currently, the default assignment for <filename>STAMP</filename>
7207 as set in the <filename>meta/conf/bitbake.conf</filename> file
7208 is:
7209 <literallayout class='monospaced'>
7210 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
7211 </literallayout>
7212 See <link linkend='var-STAMPS_DIR'><filename>STAMPS_DIR</filename></link>,
7213 <link linkend='var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></link>,
7214 <link linkend='var-PN'><filename>PN</filename></link>,
7215 <link linkend='var-EXTENDPE'><filename>EXTENDPE</filename></link>,
7216 <link linkend='var-PV'><filename>PV</filename></link>, and
7217 <link linkend='var-PR'><filename>PR</filename></link> for related variable
7218 information.
7219 </para>
7220 </glossdef>
7221 </glossentry>
7222
7223 <glossentry id='var-STAMPS_DIR'><glossterm>STAMPS_DIR</glossterm>
7224 <glossdef>
7225 <para>
7226 Specifies the base directory in which the OpenEmbedded
7227 build system places stamps.
7228 The default directory is
7229 <filename>${TMPDIR}/stamps</filename>.
7230 </para>
7231 </glossdef>
7232 </glossentry>
7233
7234 <glossentry id='var-SUMMARY'><glossterm>SUMMARY</glossterm>
7235 <glossdef>
7236 <para>The short (72 characters or less) summary of the binary package for packaging
7237 systems such as <filename>opkg</filename>, <filename>rpm</filename> or
7238 <filename>dpkg</filename>.
7239 By default, <filename>SUMMARY</filename> is used to define
7240 the <link linkend='var-DESCRIPTION'><filename>DESCRIPTION</filename></link>
7241 variable if <filename>DESCRIPTION</filename> is not set
7242 in the recipe.
7243 </para>
7244 </glossdef>
7245 </glossentry>
7246
7247 <glossentry id='var-SYSLINUX_DEFAULT_CONSOLE'><glossterm>SYSLINUX_DEFAULT_CONSOLE</glossterm>
7248 <glossdef>
7249 <para>
7250 Specifies the kernel boot default console.
7251 If you want to use a console other than the default,
7252 set this variable in your recipe as follows where "X" is
7253 the console number you want to use:
7254 <literallayout class='monospaced'>
7255 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
7256 </literallayout>
7257 </para>
7258
7259 <para>
7260 The
7261 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
7262 class initially sets this variable to null but then checks
7263 for a value later.
7264 </para>
7265 </glossdef>
7266 </glossentry>
7267
7268 <glossentry id='var-SYSLINUX_OPTS'><glossterm>SYSLINUX_OPTS</glossterm>
7269 <glossdef>
7270 <para>
7271 Lists additional options to add to the syslinux file.
7272 You need to set this variable in your recipe.
7273 If you want to list multiple options, separate the options
7274 with a semicolon character (<filename>;</filename>).
7275 </para>
7276
7277 <para>
7278 The
7279 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
7280 class uses this variable to create a set of options.
7281 </para>
7282 </glossdef>
7283 </glossentry>
7284
7285 <glossentry id='var-SYSLINUX_SERIAL'><glossterm>SYSLINUX_SERIAL</glossterm>
7286 <glossdef>
7287 <para>
7288 Specifies the alternate serial port or turns it off.
7289 To turn off serial, set this variable to an empty string
7290 in your recipe.
7291 The variable's default value is set in the
7292 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
7293 as follows:
7294 <literallayout class='monospaced'>
7295 SYSLINUX_SERIAL ?= "0 115200"
7296 </literallayout>
7297 The class checks for and uses the variable as needed. </para>
7298 </glossdef>
7299 </glossentry>
7300
7301 <glossentry id='var-SYSLINUX_SPLASH'><glossterm>SYSLINUX_SPLASH</glossterm>
7302 <glossdef>
7303 <para>
7304 An <filename>.LSS</filename> file used as the background
7305 for the VGA boot menu when you are using the boot menu.
7306 You need to set this variable in your recipe.
7307 </para>
7308
7309 <para>
7310 The
7311 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
7312 class checks for this variable and if found, the
7313 OpenEmbedded build system installs the splash screen.
7314 </para>
7315 </glossdef>
7316 </glossentry>
7317
7318 <glossentry id='var-SYSLINUX_SERIAL_TTY'><glossterm>SYSLINUX_SERIAL_TTY</glossterm>
7319 <glossdef>
7320 <para>
7321 Specifies the alternate console=tty... kernel boot argument.
7322 The variable's default value is set in the
7323 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
7324 as follows:
7325 <literallayout class='monospaced'>
7326 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
7327 </literallayout>
7328 The class checks for and uses the variable as needed.
7329 </para>
7330 </glossdef>
7331 </glossentry>
7332
7333 <glossentry id='var-SYSROOT_PREPROCESS_FUNCS'><glossterm>SYSROOT_PREPROCESS_FUNCS</glossterm>
7334 <glossdef>
7335 <para>
7336 A list of functions to execute after files are staged into
7337 the sysroot.
7338 These functions are usually used to apply additional
7339 processing on the staged files, or to stage additional
7340 files.
7341 </para>
7342 </glossdef>
7343 </glossentry>
7344
7345 <glossentry id='var-SYSTEMD_AUTO_ENABLE'><glossterm>SYSTEMD_AUTO_ENABLE</glossterm>
7346 <glossdef>
7347 <para>
7348 For recipes that inherit the
7349 <link linkend='ref-classes-systemd'><filename>systemd</filename></link>
7350 class, this variable specifies whether the service you have
7351 specified in
7352 <link linkend='var-SYSTEMD_SERVICE'><filename>SYSTEMD_SERVICE</filename></link>
7353 should be started automatically or not.
7354 By default, the service is enabled to automatically start
7355 at boot time.
7356 The default setting is in the
7357 <link linkend='ref-classes-systemd'><filename>systemd</filename></link>
7358 class as follows:
7359 <literallayout class='monospaced'>
7360 SYSTEMD_AUTO_ENABLE ??= "enable"
7361 </literallayout>
7362 You can disable the service by setting the variable to
7363 "disable".
7364 </para>
7365 </glossdef>
7366 </glossentry>
7367
7368 <glossentry id='var-SYSTEMD_PACKAGES'><glossterm>SYSTEMD_PACKAGES</glossterm>
7369 <glossdef>
7370 <para>
7371 For recipes that inherit the
7372 <link linkend='ref-classes-systemd'><filename>systemd</filename></link>
7373 class, this variable locates the systemd unit files when
7374 they are not found in the main recipe's package.
7375 By default, the
7376 <filename>SYSTEMD_PACKAGES</filename> variable is set
7377 such that the systemd unit files are assumed to reside in
7378 the recipes main package:
7379 <literallayout class='monospaced'>
7380 SYSTEMD_PACKAGES ?= "${PN}"
7381 </literallayout>
7382 If these unit files are not in this recipe's main
7383 package, you need to use
7384 <filename>SYSTEMD_PACKAGES</filename> to list the package
7385 or packages in which the build system can find the systemd
7386 unit files.
7387 </para>
7388 </glossdef>
7389 </glossentry>
7390
7391 <glossentry id='var-SYSTEMD_SERVICE'><glossterm>SYSTEMD_SERVICE</glossterm>
7392 <glossdef>
7393 <para>
7394 For recipes that inherit the
7395 <link linkend='ref-classes-systemd'><filename>systemd</filename></link>
7396 class, this variable specifies the systemd service name for
7397 a package.
7398 </para>
7399
7400 <para>
7401 When you specify this file in your recipe, use a package
7402 name override to indicate the package to which the value
7403 applies.
7404 Here is an example from the connman recipe:
7405 <literallayout class='monospaced'>
7406 SYSTEMD_SERVICE_${PN} = "connman.service"
7407 </literallayout>
7408 </para>
7409 </glossdef>
7410 </glossentry>
7411
7412 </glossdiv>
7413
7414 <glossdiv id='var-glossary-t'><title>T</title>
7415
7416 <glossentry id='var-T'><glossterm>T</glossterm>
7417 <glossdef>
7418 <para>This variable points to a directory were BitBake places
7419 temporary files, which consist mostly of task logs and
7420 scripts, when building a particular recipe.
7421 The variable is typically set as follows:
7422 <literallayout class='monospaced'>
7423 T = "${WORKDIR}/temp"
7424 </literallayout>
7425 The <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
7426 is the directory into which BitBake unpacks and builds the
7427 recipe.
7428 The default <filename>bitbake.conf</filename> file sets this variable.</para>
7429 <para>The <filename>T</filename> variable is not to be confused with
7430 the <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link> variable,
7431 which points to the root of the directory tree where BitBake
7432 places the output of an entire build.
7433 </para>
7434 </glossdef>
7435 </glossentry>
7436
7437 <glossentry id='var-TARGET_ARCH'><glossterm>TARGET_ARCH</glossterm>
7438 <glossdef>
7439 <para>
7440 The target machine's architecture.
7441 The OpenEmbedded build system supports many
7442 architectures.
7443 Here is an example list of architectures supported.
7444 This list is by no means complete as the architecture
7445 is configurable:
7446 <literallayout class='monospaced'>
7447 arm
7448 i586
7449 x86_64
7450 powerpc
7451 powerpc64
7452 mips
7453 mipsel
7454 </literallayout>
7455 </para>
7456 </glossdef>
7457 </glossentry>
7458
7459 <glossentry id='var-TARGET_CFLAGS'><glossterm>TARGET_CFLAGS</glossterm>
7460 <glossdef>
7461 <para>
7462 Flags passed to the C compiler for the target system.
7463 This variable evaluates to the same as
7464 <filename><link linkend='var-CFLAGS'>CFLAGS</link></filename>.
7465 </para>
7466 </glossdef>
7467 </glossentry>
7468
7469
7470 <glossentry id='var-TARGET_FPU'><glossterm>TARGET_FPU</glossterm>
7471 <glossdef>
7472 <para>Specifies the method for handling FPU code.
7473 For FPU-less targets, which include most ARM CPUs, the variable must be
7474 set to "soft".
7475 If not, the kernel emulation gets used, which results in a performance penalty.</para>
7476 </glossdef>
7477 </glossentry>
7478
7479 <glossentry id='var-TARGET_OS'><glossterm>TARGET_OS</glossterm>
7480 <glossdef>
7481 <para>Specifies the target's operating system.
7482 The variable can be set to "linux" for <filename>eglibc</filename>-based systems and
7483 to "linux-uclibc" for <filename>uclibc</filename>.
7484 For ARM/EABI targets, there are also "linux-gnueabi" and
7485 "linux-uclibc-gnueabi" values possible.</para>
7486 </glossdef>
7487 </glossentry>
7488
7489 <glossentry id='var-TCLIBC'><glossterm>TCLIBC</glossterm>
7490 <glossdef>
7491 <para>
7492 Specifies the GNU standard C library (<filename>libc</filename>)
7493 variant to use during the build process.
7494 This variable replaces <filename>POKYLIBC</filename>, which is no longer
7495 supported.
7496 </para>
7497 <para>
7498 You can select "eglibc" or "uclibc".
7499 <note>
7500 This release of the Yocto Project does not support the
7501 <filename>glibc</filename> implementation of <filename>libc</filename>.
7502 </note>
7503 </para>
7504 </glossdef>
7505 </glossentry>
7506
7507 <glossentry id='var-TCMODE'><glossterm>TCMODE</glossterm>
7508 <glossdef>
7509 <para>
7510 Specifies the toolchain selector.
7511 <filename>TCMODE</filename> controls the characteristics
7512 of the generated packages and images by telling the
7513 OpenEmbedded build system which toolchain profile to use.
7514 By default, the OpenEmbedded build system builds its own
7515 internal toolchain.
7516 The variable's default value is "default", which uses
7517 that internal toolchain.
7518 <note>
7519 If <filename>TCMODE</filename> is set to a value
7520 other than "default", then it is your responsibility
7521 to ensure that the toolchain is compatible with the
7522 default toolchain.
7523 Using older or newer versions of these components
7524 might cause build problems.
7525 See the
7526 <ulink url='&YOCTO_RELEASE_NOTES;'>Release Notes</ulink>
7527 for the specific components with which the toolchain
7528 must be compatible.
7529 </note>
7530 </para>
7531
7532 <para>
7533 With additional layers, it is possible to use a pre-compiled
7534 external toolchain.
7535 One example is the Sourcery G++ Toolchain.
7536 The support for this toolchain resides in the separate
7537 <filename>meta-sourcery</filename> layer at
7538 <ulink url='http://github.com/MentorEmbedded/meta-sourcery/'></ulink>.
7539 You can use <filename>meta-sourcery</filename> as a
7540 template for adding support for other external toolchains.
7541 </para>
7542
7543 <para>
7544 The <filename>TCMODE</filename> variable points the build
7545 system to a file in
7546 <filename>conf/distro/include/tcmode-${TCMODE}.inc</filename>.
7547 Thus, for <filename>meta-sourcery</filename>,
7548 which has <filename>conf/distro/include/tcmode-external-sourcery.inc</filename>,
7549 you would set the variable as follows:
7550 <literallayout class='monospaced'>
7551 TCMODE ?= "external-sourcery"
7552 </literallayout>
7553 </para>
7554
7555 <para>
7556 The variable is similar to
7557 <link linkend='var-TCLIBC'><filename>TCLIBC</filename></link>,
7558 which controls the variant of the GNU standard C library
7559 (<filename>libc</filename>) used during the build process:
7560 <filename>eglibc</filename> or <filename>uclibc</filename>.
7561 </para>
7562 </glossdef>
7563 </glossentry>
7564
7565 <glossentry id='var-TEST_EXPORT_DIR'><glossterm>TEST_EXPORT_DIR</glossterm>
7566 <glossdef>
7567 <para>
7568 The location the OpenEmbedded build system uses to export
7569 tests when the
7570 <link linkend='var-TEST_EXPORT_ONLY'><filename>TEST_EXPORT_ONLY</filename></link>
7571 variable is set to "1".
7572 </para>
7573
7574 <para>
7575 The <filename>TEST_EXPORT_DIR</filename> variable defaults
7576 to <filename>"${TMPDIR}/testimage/${PN}"</filename>.
7577 </para>
7578 </glossdef>
7579 </glossentry>
7580
7581 <glossentry id='var-TEST_EXPORT_ONLY'><glossterm>TEST_EXPORT_ONLY</glossterm>
7582 <glossdef>
7583 <para>
7584 Specifies to export the tests only.
7585 Set this variable to "1" if you do not want to run the
7586 tests but you want them to be exported in a manner that
7587 you to run them outside of the build system.
7588 </para>
7589 </glossdef>
7590 </glossentry>
7591
7592 <glossentry id='var-TEST_IMAGE'><glossterm>TEST_IMAGE</glossterm>
7593 <glossdef>
7594 <para>
7595 Automatically runs the series of automated tests for
7596 images when an image is successfully built.
7597 </para>
7598
7599 <para>
7600 These tests are written in Python making use of the
7601 <filename>unittest</filename> module, and the majority of
7602 them run commands on the target system over
7603 <filename>ssh</filename>.
7604 You can set this variable to "1" in your
7605 <filename>local.conf</filename> file in the
7606 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
7607 to have the OpenEmbedded build system automatically run
7608 these tests after an image successfully builds:
7609 <literallayout class='monospaced'>
7610 TEST_IMAGE = "1"
7611 </literallayout>
7612 For more information on enabling, running, and writing
7613 these tests, see the
7614 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
7615 section in the Yocto Project Development Manual and the
7616 "<link linkend='ref-classes-testimage'><filename>testimage.bbclass</filename></link>"
7617 section.
7618 </para>
7619 </glossdef>
7620 </glossentry>
7621
7622 <glossentry id='var-TEST_LOG_DIR'><glossterm>TEST_LOG_DIR</glossterm>
7623 <glossdef>
7624 <para>
7625 Holds the SSH log and the boot log for QEMU machines.
7626 The <filename>TEST_LOG_DIR</filename> variable defaults
7627 to <filename>"${WORKDIR}/testimage"</filename>.
7628 <note>
7629 Actual test results reside in the task log
7630 (<filename>log.do_testimage</filename>), which is in
7631 the <filename>${WORKDIR}/temp/</filename> directory.
7632 </note>
7633 </para>
7634 </glossdef>
7635 </glossentry>
7636
7637 <glossentry id='var-TEST_QEMUBOOT_TIMEOUT'><glossterm>TEST_QEMUBOOT_TIMEOUT</glossterm>
7638 <glossdef>
7639 <para>
7640 The time in seconds allowed for an image to boot before
7641 automated runtime tests begin to run against an
7642 image.
7643 The default timeout period to allow the boot process to
7644 reach the login prompt is 500 seconds.
7645 You can specify a different value in the
7646 <filename>local.conf</filename> file.
7647 </para>
7648
7649 <para>
7650 For more information on testing images, see the
7651 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
7652 section in the Yocto Project Development Manual.
7653 </para>
7654 </glossdef>
7655 </glossentry>
7656
7657 <glossentry id='var-TEST_SERVER_IP'><glossterm>TEST_SERVER_IP</glossterm>
7658 <glossdef>
7659 <para>
7660 The IP address of the build machine (host machine).
7661 This IP address is usually automatically detected.
7662 However, if detection fails, this variable needs to be set
7663 to the IP address of the build machine (i.e. where
7664 the build is taking place).
7665 <note>
7666 The <filename>TEST_SERVER_IP</filename> variable
7667 is only used for a small number of tests such as
7668 the "smart" test suite, which needs to download
7669 packages from <filename>DEPLOY_DIR/rpm</filename>.
7670 </note>
7671 </para>
7672 </glossdef>
7673 </glossentry>
7674
7675 <glossentry id='var-TEST_TARGET'><glossterm>TEST_TARGET</glossterm>
7676 <glossdef>
7677 <para>
7678 Specifies the target controller to use when running tests
7679 against a test image.
7680 The default controller to use is "qemu":
7681 <literallayout class='monospaced'>
7682 TEST_TARGET = "qemu"
7683 </literallayout>
7684 A target controller is a class that defines how an
7685 image gets deployed on a target and how a target is started.
7686 A layer can extend the controllers by adding a module
7687 in the layer's <filename>/lib/oeqa/controllers</filename>
7688 directory and by inheriting the
7689 <filename>BaseTarget</filename> class, which is an abstract
7690 class that cannot be used as a value of
7691 <filename>TEST_TARGET</filename>.
7692 </para>
7693
7694 <para>
7695 You can provide the following arguments with
7696 <filename>TEST_TARGET</filename>:
7697 <itemizedlist>
7698 <listitem><para><emphasis>"qemu" and "QemuTarget":</emphasis>
7699 Boots a QEMU image and runs the tests.
7700 See the
7701 "<ulink url='&YOCTO_DOCS_DEV_URL;#qemu-image-enabling-tests'>Enabling Runtime Tests on QEMU</ulink>"
7702 section in the Yocto Project Development Manual for
7703 more information.
7704 </para></listitem>
7705 <listitem><para><emphasis>"simpleremote" and "SimpleRemoteTarget":</emphasis>
7706 Runs the tests on target hardware that is already
7707 up and running.
7708 The hardware can be on the network or it can be
7709 a device running an image on QEMU.
7710 You must also set
7711 <link linkend='var-TEST_TARGET_IP'><filename>TEST_TARGET_IP</filename></link>
7712 when you use "simpleremote" or "SimpleRemoteTarget".
7713 <note>
7714 This argument is defined in
7715 <filename>meta/lib/oeqa/targetcontrol.py</filename>.
7716 The small caps names are kept for compatibility
7717 reasons.
7718 </note>
7719 </para></listitem>
7720 <listitem><para><emphasis>"GummibootTarget":</emphasis>
7721 Automatically deploys and runs tests on an
7722 EFI-enabled machine that has a master image
7723 installed.
7724 <note>
7725 This argument is defined in
7726 <filename>meta/lib/oeqa/controllers/masterimage.py</filename>.
7727 </note>
7728 </para></listitem>
7729 </itemizedlist>
7730 </para>
7731
7732 <para>
7733 For information on running tests on hardware, see the
7734 "<ulink url='&YOCTO_DOCS_DEV_URL;#hardware-image-enabling-tests'>Enabling Runtime Tests on Hardware</ulink>"
7735 section in the Yocto Project Development Manual.
7736 </para>
7737 </glossdef>
7738 </glossentry>
7739
7740 <glossentry id='var-TEST_TARGET_IP'><glossterm>TEST_TARGET_IP</glossterm>
7741 <glossdef>
7742 <para>
7743 The IP address of your hardware under test.
7744 The <filename>TEST_TARGET_IP</filename> variable has no
7745 effect when
7746 <link linkend='var-TEST_TARGET'><filename>TEST_TARGET</filename></link>
7747 is set to "qemu".
7748 </para>
7749
7750 <para>
7751 When you specify the IP address, you can also include a
7752 port.
7753 Here is an example:
7754 <literallayout class='monospaced'>
7755 TEST_TARGET_IP = "192.168.1.4:2201"
7756 </literallayout>
7757 Specifying a port is useful when SSH is started on a
7758 non-standard port or in cases when your hardware under test
7759 is behind a firewall or network that is not directly
7760 accessible from your host and you need to do port address
7761 translation.
7762 </para>
7763 </glossdef>
7764 </glossentry>
7765
7766 <glossentry id='var-TEST_SUITES'><glossterm>TEST_SUITES</glossterm>
7767 <glossdef>
7768 <para>
7769 An ordered list of tests (modules) to run against
7770 an image when performing automated runtime testing.
7771 </para>
7772
7773 <para>
7774 The OpenEmbedded build system provides a core set of tests
7775 that can be used against images.
7776 <note>
7777 Currently, there is only support for running these tests
7778 under QEMU.
7779 </note>
7780 Tests include <filename>ping</filename>,
7781 <filename>ssh</filename>, <filename>df</filename> among
7782 others.
7783 You can add your own tests to the list of tests by
7784 appending <filename>TEST_SUITES</filename> as follows:
7785 <literallayout class='monospaced'>
7786 TEST_SUITES_append = " mytest"
7787 </literallayout>
7788 Alternatively, you can provide the "auto" option to
7789 have all applicable tests run against the image.
7790 <literallayout class='monospaced'>
7791 TEST_SUITES_append = " auto"
7792 </literallayout>
7793 Using this option causes the build system to automatically
7794 run tests that are applicable to the image.
7795 Tests that are not applicable are skipped.
7796 </para>
7797
7798 <para>
7799 The order in which tests are run is important.
7800 Tests that depend on another test must appear later in the
7801 list than the test on which they depend.
7802 For example, if you append the list of tests with two
7803 tests (<filename>test_A</filename> and
7804 <filename>test_B</filename>) where
7805 <filename>test_B</filename> is dependent on
7806 <filename>test_A</filename>, then you must order the tests
7807 as follows:
7808 <literallayout class='monospaced'>
7809 TEST_SUITES = " test_A test_B"
7810 </literallayout>
7811 </para>
7812
7813 <para>
7814 For more information on testing images, see the
7815 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
7816 section in the Yocto Project Development Manual.
7817 </para>
7818 </glossdef>
7819 </glossentry>
7820
7821 <glossentry id='var-THISDIR'><glossterm>THISDIR</glossterm>
7822 <glossdef>
7823 <para>
7824 The directory in which the file BitBake is currently
7825 parsing is located.
7826 Do not manually set this variable.
7827 </para>
7828 </glossdef>
7829 </glossentry>
7830
7831 <glossentry id='var-TMPDIR'><glossterm>TMPDIR</glossterm>
7832 <glossdef>
7833 <para>
7834 This variable is the base directory the OpenEmbedded
7835 build system uses for all build output and intermediate
7836 files (other than the shared state cache).
7837 By default, the <filename>TMPDIR</filename> variable points
7838 to <filename>tmp</filename> within the
7839 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
7840 </para>
7841
7842 <para>
7843 If you want to establish this directory in a location other
7844 than the default, you can uncomment and edit the following
7845 statement in the
7846 <filename>conf/local.conf</filename> file in the
7847 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
7848 <literallayout class='monospaced'>
7849 #TMPDIR = "${TOPDIR}/tmp"
7850 </literallayout>
7851 An example use for this scenario is to set
7852 <filename>TMPDIR</filename> to a local disk, which does
7853 not use NFS, while having the Build Directory use NFS.
7854 </para>
7855
7856 <para>
7857 The filesystem used by <filename>TMPDIR</filename> must
7858 have standard filesystem semantics (i.e. mixed-case files
7859 are unique, POSIX file locking, and persistent inodes).
7860 Due to various issues with NFS and bugs in some
7861 implementations, NFS does not meet this minimum
7862 requirement.
7863 Consequently, <filename>TMPDIR</filename> cannot be on
7864 NFS.
7865 </para>
7866 </glossdef>
7867 </glossentry>
7868
7869 <glossentry id='var-TOOLCHAIN_HOST_TASK'><glossterm>TOOLCHAIN_HOST_TASK</glossterm>
7870 <glossdef>
7871 <para>
7872 This variable lists packages the OpenEmbedded build system
7873 uses when building an SDK, which contains a
7874 cross-development environment.
7875 The packages specified by this variable are part of the
7876 toolchain set that runs on the
7877 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
7878 and each package should usually have the prefix
7879 "nativesdk-".
7880 When building an SDK using
7881 <filename>bitbake -c populate_sdk &lt;imagename&gt;</filename>,
7882 a default list of packages is set in this variable, but
7883 you can add additional packages to the list.
7884 </para>
7885
7886 <para>
7887 For background information on cross-development toolchains
7888 in the Yocto Project development environment, see the
7889 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
7890 section.
7891 For information on setting up a cross-development
7892 environment, see the
7893 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
7894 section in the Yocto Project Application Developer's Guide.
7895 </para>
7896 </glossdef>
7897 </glossentry>
7898
7899 <glossentry id='var-TOOLCHAIN_TARGET_TASK'><glossterm>TOOLCHAIN_TARGET_TASK</glossterm>
7900 <glossdef>
7901 <para>
7902 This variable lists packages the OpenEmbedded build system
7903 uses when it creates the target part of an SDK
7904 (i.e. the part built for the target hardware), which
7905 includes libraries and headers.
7906 </para>
7907
7908 <para>
7909 For background information on cross-development toolchains
7910 in the Yocto Project development environment, see the
7911 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
7912 section.
7913 For information on setting up a cross-development
7914 environment, see the
7915 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
7916 section in the Yocto Project Application Developer's Guide.
7917 </para>
7918 </glossdef>
7919 </glossentry>
7920
7921 <glossentry id='var-TOPDIR'><glossterm>TOPDIR</glossterm>
7922 <glossdef>
7923 <para>
7924 The top-level
7925 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
7926 BitBake automatically sets this variable when you
7927 initialize your build environment using either
7928 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
7929 or
7930 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>.
7931 </para>
7932 </glossdef>
7933 </glossentry>
7934
7935 <glossentry id='var-TRANSLATED_TARGET_ARCH'><glossterm>TRANSLATED_TARGET_ARCH</glossterm>
7936 <glossdef>
7937 <para>
7938 A sanitized version of
7939 <link linkend='var-TARGET_ARCH'><filename>TARGET_ARCH</filename></link>.
7940 This variable is used where the architecture is needed in
7941 a value where underscores are not allowed, for example
7942 within package filenames.
7943 In this case, dash characters replace any underscore
7944 characters used in TARGET_ARCH.
7945 </para>
7946
7947 <para>
7948 Do not edit this variable.
7949 </para>
7950 </glossdef>
7951 </glossentry>
7952
7953 <glossentry id='var-TUNE_PKGARCH'><glossterm>TUNE_PKGARCH</glossterm>
7954 <glossdef>
7955 <para>
7956 The package architecture understood by the packaging
7957 system to define the architecture, ABI, and tuning of
7958 output packages.
7959 </para>
7960 </glossdef>
7961 </glossentry>
7962
7963 </glossdiv>
7964
7965 <glossdiv id='var-glossary-u'><title>U</title>
7966
7967 <glossentry id='var-UBOOT_CONFIG'><glossterm>UBOOT_CONFIG</glossterm>
7968 <glossdef>
7969 <para>
7970 Configures the
7971 <link linkend='var-UBOOT_MACHINE'><filename>UBOOT_MACHINE</filename></link>
7972 and can also define
7973 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
7974 for individual cases.
7975 </para>
7976
7977 <para>
7978 Following is an example from the
7979 <filename>meta-fsl-arm</filename> layer.
7980 <literallayout class='monospaced'>
7981 UBOOT_CONFIG ??= "sd"
7982 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
7983 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
7984 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
7985 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
7986 </literallayout>
7987 In this example, "sd" is selected as the configuration
7988 of the possible four for the
7989 <filename>UBOOT_MACHINE</filename>.
7990 The "sd" configuration defines "mx6qsabreauto_config"
7991 as the value for <filename>UBOOT_MACHINE</filename>, while
7992 the "sdcard" specifies the
7993 <filename>IMAGE_FSTYPES</filename> to use for the U-boot
7994 image.
7995 </para>
7996
7997 <para>
7998 For more information on how the
7999 <filename>UBOOT_CONFIG</filename> is handled, see the
8000 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/uboot-config.bbclass'><filename>uboot-config</filename></ulink>
8001 class.
8002 </para>
8003 </glossdef>
8004 </glossentry>
8005
8006 <glossentry id='var-UBOOT_ENTRYPOINT'><glossterm>UBOOT_ENTRYPOINT</glossterm>
8007 <glossdef>
8008 <para>
8009 Specifies the entry point for the U-Boot image.
8010 During U-Boot image creation, the
8011 <filename>UBOOT_ENTRYPOINT</filename> variable is passed
8012 as a command-line parameter to the
8013 <filename>uboot-mkimage</filename> utility.
8014 </para>
8015 </glossdef>
8016 </glossentry>
8017
8018 <glossentry id='var-UBOOT_LOADADDRESS'><glossterm>UBOOT_LOADADDRESS</glossterm>
8019 <glossdef>
8020 <para>
8021 Specifies the load address for the U-Boot image.
8022 During U-Boot image creation, the
8023 <filename>UBOOT_LOADADDRESS</filename> variable is passed
8024 as a command-line parameter to the
8025 <filename>uboot-mkimage</filename> utility.
8026 </para>
8027 </glossdef>
8028 </glossentry>
8029
8030 <glossentry id='var-UBOOT_LOCALVERSION'><glossterm>UBOOT_LOCALVERSION</glossterm>
8031 <glossdef>
8032 <para>
8033 Appends a string to the name of the local version of the
8034 U-Boot image.
8035 For example, assuming the version of the U-Boot image
8036 built was "2013.10, the full version string reported by
8037 U-Boot would be "2013.10-yocto" given the following
8038 statement:
8039 <literallayout class='monospaced'>
8040 UBOOT_LOCALVERSION = "-yocto"
8041 </literallayout>
8042 </para>
8043 </glossdef>
8044 </glossentry>
8045
8046 <glossentry id='var-UBOOT_MACHINE'><glossterm>UBOOT_MACHINE</glossterm>
8047 <glossdef>
8048 <para>
8049 Specifies the value passed on the
8050 <filename>make</filename> command line when building
8051 a U-Boot image.
8052 The value indicates the target platform configuration.
8053 You typically set this variable from the machine
8054 configuration file (i.e.
8055 <filename>conf/machine/&lt;machine_name&gt;.conf</filename>).
8056 </para>
8057 </glossdef>
8058 </glossentry>
8059
8060 <glossentry id='var-UBOOT_MAKE_TARGET'><glossterm>UBOOT_MAKE_TARGET</glossterm>
8061 <glossdef>
8062 <para>
8063 Specifies the target called in the
8064 <filename>Makefile</filename>.
8065 The default target is "all".
8066 </para>
8067 </glossdef>
8068 </glossentry>
8069
8070 <glossentry id='var-UBOOT_SUFFIX'><glossterm>UBOOT_SUFFIX</glossterm>
8071 <glossdef>
8072 <para>
8073 Points to the generated U-Boot extension.
8074 For example, <filename>u-boot.sb</filename> has a
8075 <filename>.sb</filename> extension.
8076 </para>
8077
8078 <para>
8079 The default U-Boot extension is
8080 <filename>.bin</filename>
8081 </para>
8082 </glossdef>
8083 </glossentry>
8084
8085 <glossentry id='var-UBOOT_TARGET'><glossterm>UBOOT_TARGET</glossterm>
8086 <glossdef>
8087 <para>
8088 Specifies the target used for building U-Boot.
8089 The target is passed directly as part of the "make" command
8090 (e.g. SPL and AIS).
8091 If you do not specifically set this variable, the
8092 OpenEmbedded build process passes and uses "all" for the
8093 target during the U-Boot building process.
8094 </para>
8095 </glossdef>
8096 </glossentry>
8097
8098 <glossentry id='var-USER_CLASSES'><glossterm>USER_CLASSES</glossterm>
8099 <glossdef>
8100 <para>
8101 A list of classes to globally inherit.
8102 These classes are used by the OpenEmbedded build system
8103 to enable extra features (e.g.
8104 <filename>buildstats</filename>,
8105 <filename>image-mklibs</filename>, and so forth).
8106 </para>
8107
8108 <para>
8109 The default list is set in your
8110 <filename>local.conf</filename> file:
8111 <literallayout class='monospaced'>
8112 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
8113 </literallayout>
8114 For more information, see
8115 <filename>meta-yocto/conf/local.conf.sample</filename> in
8116 the
8117 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
8118 </para>
8119 </glossdef>
8120 </glossentry>
8121
8122 <glossentry id='var-USERADD_ERROR_DYNAMIC'><glossterm>USERADD_ERROR_DYNAMIC</glossterm>
8123 <glossdef>
8124 <para>
8125 Forces the OpenEmbedded build system to produce an error
8126 if the user identification (<filename>uid</filename>) and
8127 group identification (<filename>gid</filename>) values
8128 are not defined in <filename>files/passwd</filename>
8129 and <filename>files/group</filename> files.
8130 </para>
8131
8132 <para>
8133 The default behavior for the build system is to dynamically
8134 apply <filename>uid</filename> and
8135 <filename>gid</filename> values.
8136 Consequently, the <filename>USERADD_ERROR_DYNAMIC</filename>
8137 variable is by default not set.
8138 If you plan on using statically assigned
8139 <filename>gid</filename> and <filename>uid</filename>
8140 values, you should set
8141 the <filename>USERADD_ERROR_DYNAMIC</filename> variable in
8142 your <filename>local.conf</filename> file as
8143 follows:
8144 <literallayout class='monospaced'>
8145 USERADD_ERROR_DYNAMIC = "1"
8146 </literallayout>
8147 Overriding the default behavior implies you are going to
8148 also take steps to set static <filename>uid</filename> and
8149 <filename>gid</filename> values through use of the
8150 <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>,
8151 <link linkend='var-USERADD_UID_TABLES'><filename>USERADD_UID_TABLES</filename></link>,
8152 and
8153 <link linkend='var-USERADD_GID_TABLES'><filename>USERADD_GID_TABLES</filename></link>
8154 variables.
8155 </para>
8156 </glossdef>
8157 </glossentry>
8158
8159 <glossentry id='var-USERADD_GID_TABLES'><glossterm>USERADD_GID_TABLES</glossterm>
8160 <glossdef>
8161 <para>
8162 Specifies a password file to use for obtaining static
8163 group identification (<filename>gid</filename>) values
8164 when the OpenEmbedded build system adds a group to the
8165 system during package installation.
8166 </para>
8167
8168 <para>
8169 When applying static group identification
8170 (<filename>gid</filename>) values, the OpenEmbedded build
8171 system looks in
8172 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
8173 for a <filename>files/group</filename> file and then applies
8174 those <filename>uid</filename> values.
8175 Set the variable as follows in your
8176 <filename>local.conf</filename> file:
8177 <literallayout class='monospaced'>
8178 USERADD_GID_TABLES = "files/group"
8179 </literallayout>
8180 </para>
8181
8182 <note>
8183 Setting the
8184 <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>
8185 variable to "useradd-staticids" causes the build system
8186 to use static <filename>gid</filename> values.
8187 </note>
8188 </glossdef>
8189 </glossentry>
8190
8191 <glossentry id='var-USERADD_UID_TABLES'><glossterm>USERADD_UID_TABLES</glossterm>
8192 <glossdef>
8193 <para>
8194 Specifies a password file to use for obtaining static
8195 user identification (<filename>uid</filename>) values
8196 when the OpenEmbedded build system adds a user to the
8197 system during package installation.
8198 </para>
8199
8200 <para>
8201 When applying static user identification
8202 (<filename>uid</filename>) values, the OpenEmbedded build
8203 system looks in
8204 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
8205 for a <filename>files/passwd</filename> file and then applies
8206 those <filename>uid</filename> values.
8207 Set the variable as follows in your
8208 <filename>local.conf</filename> file:
8209 <literallayout class='monospaced'>
8210 USERADD_UID_TABLES = "files/passwd"
8211 </literallayout>
8212 </para>
8213
8214 <note>
8215 Setting the
8216 <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>
8217 variable to "useradd-staticids" causes the build system
8218 to use static <filename>uid</filename> values.
8219 </note>
8220 </glossdef>
8221 </glossentry>
8222
8223 <glossentry id='var-USERADD_PACKAGES'><glossterm>USERADD_PACKAGES</glossterm>
8224 <glossdef>
8225 <para>
8226 When a recipe inherits the
8227 <filename>useradd</filename> class, this variable
8228 specifies the individual packages within the recipe that
8229 require users and/or groups to be added.
8230 </para>
8231
8232 <para>
8233 You must set this variable if the recipe inherits the
8234 class.
8235 For example, the following enables adding a user for the
8236 main package in a recipe:
8237 <literallayout class='monospaced'>
8238 USERADD_PACKAGES = "${PN}"
8239 </literallayout>
8240 <note>
8241 If follows that if you are going to use the
8242 <filename>USERADD_PACKAGES</filename> variable,
8243 you need to set one or more of the
8244 <link linkend='var-USERADD_PARAM'><filename>USERADD_PARAM</filename></link>,
8245 <link linkend='var-GROUPADD_PARAM'><filename>GROUPADD_PARAM</filename></link>,
8246 or
8247 <link linkend='var-GROUPMEMS_PARAM'><filename>GROUPMEMS_PARAM</filename></link>
8248 variables.
8249 </note>
8250 </para>
8251
8252 </glossdef>
8253 </glossentry>
8254
8255 <glossentry id='var-USERADD_PARAM'><glossterm>USERADD_PARAM</glossterm>
8256 <glossdef>
8257 <para>
8258 When a recipe inherits the
8259 <filename>useradd</filename> class, this variable
8260 specifies for a package what parameters should be passed
8261 to the <filename>useradd</filename> command
8262 if you wish to add a user to the system when the package
8263 is installed.
8264 </para>
8265
8266 <para>
8267 Here is an example from the <filename>dbus</filename>
8268 recipe:
8269 <literallayout class='monospaced'>
8270 USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
8271 --no-create-home --shell /bin/false \
8272 --user-group messagebus"
8273 </literallayout>
8274 For information on the standard Linux shell command
8275 <filename>useradd</filename>, see
8276 <ulink url='http://linux.die.net/man/8/useradd'></ulink>.
8277 </para>
8278 </glossdef>
8279 </glossentry>
8280
8281 <glossentry id='var-USERADDEXTENSION'><glossterm>USERADDEXTENSION</glossterm>
8282 <glossdef>
8283 <para>
8284 When set to "useradd-staticids", causes the
8285 OpenEmbedded build system to base all user and group
8286 additions on a static
8287 <filename>passwd</filename> and
8288 <filename>group</filename> files found in
8289 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>.
8290 </para>
8291
8292 <para>
8293 To use static user identification (<filename>uid</filename>)
8294 and group identification (<filename>gid</filename>)
8295 values, set the variable
8296 as follows in your <filename>local.conf</filename> file:
8297 <literallayout class='monospaced'>
8298 USERADDEXTENSION = "useradd-staticids"
8299 </literallayout>
8300 <note>
8301 Setting this variable to use static
8302 <filename>uid</filename> and <filename>gid</filename>
8303 values causes the OpenEmbedded build system to employ
8304 the
8305 <link linkend='ref-classes-useradd-staticids'><filename>useradd-staticids</filename></link>
8306 class.
8307 </note>
8308 </para>
8309
8310 <para>
8311 If you use static <filename>uid</filename> and
8312 <filename>gid</filename> information, you must also
8313 specify the <filename>files/passwd</filename> and
8314 <filename>files/group</filename> files by setting the
8315 <link linkend='var-USERADD_UID_TABLES'><filename>USERADD_UID_TABLES</filename></link>
8316 and
8317 <link linkend='var-USERADD_GID_TABLES'><filename>USERADD_GID_TABLES</filename></link>
8318 variables.
8319 Additionally, you should also set the
8320 <link linkend='var-USERADD_ERROR_DYNAMIC'><filename>USERADD_ERROR_DYNAMIC</filename></link>
8321 variable.
8322 </para>
8323 </glossdef>
8324 </glossentry>
8325
8326 </glossdiv>
8327
8328<!-- <glossdiv id='var-glossary-v'><title>V</title>-->
8329<!-- </glossdiv>-->
8330
8331 <glossdiv id='var-glossary-w'><title>W</title>
8332
8333 <glossentry id='var-WARN_QA'><glossterm>WARN_QA</glossterm>
8334 <glossdef>
8335 <para>
8336 Specifies the quality assurance checks whose failures are
8337 reported as warnings by the OpenEmbedded build system.
8338 You set this variable in your distribution configuration
8339 file.
8340 For a list of the checks you can control with this variable,
8341 see the
8342 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
8343 section.
8344 </para>
8345 </glossdef>
8346 </glossentry>
8347
8348 <glossentry id='var-WORKDIR'><glossterm>WORKDIR</glossterm>
8349 <glossdef>
8350 <para>
8351 The pathname of the work directory in which the OpenEmbedded
8352 build system builds a recipe.
8353 This directory is located within the
8354 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
8355 directory structure and is specific to the recipe being
8356 built and the system for which it is being built.
8357 </para>
8358
8359 <para>
8360 The <filename>WORKDIR</filename> directory is defined as
8361 follows:
8362 <literallayout class='monospaced'>
8363 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
8364 </literallayout>
8365 The actual directory depends on several things:
8366 <itemizedlist>
8367 <listitem><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>:
8368 The top-level build output directory</listitem>
8369 <listitem><link linkend='var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></link>:
8370 The target system identifier</listitem>
8371 <listitem><link linkend='var-PN'><filename>PN</filename></link>:
8372 The recipe name</listitem>
8373 <listitem><link linkend='var-EXTENDPE'><filename>EXTENDPE</filename></link>:
8374 The epoch - (if
8375 <link linkend='var-PE'><filename>PE</filename></link>
8376 is not specified, which is usually the case for most
8377 recipes, then <filename>EXTENDPE</filename> is blank)</listitem>
8378 <listitem><link linkend='var-PV'><filename>PV</filename></link>:
8379 The recipe version</listitem>
8380 <listitem><link linkend='var-PR'><filename>PR</filename></link>:
8381 The recipe revision</listitem>
8382 </itemizedlist>
8383 </para>
8384
8385 <para>
8386 As an example, assume a Source Directory top-level folder
8387 name <filename>poky</filename>, a default Build Directory at
8388 <filename>poky/build</filename>, and a
8389 <filename>qemux86-poky-linux</filename> machine target
8390 system.
8391 Furthermore, suppose your recipe is named
8392 <filename>foo_1.3.0-r0.bb</filename>.
8393 In this case, the work directory the build system uses to
8394 build the package would be as follows:
8395 <literallayout class='monospaced'>
8396 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
8397 </literallayout>
8398 </para>
8399 </glossdef>
8400 </glossentry>
8401
8402 </glossdiv>
8403
8404<!-- <glossdiv id='var-glossary-x'><title>X</title>-->
8405<!-- </glossdiv>-->
8406
8407<!-- <glossdiv id='var-glossary-y'><title>Y</title>-->
8408<!-- </glossdiv>-->
8409
8410<!-- <glossdiv id='var-glossary-z'><title>Z</title>-->
8411<!-- </glossdiv>-->
8412
8413</glossary>
8414</chapter>
8415<!--
8416vim: expandtab tw=80 ts=4
8417-->
diff --git a/documentation/ref-manual/ref-varlocality.xml b/documentation/ref-manual/ref-varlocality.xml
new file mode 100644
index 0000000000..d3f873298d
--- /dev/null
+++ b/documentation/ref-manual/ref-varlocality.xml
@@ -0,0 +1,196 @@
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
5<chapter id='ref-varlocality'>
6 <title>Variable Context</title>
7
8 <para>
9 While you can use most variables in almost any context such as
10 <filename>.conf</filename>, <filename>.bbclass</filename>,
11 <filename>.inc</filename>, and <filename>.bb</filename> files,
12 some variables are often associated with a particular locality or context.
13 This chapter describes some common associations.
14 </para>
15
16 <section id='ref-varlocality-configuration'>
17 <title>Configuration</title>
18
19 <para>
20 The following subsections provide lists of variables whose context is
21 configuration: distribution, machine, and local.
22 </para>
23
24 <section id='ref-varlocality-config-distro'>
25 <title>Distribution (Distro)</title>
26
27 <para>
28 This section lists variables whose configuration context is the
29 distribution, or distro.
30 <itemizedlist>
31 <listitem><para><filename><link linkend='var-DISTRO'>DISTRO</link></filename></para></listitem>
32 <listitem><para><filename><link linkend='var-DISTRO_NAME'>DISTRO_NAME</link></filename>
33 </para></listitem>
34 <listitem><para><filename><link linkend='var-DISTRO_VERSION'>DISTRO_VERSION</link>
35 </filename></para></listitem>
36 <listitem><para><filename><link linkend='var-MAINTAINER'>MAINTAINER</link></filename>
37 </para></listitem>
38 <listitem><para><filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link>
39 </filename></para></listitem>
40 <listitem><para><filename><link linkend='var-TARGET_OS'>TARGET_OS</link></filename>
41 </para></listitem>
42 <listitem><para><filename><link linkend='var-TARGET_FPU'>TARGET_FPU</link></filename>
43 </para></listitem>
44 <listitem><para><filename><link linkend='var-TCMODE'>TCMODE</link></filename>
45 </para></listitem>
46 <listitem><para><filename><link linkend='var-TCLIBC'>TCLIBC</link></filename>
47 </para></listitem>
48 </itemizedlist>
49 </para>
50 </section>
51
52 <section id='ref-varlocality-config-machine'>
53 <title>Machine</title>
54
55 <para>
56 This section lists variables whose configuration context is the
57 machine.
58 <itemizedlist>
59 <listitem><para><filename><link linkend='var-TARGET_ARCH'>TARGET_ARCH</link></filename>
60 </para></listitem>
61 <listitem><para><filename><link linkend='var-SERIAL_CONSOLES'>SERIAL_CONSOLES</link>
62 </filename></para></listitem>
63 <listitem><para><filename><link linkend='var-PACKAGE_EXTRA_ARCHS'>PACKAGE_EXTRA_ARCHS</link>
64 </filename></para></listitem>
65 <listitem><para><filename><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link>
66 </filename></para></listitem>
67 <listitem><para><filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link>
68 </filename></para></listitem>
69 <listitem><para><filename><link linkend='var-MACHINE_EXTRA_RDEPENDS'>MACHINE_EXTRA_RDEPENDS
70 </link></filename></para></listitem>
71 <listitem><para><filename><link linkend='var-MACHINE_EXTRA_RRECOMMENDS'>MACHINE_EXTRA_RRECOMMENDS
72 </link></filename></para></listitem>
73 <listitem><para><filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'>MACHINE_ESSENTIAL_EXTRA_RDEPENDS
74 </link></filename></para></listitem>
75 <listitem><para><filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'>
76 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</link></filename></para></listitem>
77 </itemizedlist>
78 </para>
79 </section>
80
81 <section id='ref-varlocality-config-local'>
82 <title>Local</title>
83
84 <para>
85 This section lists variables whose configuration context is the
86 local configuration through the <filename>local.conf</filename>
87 file.
88 <itemizedlist>
89 <listitem><para><filename><link linkend='var-DISTRO'>DISTRO</link></filename>
90 </para></listitem>
91 <listitem><para><filename><link linkend='var-MACHINE'>MACHINE</link></filename>
92 </para></listitem>
93 <listitem><para><filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>
94 </para></listitem>
95 <listitem><para><filename><link linkend='var-BBFILES'>BBFILES</link></filename>
96 </para></listitem>
97 <listitem><para><filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES
98 </link></filename></para></listitem>
99 <listitem><para><filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link>
100 </filename></para></listitem>
101 <listitem><para><filename><link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link>
102 </filename></para></listitem>
103 <listitem><para><filename><link linkend='var-BBINCLUDELOGS'>BBINCLUDELOGS</link>
104 </filename></para></listitem>
105 <listitem><para><filename><link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>
106 ENABLE_BINARY_LOCALE_GENERATION</link></filename></para></listitem>
107 </itemizedlist>
108 </para>
109 </section>
110 </section>
111
112 <section id='ref-varlocality-recipes'>
113 <title>Recipes</title>
114
115 <para>
116 The following subsections provide lists of variables whose context is
117 recipes: required, dependencies, path, and extra build information.
118 </para>
119
120 <section id='ref-varlocality-recipe-required'>
121 <title>Required</title>
122
123 <para>
124 This section lists variables that are required for recipes.
125 <itemizedlist>
126 <listitem><para><filename><link linkend='var-LICENSE'>LICENSE</link>
127 </filename></para></listitem>
128 <listitem><para><filename><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link>
129 </filename></para></listitem>
130 <listitem><para><filename><link linkend='var-SRC_URI'>SRC_URI</link></filename> - used
131 in recipes that fetch local or remote files.
132 </para></listitem>
133 </itemizedlist>
134 </para>
135 </section>
136
137 <section id='ref-varlocality-recipe-dependencies'>
138 <title>Dependencies</title>
139
140 <para>
141 This section lists variables that define recipe dependencies.
142 <itemizedlist>
143 <listitem><para><filename><link linkend='var-DEPENDS'>DEPENDS</link>
144 </filename></para></listitem>
145 <listitem><para><filename><link linkend='var-RDEPENDS'>RDEPENDS</link>
146 </filename></para></listitem>
147 <listitem><para><filename><link linkend='var-RRECOMMENDS'>RRECOMMENDS</link>
148 </filename></para></listitem>
149 <listitem><para><filename><link linkend='var-RCONFLICTS'>RCONFLICTS</link>
150 </filename></para></listitem>
151 <listitem><para><filename><link linkend='var-RREPLACES'>RREPLACES</link>
152 </filename></para></listitem>
153 </itemizedlist>
154 </para>
155 </section>
156
157 <section id='ref-varlocality-recipe-paths'>
158 <title>Paths</title>
159
160 <para>
161 This section lists variables that define recipe paths.
162 <itemizedlist>
163 <listitem><para><filename><link linkend='var-WORKDIR'>WORKDIR</link>
164 </filename></para></listitem>
165 <listitem><para><filename><link linkend='var-S'>S</link>
166 </filename></para></listitem>
167 <listitem><para><filename><link linkend='var-FILES'>FILES</link>
168 </filename></para></listitem>
169 </itemizedlist>
170 </para>
171 </section>
172
173 <section id='ref-varlocality-recipe-build'>
174 <title>Extra Build Information</title>
175
176 <para>
177 This section lists variables that define extra build information for recipes.
178 <itemizedlist>
179 <listitem><para><filename><link linkend='var-EXTRA_OECMAKE'>EXTRA_OECMAKE</link>
180 </filename></para></listitem>
181 <listitem><para><filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link>
182 </filename></para></listitem>
183 <listitem><para><filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link>
184 </filename></para></listitem>
185 <listitem><para><filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
186 </para></listitem>
187 <listitem><para><filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE
188 </link></filename></para></listitem>
189 </itemizedlist>
190 </para>
191 </section>
192 </section>
193</chapter>
194<!--
195vim: expandtab tw=80 ts=4 spell spelllang=en_gb
196-->
diff --git a/documentation/ref-manual/resources.xml b/documentation/ref-manual/resources.xml
new file mode 100644
index 0000000000..686b48a546
--- /dev/null
+++ b/documentation/ref-manual/resources.xml
@@ -0,0 +1,128 @@
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
5<chapter id='resources'>
6<title>Contributing to the Yocto Project</title>
7
8<section id='resources-intro'>
9 <title>Introduction</title>
10 <para>
11 The Yocto Project team is happy for people to experiment with the Yocto Project.
12 A number of places exist to find help if you run into difficulties or find bugs.
13 To find out how to download source code,
14 see the "<ulink url='&YOCTO_DOCS_DEV_URL;#local-yp-release'>Yocto Project Release</ulink>"
15 section in the Yocto Project Development Manual.
16 </para>
17</section>
18
19<section id='resources-bugtracker'>
20 <title>Tracking Bugs</title>
21
22 <para>
23 If you find problems with the Yocto Project, you should report them using the
24 Bugzilla application at <ulink url='&YOCTO_BUGZILLA_URL;'></ulink>.
25 </para>
26</section>
27
28<section id='resources-mailinglist'>
29 <title>Mailing lists</title>
30
31 <para>
32 A number of mailing lists maintained by the Yocto Project exist
33 as well as related OpenEmbedded mailing lists for discussion,
34 patch submission and announcements.
35 To subscribe to one of the following mailing lists, click on the
36 appropriate URL in the following list and follow the instructions:
37 <itemizedlist>
38 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto'></ulink> -
39 General Yocto Project discussion mailing list. </para></listitem>
40 <listitem><para><ulink url='&OE_LISTS_URL;/listinfo/openembedded-core'></ulink> -
41 Discussion mailing list about OpenEmbedded-Core (the core metadata).</para></listitem>
42 <listitem><para><ulink url='&OE_LISTS_URL;/listinfo/openembedded-devel'></ulink> -
43 Discussion mailing list about OpenEmbedded.</para></listitem>
44 <listitem><para><ulink url='&OE_LISTS_URL;/listinfo/bitbake-devel'></ulink> -
45 Discussion mailing list about the
46 <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
47 build tool.</para></listitem>
48 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/poky'></ulink> -
49 Discussion mailing list about
50 <ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink>.
51 </para></listitem>
52 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto-announce'></ulink> -
53 Mailing list to receive official Yocto Project release and milestone
54 announcements.</para></listitem>
55 </itemizedlist>
56 </para>
57</section>
58
59<section id='resources-irc'>
60 <title>Internet Relay Chat (IRC)</title>
61
62 <para>
63 Two IRC channels on freenode are available for the Yocto Project and Poky discussions:
64 <itemizedlist>
65 <listitem><para><filename>#yocto</filename></para></listitem>
66 <listitem><para><filename>#poky</filename></para></listitem>
67 </itemizedlist>
68 </para>
69</section>
70
71<section id='resources-links'>
72 <title>Links</title>
73
74 <para>
75 Here is a list of resources you will find helpful:
76 <itemizedlist>
77 <listitem><para><emphasis>
78 <ulink url='&YOCTO_HOME_URL;'>The Yocto Project website</ulink>:
79 </emphasis> The home site for the Yocto
80 Project.</para></listitem>
81 <listitem><para><emphasis>
82 <ulink url='http://www.intel.com/'>Intel Corporation</ulink>:</emphasis>
83 The company who acquired OpenedHand in 2008 and began
84 development on the Yocto Project.</para></listitem>
85 <listitem><para><emphasis>
86 <ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>:</emphasis>
87 The upstream, generic, embedded distribution used as the basis
88 for the build system in the Yocto Project.
89 Poky derives from and contributes back to the OpenEmbedded
90 project.</para></listitem>
91 <listitem><para><emphasis>
92 <ulink url='http://developer.berlios.de/projects/bitbake/'>
93 BitBake</ulink>:</emphasis> The tool used to process metadata.</para></listitem>
94 <listitem><para><emphasis>
95 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>:</emphasis>
96 A comprehensive guide to the BitBake tool.
97 In the
98 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
99 you can find the BitBake User Manual in the
100 <filename>bitbake/doc/bitbake-user-manual</filename> directory.
101 </para></listitem>
102 <listitem><para><emphasis>
103 <ulink url='http://wiki.qemu.org/Index.html'>QEMU</ulink>:
104 </emphasis> An open source machine emulator and virtualizer.
105 </para></listitem>
106 </itemizedlist>
107 </para>
108</section>
109
110<section id='resources-contributions'>
111 <title>Contributions</title>
112
113 <para>
114 The Yocto Project gladly accepts contributions.
115 You can submit changes to the project either by creating and sending
116 pull requests,
117 or by submitting patches through email.
118 For information on how to do both as well as information on how
119 to find out who is the maintainer for areas of code, see the
120 "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>How to Submit a Change</ulink>"
121 section in the Yocto Project Development Manual.
122 </para>
123</section>
124
125</chapter>
126<!--
127vim: expandtab tw=80 ts=4
128-->
diff --git a/documentation/ref-manual/technical-details.xml b/documentation/ref-manual/technical-details.xml
new file mode 100644
index 0000000000..d34be750e3
--- /dev/null
+++ b/documentation/ref-manual/technical-details.xml
@@ -0,0 +1,1409 @@
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
5<chapter id='technical-details'>
6<title>Technical Details</title>
7
8 <para>
9 This chapter provides technical details for various parts of the
10 Yocto Project.
11 Currently, topics include Yocto Project components,
12 cross-toolchain generation, shared state (sstate) cache,
13 x32, Wayland support, and Licenses.
14 </para>
15
16<section id='usingpoky-components'>
17 <title>Yocto Project Components</title>
18
19 <para>
20 The
21 <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
22 task executor together with various types of configuration files form
23 the OpenEmbedded Core.
24 This section overviews these components by describing their use and
25 how they interact.
26 </para>
27
28 <para>
29 BitBake handles the parsing and execution of the data files.
30 The data itself is of various types:
31 <itemizedlist>
32 <listitem><para><emphasis>Recipes:</emphasis> Provides details
33 about particular pieces of software.
34 </para></listitem>
35 <listitem><para><emphasis>Class Data:</emphasis> Abstracts
36 common build information (e.g. how to build a Linux kernel).
37 </para></listitem>
38 <listitem><para><emphasis>Configuration Data:</emphasis> Defines
39 machine-specific settings, policy decisions, and so forth.
40 Configuration data acts as the glue to bind everything
41 together.
42 </para></listitem>
43 </itemizedlist>
44 </para>
45
46 <para>
47 BitBake knows how to combine multiple data sources together and refers
48 to each data source as a layer.
49 For information on layers, see the
50 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and
51 Creating Layers</ulink>" section of the Yocto Project Development Manual.
52 </para>
53
54 <para>
55 Following are some brief details on these core components.
56 For additional information on how these components interact during
57 a build, see the
58 "<link linkend='closer-look'>A Closer Look at the Yocto Project Development Environment</link>"
59 Chapter.
60 </para>
61
62 <section id='usingpoky-components-bitbake'>
63 <title>BitBake</title>
64
65 <para>
66 BitBake is the tool at the heart of the OpenEmbedded build system
67 and is responsible for parsing the
68 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>,
69 generating a list of tasks from it, and then executing those tasks.
70 </para>
71
72 <para>
73 This section briefly introduces BitBake.
74 If you want more information on BitBake, see the
75 <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>.
76 </para>
77
78 <para>
79 To see a list of the options BitBake supports, use either of
80 the following commands:
81 <literallayout class='monospaced'>
82 $ bitbake -h
83 $ bitbake --help
84 </literallayout>
85 </para>
86
87 <para>
88 The most common usage for BitBake is <filename>bitbake &lt;packagename&gt;</filename>, where
89 <filename>packagename</filename> is the name of the package you want to build
90 (referred to as the "target" in this manual).
91 The target often equates to the first part of a recipe's filename
92 (e.g. "foo" for a recipe named
93 <filename>foo_1.3.0-r0.bb</filename>).
94 So, to process the <filename>matchbox-desktop_1.2.3.bb</filename> recipe file, you
95 might type the following:
96 <literallayout class='monospaced'>
97 $ bitbake matchbox-desktop
98 </literallayout>
99 Several different versions of <filename>matchbox-desktop</filename> might exist.
100 BitBake chooses the one selected by the distribution configuration.
101 You can get more details about how BitBake chooses between different
102 target versions and providers in the
103 "<ulink url='&YOCTO_DOCS_BB_URL;#bb-bitbake-providers'>Preferences and Providers</ulink>"
104 section of the BitBake User Manual.
105 </para>
106
107 <para>
108 BitBake also tries to execute any dependent tasks first.
109 So for example, before building <filename>matchbox-desktop</filename>, BitBake
110 would build a cross compiler and <filename>eglibc</filename> if they had not already
111 been built.
112 <note>This release of the Yocto Project does not support the <filename>glibc</filename>
113 GNU version of the Unix standard C library. By default, the OpenEmbedded build system
114 builds with <filename>eglibc</filename>.</note>
115 </para>
116
117 <para>
118 A useful BitBake option to consider is the <filename>-k</filename> or
119 <filename>--continue</filename> option.
120 This option instructs BitBake to try and continue processing the job
121 as long as possible even after encountering an error.
122 When an error occurs, the target that
123 failed and those that depend on it cannot be remade.
124 However, when you use this option other dependencies can still be
125 processed.
126 </para>
127 </section>
128
129 <section id='usingpoky-components-metadata'>
130 <title>Metadata (Recipes)</title>
131
132 <para>
133 Files that have the <filename>.bb</filename> suffix are "recipes"
134 files.
135 In general, a recipe contains information about a single piece of
136 software.
137 This information includes the location from which to download the
138 unaltered source, any source patches to be applied to that source
139 (if needed), which special configuration options to apply,
140 how to compile the source files, and how to package the compiled
141 output.
142 </para>
143
144 <para>
145 The term "package" is sometimes used to refer to recipes. However,
146 since the word "package" is used for the packaged output from the OpenEmbedded
147 build system (i.e. <filename>.ipk</filename> or <filename>.deb</filename> files),
148 this document avoids using the term "package" when referring to recipes.
149 </para>
150 </section>
151
152 <section id='usingpoky-components-classes'>
153 <title>Classes</title>
154
155 <para>
156 Class files (<filename>.bbclass</filename>) contain information that
157 is useful to share between
158 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> files.
159 An example is the
160 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
161 class, which contains common settings for any application that
162 Autotools uses.
163 The "<link linkend='ref-classes'>Classes</link>" chapter provides
164 details about classes and how to use them.
165 </para>
166 </section>
167
168 <section id='usingpoky-components-configuration'>
169 <title>Configuration</title>
170
171 <para>
172 The configuration files (<filename>.conf</filename>) define various configuration variables
173 that govern the OpenEmbedded build process.
174 These files fall into several areas that define machine configuration options,
175 distribution configuration options, compiler tuning options, general common configuration
176 options, and user configuration options in <filename>local.conf</filename>, which is found
177 in the
178 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
179 </para>
180 </section>
181</section>
182
183<section id="cross-development-toolchain-generation">
184 <title>Cross-Development Toolchain Generation</title>
185
186 <para>
187 The Yocto Project does most of the work for you when it comes to
188 creating
189 <ulink url='&YOCTO_DOCS_DEV_URL;#cross-development-toolchain'>cross-development toolchains</ulink>.
190 This section provides some technical background on how
191 cross-development toolchains are created and used.
192 For more information on toolchains, you can also see the
193 <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink>.
194 </para>
195
196 <para>
197 In the Yocto Project development environment, cross-development
198 toolchains are used to build the image and applications that run on the
199 target hardware.
200 With just a few commands, the OpenEmbedded build system creates
201 these necessary toolchains for you.
202 </para>
203
204 <para>
205 The following figure shows a high-level build environment regarding
206 toolchain construction and use.
207 </para>
208
209 <para>
210 <imagedata fileref="figures/cross-development-toolchains.png" width="8in" depth="6in" align="center" />
211 </para>
212
213 <para>
214 Most of the work occurs on the Build Host.
215 This is the machine used to build images and generally work within the
216 the Yocto Project environment.
217 When you run BitBake to create an image, the OpenEmbedded build system
218 uses the host <filename>gcc</filename> compiler to bootstrap a
219 cross-compiler named <filename>gcc-cross</filename>.
220 The <filename>gcc-cross</filename> compiler is what BitBake uses to
221 compile source files when creating the target image.
222 You can think of <filename>gcc-cross</filename> simply as an
223 automatically generated cross-compiler that is used internally within
224 BitBake only.
225 </para>
226
227 <para>
228 The chain of events that occurs when <filename>gcc-cross</filename> is
229 bootstrapped is as follows:
230 <literallayout class='monospaced'>
231 gcc -> binutils-cross -> gcc-cross-initial -> linux-libc-headers -> eglibc-initial -> eglibc -> gcc-cross -> gcc-runtime
232 </literallayout>
233 <itemizedlist>
234 <listitem><para><filename>gcc</filename>:
235 The build host's GNU Compiler Collection (GCC).
236 </para></listitem>
237 <listitem><para><filename>binutils-cross</filename>:
238 The bare minimum binary utilities needed in order to run
239 the <filename>gcc-cross-initial</filename> phase of the
240 bootstrap operation.
241 </para></listitem>
242 <listitem><para><filename>gcc-cross-initial</filename>:
243 An early stage of the bootstrap process for creating
244 the cross-compiler.
245 This stage builds enough of the <filename>gcc-cross</filename>,
246 the C library, and other pieces needed to finish building the
247 final cross-compiler in later stages.
248 This tool is a "native" package (i.e. it is designed to run on
249 the build host).
250 </para></listitem>
251 <listitem><para><filename>linux-libc-headers</filename>:
252 Headers needed for the cross-compiler.
253 </para></listitem>
254 <listitem><para><filename>eglibc-initial</filename>:
255 An initial version of the Embedded GLIBC needed to bootstrap
256 <filename>eglibc</filename>.
257 </para></listitem>
258 <listitem><para><filename>gcc-cross</filename>:
259 The final stage of the bootstrap process for the
260 cross-compiler.
261 This stage results in the actual cross-compiler that
262 BitBake uses when it builds an image for a targeted
263 device.
264 <note>
265 If you are replacing this cross compiler toolchain
266 with a custom version, you must replace
267 <filename>gcc-cross</filename>.
268 </note>
269 This tool is also a "native" package (i.e. it is
270 designed to run on the build host).
271 </para></listitem>
272 <listitem><para><filename>gcc-runtime</filename>:
273 Runtime libraries resulting from the toolchain bootstrapping
274 process.
275 This tool produces a binary that consists of the
276 runtime libraries need for the targeted device.
277 </para></listitem>
278 </itemizedlist>
279 </para>
280
281 <para>
282 You can use the OpenEmbedded build system to build an installer for
283 the relocatable SDK used to develop applications.
284 When you run the installer, it installs the toolchain, which contains
285 the development tools (e.g., the
286 <filename>gcc-cross-canadian</filename>),
287 <filename>binutils-cross-canadian</filename>, and other
288 <filename>nativesdk-*</filename> tools you need to cross-compile and
289 test your software.
290 The figure shows the commands you use to easily build out this
291 toolchain.
292 This cross-development toolchain is built to execute on the
293 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
294 which might or might not be the same
295 machine as the Build Host.
296 <note>
297 If your target architecture is supported by the Yocto Project,
298 you can take advantage of pre-built images that ship with the
299 Yocto Project and already contain cross-development toolchain
300 installers.
301 </note>
302 </para>
303
304 <para>
305 Here is the bootstrap process for the relocatable toolchain:
306 <literallayout class='monospaced'>
307 gcc -> binutils-crosssdk -> gcc-crosssdk-initial -> linux-libc-headers -> eglibc-initial -> nativesdk-eglibc -> gcc-crosssdk -> gcc-cross-canadian
308 </literallayout>
309 <itemizedlist>
310 <listitem><para><filename>gcc</filename>:
311 The build host's GNU Compiler Collection (GCC).
312 </para></listitem>
313 <listitem><para><filename>binutils-crosssdk</filename>:
314 The bare minimum binary utilities needed in order to run
315 the <filename>gcc-crosssdk-initial</filename> phase of the
316 bootstrap operation.
317 </para></listitem>
318 <listitem><para><filename>gcc-crosssdk-initial</filename>:
319 An early stage of the bootstrap process for creating
320 the cross-compiler.
321 This stage builds enough of the
322 <filename>gcc-crosssdk</filename> and supporting pieces so that
323 the final stage of the bootstrap process can produce the
324 finished cross-compiler.
325 This tool is a "native" binary that runs on the build host.
326 </para></listitem>
327 <listitem><para><filename>linux-libc-headers</filename>:
328 Headers needed for the cross-compiler.
329 </para></listitem>
330 <listitem><para><filename>eglibc-initial</filename>:
331 An initial version of the Embedded GLIBC needed to bootstrap
332 <filename>nativesdk-eglibc</filename>.
333 </para></listitem>
334 <listitem><para><filename>nativesdk-eglibc</filename>:
335 The Embedded GLIBC needed to bootstrap the
336 <filename>gcc-crosssdk</filename>.
337 </para></listitem>
338 <listitem><para><filename>gcc-crosssdk</filename>:
339 The final stage of the bootstrap process for the
340 relocatable cross-compiler.
341 The <filename>gcc-crosssdk</filename> is a transitory compiler
342 and never leaves the build host.
343 Its purpose is to help in the bootstrap process to create the
344 eventual relocatable <filename>gcc-cross-canadian</filename>
345 compiler, which is relocatable.
346 This tool is also a "native" package (i.e. it is
347 designed to run on the build host).
348 </para></listitem>
349 <listitem><para><filename>gcc-cross-canadian</filename>:
350 The final relocatable cross-compiler.
351 When run on the
352 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
353 this tool
354 produces executable code that runs on the target device.
355 Only one cross-canadian compiler is produced per architecture
356 since they can be targeted at different processor optimizations
357 using configurations passed to the compiler through the
358 compile commands.
359 This circumvents the need for multiple compilers and thus
360 reduces the size of the toolchains.
361 </para></listitem>
362 </itemizedlist>
363 </para>
364
365 <note>
366 For information on advantages gained when building a
367 cross-development toolchain installer, see the
368 "<ulink url='&YOCTO_DOCS_ADT_URL;#optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</ulink>"
369 section in the Yocto Project Application Developer's Guide.
370 </note>
371</section>
372
373<section id="shared-state-cache">
374 <title>Shared State Cache</title>
375
376 <para>
377 By design, the OpenEmbedded build system builds everything from scratch unless
378 BitBake can determine that parts do not need to be rebuilt.
379 Fundamentally, building from scratch is attractive as it means all parts are
380 built fresh and there is no possibility of stale data causing problems.
381 When developers hit problems, they typically default back to building from scratch
382 so they know the state of things from the start.
383 </para>
384
385 <para>
386 Building an image from scratch is both an advantage and a disadvantage to the process.
387 As mentioned in the previous paragraph, building from scratch ensures that
388 everything is current and starts from a known state.
389 However, building from scratch also takes much longer as it generally means
390 rebuilding things that do not necessarily need to be rebuilt.
391 </para>
392
393 <para>
394 The Yocto Project implements shared state code that supports incremental builds.
395 The implementation of the shared state code answers the following questions that
396 were fundamental roadblocks within the OpenEmbedded incremental build support system:
397 <itemizedlist>
398 <listitem><para>What pieces of the system have changed and what pieces have
399 not changed?</para></listitem>
400 <listitem><para>How are changed pieces of software removed and replaced?</para></listitem>
401 <listitem><para>How are pre-built components that do not need to be rebuilt from scratch
402 used when they are available?</para></listitem>
403 </itemizedlist>
404 </para>
405
406 <para>
407 For the first question, the build system detects changes in the "inputs" to a given task by
408 creating a checksum (or signature) of the task's inputs.
409 If the checksum changes, the system assumes the inputs have changed and the task needs to be
410 rerun.
411 For the second question, the shared state (sstate) code tracks which tasks add which output
412 to the build process.
413 This means the output from a given task can be removed, upgraded or otherwise manipulated.
414 The third question is partly addressed by the solution for the second question
415 assuming the build system can fetch the sstate objects from remote locations and
416 install them if they are deemed to be valid.
417 </para>
418
419 <note>
420 The OpenEmbedded build system does not maintain
421 <link linkend='var-PR'><filename>PR</filename></link> information
422 as part of the shared state packages.
423 Consequently, considerations exist that affect maintaining shared
424 state feeds.
425 For information on how the OpenEmbedded build system
426 works with packages and can
427 track incrementing <filename>PR</filename> information, see the
428 "<ulink url='&YOCTO_DOCS_DEV_URL;#incrementing-a-package-revision-number'>Incrementing a Package Revision Number</ulink>"
429 section.
430 </note>
431
432 <para>
433 The rest of this section goes into detail about the overall incremental build
434 architecture, the checksums (signatures), shared state, and some tips and tricks.
435 </para>
436
437 <section id='overall-architecture'>
438 <title>Overall Architecture</title>
439
440 <para>
441 When determining what parts of the system need to be built, BitBake
442 works on a per-task basis rather than a per-recipe basis.
443 You might wonder why using a per-task basis is preferred over a per-recipe basis.
444 To help explain, consider having the IPK packaging backend enabled and then switching to DEB.
445 In this case, <filename>do_install</filename> and <filename>do_package</filename>
446 outputs are still valid.
447 However, with a per-recipe approach, the build would not include the
448 <filename>.deb</filename> files.
449 Consequently, you would have to invalidate the whole build and rerun it.
450 Rerunning everything is not the best solution.
451 Also, in this case, the core must be "taught" much about specific tasks.
452 This methodology does not scale well and does not allow users to easily add new tasks
453 in layers or as external recipes without touching the packaged-staging core.
454 </para>
455 </section>
456
457 <section id='checksums'>
458 <title>Checksums (Signatures)</title>
459
460 <para>
461 The shared state code uses a checksum, which is a unique signature of a task's
462 inputs, to determine if a task needs to be run again.
463 Because it is a change in a task's inputs that triggers a rerun, the process
464 needs to detect all the inputs to a given task.
465 For shell tasks, this turns out to be fairly easy because
466 the build process generates a "run" shell script for each task and
467 it is possible to create a checksum that gives you a good idea of when
468 the task's data changes.
469 </para>
470
471 <para>
472 To complicate the problem, there are things that should not be included in
473 the checksum.
474 First, there is the actual specific build path of a given task -
475 the <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
476 It does not matter if the work directory changes because it should not
477 affect the output for target packages.
478 Also, the build process has the objective of making native or cross packages relocatable.
479 The checksum therefore needs to exclude <filename>WORKDIR</filename>.
480 The simplistic approach for excluding the work directory is to set
481 <filename>WORKDIR</filename> to some fixed value and create the checksum
482 for the "run" script.
483 </para>
484
485 <para>
486 Another problem results from the "run" scripts containing functions that
487 might or might not get called.
488 The incremental build solution contains code that figures out dependencies
489 between shell functions.
490 This code is used to prune the "run" scripts down to the minimum set,
491 thereby alleviating this problem and making the "run" scripts much more
492 readable as a bonus.
493 </para>
494
495 <para>
496 So far we have solutions for shell scripts.
497 What about Python tasks?
498 The same approach applies even though these tasks are more difficult.
499 The process needs to figure out what variables a Python function accesses
500 and what functions it calls.
501 Again, the incremental build solution contains code that first figures out
502 the variable and function dependencies, and then creates a checksum for the data
503 used as the input to the task.
504 </para>
505
506 <para>
507 Like the <filename>WORKDIR</filename> case, situations exist where dependencies
508 should be ignored.
509 For these cases, you can instruct the build process to ignore a dependency
510 by using a line like the following:
511 <literallayout class='monospaced'>
512 PACKAGE_ARCHS[vardepsexclude] = "MACHINE"
513 </literallayout>
514 This example ensures that the <filename>PACKAGE_ARCHS</filename>
515 variable does not
516 depend on the value of
517 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
518 even if it does reference it.
519 </para>
520
521 <para>
522 Equally, there are cases where we need to add dependencies BitBake is not able to find.
523 You can accomplish this by using a line like the following:
524 <literallayout class='monospaced'>
525 PACKAGE_ARCHS[vardeps] = "MACHINE"
526 </literallayout>
527 This example explicitly adds the <filename>MACHINE</filename> variable as a
528 dependency for <filename>PACKAGE_ARCHS</filename>.
529 </para>
530
531 <para>
532 Consider a case with in-line Python, for example, where BitBake is not
533 able to figure out dependencies.
534 When running in debug mode (i.e. using <filename>-DDD</filename>), BitBake
535 produces output when it discovers something for which it cannot figure out
536 dependencies.
537 The Yocto Project team has currently not managed to cover those dependencies
538 in detail and is aware of the need to fix this situation.
539 </para>
540
541 <para>
542 Thus far, this section has limited discussion to the direct inputs into a task.
543 Information based on direct inputs is referred to as the "basehash" in the
544 code.
545 However, there is still the question of a task's indirect inputs - the
546 things that were already built and present in the
547 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
548 The checksum (or signature) for a particular task needs to add the hashes
549 of all the tasks on which the particular task depends.
550 Choosing which dependencies to add is a policy decision.
551 However, the effect is to generate a master checksum that combines the basehash
552 and the hashes of the task's dependencies.
553 </para>
554
555 <para>
556 At the code level, there are a variety of ways both the basehash and the
557 dependent task hashes can be influenced.
558 Within the BitBake configuration file, we can give BitBake some extra information
559 to help it construct the basehash.
560 The following statement effectively results in a list of global variable
561 dependency excludes - variables never included in any checksum:
562 <literallayout class='monospaced'>
563 BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \
564 SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
565 USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
566 PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
567 CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX"
568 </literallayout>
569 The previous example excludes
570 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
571 since that variable is actually constructed as a path within
572 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>, which is on
573 the whitelist.
574 </para>
575
576 <para>
577 The rules for deciding which hashes of dependent tasks to include through
578 dependency chains are more complex and are generally accomplished with a
579 Python function.
580 The code in <filename>meta/lib/oe/sstatesig.py</filename> shows two examples
581 of this and also illustrates how you can insert your own policy into the system
582 if so desired.
583 This file defines the two basic signature generators <filename>OE-Core</filename>
584 uses: "OEBasic" and "OEBasicHash".
585 By default, there is a dummy "noop" signature handler enabled in BitBake.
586 This means that behavior is unchanged from previous versions.
587 <filename>OE-Core</filename> uses the "OEBasicHash" signature handler by default
588 through this setting in the <filename>bitbake.conf</filename> file:
589 <literallayout class='monospaced'>
590 BB_SIGNATURE_HANDLER ?= "OEBasicHash"
591 </literallayout>
592 The "OEBasicHash" <filename>BB_SIGNATURE_HANDLER</filename> is the same as the
593 "OEBasic" version but adds the task hash to the stamp files.
594 This results in any
595 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
596 change that changes the task hash, automatically
597 causing the task to be run again.
598 This removes the need to bump <link linkend='var-PR'><filename>PR</filename></link>
599 values, and changes to Metadata automatically ripple across the build.
600 </para>
601
602 <para>
603 It is also worth noting that the end result of these signature generators is to
604 make some dependency and hash information available to the build.
605 This information includes:
606 <itemizedlist>
607 <listitem><para><filename>BB_BASEHASH_task-&lt;taskname&gt;</filename>:
608 The base hashes for each task in the recipe.
609 </para></listitem>
610 <listitem><para><filename>BB_BASEHASH_&lt;filename:taskname&gt;</filename>:
611 The base hashes for each dependent task.
612 </para></listitem>
613 <listitem><para><filename>BBHASHDEPS_&lt;filename:taskname&gt;</filename>:
614 The task dependencies for each task.
615 </para></listitem>
616 <listitem><para><filename>BB_TASKHASH</filename>:
617 The hash of the currently running task.
618 </para></listitem>
619 </itemizedlist>
620 </para>
621 </section>
622
623 <section id='shared-state'>
624 <title>Shared State</title>
625
626 <para>
627 Checksums and dependencies, as discussed in the previous section, solve half the
628 problem of supporting a shared state.
629 The other part of the problem is being able to use checksum information during the build
630 and being able to reuse or rebuild specific components.
631 </para>
632
633 <para>
634 The
635 <link linkend='ref-classes-sstate'><filename>sstate</filename></link>
636 class is a relatively generic implementation of how to "capture"
637 a snapshot of a given task.
638 The idea is that the build process does not care about the source of a task's output.
639 Output could be freshly built or it could be downloaded and unpacked from
640 somewhere - the build process does not need to worry about its origin.
641 </para>
642
643 <para>
644 There are two types of output, one is just about creating a directory
645 in <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
646 A good example is the output of either <filename>do_install</filename> or
647 <filename>do_package</filename>.
648 The other type of output occurs when a set of data is merged into a shared directory
649 tree such as the sysroot.
650 </para>
651
652 <para>
653 The Yocto Project team has tried to keep the details of the
654 implementation hidden in <filename>sstate</filename> class.
655 From a user's perspective, adding shared state wrapping to a task
656 is as simple as this <filename>do_deploy</filename> example taken
657 from the
658 <link linkend='ref-classes-deploy'><filename>deploy</filename></link>
659 class:
660 <literallayout class='monospaced'>
661 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
662 SSTATETASKS += "do_deploy"
663 do_deploy[sstate-name] = "deploy"
664 do_deploy[sstate-inputdirs] = "${DEPLOYDIR}"
665 do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
666
667 python do_deploy_setscene () {
668 sstate_setscene(d)
669 }
670 addtask do_deploy_setscene
671 do_deploy[dirs] = "${DEPLOYDIR} ${B}"
672 </literallayout>
673 In this example, we add some extra flags to the task, a name field ("deploy"), an
674 input directory where the task sends data, and the output
675 directory where the data from the task should eventually be copied.
676 We also add a <filename>_setscene</filename> variant of the task and add the task
677 name to the <filename>SSTATETASKS</filename> list.
678 </para>
679
680 <para>
681 If you have a directory whose contents you need to preserve, you can do this with
682 a line like the following:
683 <literallayout class='monospaced'>
684 do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}"
685 </literallayout>
686 This method, as well as the following example, also works for multiple directories.
687 <literallayout class='monospaced'>
688 do_package[sstate-inputdirs] = "${PKGDESTWORK} ${SHLIBSWORKDIR}"
689 do_package[sstate-outputdirs] = "${PKGDATA_DIR} ${SHLIBSDIR}"
690 do_package[sstate-lockfile] = "${PACKAGELOCK}"
691 </literallayout>
692 These methods also include the ability to take a lockfile when manipulating
693 shared state directory structures since some cases are sensitive to file
694 additions or removals.
695 </para>
696
697 <para>
698 Behind the scenes, the shared state code works by looking in
699 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link> and
700 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
701 for shared state files.
702 Here is an example:
703 <literallayout class='monospaced'>
704 SSTATE_MIRRORS ?= "\
705 file://.* http://someserver.tld/share/sstate/PATH \n \
706 file://.* file:///some/local/dir/sstate/PATH"
707 </literallayout>
708 <note>
709 The shared state directory (<filename>SSTATE_DIR</filename>) is
710 organized into two-character subdirectories, where the subdirectory
711 names are based on the first two characters of the hash.
712 If the shared state directory structure for a mirror has the
713 same structure as <filename>SSTATE_DIR</filename>, you must
714 specify "PATH" as part of the URI to enable the build system
715 to map to the appropriate subdirectory.
716 </note>
717 </para>
718
719 <para>
720 The shared state package validity can be detected just by looking at the
721 filename since the filename contains the task checksum (or signature) as
722 described earlier in this section.
723 If a valid shared state package is found, the build process downloads it
724 and uses it to accelerate the task.
725 </para>
726
727 <para>
728 The build processes use the <filename>*_setscene</filename> tasks
729 for the task acceleration phase.
730 BitBake goes through this phase before the main execution code and tries
731 to accelerate any tasks for which it can find shared state packages.
732 If a shared state package for a task is available, the shared state
733 package is used.
734 This means the task and any tasks on which it is dependent are not
735 executed.
736 </para>
737
738 <para>
739 As a real world example, the aim is when building an IPK-based image,
740 only the <filename>do_package_write_ipk</filename> tasks would have their
741 shared state packages fetched and extracted.
742 Since the sysroot is not used, it would never get extracted.
743 This is another reason why a task-based approach is preferred over a
744 recipe-based approach, which would have to install the output from every task.
745 </para>
746 </section>
747
748 <section id='tips-and-tricks'>
749 <title>Tips and Tricks</title>
750
751 <para>
752 The code in the build system that supports incremental builds is not
753 simple code.
754 This section presents some tips and tricks that help you work around
755 issues related to shared state code.
756 </para>
757
758 <section id='debugging'>
759 <title>Debugging</title>
760
761 <para>
762 When things go wrong, debugging needs to be straightforward.
763 Because of this, the Yocto Project includes strong debugging
764 tools:
765 <itemizedlist>
766 <listitem><para>Whenever a shared state package is written out, so is a
767 corresponding <filename>.siginfo</filename> file.
768 This practice results in a pickled Python database of all
769 the metadata that went into creating the hash for a given shared state
770 package.</para></listitem>
771 <listitem><para>If you run BitBake with the <filename>--dump-signatures</filename>
772 (or <filename>-S</filename>) option, BitBake dumps out
773 <filename>.siginfo</filename> files in
774 the stamp directory for every task it would have executed instead of
775 building the specified target package.</para></listitem>
776 <listitem><para>There is a <filename>bitbake-diffsigs</filename> command that
777 can process <filename>.siginfo</filename> files.
778 If you specify one of these files, BitBake dumps out the dependency
779 information in the file.
780 If you specify two files, BitBake compares the two files and dumps out
781 the differences between the two.
782 This more easily helps answer the question of "What
783 changed between X and Y?"</para></listitem>
784 </itemizedlist>
785 </para>
786 </section>
787
788 <section id='invalidating-shared-state'>
789 <title>Invalidating Shared State</title>
790
791 <para>
792 The OpenEmbedded build system uses checksums and shared state
793 cache to avoid unnecessarily rebuilding tasks.
794 Collectively, this scheme is known as "shared state code."
795 </para>
796
797 <para>
798 As with all schemes, this one has some drawbacks.
799 It is possible that you could make implicit changes to your
800 code that the checksum calculations do not take into
801 account.
802 These implicit changes affect a task's output but do not trigger
803 the shared state code into rebuilding a recipe.
804 Consider an example during which a tool changes its output.
805 Assume that the output of <filename>rpmdeps</filename> changes.
806 The result of the change should be that all the
807 <filename>package</filename> and
808 <filename>package_write_rpm</filename> shared state cache
809 items become invalid.
810 However, because the change to the output is
811 external to the code and therefore implicit,
812 the associated shared state cache items do not become
813 invalidated.
814 In this case, the build process uses the cached items rather
815 than running the task again.
816 Obviously, these types of implicit changes can cause problems.
817 </para>
818
819 <para>
820 To avoid these problems during the build, you need to
821 understand the effects of any changes you make.
822 Realize that changes you make directly to a function
823 are automatically factored into the checksum calculation.
824 Thus, these explicit changes invalidate the associated area of
825 shared state cache.
826 However, you need to be aware of any implicit changes that
827 are not obvious changes to the code and could affect the output
828 of a given task.
829 </para>
830
831 <para>
832 When you identify an implicit change, you can easily take steps
833 to invalidate the cache and force the tasks to run.
834 The steps you can take are as simple as changing a function's
835 comments in the source code.
836 For example, to invalidate package shared state files, change
837 the comment statements of <filename>do_package</filename> or
838 the comments of one of the functions it calls.
839 Even though the change is purely cosmetic, it causes the
840 checksum to be recalculated and forces the OpenEmbedded build
841 system to run the task again.
842 </para>
843
844 <note>
845 For an example of a commit that makes a cosmetic change to
846 invalidate shared state, see this
847 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/commit/meta/classes/package.bbclass?id=737f8bbb4f27b4837047cb9b4fbfe01dfde36d54'>commit</ulink>.
848 </note>
849 </section>
850 </section>
851</section>
852
853<section id='x32'>
854 <title>x32</title>
855
856 <para>
857 x32 is a processor-specific Application Binary Interface (psABI) for x86_64.
858 An ABI defines the calling conventions between functions in a processing environment.
859 The interface determines what registers are used and what the sizes are for various C data types.
860 </para>
861
862 <para>
863 Some processing environments prefer using 32-bit applications even when running
864 on Intel 64-bit platforms.
865 Consider the i386 psABI, which is a very old 32-bit ABI for Intel 64-bit platforms.
866 The i386 psABI does not provide efficient use and access of the Intel 64-bit processor resources,
867 leaving the system underutilized.
868 Now consider the x86_64 psABI.
869 This ABI is newer and uses 64-bits for data sizes and program pointers.
870 The extra bits increase the footprint size of the programs, libraries,
871 and also increases the memory and file system size requirements.
872 Executing under the x32 psABI enables user programs to utilize CPU and system resources
873 more efficiently while keeping the memory footprint of the applications low.
874 Extra bits are used for registers but not for addressing mechanisms.
875 </para>
876
877 <section id='support'>
878 <title>Support</title>
879
880 <para>
881 This Yocto Project release supports the final specifications of x32
882 psABI.
883 Support for x32 psABI exists as follows:
884 <itemizedlist>
885 <listitem><para>You can create packages and images in x32 psABI format on x86_64 architecture targets.
886 </para></listitem>
887 <listitem><para>You can successfully build many recipes with the x32 toolchain.</para></listitem>
888 <listitem><para>You can create and boot <filename>core-image-minimal</filename> and
889 <filename>core-image-sato</filename> images.</para></listitem>
890 </itemizedlist>
891 </para>
892 </section>
893
894 <section id='completing-x32'>
895 <title>Completing x32</title>
896
897 <para>
898 Future Plans for the x32 psABI in the Yocto Project include the following:
899 <itemizedlist>
900 <listitem><para>Enhance and fix the few remaining recipes so they
901 work with and support x32 toolchains.</para></listitem>
902 <listitem><para>Enhance RPM Package Manager (RPM) support for x32 binaries.</para></listitem>
903 <listitem><para>Support larger images.</para></listitem>
904 </itemizedlist>
905 </para>
906 </section>
907
908 <section id='using-x32-right-now'>
909 <title>Using x32 Right Now</title>
910
911 <para>
912 Follow these steps to use the x32 spABI:
913 <itemizedlist>
914 <listitem><para>Enable the x32 psABI tuning file for <filename>x86_64</filename>
915 machines by editing the <filename>conf/local.conf</filename> like this:
916 <literallayout class='monospaced'>
917 MACHINE = "qemux86-64"
918 DEFAULTTUNE = "x86-64-x32"
919 baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) \
920 or 'INVALID'), True) or 'lib'}"
921 #MACHINE = "genericx86"
922 #DEFAULTTUNE = "core2-64-x32"
923 </literallayout></para></listitem>
924 <listitem><para>As usual, use BitBake to build an image that supports the x32 psABI.
925 Here is an example:
926 <literallayout class='monospaced'>
927 $ bitbake core-image-sato
928 </literallayout></para></listitem>
929 <listitem><para>As usual, run your image using QEMU:
930 <literallayout class='monospaced'>
931 $ runqemu qemux86-64 core-image-sato
932 </literallayout></para></listitem>
933 </itemizedlist>
934 </para>
935 </section>
936</section>
937
938<section id="wayland">
939 <title>Wayland</title>
940
941 <para>
942 <ulink url='http://en.wikipedia.org/wiki/Wayland_(display_server_protocol)'>Wayland</ulink>
943 is a computer display server protocol that
944 provides a method for compositing window managers to communicate
945 directly with applications and video hardware and expects them to
946 communicate with input hardware using other libraries.
947 Using Wayland with supporting targets can result in better control
948 over graphics frame rendering than an application might otherwise
949 achieve.
950 </para>
951
952 <para>
953 The Yocto Project provides the Wayland protocol libraries and the
954 reference
955 <ulink url='http://en.wikipedia.org/wiki/Wayland_(display_server_protocol)#Weston'>Weston</ulink>
956 compositor as part of its release.
957 This section describes what you need to do to implement Wayland and
958 use the compositor when building an image for a supporting target.
959 </para>
960
961 <section id="wayland-support">
962 <title>Support</title>
963
964 <para>
965 The Wayland protocol libraries and the reference Weston compositor
966 ship as integrated packages in the <filename>meta</filename> layer
967 of the
968 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
969 Specifically, you can find the recipes that build both Wayland
970 and Weston at <filename>meta/recipes-graphics/wayland</filename>.
971 </para>
972
973 <para>
974 You can build both the Wayland and Weston packages for use only
975 with targets that accept the
976 <ulink url='http://dri.freedesktop.org/wiki/'>Mesa 3D and Direct Rendering Infrastructure</ulink>,
977 which is also known as Mesa DRI.
978 This implies that you cannot build and use the packages if your
979 target uses, for example, the
980 <trademark class='registered'>Intel</trademark> Embedded Media and
981 Graphics Driver (<trademark class='registered'>Intel</trademark>
982 EMGD) that overrides Mesa DRI.
983 </para>
984
985 <note>
986 Due to lack of EGL support, Weston 1.0.3 will not run directly on
987 the emulated QEMU hardware.
988 However, this version of Weston will run under X emulation without
989 issues.
990 </note>
991 </section>
992
993 <section id="enabling-wayland-in-an-image">
994 <title>Enabling Wayland in an Image</title>
995
996 <para>
997 To enable Wayland, you need to enable it to be built and enable
998 it to be included in the image.
999 </para>
1000
1001 <section id="enable-building">
1002 <title>Building</title>
1003
1004 <para>
1005 To cause Mesa to build the <filename>wayland-egl</filename>
1006 platform and Weston to build Wayland with Kernel Mode
1007 Setting
1008 (<ulink url='https://wiki.archlinux.org/index.php/Kernel_Mode_Setting'>KMS</ulink>)
1009 support, include the "wayland" flag in the
1010 <link linkend="var-DISTRO_FEATURES"><filename>DISTRO_FEATURES</filename></link>
1011 statement in your <filename>local.conf</filename> file:
1012 <literallayout class='monospaced'>
1013 DISTRO_FEATURES_append = " wayland"
1014 </literallayout>
1015 </para>
1016
1017 <note>
1018 If X11 has been enabled elsewhere, Weston will build Wayland
1019 with X11 support
1020 </note>
1021 </section>
1022
1023 <section id="enable-installation-in-an-image">
1024 <title>Installing</title>
1025
1026 <para>
1027 To install the Wayland feature into an image, you must
1028 include the following
1029 <link linkend='var-CORE_IMAGE_EXTRA_INSTALL'><filename>CORE_IMAGE_EXTRA_INSTALL</filename></link>
1030 statement in your <filename>local.conf</filename> file:
1031 <literallayout class='monospaced'>
1032 CORE_IMAGE_EXTRA_INSTALL += "wayland weston"
1033 </literallayout>
1034 </para>
1035 </section>
1036 </section>
1037
1038 <section id="running-weston">
1039 <title>Running Weston</title>
1040
1041 <para>
1042 To run Weston inside X11, enabling it as described earlier and
1043 building a Sato image is sufficient.
1044 If you are running your image under Sato, a Weston Launcher appears
1045 in the "Utility" category.
1046 </para>
1047
1048 <para>
1049 Alternatively, you can run Weston through the command-line
1050 interpretor (CLI), which is better suited for development work.
1051 To run Weston under the CLI, you need to do the following after
1052 your image is built:
1053 <orderedlist>
1054 <listitem><para>Run these commands to export
1055 <filename>XDG_RUNTIME_DIR</filename>:
1056 <literallayout class='monospaced'>
1057 mkdir -p /tmp/$USER-weston
1058 chmod 0700 /tmp/$USER-weston
1059 export XDG_RUNTIME_DIR=/tmp/$USER-weston
1060 </literallayout></para></listitem>
1061 <listitem><para>Launch Weston in the shell:
1062 <literallayout class='monospaced'>
1063 weston
1064 </literallayout></para></listitem>
1065 </orderedlist>
1066 </para>
1067 </section>
1068</section>
1069
1070<section id="licenses">
1071 <title>Licenses</title>
1072
1073 <para>
1074 This section describes the mechanism by which the OpenEmbedded build system
1075 tracks changes to licensing text.
1076 The section also describes how to enable commercially licensed recipes,
1077 which by default are disabled.
1078 </para>
1079
1080 <para>
1081 For information that can help you maintain compliance with various open
1082 source licensing during the lifecycle of the product, see the
1083 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Project's Lifecycle</ulink>" section
1084 in the Yocto Project Development Manual.
1085 </para>
1086
1087 <section id="usingpoky-configuring-LIC_FILES_CHKSUM">
1088 <title>Tracking License Changes</title>
1089
1090 <para>
1091 The license of an upstream project might change in the future.
1092 In order to prevent these changes going unnoticed, the
1093 <filename><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link></filename>
1094 variable tracks changes to the license text. The checksums are validated at the end of the
1095 configure step, and if the checksums do not match, the build will fail.
1096 </para>
1097
1098 <section id="usingpoky-specifying-LIC_FILES_CHKSUM">
1099 <title>Specifying the <filename>LIC_FILES_CHKSUM</filename> Variable</title>
1100
1101 <para>
1102 The <filename>LIC_FILES_CHKSUM</filename>
1103 variable contains checksums of the license text in the source code for the recipe.
1104 Following is an example of how to specify <filename>LIC_FILES_CHKSUM</filename>:
1105 <literallayout class='monospaced'>
1106 LIC_FILES_CHKSUM = "file://COPYING;md5=xxxx \
1107 file://licfile1.txt;beginline=5;endline=29;md5=yyyy \
1108 file://licfile2.txt;endline=50;md5=zzzz \
1109 ..."
1110 </literallayout>
1111 </para>
1112
1113 <para>
1114 The build system uses the
1115 <filename><link linkend='var-S'>S</link></filename> variable as
1116 the default directory when searching files listed in
1117 <filename>LIC_FILES_CHKSUM</filename>.
1118 The previous example employs the default directory.
1119 </para>
1120
1121 <para>
1122 Consider this next example:
1123 <literallayout class='monospaced'>
1124 LIC_FILES_CHKSUM = "file://src/ls.c;beginline=5;endline=16;\
1125 md5=bb14ed3c4cda583abc85401304b5cd4e"
1126 LIC_FILES_CHKSUM = "file://${WORKDIR}/license.html;md5=5c94767cedb5d6987c902ac850ded2c6"
1127 </literallayout>
1128 </para>
1129
1130 <para>
1131 The first line locates a file in
1132 <filename>${S}/src/ls.c</filename>.
1133 The second line refers to a file in
1134 <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>.
1135 </para>
1136 <para>
1137 Note that <filename>LIC_FILES_CHKSUM</filename> variable is
1138 mandatory for all recipes, unless the
1139 <filename>LICENSE</filename> variable is set to "CLOSED".
1140 </para>
1141 </section>
1142
1143 <section id="usingpoky-LIC_FILES_CHKSUM-explanation-of-syntax">
1144 <title>Explanation of Syntax</title>
1145 <para>
1146 As mentioned in the previous section, the
1147 <filename>LIC_FILES_CHKSUM</filename> variable lists all the
1148 important files that contain the license text for the source code.
1149 It is possible to specify a checksum for an entire file, or a specific section of a
1150 file (specified by beginning and ending line numbers with the "beginline" and "endline"
1151 parameters, respectively).
1152 The latter is useful for source files with a license notice header,
1153 README documents, and so forth.
1154 If you do not use the "beginline" parameter, then it is assumed that the text begins on the
1155 first line of the file.
1156 Similarly, if you do not use the "endline" parameter, it is assumed that the license text
1157 ends with the last line of the file.
1158 </para>
1159
1160 <para>
1161 The "md5" parameter stores the md5 checksum of the license text.
1162 If the license text changes in any way as compared to this parameter
1163 then a mismatch occurs.
1164 This mismatch triggers a build failure and notifies the developer.
1165 Notification allows the developer to review and address the license text changes.
1166 Also note that if a mismatch occurs during the build, the correct md5
1167 checksum is placed in the build log and can be easily copied to the recipe.
1168 </para>
1169
1170 <para>
1171 There is no limit to how many files you can specify using the
1172 <filename>LIC_FILES_CHKSUM</filename> variable.
1173 Generally, however, every project requires a few specifications for license tracking.
1174 Many projects have a "COPYING" file that stores the license information for all the source
1175 code files.
1176 This practice allows you to just track the "COPYING" file as long as it is kept up to date.
1177 </para>
1178
1179 <tip>
1180 If you specify an empty or invalid "md5" parameter, BitBake returns an md5 mis-match
1181 error and displays the correct "md5" parameter value during the build.
1182 The correct parameter is also captured in the build log.
1183 </tip>
1184
1185 <tip>
1186 If the whole file contains only license text, you do not need to use the "beginline" and
1187 "endline" parameters.
1188 </tip>
1189 </section>
1190 </section>
1191
1192 <section id="enabling-commercially-licensed-recipes">
1193 <title>Enabling Commercially Licensed Recipes</title>
1194
1195 <para>
1196 By default, the OpenEmbedded build system disables
1197 components that have commercial or other special licensing
1198 requirements.
1199 Such requirements are defined on a
1200 recipe-by-recipe basis through the <filename>LICENSE_FLAGS</filename> variable
1201 definition in the affected recipe.
1202 For instance, the
1203 <filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
1204 recipe contains the following statement:
1205 <literallayout class='monospaced'>
1206 LICENSE_FLAGS = "commercial"
1207 </literallayout>
1208 Here is a slightly more complicated example that contains both an
1209 explicit recipe name and version (after variable expansion):
1210 <literallayout class='monospaced'>
1211 LICENSE_FLAGS = "license_${PN}_${PV}"
1212 </literallayout>
1213 In order for a component restricted by a <filename>LICENSE_FLAGS</filename>
1214 definition to be enabled and included in an image, it
1215 needs to have a matching entry in the global
1216 <filename>LICENSE_FLAGS_WHITELIST</filename> variable, which is a variable
1217 typically defined in your <filename>local.conf</filename> file.
1218 For example, to enable
1219 the <filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
1220 package, you could add either the string
1221 "commercial_gst-plugins-ugly" or the more general string
1222 "commercial" to <filename>LICENSE_FLAGS_WHITELIST</filename>.
1223 See the
1224 "<link linkend='license-flag-matching'>License Flag Matching</link>" section
1225 for a full explanation of how <filename>LICENSE_FLAGS</filename> matching works.
1226 Here is the example:
1227 <literallayout class='monospaced'>
1228 LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly"
1229 </literallayout>
1230 Likewise, to additionally enable the package built from the recipe containing
1231 <filename>LICENSE_FLAGS = "license_${PN}_${PV}"</filename>, and assuming
1232 that the actual recipe name was <filename>emgd_1.10.bb</filename>,
1233 the following string would enable that package as well as
1234 the original <filename>gst-plugins-ugly</filename> package:
1235 <literallayout class='monospaced'>
1236 LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly license_emgd_1.10"
1237 </literallayout>
1238 As a convenience, you do not need to specify the complete license string
1239 in the whitelist for every package.
1240 You can use an abbreviated form, which consists
1241 of just the first portion or portions of the license string before
1242 the initial underscore character or characters.
1243 A partial string will match
1244 any license that contains the given string as the first
1245 portion of its license.
1246 For example, the following
1247 whitelist string will also match both of the packages
1248 previously mentioned as well as any other packages that have
1249 licenses starting with "commercial" or "license".
1250 <literallayout class='monospaced'>
1251 LICENSE_FLAGS_WHITELIST = "commercial license"
1252 </literallayout>
1253 </para>
1254
1255 <section id="license-flag-matching">
1256 <title>License Flag Matching</title>
1257
1258 <para>
1259 License flag matching allows you to control what recipes the
1260 OpenEmbedded build system includes in the build.
1261 Fundamentally, the build system attempts to match
1262 <filename>LICENSE_FLAGS</filename> strings found in
1263 recipes against <filename>LICENSE_FLAGS_WHITELIST</filename>
1264 strings found in the whitelist.
1265 A match causes the build system to include a recipe in the
1266 build, while failure to find a match causes the build system to
1267 exclude a recipe.
1268 </para>
1269
1270 <para>
1271 In general, license flag matching is simple.
1272 However, understanding some concepts will help you
1273 correctly and effectively use matching.
1274 </para>
1275
1276 <para>
1277 Before a flag
1278 defined by a particular recipe is tested against the
1279 contents of the whitelist, the expanded string
1280 <filename>_${PN}</filename> is appended to the flag.
1281 This expansion makes each <filename>LICENSE_FLAGS</filename>
1282 value recipe-specific.
1283 After expansion, the string is then matched against the
1284 whitelist.
1285 Thus, specifying
1286 <filename>LICENSE_FLAGS = "commercial"</filename>
1287 in recipe "foo", for example, results in the string
1288 <filename>"commercial_foo"</filename>.
1289 And, to create a match, that string must appear in the
1290 whitelist.
1291 </para>
1292
1293 <para>
1294 Judicious use of the <filename>LICENSE_FLAGS</filename>
1295 strings and the contents of the
1296 <filename>LICENSE_FLAGS_WHITELIST</filename> variable
1297 allows you a lot of flexibility for including or excluding
1298 recipes based on licensing.
1299 For example, you can broaden the matching capabilities by
1300 using license flags string subsets in the whitelist.
1301 <note>When using a string subset, be sure to use the part of
1302 the expanded string that precedes the appended underscore
1303 character (e.g. <filename>usethispart_1.3</filename>,
1304 <filename>usethispart_1.4</filename>, and so forth).
1305 </note>
1306 For example, simply specifying the string "commercial" in
1307 the whitelist matches any expanded
1308 <filename>LICENSE_FLAGS</filename> definition that starts with
1309 the string "commercial" such as "commercial_foo" and
1310 "commercial_bar", which are the strings the build system
1311 automatically generates for hypothetical recipes named
1312 "foo" and "bar" assuming those recipes simply specify the
1313 following:
1314 <literallayout class='monospaced'>
1315 LICENSE_FLAGS = "commercial"
1316 </literallayout>
1317 Thus, you can choose to exhaustively
1318 enumerate each license flag in the whitelist and
1319 allow only specific recipes into the image, or
1320 you can use a string subset that causes a broader range of
1321 matches to allow a range of recipes into the image.
1322 </para>
1323
1324 <para>
1325 This scheme works even if the
1326 <filename>LICENSE_FLAGS</filename> string already
1327 has <filename>_${PN}</filename> appended.
1328 For example, the build system turns the license flag
1329 "commercial_1.2_foo" into "commercial_1.2_foo_foo" and would
1330 match both the general "commercial" and the specific
1331 "commercial_1.2_foo" strings found in the whitelist, as
1332 expected.
1333 </para>
1334
1335 <para>
1336 Here are some other scenarios:
1337 <itemizedlist>
1338 <listitem><para>You can specify a versioned string in the
1339 recipe such as "commercial_foo_1.2" in a "foo" recipe.
1340 The build system expands this string to
1341 "commercial_foo_1.2_foo".
1342 Combine this license flag with a whitelist that has
1343 the string "commercial" and you match the flag along
1344 with any other flag that starts with the string
1345 "commercial".</para></listitem>
1346 <listitem><para>Under the same circumstances, you can
1347 use "commercial_foo" in the whitelist and the
1348 build system not only matches "commercial_foo_1.2" but
1349 also matches any license flag with the string
1350 "commercial_foo", regardless of the version.
1351 </para></listitem>
1352 <listitem><para>You can be very specific and use both the
1353 package and version parts in the whitelist (e.g.
1354 "commercial_foo_1.2") to specifically match a
1355 versioned recipe.</para></listitem>
1356 </itemizedlist>
1357 </para>
1358 </section>
1359
1360 <section id="other-variables-related-to-commercial-licenses">
1361 <title>Other Variables Related to Commercial Licenses</title>
1362
1363 <para>
1364 Other helpful variables related to commercial
1365 license handling exist and are defined in the
1366 <filename>poky/meta/conf/distro/include/default-distrovars.inc</filename> file:
1367 <literallayout class='monospaced'>
1368 COMMERCIAL_AUDIO_PLUGINS ?= ""
1369 COMMERCIAL_VIDEO_PLUGINS ?= ""
1370 COMMERCIAL_QT = ""
1371 </literallayout>
1372 If you want to enable these components, you can do so by making sure you have
1373 statements similar to the following
1374 in your <filename>local.conf</filename> configuration file:
1375 <literallayout class='monospaced'>
1376 COMMERCIAL_AUDIO_PLUGINS = "gst-plugins-ugly-mad \
1377 gst-plugins-ugly-mpegaudioparse"
1378 COMMERCIAL_VIDEO_PLUGINS = "gst-plugins-ugly-mpeg2dec \
1379 gst-plugins-ugly-mpegstream gst-plugins-bad-mpegvideoparse"
1380 COMMERCIAL_QT ?= "qmmp"
1381 LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly commercial_gst-plugins-bad commercial_qmmp"
1382 </literallayout>
1383 Of course, you could also create a matching whitelist
1384 for those components using the more general "commercial"
1385 in the whitelist, but that would also enable all the
1386 other packages with <filename>LICENSE_FLAGS</filename> containing
1387 "commercial", which you may or may not want:
1388 <literallayout class='monospaced'>
1389 LICENSE_FLAGS_WHITELIST = "commercial"
1390 </literallayout>
1391 </para>
1392
1393 <para>
1394 Specifying audio and video plug-ins as part of the
1395 <filename>COMMERCIAL_AUDIO_PLUGINS</filename> and
1396 <filename>COMMERCIAL_VIDEO_PLUGINS</filename> statements
1397 or commercial Qt components as part of
1398 the <filename>COMMERCIAL_QT</filename> statement (along
1399 with the enabling <filename>LICENSE_FLAGS_WHITELIST</filename>) includes the
1400 plug-ins or components into built images, thus adding
1401 support for media formats or components.
1402 </para>
1403 </section>
1404 </section>
1405</section>
1406</chapter>
1407<!--
1408vim: expandtab tw=80 ts=4
1409-->
diff --git a/documentation/ref-manual/usingpoky.xml b/documentation/ref-manual/usingpoky.xml
new file mode 100644
index 0000000000..a8a6f3b92a
--- /dev/null
+++ b/documentation/ref-manual/usingpoky.xml
@@ -0,0 +1,882 @@
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
5<chapter id='usingpoky'>
6<title>Using the Yocto Project</title>
7
8 <para>
9 This chapter describes common usage for the Yocto Project.
10 The information is introductory in nature as other manuals in the Yocto Project
11 documentation set provide more details on how to use the Yocto Project.
12 </para>
13
14<section id='usingpoky-build'>
15 <title>Running a Build</title>
16
17 <para>
18 This section provides a summary of the build process and provides information
19 for less obvious aspects of the build process.
20 For general information on how to build an image using the OpenEmbedded build
21 system, see the
22 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
23 section of the Yocto Project Quick Start.
24 </para>
25
26 <section id='build-overview'>
27 <title>Build Overview</title>
28
29 <para>
30 The first thing you need to do is set up the OpenEmbedded build
31 environment by sourcing an environment setup script
32 (i.e.
33 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
34 or
35 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
36 Here is an example:
37 <literallayout class='monospaced'>
38 $ source &OE_INIT_FILE; [&lt;build_dir&gt;]
39 </literallayout>
40 </para>
41
42 <para>
43 The <filename>build_dir</filename> argument is optional and specifies the directory the
44 OpenEmbedded build system uses for the build -
45 the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
46 If you do not specify a Build Directory, it defaults to a directory
47 named <filename>build</filename> in your current working directory.
48 A common practice is to use a different Build Directory for different targets.
49 For example, <filename>~/build/x86</filename> for a <filename>qemux86</filename>
50 target, and <filename>~/build/arm</filename> for a <filename>qemuarm</filename> target.
51 </para>
52
53 <para>
54 Once the build environment is set up, you can build a target using:
55 <literallayout class='monospaced'>
56 $ bitbake &lt;target&gt;
57 </literallayout>
58 </para>
59
60 <para>
61 The <filename>target</filename> is the name of the recipe you want to build.
62 Common targets are the images in <filename>meta/recipes-core/images</filename>,
63 <filename>meta/recipes-sato/images</filename>, etc. all found in the
64 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
65 Or, the target can be the name of a recipe for a specific piece of software such as
66 BusyBox.
67 For more details about the images the OpenEmbedded build system supports, see the
68 "<link linkend="ref-images">Images</link>" chapter.
69 </para>
70
71 <note>
72 Building an image without GNU General Public License Version 3 (GPLv3) components
73 is supported for only minimal and base images.
74 See the "<link linkend='ref-images'>Images</link>" chapter for more information.
75 </note>
76 </section>
77
78 <section id='building-an-image-using-gpl-components'>
79 <title>Building an Image Using GPL Components</title>
80
81 <para>
82 When building an image using GPL components, you need to maintain your original
83 settings and not switch back and forth applying different versions of the GNU
84 General Public License.
85 If you rebuild using different versions of GPL, dependency errors might occur
86 due to some components not being rebuilt.
87 </para>
88 </section>
89</section>
90
91<section id='usingpoky-install'>
92 <title>Installing and Using the Result</title>
93
94 <para>
95 Once an image has been built, it often needs to be installed.
96 The images and kernels built by the OpenEmbedded build system are placed in the
97 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink> in
98 <filename class="directory">tmp/deploy/images</filename>.
99 For information on how to run pre-built images such as <filename>qemux86</filename>
100 and <filename>qemuarm</filename>, see the
101 "<ulink url='&YOCTO_DOCS_QS_URL;#using-pre-built'>Using Pre-Built Binaries and QEMU</ulink>"
102 section in the Yocto Project Quick Start.
103 For information about how to install these images, see the documentation for your
104 particular board or machine.
105 </para>
106</section>
107
108<section id='usingpoky-debugging'>
109 <title>Debugging Build Failures</title>
110
111 <para>
112 The exact method for debugging build failures depends on the nature of
113 the problem and on the system's area from which the bug originates.
114 Standard debugging practices such as comparison against the last
115 known working version with examination of the changes and the
116 re-application of steps to identify the one causing the problem are
117 valid for the Yocto Project just as they are for any other system.
118 Even though it is impossible to detail every possible potential failure,
119 this section provides some general tips to aid in debugging.
120 </para>
121
122 <para>
123 A useful feature for debugging is the error reporting tool.
124 Configuring the Yocto Project to use this tool causes the
125 OpenEmbedded build system to produce error reporting commands as
126 part of the console output.
127 You can enter the commands after the build completes
128 to log error information
129 into a common database, that can help you figure out what might be
130 going wrong.
131 For information on how to enable and use this feature, see the
132 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool'>Using the Error Reporting Tool</ulink>"
133 section in the Yocto Project Development Manual.
134 </para>
135
136 <para>
137 For discussions on debugging, see the
138 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
139 and
140 "<ulink url='&YOCTO_DOCS_DEV_URL;#adt-eclipse'>Working within Eclipse</ulink>"
141 sections in the Yocto Project Development Manual.
142 </para>
143
144 <note>
145 The remainder of this section presents many examples of the
146 <filename>bitbake</filename> command.
147 You can learn about BitBake by reading the
148 <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>.
149 </note>
150
151
152 <section id='usingpoky-debugging-taskfailures'>
153 <title>Task Failures</title>
154
155 <para>The log file for shell tasks is available in
156 <filename>${WORKDIR}/temp/log.do_taskname.pid</filename>.
157 For example, the <filename>compile</filename> task for the QEMU minimal image for the x86
158 machine (<filename>qemux86</filename>) might be
159 <filename>tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_compile.20830</filename>.
160 To see what
161 <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
162 runs to generate that log, look at the corresponding
163 <filename>run.do_taskname.pid</filename> file located in the same directory.
164 </para>
165
166 <para>
167 Presently, the output from Python tasks is sent directly to the console.
168 </para>
169 </section>
170
171 <section id='usingpoky-debugging-taskrunning'>
172 <title>Running Specific Tasks</title>
173
174 <para>
175 Any given package consists of a set of tasks.
176 The standard BitBake behavior in most cases is: <filename>fetch</filename>,
177 <filename>unpack</filename>,
178 <filename>patch</filename>, <filename>configure</filename>,
179 <filename>compile</filename>, <filename>install</filename>, <filename>package</filename>,
180 <filename>package_write</filename>, and <filename>build</filename>.
181 The default task is <filename>build</filename> and any tasks on which it depends
182 build first.
183 Some tasks, such as <filename>devshell</filename>, are not part of the
184 default build chain.
185 If you wish to run a task that is not part of the default build chain, you can use the
186 <filename>-c</filename> option in BitBake.
187 Here is an example:
188 <literallayout class='monospaced'>
189 $ bitbake matchbox-desktop -c devshell
190 </literallayout>
191 </para>
192
193 <para>
194 If you wish to rerun a task, use the <filename>-f</filename> force
195 option.
196 For example, the following sequence forces recompilation after
197 changing files in the work directory.
198 <literallayout class='monospaced'>
199 $ bitbake matchbox-desktop
200 .
201 .
202 [make some changes to the source code in the work directory]
203 .
204 .
205 $ bitbake matchbox-desktop -c compile -f
206 $ bitbake matchbox-desktop
207 </literallayout>
208 </para>
209
210 <para>
211 This sequence first builds and then recompiles
212 <filename>matchbox-desktop</filename>.
213 The last command reruns all tasks (basically the packaging tasks) after the compile.
214 BitBake recognizes that the <filename>compile</filename> task was rerun and therefore
215 understands that the other tasks also need to be run again.
216 </para>
217
218 <para>
219 You can view a list of tasks in a given package by running the
220 <filename>listtasks</filename> task as follows:
221 <literallayout class='monospaced'>
222 $ bitbake matchbox-desktop -c listtasks
223 </literallayout>
224 The results appear as output to the console and are also in the
225 file <filename>${WORKDIR}/temp/log.do_listtasks</filename>.
226 </para>
227 </section>
228
229 <section id='usingpoky-debugging-dependencies'>
230 <title>Dependency Graphs</title>
231
232 <para>
233 Sometimes it can be hard to see why BitBake wants to build
234 other packages before building a given package you have specified.
235 The <filename>bitbake -g &lt;targetname&gt;</filename> command
236 creates the <filename>pn-buildlist</filename>,
237 <filename>pn-depends.dot</filename>,
238 <filename>package-depends.dot</filename>, and
239 <filename>task-depends.dot</filename> files in the current
240 directory.
241 These files show what will be built and the package and task
242 dependencies, which are useful for debugging problems.
243 You can use the
244 <filename>bitbake -g -u depexp &lt;targetname&gt;</filename>
245 command to display the results in a more human-readable form.
246 </para>
247 </section>
248
249 <section id='usingpoky-debugging-bitbake'>
250 <title>General BitBake Problems</title>
251
252 <para>
253 You can see debug output from BitBake by using the <filename>-D</filename> option.
254 The debug output gives more information about what BitBake
255 is doing and the reason behind it.
256 Each <filename>-D</filename> option you use increases the logging level.
257 The most common usage is <filename>-DDD</filename>.
258 </para>
259
260 <para>
261 The output from <filename>bitbake -DDD -v targetname</filename> can reveal why
262 BitBake chose a certain version of a package or why BitBake
263 picked a certain provider.
264 This command could also help you in a situation where you think BitBake did something
265 unexpected.
266 </para>
267 </section>
268
269 <section id='development-host-system-issues'>
270 <title>Development Host System Issues</title>
271
272 <para>
273 Sometimes issues on the host development system can cause your
274 build to fail.
275 Following are known, host-specific problems.
276 Be sure to always consult the
277 <ulink url='&YOCTO_RELEASE_NOTES;'>Release Notes</ulink>
278 for a look at all release-related issues.
279 <itemizedlist>
280 <listitem><para><emphasis><filename>eglibc-initial</filename> fails to build</emphasis>:
281 If your development host system has the unpatched
282 <filename>GNU Make 3.82</filename>,
283 the <filename>do_install</filename> task
284 fails for <filename>eglibc-initial</filename> during the
285 build.</para>
286 <para>Typically, every distribution that ships
287 <filename>GNU Make 3.82</filename> as
288 the default already has the patched version.
289 However, some distributions, such as Debian, have
290 <filename>GNU Make 3.82</filename> as an option, which
291 is unpatched.
292 You will see this error on these types of distributions.
293 Switch to <filename>GNU Make 3.81</filename> or patch
294 your <filename>make</filename> to solve the problem.
295 </para></listitem>
296 </itemizedlist>
297 </para>
298 </section>
299
300 <section id='usingpoky-debugging-buildfile'>
301 <title>Building with No Dependencies</title>
302 <para>
303 To build a specific recipe (<filename>.bb</filename> file),
304 you can use the following command form:
305 <literallayout class='monospaced'>
306 $ bitbake -b &lt;somepath/somerecipe.bb&gt;
307 </literallayout>
308 This command form does not check for dependencies.
309 Consequently, you should use it
310 only when you know existing dependencies have been met.
311 <note>
312 You can also specify fragments of the filename.
313 In this case, BitBake checks for a unique match.
314 </note>
315 </para>
316 </section>
317
318 <section id='usingpoky-debugging-variables'>
319 <title>Variables</title>
320 <para>
321 You can use the <filename>-e</filename> BitBake option to
322 display the parsing environment for a configuration.
323 The following displays the general parsing environment:
324 <literallayout class='monospaced'>
325 $ bitbake -e
326 </literallayout>
327 This next example shows the parsing environment for a specific
328 recipe:
329 <literallayout class='monospaced'>
330 $ bitbake -e &lt;recipename&gt;
331 </literallayout>
332 </para>
333 </section>
334
335 <section id='recipe-logging-mechanisms'>
336 <title>Recipe Logging Mechanisms</title>
337 <para>
338 Best practices exist while writing recipes that both log build progress and
339 act on build conditions such as warnings and errors.
340 Both Python and Bash language bindings exist for the logging mechanism:
341 <itemizedlist>
342 <listitem><para><emphasis>Python:</emphasis> For Python functions, BitBake
343 supports several loglevels: <filename>bb.fatal</filename>,
344 <filename>bb.error</filename>, <filename>bb.warn</filename>,
345 <filename>bb.note</filename>, <filename>bb.plain</filename>,
346 and <filename>bb.debug</filename>.</para></listitem>
347 <listitem><para><emphasis>Bash:</emphasis> For Bash functions, the same set
348 of loglevels exist and are accessed with a similar syntax:
349 <filename>bbfatal</filename>, <filename>bberror</filename>,
350 <filename>bbwarn</filename>, <filename>bbnote</filename>,
351 <filename>bbplain</filename>, and <filename>bbdebug</filename>.</para></listitem>
352 </itemizedlist>
353 </para>
354
355 <para>
356 For guidance on how logging is handled in both Python and Bash recipes, see the
357 <filename>logging.bbclass</filename> file in the
358 <filename>meta/classes</filename> folder of the
359 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
360 </para>
361
362 <section id='logging-with-python'>
363 <title>Logging With Python</title>
364 <para>
365 When creating recipes using Python and inserting code that handles build logs,
366 keep in mind the goal is to have informative logs while keeping the console as
367 "silent" as possible.
368 Also, if you want status messages in the log, use the "debug" loglevel.
369 </para>
370
371 <para>
372 Following is an example written in Python.
373 The code handles logging for a function that determines the number of tasks
374 needed to be run:
375 <literallayout class='monospaced'>
376 python do_listtasks() {
377 bb.debug(2, "Starting to figure out the task list")
378 if noteworthy_condition:
379 bb.note("There are 47 tasks to run")
380 bb.debug(2, "Got to point xyz")
381 if warning_trigger:
382 bb.warn("Detected warning_trigger, this might be a problem later.")
383 if recoverable_error:
384 bb.error("Hit recoverable_error, you really need to fix this!")
385 if fatal_error:
386 bb.fatal("fatal_error detected, unable to print the task list")
387 bb.plain("The tasks present are abc")
388 bb.debug(2, "Finished figuring out the tasklist")
389 }
390 </literallayout>
391 </para>
392 </section>
393
394 <section id='logging-with-bash'>
395 <title>Logging With Bash</title>
396 <para>
397 When creating recipes using Bash and inserting code that handles build
398 logs, you have the same goals - informative with minimal console output.
399 The syntax you use for recipes written in Bash is similar to that of
400 recipes written in Python described in the previous section.
401 </para>
402
403 <para>
404 Following is an example written in Bash.
405 The code logs the progress of the <filename>do_my_function</filename> function.
406 <literallayout class='monospaced'>
407 do_my_function() {
408 bbdebug 2 "Running do_my_function"
409 if [ exceptional_condition ]; then
410 bbnote "Hit exceptional_condition"
411 fi
412 bbdebug 2 "Got to point xyz"
413 if [ warning_trigger ]; then
414 bbwarn "Detected warning_trigger, this might cause a problem later."
415 fi
416 if [ recoverable_error ]; then
417 bberror "Hit recoverable_error, correcting"
418 fi
419 if [ fatal_error ]; then
420 bbfatal "fatal_error detected"
421 fi
422 bbdebug 2 "Completed do_my_function"
423 }
424 </literallayout>
425 </para>
426 </section>
427 </section>
428
429 <section id='usingpoky-debugging-others'>
430 <title>Other Tips</title>
431
432 <para>
433 Here are some other tips that you might find useful:
434 <itemizedlist>
435 <listitem><para>When adding new packages, it is worth watching for
436 undesirable items making their way into compiler command lines.
437 For example, you do not want references to local system files like
438 <filename>/usr/lib/</filename> or <filename>/usr/include/</filename>.
439 </para></listitem>
440 <listitem><para>If you want to remove the <filename>psplash</filename>
441 boot splashscreen,
442 add <filename>psplash=false</filename> to the kernel command line.
443 Doing so prevents <filename>psplash</filename> from loading
444 and thus allows you to see the console.
445 It is also possible to switch out of the splashscreen by
446 switching the virtual console (e.g. Fn+Left or Fn+Right on a Zaurus).
447 </para></listitem>
448 </itemizedlist>
449 </para>
450 </section>
451</section>
452
453<section id='maintaining-build-output-quality'>
454 <title>Maintaining Build Output Quality</title>
455
456 <para>
457 Many factors can influence the quality of a build.
458 For example, if you upgrade a recipe to use a new version of an upstream software
459 package or you experiment with some new configuration options, subtle changes
460 can occur that you might not detect until later.
461 Consider the case where your recipe is using a newer version of an upstream package.
462 In this case, a new version of a piece of software might introduce an optional
463 dependency on another library, which is auto-detected.
464 If that library has already been built when the software is building,
465 the software will link to the built library and that library will be pulled
466 into your image along with the new software even if you did not want the
467 library.
468 </para>
469
470 <para>
471 The
472 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
473 class exists to help you maintain
474 the quality of your build output.
475 You can use the class to highlight unexpected and possibly unwanted
476 changes in the build output.
477 When you enable build history, it records information about the contents of
478 each package and image and then commits that information to a local Git
479 repository where you can examine the information.
480 </para>
481
482 <para>
483 The remainder of this section describes the following:
484 <itemizedlist>
485 <listitem><para>How you can enable and disable
486 build history</para></listitem>
487 <listitem><para>How to understand what the build history contains
488 </para></listitem>
489 <listitem><para>How to limit the information used for build history
490 </para></listitem>
491 <listitem><para>How to examine the build history from both a
492 command-line and web interface</para></listitem>
493 </itemizedlist>
494 </para>
495
496 <section id='enabling-and-disabling-build-history'>
497 <title>Enabling and Disabling Build History</title>
498
499 <para>
500 Build history is disabled by default.
501 To enable it, add the following <filename>INHERIT</filename>
502 statement and set the
503 <link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></link>
504 variable to "1" at the end of your
505 <filename>conf/local.conf</filename> file found in the
506 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
507 <literallayout class='monospaced'>
508 INHERIT += "buildhistory"
509 BUILDHISTORY_COMMIT = "1"
510 </literallayout>
511 Enabling build history as previously described
512 causes the build process to collect build
513 output information and commit it to a local
514 <ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink> repository.
515 <note>
516 Enabling build history increases your build times slightly,
517 particularly for images, and increases the amount of disk
518 space used during the build.
519 </note>
520 </para>
521
522 <para>
523 You can disable build history by removing the previous statements
524 from your <filename>conf/local.conf</filename> file.
525 </para>
526 </section>
527
528 <section id='understanding-what-the-build-history-contains'>
529 <title>Understanding What the Build History Contains</title>
530
531 <para>
532 Build history information is kept in
533 <filename>$</filename><link linkend='var-TOPDIR'><filename>TOPDIR</filename></link><filename>/buildhistory</filename>
534 in the Build Directory as defined by the
535 <link linkend='var-BUILDHISTORY_DIR'><filename>BUILDHISTORY_DIR</filename></link>
536 variable.
537 The following is an example abbreviated listing:
538 <imagedata fileref="figures/buildhistory.png" align="center" width="6in" depth="4in" />
539 </para>
540
541 <para>
542 At the top level, there is a <filename>metadata-revs</filename> file
543 that lists the revisions of the repositories for the layers enabled
544 when the build was produced.
545 The rest of the data splits into separate
546 <filename>packages</filename>, <filename>images</filename> and
547 <filename>sdk</filename> directories, the contents of which are
548 described below.
549 </para>
550
551 <section id='build-history-package-information'>
552 <title>Build History Package Information</title>
553
554 <para>
555 The history for each package contains a text file that has
556 name-value pairs with information about the package.
557 For example, <filename>buildhistory/packages/core2-poky-linux/busybox/busybox/latest</filename>
558 contains the following:
559 <literallayout class='monospaced'>
560 PV = 1.19.3
561 PR = r3
562 RDEPENDS = update-rc.d eglibc (>= 2.13)
563 RRECOMMENDS = busybox-syslog busybox-udhcpc
564 PKGSIZE = 564701
565 FILES = /usr/bin/* /usr/sbin/* /usr/libexec/* /usr/lib/lib*.so.* \
566 /etc /com /var /bin/* /sbin/* /lib/*.so.* /usr/share/busybox \
567 /usr/lib/busybox/* /usr/share/pixmaps /usr/share/applications \
568 /usr/share/idl /usr/share/omf /usr/share/sounds /usr/lib/bonobo/servers
569 FILELIST = /etc/busybox.links /etc/init.d/hwclock.sh /bin/busybox /bin/sh
570 </literallayout>
571 Most of these name-value pairs correspond to variables used
572 to produce the package.
573 The exceptions are <filename>FILELIST</filename>, which is the
574 actual list of files in the package, and
575 <filename>PKGSIZE</filename>, which is the total size of files
576 in the package in bytes.
577 </para>
578
579 <para>
580 There is also a file corresponding to the recipe from which the
581 package came (e.g.
582 <filename>buildhistory/packages/core2-poky-linux/busybox/latest</filename>):
583 <literallayout class='monospaced'>
584 PV = 1.19.3
585 PR = r3
586 DEPENDS = virtual/i586-poky-linux-gcc virtual/i586-poky-linux-compilerlibs \
587 virtual/libc update-rc.d-native
588 PACKAGES = busybox-httpd busybox-udhcpd busybox-udhcpc busybox-syslog \
589 busybox-mdev busybox-dbg busybox busybox-doc busybox-dev \
590 busybox-staticdev busybox-locale
591 </literallayout>
592 </para>
593
594 <para>
595 Finally, for those recipes fetched from a version control
596 system (e.g., Git), a file exists that lists source revisions
597 that are specified in the recipe and lists the actual revisions
598 used during the build.
599 Listed and actual revisions might differ when
600 <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
601 is set to
602 <filename>${<link linkend='var-AUTOREV'>AUTOREV</link>}</filename>.
603 Here is an example assuming
604 <filename>buildhistory/packages/emenlow-poky-linux/linux-yocto/latest_srcrev</filename>):
605 <literallayout class='monospaced'>
606 # SRCREV_machine = "b5c37fe6e24eec194bb29d22fdd55d73bcc709bf"
607 SRCREV_machine = "b5c37fe6e24eec194bb29d22fdd55d73bcc709bf"
608 # SRCREV_emgd = "caea08c988e0f41103bbe18eafca20348f95da02"
609 SRCREV_emgd = "caea08c988e0f41103bbe18eafca20348f95da02"
610 # SRCREV_meta = "c2ed0f16fdec628242a682897d5d86df4547cf24"
611 SRCREV_meta = "c2ed0f16fdec628242a682897d5d86df4547cf24"
612 </literallayout>
613 You can use the <filename>buildhistory-collect-srcrevs</filename>
614 command to collect the stored <filename>SRCREV</filename> values
615 from build history and report them in a format suitable for use in
616 global configuration (e.g., <filename>local.conf</filename>
617 or a distro include file) to override floating
618 <filename>AUTOREV</filename> values to a fixed set of revisions.
619 Here is some example output from this command:
620 <literallayout class='monospaced'>
621 # emenlow-poky-linux
622 SRCREV_machine_pn-linux-yocto = "b5c37fe6e24eec194bb29d22fdd55d73bcc709bf"
623 SRCREV_emgd_pn-linux-yocto = "caea08c988e0f41103bbe18eafca20348f95da02"
624 SRCREV_meta_pn-linux-yocto = "c2ed0f16fdec628242a682897d5d86df4547cf24"
625 # core2-poky-linux
626 SRCREV_pn-kmod = "62081c0f68905b22f375156d4532fd37fa5c8d33"
627 SRCREV_pn-blktrace = "d6918c8832793b4205ed3bfede78c2f915c23385"
628 SRCREV_pn-opkg = "649"
629 </literallayout>
630 <note>
631 Here are some notes on using the
632 <filename>buildhistory-collect-srcrevs</filename> command:
633 <itemizedlist>
634 <listitem><para>By default, only values where the
635 <filename>SRCREV</filename> was
636 not hardcoded (usually when <filename>AUTOREV</filename>
637 was used) are reported.
638 Use the <filename>-a</filename> option to see all
639 <filename>SRCREV</filename> values.
640 </para></listitem>
641 <listitem><para>The output statements might not have any effect
642 if overrides are applied elsewhere in the build system
643 configuration.
644 Use the <filename>-f</filename> option to add the
645 <filename>forcevariable</filename> override to each output line
646 if you need to work around this restriction.
647 </para></listitem>
648 <listitem><para>The script does apply special handling when
649 building for multiple machines.
650 However, the script does place a
651 comment before each set of values that specifies
652 which triplet to which they belong as shown above
653 (e.g., <filename>emenlow-poky-linux</filename>).
654 </para></listitem>
655 </itemizedlist>
656 </note>
657 </para>
658 </section>
659
660 <section id='build-history-image-information'>
661 <title>Build History Image Information</title>
662
663 <para>
664 The files produced for each image are as follows:
665 <itemizedlist>
666 <listitem><para><filename>image-files:</filename>
667 A directory containing selected files from the root
668 filesystem.
669 The files are defined by
670 <link linkend='var-BUILDHISTORY_IMAGE_FILES'><filename>BUILDHISTORY_IMAGE_FILES</filename></link>.
671 </para></listitem>
672 <listitem><para><filename>build-id:</filename>
673 Human-readable information about the build configuration
674 and metadata source revisions.</para></listitem>
675 <listitem><para><filename>*.dot:</filename>
676 Dependency graphs for the image that are
677 compatible with <filename>graphviz</filename>.
678 </para></listitem>
679 <listitem><para><filename>files-in-image.txt:</filename>
680 A list of files in the image with permissions,
681 owner, group, size, and symlink information.
682 </para></listitem>
683 <listitem><para><filename>image-info.txt:</filename>
684 A text file containing name-value pairs with information
685 about the image.
686 See the following listing example for more information.
687 </para></listitem>
688 <listitem><para><filename>installed-package-names.txt:</filename>
689 A list of installed packages by name only.</para></listitem>
690 <listitem><para><filename>installed-package-sizes.txt:</filename>
691 A list of installed packages ordered by size.
692 </para></listitem>
693 <listitem><para><filename>installed-packages.txt:</filename>
694 A list of installed packages with full package
695 filenames.</para></listitem>
696 </itemizedlist>
697 <note>
698 Installed package information is able to be gathered and
699 produced even if package management is disabled for the final
700 image.
701 </note>
702 </para>
703
704 <para>
705 Here is an example of <filename>image-info.txt</filename>:
706 <literallayout class='monospaced'>
707 DISTRO = poky
708 DISTRO_VERSION = 1.1+snapshot-20120207
709 USER_CLASSES = image-mklibs image-prelink
710 IMAGE_CLASSES = image_types
711 IMAGE_FEATURES = debug-tweaks x11-base apps-x11-core \
712 package-management ssh-server-dropbear package-management
713 IMAGE_LINGUAS = en-us en-gb
714 IMAGE_INSTALL = task-core-boot task-base-extended
715 BAD_RECOMMENDATIONS =
716 ROOTFS_POSTPROCESS_COMMAND = buildhistory_get_image_installed ; rootfs_update_timestamp ;
717 IMAGE_POSTPROCESS_COMMAND = buildhistory_get_imageinfo ;
718 IMAGESIZE = 171816
719 </literallayout>
720 Other than <filename>IMAGESIZE</filename>, which is the
721 total size of the files in the image in Kbytes, the
722 name-value pairs are variables that may have influenced the
723 content of the image.
724 This information is often useful when you are trying to determine
725 why a change in the package or file listings has occurred.
726 </para>
727 </section>
728
729 <section id='using-build-history-to-gather-image-information-only'>
730 <title>Using Build History to Gather Image Information Only</title>
731
732 <para>
733 As you can see, build history produces image information,
734 including dependency graphs, so you can see why something
735 was pulled into the image.
736 If you are just interested in this information and not
737 interested in collecting specific package or SDK information,
738 you can enable writing only image information without
739 any history by adding the following to your
740 <filename>conf/local.conf</filename> file found in the
741 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
742 <literallayout class='monospaced'>
743 INHERIT += "buildhistory"
744 BUILDHISTORY_COMMIT = "0"
745 BUILDHISTORY_FEATURES = "image"
746 </literallayout>
747 Here, you set the
748 <link linkend='var-BUILDHISTORY_FEATURES'><filename>BUILDHISTORY_FEATURES</filename></link>
749 variable to use the image feature only.
750 </para>
751 </section>
752
753 <section id='build-history-sdk-information'>
754 <title>Build History SDK Information</title>
755 <para>
756 Build history collects similar information on the contents
757 of SDKs (e.g. <filename>meta-toolchain</filename>
758 or <filename>bitbake -c populate_sdk imagename</filename>)
759 as compared to information it collects for images.
760 The following list shows the files produced for each SDK:
761 <itemizedlist>
762 <listitem><para><filename>files-in-sdk.txt:</filename>
763 A list of files in the SDK with permissions,
764 owner, group, size, and symlink information.
765 This list includes both the host and target parts
766 of the SDK.
767 </para></listitem>
768 <listitem><para><filename>sdk-info.txt:</filename>
769 A text file containing name-value pairs with information
770 about the SDK.
771 See the following listing example for more information.
772 </para></listitem>
773 <listitem><para>The following information appears under
774 each of the <filename>host</filename>
775 and <filename>target</filename> directories
776 for the portions of the SDK that run on the host and
777 on the target, respectively:
778 <itemizedlist>
779 <listitem><para><filename>depends.dot:</filename>
780 Dependency graph for the SDK that is
781 compatible with <filename>graphviz</filename>.
782 </para></listitem>
783 <listitem><para><filename>installed-package-names.txt:</filename>
784 A list of installed packages by name only.
785 </para></listitem>
786 <listitem><para><filename>installed-package-sizes.txt:</filename>
787 A list of installed packages ordered by size.
788 </para></listitem>
789 <listitem><para><filename>installed-packages.txt:</filename>
790 A list of installed packages with full package
791 filenames.</para></listitem>
792 </itemizedlist>
793 </para></listitem>
794 </itemizedlist>
795 </para>
796
797 <para>
798 Here is an example of <filename>sdk-info.txt</filename>:
799 <literallayout class='monospaced'>
800 DISTRO = poky
801 DISTRO_VERSION = 1.3+snapshot-20130327
802 SDK_NAME = poky-eglibc-i686-arm
803 SDK_VERSION = 1.3+snapshot
804 SDKMACHINE =
805 SDKIMAGE_FEATURES = dev-pkgs dbg-pkgs
806 BAD_RECOMMENDATIONS =
807 SDKSIZE = 352712
808 </literallayout>
809 Other than <filename>SDKSIZE</filename>, which is the
810 total size of the files in the SDK in Kbytes, the
811 name-value pairs are variables that might have influenced the
812 content of the SDK.
813 This information is often useful when you are trying to
814 determine why a change in the package or file listings
815 has occurred.
816 </para>
817 </section>
818
819 <section id='examining-build-history-information'>
820 <title>Examining Build History Information</title>
821
822 <para>
823 You can examine build history output from the command line or
824 from a web interface.
825 </para>
826
827 <para>
828 To see any changes that have occurred (assuming you have
829 <link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT = "1"</filename></link>),
830 you can simply
831 use any Git command that allows you to view the history of
832 a repository.
833 Here is one method:
834 <literallayout class='monospaced'>
835 $ git log -p
836 </literallayout>
837 You need to realize, however, that this method does show
838 changes that are not significant (e.g. a package's size
839 changing by a few bytes).
840 </para>
841
842 <para>
843 A command-line tool called <filename>buildhistory-diff</filename>
844 does exist, though, that queries the Git repository and prints just
845 the differences that might be significant in human-readable form.
846 Here is an example:
847 <literallayout class='monospaced'>
848 $ ~/poky/poky/scripts/buildhistory-diff . HEAD^
849 Changes to images/qemux86_64/eglibc/core-image-minimal (files-in-image.txt):
850 /etc/anotherpkg.conf was added
851 /sbin/anotherpkg was added
852 * (installed-package-names.txt):
853 * anotherpkg was added
854 Changes to images/qemux86_64/eglibc/core-image-minimal (installed-package-names.txt):
855 anotherpkg was added
856 packages/qemux86_64-poky-linux/v86d: PACKAGES: added "v86d-extras"
857 * PR changed from "r0" to "r1"
858 * PV changed from "0.1.10" to "0.1.12"
859 packages/qemux86_64-poky-linux/v86d/v86d: PKGSIZE changed from 110579 to 144381 (+30%)
860 * PR changed from "r0" to "r1"
861 * PV changed from "0.1.10" to "0.1.12"
862 </literallayout>
863 </para>
864
865 <para>
866 To see changes to the build history using a web interface, follow
867 the instruction in the <filename>README</filename> file here.
868 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/buildhistory-web/'></ulink>.
869 </para>
870
871 <para>
872 Here is a sample screenshot of the interface:
873 <imagedata fileref="figures/buildhistory-web.png" align="center" scalefit="1" width="130%" contentdepth="130%" />
874 </para>
875 </section>
876 </section>
877</section>
878
879</chapter>
880<!--
881vim: expandtab tw=80 ts=4
882-->