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.xml1224
-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.xml698
-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 -> 47713 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.xml439
-rw-r--r--documentation/ref-manual/migration.xml1089
-rw-r--r--documentation/ref-manual/ref-bitbake.xml432
-rw-r--r--documentation/ref-manual/ref-classes.xml1104
-rw-r--r--documentation/ref-manual/ref-features.xml334
-rw-r--r--documentation/ref-manual/ref-images.xml150
-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.xml138
-rw-r--r--documentation/ref-manual/ref-structure.xml942
-rw-r--r--documentation/ref-manual/ref-style.css979
-rw-r--r--documentation/ref-manual/ref-variables.xml5929
-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.xml1358
-rw-r--r--documentation/ref-manual/usingpoky.xml859
41 files changed, 16110 insertions, 0 deletions
diff --git a/documentation/ref-manual/TODO b/documentation/ref-manual/TODO
new file mode 100644
index 0000000..ee0db97
--- /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 0000000..4883981
--- /dev/null
+++ b/documentation/ref-manual/closer-look.xml
@@ -0,0 +1,1224 @@
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 BitBake.
37 This block expands on how BitBake fetches source, applies
38 patches, completes compilation, analyzes output for package
39 generation, creates and tests packages, generates images, and
40 generates cross-development tools.</para></listitem>
41 <listitem><para><emphasis>Package Feeds:</emphasis>
42 Directories containing output packages (rpm, deb or ipk),
43 which are subsequently used in the construction of an image or
44 SDK, produced by the build system.
45 These feeds can also be copied and shared using a web server or
46 other means to facilitate extending or updating existing
47 images on devices at runtime if runtime package management is
48 enabled.</para></listitem>
49 <listitem><para><emphasis>Images:</emphasis>
50 Images produced by the development process.
51 Where do they go?
52 Can you mess with them (i.e. freely delete them or move them?).
53 </para></listitem>
54 <listitem><para><emphasis>Application Development SDK:</emphasis>
55 Cross-development tools that are produced along with an image
56 or separately with BitBake.</para></listitem>
57 </itemizedlist>
58 </para>
59
60 <section id="user-configuration">
61 <title>User Configuration</title>
62
63 <para>
64 User configuration helps define the build.
65 Through user configuration, you can tell BitBake the
66 target architecture for which you are building the image,
67 where to store downloaded source, and other build properties.
68 </para>
69
70 <para>
71 The following figure shows an expanded representation of the
72 "User Configuration" box of the
73 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>:
74 </para>
75
76 <para>
77 <imagedata fileref="figures/user-configuration.png" align="center" width="5.5in" depth="3.5in" />
78 </para>
79
80 <para>
81 BitBake needs some basic configuration files in order to complete
82 a build.
83 These files are <filename>*.conf</filename> files.
84 The minimally necessary ones reside as example files in the
85 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
86 For simplicity, this section refers to the Source Directory as
87 the "Poky Directory."
88 </para>
89
90 <para>
91 When you clone the <filename>poky</filename> Git repository or you
92 download and unpack a Yocto Project release, you can set up the
93 Source Directory to be named anything you want.
94 For this discussion, the cloned repository uses the default
95 name <filename>poky</filename>.
96 <note>
97 The Poky repository is primarily an aggregation of existing
98 repositories.
99 It is not a canonical upstream source.
100 </note>
101 </para>
102
103 <para>
104 The <filename>meta-yocto</filename> layer inside Poky contains
105 a <filename>conf</filename> directory that has example
106 configuration files.
107 These example files are used as a basis for creating actual
108 configuration files when you source the build environment
109 script
110 (i.e.
111 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
112 or
113 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
114 </para>
115
116 <para>
117 Sourcing the build environment script creates a
118 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
119 if one does not already exist.
120 BitBake uses the Build Directory for all its work during builds.
121 The Build Directory has a <filename>conf</filename> directory that
122 contains default versions of your <filename>local.conf</filename>
123 and <filename>bblayers.conf</filename> configuration files.
124 These default configuration files are created only if versions
125 do not already exist in the Build Directory at the time you
126 source the build environment setup script.
127 </para>
128
129 <para>
130 Because the Poky repository is fundamentally an aggregation of
131 existing repositories, some users might be familiar with running
132 the <filename>&OE_INIT_FILE;</filename> or
133 <filename>oe-init-build-env-memres</filename> script in the context
134 of separate OpenEmbedded-Core and BitBake repositories rather than a
135 single Poky repository.
136 This discussion assumes the script is executed from within a cloned
137 or unpacked version of Poky.
138 </para>
139
140 <para>
141 Depending on where the script is sourced, different sub-scripts
142 are called to set up the Build Directory (Yocto or OpenEmbedded).
143 Specifically, the script
144 <filename>scripts/oe-setup-builddir</filename> inside the
145 poky directory sets up the Build Directory and seeds the directory
146 (if necessary) with configuration files appropriate for the
147 Yocto Project development environment.
148 <note>
149 The <filename>scripts/oe-setup-builddir</filename> script
150 uses the <filename>$TEMPLATECONF</filename> variable to
151 determine which sample configuration files to locate.
152 </note>
153 </para>
154
155 <para>
156 The <filename>local.conf</filename> file provides many
157 basic variables that define a build environment.
158 Here is a list of a few.
159 To see the default configurations in a <filename>local.conf</filename>
160 file created by the build environment script, see the
161 <filename>local.conf.sample</filename> in the
162 <filename>meta-yocto</filename> layer:
163 <itemizedlist>
164 <listitem><para><emphasis>Parallelism Options:</emphasis>
165 Controlled by the
166 <link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>
167 and
168 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
169 variables.</para></listitem>
170 <listitem><para><emphasis>Target Machine Selection:</emphasis>
171 Controlled by the
172 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
173 variable.</para></listitem>
174 <listitem><para><emphasis>Download Directory:</emphasis>
175 Controlled by the
176 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
177 variable.</para></listitem>
178 <listitem><para><emphasis>Shared State Directory:</emphasis>
179 Controlled by the
180 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>
181 variable.</para></listitem>
182 <listitem><para><emphasis>Build Output:</emphasis>
183 Controlled by the
184 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
185 variable.</para></listitem>
186 </itemizedlist>
187 <note>
188 Configurations set in the <filename>conf/local.conf</filename>
189 file can also be set in the
190 <filename>conf/site.conf</filename> and
191 <filename>conf/auto.conf</filename> configuration files.
192 </note>
193 </para>
194
195 <para>
196 The <filename>bblayers.conf</filename> file tells BitBake what
197 layers you want considered during the build.
198 By default, the layers listed in this file include layers
199 minimally needed by the build system.
200 However, you must manually add any custom layers you have created.
201 You can find more information on working with the
202 <filename>bblayers.conf</filename> file in the
203 "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>"
204 section in the Yocto Project Development Manual.
205 </para>
206
207 <para>
208 The files <filename>site.conf</filename> and
209 <filename>auto.conf</filename> are not created by the environment
210 initialization script.
211 If you want these configuration files, you must create them
212 yourself:
213 <itemizedlist>
214 <listitem><para><emphasis><filename>site.conf</filename>:</emphasis>
215 You can use the <filename>conf/site.conf</filename>
216 configuration file to configure multiple build directories.
217 For example, suppose you had several build environments and
218 they shared some common features.
219 You can set these default build properties here.
220 A good example is perhaps the level of parallelism you want
221 to use through the
222 <link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>
223 and
224 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
225 variables.</para>
226 <para>One useful scenario for using the
227 <filename>conf/site.conf</filename> file is to extend your
228 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
229 variable to include the path to a
230 <filename>conf/site.conf</filename>.
231 Then, when BitBake looks for Metadata using
232 <filename>BBPATH</filename>, it finds the
233 <filename>conf/site.conf</filename> file and applies your
234 common configurations found in the file.
235 To override configurations in a particular build directory,
236 alter the similar configurations within that build
237 directory's <filename>conf/local.conf</filename> file.
238 </para></listitem>
239 <listitem><para><emphasis><filename>auto.conf</filename>:</emphasis>
240 This file is not hand-created.
241 Rather, the file is usually created and written to by
242 an autobuilder.
243 The settings put into the file are typically the same as
244 you would find in the <filename>conf/local.conf</filename>
245 or the <filename>conf/site.conf</filename> files.
246 </para></listitem>
247 </itemizedlist>
248 </para>
249
250 <para>
251 You can edit all configuration files to further define
252 any particular build environment.
253 This process is represented by the "User Configuration Edits"
254 box in the figure.
255 </para>
256
257 <para>
258 When you launch your build with the
259 <filename>bitbake &lt;target&gt;</filename> command, BitBake
260 sorts out the configurations to ultimately define your build
261 environment.
262 </para>
263 </section>
264
265 <section id="metadata-machine-configuration-and-policy-configuration">
266 <title>Metadata, Machine Configuration, and Policy Configuration</title>
267
268 <para>
269 The previous section described the user configurations that
270 define BitBake's global behavior.
271 This section takes a closer look at the layers the build system
272 uses to further control the build.
273 These layers provide Metadata for the software, machine, and
274 policy.
275 </para>
276
277 <para>
278 In general, three types of layer input exist:
279 <itemizedlist>
280 <listitem><para><emphasis>Policy Configuration:</emphasis>
281 Distribution Layers provide top-level or general
282 policies for the image or SDK being built.
283 For example, this layer would dictate whether BitBake
284 produces RPM or IPK packages.</para></listitem>
285 <listitem><para><emphasis>Machine Configuration:</emphasis>
286 Board Support Package (BSP) layers provide machine
287 configurations.
288 This type of information is specific to a particular
289 target architecture.</para></listitem>
290 <listitem><para><emphasis>Metadata:</emphasis>
291 Software layers contain user-supplied recipe files,
292 patches, and append files.
293 </para></listitem>
294 </itemizedlist>
295 </para>
296
297 <para>
298 The following figure shows an expanded representation of the
299 Metadata, Machine Configuration, and Policy Configuration input
300 (layers) boxes of the
301 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>:
302 </para>
303
304 <para>
305 <imagedata fileref="figures/layer-input.png" align="center" width="8in" depth="7.5in" />
306 </para>
307
308 <para>
309 In general, all layers have a similar structure.
310 They all contain a licensing file
311 (e.g. <filename>COPYING</filename>) if the layer is to be
312 distributed, a <filename>README</filename> file as good practice
313 and especially if the layer is to be distributed, a
314 configuration directory, and recipe directories.
315 </para>
316
317 <para>
318 The Yocto Project has many layers that can be used.
319 You can see a web-interface listing of them on the
320 <ulink url="http://git.yoctoproject.org/">Source Repositories</ulink>
321 page.
322 The layers are shown at the bottom categorized under
323 "Yocto Metadata Layers."
324 These layers are fundamentally a subset of the
325 <ulink url="http://layers.openembedded.org/layerindex/layers/">OpenEmbedded Metadata Index</ulink>,
326 which lists all layers provided by the OpenEmbedded community.
327 <note>
328 Layers exist in the Yocto Project Source Repositories that
329 cannot be found in the OpenEmbedded Metadata Index.
330 These layers are either deprecated or experimental in nature.
331 </note>
332 </para>
333
334 <para>
335 BitBake uses the <filename>conf/bblayers.conf</filename> file,
336 which is part of the user configuration, to find what layers it
337 should be using as part of the build.
338 </para>
339
340 <para>
341 For more information on layers, see the
342 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
343 section in the Yocto Project Development Manual.
344 </para>
345
346 <section id="distro-layer">
347 <title>Distro Layer</title>
348
349 <para>
350 The distribution layer provides policy configurations for your
351 distribution.
352 Best practices dictate that you isolate these types of
353 configurations into their own layer.
354 Settings you provide in
355 <filename>conf/&lt;distro&gt;.conf</filename> override 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.bbclass</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.bbclass</filename>, 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 type is 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.bbclass</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 BitBake to produce images.
678 You can see from the
679 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>,
680 the BitBake area consists of several functional areas.
681 This section takes a closer look at each of those areas.
682 </para>
683
684 <section id='source-fetching-dev-environment'>
685 <title>Source Fetching</title>
686
687 <para>
688 The first stages of building a recipe are to fetch and unpack
689 the source code:
690 <imagedata fileref="figures/source-fetching.png" align="center" width="6.5in" depth="5in" />
691 </para>
692
693 <para>
694 The <filename>do_fetch</filename> and
695 <filename>do_unpack</filename> tasks fetch the source files
696 and unpack them into a working directory.
697 By default, everything is accomplished in the
698 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
699 which has a defined structure.
700 For additional general information on the Build Directory,
701 see the
702 "<link linkend='structure-core-build'><filename>build/</filename></link>"
703 section.
704 </para>
705
706 <para>
707 Unpacked source files are pointed to by the
708 <link linkend='var-S'><filename>S</filename></link> variable.
709 Each recipe has an area in the Build Directory where the
710 unpacked source code resides.
711 The name of that directory for any given recipe is defined from
712 several different variables.
713 You can see the variables that define these directories
714 by looking at the figure:
715 <itemizedlist>
716 <listitem><para><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
717 </para></listitem>
718 <listitem><para><link linkend='var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></link>
719 </para></listitem>
720 <listitem><para><link linkend='var-TARGET_OS'><filename>TARGET_OS</filename></link>
721 </para></listitem>
722 <listitem><para><link linkend='var-PN'><filename>PN</filename></link>
723 </para></listitem>
724 <listitem><para><link linkend='var-PV'><filename>PV</filename></link>
725 </para></listitem>
726 <listitem><para><link linkend='var-PR'><filename>PR</filename></link>
727 </para></listitem>
728 <listitem><para><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
729 </para></listitem>
730 <listitem><para><link linkend='var-S'><filename>S</filename></link>
731 </para></listitem>
732 </itemizedlist>
733 </para>
734
735 <para>
736 Briefly, the <filename>S</filename> directory contains the
737 unpacked source files for a recipe.
738 The <filename>WORKDIR</filename> directory is where all the
739 building goes on for a given recipe.
740 </para>
741 </section>
742
743 <section id='patching-dev-environment'>
744 <title>Patching</title>
745
746 <para>
747 Once source code is fetched and unpacked, BitBake locates
748 patch files and applies them to the source files:
749 <imagedata fileref="figures/patching.png" align="center" width="6in" depth="5in" />
750 </para>
751
752 <para>
753 The <filename>do_patch</filename> task processes recipes by
754 using the
755 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
756 variable to locate applicable patch files, which by default
757 are <filename>*.patch</filename> or
758 <filename>*.diff</filename> files, or any file if
759 "apply=yes" is specified for the file in
760 <filename>SRC_URI</filename>.
761 </para>
762
763 <para>
764 BitBake finds and applies multiple patches for a single recipe
765 in the order in which it finds the patches.
766 Patches are applied to the recipe's source files located in the
767 <link linkend='var-S'><filename>S</filename></link> directory.
768 </para>
769
770 <para>
771 For more information on how the source directories are
772 created, see the
773 "<link linkend='source-fetching-dev-environment'>Source Fetching</link>"
774 section.
775 </para>
776 </section>
777
778 <section id='configuration-and-compilation-dev-environment'>
779 <title>Configuration and Compilation</title>
780
781 <para>
782 After source code is patched, BitBake executes tasks that
783 configure and compile the source code:
784 <imagedata fileref="figures/configuration-compile-autoreconf.png" align="center" width="7in" depth="5in" />
785 </para>
786
787 <para>
788 This step in the build process consists of three tasks:
789 <itemizedlist>
790 <listitem><para><emphasis><filename>do_configure</filename>:</emphasis>
791 This task configures the source by enabling and
792 disabling any build-time and configuration options for
793 the software being built.
794 Configurations can come from the recipe itself as well
795 as from an inherited class.
796 Additionally, the software itself might configure itself
797 depending on the target for which it is being built.
798 </para>
799
800 <para>The configurations handled by the
801 <filename>do_configure</filename> task are specific
802 to source code configuration for the source code
803 being built by the recipe.</para>
804
805 <para>If you are using
806 <link linkend='ref-classes-autotools'><filename>autotools.bbclass</filename></link>,
807 you can add additional configuration options by using
808 the <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
809 variable.
810 For information on how this variable works within
811 that class, see the
812 <filename>meta/classes/autotools.bbclass</filename> file.
813 </para></listitem>
814 <listitem><para><emphasis><filename>do_compile</filename>:</emphasis>
815 Once a configuration task has been satisfied, BitBake
816 compiles the source using the
817 <filename>do_compile</filename> task.
818 Compilation occurs in the directory pointed to by the
819 <link linkend='var-B'><filename>B</filename></link>
820 variable.
821 Realize that the <filename>B</filename> directory is, by
822 default, the same as the
823 <link linkend='var-S'><filename>S</filename></link>
824 directory.</para></listitem>
825 <listitem><para><emphasis><filename>do_install</filename>:</emphasis>
826 Once compilation is done, BitBake executes the
827 <filename>do_install</filename> task.
828 This task copies files from the <filename>B</filename>
829 directory and places them in a holding area pointed to
830 by the
831 <link linkend='var-D'><filename>D</filename></link>
832 variable.</para></listitem>
833 </itemizedlist>
834 </para>
835 </section>
836
837 <section id='package-splitting-dev-environment'>
838 <title>Package Splitting</title>
839
840 <para>
841 After source code is configured and compiled, the
842 OpenEmbedded build system analyzes
843 the results and splits the output into packages:
844 <imagedata fileref="figures/analysis-for-package-splitting.png" align="center" width="7in" depth="7in" />
845 </para>
846
847 <para>
848 The <filename>do_package</filename> and
849 <filename>do_packagedata</filename> tasks combine to analyze
850 the files found in the
851 <link linkend='var-D'><filename>D</filename></link> directory
852 and split them into subsets based on available packages and
853 files.
854 The analyzing process involves the following as well as other
855 items: splitting out debugging symbols,
856 looking at shared library dependencies between packages,
857 and looking at package relationships.
858 The <filename>do_packagedata</filename> task creates package
859 metadata based on the analysis such that the
860 OpenEmbedded build system can generate the final packages.
861 Working, staged, and intermediate results of the analysis
862 and package splitting process use these areas:
863 <itemizedlist>
864 <listitem><para><link linkend='var-PKGD'><filename>PKGD</filename></link>
865 </para></listitem>
866 <listitem><para><link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
867 </para></listitem>
868 <listitem><para><link linkend='var-PKGDESTWORK'><filename>PKGDESTWORK</filename></link>
869 </para></listitem>
870 <listitem><para><link linkend='var-PKGDEST'><filename>PKGDEST</filename></link>
871 </para></listitem>
872 </itemizedlist>
873 The <link linkend='var-FILES'><filename>FILES</filename></link>
874 variable defines the files that go into each package in
875 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>.
876 If you want details on how this is accomplished, you can
877 look at
878 <link linkend='ref-classes-package'><filename>package.bbclass</filename></link>.
879 </para>
880
881 <para>
882 Depending on the type of packages being created (RPM, DEB, or
883 IPK), the <filename>do_package_write_*</filename> task
884 creates the actual packages and places them in the
885 Package Feed area, which is
886 <filename>${TMPDIR}/deploy</filename>.
887 You can see the
888 "<link linkend='package-feeds-dev-environment'>Package Feeds</link>"
889 section for more detail on that part of the build process.
890 <note>
891 Support for creating feeds directly from the
892 <filename>deploy/*</filename> directories does not exist.
893 Creating such feeds usually requires some kind of feed
894 maintenance mechanism that would upload the new packages
895 into an official package feed (e.g. the
896 Ångström distribution).
897 This functionality is highly distribution-specific
898 and thus is not provided out of the box.
899 </note>
900 </para>
901 </section>
902
903 <section id='image-generation-dev-environment'>
904 <title>Image Generation</title>
905
906 <para>
907 Once packages are split and stored in the Package Feeds area,
908 the OpenEmbedded build system uses BitBake to generate the
909 root filesystem image:
910 <imagedata fileref="figures/image-generation.png" align="center" width="6in" depth="7in" />
911 </para>
912
913 <para>
914 The image generation process consists of several stages and
915 depends on many variables.
916 The <filename>do_rootfs</filename> task uses these key variables
917 to help create the list of packages to actually install:
918 <itemizedlist>
919 <listitem><para><link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>:
920 Lists out the base set of packages to install from
921 the Package Feeds area.</para></listitem>
922 <listitem><para><link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>:
923 Specifies packages that should not be installed.
924 </para></listitem>
925 <listitem><para><link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>:
926 Specifies features to include in the image.
927 Most of these features map to additional packages for
928 installation.</para></listitem>
929 <listitem><para><link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>:
930 Specifies the package backend to use and consequently
931 helps determine where to locate packages within the
932 Package Feeds area.</para></listitem>
933 <listitem><para><link linkend='var-IMAGE_LINGUAS'><filename>IMAGE_LINGUAS</filename></link>:
934 Determines the language(s) for which additional
935 language support packages are installed.
936 </para></listitem>
937 </itemizedlist>
938 </para>
939
940 <para>
941 Package installation is under control of the package manager
942 (e.g. smart/rpm, opkg, or apt/dpkg) regardless of whether or
943 not package management is enabled for the target.
944 At the end of the process, if package management is not
945 enabled for the target, the package manager's data files
946 are deleted from the root filesystem.
947 </para>
948
949 <para>
950 During image generation, the build system attempts to run
951 all post-installation scripts.
952 Any that fail to run on the build host are run on the
953 target when the target system is first booted.
954 If you are using a
955 <ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>read-only root filesystem</ulink>,
956 all the post installation scripts must succeed during the
957 package installation phase since the root filesystem cannot be
958 written into.
959 </para>
960
961 <para>
962 During Optimization, optimizing processes are run across
963 the image.
964 These processes include <filename>mklibs</filename> and
965 <filename>prelink</filename>.
966 The <filename>mklibs</filename> process optimizes the size
967 of the libraries.
968 A <filename>prelink</filename> process optimizes the dynamic
969 linking of shared libraries to reduce start up time of
970 executables.
971 </para>
972
973 <para>
974 Part of the image generation process includes compressing the
975 root filesystem image.
976 Compression is accomplished through several optimization
977 routines designed to reduce the overall size of the image.
978 </para>
979
980 <para>
981 After the root filesystem has been constructed, the image
982 generation process turns everything into an image file or
983 a set of image files.
984 The formats used for the root filesystem depend on the
985 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
986 variable.
987 </para>
988
989 <note>
990 The entire image generation process is run under Pseudo.
991 Running under Pseudo ensures that the files in the root
992 filesystem have correct ownership.
993 </note>
994 </section>
995
996 <section id='sdk-generation-dev-environment'>
997 <title>SDK Generation</title>
998
999 <para>
1000 The OpenEmbedded build system uses BitBake to generate the
1001 Software Development Kit (SDK) installer script:
1002 <imagedata fileref="figures/sdk-generation.png" align="center" width="6in" depth="7in" />
1003 </para>
1004
1005 <note>
1006 For more information on the cross-development toolchain
1007 generation, see the
1008 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
1009 section.
1010 </note>
1011
1012 <para>
1013 Like image generation, the SDK script process consists of
1014 several stages and depends on many variables.
1015 The <filename>do_populate_sdk</filename> task uses these
1016 key variables to help create the list of packages to actually
1017 install.
1018 For information on the variables listed in the figure, see the
1019 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
1020 section.
1021 </para>
1022
1023 <para>
1024 The <filename>do_populate_sdk</filename> task handles two
1025 parts: a target part and a host part.
1026 The target part is the part built for the target hardware and
1027 includes libraries and headers.
1028 The host part is the part of the SDK that runs on the
1029 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>.
1030 </para>
1031
1032 <para>
1033 Once both parts are constructed, the
1034 <filename>do_populate_sdk</filename> task performs some cleanup
1035 on both parts.
1036 After the cleanup, the task creates a cross-development
1037 environment setup script and any configuration files that
1038 might be needed.
1039 </para>
1040
1041 <para>
1042 The final output of the task is the Cross-development
1043 toolchain installation script (<filename>.sh</filename> file),
1044 which includes the environment setup script.
1045 </para>
1046 </section>
1047 </section>
1048
1049 <section id='images-dev-environment'>
1050 <title>Images</title>
1051
1052 <para>
1053 The images produced by the OpenEmbedded build system
1054 are compressed forms of the
1055 root filesystem that are ready to boot on a target device.
1056 You can see from the
1057 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>
1058 that BitBake output in part consists of images.
1059 This section is going to look more closely at this output:
1060 <imagedata fileref="figures/images.png" align="center" width="5.5in" depth="5.5in" />
1061 </para>
1062
1063 <para>
1064 For a list of example images that the Yocto Project provides,
1065 see the
1066 "<link linkend='ref-images'>Images</link>" chapter.
1067 </para>
1068
1069 <para>
1070 Images are written out to the
1071 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1072 inside the <filename>tmp/deploy/images/&lt;machine&gt;/</filename>
1073 folder as shown in the figure.
1074 This folder contains any files expected to be loaded on the
1075 target device.
1076 The
1077 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>
1078 variable points to the <filename>deploy</filename> directory,
1079 while the
1080 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
1081 variable points to the appropriate directory containing images for
1082 the current configuration.
1083 <itemizedlist>
1084 <listitem><para><filename>&lt;kernel-image&gt;</filename>:
1085 A kernel binary file.
1086 The <link linkend='var-KERNEL_IMAGETYPE'><filename>KERNEL_IMAGETYPE</filename></link>
1087 variable setting determines the naming scheme for the
1088 kernel image file.
1089 Depending on that variable, the file could begin with
1090 a variety of naming strings.
1091 The <filename>deploy/images/&lt;machine&gt;</filename>
1092 directory can contain multiple image files for the
1093 machine.</para></listitem>
1094 <listitem><para><filename>&lt;root-filesystem-image&gt;</filename>:
1095 Root filesystems for the target device (e.g.
1096 <filename>*.ext3</filename> or <filename>*.bz2</filename>
1097 files).
1098 The <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
1099 variable setting determines the root filesystem image
1100 type.
1101 The <filename>deploy/images/&lt;machine&gt;</filename>
1102 directory can contain multiple root filesystems for the
1103 machine.</para></listitem>
1104 <listitem><para><filename>&lt;kernel-modules&gt;</filename>:
1105 Tarballs that contain all the modules built for the kernel.
1106 Kernel module tarballs exist for legacy purposes and
1107 can be suppressed by setting the
1108 <link linkend='var-MODULE_TARBALL_DEPLOY'><filename>MODULE_TARBALL_DEPLOY</filename></link>
1109 variable to "0".
1110 The <filename>deploy/images/&lt;machine&gt;</filename>
1111 directory can contain multiple kernel module tarballs
1112 for the machine.</para></listitem>
1113 <listitem><para><filename>&lt;bootloaders&gt;</filename>:
1114 Bootloaders supporting the image, if applicable to the
1115 target machine.
1116 The <filename>deploy/images/&lt;machine&gt;</filename>
1117 directory can contain multiple bootloaders for the
1118 machine.</para></listitem>
1119 <listitem><para><filename>&lt;symlinks&gt;</filename>:
1120 The <filename>deploy/images/&lt;machine&gt;</filename>
1121 folder contains
1122 a symbolic link that points to the most recently built file
1123 for each machine.
1124 These links might be useful for external scripts that
1125 need to obtain the latest version of each file.
1126 </para></listitem>
1127 </itemizedlist>
1128 </para>
1129 </section>
1130
1131 <section id='sdk-dev-environment'>
1132 <title>Application Development SDK</title>
1133
1134 <para>
1135 In the
1136 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>,
1137 the output labeled "Application Development SDK" represents an
1138 SDK.
1139 This section is going to take a closer look at this output:
1140 <imagedata fileref="figures/sdk.png" align="center" width="5in" depth="4in" />
1141 </para>
1142
1143 <para>
1144 The specific form of this output is a self-extracting
1145 SDK installer (<filename>*.sh</filename>) that, when run,
1146 installs the SDK, which consists of a cross-development
1147 toolchain, a set of libraries and headers, and an SDK
1148 environment setup script.
1149 Running this installer essentially sets up your
1150 cross-development environment.
1151 You can think of the cross-toolchain as the "host"
1152 part because it runs on the SDK machine.
1153 You can think of the libraries and headers as the "target"
1154 part because they are built for the target hardware.
1155 The setup script is added so that you can initialize the
1156 environment before using the tools.
1157 </para>
1158
1159 <note>
1160 <para>
1161 The Yocto Project supports several methods by which you can
1162 set up this cross-development environment.
1163 These methods include downloading pre-built SDK installers,
1164 building and installing your own SDK installer, or running
1165 an Application Development Toolkit (ADT) installer to
1166 install not just cross-development toolchains
1167 but also additional tools to help in this type of
1168 development.
1169 </para>
1170
1171 <para>
1172 For background information on cross-development toolchains
1173 in the Yocto Project development environment, see the
1174 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
1175 section.
1176 For information on setting up a cross-development
1177 environment, see the
1178 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
1179 section in the Yocto Project Application Developer's Guide.
1180 </para>
1181 </note>
1182
1183 <para>
1184 Once built, the SDK installers are written out to the
1185 <filename>deploy/sdk</filename> folder inside the
1186 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1187 as shown in the figure at the beginning of this section.
1188 Several variables exist that help configure these files:
1189 <itemizedlist>
1190 <listitem><para><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>:
1191 Points to the <filename>deploy</filename>
1192 directory.</para></listitem>
1193 <listitem><para><link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>:
1194 Specifies the architecture of the machine
1195 on which the cross-development tools are run to
1196 create packages for the target hardware.
1197 </para></listitem>
1198 <listitem><para><link linkend='var-SDKIMAGE_FEATURES'><filename>SDKIMAGE_FEATURES</filename></link>:
1199 Lists the features to include in the "target" part
1200 of the SDK.
1201 </para></listitem>
1202 <listitem><para><link linkend='var-TOOLCHAIN_HOST_TASK'><filename>TOOLCHAIN_HOST_TASK</filename></link>:
1203 Lists packages that make up the host
1204 part of the SDK (i.e. the part that runs on
1205 the <filename>SDKMACHINE</filename>).
1206 When you use
1207 <filename>bitbake -c populate_sdk &lt;imagename&gt;</filename>
1208 to create the SDK, a set of default packages
1209 apply.
1210 This variable allows you to add more packages.
1211 </para></listitem>
1212 <listitem><para><link linkend='var-TOOLCHAIN_TARGET_TASK'><filename>TOOLCHAIN_TARGET_TASK</filename></link>:
1213 Lists packages that make up the target part
1214 of the SDK (i.e. the part built for the
1215 target hardware).
1216 </para></listitem>
1217 </itemizedlist>
1218 </para>
1219 </section>
1220
1221</chapter>
1222<!--
1223vim: expandtab tw=80 ts=4
1224-->
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 0000000..5dfb0b3
--- /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 0000000..fc7169b
--- /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 0000000..0812743
--- /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 0000000..b58d4d7
--- /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 0000000..5d05a43
--- /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 0000000..c7ccaaf
--- /dev/null
+++ b/documentation/ref-manual/faq.xml
@@ -0,0 +1,698 @@
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>
34 My development system does not have Python 2.7.3 or greater,
35 which the Yocto Project requires.
36 Can I still use the Yocto Project?
37 </para>
38 </question>
39 <answer>
40 <para>
41 You can get the required tools on your host development
42 system a couple different ways (i.e. building a tarball or
43 downloading a tarball).
44 See the
45 "<link linkend='required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</link>"
46 section for steps on how to update your build tools.
47 </para>
48 </answer>
49 </qandaentry>
50
51 <qandaentry>
52 <question>
53 <para>
54 How can you claim Poky / OpenEmbedded-Core is stable?
55 </para>
56 </question>
57 <answer>
58 <para>
59 There are three areas that help with stability;
60 <itemizedlist>
61 <listitem><para>The Yocto Project team keeps
62 <ulink url='&YOCTO_DOCS_DEV_URL;#oe-core'>OE-Core</ulink> small
63 and focused, containing around 830 recipes as opposed to the thousands
64 available in other OpenEmbedded community layers.
65 Keeping it small makes it easy to test and maintain.</para></listitem>
66 <listitem><para>The Yocto Project team runs manual and automated tests
67 using a small, fixed set of reference hardware as well as emulated
68 targets.</para></listitem>
69 <listitem><para>The Yocto Project uses an autobuilder,
70 which provides continuous build and integration tests.</para></listitem>
71 </itemizedlist>
72 </para>
73 </answer>
74 </qandaentry>
75
76 <qandaentry>
77 <question>
78 <para>
79 How do I get support for my board added to the Yocto Project?
80 </para>
81 </question>
82 <answer>
83 <para>
84 Support for an additional board is added by creating a
85 Board Support Package (BSP) layer for it.
86 For more information on how to create a BSP layer, see the
87 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
88 section in the Yocto Project Development Manual and the
89 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
90 </para>
91 <para>
92 Usually, if the board is not completely exotic, adding support in
93 the Yocto Project is fairly straightforward.
94 </para>
95 </answer>
96 </qandaentry>
97
98 <qandaentry>
99 <question>
100 <para>
101 Are there any products built using the OpenEmbedded build system?
102 </para>
103 </question>
104 <answer>
105 <para>
106 The software running on the <ulink url='http://vernier.com/labquest/'>Vernier LabQuest</ulink>
107 is built using the OpenEmbedded build system.
108 See the <ulink url='http://www.vernier.com/products/interfaces/labq/'>Vernier LabQuest</ulink>
109 website for more information.
110 There are a number of pre-production devices using the OpenEmbedded build system
111 and the Yocto Project team
112 announces them as soon as they are released.
113 </para>
114 </answer>
115 </qandaentry>
116
117 <qandaentry>
118 <question>
119 <para>
120 What does the OpenEmbedded build system produce as output?
121 </para>
122 </question>
123 <answer>
124 <para>
125 Because you can use the same set of recipes to create output of
126 various formats, the output of an OpenEmbedded build depends on
127 how you start it.
128 Usually, the output is a flashable image ready for the target
129 device.
130 </para>
131 </answer>
132 </qandaentry>
133
134 <qandaentry>
135 <question>
136 <para>
137 How do I add my package to the Yocto Project?
138 </para>
139 </question>
140 <answer>
141 <para>
142 To add a package, you need to create a BitBake recipe.
143 For information on how to add a package, see the section
144 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-addpkg'>Writing a Recipe to Add a Package to Your Image</ulink>"
145 in the Yocto Project Development Manual.
146 </para>
147 </answer>
148 </qandaentry>
149
150 <qandaentry>
151 <question>
152 <para>
153 Do I have to reflash my entire board with a new Yocto Project image when recompiling
154 a package?
155 </para>
156 </question>
157 <answer>
158 <para>
159 The OpenEmbedded build system can build packages in various
160 formats such as IPK for OPKG, Debian package
161 (<filename>.deb</filename>), or RPM.
162 You can then upgrade the packages using the package tools on
163 the device, much like on a desktop distribution such as
164 Ubuntu or Fedora.
165 However, package management on the target is entirely optional.
166 </para>
167 </answer>
168 </qandaentry>
169
170 <qandaentry>
171 <question>
172 <para>
173 What is GNOME Mobile and what is the difference between GNOME Mobile and GNOME?
174 </para>
175 </question>
176 <answer>
177 <para>
178 GNOME Mobile is a subset of the <ulink url='http://www.gnome.org'>GNOME</ulink>
179 platform targeted at mobile and embedded devices.
180 The main difference between GNOME Mobile and standard GNOME is that
181 desktop-orientated libraries have been removed, along with deprecated libraries,
182 creating a much smaller footprint.
183 </para>
184 </answer>
185 </qandaentry>
186
187 <qandaentry>
188 <question>
189 <para>
190 I see the error '<filename>chmod: XXXXX new permissions are r-xrwxrwx, not r-xr-xr-x</filename>'.
191 What is wrong?
192 </para>
193 </question>
194 <answer>
195 <para>
196 You are probably running the build on an NTFS filesystem.
197 Use <filename>ext2</filename>, <filename>ext3</filename>, or <filename>ext4</filename> instead.
198 </para>
199 </answer>
200 </qandaentry>
201
202<!-- <qandaentry>
203 <question>
204 <para>
205 How do I make the Yocto Project work in RHEL/CentOS?
206 </para>
207 </question>
208 <answer>
209 <para>
210 To get the Yocto Project working under RHEL/CentOS 5.1 you need to first
211 install some required packages.
212 The standard CentOS packages needed are:
213 <itemizedlist>
214 <listitem><para>"Development tools" (selected during installation)</para></listitem>
215 <listitem><para><filename>texi2html</filename></para></listitem>
216 <listitem><para><filename>compat-gcc-34</filename></para></listitem>
217 </itemizedlist>
218 On top of these, you need the following external packages:
219 <itemizedlist>
220 <listitem><para><filename>python-sqlite2</filename> from
221 <ulink url='http://dag.wieers.com/rpm/packages/python-sqlite2/'>DAG repository</ulink>
222 </para></listitem>
223 <listitem><para><filename>help2man</filename> from
224 <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>
225 </itemizedlist>
226 </para>
227
228 <para>
229 Once these packages are installed, the OpenEmbedded build system will be able
230 to build standard images.
231 However, there might be a problem with the QEMU emulator segfaulting.
232 You can either disable the generation of binary locales by setting
233 <filename><link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>ENABLE_BINARY_LOCALE_GENERATION</link>
234 </filename> to "0" or by removing the <filename>linux-2.6-execshield.patch</filename>
235 from the kernel and rebuilding it since that is the patch that causes the problems with QEMU.
236 </para>
237
238 <note>
239 <para>For information on distributions that the Yocto Project
240 uses during validation, see the
241 <ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution Support</ulink>
242 Wiki page.</para>
243 <para>For notes about using the Yocto Project on a RHEL 4-based
244 host, see the
245 <ulink url='&YOCTO_WIKI_URL;/wiki/BuildingOnRHEL4'>Building on RHEL4</ulink>
246 Wiki page.</para>
247 </note>
248 </answer>
249 </qandaentry> -->
250
251 <qandaentry>
252 <question>
253 <para>
254 I see lots of 404 responses for files on
255 <filename>&YOCTO_HOME_URL;/sources/*</filename>. Is something wrong?
256 </para>
257 </question>
258 <answer>
259 <para>
260 Nothing is wrong.
261 The OpenEmbedded build system checks any configured source mirrors before downloading
262 from the upstream sources.
263 The build system does this searching for both source archives and
264 pre-checked out versions of SCM-managed software.
265 These checks help in large installations because it can reduce load on the SCM servers
266 themselves.
267 The address above is one of the default mirrors configured into the
268 build system.
269 Consequently, if an upstream source disappears, the team
270 can place sources there so builds continue to work.
271 </para>
272 </answer>
273 </qandaentry>
274
275 <qandaentry>
276 <question>
277 <para>
278 I have machine-specific data in a package for one machine only but the package is
279 being marked as machine-specific in all cases, how do I prevent this?
280 </para>
281 </question>
282 <answer>
283 <para>
284 Set <filename><link linkend='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'>SRC_URI_OVERRIDES_PACKAGE_ARCH</link>
285 </filename> = "0" in the <filename>.bb</filename> file but make sure the package is
286 manually marked as
287 machine-specific for the case that needs it.
288 The code that handles
289 <filename>SRC_URI_OVERRIDES_PACKAGE_ARCH</filename> is in
290 the <filename>meta/classes/base.bbclass</filename> file.
291 </para>
292 </answer>
293 </qandaentry>
294
295 <qandaentry>
296 <question>
297 <para>
298 I'm behind a firewall and need to use a proxy server. How do I do that?
299 </para>
300 </question>
301 <answer>
302 <para>
303 Most source fetching by the OpenEmbedded build system is done by <filename>wget</filename>
304 and you therefore need to specify the proxy settings in a
305 <filename>.wgetrc</filename> file in your home directory.
306 Here are some example settings:
307 <literallayout class='monospaced'>
308 http_proxy = http://proxy.yoyodyne.com:18023/
309 ftp_proxy = http://proxy.yoyodyne.com:18023/
310 </literallayout>
311 The Yocto Project also includes a
312 <filename>site.conf.sample</filename> file that shows how to
313 configure CVS and Git proxy servers if needed.
314 </para>
315 </answer>
316 </qandaentry>
317
318 <qandaentry>
319 <question>
320 <para>
321 What’s the difference between <filename>foo</filename> and <filename>foo-native</filename>?
322 </para>
323 </question>
324 <answer>
325 <para>
326 The <filename>*-native</filename> targets are designed to run on the system
327 being used for the build.
328 These are usually tools that are needed to assist the build in some way such as
329 <filename>quilt-native</filename>, which is used to apply patches.
330 The non-native version is the one that runs on the target device.
331 </para>
332 </answer>
333 </qandaentry>
334
335 <qandaentry>
336 <question>
337 <para>
338 I'm seeing random build failures. Help?!
339 </para>
340 </question>
341 <answer>
342 <para>
343 If the same build is failing in totally different and random
344 ways, the most likely explanation is:
345 <itemizedlist>
346 <listitem><para>The hardware you are running the build on
347 has some problem.</para></listitem>
348 <listitem><para>You are running the build under
349 virtualization, in which case the virtualization
350 probably has bugs.</para></listitem>
351 </itemizedlist>
352 The OpenEmbedded build system processes a massive amount of
353 data that causes lots of network, disk and CPU activity and
354 is sensitive to even single-bit failures in any of these areas.
355 True random failures have always been traced back to hardware
356 or virtualization issues.
357 </para>
358 </answer>
359 </qandaentry>
360
361 <qandaentry>
362 <question>
363 <para>
364 What do we need to ship for license compliance?
365 </para>
366 </question>
367 <answer>
368 <para>
369 This is a difficult question and you need to consult your lawyer
370 for the answer for your specific case.
371 It is worth bearing in mind that for GPL compliance, there needs
372 to be enough information shipped to allow someone else to
373 rebuild and produce the same end result you are shipping.
374 This means sharing the source code, any patches applied to it,
375 and also any configuration information about how that package
376 was configured and built.
377 </para>
378
379 <para>
380 You can find more information on licensing in the
381 "<ulink url='&YOCTO_DOCS_DEV_URL;#licensing'>Licensing</ulink>"
382 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>"
383 sections, both of which are in the Yocto Project Development
384 Manual.
385 </para>
386 </answer>
387 </qandaentry>
388
389 <qandaentry>
390 <question>
391 <para>
392 How do I disable the cursor on my touchscreen device?
393 </para>
394 </question>
395 <answer>
396 <para>
397 You need to create a form factor file as described in the
398 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-misc-recipes'>Miscellaneous BSP-Specific Recipe Files</ulink>"
399 section in the Yocto Project Board Support Packages (BSP)
400 Developer's Guide.
401 Set the <filename>HAVE_TOUCHSCREEN</filename> variable equal to
402 one as follows:
403 <literallayout class='monospaced'>
404 HAVE_TOUCHSCREEN=1
405 </literallayout>
406 </para>
407 </answer>
408 </qandaentry>
409
410 <qandaentry>
411 <question>
412 <para>
413 How do I make sure connected network interfaces are brought up by default?
414 </para>
415 </question>
416 <answer>
417 <para>
418 The default interfaces file provided by the netbase recipe does not
419 automatically bring up network interfaces.
420 Therefore, you will need to add a BSP-specific netbase that includes an interfaces
421 file.
422 See the "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-misc-recipes'>Miscellaneous BSP-Specific Recipe Files</ulink>"
423 section in the Yocto Project Board Support Packages (BSP)
424 Developer's Guide for information on creating these types of
425 miscellaneous recipe files.
426 </para>
427 <para>
428 For example, add the following files to your layer:
429 <literallayout class='monospaced'>
430 meta-MACHINE/recipes-bsp/netbase/netbase/MACHINE/interfaces
431 meta-MACHINE/recipes-bsp/netbase/netbase_5.0.bbappend
432 </literallayout>
433 </para>
434 </answer>
435 </qandaentry>
436
437 <qandaentry>
438 <question>
439 <para>
440 How do I create images with more free space?
441 </para>
442 </question>
443 <answer>
444 <para>
445 By default, the OpenEmbedded build system creates images
446 that are 1.3 times the size of the populated root filesystem.
447 To affect the image size, you need to set various
448 configurations:
449 <itemizedlist>
450 <listitem><para><emphasis>Image Size:</emphasis>
451 The OpenEmbedded build system uses the
452 <link linkend='var-IMAGE_ROOTFS_SIZE'><filename>IMAGE_ROOTFS_SIZE</filename></link>
453 variable to define the size of the image in Kbytes.
454 The build system determines the size by taking into
455 account the initial root filesystem size before any
456 modifications such as requested size for the image and
457 any requested additional free disk space to be
458 added to the image.</para></listitem>
459 <listitem><para><emphasis>Overhead:</emphasis>
460 Use the
461 <link linkend='var-IMAGE_OVERHEAD_FACTOR'><filename>IMAGE_OVERHEAD_FACTOR</filename></link>
462 variable to define the multiplier that the build system
463 applies to the initial image size, which is 1.3 by
464 default.</para></listitem>
465 <listitem><para><emphasis>Additional Free Space:</emphasis>
466 Use the
467 <link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'><filename>IMAGE_ROOTFS_EXTRA_SPACE</filename></link>
468 variable to add additional free space to the image.
469 The build system adds this space to the image after
470 it determines its
471 <filename>IMAGE_ROOTFS_SIZE</filename>.
472 </para></listitem>
473 </itemizedlist>
474 </para>
475 </answer>
476 </qandaentry>
477
478 <qandaentry>
479 <question>
480 <para>
481 Why don't you support directories with spaces in the pathnames?
482 </para>
483 </question>
484 <answer>
485 <para>
486 The Yocto Project team has tried to do this before but too
487 many of the tools the OpenEmbedded build system depends on,
488 such as <filename>autoconf</filename>, break when they find
489 spaces in pathnames.
490 Until that situation changes, the team will not support spaces
491 in pathnames.
492 </para>
493 </answer>
494 </qandaentry>
495
496 <qandaentry>
497 <question>
498 <para>
499 How do I use an external toolchain?
500 </para>
501 </question>
502 <answer>
503 <para>
504 The toolchain configuration is very flexible and customizable.
505 It is primarily controlled with the
506 <filename><link linkend='var-TCMODE'>TCMODE</link></filename>
507 variable.
508 This variable controls which <filename>tcmode-*.inc</filename>
509 file to include from the
510 <filename>meta/conf/distro/include</filename> directory within
511 the
512 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
513 </para>
514
515 <para>
516 The default value of <filename>TCMODE</filename> is "default"
517 (i.e. <filename>tcmode-default.inc</filename>).
518 However, other patterns are accepted.
519 In particular, "external-*" refers to external toolchains of
520 which there are some basic examples included in the
521 OpenEmbedded Core (<filename>meta</filename>).
522 You can use your own custom toolchain definition in your own
523 layer (or as defined in the <filename>local.conf</filename>
524 file) at the location
525 <filename>conf/distro/include/tcmode-*.inc</filename>.
526 </para>
527
528 <para>
529 In addition to the toolchain configuration, you also need a
530 corresponding toolchain recipe file.
531 This recipe file needs to package up any pre-built objects in
532 the toolchain such as <filename>libgcc</filename>,
533 <filename>libstdcc++</filename>, any locales, and
534 <filename>libc</filename>.
535 An example is the
536 <filename>external-sourcery-toolchain.bb</filename>, which is
537 located in <filename>meta/recipes-core/meta/</filename> within
538 the Source Directory.
539 </para>
540
541 <para>
542 For information on installing and using cross-development
543 toolchains, see the
544 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
545 section in the Yocto Project Application Developer's Guide.
546 For general information on cross-development toolchains, see
547 the
548 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
549 section.
550 </para>
551 </answer>
552 </qandaentry>
553
554 <qandaentry>
555 <question>
556 <para id='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>
557 How does the OpenEmbedded build system obtain source code and
558 will it work behind my firewall or proxy server?
559 </para>
560 </question>
561 <answer>
562 <para>
563 The way the build system obtains source code is highly
564 configurable.
565 You can setup the build system to get source code in most
566 environments if HTTP transport is available.
567 </para>
568 <para>
569 When the build system searches for source code, it first
570 tries the local download directory.
571 If that location fails, Poky tries
572 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>,
573 the upstream source, and then
574 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
575 in that order.
576 </para>
577 <para>
578 Assuming your distribution is "poky", the OpenEmbedded build
579 system uses the Yocto Project source
580 <filename>PREMIRRORS</filename> by default for SCM-based
581 sources, upstreams for normal tarballs, and then falls back
582 to a number of other mirrors including the Yocto Project
583 source mirror if those fail.
584 </para>
585 <para>
586 As an example, you could add a specific server for the
587 build system to attempt before any others by adding something
588 like the following to the <filename>local.conf</filename>
589 configuration file:
590 <literallayout class='monospaced'>
591 PREMIRRORS_prepend = "\
592 git://.*/.* http://www.yoctoproject.org/sources/ \n \
593 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
594 http://.*/.* http://www.yoctoproject.org/sources/ \n \
595 https://.*/.* http://www.yoctoproject.org/sources/ \n"
596 </literallayout>
597 </para>
598 <para>
599 These changes cause the build system to intercept Git, FTP,
600 HTTP, and HTTPS requests and direct them to the
601 <filename>http://</filename> sources mirror.
602 You can use <filename>file://</filename> URLs to point to
603 local directories or network shares as well.
604 </para>
605 <para>
606 Aside from the previous technique, these options also exist:
607 <literallayout class='monospaced'>
608 BB_NO_NETWORK = "1"
609 </literallayout>
610 This statement tells BitBake to issue an error instead of
611 trying to access the Internet.
612 This technique is useful if you want to ensure code builds
613 only from local sources.
614 </para>
615 <para>
616 Here is another technique:
617 <literallayout class='monospaced'>
618 BB_FETCH_PREMIRRORONLY = "1"
619 </literallayout>
620 This statement limits the build system to pulling source
621 from the <filename>PREMIRRORS</filename> only.
622 Again, this technique is useful for reproducing builds.
623 </para>
624 <para>
625 Here is another technique:
626 <literallayout class='monospaced'>
627 BB_GENERATE_MIRROR_TARBALLS = "1"
628 </literallayout>
629 This statement tells the build system to generate mirror
630 tarballs.
631 This technique is useful if you want to create a mirror server.
632 If not, however, the technique can simply waste time during
633 the build.
634 </para>
635 <para>
636 Finally, consider an example where you are behind an
637 HTTP-only firewall.
638 You could make the following changes to the
639 <filename>local.conf</filename> configuration file as long as
640 the <filename>PREMIRRORS</filename> server is current:
641 <literallayout class='monospaced'>
642 PREMIRRORS_prepend = "\
643 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
644 http://.*/.* http://www.yoctoproject.org/sources/ \n \
645 https://.*/.* http://www.yoctoproject.org/sources/ \n"
646 BB_FETCH_PREMIRRORONLY = "1"
647 </literallayout>
648 These changes would cause the build system to successfully
649 fetch source over HTTP and any network accesses to anything
650 other than the <filename>PREMIRRORS</filename> would fail.
651 </para>
652 <para>
653 The build system also honors the standard shell environment
654 variables <filename>http_proxy</filename>,
655 <filename>ftp_proxy</filename>,
656 <filename>https_proxy</filename>, and
657 <filename>all_proxy</filename> to redirect requests through
658 proxy servers.
659 </para>
660 </answer>
661 </qandaentry>
662
663 <qandaentry>
664 <question>
665 <para>
666 Can I get rid of build output so I can start over?
667 </para>
668 </question>
669 <answer>
670 <para>
671 Yes - you can easily do this.
672 When you use BitBake to build an image, all the build output
673 goes into the directory created when you run the
674 build environment setup script (i.e.
675 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
676 or
677 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
678 By default, this <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
679 is named <filename>build</filename> but can be named
680 anything you want.
681 </para>
682
683 <para>
684 Within the Build Directory, is the <filename>tmp</filename>
685 directory.
686 To remove all the build output yet preserve any source code or
687 downloaded files from previous builds, simply remove the
688 <filename>tmp</filename> directory.
689 </para>
690 </answer>
691 </qandaentry>
692
693
694</qandaset>
695</chapter>
696<!--
697vim: expandtab tw=80 ts=4
698-->
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 0000000..04f2794
--- /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 0000000..f6db86c
--- /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 0000000..edf98d9
--- /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 0000000..a07464f
--- /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 0000000..d36670a
--- /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 0000000..5594658
--- /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 0000000..d99eac1
--- /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 0000000..0a4f2e7
--- /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 0000000..4bc311f
--- /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 0000000..8ecd018
--- /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 0000000..2893d84
--- /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 0000000..c37e274
--- /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 0000000..a539cc5
--- /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 0000000..26aefb5
--- /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 0000000..f751505
--- /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 0000000..f2b3f8e
--- /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 0000000..650c6c8
--- /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 0000000..8232ba8
--- /dev/null
+++ b/documentation/ref-manual/introduction.xml
@@ -0,0 +1,439 @@
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 also find lots of Yocto Project information on the
26 <ulink url="&YOCTO_HOME_URL;">Yocto Project website</ulink>.
27 </para>
28</section>
29
30<section id='intro-manualoverview'>
31 <title>Documentation Overview</title>
32 <para>
33 This reference manual consists of the following:
34 <itemizedlist>
35 <listitem><para><emphasis>
36 <link linkend='usingpoky'>Using the Yocto Project</link>:</emphasis>
37 Provides an overview of the components that make up the Yocto Project
38 followed by information about debugging images created in the Yocto Project.
39 </para></listitem>
40 <listitem><para><emphasis>
41 <link linkend='technical-details'>Technical Details</link>:</emphasis>
42 Describes fundamental Yocto Project components as well as an explanation
43 behind how the Yocto Project uses shared state (sstate) cache to speed build time.
44 </para></listitem>
45 <listitem><para><emphasis>
46 <link linkend='ref-structure'>Directory Structure</link>:</emphasis>
47 Describes the
48 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> created
49 either by unpacking a released Yocto Project tarball on your host development system,
50 or by cloning the upstream
51 <ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink> Git repository.
52 </para></listitem>
53 <listitem><para><emphasis>
54 <link linkend='ref-bitbake'>BitBake</link>:</emphasis>
55 Provides an overview of the BitBake tool and its role within
56 the Yocto Project.</para></listitem>
57 <listitem><para><emphasis>
58 <link linkend='ref-classes'>Classes</link>:</emphasis>
59 Describes the classes used in the Yocto Project.</para></listitem>
60 <listitem><para><emphasis>
61 <link linkend='ref-images'>Images</link>:</emphasis>
62 Describes the standard images that the Yocto Project supports.
63 </para></listitem>
64 <listitem><para><emphasis>
65 <link linkend='ref-features'>Features</link>:</emphasis>
66 Describes mechanisms for creating distribution, machine, and image
67 features during the build process using the OpenEmbedded build system.</para></listitem>
68 <listitem><para><emphasis>
69 <link linkend='ref-variables-glos'>Variables Glossary</link>:</emphasis>
70 Presents most variables used by the OpenEmbedded build system, which
71 uses BitBake.
72 Entries describe the function of the variable and how to apply them.
73 </para></listitem>
74 <listitem><para><emphasis>
75 <link linkend='ref-varlocality'>Variable Context</link>:</emphasis>
76 Provides variable locality or context.</para></listitem>
77 <listitem><para><emphasis>
78 <link linkend='faq'>FAQ</link>:</emphasis>
79 Provides answers for commonly asked questions in the Yocto Project
80 development environment.</para></listitem>
81 <listitem><para><emphasis>
82 <link linkend='resources'>Contributing to the Yocto Project</link>:</emphasis>
83 Provides guidance on how you can contribute back to the Yocto
84 Project.</para></listitem>
85 </itemizedlist>
86 </para>
87</section>
88
89
90<section id='intro-requirements'>
91<title>System Requirements</title>
92 <para>
93 For general Yocto Project system requirements, see the
94 "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>What You Need and How You Get It</ulink>" section
95 in the Yocto Project Quick Start.
96 The remainder of this section provides details on system requirements
97 not covered in the Yocto Project Quick Start.
98 </para>
99
100 <section id='detailed-supported-distros'>
101 <title>Supported Linux Distributions</title>
102
103 <para>
104 Currently, the Yocto Project is supported on the following
105 distributions:
106 <note>
107 <para>
108 Yocto Project releases are tested against the stable Linux
109 distributions in the following list.
110 The Yocto Project should work on other distributions but
111 validation is not performed against them.
112 </para>
113
114 <para>
115 In particular, the Yocto Project does not support
116 and currently has no plans to support
117 rolling-releases or development distributions due to their
118 constantly changing nature.
119 We welcome patches and bug reports, but keep in mind that
120 our priority is on the supported platforms listed below.
121 </para>
122
123 <para>
124 If you encounter problems, please go to
125 <ulink url='&YOCTO_BUGZILLA_URL;'>Yocto Project Bugzilla</ulink>
126 and submit a bug.
127 We are interested in hearing about your experience.
128 </para>
129 </note>
130 <itemizedlist>
131<!-- <listitem><para>Ubuntu 10.04</para></listitem>
132 <listitem><para>Ubuntu 11.10</para></listitem> -->
133 <listitem><para>Ubuntu 12.04 (LTS)</para></listitem>
134 <listitem><para>Ubuntu 12.10</para></listitem>
135 <listitem><para>Ubuntu 13.04</para></listitem>
136<!-- <listitem><para>Fedora 16 (Verne)</para></listitem>
137 <listitem><para>Fedora 17 (Spherical)</para></listitem> -->
138 <listitem><para>Fedora release 18 (Spherical Cow)</para></listitem>
139 <listitem><para>Fedora release 19 (Schrödinger's Cat)</para></listitem>
140<!-- <listitem><para>CentOS release 5.6 (Final)</para></listitem>
141 <listitem><para>CentOS release 5.7 (Final)</para></listitem>
142 <listitem><para>CentOS release 5.8 (Final)</para></listitem>
143 <listitem><para>CentOS release 6.3 (Final)</para></listitem> -->
144 <listitem><para>CentOS release 6.4</para></listitem>
145<!-- <listitem><para>Debian GNU/Linux 6.0 (Squeeze)</para></listitem> -->
146 <listitem><para>Debian GNU/Linux 6.0.7 (Squeeze)</para></listitem>
147 <listitem><para>Debian GNU/Linux 7.0 (Wheezy)</para></listitem>
148 <listitem><para>Debian GNU/Linux 7.1 (Wheezy)</para></listitem>
149<!-- <listitem><para>openSUSE 11.4</para></listitem>
150 <listitem><para>openSUSE 12.1</para></listitem> -->
151 <listitem><para>openSUSE 12.2</para></listitem>
152 <listitem><para>openSUSE 12.3</para></listitem>
153 </itemizedlist>
154 </para>
155
156 <note>
157 While the Yocto Project Team attempts to ensure all Yocto Project
158 releases are one hundred percent compatible with each officially
159 supported Linux distribution, instances might exist where you
160 encounter a problem while using the Yocto Project on a specific
161 distribution.
162 For example, the CentOS 6.4 distribution does not include the
163 Gtk+ 2.20.0 and PyGtk 2.21.0 (or higher) packages, which are
164 required to run
165 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink>.
166 </note>
167 </section>
168
169 <section id='required-packages-for-the-host-development-system'>
170 <title>Required Packages for the Host Development System</title>
171
172 <para>
173 The list of packages you need on the host development system can
174 be large when covering all build scenarios using the Yocto Project.
175 This section provides required packages according to
176 Linux distribution and function.
177 </para>
178
179 <section id='ubuntu-packages'>
180 <title>Ubuntu and Debian</title>
181
182 <para>
183 The following list shows the required packages by function
184 given a supported Ubuntu or Debian Linux distribution:
185 <itemizedlist>
186 <listitem><para><emphasis>Essentials:</emphasis>
187 Packages needed to build an image on a headless
188 system:
189 <literallayout class='monospaced'>
190 $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
191 </literallayout></para></listitem>
192 <listitem><para><emphasis>Graphical Extras:</emphasis>
193 Packages recommended if the host system has graphics support:
194 <literallayout class='monospaced'>
195 $ sudo apt-get install libsdl1.2-dev xterm
196 </literallayout></para></listitem>
197 <listitem><para><emphasis>Documentation:</emphasis>
198 Packages needed if you are going to build out the
199 Yocto Project documentation manuals:
200 <literallayout class='monospaced'>
201 $ sudo apt-get install make xsltproc docbook-utils fop dblatex xmlto
202 </literallayout></para></listitem>
203 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
204 Packages needed if you are going to be using the
205 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
206 <literallayout class='monospaced'>
207 $ sudo apt-get install autoconf automake libtool libglib2.0-dev
208 </literallayout></para></listitem>
209 </itemizedlist>
210 </para>
211 </section>
212
213 <section id='fedora-packages'>
214 <title>Fedora Packages</title>
215
216 <para>
217 The following list shows the required packages by function
218 given a supported Fedora Linux distribution:
219 <itemizedlist>
220 <listitem><para><emphasis>Essentials:</emphasis>
221 Packages needed to build an image for a headless
222 system:
223 <literallayout class='monospaced'>
224 $ sudo yum install &FEDORA_HOST_PACKAGES_ESSENTIAL;
225 </literallayout></para></listitem>
226 <listitem><para><emphasis>Graphical Extras:</emphasis>
227 Packages recommended if the host system has graphics support:
228 <literallayout class='monospaced'>
229 $ sudo yum install SDL-devel xterm
230 </literallayout></para></listitem>
231 <listitem><para><emphasis>Documentation:</emphasis>
232 Packages needed if you are going to build out the
233 Yocto Project documentation manuals:
234 <literallayout class='monospaced'>
235 $ sudo yum install make docbook-style-dsssl docbook-style-xsl \
236 docbook-dtds docbook-utils fop libxslt dblatex xmlto
237 </literallayout></para></listitem>
238 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
239 Packages needed if you are going to be using the
240 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
241 <literallayout class='monospaced'>
242 $ sudo yum install autoconf automake libtool glib2-devel
243 </literallayout></para></listitem>
244 </itemizedlist>
245 </para>
246 </section>
247
248 <section id='opensuse-packages'>
249 <title>openSUSE Packages</title>
250
251 <para>
252 The following list shows the required packages by function
253 given a supported openSUSE Linux distribution:
254 <itemizedlist>
255 <listitem><para><emphasis>Essentials:</emphasis>
256 Packages needed to build an image for a headless
257 system:
258 <literallayout class='monospaced'>
259 $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
260 </literallayout></para></listitem>
261 <listitem><para><emphasis>Graphical Extras:</emphasis>
262 Packages recommended if the host system has graphics support:
263 <literallayout class='monospaced'>
264 $ sudo zypper install libSDL-devel xterm
265 </literallayout></para></listitem>
266 <listitem><para><emphasis>Documentation:</emphasis>
267 Packages needed if you are going to build out the
268 Yocto Project documentation manuals:
269 <literallayout class='monospaced'>
270 $ sudo zypper install make fop xsltproc dblatex xmlto
271 </literallayout></para></listitem>
272 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
273 Packages needed if you are going to be using the
274 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
275 <literallayout class='monospaced'>
276 $ sudo zypper install autoconf automake libtool glib2-devel
277 </literallayout></para></listitem>
278 </itemizedlist>
279 </para>
280 </section>
281
282 <section id='centos-packages'>
283 <title>CentOS Packages</title>
284
285 <para>
286 The following list shows the required packages by function
287 given a supported CentOS Linux distribution:
288 <note>Depending on the CentOS version you are using, other requirements
289 and dependencies might exist.
290 For details, you should look at the CentOS sections on the
291 <ulink url='https://wiki.yoctoproject.org/wiki/Poky/GettingStarted/Dependencies'>Poky/GettingStarted/Dependencies</ulink>
292 wiki page.
293 </note>
294 <itemizedlist>
295 <listitem><para><emphasis>Essentials:</emphasis>
296 Packages needed to build an image for a headless
297 system:
298 <literallayout class='monospaced'>
299 $ sudo yum install &CENTOS_HOST_PACKAGES_ESSENTIAL;
300 </literallayout></para></listitem>
301 <listitem><para><emphasis>Graphical Extras:</emphasis>
302 Packages recommended if the host system has graphics support:
303 <literallayout class='monospaced'>
304 $ sudo yum install SDL-devel xterm
305 </literallayout></para></listitem>
306 <listitem><para><emphasis>Documentation:</emphasis>
307 Packages needed if you are going to build out the
308 Yocto Project documentation manuals:
309 <literallayout class='monospaced'>
310 $ sudo yum install make docbook-style-dsssl docbook-style-xsl \
311 docbook-dtds docbook-utils fop libxslt dblatex xmlto
312 </literallayout></para></listitem>
313 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
314 Packages needed if you are going to be using the
315 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
316 <literallayout class='monospaced'>
317 $ sudo yum install autoconf automake libtool glib2-devel
318 </literallayout></para></listitem>
319 </itemizedlist>
320 </para>
321 </section>
322 </section>
323
324 <section id='required-git-tar-and-python-versions'>
325 <title>Required Git, tar, and Python Versions</title>
326
327 <para>
328 In order to use the build system, your host development system
329 must meet the following version requirements for Git, tar, and
330 Python:
331 <itemizedlist>
332 <listitem><para>Git 1.7.5 or greater</para></listitem>
333 <listitem><para>tar 1.24 or greater</para></listitem>
334 <listitem><para>Python 2.7.3 or greater not including
335 Python 3.x, which is not supported.</para></listitem>
336 </itemizedlist>
337 </para>
338
339 <para>
340 If your host development system does not meet all these requirements,
341 you can resolve this by either downloading a pre-built tarball
342 containing these tools, or building such a tarball on another
343 system.
344 Regardless of the method, once you have the tarball, you simply
345 install it somewhere on your system, such as a directory in your
346 home directory, and then source the environment script provided,
347 which adds the tools into <filename>PATH</filename> and sets
348 any other environment variables required to run the tools.
349 Doing so gives you working versions of Git, tar, Python and
350 <filename>chrpath</filename>.
351 </para>
352
353 <para>
354 If downloading a pre-built tarball, locate the
355 <filename>*.sh</filename> at
356 <ulink url='&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;/buildtools/'></ulink>.
357 </para>
358
359 <para>
360 If building your own tarball, do so using this command:
361 <literallayout class='monospaced'>
362 $ bitbake buildtools-tarball
363 </literallayout>
364 <note>
365 The <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>
366 variable determines whether you build tools for a 32-bit
367 or 64-bit system.
368 </note>
369 Once the build completes, you can find the file that installs the
370 the tools in the <filename>tmp/deploy/sdk</filename> subdirectory
371 of the
372 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
373 The file used to install the tarball has the string "buildtools"
374 in the name.
375 </para>
376
377 <para>
378 After you have either built the tarball or downloaded it, you need
379 to install it.
380 Install the tools by executing the <filename>*.sh</filename> file.
381 During execution, a prompt appears that allows you to choose the
382 installation directory.
383 For example, you could choose the following:
384 <literallayout class='monospaced'>
385 /home/your-username/sdk
386 </literallayout>
387 </para>
388
389 <para>
390 The final step before you can actually use the tools is to source
391 the tools environment with a command like the following:
392 <literallayout class='monospaced'>
393 $ source /home/your-username/sdk/environment-setup-i586-poky-linux
394 </literallayout>
395 Of course, you need to supply your installation directory and be
396 sure to use the right file (i.e. i585 or x86-64).
397 </para>
398 </section>
399</section>
400
401<section id='intro-getit'>
402 <title>Obtaining the Yocto Project</title>
403 <para>
404 The Yocto Project development team makes the Yocto Project available through a number
405 of methods:
406 <itemizedlist>
407 <listitem><para><emphasis>Releases:</emphasis> Stable, tested releases are available through
408 <ulink url='&YOCTO_DL_URL;/releases/yocto/'/>.</para></listitem>
409 <listitem><para><emphasis>Nightly Builds:</emphasis> These releases are available at
410 <ulink url='http://autobuilder.yoctoproject.org/nightly'/>.
411 These builds include Yocto Project releases, meta-toolchain tarball installation scripts, and
412 experimental builds.</para></listitem>
413 <listitem><para><emphasis>Yocto Project Website:</emphasis> You can find releases
414 of the Yocto Project and supported BSPs at the
415 <ulink url='&YOCTO_HOME_URL;'>Yocto Project website</ulink>.
416 Along with these downloads, you can find lots of other information at this site.
417 </para></listitem>
418 </itemizedlist>
419 </para>
420</section>
421
422<section id='intro-getit-dev'>
423 <title>Development Checkouts</title>
424 <para>
425 Development using the Yocto Project requires a local
426 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
427 You can set up the Source Directory by downloading a Yocto Project release tarball and unpacking it,
428 or by cloning a copy of the upstream
429 <ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink> Git repository.
430 For information on both these methods, see the
431 "<ulink url='&YOCTO_DOCS_DEV_URL;#getting-setup'>Getting Set Up</ulink>"
432 section in the Yocto Project Development Manual.
433 </para>
434</section>
435
436</chapter>
437<!--
438vim: expandtab tw=80 ts=4
439-->
diff --git a/documentation/ref-manual/migration.xml b/documentation/ref-manual/migration.xml
new file mode 100644
index 0000000..dc24628
--- /dev/null
+++ b/documentation/ref-manual/migration.xml
@@ -0,0 +1,1089 @@
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'>Package Groups - packagegroup.bbclass</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 been
631 added for 64-bit 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 task, 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'>Package Groups - <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='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</chapter>
1087<!--
1088vim: expandtab tw=80 ts=4
1089-->
diff --git a/documentation/ref-manual/ref-bitbake.xml b/documentation/ref-manual/ref-bitbake.xml
new file mode 100644
index 0000000..e24ea45
--- /dev/null
+++ b/documentation/ref-manual/ref-bitbake.xml
@@ -0,0 +1,432 @@
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 </section>
118
119 <section id='ref-bitbake-providers'>
120 <title>Preferences and Providers</title>
121
122 <para>
123 Once all the <filename>.bb</filename> files have been
124 parsed, BitBake starts to build the target (<filename>core-image-sato</filename>
125 in the previous section's example) and looks for providers of that target.
126 Once a provider is selected, BitBake resolves all the dependencies for
127 the target.
128 In the case of <filename>core-image-sato</filename>, it would lead to
129 <filename>packagegroup-core-x11-sato</filename>,
130 which in turn leads to recipes like <filename>matchbox-terminal</filename>,
131 <filename>pcmanfm</filename> and <filename>gthumb</filename>.
132 These recipes in turn depend on <filename>eglibc</filename> and the toolchain.
133 </para>
134
135 <para>
136 Sometimes a target might have multiple providers.
137 A common example is "virtual/kernel", which is provided by each kernel package.
138 Each machine often selects the best kernel provider by using a line similar to the
139 following in the machine configuration file:
140 </para>
141
142 <literallayout class='monospaced'>
143 PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
144 </literallayout>
145
146 <para>
147 The default <filename><link linkend='var-PREFERRED_PROVIDER'>PREFERRED_PROVIDER</link></filename>
148 is the provider with the same name as the target.
149 </para>
150
151 <para>
152 Understanding how providers are chosen is made complicated by the fact
153 that multiple versions might exist.
154 BitBake defaults to the highest version of a provider.
155 Version comparisons are made using the same method as Debian.
156 You can use the
157 <filename><link linkend='var-PREFERRED_VERSION'>PREFERRED_VERSION</link></filename>
158 variable to specify a particular version (usually in the distro configuration).
159 You can influence the order by using the
160 <filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE</link></filename>
161 variable.
162 By default, files have a preference of "0".
163 Setting the <filename>DEFAULT_PREFERENCE</filename> to "-1" makes the
164 package unlikely to be used unless it is explicitly referenced.
165 Setting the <filename>DEFAULT_PREFERENCE</filename> to "1" makes it likely the package is used.
166 <filename>PREFERRED_VERSION</filename> overrides any <filename>DEFAULT_PREFERENCE</filename> setting.
167 <filename>DEFAULT_PREFERENCE</filename> is often used to mark newer and more experimental package
168 versions until they have undergone sufficient testing to be considered stable.
169 </para>
170
171 <para>
172 In summary, BitBake has created a list of providers, which is prioritized, for each target.
173 </para>
174 </section>
175
176 <section id='ref-bitbake-dependencies'>
177 <title>Dependencies</title>
178
179 <para>
180 Each target BitBake builds consists of multiple tasks such as
181 <filename>fetch</filename>, <filename>unpack</filename>,
182 <filename>patch</filename>, <filename>configure</filename>,
183 and <filename>compile</filename>.
184 For best performance on multi-core systems, BitBake considers each task as an independent
185 entity with its own set of dependencies.
186 </para>
187
188 <para>
189 Dependencies are defined through several variables.
190 You can find information about variables BitBake uses in the BitBake documentation,
191 which is found in the <filename>bitbake/doc/manual</filename> directory within the
192 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
193 At a basic level, it is sufficient to know that BitBake uses the
194 <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename> and
195 <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename> variables when
196 calculating dependencies.
197 </para>
198 </section>
199
200 <section id='ref-bitbake-tasklist'>
201 <title>The Task List</title>
202
203 <para>
204 Based on the generated list of providers and the dependency information,
205 BitBake can now calculate exactly what tasks it needs to run and in what
206 order it needs to run them.
207 The build now starts with BitBake forking off threads up to the limit set in the
208 <filename><link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link></filename> variable.
209 BitBake continues to fork threads as long as there are tasks ready to run,
210 those tasks have all their dependencies met, and the thread threshold has not been
211 exceeded.
212 </para>
213
214 <para>
215 It is worth noting that you can greatly speed up the build time by properly setting
216 the <filename>BB_NUMBER_THREADS</filename> variable.
217 See the
218 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
219 section in the Yocto Project Quick Start for more information.
220 </para>
221
222 <para>
223 As each task completes, a timestamp is written to the directory specified by the
224 <filename><link linkend='var-STAMP'>STAMP</link></filename> variable.
225 On subsequent runs, BitBake looks within the <filename>build/tmp/stamps</filename>
226 directory and does not rerun
227 tasks that are already completed unless a timestamp is found to be invalid.
228 Currently, invalid timestamps are only considered on a per
229 <filename>.bb</filename> file basis.
230 So, for example, if the configure stamp has a timestamp greater than the
231 compile timestamp for a given target, then the compile task would rerun.
232 Running the compile task again, however, has no effect on other providers
233 that depend on that target.
234 This behavior could change or become configurable in future versions of BitBake.
235 </para>
236
237 <note>
238 Some tasks are marked as "nostamp" tasks.
239 No timestamp file is created when these tasks are run.
240 Consequently, "nostamp" tasks are always rerun.
241 </note>
242 </section>
243
244 <section id='ref-bitbake-runtask'>
245 <title>Running a Task</title>
246
247 <para>
248 Tasks can either be a shell task or a Python task.
249 For shell tasks, BitBake writes a shell script to
250 <filename>${WORKDIR}/temp/run.do_taskname.pid</filename> and then executes the script.
251 The generated shell script contains all the exported variables, and the shell functions
252 with all variables expanded.
253 Output from the shell script goes to the file <filename>${WORKDIR}/temp/log.do_taskname.pid</filename>.
254 Looking at the expanded shell functions in the run file and the output in the log files
255 is a useful debugging technique.
256 </para>
257
258 <para>
259 For Python tasks, BitBake executes the task internally and logs information to the
260 controlling terminal.
261 Future versions of BitBake will write the functions to files similar to the way
262 shell tasks are handled.
263 Logging will be handled in a way similar to shell tasks as well.
264 </para>
265
266 <para>
267 Once all the tasks have been completed BitBake exits.
268 </para>
269
270 <para>
271 When running a task, BitBake tightly controls the execution environment
272 of the build tasks to make sure unwanted contamination from the build machine
273 cannot influence the build.
274 Consequently, if you do want something to get passed into the build
275 task's environment, you must take a few steps:
276 <orderedlist>
277 <listitem><para>Tell BitBake to load what you want from the environment
278 into the data store.
279 You can do so through the <filename>BB_ENV_EXTRAWHITE</filename>
280 variable.
281 For example, assume you want to prevent the build system from
282 accessing your <filename>$HOME/.ccache</filename> directory.
283 The following command tells BitBake to load
284 <filename>CCACHE_DIR</filename> from the environment into the data
285 store:
286 <literallayout class='monospaced'>
287 export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR"
288 </literallayout></para></listitem>
289 <listitem><para>Tell BitBake to export what you have loaded into the
290 environment store to the task environment of every running task.
291 Loading something from the environment into the data store
292 (previous step) only makes it available in the datastore.
293 To export it to the task environment of every running task,
294 use a command similar to the following in your
295 <filename>local.conf</filename> or distro configuration file:
296 <literallayout class='monospaced'>
297 export CCACHE_DIR
298 </literallayout></para></listitem>
299 </orderedlist>
300 </para>
301
302 <note>
303 A side effect of the previous steps is that BitBake records the variable
304 as a dependency of the build process in things like the shared state
305 checksums.
306 If doing so results in unnecessary rebuilds of tasks, you can whitelist the
307 variable so that the shared state code ignores the dependency when it creates
308 checksums.
309 For information on this process, see the <filename>BB_HASHBASE_WHITELIST</filename>
310 example in the "<link linkend='checksums'>Checksums (Signatures)</link>" section.
311 </note>
312 </section>
313
314 <section id='ref-bitbake-commandline'>
315 <title>BitBake Command Line</title>
316
317 <para>
318 Following is the BitBake help output:
319 </para>
320
321 <screen>
322$ bitbake --help
323Usage: bitbake [options] [recipename/target ...]
324
325 Executes the specified task (default is 'build') for a given set of target recipes (.bb files).
326 It is assumed there is a conf/bblayers.conf available in cwd or in BBPATH which
327 will provide the layer, BBFILES and other configuration information.
328
329Options:
330 --version show program's version number and exit
331 -h, --help show this help message and exit
332 -b BUILDFILE, --buildfile=BUILDFILE
333 Execute tasks from a specific .bb recipe directly.
334 WARNING: Does not handle any dependencies from other
335 recipes.
336 -k, --continue Continue as much as possible after an error. While the
337 target that failed and anything depending on it cannot
338 be built, as much as possible will be built before
339 stopping.
340 -a, --tryaltconfigs Continue with builds by trying to use alternative
341 providers where possible.
342 -f, --force Force the specified targets/task to run (invalidating
343 any existing stamp file).
344 -c CMD, --cmd=CMD Specify the task to execute. The exact options
345 available depend on the metadata. Some examples might
346 be 'compile' or 'populate_sysroot' or 'listtasks' may
347 give a list of the tasks available.
348 -C INVALIDATE_STAMP, --clear-stamp=INVALIDATE_STAMP
349 Invalidate the stamp for the specified task such as
350 'compile' and then run the default task for the
351 specified target(s).
352 -r PREFILE, --read=PREFILE
353 Read the specified file before bitbake.conf.
354 -R POSTFILE, --postread=POSTFILE
355 Read the specified file after bitbake.conf.
356 -v, --verbose Output more log message data to the terminal.
357 -D, --debug Increase the debug level. You can specify this more
358 than once.
359 -n, --dry-run Don't execute, just go through the motions.
360 -S, --dump-signatures
361 Don't execute, just dump out the signature
362 construction information.
363 -p, --parse-only Quit after parsing the BB recipes.
364 -s, --show-versions Show current and preferred versions of all recipes.
365 -e, --environment Show the global or per-package environment complete
366 with information about where variables were
367 set/changed.
368 -g, --graphviz Save dependency tree information for the specified
369 targets in the dot syntax.
370 -I EXTRA_ASSUME_PROVIDED, --ignore-deps=EXTRA_ASSUME_PROVIDED
371 Assume these dependencies don't exist and are already
372 provided (equivalent to ASSUME_PROVIDED). Useful to
373 make dependency graphs more appealing
374 -l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS
375 Show debug logging for the specified logging domains
376 -P, --profile Profile the command and save reports.
377 -u UI, --ui=UI The user interface to use (e.g. knotty, hob, depexp).
378 -t SERVERTYPE, --servertype=SERVERTYPE
379 Choose which server to use, process or xmlrpc.
380 --revisions-changed Set the exit code depending on whether upstream
381 floating revisions have changed or not.
382 --server-only Run bitbake without a UI, only starting a server
383 (cooker) process.
384 -B BIND, --bind=BIND The name/address for the bitbake server to bind to.
385 --no-setscene Do not run any setscene tasks. sstate will be ignored
386 and everything needed, built.
387 --remote-server=REMOTE_SERVER
388 Connect to the specified server.
389 -m, --kill-server Terminate the remote server.
390 --observe-only Connect to a server as an observing-only client.
391 </screen>
392 </section>
393
394 <section id='ref-bitbake-fetchers'>
395 <title>Fetchers</title>
396
397 <para>
398 BitBake also contains a set of "fetcher" modules that allow
399 retrieval of source code from various types of sources.
400 For example, BitBake can get source code from a disk with the metadata, from websites,
401 from remote shell accounts, or from Source Code Management (SCM) systems
402 like <filename>cvs/subversion/git</filename>.
403 </para>
404
405 <para>
406 Fetchers are usually triggered by entries in
407 <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>.
408 You can find information about the options and formats of entries for specific
409 fetchers in the BitBake manual located in the
410 <filename>bitbake/doc/manual</filename> directory of the
411 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
412 </para>
413
414 <para>
415 One useful feature for certain Source Code Manager (SCM) fetchers is the ability to
416 "auto-update" when the upstream SCM changes version.
417 Since this ability requires certain functionality from the SCM, not all
418 systems support it.
419 Currently Subversion, Bazaar and to a limited extent, Git support the ability to "auto-update".
420 This feature works using the <filename><link linkend='var-SRCREV'>SRCREV</link></filename>
421 variable.
422 See the
423 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-srcrev'>Using an External SCM</ulink>" section
424 in the Yocto Project Development Manual for more information.
425 </para>
426
427 </section>
428
429</chapter>
430<!--
431vim: expandtab tw=80 ts=4 spell spelllang=en_gb
432-->
diff --git a/documentation/ref-manual/ref-classes.xml b/documentation/ref-manual/ref-classes.xml
new file mode 100644
index 0000000..27edfde
--- /dev/null
+++ b/documentation/ref-manual/ref-classes.xml
@@ -0,0 +1,1104 @@
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 multiple
10 <filename>.bb</filename> files.
11 Any <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> usually
12 found in a <filename>.bb</filename> file can also be placed in a class
13 file.
14 Class files are identified by the extension <filename>.bbclass</filename> and are usually placed
15 in a <filename>classes/</filename> directory beneath the
16 <filename>meta*/</filename> directory found in the
17 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
18 Class files can also be pointed to by
19 <link linkend='var-BUILDDIR'><filename>BUILDDIR</filename></link>
20 (e.g. <filename>build/</filename>) in the same way as
21 <filename>.conf</filename> files in the <filename>conf</filename> directory.
22 Class files are searched for in <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
23 using the same method by which <filename>.conf</filename> files are searched.
24</para>
25
26<para>
27 In most cases inheriting the class is enough to enable its features, although
28 for some classes you might need to set variables or override some of the
29 default behavior.
30</para>
31
32<para>
33 This chapter discusses only the most useful and important classes.
34 Other classes do exist within the <filename>meta/classes</filename>
35 directory in the
36 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
37 You can reference the <filename>.bbclass</filename> files directly
38 for more information.
39</para>
40
41<section id='ref-classes-base'>
42 <title>The base Class - <filename>base.bbclass</filename></title>
43
44 <para>
45 The base class is special in that every <filename>.bb</filename>
46 file inherits it automatically.
47 This class contains definitions for standard basic
48 tasks such as fetching, unpacking, configuring (empty by default), compiling
49 (runs any <filename>Makefile</filename> present), installing (empty by default) and packaging
50 (empty by default).
51 These classes are often overridden or extended by other classes
52 such as <filename>autotools.bbclass</filename> or <filename>package.bbclass</filename>.
53 The class also contains some commonly used functions such as <filename>oe_runmake</filename>.
54 </para>
55</section>
56
57<section id='ref-classes-autotools'>
58 <title>Autotooled Packages - <filename>autotools.bbclass</filename></title>
59
60 <para>
61 Autotools (<filename>autoconf</filename>, <filename>automake</filename>,
62 and <filename>libtool</filename>) bring standardization.
63 This class defines a set of tasks (configure, compile etc.) that
64 work for all Autotooled packages.
65 It should usually be enough to define a few standard variables
66 and then simply <filename>inherit autotools</filename>.
67 This class can also work with software that emulates Autotools.
68 For more information, see the
69 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-addpkg-autotools'>Autotooled Package</ulink>"
70 section in the Yocto Project Development Manual.
71 </para>
72
73 <para>
74 It's useful to have some idea of how the tasks defined by this class work
75 and what they do behind the scenes.
76 <itemizedlist>
77 <listitem><para><filename>do_configure</filename> &dash; Regenerates the
78 configure script (using <filename>autoreconf</filename>) and then launches it
79 with a standard set of arguments used during cross-compilation.
80 You can pass additional parameters to <filename>configure</filename> through the
81 <filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></filename> variable.
82 </para></listitem>
83 <listitem><para><filename>do_compile</filename> &dash; Runs <filename>make</filename> with
84 arguments that specify the compiler and linker.
85 You can pass additional arguments through
86 the <filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></filename> variable.
87 </para></listitem>
88 <listitem><para><filename>do_install</filename> &dash; Runs <filename>make install</filename>
89 and passes in
90 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>
91 as <filename>DESTDIR</filename>.
92 </para></listitem>
93 </itemizedlist>
94 </para>
95</section>
96
97<section id='ref-classes-update-alternatives'>
98 <title>Alternatives - <filename>update-alternatives.bbclass</filename></title>
99
100 <para>
101 This class helps the alternatives system when multiple sources provide
102 the same command.
103 This situation occurs when several programs that have the same or
104 similar function are installed with the same name.
105 For example, the <filename>ar</filename> command is available from the
106 <filename>busybox</filename>, <filename>binutils</filename> and
107 <filename>elfutils</filename> packages.
108 The <filename>update-alternatives.bbclass</filename> class handles
109 renaming the binaries so that multiple packages can be installed
110 without conflicts.
111 The <filename>ar</filename> command still works regardless of which
112 packages are installed or subsequently removed.
113 The class renames the conflicting binary in each package and symlinks
114 the highest priority binary during installation or removal of packages.
115 </para>
116
117 <para>
118 To use this class, you need to define a number of variables:
119 <itemizedlist>
120 <listitem><para><link linkend='var-ALTERNATIVE'><filename>ALTERNATIVE</filename></link>
121 </para></listitem>
122 <listitem><para><link linkend='var-ALTERNATIVE_LINK_NAME'><filename>ALTERNATIVE_LINK_NAME</filename></link>
123 </para></listitem>
124 <listitem><para><link linkend='var-ALTERNATIVE_TARGET'><filename>ALTERNATIVE_TARGET</filename></link>
125 </para></listitem>
126 <listitem><para><link linkend='var-ALTERNATIVE_PRIORITY'><filename>ALTERNATIVE_PRIORITY</filename></link>
127 </para></listitem>
128 </itemizedlist>
129 These variables list alternative commands needed by a package,
130 provide pathnames for links, default links for targets, and
131 so forth.
132 For details on how to use this class, see the comments in the
133 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/update-alternatives.bbclass'><filename>update-alternatives.bbclass</filename></ulink>.
134 </para>
135
136 <note>
137 You can use the <filename>update-alternatives</filename> command
138 directly in your recipes.
139 However, this class simplifies things in most cases.
140 </note>
141</section>
142
143<section id='ref-classes-update-rc.d'>
144 <title>Initscripts - <filename>update-rc.d.bbclass</filename></title>
145
146 <para>
147 This class uses <filename>update-rc.d</filename> to safely install an
148 initialization script on behalf of the package.
149 The OpenEmbedded build system takes care of details such as making sure the script is stopped before
150 a package is removed and started when the package is installed.
151 Three variables control this class:
152 <filename><link linkend='var-INITSCRIPT_PACKAGES'>INITSCRIPT_PACKAGES</link></filename>,
153 <filename><link linkend='var-INITSCRIPT_NAME'>INITSCRIPT_NAME</link></filename> and
154 <filename><link linkend='var-INITSCRIPT_PARAMS'>INITSCRIPT_PARAMS</link></filename>.
155 See the variable links for details.
156 </para>
157</section>
158
159<section id='ref-classes-binconfig'>
160 <title><filename>binconfig.bbclass</filename></title>
161
162 <para>
163 This class helps to correct paths in shell scripts.
164 </para>
165
166 <para>
167 Before <filename>pkg-config</filename> had become widespread, libraries
168 shipped shell scripts to give information about the libraries and
169 include paths needed to build software (usually named
170 <filename>LIBNAME-config</filename>).
171 This class assists any recipe using such scripts.
172 </para>
173
174 <para>
175 During staging, the OpenEmbedded build system installs such scripts
176 into the <filename>sysroots/</filename> directory.
177 Inheriting this class results in all paths in these scripts being
178 changed to point into the <filename>sysroots/</filename> directory so
179 that all builds that use the script use the correct directories
180 for the cross compiling layout.
181 See the
182 <link linkend='var-BINCONFIG_GLOB'><filename>BINCONFIG_GLOB</filename></link>
183 variable for more information.
184 </para>
185</section>
186
187<section id='ref-classes-debian'>
188 <title>Debian Renaming - <filename>debian.bbclass</filename></title>
189
190 <para>
191 This class renames packages so that they follow the Debian naming
192 policy (i.e. <filename>eglibc</filename> becomes <filename>libc6</filename>
193 and <filename>eglibc-devel</filename> becomes <filename>libc6-dev</filename>.)
194 </para>
195</section>
196
197<section id='ref-classes-pkgconfig'>
198 <title>Pkg-config - <filename>pkgconfig.bbclass</filename></title>
199
200 <para>
201 <filename>pkg-config</filename> provides a standard way to get
202 header and library information.
203 This class aims to smooth integration of
204 <filename>pkg-config</filename> into libraries that use it.
205 </para>
206
207 <para>
208 During staging, BitBake installs <filename>pkg-config</filename> data into the
209 <filename>sysroots/</filename> directory.
210 By making use of sysroot functionality within <filename>pkg-config</filename>,
211 this class no longer has to manipulate the files.
212 </para>
213</section>
214
215<section id='ref-classes-archiver'>
216 <title>Archiving Sources - <filename>archive*.bbclass</filename></title>
217
218 <para>
219 Many software licenses require that source code and other materials be
220 released with the binaries.
221 To help with that task, the following classes are provided:
222 <itemizedlist>
223 <listitem><filename>archive-original-sources.bbclass</filename></listitem>
224 <listitem><filename>archive-patched-sources.bbclass</filename></listitem>
225 <listitem><filename>archive-configured-sources.bbclass</filename></listitem>
226 <listitem><filename>archiver.bbclass</filename></listitem>
227 </itemizedlist>
228 </para>
229
230 <para>
231 For more details on the source archiver, see the
232 "<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>"
233 section in the Yocto Project Development Manual.
234 </para>
235</section>
236
237<section id='ref-classes-perl'>
238 <title>Perl Modules - <filename>cpan.bbclass</filename></title>
239
240 <para>
241 Recipes for Perl modules are simple.
242 These recipes usually only need to point to the source's archive and then inherit the
243 proper <filename>.bbclass</filename> file.
244 Building is split into two methods depending on which method the module authors used.
245 <itemizedlist>
246 <listitem><para>Modules that use old
247 <filename>Makefile.PL</filename>-based build system require
248 <filename>cpan.bbclass</filename> in their recipes.
249 </para></listitem>
250 <listitem><para>Modules that use
251 <filename>Build.PL</filename>-based build system require
252 using <filename>cpan_build.bbclass</filename> in their recipes.
253 </para></listitem>
254 </itemizedlist>
255 </para>
256</section>
257
258<section id='ref-classes-distutils'>
259 <title>Python Extensions - <filename>distutils.bbclass</filename></title>
260
261 <para>
262 Recipes for Python extensions are simple.
263 These recipes usually only need to point to the source's archive and then inherit
264 the proper <filename>.bbclass</filename> file.
265 Building is split into two methods depending on which method the module authors used.
266 <itemizedlist>
267 <listitem><para>Extensions that use an Autotools-based build system
268 require Autotools and
269 <filename>distutils</filename>-based
270 <filename>.bbclasse</filename> files in their recipes.
271 </para></listitem>
272 <listitem><para>Extensions that use
273 <filename>distutils</filename>-based build systems require
274 <filename>distutils.bbclass</filename> in their recipes.
275 </para></listitem>
276 </itemizedlist>
277 </para>
278</section>
279
280<section id='ref-classes-devshell'>
281 <title>Developer Shell - <filename>devshell.bbclass</filename></title>
282
283 <para>
284 This class adds the <filename>devshell</filename> task.
285 Distribution policy dictates whether to include this class.
286 See the
287 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section
288 in the Yocto Project Development Manual for more information about using <filename>devshell</filename>.
289 </para>
290</section>
291
292<section id='ref-classes-packagegroup'>
293 <title>Package Groups - <filename>packagegroup.bbclass</filename></title>
294
295 <para>
296 This class sets default values appropriate for package group recipes (e.g.
297 <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>,
298 <filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>,
299 <filename><link linkend='var-ALLOW_EMPTY'>ALLOW_EMPTY</link></filename>,
300 and so forth).
301 It is highly recommended that all package group recipes inherit this class.
302 </para>
303 <para>
304 For information on how to use this class, see the
305 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-customtasks'>Customizing Images Using Custom Package Groups</ulink>"
306 section in the Yocto Project Development Manual.
307 </para>
308 <para>
309 Previously, this class was named <filename>task.bbclass</filename>.
310 </para>
311</section>
312
313
314<section id='ref-classes-package'>
315 <title>Packaging - <filename>package*.bbclass</filename></title>
316
317 <para>
318 The packaging classes add support for generating packages from a build's
319 output.
320 The core generic functionality is in <filename>package.bbclass</filename>.
321 The code specific to particular package types is contained in various sub-classes such as
322 <filename>package_deb.bbclass</filename>, <filename>package_ipk.bbclass</filename>,
323 and <filename>package_rpm.bbclass</filename>.
324 Most users will want one or more of these classes.
325 </para>
326
327 <para>
328 You can control the list of resulting package formats by using the
329 <filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></filename>
330 variable defined in the <filename>local.conf</filename> configuration file,
331 which is located in the <filename>conf</filename> folder of the
332 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
333 When defining the variable, you can specify one or more package types.
334 Since images are generated from packages, a packaging class is
335 needed to enable image generation.
336 The first class listed in this variable is used for image generation.
337 </para>
338
339 <para>
340 If you take the optional step to set up a repository (package feed)
341 on the development host that can be used by Smart, you can
342 install packages from the feed while you are running the image
343 on the target (i.e. runtime installation of packages).
344 For more information, see the
345 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-runtime-package-management'>Using Runtime Package Management</ulink>"
346 section in the Yocto Project Development Manual.
347 </para>
348
349 <para>
350 The package class you choose can affect build-time performance and has space
351 ramifications.
352 In general, building a package with IPK takes about thirty percent less
353 time as compared to using RPM to build the same or similar package.
354 This comparison takes into account a complete build of the package with
355 all dependencies previously built.
356 The reason for this discrepancy is because the RPM package manager
357 creates and processes more
358 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> than the
359 IPK package manager.
360 Consequently, you might consider setting <filename>PACKAGE_CLASSES</filename>
361 to "package_ipk" if you are building smaller systems.
362 </para>
363
364 <para>
365 Before making your decision on package manager, however, you should
366 consider some further things about using RPM:
367 <itemizedlist>
368 <listitem><para>
369 RPM starts to provide more abilities than IPK due to
370 the fact that it processes more metadata.
371 For example, this information includes individual file types,
372 file checksum generation and evaluation on install, sparse file
373 support, conflict detection and resolution for Multilib systems,
374 ACID style upgrade, and repackaging abilities for rollbacks.
375 </para></listitem>
376 <listitem><para>
377 For smaller systems, the extra space used for the Berkley
378 Database and the amount of metadata when using RPM can affect
379 your ability to perform on-device upgrades.
380 </para></listitem>
381 </itemizedlist>
382 </para>
383
384 <para>
385 You can find additional information on the effects of the package
386 class at these two Yocto Project mailing list links:
387 <itemizedlist>
388 <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006362.html'>
389 https://lists.yoctoproject.org/pipermail/poky/2011-May/006362.html</ulink></para></listitem>
390 <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006363.html'>
391 https://lists.yoctoproject.org/pipermail/poky/2011-May/006363.html</ulink></para></listitem>
392 </itemizedlist>
393 </para>
394</section>
395
396<section id='ref-classes-kernel'>
397 <title>Building Kernels - <filename>kernel.bbclass</filename></title>
398
399 <para>
400 This class handles building Linux kernels.
401 The class contains code to build all kernel trees.
402 All needed headers are staged into the
403 <filename><link linkend='var-STAGING_KERNEL_DIR'>STAGING_KERNEL_DIR</link></filename>
404 directory to allow out-of-tree module builds using <filename>module.bbclass</filename>.
405 </para>
406
407 <para>
408 This means that each built kernel module is packaged separately and inter-module
409 dependencies are created by parsing the <filename>modinfo</filename> output.
410 If all modules are required, then installing the <filename>kernel-modules</filename>
411 package installs all packages with modules and various other kernel packages
412 such as <filename>kernel-vmlinux</filename>.
413 </para>
414
415 <para>
416 Various other classes are used by the kernel and module classes internally including
417 <filename>kernel-arch.bbclass</filename>, <filename>module_strip.bbclass</filename>,
418 <filename>module-base.bbclass</filename>, and <filename>linux-kernel-base.bbclass</filename>.
419 </para>
420</section>
421
422<section id='ref-classes-image'>
423 <title>Creating Images - <filename>image.bbclass</filename> and <filename>rootfs*.bbclass</filename></title>
424
425 <para>
426 These classes add support for creating images in several formats.
427 First, the root filesystem is created from packages using
428 one of the <filename>rootfs_*.bbclass</filename>
429 files (depending on the package format used) and then the image is created.
430 <itemizedlist>
431 <listitem><para>The
432 <filename><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link></filename>
433 variable controls the types of images to generate.
434 </para></listitem>
435 <listitem><para>The
436 <filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename>
437 variable controls the list of packages to install into the
438 image.</para></listitem>
439 </itemizedlist>
440 </para>
441</section>
442
443<section id='ref-classes-sanity'>
444 <title>Host System Sanity Checks - <filename>sanity.bbclass</filename></title>
445
446 <para>
447 This class checks to see if prerequisite software is present on the host system
448 so that users can be notified of potential problems that might affect their build.
449 The class also performs basic user configuration checks from
450 the <filename>local.conf</filename> configuration file to
451 prevent common mistakes that cause build failures.
452 Distribution policy usually determines whether to include this class.
453 </para>
454</section>
455
456<section id='ref-classes-insane'>
457<title><filename>insane.bbclass</filename></title>
458
459 <para>
460 This class adds a step to the package generation process so that
461 output quality assurance checks are generated by the OpenEmbedded
462 build system.
463 A range of checks are performed that check the build's output
464 for common problems that show up during runtime.
465 Distribution policy usually dictates whether to include this class.
466 </para>
467
468 <para>
469 You can configure the sanity checks so that specific test failures
470 either raise a warning or an error message.
471 Typically, failures for new tests generate a warning.
472 Subsequent failures for the same test would then generate an error
473 message once the metadata is in a known and good condition.
474 </para>
475
476 <para>
477 Use the
478 <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link> and
479 <link linkend='var-ERROR_QA'><filename>ERROR_QA</filename></link>
480 variables to control the behavior of
481 these checks at the global level (i.e. in your custom distro
482 configuration).
483 However, to skip one or more checks in recipes, you should use
484 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>.
485 For example, to skip the check for symbolic link
486 <filename>.so</filename> files in the main package of a recipe,
487 add the following to the recipe.
488 You need to realize that the package name override, in this example
489 <filename>${PN}</filename>, must be used:
490 <literallayout class='monospaced'>
491 INSANE_SKIP_${PN} += "dev-so"
492 </literallayout>
493 Please keep in mind that the QA checks exist in order to detect real
494 or potential problems in the packaged output.
495 So exercise caution when disabling these checks.
496 </para>
497
498 <para>
499 The following list shows the tests you can list with the
500 <filename>WARN_QA</filename> and <filename>ERROR_QA</filename>
501 variables:
502 <itemizedlist>
503 <listitem><para><emphasis><filename>ldflags:</filename></emphasis>
504 Ensures that the binaries were linked with the
505 <filename>LDFLAGS</filename> options provided by the build system.
506 If this test fails, check that the <filename>LDFLAGS</filename> variable
507 is being passed to the linker command.</para></listitem>
508 <listitem><para><emphasis><filename>useless-rpaths:</filename></emphasis>
509 Checks for dynamic library load paths (rpaths) in the binaries that
510 by default on a standard system are searched by the linker (e.g.
511 <filename>/lib</filename> and <filename>/usr/lib</filename>).
512 While these paths will not cause any breakage, they do waste space and
513 are unnecessary.</para></listitem>
514 <listitem><para><emphasis><filename>rpaths:</filename></emphasis>
515 Checks for rpaths in the binaries that contain build system paths such
516 as <filename>TMPDIR</filename>.
517 If this test fails, bad <filename>-rpath</filename> options are being
518 passed to the linker commands and your binaries have potential security
519 issues.</para></listitem>
520 <listitem><para><emphasis><filename>dev-so:</filename></emphasis>
521 Checks that the <filename>.so</filename> symbolic links are in the
522 <filename>-dev</filename> package and not in any of the other packages.
523 In general, these symlinks are only useful for development purposes.
524 Thus, the <filename>-dev</filename> package is the correct location for
525 them.
526 Some very rare cases do exist for dynamically loaded modules where
527 these symlinks are needed instead in the main package.
528 </para></listitem>
529 <listitem><para><emphasis><filename>debug-files:</filename></emphasis>
530 Checks for <filename>.debug</filename> directories in anything but the
531 <filename>-dbg</filename> package.
532 The debug files should all be in the <filename>-dbg</filename> package.
533 Thus, anything packaged elsewhere is incorrect packaging.</para></listitem>
534 <listitem><para><emphasis><filename>arch:</filename></emphasis>
535 Checks the Executable and Linkable Format (ELF) type, bit size, and endianness
536 of any binaries to ensure they match the target architecture.
537 This test fails if any binaries don't match the type since there would be an
538 incompatibility.
539 Sometimes software, like bootloaders, might need to bypass this check.
540 </para></listitem>
541 <listitem><para><emphasis><filename>debug-deps:</filename></emphasis>
542 Checks that <filename>-dbg</filename> packages only depend on other
543 <filename>-dbg</filename> packages and not on any other types of packages,
544 which would cause a packaging bug.</para></listitem>
545 <listitem><para><emphasis><filename>dev-deps:</filename></emphasis>
546 Checks that <filename>-dev</filename> packages only depend on other
547 <filename>-dev</filename> packages and not on any other types of packages,
548 which would be a packaging bug.</para></listitem>
549 <listitem><para><emphasis><filename>pkgconfig:</filename></emphasis>
550 Checks <filename>.pc</filename> files for any
551 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>/<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
552 paths.
553 Any <filename>.pc</filename> file containing these paths is incorrect
554 since <filename>pkg-config</filename> itself adds the correct sysroot prefix
555 when the files are accessed.</para></listitem>
556 <listitem><para><emphasis><filename>textrel:</filename></emphasis>
557 Checks for ELF binaries that contain relocations in their
558 <filename>.text</filename> sections, which can result in a
559 performance impact at runtime.</para></listitem>
560 <listitem><para><emphasis><filename>pkgvarcheck:</filename></emphasis>
561 Checks through the variables
562 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
563 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
564 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
565 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>,
566 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
567 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
568 <link linkend='var-FILES'><filename>FILES</filename></link>,
569 <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>,
570 <filename>pkg_preinst</filename>,
571 <filename>pkg_postinst</filename>,
572 <filename>pkg_prerm</filename>
573 and <filename>pkg_postrm</filename>, and reports if there are
574 variable sets that are not package-specific.
575 Using these variables without a package suffix is bad practice,
576 and might unnecessarily complicate dependencies of other packages
577 within the same recipe or have other unintended consequences.
578 </para></listitem>
579 <listitem><para><emphasis><filename>xorg-driver-abi:</filename></emphasis>
580 Checks that all packages containing Xorg drivers have ABI
581 dependencies.
582 The <filename>xserver-xorg</filename> recipe provides driver
583 ABI names.
584 All drivers should depend on the ABI versions that they have
585 been built against.
586 Driver recipes that include
587 <filename>xorg-driver-input.inc</filename>
588 or <filename>xorg-driver-video.inc</filename> will
589 automatically get these versions.
590 Consequently, you should only need to explicitly add
591 dependencies to binary driver recipes.
592 </para></listitem>
593 <listitem><para><emphasis><filename>libexec:</filename></emphasis>
594 Checks if a package contains files in
595 <filename>/usr/libexec</filename>.
596 This check is not performed if the
597 <filename>libexecdir</filename> variable has been set
598 explicitly to <filename>/usr/libexec</filename>.
599 </para></listitem>
600 <listitem><para><emphasis><filename>staticdev:</filename></emphasis>
601 Checks for static library files (<filename>*.a</filename>) in
602 non-<filename>staticdev</filename> packages.
603 </para></listitem>
604 <listitem><para><emphasis><filename>la:</filename></emphasis>
605 Checks <filename>.la</filename> files for any <filename>TMPDIR</filename>
606 paths.
607 Any <filename>.la</filename> file containing these paths is incorrect since
608 <filename>libtool</filename> adds the correct sysroot prefix when using the
609 files automatically itself.</para></listitem>
610 <listitem><para><emphasis><filename>desktop:</filename></emphasis>
611 Runs the <filename>desktop-file-validate</filename> program
612 against any <filename>.desktop</filename> files to validate
613 their contents against the specification for
614 <filename>.desktop</filename> files.</para></listitem>
615 <listitem><para><emphasis><filename>already-stripped:</filename></emphasis>
616 Checks that produced binaries have not already been
617 stripped prior to the build system extracting debug symbols.
618 It is common for upstream software projects to default to
619 stripping debug symbols for output binaries.
620 In order for debugging to work on the target using
621 <filename>-dbg</filename> packages, this stripping must be
622 disabled.
623 </para></listitem>
624 <listitem><para><emphasis><filename>split-strip:</filename></emphasis>
625 Reports that splitting or stripping debug symbols from binaries
626 has failed.
627 </para></listitem>
628 <listitem><para><emphasis><filename>arch:</filename></emphasis>
629 Checks to ensure the architecture, bit size, and endianness
630 of all output binaries matches that of the target.
631 This test can detect when the wrong compiler or compiler options
632 have been used.
633 </para></listitem>
634 <listitem><para><emphasis><filename>installed-vs-shipped:</filename></emphasis>
635 Reports when files have been installed within
636 <filename>do_install</filename> but have not been included in
637 any package by way of the
638 <link linkend='var-FILES'><filename>FILES</filename></link>
639 variable.
640 Files that do not appear in any package cannot be present in
641 an image later on in the build process.
642 Ideally, all installed files should be packaged or not
643 installed at all.
644 These files can be deleted at the end of
645 <filename>do_install</filename> if the files are not
646 needed in any package.
647 </para></listitem>
648 <listitem><para><emphasis><filename>dep-cmp:</filename></emphasis>
649 Checks for invalid version comparison statements in runtime
650 dependency relationships between packages (i.e. in
651 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
652 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
653 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
654 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
655 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
656 and
657 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>
658 variable values).
659 Any invalid comparisons might trigger failures or undesirable
660 behavior when passed to the package manager.
661 </para></listitem>
662 <listitem><para><emphasis><filename>files-invalid:</filename></emphasis>
663 Checks for
664 <link linkend='var-FILES'><filename>FILES</filename></link>
665 variable values that contain "//", which is invalid.
666 </para></listitem>
667 <listitem><para><emphasis><filename>incompatible-license:</filename></emphasis>
668 Report when packages are excluded from being created due to
669 being marked with a license that is in
670 <link linkend='var-INCOMPATIBLE_LICENSE'><filename>INCOMPATIBLE_LICENSE</filename></link>.
671 </para></listitem>
672 <listitem><para><emphasis><filename>compile-host-path:</filename></emphasis>
673 Checks the <filename>do_compile</filename> log for indications
674 that paths to locations on the build host were used.
675 Using such paths might result in host contamination of the
676 build output.
677 </para></listitem>
678 <listitem><para><emphasis><filename>install-host-path:</filename></emphasis>
679 Checks the <filename>do_install</filename> log for indications
680 that paths to locations on the build host were used.
681 Using such paths might result in host contamination of the
682 build output.
683 </para></listitem>
684 <listitem><para><emphasis><filename>libdir:</filename></emphasis>
685 Checks for libraries being installed into incorrect
686 (possibly hardcoded) installation paths.
687 For example, this test will catch recipes that install
688 <filename>/lib/bar.so</filename> when
689 <filename>${base_libdir}</filename> is "lib32".
690 Another example is when recipes install
691 <filename>/usr/lib64/foo.so</filename> when
692 <filename>${libdir}</filename> is "/usr/lib".
693 </para></listitem>
694 <listitem><para><emphasis><filename>packages-list:</filename></emphasis>
695 Checks for the same package being listed multiple times through
696 the <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
697 variable value.
698 Installing the package in this manner can cause errors during
699 packaging.
700 </para></listitem>
701 <listitem><para><emphasis><filename>perm-config:</filename></emphasis>
702 Reports lines in <filename>fs-perms.txt</filename> that have
703 an invalid format.
704 </para></listitem>
705 <listitem><para><emphasis><filename>perm-line:</filename></emphasis>
706 Reports lines in <filename>fs-perms.txt</filename> that have
707 an invalid format.
708 </para></listitem>
709 <listitem><para><emphasis><filename>perm-link:</filename></emphasis>
710 Reports lines in <filename>fs-perms.txt</filename> that
711 specify 'link' where the specified target already exists.
712 </para></listitem>
713 <listitem><para><emphasis><filename>pkgname:</filename></emphasis>
714 Checks that all packages in
715 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
716 have names that do not contain invalid characters (i.e.
717 characters other than 0-9, a-z, ., +, and -).
718 </para></listitem>
719 <listitem><para><emphasis><filename>pn-overrides:</filename></emphasis>
720 Checks that a recipe does not have a name
721 (<link linkend='var-PN'><filename>PN</filename></link>) value
722 that appears in
723 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
724 If a recipe is named such that its <filename>PN</filename>
725 value matches something already in
726 <filename>OVERRIDES</filename> (e.g. <filename>PN</filename>
727 happens to be the same as
728 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
729 or
730 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>),
731 it can have unexpected consequences.
732 For example, assignments such as
733 <filename>FILES_${PN} = "xyz"</filename> effectively turn into
734 <filename>FILES = "xyz"</filename>.
735 </para></listitem>
736 <listitem><para><emphasis><filename>unsafe-references-in-binaries:</filename></emphasis>
737 Reports when a binary installed in
738 <filename>${base_libdir}</filename>,
739 <filename>${base_bindir}</filename>, or
740 <filename>${base_sbindir}</filename>, depends on another
741 binary installed under <filename>${exec_prefix}</filename>.
742 This dependency is a concern if you want the system to remain
743 basically operable if <filename>/usr</filename> is mounted
744 separately and is not mounted.
745 <note>
746 Defaults for binaries installed in
747 <filename>${base_libdir}</filename>,
748 <filename>${base_bindir}</filename>, and
749 <filename>${base_sbindir}</filename> are
750 <filename>/lib</filename>, <filename>/bin</filename>, and
751 <filename>/sbin</filename>, respectively.
752 The default for a binary installed
753 under <filename>${exec_prefix}</filename> is
754 <filename>/usr</filename>.
755 </note>
756 </para></listitem>
757 <listitem><para><emphasis><filename>unsafe-references-in-scripts:</filename></emphasis>
758 Reports when a script file installed in
759 <filename>${base_libdir}</filename>,
760 <filename>${base_bindir}</filename>, or
761 <filename>${base_sbindir}</filename>, depends on files
762 installed under <filename>${exec_prefix}</filename>.
763 This dependency is a concern if you want the system to remain
764 basically operable if <filename>/usr</filename> is mounted
765 separately and is not mounted.
766 <note>
767 Defaults for binaries installed in
768 <filename>${base_libdir}</filename>,
769 <filename>${base_bindir}</filename>, and
770 <filename>${base_sbindir}</filename> are
771 <filename>/lib</filename>, <filename>/bin</filename>, and
772 <filename>/sbin</filename>, respectively.
773 The default for a binary installed
774 under <filename>${exec_prefix}</filename> is
775 <filename>/usr</filename>.
776 </note>
777 </para></listitem>
778 <listitem><para><emphasis><filename>var-undefined:</filename></emphasis>
779 Reports when variables fundamental to packaging (i.e.
780 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
781 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>,
782 <link linkend='var-D'><filename>D</filename></link>,
783 <link linkend='var-PN'><filename>PN</filename></link>, and
784 <link linkend='var-PKGD'><filename>PKGD</filename></link>) are
785 undefined during <filename>do_package</filename>.
786 </para></listitem>
787 <listitem><para><emphasis><filename>pkgv-undefined:</filename></emphasis>
788 Checks to see if the <filename>PKGV</filename> variable
789 is undefined during <filename>do_package</filename>.
790 </para></listitem>
791 <listitem><para><emphasis><filename>buildpaths:</filename></emphasis>
792 Checks for paths to locations on the build host inside the
793 output files.
794 Currently, this test triggers too many false positives and
795 thus is not normally enabled.
796 </para></listitem>
797 <listitem><para><emphasis><filename>perms:</filename></emphasis>
798 Currently, this check is unused but reserved.
799 </para></listitem>
800 <listitem><para><emphasis><filename>version-going-backwards:</filename></emphasis>
801 If Build History is enabled, reports when a package
802 being written out has a lower version than the previously
803 written package under the same name.
804 If you are placing output packages into a feed and
805 upgrading packages on a target system using that feed, the
806 version of a package going backwards can result in the target
807 system not correctly upgrading to the "new" version of the
808 package.
809 <note>
810 If you are not using runtime package management on your
811 target system, then you do not need to worry about
812 this situation.
813 </note>
814 </para></listitem>
815 </itemizedlist>
816 </para>
817</section>
818
819<section id='ref-classes-rm-work'>
820 <title>Removing Work Files During the Build - <filename>rm_work.bbclass</filename></title>
821
822 <para>
823 The OpenEmbedded build system can use a substantial amount of disk
824 space during the build process.
825 A portion of this space is the work files under the
826 <filename>${TMPDIR}/work</filename> directory for each recipe.
827 Once the build system generates the packages for a recipe, the work
828 files for that recipe are no longer needed.
829 However, by default, the build system preserves these files
830 for inspection and possible debugging purposes.
831 If you would rather have these files deleted to save disk space
832 as the build progresses, you can enable <filename>rm_work</filename>
833 by adding the following to your <filename>local.conf</filename> file,
834 which is found in the
835 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
836 <literallayout class='monospaced'>
837 INHERIT += "rm_work"
838 </literallayout>
839 If you are modifying and building source code out of the work directory
840 for a recipe, enabling <filename>rm_work</filename> will potentially
841 result in your changes to the source being lost.
842 To exclude some recipes from having their work directories deleted by
843 <filename>rm_work</filename>, you can add the names of the recipe or
844 recipes you are working on to the <filename>RM_WORK_EXCLUDE</filename>
845 variable, which can also be set in your <filename>local.conf</filename>
846 file.
847 Here is an example:
848 <literallayout class='monospaced'>
849 RM_WORK_EXCLUDE += "busybox eglibc"
850 </literallayout>
851 </para>
852</section>
853
854
855<section id='ref-classes-siteinfo'>
856 <title>Autotools Configuration Data Cache - <filename>siteinfo.bbclass</filename></title>
857
858 <para>
859 Autotools can require tests that must execute on the target hardware.
860 Since this is not possible in general when cross compiling, site information is
861 used to provide cached test results so these tests can be skipped over but
862 still make the correct values available.
863 The <filename><link linkend='structure-meta-site'>meta/site directory</link></filename>
864 contains test results sorted into different categories such as architecture, endianness, and
865 the <filename>libc</filename> used.
866 Site information provides a list of files containing data relevant to
867 the current build in the
868 <filename><link linkend='var-CONFIG_SITE'>CONFIG_SITE</link></filename> variable
869 that Autotools automatically picks up.
870 </para>
871
872 <para>
873 The class also provides variables like
874 <filename><link linkend='var-SITEINFO_ENDIANNESS'>SITEINFO_ENDIANNESS</link></filename>
875 and <filename><link linkend='var-SITEINFO_BITS'>SITEINFO_BITS</link></filename>
876 that can be used elsewhere in the metadata.
877 </para>
878
879 <para>
880 Because this class is included from <filename>base.bbclass</filename>, it is always active.
881 </para>
882</section>
883
884<section id='ref-classes-useradd'>
885 <title>Adding Users - <filename>useradd.bbclass</filename></title>
886
887 <para>
888 If you have packages that install files that are owned by custom users or groups,
889 you can use this class to specify those packages and associate the users and groups
890 with those packages.
891 The <filename>meta-skeleton/recipes-skeleton/useradd/useradd-example.bb</filename>
892 recipe in the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
893 provides a simple example that shows how to add three
894 users and groups to two packages.
895 See the <filename>useradd-example.bb</filename> for more information on how to
896 use this class.
897 </para>
898</section>
899
900<section id='ref-classes-externalsrc'>
901 <title><filename>externalsrc.bbclass</filename></title>
902
903 <para>
904 You can use this class to build software from source code that is
905 external to the OpenEmbedded build system.
906 Building software from an external source tree means that the build
907 system's normal fetch, unpack, and patch process is not used.
908 </para>
909
910 <para>
911 By default, the OpenEmbedded build system uses the
912 <link linkend='var-S'><filename>S</filename></link> and
913 <link linkend='var-B'><filename>B</filename></link> variables to
914 locate unpacked recipe source code and to build it, respectively.
915 When your recipe inherits <filename>externalsrc.bbclass</filename>,
916 you use the
917 <link linkend='var-EXTERNALSRC'><filename>EXTERNALSRC</filename></link>
918 and
919 <link linkend='var-EXTERNALSRC_BUILD'><filename>EXTERNALSRC_BUILD</filename></link>
920 variables to ultimately define <filename>S</filename> and
921 <filename>B</filename>.
922 </para>
923
924 <para>
925 By default, this class expects the source code to support recipe builds
926 that use the <link linkend='var-B'><filename>B</filename></link>
927 variable to point to the directory in which the OpenEmbedded build
928 system places the generated objects built from the recipes.
929 By default, the <filename>B</filename> directory is set to the
930 following, which is separate from the source directory
931 (<filename>S</filename>):
932 <literallayout class='monospaced'>
933 ${WORKDIR}/${BPN}/{PV}/
934 </literallayout>
935 See the glossary entries for the
936 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
937 <link linkend='var-BPN'><filename>BPN</filename></link>,
938 <link linkend='var-PV'><filename>PV</filename></link>,
939 </para>
940
941 <para>
942 For more information on
943 <filename>externalsrc.bbclass</filename>, see the comments in
944 <filename>meta/classes/externalsrc.bbclass</filename> in the
945 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
946 For information on how to use <filename>externalsrc.bbclass</filename>,
947 see the
948 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
949 section in the Yocto Project Development Manual.
950 </para>
951</section>
952
953<section id='ref-classes-testimage'>
954 <title><filename>testimage.bbclass</filename></title>
955
956 <para>
957 You can use this class to enable running a series of automated tests
958 for images.
959 The class handles loading the tests and starting the image.
960 <note>
961 Currently, there is only support for running these tests
962 under QEMU.
963 </note>
964 </para>
965
966 <para>
967 To use the class, you need to perform steps to set up the
968 environment.
969 The tests are commands that run on the target system over
970 <filename>ssh</filename>.
971 they are written in Python and make use of the
972 <filename>unittest</filename> module.
973 </para>
974
975 <para>
976 For information on how to enable, run, and create new tests, see the
977 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
978 section.
979 </para>
980</section>
981
982<section id='ref-classes-others'>
983 <title>Other Classes</title>
984
985 <para>
986 Thus far, this chapter has discussed only the most useful and important
987 classes.
988 However, other classes exist within the <filename>meta/classes</filename> directory
989 in the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
990 You can examine the <filename>.bbclass</filename> files directly for more
991 information.
992 </para>
993</section>
994
995<!-- Undocumented classes are:
996 allarch.bbclass
997 archive*.bbclass
998 binconfig.bbclass
999 bin_package.bbclass
1000 blacklist.bbclass
1001 bootimg.bbclass
1002 boot-directdisk.bbclass
1003 bugzilla.bbclass
1004 buildhistory.bbclass
1005 buildstats.bbclass
1006 ccache.bbclass
1007 chrpath.bbclass
1008 clutter.bbclass
1009 cmake.bbclass
1010 cml1.bbclass
1011 copyleft_compliance.bbclass
1012 core-image.bbclass
1013 cross.bbclass
1014 cross-canadian.bbclass
1015 crosssdk.bbclass
1016 deploy.bbclass
1017 distrodata.bbclass
1018 distro_features_check.bbclass
1019 dummy.bbclass
1020 extrausers.bbclass
1021 fontcache.bbclass
1022 gconf.bbclass
1023 gettext.bbclass
1024 gnomebase.bbclass
1025 gnome.bbclass
1026 grub-efi.bbclass
1027 gsettings.bbclass
1028 gtk-doc.bbclass
1029 gtk-icon-cache.bbclass
1030 gtk-immodules-cache.bbclass
1031 gzipnative.bbclass
1032 icecc.bbclass
1033 image-empty.bbclass
1034 image-live.bbclass
1035 image-vmdk.bbclass
1036 image-mklibs.bbclass
1037 image-prelink.bbclass
1038 image-swab.bbclass
1039 image_types.bbclass
1040 image_types_uboot.bbclass
1041 insserv.bbclass
1042 kernel-arch.bbclass
1043 kernel-module-split.bbclass
1044 kernel-yocto.bbclass
1045 lib_package.bbclass
1046 linux-kernel-base.bbclass
1047 license.bbclass
1048 logging.bbclass
1049 meta.bbclass
1050 metadata_scm.bbclass
1051 migrate_localcount.bbclass
1052 mime.bbclass
1053 mirrors.bbclass
1054 multilib*.bbclass
1055 native.bbclass
1056 nativesdk.bbclass
1057 oelint.bbclass
1058 own-mirrors.bbclass
1059 packagedata.bbclass
1060 packageinfo.bbclass
1061 patch.bbclass
1062 perlnative.bbclass
1063 pixbufcache.bbclass
1064 pkg_distribute.bbclass
1065 pkg_metainfo.bbclass
1066 populate_sdk*.bbclass
1067 prexport.bbclass
1068 primport.bbclass
1069 prserv.bbclass
1070 ptest.bbclass
1071 python-dir.bbclass
1072 pythonnative.bbclass
1073 qemu.bbclass
1074 qmake*.bbclass
1075 qt4*.bbclass
1076 recipe_sanity.bbclass
1077 relocatable.bbclass
1078 scons.bbclass
1079 sdl.bbclass
1080 setuptools.bbclass
1081 sip.bbclass
1082 siteconfig.bbclass
1083 sourcepkg.bbclass
1084 spdx.bbclass
1085 sstate.bbclass
1086 staging.bbclass
1087 syslinux.bbclass
1088 systemd.bbclass
1089 terminal.bbclass
1090 tinderclient.bbclass
1091 toolchain-scripts.bbclass
1092 typecheck.bbclass
1093 uboot-config.bbclass
1094 utility-tasks.bbclass
1095 utils.bbclass
1096 vala.bbclass
1097 waf.bbclass
1098-->
1099
1100
1101</chapter>
1102<!--
1103vim: expandtab tw=80 ts=4
1104-->
diff --git a/documentation/ref-manual/ref-features.xml b/documentation/ref-manual/ref-features.xml
new file mode 100644
index 0000000..dedcf67
--- /dev/null
+++ b/documentation/ref-manual/ref-features.xml
@@ -0,0 +1,334 @@
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>Reference: 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-distro'>
47 <title>Distro</title>
48
49 <para>
50 The items below are features you can use with
51 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_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 list only represents features as shipped with the Yocto Project metadata:
62 <itemizedlist>
63 <listitem><para><emphasis>alsa:</emphasis> Include ALSA support
64 (OSS compatibility kernel modules installed if available).
65 </para></listitem>
66 <listitem><para><emphasis>bluetooth:</emphasis> Include
67 bluetooth support (integrated BT only).</para></listitem>
68 <listitem><para><emphasis>cramfs:</emphasis> Include CramFS
69 support.</para></listitem>
70 <listitem><para><emphasis>ext2:</emphasis> Include tools for
71 supporting for devices with internal HDD/Microdrive for
72 storing files (instead of Flash only devices).
73 </para></listitem>
74 <listitem><para><emphasis>ipsec:</emphasis> Include IPSec
75 support.</para></listitem>
76 <listitem><para><emphasis>ipv6:</emphasis> Include IPv6 support.
77 </para></listitem>
78 <listitem><para><emphasis>irda:</emphasis> Include Irda support.
79 </para></listitem>
80 <listitem><para><emphasis>keyboard:</emphasis> Include keyboard
81 support (e.g. keymaps will be loaded during boot).
82 </para></listitem>
83 <listitem><para><emphasis>nfs:</emphasis> Include NFS client
84 support (for mounting NFS exports on device).
85 </para></listitem>
86 <listitem><para><emphasis>opengl:</emphasis>
87 Include the Open Graphics Library, which is a
88 cross-language, multi-platform application programming
89 interface used for rendering two and three-dimensional
90 graphics.</para></listitem>
91 <listitem><para><emphasis>pci:</emphasis> Include PCI bus
92 support.</para></listitem>
93 <listitem><para><emphasis>pcmcia:</emphasis> Include
94 PCMCIA/CompactFlash support.</para></listitem>
95 <listitem><para><emphasis>ppp:</emphasis> Include PPP dialup
96 support.</para></listitem>
97 <listitem><para><emphasis>smbfs:</emphasis> Include SMB networks
98 client support (for mounting Samba/Microsoft Windows shares
99 on device).</para></listitem>
100 <listitem><para><emphasis>systemd:</emphasis> Include support
101 for this <filename>init</filename> manager, which is a full
102 replacement of for <filename>init</filename> with parallel
103 starting of services, reduced shell overhead, and other
104 features.
105 This <filename>init</filename> manager is used by many
106 distributions.</para></listitem>
107 <listitem><para><emphasis>usbgadget:</emphasis> Include USB
108 Gadget Device support (for USB networking/serial/storage).
109 </para></listitem>
110 <listitem><para><emphasis>usbhost:</emphasis> Include USB Host
111 support (allows to connect external keyboard, mouse,
112 storage, network etc).</para></listitem>
113 <listitem><para><emphasis>wayland:</emphasis> Include the
114 Wayland display server protocol and the library that
115 supports it.</para></listitem>
116 <listitem><para><emphasis>wifi:</emphasis> Include WiFi support
117 (integrated only).</para></listitem>
118 <listitem><para><emphasis>sdk-pms:</emphasis> Include Package
119 Management Tools in the
120 <filename>nativesdk</filename> toolchain tarball.
121 Including these tools allows for easy sandbox use when
122 creating the root filesystem while using the SDK tarball.
123 </para></listitem>
124 </itemizedlist>
125 </para>
126 </section>
127
128 <section id='ref-features-machine'>
129 <title>Machine</title>
130
131 <para>
132 The items below are features you can use with
133 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>.
134 Features do not have a one-to-one correspondence to packages, and they can
135 go beyond simply controlling the installation of a package or packages.
136 Sometimes a feature can influence how certain recipes are built.
137 For example, a feature might determine whether a particular configure option
138 is specified within <filename>do_configure</filename> for a particular
139 recipe.
140 </para>
141
142 <para>
143 This feature list only represents features as shipped with the Yocto Project metadata:
144 <itemizedlist>
145 <listitem><para><emphasis>acpi:</emphasis> Hardware has ACPI (x86/x86_64 only)
146 </para></listitem>
147 <listitem><para><emphasis>alsa:</emphasis> Hardware has ALSA audio drivers
148 </para></listitem>
149 <listitem><para><emphasis>apm:</emphasis> Hardware uses APM (or APM emulation)
150 </para></listitem>
151 <listitem><para><emphasis>bluetooth:</emphasis> Hardware has integrated BT
152 </para></listitem>
153 <listitem><para><emphasis>ext2:</emphasis> Hardware HDD or Microdrive
154 </para></listitem>
155 <listitem><para><emphasis>irda:</emphasis> Hardware has Irda support
156 </para></listitem>
157 <listitem><para><emphasis>keyboard:</emphasis> Hardware has a keyboard
158 </para></listitem>
159 <listitem><para><emphasis>pci:</emphasis> Hardware has a PCI bus
160 </para></listitem>
161 <listitem><para><emphasis>pcmcia:</emphasis> Hardware has PCMCIA or CompactFlash sockets
162 </para></listitem>
163 <listitem><para><emphasis>screen:</emphasis> Hardware has a screen
164 </para></listitem>
165 <listitem><para><emphasis>serial:</emphasis> Hardware has serial support (usually RS232)
166 </para></listitem>
167 <listitem><para><emphasis>touchscreen:</emphasis> Hardware has a touchscreen
168 </para></listitem>
169 <listitem><para><emphasis>usbgadget:</emphasis> Hardware is USB gadget device capable
170 </para></listitem>
171 <listitem><para><emphasis>usbhost:</emphasis> Hardware is USB Host capable
172 </para></listitem>
173 <listitem><para><emphasis>wifi:</emphasis> Hardware has integrated WiFi
174 </para></listitem>
175 </itemizedlist>
176 </para>
177 </section>
178
179 <section id='ref-features-image'>
180 <title>Images</title>
181
182 <para>
183 The contents of images generated by the OpenEmbedded build system can be controlled by the
184 <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>
185 and <filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename>
186 variables that you typically configure in your image recipes.
187 Through these variables, you can add several different
188 predefined packages such as development utilities or packages with debug
189 information needed to investigate application problems or profile applications.
190 </para>
191
192 <para>
193 Current list of
194 <filename>IMAGE_FEATURES</filename> contains the following:
195 <itemizedlist>
196 <listitem><para><emphasis>dbg-pkgs:</emphasis> Installs debug symbol packages for all packages
197 installed in a given image.</para></listitem>
198 <listitem><para><emphasis>dev-pkgs:</emphasis> Installs development packages (headers and
199 extra library links) for all packages installed in a given image.</para></listitem>
200 <listitem><para><emphasis>doc-pkgs:</emphasis> Installs documentation packages for all packages
201 installed in a given image.</para></listitem>
202 <listitem><para><emphasis>nfs-server:</emphasis> Installs an NFS server.</para></listitem>
203 <listitem><para><emphasis>read-only-rootfs:</emphasis> Creates
204 an image whose root filesystem is read-only.
205 See the
206 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>Creating a Read-Only Root Filesystem</ulink>"
207 section in the Yocto Project Development Manual for more
208 information.</para></listitem>
209 <listitem><para><emphasis>splash:</emphasis> Enables showing a splash screen during boot.
210 By default, this screen is provided by <filename>psplash</filename>, which does
211 allow customization.
212 If you prefer to use an alternative splash screen package, you can do so by
213 setting the <filename>SPLASH</filename> variable
214 to a different package name (or names) within the image recipe or at the distro
215 configuration level.</para></listitem>
216 <listitem><para><emphasis>ssh-server-dropbear:</emphasis> Installs the Dropbear minimal
217 SSH server.
218 </para></listitem>
219 <listitem><para><emphasis>ssh-server-openssh:</emphasis> Installs the OpenSSH SSH server,
220 which is more full-featured than Dropbear.
221 Note that if both the OpenSSH SSH server and the Dropbear minimal SSH server
222 are present in <filename>IMAGE_FEATURES</filename>, then OpenSSH will take
223 precedence and Dropbear will not be installed.</para></listitem>
224 <listitem><para><emphasis>staticdev-pkgs:</emphasis> Installs static development
225 packages (i.e. static libraries containing <filename>*.a</filename> files) for all
226 packages installed in a given image.</para></listitem>
227 <listitem><para><emphasis>tools-debug:</emphasis> Installs debugging tools such as
228 <filename>strace</filename> and <filename>gdb</filename>.
229 For information on GDB, see the
230 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
231 section in the Yocto Project Development Manual.
232 For information on tracing and profiling, see the
233 <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>.
234 </para></listitem>
235 <listitem><para><emphasis>tools-profile:</emphasis> Installs profiling tools such as
236 <filename>oprofile</filename>, <filename>exmap</filename>, and
237 <filename>LTTng</filename>.
238 For general information on user-space tools, see the
239 "<ulink url='&YOCTO_DOCS_ADT_URL;#user-space-tools'>User-Space Tools</ulink>"
240 section in the Yocto Project Application Developer's Guide.</para></listitem>
241 <listitem><para><emphasis>tools-sdk:</emphasis> Installs a full SDK that runs on the device.
242 </para></listitem>
243 <listitem><para><emphasis>tools-testapps:</emphasis> Installs device testing tools (e.g.
244 touchscreen debugging).</para></listitem>
245 <listitem><para><emphasis>x11:</emphasis> Installs the X server</para></listitem>
246 <listitem><para><emphasis>x11-base:</emphasis> Installs the X server with a
247 minimal environment.</para></listitem>
248 <listitem><para><emphasis>x11-sato:</emphasis> Installs the OpenedHand Sato environment.
249 </para></listitem>
250 </itemizedlist>
251 </para>
252 </section>
253
254 <section id='ref-features-backfill'>
255 <title>Feature Backfilling</title>
256
257 <para>
258 Sometimes it is necessary in the OpenEmbedded build system to extend
259 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
260 or <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
261 to control functionality that was previously enabled and not able
262 to be disabled.
263 For these cases, we need to add an
264 additional feature item to appear in one of these variables,
265 but we do not want to force developers who have existing values
266 of the variables in their configuration to add the new feature
267 in order to retain the same overall level of functionality.
268 Thus, the OpenEmbedded build system has a mechanism to
269 automatically "backfill" these added features into existing
270 distro or machine configurations.
271 You can see the list of features for which this is done by
272 finding the
273 <link linkend='var-DISTRO_FEATURES_BACKFILL'><filename>DISTRO_FEATURES_BACKFILL</filename></link>
274 and <link linkend='var-MACHINE_FEATURES_BACKFILL'><filename>MACHINE_FEATURES_BACKFILL</filename></link>
275 variables in the <filename>meta/conf/bitbake.conf</filename> file.
276 </para>
277
278 <para>
279 Because such features are backfilled by default into all
280 configurations as described in the previous paragraph, developers
281 who wish to disable the new features need to be able to selectively
282 prevent the backfilling from occurring.
283 They can do this by adding the undesired feature or features to the
284 <link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
285 or <link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename></link>
286 variables for distro features and machine features respectively.
287 </para>
288
289 <para>
290 Here are two examples to help illustrate feature backfilling:
291 <itemizedlist>
292 <listitem><para><emphasis>The "pulseaudio" distro feature option</emphasis>:
293 Previously, PulseAudio support was enabled within the Qt and
294 GStreamer frameworks.
295 Because of this, the feature is backfilled and thus
296 enabled for all distros through the
297 <filename>DISTRO_FEATURES_BACKFILL</filename>
298 variable in the <filename>meta/conf/bitbake.conf</filename> file.
299 However, your distro needs to disable the feature.
300 You can disable the feature without affecting
301 other existing distro configurations that need PulseAudio support
302 by adding "pulseaudio" to
303 <filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename>
304 in your distro's <filename>.conf</filename> file.
305 Adding the feature to this variable when it also
306 exists in the <filename>DISTRO_FEATURES_BACKFILL</filename>
307 variable prevents the build system from adding the feature to
308 your configuration's <filename>DISTRO_FEATURES</filename>, effectively disabling
309 the feature for that particular distro.</para></listitem>
310 <listitem><para><emphasis>The "rtc" machine feature option</emphasis>:
311 Previously, real time clock (RTC) support was enabled for all
312 target devices.
313 Because of this, the feature is backfilled and thus enabled
314 for all machines through the <filename>MACHINE_FEATURES_BACKFILL</filename>
315 variable in the <filename>meta/conf/bitbake.conf</filename> file.
316 However, your target device does not have this capability.
317 You can disable RTC support for your device without
318 affecting other machines that need RTC support
319 by adding the feature to your machine's
320 <filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename>
321 list in the machine's <filename>.conf</filename> file.
322 Adding the feature to this variable when it also
323 exists in the <filename>MACHINE_FEATURES_BACKFILL</filename>
324 variable prevents the build system from adding the feature to
325 your configuration's <filename>MACHINE_FEATURES</filename>, effectively
326 disabling RTC support for that particular machine.</para></listitem>
327 </itemizedlist>
328 </para>
329 </section>
330</chapter>
331
332<!--
333vim: expandtab tw=80 ts=4 spell spelllang=en_gb
334-->
diff --git a/documentation/ref-manual/ref-images.xml b/documentation/ref-manual/ref-images.xml
new file mode 100644
index 0000000..37c8051
--- /dev/null
+++ b/documentation/ref-manual/ref-images.xml
@@ -0,0 +1,150 @@
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><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 (<filename>initramfs</filename>) as part of the kernel,
67 which allows the system to find the first “init” program more efficiently.
68 </para></listitem>
69 <listitem><para><emphasis><filename>core-image-minimal-mtdutils</filename>:</emphasis>
70 A <filename>core-image-minimal</filename> image that has support
71 for the Minimal MTD Utilities, which let the user interact with the
72 MTD subsystem in the kernel to perform operations on flash devices.
73 </para></listitem>
74 <listitem><para><emphasis><filename>core-image-basic</filename>:</emphasis>
75 A console-only image with more full-featured Linux system
76 functionality installed.</para></listitem>
77 <listitem><para><emphasis><filename>core-image-lsb</filename>:</emphasis>
78 An image that conforms to the Linux Standard Base (LSB) specification.
79 </para></listitem>
80 <listitem><para><emphasis><filename>core-image-lsb-dev</filename>:</emphasis>
81 A <filename>core-image-lsb</filename> image that is suitable for development work
82 using the host.
83 The image includes headers and libraries you can use in a host development
84 environment.
85 </para></listitem>
86 <listitem><para><emphasis><filename>core-image-lsb-sdk</filename>:</emphasis>
87 A <filename>core-image-lsb</filename> that includes everything in meta-toolchain
88 but also includes development headers and libraries to form a complete standalone SDK.
89 This image is suitable for development using the target.</para></listitem>
90 <listitem><para><emphasis><filename>core-image-clutter</filename>:</emphasis>
91 An image with support for the Open GL-based toolkit Clutter, which enables development of
92 rich and animated graphical user interfaces.</para></listitem>
93 <listitem><para><emphasis><filename>core-image-gtk-directfb</filename>:</emphasis>
94 An image that uses <filename>gtk+</filename> over <filename>directfb</filename>
95 instead of X11.
96 In order to build, this image requires specific distro configuration that enables
97 <filename>gtk</filename> over <filename>directfb</filename>.</para></listitem>
98 <listitem><para><emphasis><filename>core-image-x11</filename>:</emphasis>
99 A very basic X11 image with a terminal.
100 </para></listitem>
101 <listitem><para><emphasis><filename>qt4e-demo-image</filename>:</emphasis>
102 An image that launches into the demo application for the embedded
103 (not based on X11) version of Qt.</para></listitem>
104 <listitem><para><emphasis><filename>core-image-rt</filename>:</emphasis>
105 A <filename>core-image-minimal</filename> image plus a real-time test suite and
106 tools appropriate for real-time use.</para></listitem>
107 <listitem><para><emphasis><filename>core-image-rt-sdk</filename>:</emphasis>
108 A <filename>core-image-rt</filename> image that includes everything in
109 <filename>meta-toolchain</filename>.
110 The image also includes development headers and libraries to form a complete
111 stand-alone SDK and is suitable for development using the target.
112 </para></listitem>
113 <listitem><para><emphasis><filename>core-image-sato</filename>:</emphasis>
114 An image with Sato support, a mobile environment and visual style that works well
115 with mobile devices.
116 The image supports X11 with a Sato theme and applications such as
117 a terminal, editor, file manager, media player, and so forth.
118 </para></listitem>
119 <listitem><para><emphasis><filename>core-image-sato-dev</filename>:</emphasis>
120 A <filename>core-image-sato</filename> image suitable for development
121 using the host.
122 The image includes libraries needed to build applications on the device itself,
123 testing and profiling tools, and debug symbols.
124 This image was formerly <filename>core-image-sdk</filename>.
125 </para></listitem>
126 <listitem><para><emphasis><filename>core-image-sato-sdk</filename>:</emphasis>
127 A <filename>core-image-sato</filename> image that includes everything in meta-toolchain.
128 The image also includes development headers and libraries to form a complete standalone SDK
129 and is suitable for development using the target.</para></listitem>
130 <listitem><para><emphasis><filename>core-image-multilib-example</filename>:</emphasis>
131 An example image that includes a <filename>lib32</filename> version
132 of Bash into an otherwise standard <filename>sato</filename> image.
133 The image assumes a "lib32" multilib has been enabled in the your
134 configuration.</para></listitem>
135 </itemizedlist>
136
137 <tip>
138 From the Yocto Project release 1.1 onwards, <filename>-live</filename> and
139 <filename>-directdisk</filename> images have been replaced by a "live"
140 option in <filename>IMAGE_FSTYPES</filename> that will work with any image to produce an
141 image file that can be
142 copied directly to a CD or USB device and run as is.
143 To build a live image, simply add
144 "live" to <filename>IMAGE_FSTYPES</filename> within the <filename>local.conf</filename>
145 file or wherever appropriate and then build the desired image as normal.
146 </tip>
147</chapter>
148<!--
149vim: expandtab tw=80 ts=4
150-->
diff --git a/documentation/ref-manual/ref-manual-customization.xsl b/documentation/ref-manual/ref-manual-customization.xsl
new file mode 100644
index 0000000..3ad3a31
--- /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 0000000..4e6b799
--- /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 0000000..7db880b
--- /dev/null
+++ b/documentation/ref-manual/ref-manual.xml
@@ -0,0 +1,138 @@
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>Sometime in 2013</date>
78 <revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
79 </revision>
80 </revhistory>
81
82 <copyright>
83 <year>&COPYRIGHT_YEAR;</year>
84 <holder>Linux Foundation</holder>
85 </copyright>
86
87 <legalnotice>
88 <para>
89 Permission is granted to copy, distribute and/or modify this document under
90 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.
91 </para>
92 <note>
93 For the latest version of this manual associated with this
94 Yocto Project release, see the
95 <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>
96 from the Yocto Project website.
97 </note>
98 </legalnotice>
99
100 </bookinfo>
101
102 <xi:include href="introduction.xml"/>
103
104 <xi:include href="usingpoky.xml"/>
105
106 <xi:include href="closer-look.xml"/>
107
108 <xi:include href="technical-details.xml"/>
109
110 <xi:include href="migration.xml"/>
111
112 <xi:include href="ref-structure.xml"/>
113
114 <xi:include href="ref-bitbake.xml"/>
115
116 <xi:include href="ref-classes.xml"/>
117
118 <xi:include href="ref-images.xml"/>
119
120 <xi:include href="ref-features.xml"/>
121
122 <xi:include href="ref-variables.xml"/>
123
124 <xi:include href="ref-varlocality.xml"/>
125
126 <xi:include href="faq.xml"/>
127
128 <xi:include href="resources.xml"/>
129
130<!-- <index id='index'>
131 <title>Index</title>
132 </index>
133-->
134
135</book>
136<!--
137vim: expandtab tw=80 ts=4
138-->
diff --git a/documentation/ref-manual/ref-structure.xml b/documentation/ref-manual/ref-structure.xml
new file mode 100644
index 0000000..66e58f2
--- /dev/null
+++ b/documentation/ref-manual/ref-structure.xml
@@ -0,0 +1,942 @@
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 BitBake documentation
67 included in the <filename>bitbake/doc/manual</filename> directory of the
68 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
69 </para>
70 </section>
71
72 <section id='structure-core-build'>
73 <title><filename>build/</filename></title>
74
75 <para>
76 This directory contains user configuration files and the output
77 generated by the OpenEmbedded build system in its standard configuration where
78 the source tree is combined with the output.
79 The <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
80 is created initially when you <filename>source</filename>
81 the OpenEmbedded build environment setup script
82 (i.e.
83 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
84 or
85 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
86 </para>
87
88 <para>
89 It is also possible to place output and configuration
90 files in a directory separate from the
91 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
92 by providing a directory name when you <filename>source</filename>
93 the setup script.
94 For information on separating output from your local
95 Source Directory files, see the
96 "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
97 and
98 "<link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>"
99 sections.
100 </para>
101 </section>
102
103 <section id='handbook'>
104 <title><filename>documentation/</filename></title>
105
106 <para>
107 This directory holds the source for the Yocto Project documentation
108 as well as templates and tools that allow you to generate PDF and HTML
109 versions of the manuals.
110 Each manual is contained in a sub-folder.
111 For example, the files for this manual reside in
112 the <filename>ref-manual/</filename> directory.
113 </para>
114 </section>
115
116 <section id='structure-core-meta'>
117 <title><filename>meta/</filename></title>
118
119 <para>
120 This directory contains the OpenEmbedded Core metadata.
121 The directory holds recipes, common classes, and machine
122 configuration for emulated targets (<filename>qemux86</filename>,
123 <filename>qemuarm</filename>, and so forth.)
124 </para>
125 </section>
126
127 <section id='structure-core-meta-yocto'>
128 <title><filename>meta-yocto/</filename></title>
129
130 <para>
131 This directory contains the configuration for the Poky
132 reference distribution.
133 </para>
134 </section>
135
136 <section id='structure-core-meta-yocto-bsp'>
137 <title><filename>meta-yocto-bsp/</filename></title>
138
139 <para>
140 This directory contains the Yocto Project reference
141 hardware Board Support Packages (BSPs).
142 For more information on BSPs, see the
143 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support
144 Package (BSP) Developer's Guide</ulink>.
145 </para>
146 </section>
147
148 <section id='structure-meta-hob'>
149 <title><filename>meta-hob/</filename></title>
150
151 <para>
152 This directory contains template recipes used by Hob,
153 which is a Yocto Project build user interface.
154 For more information on the Hob, see the
155 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob Project</ulink>
156 web page.
157 </para>
158 </section>
159
160 <section id='structure-meta-skeleton'>
161 <title><filename>meta-skeleton/</filename></title>
162
163 <para>
164 This directory contains template recipes for BSP and kernel development.
165 </para>
166 </section>
167
168 <section id='structure-core-scripts'>
169 <title><filename>scripts/</filename></title>
170
171 <para>
172 This directory contains various integration scripts that implement
173 extra functionality in the Yocto Project environment (e.g. QEMU scripts).
174 The <link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>
175 and
176 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
177 scripts append this directory to the shell's
178 <filename>PATH</filename> environment variable.
179 </para>
180
181 <para>
182 The <filename>scripts</filename> directory has useful scripts that assist in contributing
183 back to the Yocto Project, such as <filename>create-pull-request</filename> and
184 <filename>send-pull-request</filename>.
185 </para>
186 </section>
187
188 <section id='structure-core-script'>
189 <title><filename>&OE_INIT_FILE;</filename></title>
190
191 <para>
192 This script is one of two scripts that set up the OpenEmbedded build
193 environment.
194 For information on the other script, see the
195 "<link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>"
196 section.
197 </para>
198
199 <para>
200 Running this script with the <filename>source</filename> command in
201 a shell makes changes to <filename>PATH</filename> and sets other
202 core BitBake variables based on the current working directory.
203 You need to run an environment setup script before running BitBake
204 commands.
205 The script uses other scripts within the
206 <filename>scripts</filename> directory to do the bulk of the work.
207 </para>
208
209 <para>
210 By default, running this script without a
211 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
212 argument creates the <filename>build</filename> directory
213 in your current working directory.
214 If you provide a Build Directory argument when you
215 <filename>source</filename> the script, you direct the OpenEmbedded
216 build system to create a Build Directory of your choice.
217 For example, the following command creates a Build Directory named
218 <filename>mybuilds</filename> that is outside of the
219 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
220 <literallayout class='monospaced'>
221 $ source &OE_INIT_FILE; ~/mybuilds
222 </literallayout>
223 <note>
224 The OpenEmbedded build system does not support file or directory names that
225 contain spaces.
226 If you attempt to run the <filename>&OE_INIT_FILE;</filename> script
227 from a Source Directory that contains spaces in either the filenames
228 or directory names, the script returns an error indicating no such
229 file or directory.
230 Be sure to use a Source Directory free of names containing spaces.
231 </note>
232 </para>
233 </section>
234
235 <section id='structure-memres-core-script'>
236 <title><filename>oe-init-build-env-memres</filename></title>
237
238 <para>
239 This script is one of two scripts that set up the OpenEmbedded
240 build environment.
241 Aside from setting up the environment, this script starts a
242 memory-resident BitBake server.
243 For information on the other setup script, see the
244 "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>"
245 section.
246 </para>
247
248 <para>
249 Memory-resident BitBake resides in memory until you specifically
250 remove it using the following BitBake command:
251 <literallayout class='monospaced'>
252 $ bitbake -m
253 </literallayout>
254 </para>
255
256 <para>
257 Running this script with the <filename>source</filename> command in
258 a shell makes changes to <filename>PATH</filename> and sets other
259 core BitBake variables based on the current working directory.
260 One of these variables is the
261 <link linkend='var-BBSERVER'><filename>BBSERVER</filename></link>
262 variable, which allows the OpenEmbedded build system to locate
263 the server that is running BitBake.
264 </para>
265
266 <para>
267 You need to run an environment setup script before using BitBake
268 commands.
269 Following is the script syntax:
270 <literallayout class='monospaced'>
271 $ source oe-init-build-env-memres &lt;port_number&gt; &lt;build_dir&gt;
272 </literallayout>
273 The script uses other scripts within the
274 <filename>scripts</filename> directory to do the bulk of the work.
275 </para>
276
277 <para>
278 If you do not provide a port number with the script, the
279 BitBake server at port "12345" is started.
280 </para>
281
282 <para>
283 By default, running this script without a
284 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
285 argument creates a build directory named
286 <filename>build</filename>.
287 If you provide a Build Directory argument when you
288 <filename>source</filename> the script, the Build Directory is
289 created using that name.
290 For example, the following command starts the BitBake server using
291 the default port "12345" and creates a Build Directory named
292 <filename>mybuilds</filename> that is outside of the
293 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
294 <literallayout class='monospaced'>
295 $ source oe-init-build-env-memres ~/mybuilds
296 </literallayout>
297 <note>
298 The OpenEmbedded build system does not support file or
299 directory names that contain spaces.
300 If you attempt to run the
301 <filename>oe-init-build-env-memres</filename> script
302 from a Source Directory that contains spaces in either the
303 filenames or directory names, the script returns an error
304 indicating no such file or directory.
305 Be sure to use a Source Directory free of names containing
306 spaces.
307 </note>
308 </para>
309 </section>
310
311 <section id='structure-basic-top-level'>
312 <title><filename>LICENSE, README, and README.hardware</filename></title>
313
314 <para>
315 These files are standard top-level files.
316 </para>
317 </section>
318</section>
319
320<section id='structure-build'>
321 <title>The Build Directory - <filename>build/</filename></title>
322
323 <para>
324 The OpenEmbedded build system creates the
325 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
326 during the build.
327 By default, this directory is named <filename>build</filename>.
328 </para>
329
330 <section id='structure-build-conf-local.conf'>
331 <title><filename>build/conf/local.conf</filename></title>
332
333 <para>
334 This configuration file contains all the local user configurations
335 for your build environment.
336 The <filename>local.conf</filename> file contains documentation on
337 the various configuration options.
338 Any variable set here overrides any variable set elsewhere within
339 the environment unless that variable is hard-coded within a file
340 (e.g. by using '=' instead of '?=').
341 Some variables are hard-coded for various reasons but these
342 variables are relatively rare.
343 </para>
344
345 <para>
346 Edit this file to set the
347 <filename><link linkend='var-MACHINE'>MACHINE</link></filename>
348 for which you want to build, which package types you wish to use
349 (<link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>),
350 the location from which you want to access downloaded files
351 (<filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>),
352 and how you want your host machine to use resources
353 (<link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>
354 and
355 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>).
356 </para>
357
358 <para>
359 If <filename>local.conf</filename> is not present when you
360 start the build, the OpenEmbedded build system creates it from
361 <filename>local.conf.sample</filename> when
362 you <filename>source</filename> the top-level build environment
363 setup script (i.e.
364 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
365 or
366 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
367 </para>
368
369 <para>
370 The source <filename>local.conf.sample</filename> file used
371 depends on the <filename>$TEMPLATECONF</filename> script variable,
372 which defaults to <filename>meta-yocto/conf</filename>
373 when you are building from the Yocto Project development
374 environment and defaults to <filename>meta/conf</filename> when
375 you are building from the OpenEmbedded Core environment.
376 Because the script variable points to the source of the
377 <filename>local.conf.sample</filename> file, this implies that
378 you can configure your build environment from any layer by setting
379 the variable in the top-level build environment setup script as
380 follows:
381 <literallayout class='monospaced'>
382 TEMPLATECONF=&lt;your_layer&gt;/conf
383 </literallayout>
384 Once the build process gets the sample file, it uses
385 <filename>sed</filename> to substitute final
386 <filename>${</filename><link linkend='var-OEROOT'><filename>OEROOT</filename></link><filename>}</filename>
387 values for all <filename>##OEROOT##</filename> values.
388 <note>
389 You can see how the <filename>TEMPLATECONF</filename> variable
390 is used by looking at the
391 <filename>scripts/oe-setup-builddir</filename> script in the
392 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
393 You can find the Yocto Project version of the
394 <filename>local.conf.sample</filename> file in the
395 <filename>meta-yocto/conf</filename> directory.
396 </note>
397 </para>
398 </section>
399
400 <section id='structure-build-conf-bblayers.conf'>
401 <title><filename>build/conf/bblayers.conf</filename></title>
402
403 <para>
404 This configuration file defines
405 <ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>layers</ulink>,
406 which are directory trees, traversed (or walked) by BitBake.
407 The <filename>bblayers.conf</filename> file uses the
408 <link linkend='var-BBLAYERS'><filename>BBLAYERS</filename></link>
409 variable to list the layers BitBake tries to find, and uses the
410 <link linkend='var-BBLAYERS_NON_REMOVABLE'><filename>BBLAYERS_NON_REMOVABLE</filename></link>
411 variable to list layers that must not be removed.
412 </para>
413
414 <para>
415 If <filename>bblayers.conf</filename> is not present when you
416 start the build, the OpenEmbedded build system creates it from
417 <filename>bblayers.conf.sample</filename> when
418 you <filename>source</filename> the top-level build environment
419 setup script (i.e.
420 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
421 or
422 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
423 </para>
424
425 <para>
426 The source <filename>bblayers.conf.sample</filename> file used
427 depends on the <filename>$TEMPLATECONF</filename> script variable,
428 which defaults to <filename>meta-yocto/conf</filename>
429 when you are building from the Yocto Project development
430 environment and defaults to <filename>meta/conf</filename> when
431 you are building from the OpenEmbedded Core environment.
432 Because the script variable points to the source of the
433 <filename>bblayers.conf.sample</filename> file, this implies that
434 you can base your build from any layer by setting the variable in
435 the top-level build environment setup script as follows:
436 <literallayout class='monospaced'>
437 TEMPLATECONF=&lt;your_layer&gt;/conf
438 </literallayout>
439 Once the build process gets the sample file, it uses
440 <filename>sed</filename> to substitute final
441 <filename>${</filename><link linkend='var-OEROOT'><filename>OEROOT</filename></link><filename>}</filename>
442 values for all <filename>##OEROOT##</filename> values.
443 <note>
444 You can see how the <filename>TEMPLATECONF</filename> variable
445 <filename>scripts/oe-setup-builddir</filename> script in the
446 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
447 You can find the Yocto Project version of the
448 <filename>bblayers.conf.sample</filename> file in the
449 <filename>meta-yocto/conf</filename> directory.
450 </note>
451 </para>
452 </section>
453
454 <section id='structure-build-conf-sanity_info'>
455 <title><filename>build/conf/sanity_info</filename></title>
456
457 <para>
458 This file indicates the state of the sanity checks and is created
459 during the build.
460 </para>
461 </section>
462
463 <section id='structure-build-downloads'>
464 <title><filename>build/downloads/</filename></title>
465
466 <para>
467 This directory contains downloaded upstream source tarballs.
468 You can reuse the directory for multiple builds or move
469 the directory to another location.
470 You can control the location of this directory through the
471 <filename><link linkend='var-DL_DIR'>DL_DIR</link></filename> variable.
472 </para>
473 </section>
474
475 <section id='structure-build-sstate-cache'>
476 <title><filename>build/sstate-cache/</filename></title>
477
478 <para>
479 This directory contains the shared state cache.
480 You can reuse the directory for multiple builds or move
481 the directory to another location.
482 You can control the location of this directory through the
483 <filename><link linkend='var-SSTATE_DIR'>SSTATE_DIR</link></filename> variable.
484 </para>
485 </section>
486
487 <section id='structure-build-tmp'>
488 <title><filename>build/tmp/</filename></title>
489
490 <para>
491 This directory receives all of the OpenEmbedded build system's output.
492 BitBake creates this directory if it does not exist.
493 As a last resort, to clean up a build and start it from scratch (other than the downloads),
494 you can remove everything in the <filename>tmp</filename> directory or get rid of the
495 directory completely.
496 If you do, you should also completely remove the
497 <filename>build/sstate-cache</filename> directory.
498 </para>
499 </section>
500
501 <section id='structure-build-tmp-buildstats'>
502 <title><filename>build/tmp/buildstats/</filename></title>
503
504 <para>
505 This directory stores the build statistics.
506 </para>
507 </section>
508
509 <section id='structure-build-tmp-cache'>
510 <title><filename>build/tmp/cache/</filename></title>
511
512 <para>
513 When BitBake parses the metadata, it creates a cache file of the result that can
514 be used when subsequently running commands.
515 BitBake stores these results here on a per-machine basis.
516 </para>
517 </section>
518
519 <section id='structure-build-tmp-deploy'>
520 <title><filename>build/tmp/deploy/</filename></title>
521
522 <para>
523 This directory contains any "end result" output from the
524 OpenEmbedded build process.
525 The <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>
526 variable points to this directory.
527 For more detail on the contents of the <filename>deploy</filename>
528 directory, see the
529 "<link linkend='images-dev-environment'>Images</link>" and
530 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
531 sections.
532 </para>
533 </section>
534
535 <section id='structure-build-tmp-deploy-deb'>
536 <title><filename>build/tmp/deploy/deb/</filename></title>
537
538 <para>
539 This directory receives any <filename>.deb</filename> packages produced by
540 the build process.
541 The packages are sorted into feeds for different architecture types.
542 </para>
543 </section>
544
545 <section id='structure-build-tmp-deploy-rpm'>
546 <title><filename>build/tmp/deploy/rpm/</filename></title>
547
548 <para>
549 This directory receives any <filename>.rpm</filename> packages produced by
550 the build process.
551 The packages are sorted into feeds for different architecture types.
552 </para>
553 </section>
554
555 <section id='structure-build-tmp-deploy-ipk'>
556 <title><filename>build/tmp/deploy/ipk/</filename></title>
557
558 <para>
559 This directory receives <filename>.ipk</filename> packages produced by
560 the build process.
561 </para>
562 </section>
563
564 <section id='structure-build-tmp-deploy-licenses'>
565 <title><filename>build/tmp/deploy/licenses/</filename></title>
566
567 <para>
568 This directory receives package licensing information.
569 For example, the directory contains sub-directories for <filename>bash</filename>,
570 <filename>busybox</filename>, and <filename>eglibc</filename> (among others) that in turn
571 contain appropriate <filename>COPYING</filename> license files with other licensing information.
572 For information on licensing, see the
573 "<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>"
574 section.
575 </para>
576 </section>
577
578 <section id='structure-build-tmp-deploy-images'>
579 <title><filename>build/tmp/deploy/images/</filename></title>
580
581 <para>
582 This directory receives complete filesystem images.
583 If you want to flash the resulting image from a build onto a device, look here for the image.
584 </para>
585
586 <para>
587 Be careful when deleting files in this directory.
588 You can safely delete old images from this directory (e.g.
589 <filename>core-image-*</filename>, <filename>hob-image-*</filename>,
590 etc.).
591 However, the kernel (<filename>*zImage*</filename>, <filename>*uImage*</filename>, etc.),
592 bootloader and other supplementary files might be deployed here prior to building an
593 image.
594 Because these files are not directly produced from the image, if you
595 delete them they will not be automatically re-created when you build the image again.
596 </para>
597
598 <para>
599 If you do accidentally delete files here, you will need to force them to be
600 re-created.
601 In order to do that, you will need to know the target that produced them.
602 For example, these commands rebuild and re-create the kernel files:
603 <literallayout class='monospaced'>
604 $ bitbake -c clean virtual/kernel
605 $ bitbake virtual/kernel
606 </literallayout>
607 </para>
608 </section>
609
610 <section id='structure-build-tmp-sysroots'>
611 <title><filename>build/tmp/sysroots/</filename></title>
612
613 <para>
614 This directory contains shared header files and libraries as well as other shared
615 data.
616 Packages that need to share output with other packages do so within this directory.
617 The directory is subdivided by architecture so multiple builds can run within
618 the one Build Directory.
619 </para>
620 </section>
621
622 <section id='structure-build-tmp-stamps'>
623 <title><filename>build/tmp/stamps/</filename></title>
624
625 <para>
626 This directory holds information that BitBake uses for accounting purposes
627 to track what tasks have run and when they have run.
628 The directory is sub-divided by architecture, package name, and
629 version.
630 Following is an example:
631 <literallayout class='monospaced'>
632 stamps/all-poky-linux/distcc-config/1.0-r0.do_build-2fdd....2do
633 </literallayout>
634 Although the files in the directory are empty of data,
635 BitBake uses the filenames and timestamps for tracking purposes.
636 </para>
637 </section>
638
639 <section id='structure-build-tmp-log'>
640 <title><filename>build/tmp/log/</filename></title>
641
642 <para>
643 This directory contains general logs that are not otherwise placed using the
644 package's <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>.
645 Examples of logs are the output from the <filename>check_pkg</filename> or
646 <filename>distro_check</filename> tasks.
647 Running a build does not necessarily mean this directory is created.
648 </para>
649 </section>
650
651 <section id='structure-build-tmp-work'>
652 <title><filename>build/tmp/work/</filename></title>
653
654 <para>
655 This directory contains architecture-specific work sub-directories
656 for packages built by BitBake.
657 All tasks execute from the appropriate work directory.
658 For example, the source for a particular package is unpacked,
659 patched, configured and compiled all within its own work directory.
660 Within the work directory, organization is based on the package group
661 and version for which the source is being compiled
662 as defined by the
663 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
664 </para>
665
666 <para>
667 It is worth considering the structure of a typical work directory.
668 As an example, consider <filename>linux-yocto-kernel-3.0</filename>
669 on the machine <filename>qemux86</filename>
670 built within the Yocto Project.
671 For this package, a work directory of
672 <filename>tmp/work/qemux86-poky-linux/linux-yocto/3.0+git1+&lt;.....&gt;</filename>,
673 referred to as the
674 <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>, is created.
675 Within this directory, the source is unpacked to
676 <filename>linux-qemux86-standard-build</filename> and then patched by Quilt.
677 (See the
678 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-a-quilt-workflow'>Using a Quilt Flow</ulink>"
679 section in the Yocto Project Development Manual for more information.)
680 Within the <filename>linux-qemux86-standard-build</filename> directory,
681 standard Quilt directories <filename>linux-3.0/patches</filename>
682 and <filename>linux-3.0/.pc</filename> are created,
683 and standard Quilt commands can be used.
684 </para>
685
686 <para>
687 There are other directories generated within <filename>WORKDIR</filename>.
688 The most important directory is <filename>WORKDIR/temp/</filename>,
689 which has log files for each task (<filename>log.do_*.pid</filename>)
690 and contains the scripts BitBake runs for each task
691 (<filename>run.do_*.pid</filename>).
692 The <filename>WORKDIR/image/</filename> directory is where "make
693 install" places its output that is then split into sub-packages
694 within <filename>WORKDIR/packages-split/</filename>.
695 </para>
696 </section>
697</section>
698
699<section id='structure-meta'>
700 <title>The Metadata - <filename>meta/</filename></title>
701
702 <para>
703 As mentioned previously,
704 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> is the core
705 of the Yocto Project.
706 Metadata has several important subdivisions:
707 </para>
708
709 <section id='structure-meta-classes'>
710 <title><filename>meta/classes/</filename></title>
711
712 <para>
713 This directory contains the <filename>*.bbclass</filename> files.
714 Class files are used to abstract common code so it can be reused by multiple
715 packages.
716 Every package inherits the <filename>base.bbclass</filename> file.
717 Examples of other important classes are <filename>autotools.bbclass</filename>, which
718 in theory allows any Autotool-enabled package to work with the Yocto Project with minimal effort.
719 Another example is <filename>kernel.bbclass</filename> that contains common code and functions
720 for working with the Linux kernel.
721 Functions like image generation or packaging also have their specific class files
722 such as <filename>image.bbclass</filename>, <filename>rootfs_*.bbclass</filename> and
723 <filename>package*.bbclass</filename>.
724 </para>
725
726 <para>
727 For reference information on classes, see the
728 "<link linkend='ref-classes'>Classes</link>" chapter.
729 </para>
730 </section>
731
732 <section id='structure-meta-conf'>
733 <title><filename>meta/conf/</filename></title>
734
735 <para>
736 This directory contains the core set of configuration files that start from
737 <filename>bitbake.conf</filename> and from which all other configuration
738 files are included.
739 See the include statements at the end of the
740 <filename>bitbake.conf</filename> file and you will note that even
741 <filename>local.conf</filename> is loaded from there.
742 While <filename>bitbake.conf</filename> sets up the defaults, you can often override
743 these by using the (<filename>local.conf</filename>) file, machine file or
744 the distribution configuration file.
745 </para>
746 </section>
747
748 <section id='structure-meta-conf-machine'>
749 <title><filename>meta/conf/machine/</filename></title>
750
751 <para>
752 This directory contains all the machine configuration files.
753 If you set <filename>MACHINE = "qemux86"</filename>,
754 the OpenEmbedded build system looks for a <filename>qemux86.conf</filename> file in this
755 directory.
756 The <filename>include</filename> directory contains various data common to multiple machines.
757 If you want to add support for a new machine to the Yocto Project, look in this directory.
758 </para>
759 </section>
760
761 <section id='structure-meta-conf-distro'>
762 <title><filename>meta/conf/distro/</filename></title>
763
764 <para>
765 The contents of this directory controls any distribution-specific
766 configurations.
767 For the Yocto Project, the <filename>defaultsetup.conf</filename> is the main file here.
768 This directory includes the versions and the
769 <filename>SRCDATE</filename> definitions for applications that are configured here.
770 An example of an alternative configuration might be <filename>poky-bleeding.conf</filename>.
771 Although this file mainly inherits its configuration from Poky.
772 </para>
773 </section>
774
775 <section id='structure-meta-files'>
776 <title><filename>meta/files/</filename></title>
777
778 <para>
779 This directory contains common license files and several text files
780 used by the build system.
781 The text files contain minimal device information and
782 lists of files and directories with knows permissions.
783 </para>
784 </section>
785
786 <section id='structure-meta-lib'>
787 <title><filename>meta/lib/</filename></title>
788
789 <para>
790 This directory contains OpenEmbedded Python library code
791 used during the build process.
792 </para>
793 </section>
794
795 <section id='structure-meta-recipes-bsp'>
796 <title><filename>meta/recipes-bsp/</filename></title>
797
798 <para>
799 This directory contains anything linking to specific hardware or hardware
800 configuration information such as "u-boot" and "grub".
801 </para>
802 </section>
803
804 <section id='structure-meta-recipes-connectivity'>
805 <title><filename>meta/recipes-connectivity/</filename></title>
806
807 <para>
808 This directory contains libraries and applications related to communication with other devices.
809 </para>
810 </section>
811
812 <section id='structure-meta-recipes-core'>
813 <title><filename>meta/recipes-core/</filename></title>
814
815 <para>
816 This directory contains what is needed to build a basic working Linux image
817 including commonly used dependencies.
818 </para>
819 </section>
820
821 <section id='structure-meta-recipes-devtools'>
822 <title><filename>meta/recipes-devtools/</filename></title>
823
824 <para>
825 This directory contains tools that are primarily used by the build system.
826 The tools, however, can also be used on targets.
827 </para>
828 </section>
829
830 <section id='structure-meta-recipes-extended'>
831 <title><filename>meta/recipes-extended/</filename></title>
832
833 <para>
834 This directory contains non-essential applications that add features compared to the
835 alternatives in core.
836 You might need this directory for full tool functionality or for Linux Standard Base (LSB)
837 compliance.
838 </para>
839 </section>
840
841 <section id='structure-meta-recipes-gnome'>
842 <title><filename>meta/recipes-gnome/</filename></title>
843
844 <para>
845 This directory contains all things related to the GTK+ application framework.
846 </para>
847 </section>
848
849 <section id='structure-meta-recipes-graphics'>
850 <title><filename>meta/recipes-graphics/</filename></title>
851
852 <para>
853 This directory contains X and other graphically related system libraries
854 </para>
855 </section>
856
857 <section id='structure-meta-recipes-kernel'>
858 <title><filename>meta/recipes-kernel/</filename></title>
859
860 <para>
861 This directory contains the kernel and generic applications and libraries that
862 have strong kernel dependencies.
863 </para>
864 </section>
865
866 <section id='structure-meta-recipes-lsb4'>
867 <title><filename>meta/recipes-lsb4/</filename></title>
868
869 <para>
870 This directory contains recipes specifically added to support
871 the Linux Standard Base (LSB) version 4.x.
872 </para>
873 </section>
874
875 <section id='structure-meta-recipes-multimedia'>
876 <title><filename>meta/recipes-multimedia/</filename></title>
877
878 <para>
879 This directory contains codecs and support utilities for audio, images and video.
880 </para>
881 </section>
882
883 <section id='structure-meta-recipes-qt'>
884 <title><filename>meta/recipes-qt/</filename></title>
885
886 <para>
887 This directory contains all things related to the Qt application framework.
888 </para>
889 </section>
890
891 <section id='structure-meta-recipes-rt'>
892 <title><filename>meta/recipes-rt/</filename></title>
893
894 <para>
895 This directory contains package and image recipes for using and testing
896 the <filename>PREEMPT_RT</filename> kernel.
897 </para>
898 </section>
899
900 <section id='structure-meta-recipes-sato'>
901 <title><filename>meta/recipes-sato/</filename></title>
902
903 <para>
904 This directory contains the Sato demo/reference UI/UX and its associated applications
905 and configuration data.
906 </para>
907 </section>
908
909 <section id='structure-meta-recipes-support'>
910 <title><filename>meta/recipes-support/</filename></title>
911
912 <para>
913 This directory contains recipes used by other recipes, but that are
914 not directly included in images (i.e. dependencies of other
915 recipes).
916 </para>
917 </section>
918
919 <section id='structure-meta-site'>
920 <title><filename>meta/site/</filename></title>
921
922 <para>
923 This directory contains a list of cached results for various architectures.
924 Because certain "autoconf" test results cannot be determined when cross-compiling due to
925 the tests not able to run on a live system, the information in this directory is
926 passed to "autoconf" for the various architectures.
927 </para>
928 </section>
929
930 <section id='structure-meta-recipes-txt'>
931 <title><filename>meta/recipes.txt</filename></title>
932
933 <para>
934 This file is a description of the contents of <filename>recipes-*</filename>.
935 </para>
936 </section>
937</section>
938
939</chapter>
940<!--
941vim: expandtab tw=80 ts=4
942-->
diff --git a/documentation/ref-manual/ref-style.css b/documentation/ref-manual/ref-style.css
new file mode 100644
index 0000000..e896a39
--- /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 0000000..2b0e890
--- /dev/null
+++ b/documentation/ref-manual/ref-variables.xml
@@ -0,0 +1,5929 @@
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-FEED_DEPLOYDIR_BASE_URI'>F</link>
25<!-- <link linkend='var-glossary-g'>G</link> -->
26 <link linkend='var-HOMEPAGE'>H</link>
27 <link linkend='var-IMAGE_BASENAME'>I</link>
28<!-- <link linkend='var-glossary-j'>J</link> -->
29 <link linkend='var-KARCH'>K</link>
30 <link linkend='var-LAYERDEPENDS'>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-glossary-q'>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_ENTRYPOINT'>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'>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'>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'>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'>Alternatives - <filename>update-alternatives.bbclass</filename></link>"
201 section.
202 </para>
203 </glossdef>
204 </glossentry>
205
206 <glossentry id='var-AUTHOR'><glossterm>AUTHOR</glossterm>
207 <glossdef>
208 <para>The email address used to contact the original author
209 or authors in order to send patches and forward bugs.</para>
210 </glossdef>
211 </glossentry>
212
213 <glossentry id='var-AUTOREV'><glossterm>AUTOREV</glossterm>
214 <glossdef>
215 <para>When <filename><link linkend='var-SRCREV'>SRCREV</link></filename>
216 is set to the value of this variable, it specifies to use the latest
217 source revision in the repository.
218 Here is an example:
219 <literallayout class='monospaced'>
220 SRCREV = "${AUTOREV}"
221 </literallayout>
222 </para>
223 </glossdef>
224 </glossentry>
225
226 </glossdiv>
227
228 <glossdiv id='var-glossary-b'><title>B</title>
229
230 <glossentry id='var-B'><glossterm>B</glossterm>
231 <glossdef>
232 <para>
233 The directory within the
234 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
235 in which the OpenEmbedded build system places generated
236 objects during a recipe's build process.
237 By default, this directory is the same as the <link linkend='var-S'><filename>S</filename></link>
238 directory, which is defined as:
239 <literallayout class='monospaced'>
240 S = "${WORKDIR}/${BP}/"
241 </literallayout>
242 You can separate the (<filename>S</filename>) directory
243 and the directory pointed to by the <filename>B</filename>
244 variable.
245 Most Autotools-based recipes support separating these
246 directories.
247 The build system defaults to using separate directories for
248 <filename>gcc</filename> and some kernel recipes.
249 </para>
250 </glossdef>
251 </glossentry>
252
253 <glossentry id='var-BAD_RECOMMENDATIONS'><glossterm>BAD_RECOMMENDATIONS</glossterm>
254 <glossdef>
255 <para>
256 Lists "recommended-only" packages to not install.
257 Recommended-only packages are packages installed only
258 through the
259 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
260 variable.
261 You can prevent any of these "recommended" packages from
262 being installed by listing them with the
263 <filename>BAD_RECOMMENDATIONS</filename> variable:
264 <literallayout class='monospaced'>
265 BAD_RECOMMENDATIONS = "&lt;package_name&gt; &lt;package_name&gt; &lt;package_name&gt; ..."
266 </literallayout>
267 You can set this variable globally in your
268 <filename>local.conf</filename> file or you can attach it to
269 a specific image recipe by using the recipe name override:
270 <literallayout class='monospaced'>
271 BAD_RECOMMENDATIONS_pn-&lt;target_image&gt; = "&lt;package_name&gt;"
272 </literallayout>
273 </para>
274
275 <para>
276 It is important to realize that if you choose to not install
277 packages using this variable and some other packages are
278 dependent on them (i.e. listed in a recipe's
279 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
280 variable), the OpenEmbedded build system ignores your
281 request and will install the packages to avoid dependency
282 errors.
283 </para>
284
285 <para>
286 Support for this variable exists only when using the
287 IPK and RPM packaging backend.
288 Support does not exist for DEB.
289 </para>
290
291 <para>
292 See the
293 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>
294 and the
295 <link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
296 variables for related information.
297 </para>
298 </glossdef>
299 </glossentry>
300
301 <glossentry id='var-BB_DANGLINGAPPENDS_WARNONLY'><glossterm>BB_DANGLINGAPPENDS_WARNONLY</glossterm>
302 <glossdef>
303 <para>
304 Defines how BitBake handles situations where an append
305 file (<filename>.bbappend</filename>) has no
306 corresponding recipe file (<filename>.bb</filename>).
307 This condition often occurs when layers get out of sync
308 (e.g. <filename>oe-core</filename> bumps a
309 recipe version and the old recipe no longer exists and the
310 other layer has not been updated to the new version
311 of the recipe yet).
312 </para>
313
314 <para>
315 The default fatal behavior is safest because it is
316 the sane reaction given something is out of sync.
317 It is important to realize when your changes are no longer
318 being applied.
319 </para>
320
321 <para>
322 You can change the default behavior by setting this
323 variable to "1" in the <filename>local.conf</filename>
324 file in the
325 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
326 as follows:
327 <literallayout class='monospaced'>
328 BB_DANGLINGAPPENDS_WARNONLY = "1"
329 </literallayout>
330 </para>
331 </glossdef>
332 </glossentry>
333
334 <glossentry id='var-BB_DISKMON_DIRS'><glossterm>BB_DISKMON_DIRS</glossterm>
335 <glossdef>
336 <para>
337 Monitors disk space and available inodes during the build
338 and allows you to control the build based on these
339 parameters.
340 </para>
341
342 <para>
343 Disk space monitoring is disabled by default.
344 To enable monitoring, add the <filename>BB_DISKMON_DIRS</filename>
345 variable to your <filename>conf/local.conf</filename> file found in the
346 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
347 Use the following form:
348 <literallayout class='monospaced'>
349 BB_DISKMON_DIRS = "&lt;action&gt;,&lt;dir&gt;,&lt;threshold&gt; [...]"
350
351 where:
352
353 &lt;action&gt; is:
354 ABORT: Immediately abort the build when
355 a threshold is broken.
356 STOPTASKS: Stop the build after the currently
357 executing tasks have finished when
358 a threshold is broken.
359 WARN: Issue a warning but continue the
360 build when a threshold is broken.
361 Subsequent warnings are issued as
362 defined by the
363 <link linkend='var-BB_DISKMON_WARNINTERVAL'>BB_DISKMON_WARNINTERVAL</link> variable,
364 which must be defined in the
365 conf/local.conf file.
366
367 &lt;dir&gt; is:
368 Any directory you choose. You can specify one or
369 more directories to monitor by separating the
370 groupings with a space. If two directories are
371 on the same device, only the first directory
372 is monitored.
373
374 &lt;threshold&gt; is:
375 Either the minimum available disk space,
376 the minimum number of free inodes, or
377 both. You must specify at least one. To
378 omit one or the other, simply omit the value.
379 Specify the threshold using G, M, K for Gbytes,
380 Mbytes, and Kbytes, respectively. If you do
381 not specify G, M, or K, Kbytes is assumed by
382 default. Do not use GB, MB, or KB.
383 </literallayout>
384 </para>
385
386 <para>
387 Here are some examples:
388 <literallayout class='monospaced'>
389 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
390 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
391 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
392 </literallayout>
393 The first example works only if you also provide
394 the <link linkend='var-BB_DISKMON_WARNINTERVAL'><filename>BB_DISKMON_WARNINTERVAL</filename></link> variable
395 in the <filename>conf/local.conf</filename>.
396 This example causes the build system to immediately
397 abort when either the disk space in <filename>${TMPDIR}</filename> drops
398 below 1 Gbyte or the available free inodes drops below
399 100 Kbytes.
400 Because two directories are provided with the variable, the
401 build system also issue a
402 warning when the disk space in the
403 <filename>${SSTATE_DIR}</filename> directory drops
404 below 1 Gbyte or the number of free inodes drops
405 below 100 Kbytes.
406 Subsequent warnings are issued during intervals as
407 defined by the <filename>BB_DISKMON_WARNINTERVAL</filename>
408 variable.
409 </para>
410
411 <para>
412 The second example stops the build after all currently
413 executing tasks complete when the minimum disk space
414 in the <filename>${<link linkend='var-TMPDIR'>TMPDIR</link>}</filename>
415 directory drops below 1 Gbyte.
416 No disk monitoring occurs for the free inodes in this case.
417 </para>
418
419 <para>
420 The final example immediately aborts the build when the
421 number of free inodes in the <filename>${TMPDIR}</filename> directory
422 drops below 100 Kbytes.
423 No disk space monitoring for the directory itself occurs
424 in this case.
425 </para>
426 </glossdef>
427 </glossentry>
428
429 <glossentry id='var-BB_DISKMON_WARNINTERVAL'><glossterm>BB_DISKMON_WARNINTERVAL</glossterm>
430 <glossdef>
431 <para>
432 Defines the disk space and free inode warning intervals.
433 To set these intervals, define the variable in your
434 <filename>conf/local.conf</filename> file in the
435 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
436 </para>
437
438 <para>
439 If you are going to use the
440 <filename>BB_DISKMON_WARNINTERVAL</filename> variable, you must
441 also use the
442 <link linkend='var-BB_DISKMON_DIRS'><filename>BB_DISKMON_DIRS</filename></link> variable
443 and define its action as "WARN".
444 During the build, subsequent warnings are issued each time
445 disk space or number of free inodes further reduces by
446 the respective interval.
447 </para>
448
449 <para>
450 If you do not provide a <filename>BB_DISKMON_WARNINTERVAL</filename>
451 variable and you do use <filename>BB_DISKMON_DIRS</filename> with
452 the "WARN" action, the disk monitoring interval defaults to
453 the following:
454 <literallayout class='monospaced'>
455 BB_DISKMON_WARNINTERVAL = "50M,5K"
456 </literallayout>
457 </para>
458
459 <para>
460 When specifying the variable in your configuration file,
461 use the following form:
462 <literallayout class='monospaced'>
463 BB_DISKMON_WARNINTERVAL = "&lt;disk_space_interval&gt;,&lt;disk_inode_interval&gt;"
464
465 where:
466
467 &lt;disk_space_interval&gt; is:
468 An interval of memory expressed in either
469 G, M, or K for Gbytes, Mbytes, or Kbytes,
470 respectively. You cannot use GB, MB, or KB.
471
472 &lt;disk_inode_interval&gt; is:
473 An interval of free inodes expressed in either
474 G, M, or K for Gbytes, Mbytes, or Kbytes,
475 respectively. You cannot use GB, MB, or KB.
476 </literallayout>
477 </para>
478
479 <para>
480 Here is an example:
481 <literallayout class='monospaced'>
482 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
483 BB_DISKMON_WARNINTERVAL = "50M,5K"
484 </literallayout>
485 These variables cause the OpenEmbedded build system to
486 issue subsequent warnings each time the available
487 disk space further reduces by 50 Mbytes or the number
488 of free inodes further reduces by 5 Kbytes in the
489 <filename>${SSTATE_DIR}</filename> directory.
490 Subsequent warnings based on the interval occur each time
491 a respective interval is reached beyond the initial warning
492 (i.e. 1 Gbytes and 100 Kbytes).
493 </para>
494 </glossdef>
495 </glossentry>
496
497 <glossentry id='var-BB_GENERATE_MIRROR_TARBALLS'><glossterm>BB_GENERATE_MIRROR_TARBALLS</glossterm>
498 <glossdef>
499 <para>
500 Causes tarballs of the Git repositories to be placed in the
501 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
502 directory.
503 For performance reasons, creating and placing tarballs of
504 the Git repositories is not the default action by the
505 OpenEmbedded build system.
506 <literallayout class='monospaced'>
507 BB_GENERATE_MIRROR_TARBALLS = "1"
508 </literallayout>
509 Set this variable in your <filename>local.conf</filename>
510 file in the
511 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
512 </para>
513 </glossdef>
514 </glossentry>
515
516 <glossentry id='var-BB_NUMBER_THREADS'><glossterm>BB_NUMBER_THREADS</glossterm>
517 <glossdef>
518 <para>The maximum number of tasks BitBake should run in parallel at any one time.
519 If your host development system supports multiple cores, a good rule of thumb
520 is to set this variable to twice the number of cores.</para>
521 </glossdef>
522 </glossentry>
523
524 <glossentry id='var-BBCLASSEXTEND'><glossterm>BBCLASSEXTEND</glossterm>
525 <glossdef>
526 <para>
527 Allows you to extend a recipe so that it builds variants of the software.
528 Common variants for recipes exist such as "natives" like <filename>quilt-native</filename>,
529 which is a copy of Quilt built to run on the build system;
530 "crosses" such as <filename>gcc-cross</filename>,
531 which is a compiler built to run on the build machine but produces binaries
532 that run on the target <link linkend='var-MACHINE'><filename>MACHINE</filename></link>;
533 "nativesdk", which targets the SDK machine instead of <filename>MACHINE</filename>;
534 and "mulitlibs" in the form "<filename>multilib:&lt;multilib_name&gt;</filename>".
535 </para>
536
537 <para>
538 To build a different variant of the recipe with a minimal amount of code, it usually
539 is as simple as adding the following to your recipe:
540 <literallayout class='monospaced'>
541 BBCLASSEXTEND =+ "native nativesdk"
542 BBCLASSEXTEND =+ "multilib:&lt;multilib_name&gt;"
543 </literallayout>
544 </para>
545 </glossdef>
546 </glossentry>
547
548 <glossentry id='var-BBFILE_COLLECTIONS'><glossterm>BBFILE_COLLECTIONS</glossterm>
549 <glossdef>
550 <para>Lists the names of configured layers.
551 These names are used to find the other <filename>BBFILE_*</filename>
552 variables.
553 Typically, each layer will append its name to this variable in its
554 <filename>conf/layer.conf</filename> file.
555 </para>
556 </glossdef>
557 </glossentry>
558
559 <glossentry id='var-BBFILE_PATTERN'><glossterm>BBFILE_PATTERN</glossterm>
560 <glossdef>
561 <para>Variable that expands to match files from
562 <link linkend='var-BBFILES'><filename>BBFILES</filename></link>
563 in a particular layer.
564 This variable is used in the <filename>conf/layer.conf</filename> file and must
565 be suffixed with the name of the specific layer (e.g.
566 <filename>BBFILE_PATTERN_emenlow</filename>).</para>
567 </glossdef>
568 </glossentry>
569
570 <glossentry id='var-BBFILE_PRIORITY'><glossterm>BBFILE_PRIORITY</glossterm>
571 <glossdef>
572 <para>Assigns the priority for recipe files in each layer.</para>
573 <para>This variable is useful in situations where the same recipe appears in
574 more than one layer.
575 Setting this variable allows you to prioritize a
576 layer against other layers that contain the same recipe - effectively
577 letting you control the precedence for the multiple layers.
578 The precedence established through this variable stands regardless of a
579 recipe's version
580 (<link linkend='var-PV'><filename>PV</filename></link> variable).
581 For example, a layer that has a recipe with a higher <filename>PV</filename> value but for
582 which the <filename>BBFILE_PRIORITY</filename> is set to have a lower precedence still has a
583 lower precedence.</para>
584 <para>A larger value for the <filename>BBFILE_PRIORITY</filename> variable results in a higher
585 precedence.
586 For example, the value 6 has a higher precedence than the value 5.
587 If not specified, the <filename>BBFILE_PRIORITY</filename> variable is set based on layer
588 dependencies (see the
589 <filename><link linkend='var-LAYERDEPENDS'>LAYERDEPENDS</link></filename> variable for
590 more information.
591 The default priority, if unspecified
592 for a layer with no dependencies, is the lowest defined priority + 1
593 (or 1 if no priorities are defined).</para>
594 <tip>
595 You can use the command <filename>bitbake-layers show-layers</filename> to list
596 all configured layers along with their priorities.
597 </tip>
598 </glossdef>
599 </glossentry>
600
601 <glossentry id='var-BBFILES'><glossterm>BBFILES</glossterm>
602 <glossdef>
603 <para>List of recipe files used by BitBake to build software.</para>
604 </glossdef>
605 </glossentry>
606
607 <glossentry id='var-BBINCLUDELOGS'><glossterm>BBINCLUDELOGS</glossterm>
608 <glossdef>
609 <para>Variable that controls how BitBake displays logs on build failure.</para>
610 </glossdef>
611 </glossentry>
612
613 <glossentry id='var-BBLAYERS'><glossterm>BBLAYERS</glossterm>
614 <glossdef>
615 <para>Lists the layers to enable during the build.
616 This variable is defined in the <filename>bblayers.conf</filename> configuration
617 file in the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
618 Here is an example:
619 <literallayout class='monospaced'>
620 BBLAYERS = " \
621 /home/scottrif/poky/meta \
622 /home/scottrif/poky/meta-yocto \
623 /home/scottrif/poky/meta-yocto-bsp \
624 /home/scottrif/poky/meta-mykernel \
625 "
626
627 BBLAYERS_NON_REMOVABLE ?= " \
628 /home/scottrif/poky/meta \
629 /home/scottrif/poky/meta-yocto \
630 "
631 </literallayout>
632 This example enables four layers, one of which is a custom, user-defined layer
633 named <filename>meta-mykernel</filename>.
634 </para>
635 </glossdef>
636 </glossentry>
637
638 <glossentry id='var-BBLAYERS_NON_REMOVABLE'><glossterm>BBLAYERS_NON_REMOVABLE</glossterm>
639 <glossdef>
640 <para>Lists core layers that cannot be removed from the
641 <filename>bblayers.conf</filename> file during a build
642 using the
643 <ulink url='https://www.yoctoproject.org/tools-resources/projects/hob'>Hob</ulink>.
644 <note>
645 When building an image outside of Hob, this variable
646 is ignored.
647 </note>
648 In order for BitBake to build your image using Hob, your
649 <filename>bblayers.conf</filename> file must include the
650 <filename>meta</filename> and <filename>meta-yocto</filename>
651 core layers.
652 Here is an example that shows these two layers listed in
653 the <filename>BBLAYERS_NON_REMOVABLE</filename> statement:
654 <literallayout class='monospaced'>
655 BBLAYERS = " \
656 /home/scottrif/poky/meta \
657 /home/scottrif/poky/meta-yocto \
658 /home/scottrif/poky/meta-yocto-bsp \
659 /home/scottrif/poky/meta-mykernel \
660 "
661
662 BBLAYERS_NON_REMOVABLE ?= " \
663 /home/scottrif/poky/meta \
664 /home/scottrif/poky/meta-yocto \
665 "
666 </literallayout>
667 </para>
668 </glossdef>
669 </glossentry>
670
671 <glossentry id='var-BBMASK'><glossterm>BBMASK</glossterm>
672 <glossdef>
673 <para>
674 Prevents BitBake from processing recipes and recipe
675 append files.
676 Use the <filename>BBMASK</filename> variable from within the
677 <filename>conf/local.conf</filename> file found
678 in the
679 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
680 </para>
681
682 <para>
683 You can use the <filename>BBMASK</filename> variable
684 to "hide" these <filename>.bb</filename> and
685 <filename>.bbappend</filename> files.
686 BitBake ignores any recipe or recipe append files that
687 match the expression.
688 It is as if BitBake does not see them at all.
689 Consequently, matching files are not parsed or otherwise
690 used by BitBake.</para>
691 <para>
692 The value you provide is passed to Python's regular
693 expression compiler.
694 The expression is compared against the full paths to
695 the files.
696 For complete syntax information, see Python's
697 documentation at
698 <ulink url='http://docs.python.org/release/2.3/lib/re-syntax.html'></ulink>.
699 </para>
700
701 <para>
702 The following example uses a complete regular expression
703 to tell BitBake to ignore all recipe and recipe append
704 files in the <filename>meta-ti/recipes-misc/</filename>
705 directory:
706 <literallayout class='monospaced'>
707 BBMASK = "meta-ti/recipes-misc/"
708 </literallayout>
709 If you want to mask out multiple directories or recipes,
710 use the vertical bar to separate the regular expression
711 fragments.
712 This next example masks out multiple directories and
713 individual recipes:
714 <literallayout class='monospaced'>
715 BBMASK = "meta-ti/recipes-misc/|meta-ti/recipes-ti/packagegroup/"
716 BBMASK .= "|.*meta-oe/recipes-support/"
717 BBMASK .= "|.*openldap"
718 BBMASK .= "|.*opencv"
719 BBMASK .= "|.*lzma"
720 </literallayout>
721 Notice how the vertical bar is used to append the fragments.
722 <note>
723 When specifying a directory name, use the trailing
724 slash character to ensure you match just that directory
725 name.
726 </note>
727 </para>
728 </glossdef>
729 </glossentry>
730
731 <glossentry id='var-BBPATH'><glossterm>BBPATH</glossterm>
732 <glossdef>
733 <para>
734 Used by BitBake to locate
735 <filename>.bbclass</filename> and configuration files.
736 This variable is analogous to the
737 <filename>PATH</filename> variable.
738 <note>
739 If you run BitBake from a directory outside of the
740 <ulink url='&YOCTO_DOCS_DEV_URL;build-directory'>Build Directory</ulink>,
741 you must be sure to set
742 <filename>BBPATH</filename> to point to the
743 Build Directory.
744 Set the variable as you would any environment variable
745 and then run BitBake:
746 <literallayout class='monospaced'>
747 $ BBPATH = "&lt;build_directory&gt;"
748 $ export BBPATH
749 $ bitbake &lt;target&gt;
750 </literallayout>
751 </note>
752 </para>
753 </glossdef>
754 </glossentry>
755
756 <glossentry id='var-BBSERVER'><glossterm>BBSERVER</glossterm>
757 <glossdef>
758 <para>
759 Points to the server that runs memory-resident BitBake.
760 This variable is set by the
761 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
762 setup script and should not be hand-edited.
763 The variable is only used when you employ memory-resident
764 BitBake.
765 The setup script exports the value as follows:
766 <literallayout class='monospaced'>
767 export BBSERVER=localhost:$port
768 </literallayout>
769 For more information on how the
770 <filename>BBSERVER</filename> is used, see the
771 <filename>oe-init-build-env-memres</filename> script, which
772 is located in the
773 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
774 </para>
775 </glossdef>
776 </glossentry>
777
778 <glossentry id='var-BINCONFIG_GLOB'><glossterm>BINCONFIG_GLOB</glossterm>
779 <glossdef>
780 <para>
781 When inheriting <filename>binconfig.bbclass</filename>
782 from a recipe, this variable specifies a wildcard for
783 configuration scripts that need editing.
784 The scripts are edited to correct any paths that have been
785 set up during compilation so that they are correct for
786 use when installed into the sysroot and called by the
787 build processes of other recipes.
788 </para>
789
790 <para>
791 For more information on how this variable works, see
792 <filename>meta/classes/binconfig.bbclass</filename> in the
793 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
794 You can also find general information on the class in the
795 "<link linkend='ref-classes-binconfig'><filename>binconfig.bbclass</filename></link>"
796 section.
797 </para>
798 </glossdef>
799 </glossentry>
800
801 <glossentry id='var-BP'><glossterm>BP</glossterm>
802 <glossdef>
803 <para>The base recipe name and version but without any special
804 recipe name suffix (i.e. <filename>-native</filename>, <filename>lib64-</filename>,
805 and so forth).
806 <filename>BP</filename> is comprised of the following:
807 <literallayout class="monospaced">
808 ${BPN}-${PV}
809 </literallayout></para>
810 </glossdef>
811 </glossentry>
812
813 <glossentry id='var-BPN'><glossterm>BPN</glossterm>
814 <glossdef>
815 <para>The bare name of the recipe.
816 This variable is a version of the <link linkend='var-PN'><filename>PN</filename></link> variable
817 but removes common suffixes such as "-native" and "-cross" as well
818 as removes common prefixes such as multilib's "lib64-" and "lib32-".
819 The exact list of suffixes removed is specified by the
820 <link linkend='var-SPECIAL_PKGSUFFIX'><filename>SPECIAL_PKGSUFFIX</filename></link> variable.
821 The exact list of prefixes removed is specified by the
822 <link linkend='var-MLPREFIX'><filename>MLPREFIX</filename></link> variable.
823 Prefixes are removed for <filename>multilib</filename>
824 and <filename>nativesdk</filename> cases.</para>
825 </glossdef>
826 </glossentry>
827
828 <glossentry id='var-BUILDDIR'><glossterm>BUILDDIR</glossterm>
829 <glossdef>
830 <para>
831 Points to the location of the
832 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
833 You can define this directory indirectly through the
834 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
835 and
836 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
837 scripts by passing in a Build Directory path when you run
838 the scripts.
839 If you run the scripts and do not provide a Build Directory
840 path, the <filename>BUILDDIR</filename> defaults to
841 <filename>build</filename> in the current directory.
842 </para>
843 </glossdef>
844 </glossentry>
845
846 <glossentry id='var-BUSYBOX_SPLIT_SUID'><glossterm>BUSYBOX_SPLIT_SUID</glossterm>
847 <glossdef>
848 <para>
849 For the BusyBox recipe, specifies whether to split the
850 output executable file into two parts: one for features
851 that require <filename>setuid root</filename>, and one for
852 the remaining features (i.e. those that do not require
853 <filename>setuid root</filename>).
854 </para>
855
856 <para>
857 The <filename>BUSYBOX_SPLIT_SUID</filename> variable
858 defaults to "1", which results in a single output
859 executable file.
860 Set the variable to "0" to split the output file.
861 </para>
862 </glossdef>
863 </glossentry>
864
865 </glossdiv>
866
867 <glossdiv id='var-glossary-c'><title>C</title>
868
869 <glossentry id='var-CFLAGS'><glossterm>CFLAGS</glossterm>
870 <glossdef>
871 <para>
872 Flags passed to the C compiler for the target system.
873 This variable evaluates to the same as
874 <filename><link linkend='var-TARGET_CFLAGS'>TARGET_CFLAGS</link></filename>.
875 </para>
876 </glossdef>
877 </glossentry>
878
879 <glossentry id='var-COMBINED_FEATURES'><glossterm>COMBINED_FEATURES</glossterm>
880 <glossdef>
881 <para>A set of features common between
882 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
883 and <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
884 See the glossary descriptions for these variables for more information.</para>
885 </glossdef>
886 </glossentry>
887
888 <glossentry id='var-COMMON_LICENSE_DIR'><glossterm>COMMON_LICENSE_DIR</glossterm>
889 <glossdef>
890 <para>
891 Points to <filename>meta/files/common-licenses</filename>
892 in the
893 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
894 which is where generic license files reside.
895 </para>
896 </glossdef>
897 </glossentry>
898
899 <glossentry id='var-COMPATIBLE_HOST'><glossterm>COMPATIBLE_HOST</glossterm>
900 <glossdef>
901 <para>A regular expression that resolves to one or more hosts
902 (when the recipe is native) or one or more targets (when
903 the recipe is non-native) with which a recipe is compatible.
904 The regular expression is matched against
905 <link linkend="var-HOST_SYS"><filename>HOST_SYS</filename></link>.
906 You can use the variable to stop recipes from being built
907 for classes of systems with which the recipes are not
908 compatible.
909 Stopping these builds is particularly useful with kernels.
910 The variable also helps to increase parsing speed
911 since the build system skips parsing recipes not
912 compatible with the current system.</para>
913 </glossdef>
914 </glossentry>
915
916 <glossentry id='var-COMPATIBLE_MACHINE'><glossterm>COMPATIBLE_MACHINE</glossterm>
917 <glossdef>
918 <para>A regular expression that resolves to one or more
919 target machines with which a recipe is compatible.
920 The regular expression is matched against
921 <link linkend="var-MACHINEOVERRIDES"><filename>MACHINEOVERRIDES</filename></link>.
922 You can use the variable to stop recipes from being built
923 for machines with which the recipes are not compatible.
924 Stopping these builds is particularly useful with kernels.
925 The variable also helps to increase parsing speed
926 since the build system skips parsing recipes not
927 compatible with the current machine.</para>
928 </glossdef>
929 </glossentry>
930
931 <glossentry id='var-COMPLEMENTARY_GLOB'><glossterm>COMPLEMENTARY_GLOB</glossterm>
932 <glossdef>
933 <para>
934 Defines wildcards to match when installing a list of
935 complementary packages for all the packages explicitly
936 (or implicitly) installed in an image.
937 The resulting list of complementary packages is associated
938 with an item that can be added to
939 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
940 An example usage of this is the "dev-pkgs" item that when
941 added to <filename>IMAGE_FEATURES</filename> will
942 install -dev packages (containing headers and other
943 development files) for every package in the image.
944 </para>
945
946 <para>
947 To add a new feature item pointing to a wildcard, use a
948 variable flag to specify the feature item name and
949 use the value to specify the wildcard.
950 Here is an example:
951 <literallayout class='monospaced'>
952 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
953 </literallayout>
954 </para>
955 </glossdef>
956 </glossentry>
957
958 <glossentry id='var-CONFFILES'><glossterm>CONFFILES</glossterm>
959 <glossdef>
960 <para>
961 Identifies editable or configurable files that are part of a package.
962 If the Package Management System (PMS) is being used to update
963 packages on the target system, it is possible that
964 configuration files you have changed after the original installation
965 and that you now want to remain unchanged are overwritten.
966 In other words, editable files might exist in the package that you do not
967 want reset as part of the package update process.
968 You can use the <filename>CONFFILES</filename> variable to list the files in the
969 package that you wish to prevent the PMS from overwriting during this update process.
970 </para>
971
972 <para>
973 To use the <filename>CONFFILES</filename> variable, provide a package name
974 override that identifies the resulting package.
975 Then, provide a space-separated list of files.
976 Here is an example:
977 <literallayout class='monospaced'>
978 CONFFILES_${PN} += "${sysconfdir}/file1 \
979 ${sysconfdir}/file2 ${sysconfdir}/file3"
980 </literallayout>
981 </para>
982
983 <para>
984 A relationship exists between the <filename>CONFFILES</filename> and
985 <filename><link linkend='var-FILES'>FILES</link></filename> variables.
986 The files listed within <filename>CONFFILES</filename> must be a subset of
987 the files listed within <filename>FILES</filename>.
988 Because the configuration files you provide with <filename>CONFFILES</filename>
989 are simply being identified so that the PMS will not overwrite them,
990 it makes sense that
991 the files must already be included as part of the package through the
992 <filename>FILES</filename> variable.
993 </para>
994
995 <note>
996 When specifying paths as part of the <filename>CONFFILES</filename> variable,
997 it is good practice to use appropriate path variables.
998 For example, <filename>${sysconfdir}</filename> rather than
999 <filename>/etc</filename> or <filename>${bindir}</filename> rather
1000 than <filename>/usr/bin</filename>.
1001 You can find a list of these variables at the top of the
1002 <filename>meta/conf/bitbake.conf</filename> file in the
1003 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1004 </note>
1005 </glossdef>
1006 </glossentry>
1007
1008 <glossentry id='var-CONFIG_SITE'><glossterm>CONFIG_SITE</glossterm>
1009 <glossdef>
1010 <para>
1011 A list of files that contains <filename>autoconf</filename> test results relevant
1012 to the current build.
1013 This variable is used by the Autotools utilities when running
1014 <filename>configure</filename>.
1015 </para>
1016 </glossdef>
1017 </glossentry>
1018
1019 <glossentry id='var-CORE_IMAGE_EXTRA_INSTALL'><glossterm>CORE_IMAGE_EXTRA_INSTALL</glossterm>
1020 <glossdef>
1021 <para>
1022 Specifies the list of packages to be added to the image.
1023 You should only set this variable in the
1024 <filename>local.conf</filename> configuration file found
1025 in the
1026 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
1027 </para>
1028
1029 <para>
1030 This variable replaces <filename>POKY_EXTRA_INSTALL</filename>, which is no longer supported.
1031 </para>
1032 </glossdef>
1033 </glossentry>
1034
1035 <glossentry id='var-COREBASE'><glossterm>COREBASE</glossterm>
1036 <glossdef>
1037 <para>
1038 Specifies the parent directory of the OpenEmbedded
1039 Core Metadata layer (i.e. <filename>meta</filename>).
1040 </para>
1041
1042 <para>
1043 It is an important distinction that
1044 <filename>COREBASE</filename> points to the parent of this
1045 layer and not the layer itself.
1046 Consider an example where you have cloned the Poky Git
1047 repository and retained the <filename>poky</filename>
1048 name for your local copy of the repository.
1049 In this case, <filename>COREBASE</filename> points to
1050 the <filename>poky</filename> folder because it is the
1051 parent directory of the <filename>poky/meta</filename>
1052 layer.
1053 </para>
1054 </glossdef>
1055 </glossentry>
1056
1057 </glossdiv>
1058
1059 <glossdiv id='var-glossary-d'><title>D</title>
1060
1061 <glossentry id='var-D'><glossterm>D</glossterm>
1062 <glossdef>
1063 <para>The destination directory.</para>
1064 </glossdef>
1065 </glossentry>
1066
1067 <glossentry id='var-DATETIME'><glossterm>DATETIME</glossterm>
1068 <glossdef>
1069 <para>
1070 The date and time on which the current build started.
1071 The format is suitable for timestamps.
1072 </para>
1073 </glossdef>
1074 </glossentry>
1075
1076 <glossentry id='var-DEBUG_BUILD'><glossterm>DEBUG_BUILD</glossterm>
1077 <glossdef>
1078 <para>
1079 Specifies to build packages with debugging information.
1080 This influences the value of the
1081 <filename><link linkend='var-SELECTED_OPTIMIZATION'>SELECTED_OPTIMIZATION</link></filename>
1082 variable.
1083 </para>
1084 </glossdef>
1085 </glossentry>
1086
1087 <glossentry id='var-DEBUG_OPTIMIZATION'><glossterm>DEBUG_OPTIMIZATION</glossterm>
1088 <glossdef>
1089 <para>
1090 The options to pass in
1091 <filename><link linkend='var-TARGET_CFLAGS'>TARGET_CFLAGS</link></filename>
1092 and <filename><link linkend='var-CFLAGS'>CFLAGS</link></filename> when compiling
1093 a system for debugging.
1094 This variable defaults to "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1095 </para>
1096 </glossdef>
1097 </glossentry>
1098
1099 <glossentry id='var-DEFAULT_PREFERENCE'><glossterm>DEFAULT_PREFERENCE</glossterm>
1100 <glossdef>
1101 <para>
1102 Specifies a weak bias for recipe selection priority.
1103 </para>
1104 <para>
1105 The most common usage of this is variable is to set
1106 it to "-1" within a recipe for a development version of a
1107 piece of software.
1108 Using the variable in this way causes the stable version
1109 of the recipe to build by default in the absence of
1110 <filename><link linkend='var-PREFERRED_VERSION'>PREFERRED_VERSION</link></filename>
1111 being used to build the development version.
1112 </para>
1113 <note>
1114 The bias provided by <filename>DEFAULT_PREFERENCE</filename>
1115 is weak and is overridden by
1116 <filename><link linkend='var-BBFILE_PRIORITY'>BBFILE_PRIORITY</link></filename>
1117 if that variable is different between two layers
1118 that contain different versions of the same recipe.
1119 </note>
1120 </glossdef>
1121 </glossentry>
1122
1123 <glossentry id='var-DEPENDS'><glossterm>DEPENDS</glossterm>
1124 <glossdef>
1125 <para>
1126 Lists a recipe's build-time dependencies
1127 (i.e. other recipe files).
1128 The system ensures that all the dependencies listed
1129 have been built and have their contents in the appropriate
1130 sysroots before the recipe's configure task is executed.
1131 </para>
1132
1133 <para>
1134 Consider this simple example for two recipes named "a" and
1135 "b" that produce similarly named packages.
1136 In this example, the <filename>DEPENDS</filename>
1137 statement appears in the "a" recipe:
1138 <literallayout class='monospaced'>
1139 DEPENDS = "b"
1140 </literallayout>
1141 Here, the dependency is such that the
1142 <filename>do_configure</filename> task for recipe "a"
1143 depends on the <filename>do_populate_sysroot</filename>
1144 task of recipe "b".
1145 This means anything that recipe "b" puts into sysroot
1146 is available when recipe "a" is configuring itself.
1147 </para>
1148
1149 <para>
1150 For information on runtime dependencies, see the
1151 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
1152 variable.
1153 </para>
1154 </glossdef>
1155 </glossentry>
1156
1157 <glossentry id='var-DEPLOY_DIR'><glossterm>DEPLOY_DIR</glossterm>
1158 <glossdef>
1159 <para>
1160 Points to the general area that the OpenEmbedded build
1161 system uses to place images, packages, SDKs and other output
1162 files that are ready to be used outside of the build system.
1163 By default, this directory resides within the
1164 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1165 as <filename>${TMPDIR}/deploy</filename>.
1166 </para>
1167
1168 <para>
1169 For more information on the structure of the Build
1170 Directory, see
1171 "<link linkend='structure-build'>The Build Directory - <filename>build/</filename></link>"
1172 section.
1173 For more detail on the contents of the
1174 <filename>deploy</filename> directory, see the
1175 "<link linkend='images-dev-environment'>Images</link>" and
1176 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
1177 sections.
1178 </para>
1179 </glossdef>
1180 </glossentry>
1181
1182 <glossentry id='var-DEPLOY_DIR_IMAGE'><glossterm>DEPLOY_DIR_IMAGE</glossterm>
1183 <glossdef>
1184 <para>
1185 Points to the area that the OpenEmbedded build system uses
1186 to place images and other associated output files that are
1187 ready to be deployed onto the target machine.
1188 The directory is machine-specific as it contains the
1189 <filename>${MACHINE}</filename> name.
1190 By default, this directory resides within the
1191 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1192 as <filename>${DEPLOY_DIR}/images/${MACHINE}/</filename>.
1193 </para>
1194
1195 <para>
1196 For more information on the structure of the Build
1197 Directory, see
1198 "<link linkend='structure-build'>The Build Directory - <filename>build/</filename></link>"
1199 section.
1200 For more detail on the contents of the
1201 <filename>deploy</filename> directory, see the
1202 "<link linkend='images-dev-environment'>Images</link>" and
1203 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
1204 sections.
1205 </para>
1206 </glossdef>
1207 </glossentry>
1208
1209 <glossentry id='var-DESCRIPTION'><glossterm>DESCRIPTION</glossterm>
1210 <glossdef>
1211 <para>The package description used by package managers.
1212 If not set, <filename>DESCRIPTION</filename> takes
1213 the value of the
1214 <link linkend='var-SUMMARY'><filename>SUMMARY</filename></link>
1215 variable.
1216 </para>
1217 </glossdef>
1218 </glossentry>
1219
1220 <glossentry id='var-DISTRO'><glossterm>DISTRO</glossterm>
1221 <glossdef>
1222 <para>
1223 The short name of the distribution.
1224 This variable corresponds to a file with the
1225 extension <filename>.conf</filename>
1226 located in a <filename>conf/distro</filename> directory
1227 within the
1228 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
1229 that contains the distribution configuration.
1230 The value must not contain spaces, and is typically all lower-case.
1231 </para>
1232 <para>
1233 If the variable is blank, a set of default configuration
1234 will be used, which is specified
1235 within <filename>meta/conf/distro/defaultsetup.conf</filename>.
1236 </para>
1237 </glossdef>
1238 </glossentry>
1239
1240 <glossentry id='var-DISTRO_EXTRA_RDEPENDS'><glossterm>DISTRO_EXTRA_RDEPENDS</glossterm>
1241 <glossdef>
1242 <para>
1243 Specifies a list of distro-specific packages to add to all images.
1244 This variable takes affect through
1245 <filename>packagegroup-base</filename> so the
1246 variable only really applies to the more full-featured
1247 images that include <filename>packagegroup-base</filename>.
1248 You can use this variable to keep distro policy out of
1249 generic images.
1250 As with all other distro variables, you set this variable
1251 in the distro <filename>.conf</filename> file.
1252 </para>
1253 </glossdef>
1254 </glossentry>
1255
1256 <glossentry id='var-DISTRO_EXTRA_RRECOMMENDS'><glossterm>DISTRO_EXTRA_RRECOMMENDS</glossterm>
1257 <glossdef>
1258 <para>
1259 Specifies a list of distro-specific packages to add to all images
1260 if the packages exist.
1261 The packages might not exist or be empty (e.g. kernel modules).
1262 The list of packages are automatically installed but you can
1263 remove them.
1264 </para>
1265 </glossdef>
1266 </glossentry>
1267
1268 <glossentry id='var-DISTRO_FEATURES'><glossterm>DISTRO_FEATURES</glossterm>
1269 <glossdef>
1270 <para>The features enabled for the distribution.
1271 For a list of supported features that ship with the
1272 Yocto Project, see the
1273 "<link linkend='ref-features-distro'>Distro</link>"
1274 section.
1275 </para>
1276 </glossdef>
1277 </glossentry>
1278
1279 <glossentry id='var-DISTRO_FEATURES_BACKFILL'><glossterm>DISTRO_FEATURES_BACKFILL</glossterm>
1280 <glossdef>
1281 <para>Features to be added to
1282 <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>
1283 if not also present in
1284 <filename><link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'>DISTRO_FEATURES_BACKFILL_CONSIDERED</link></filename>.
1285 </para>
1286
1287 <para>
1288 This variable is set in the <filename>meta/conf/bitbake.conf</filename> file.
1289 It is not intended to be user-configurable.
1290 It is best to just reference the variable to see which distro features are
1291 being backfilled for all distro configurations.
1292 See the <link linkend='ref-features-backfill'>Feature backfilling</link> section for
1293 more information.
1294 </para>
1295 </glossdef>
1296 </glossentry>
1297
1298 <glossentry id='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><glossterm>DISTRO_FEATURES_BACKFILL_CONSIDERED</glossterm>
1299 <glossdef>
1300 <para>Features from
1301 <filename><link linkend='var-DISTRO_FEATURES_BACKFILL'>DISTRO_FEATURES_BACKFILL</link></filename>
1302 that should not be backfilled (i.e. added to
1303 <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>)
1304 during the build.
1305 See the "<link linkend='ref-features-backfill'>Feature Backfilling</link>" section for
1306 more information.
1307 </para>
1308 </glossdef>
1309 </glossentry>
1310
1311 <glossentry id='var-DISTRO_NAME'><glossterm>DISTRO_NAME</glossterm>
1312 <glossdef>
1313 <para>The long name of the distribution.</para>
1314 </glossdef>
1315 </glossentry>
1316
1317 <glossentry id='var-DISTRO_PN_ALIAS'><glossterm>DISTRO_PN_ALIAS</glossterm>
1318 <glossdef>
1319 <para>Alias names used for the recipe in various Linux distributions.</para>
1320 <para>See the
1321 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-configuring-DISTRO_PN_ALIAS'>Handling
1322 a Package Name Alias</ulink>" section in the Yocto Project Development
1323 Manual for more information.</para>
1324 </glossdef>
1325 </glossentry>
1326
1327 <glossentry id='var-DISTRO_VERSION'><glossterm>DISTRO_VERSION</glossterm>
1328 <glossdef>
1329 <para>The version of the distribution.</para>
1330 </glossdef>
1331 </glossentry>
1332
1333 <glossentry id='var-DISTROOVERRIDES'><glossterm>DISTROOVERRIDES</glossterm>
1334 <glossdef>
1335 <para>
1336 This variable lists overrides specific to the current
1337 distribution.
1338 By default, the variable list includes the value of the
1339 <filename><link linkend='var-DISTRO'>DISTRO</link></filename>
1340 variable.
1341 You can extend the variable to apply any variable overrides
1342 you want as part of the distribution and are not
1343 already in <filename>OVERRIDES</filename> through
1344 some other means.
1345 </para>
1346 </glossdef>
1347 </glossentry>
1348
1349 <glossentry id='var-DL_DIR'><glossterm>DL_DIR</glossterm>
1350 <glossdef>
1351 <para>
1352 The central download directory used by the build process to
1353 store downloads.
1354 By default, <filename>DL_DIR</filename> gets files
1355 suitable for mirroring for everything except Git
1356 repositories.
1357 If you want tarballs of Git repositories, use the
1358 <link linkend='var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></link>
1359 variable.
1360 </para>
1361
1362 <para>
1363 You can set this directory by defining the
1364 <filename>DL_DIR</filename> variable in the
1365 <filename>conf/local.conf</filename> file.
1366 This directory is self-maintaining and you should not have
1367 to touch it.
1368 By default, the directory is <filename>downloads</filename>
1369 in the
1370 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
1371 <literallayout class='monospaced'>
1372 #DL_DIR ?= "${TOPDIR}/downloads"
1373 </literallayout>
1374 To specify a different download directory, simply remove
1375 the comment from the line and provide your directory.
1376 </para>
1377
1378 <para>
1379 During a first build, the system downloads many different
1380 source code tarballs from various upstream projects.
1381 Downloading can take a while, particularly if your network
1382 connection is slow.
1383 Tarballs are all stored in the directory defined by
1384 <filename>DL_DIR</filename> and the build system looks there
1385 first to find source tarballs.
1386 <note>
1387 When wiping and rebuilding, you can preserve this
1388 directory to speed up this part of subsequent
1389 builds.
1390 </note>
1391 </para>
1392
1393 <para>
1394 You can safely share this directory between multiple builds
1395 on the same development machine.
1396 For additional information on how the build process gets
1397 source files when working behind a firewall or proxy server,
1398 see this specific question in the
1399 "<link linkend='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>FAQ</link>"
1400 chapter.
1401 </para>
1402 </glossdef>
1403
1404 </glossentry>
1405 </glossdiv>
1406
1407 <glossdiv id='var-glossary-e'><title>E</title>
1408
1409 <glossentry id='var-ENABLE_BINARY_LOCALE_GENERATION'><glossterm>ENABLE_BINARY_LOCALE_GENERATION</glossterm>
1410 <glossdef>
1411 <para></para>
1412 <para>Variable that controls which locales for
1413 <filename>eglibc</filename> are generated during the
1414 build (useful if the target device has 64Mbytes
1415 of RAM or less).</para>
1416 </glossdef>
1417 </glossentry>
1418
1419 <glossentry id='var-ERROR_QA'><glossterm>ERROR_QA</glossterm>
1420 <glossdef>
1421 <para>
1422 Specifies the quality assurance checks whose failures are
1423 reported as errors by the OpenEmbedded build system.
1424 You set this variable in your distribution configuration
1425 file.
1426 For a list of the checks you can control with this variable,
1427 see the
1428 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
1429 section.
1430 </para>
1431 </glossdef>
1432 </glossentry>
1433
1434 <glossentry id='var-EXCLUDE_FROM_WORLD'><glossterm>EXCLUDE_FROM_WORLD</glossterm>
1435 <glossdef>
1436 <para>
1437 Directs BitBake to exclude a recipe from world builds (i.e.
1438 <filename>bitbake world</filename>).
1439 During world builds, BitBake locates, parses and builds all
1440 recipes found in every layer exposed in the
1441 <filename>bblayers.conf</filename> configuration file.
1442 </para>
1443
1444 <para>
1445 To exclude a recipe from a world build using this variable,
1446 set the variable to "1" in the recipe.
1447 </para>
1448
1449 <note>
1450 Recipes added to <filename>EXCLUDE_FROM_WORLD</filename>
1451 may still be built during a world build in order to satisfy
1452 dependencies of other recipes.
1453 Adding a recipe to <filename>EXCLUDE_FROM_WORLD</filename>
1454 only ensures that the recipe is not explicitly added
1455 to the list of build targets in a world build.
1456 </note>
1457 </glossdef>
1458 </glossentry>
1459
1460 <glossentry id='var-EXTENDPE'><glossterm>EXTENDPE</glossterm>
1461 <glossdef>
1462 <para>
1463 Used with file and pathnames to create a prefix for a recipe's
1464 version based on the recipe's
1465 <link linkend='var-PE'><filename>PE</filename></link> value.
1466 If <filename>PE</filename> is set and greater than zero for a recipe,
1467 <filename>EXTENDPE</filename> becomes that value (e.g if
1468 <filename>PE</filename> is equal to "1" then <filename>EXTENDPE</filename>
1469 becomes "1_").
1470 If a recipe's <filename>PE</filename> is not set (the default) or is equal to
1471 zero, <filename>EXTENDPE</filename> becomes "".</para>
1472 <para>See the <link linkend='var-STAMP'><filename>STAMP</filename></link>
1473 variable for an example.
1474 </para>
1475 </glossdef>
1476 </glossentry>
1477
1478 <glossentry id='var-EXTENDPKGV'><glossterm>EXTENDPKGV</glossterm>
1479 <glossdef>
1480 <para>
1481 The full package version specification as it appears on the
1482 final packages produced by a recipe.
1483 The variable's value is normally used to fix a runtime
1484 dependency to the exact same version of another package
1485 in the same recipe:
1486 <literallayout class='monospaced'>
1487 RDEPENDS_${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
1488 </literallayout>
1489 </para>
1490
1491 <para>
1492 The dependency relationships are intended to force the
1493 package manager to upgrade these types of packages in
1494 lock-step.
1495 </para>
1496 </glossdef>
1497 </glossentry>
1498
1499 <glossentry id='var-EXTERNALSRC'><glossterm>EXTERNALSRC</glossterm>
1500 <glossdef>
1501 <para>
1502 If <filename>externalsrc.bbclass</filename> is inherited,
1503 this variable points to the source tree, which is
1504 outside of the OpenEmbedded build system.
1505 When set, this variable sets the
1506 <link linkend='var-S'><filename>S</filename></link>
1507 variable, which is what the OpenEmbedded build system uses
1508 to locate unpacked recipe source code.
1509 </para>
1510
1511 <para>
1512 For more information on
1513 <filename>externalsrc.bbclass</filename>, see the
1514 "<link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>"
1515 section.
1516 You can also find information on how to use this variable
1517 in the
1518 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
1519 section in the Yocto Project Development Manual.
1520 </para>
1521 </glossdef>
1522 </glossentry>
1523
1524 <glossentry id='var-EXTERNALSRC_BUILD'><glossterm>EXTERNALSRC_BUILD</glossterm>
1525 <glossdef>
1526 <para>
1527 If <filename>externalsrc.bbclass</filename> is inherited,
1528 this variable points to the directory in which the recipe's
1529 source code is built,
1530 which is outside of the OpenEmbedded build system.
1531 When set, this variable sets the
1532 <link linkend='var-B'><filename>B</filename></link>
1533 variable, which is what the OpenEmbedded build system uses
1534 to locate the Build Directory.
1535 </para>
1536
1537 <para>
1538 For more information on
1539 <filename>externalsrc.bbclass</filename>, see the
1540 "<link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>"
1541 section.
1542 You can also find information on how to use this variable
1543 in the
1544 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
1545 section in the Yocto Project Development Manual.
1546 </para>
1547 </glossdef>
1548 </glossentry>
1549
1550 <glossentry id='var-EXTRA_IMAGE_FEATURES'><glossterm>EXTRA_IMAGE_FEATURES</glossterm>
1551 <glossdef>
1552 <para>
1553 The list of additional features to include in an image.
1554 Typically, you configure this variable in your
1555 <filename>local.conf</filename> file, which is found in the
1556 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
1557 Although you can use this variable from within a recipe,
1558 best practices dictate that you do not.
1559 <note>
1560 To enable primary features from within the image
1561 recipe, use the
1562 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
1563 variable.
1564 </note>
1565 </para>
1566
1567 <para>
1568 Here are some examples of features you can add:
1569 <literallayout class='monospaced'>
1570"dbg-pkgs" - Adds -dbg packages for all installed packages
1571 including symbol information for debugging and
1572 profiling.
1573
1574"debug-tweaks" - Makes an image suitable for development.
1575 For example, ssh root access has a blank
1576 password. You should remove this feature
1577 before you produce a production image.
1578
1579"dev-pkgs" - Adds -dev packages for all installed packages.
1580 This is useful if you want to develop against
1581 the libraries in the image.
1582
1583"read-only-rootfs" - Creates an image whose root
1584 filesystem is read-only. See the
1585 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>Creating a Read-Only Root Filesystem</ulink>"
1586 section in the Yocto Project
1587 Development Manual for more
1588 information
1589
1590"tools-debug" - Adds debugging tools such as gdb and
1591 strace.
1592
1593"tools-profile" - Adds profiling tools such as oprofile,
1594 exmap, lttng and valgrind (x86 only).
1595
1596"tools-sdk" - Adds development tools such as gcc, make,
1597 pkgconfig and so forth.
1598
1599"tools-testapps" - Adds useful testing tools such as
1600 ts_print, aplay, arecord and so
1601 forth.
1602
1603 </literallayout>
1604 </para>
1605
1606 <para>
1607 For a complete list of image features that ships with the
1608 Yocto Project, see the
1609 "<link linkend="ref-features-image">Images</link>"
1610 section.
1611 </para>
1612
1613 <para>
1614 For an example that shows how to customize your image by
1615 using this variable, see the
1616 "<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>"
1617 section in the Yocto Project Development Manual.
1618 </para>
1619 </glossdef>
1620 </glossentry>
1621
1622 <glossentry id='var-EXTRA_IMAGEDEPENDS'><glossterm>EXTRA_IMAGEDEPENDS</glossterm>
1623 <glossdef>
1624 <para>A list of recipes to build that do not provide packages
1625 for installing into the root filesystem.
1626 </para>
1627 <para>Sometimes a recipe is required to build the final image but is not
1628 needed in the root filesystem.
1629 You can use the <filename>EXTRA_IMAGEDEPENDS</filename> variable to
1630 list these recipes and thus specify the dependencies.
1631 A typical example is a required bootloader in a machine configuration.
1632 </para>
1633 <note>
1634 To add packages to the root filesystem, see the various
1635 <filename>*<link linkend='var-RDEPENDS'>RDEPENDS</link></filename>
1636 and <filename>*<link linkend='var-RRECOMMENDS'>RRECOMMENDS</link></filename>
1637 variables.
1638 </note>
1639 </glossdef>
1640 </glossentry>
1641
1642 <glossentry id='var-EXTRA_OECMAKE'><glossterm>EXTRA_OECMAKE</glossterm>
1643 <glossdef>
1644 <para>Additional <filename>cmake</filename> options.</para>
1645 </glossdef>
1646 </glossentry>
1647
1648 <glossentry id='var-EXTRA_OECONF'><glossterm>EXTRA_OECONF</glossterm>
1649 <glossdef>
1650 <para>Additional <filename>configure</filename> script options.</para>
1651 </glossdef>
1652 </glossentry>
1653
1654 <glossentry id='var-EXTRA_OEMAKE'><glossterm>EXTRA_OEMAKE</glossterm>
1655 <glossdef>
1656 <para>Additional GNU <filename>make</filename> options.</para>
1657 </glossdef>
1658 </glossentry>
1659
1660 </glossdiv>
1661
1662 <glossdiv id='var-glossary-f'><title>F</title>
1663
1664 <glossentry id='var-FEED_DEPLOYDIR_BASE_URI'><glossterm>FEED_DEPLOYDIR_BASE_URI</glossterm>
1665 <glossdef>
1666 <para>
1667 Points to the base URL of the server and location within
1668 the document-root that provides the metadata and
1669 packages required by OPKG to support runtime package
1670 management of IPK packages.
1671 You set this variable in your
1672 <filename>local.conf</filename> file.
1673 </para>
1674
1675 <para>
1676 Consider the following example:
1677 <literallayout class='monospaced'>
1678 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
1679 </literallayout>
1680 This example assumes you are serving your packages over
1681 HTTP and your databases are located in a directory
1682 named <filename>BOARD-dir</filename>, which is underneath
1683 your HTTP server's document-root.
1684 In this case, the OpenEmbedded build system generates a set
1685 of configuration files for you in your target that work
1686 with the feed.
1687 </para>
1688 </glossdef>
1689 </glossentry>
1690
1691 <glossentry id='var-FILES'><glossterm>FILES</glossterm>
1692 <glossdef>
1693 <para>
1694 The list of directories or files that are placed in packages.
1695 </para>
1696
1697 <para>
1698 To use the <filename>FILES</filename> variable, provide a package name
1699 override that identifies the resulting package.
1700 Then, provide a space-separated list of files or paths that identifies the
1701 files you want included as part of the resulting package.
1702 Here is an example:
1703 <literallayout class='monospaced'>
1704 FILES_${PN} += "${bindir}/mydir1/ ${bindir}/mydir2/myfile"
1705 </literallayout>
1706 </para>
1707
1708 <note>
1709 When specifying paths as part of the <filename>FILES</filename> variable,
1710 it is good practice to use appropriate path variables.
1711 For example, use <filename>${sysconfdir}</filename> rather than
1712 <filename>/etc</filename>, or <filename>${bindir}</filename> rather
1713 than <filename>/usr/bin</filename>.
1714 You can find a list of these variables at the top of the
1715 <filename>meta/conf/bitbake.conf</filename> file in the
1716 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1717 </note>
1718
1719 <para>
1720 If some of the files you provide with the <filename>FILES</filename> variable
1721 are editable and you know they should not be
1722 overwritten during the package update process by the Package Management
1723 System (PMS), you can identify these files so that the PMS will not
1724 overwrite them.
1725 See the <filename><link linkend='var-CONFFILES'>CONFFILES</link></filename>
1726 variable for information on how to identify these files to the PMS.
1727 </para>
1728
1729 </glossdef>
1730 </glossentry>
1731
1732 <glossentry id='var-FILESEXTRAPATHS'><glossterm>FILESEXTRAPATHS</glossterm>
1733 <glossdef>
1734 <para>
1735 Extends the search path the OpenEmbedded build system uses
1736 when looking for files and patches as it processes recipes
1737 and append files.
1738 The default directories BitBake uses when it processes
1739 recipes are initially defined by the
1740 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
1741 variable.
1742 You can extend <filename>FILESPATH</filename> variable
1743 by using <filename>FILESEXTRAPATHS</filename>.
1744 </para>
1745
1746 <para>
1747 Best practices dictate that you accomplish this by using
1748 <filename>FILESEXTRAPATHS</filename> from within a
1749 <filename>.bbappend</filename> file and that you prepend
1750 paths as follows:
1751 <literallayout class='monospaced'>
1752 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
1753 </literallayout>
1754 In the above example, the build system first looks for files
1755 in a directory that has the same name as the corresponding
1756 append file.
1757 <note>
1758 <para>When extending <filename>FILESEXTRAPATHS</filename>,
1759 be sure to use the immediate expansion
1760 (<filename>:=</filename>) operator.
1761 Immediate expansion makes sure that BitBake evaluates
1762 <link linkend='var-THISDIR'><filename>THISDIR</filename></link>
1763 at the time the directive is encountered rather than at
1764 some later time when expansion might result in a
1765 directory that does not contain the files you need.
1766 </para>
1767 <para>Also, include the trailing separating colon
1768 character if you are prepending.
1769 The trailing colon character is necessary because you
1770 are directing BitBake to extend the path by prepending
1771 directories to the search path.</para>
1772 </note>
1773 Here is another common use:
1774 <literallayout class='monospaced'>
1775 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
1776 </literallayout>
1777 In this example, the build system extends the
1778 <filename>FILESPATH</filename> variable to include a
1779 directory named <filename>files</filename> that is in the
1780 same directory as the corresponding append file.
1781 </para>
1782
1783 <para>
1784 Here is a final example that specifically adds three paths:
1785 <literallayout class='monospaced'>
1786 FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:"
1787 </literallayout>
1788 </para>
1789
1790 <para>
1791 By prepending paths in <filename>.bbappend</filename>
1792 files, you allow multiple append files that reside in
1793 different layers but are used for the same recipe to
1794 correctly extend the path.
1795 </para>
1796 </glossdef>
1797 </glossentry>
1798
1799 <glossentry id='var-FILESOVERRIDES'><glossterm>FILESOVERRIDES</glossterm>
1800 <glossdef>
1801 <para>
1802 A subset of <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
1803 used by the OpenEmbedded build system for creating
1804 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>.
1805 You can find more information on how overrides are handled
1806 in the BitBake Manual that is located at
1807 <filename>bitbake/doc/manual</filename> in the
1808 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1809 </para>
1810
1811 <para>
1812 By default, the <filename>FILESOVERRIDES</filename>
1813 variable is defined as:
1814 <literallayout class='monospaced'>
1815 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
1816 </literallayout>
1817
1818 <note>
1819 Do not hand-edit the <filename>FILESOVERRIDES</filename>
1820 variable.
1821 The values match up with expected overrides and are
1822 used in an expected manner by the build system.
1823 </note>
1824 </para>
1825 </glossdef>
1826 </glossentry>
1827
1828 <glossentry id='var-FILESPATH'><glossterm>FILESPATH</glossterm>
1829 <glossdef>
1830 <para>
1831 The default set of directories the OpenEmbedded build system
1832 uses when searching for patches and files.
1833 During the build process, BitBake searches each directory in
1834 <filename>FILESPATH</filename> in the specified order when
1835 looking for files and patches specified by each
1836 <filename>file://</filename> URI in a recipe.
1837 </para>
1838
1839 <para>
1840 The default value for the <filename>FILESPATH</filename>
1841 variable is defined in the <filename>base.bbclass</filename>
1842 class found in <filename>meta/classes</filename> in the
1843 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
1844 <literallayout class='monospaced'>
1845 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
1846 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
1847 </literallayout>
1848 <note>
1849 Do not hand-edit the <filename>FILESPATH</filename>
1850 variable.
1851 If you want the build system to look in directories
1852 other than the defaults, extend the
1853 <filename>FILESPATH</filename> variable by using the
1854 <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
1855 variable.
1856 </note>
1857 Be aware that the default <filename>FILESPATH</filename>
1858 directories do not map to directories in custom layers
1859 where append files (<filename>.bbappend</filename>)
1860 are used.
1861 If you want the build system to find patches or files
1862 that reside with your append files, you need to extend
1863 the <filename>FILESPATH</filename> variable by using
1864 the
1865 <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
1866 variable.
1867 </para>
1868 </glossdef>
1869 </glossentry>
1870
1871 <glossentry id='var-FILESYSTEM_PERMS_TABLES'><glossterm>FILESYSTEM_PERMS_TABLES</glossterm>
1872 <glossdef>
1873 <para>Allows you to define your own file permissions settings table as part of
1874 your configuration for the packaging process.
1875 For example, suppose you need a consistent set of custom permissions for
1876 a set of groups and users across an entire work project.
1877 It is best to do this in the packages themselves but this is not always
1878 possible.
1879 </para>
1880 <para>
1881 By default, the OpenEmbedded build system uses the <filename>fs-perms.txt</filename>, which
1882 is located in the <filename>meta/files</filename> folder in the
1883 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1884 If you create your own file permissions setting table, you should place it in your
1885 layer or the distro's layer.
1886 </para>
1887 <para>
1888 You define the <filename>FILESYSTEM_PERMS_TABLES</filename> variable in the
1889 <filename>conf/local.conf</filename> file, which is found in the
1890 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>, to
1891 point to your custom <filename>fs-perms.txt</filename>.
1892 You can specify more than a single file permissions setting table.
1893 The paths you specify to these files must be defined within the
1894 <link linkend='var-BBPATH'><filename>BBPATH</filename></link> variable.
1895 </para>
1896 <para>
1897 For guidance on how to create your own file permissions settings table file,
1898 examine the existing <filename>fs-perms.txt</filename>.
1899 </para>
1900 </glossdef>
1901 </glossentry>
1902
1903 <glossentry id='var-FULL_OPTIMIZATION'><glossterm>FULL_OPTIMIZATION</glossterm>
1904 <glossdef>
1905 <para>
1906 The options to pass in
1907 <filename><link linkend='var-TARGET_CFLAGS'>TARGET_CFLAGS</link></filename>
1908 and <filename><link linkend='var-CFLAGS'>CFLAGS</link></filename>
1909 when compiling an optimized system.
1910 This variable defaults to
1911 "-O2 -pipe ${DEBUG_FLAGS}".
1912 </para>
1913 </glossdef>
1914 </glossentry>
1915
1916 </glossdiv>
1917
1918<!-- <glossdiv id='var-glossary-g'><title>G</title>-->
1919<!-- </glossdiv>-->
1920
1921 <glossdiv id='var-glossary-h'><title>H</title>
1922
1923 <glossentry id='var-HOMEPAGE'><glossterm>HOMEPAGE</glossterm>
1924 <glossdef>
1925 <para>Website where more information about the software the recipe is building
1926 can be found.</para>
1927 </glossdef>
1928 </glossentry>
1929
1930 <glossentry id='var-HOST_SYS'><glossterm>HOST_SYS</glossterm>
1931 <glossdef>
1932 <para>
1933 Specifies the system, including the architecture and the
1934 operating system, for with the build is occurring
1935 in the context of the current
1936 recipe.
1937 The OpenEmbedded build system automatically sets this
1938 variable.
1939 You do not need to set the variable yourself.
1940 </para>
1941
1942 <para>
1943 Here are two examples:
1944 <itemizedlist>
1945 <listitem><para>Given a native recipe on a 32-bit
1946 x86 machine running Linux, the value is
1947 "i686-linux".
1948 </para></listitem>
1949 <listitem><para>Given a recipe being built for a
1950 little-endian MIPS target running Linux,
1951 the value might be "mipsel-linux".
1952 </para></listitem>
1953 </itemizedlist>
1954 </para>
1955 </glossdef>
1956 </glossentry>
1957
1958 </glossdiv>
1959
1960 <glossdiv id='var-glossary-i'><title>I</title>
1961
1962 <glossentry id='var-IMAGE_BASENAME'><glossterm>IMAGE_BASENAME</glossterm>
1963 <glossdef>
1964 <para>
1965 The base name of image output files.
1966 This variable defaults to the recipe name
1967 (<filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>).
1968 </para>
1969 </glossdef>
1970 </glossentry>
1971
1972 <glossentry id='var-IMAGE_CLASSES'><glossterm>IMAGE_CLASSES</glossterm>
1973 <glossdef>
1974 <para>
1975 A list of classes that all images should inherit.
1976 You typically use this variable to specify the list of
1977 classes that register the different types of images
1978 the OpenEmbedded build system creates.
1979 </para>
1980
1981 <para>
1982 The default value for <filename>IMAGE_CLASSES</filename> is
1983 <filename>image_types</filename>.
1984 You can set this variable in your
1985 <filename>local.conf</filename> or in a distribution
1986 configuration file.
1987 </para>
1988
1989 <para>
1990 For more information, see
1991 <filename>meta/classes/image_types.bbclass</filename> in the
1992 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1993 </para>
1994 </glossdef>
1995 </glossentry>
1996
1997 <glossentry id='var-IMAGE_FEATURES'><glossterm>IMAGE_FEATURES</glossterm>
1998 <glossdef>
1999 <para>
2000 The primary list of features to include in an image.
2001 Typically, you configure this variable in an image recipe.
2002 Although you can use this variable from your
2003 <filename>local.conf</filename> file, which is found in the
2004 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
2005 best practices dictate that you do not.
2006 <note>
2007 To enable extra features from outside the image recipe,
2008 use the
2009 <filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename> variable.
2010 </note>
2011 For a list of image features that ships with the Yocto
2012 Project, see the
2013 "<link linkend="ref-features-image">Images</link>"
2014 section.
2015 </para>
2016
2017 <para>
2018 For an example that shows how to customize your image by
2019 using this variable, see the
2020 "<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>"
2021 section in the Yocto Project Development Manual.
2022 </para>
2023 </glossdef>
2024 </glossentry>
2025
2026 <glossentry id='var-IMAGE_FSTYPES'><glossterm>IMAGE_FSTYPES</glossterm>
2027 <glossdef>
2028 <para>
2029 Specifies the formats the OpenEmbedded build system uses
2030 during the build when creating the root filesystem.
2031 For example, setting <filename>IMAGE_FSTYPES</filename>
2032 as follows causes the build system to create root
2033 filesystems using two formats: <filename>.ext3</filename>
2034 and <filename>.tar.bz2</filename>:
2035 <literallayout class='monospaced'>
2036 IMAGE_FSTYPES = "ext3 tar.bz2"
2037 </literallayout>
2038 For the complete list of supported image formats from which
2039 you can choose, see
2040 <link linkend='var-IMAGE_TYPES'><filename>IMAGE_TYPES</filename></link>.
2041 </para>
2042 </glossdef>
2043 </glossentry>
2044
2045 <glossentry id='var-IMAGE_INSTALL'><glossterm>IMAGE_INSTALL</glossterm>
2046 <glossdef>
2047 <para>
2048 Specifies the packages to install into an image.
2049 The <filename>IMAGE_INSTALL</filename> variable is a mechanism for an image
2050 recipe and you should use it with care to avoid ordering issues.
2051 </para>
2052
2053 <para>
2054 Image recipes set <filename>IMAGE_INSTALL</filename> to specify the
2055 packages to install into an image through <filename>image.bbclass</filename>.
2056 Additionally, "helper" classes exist, such as <filename>core-image.bbclass</filename>,
2057 that can take
2058 <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename> lists
2059 and turn these into auto-generated entries in
2060 <filename>IMAGE_INSTALL</filename> in addition to its default contents.
2061 </para>
2062
2063 <para>
2064 Using <filename>IMAGE_INSTALL</filename> with the <filename>+=</filename>
2065 operator from the <filename>/conf/local.conf</filename> file or from within
2066 an image recipe is not recommended as it can cause ordering issues.
2067 Since <filename>core-image.bbclass</filename> sets <filename>IMAGE_INSTALL</filename>
2068 to a default value using the <filename>?=</filename> operator, using a
2069 <filename>+=</filename> operation against <filename>IMAGE_INSTALL</filename>
2070 will result in unexpected behavior when used in
2071 <filename>conf/local.conf</filename>.
2072 Furthermore, the same operation from within an image recipe may or may not
2073 succeed depending on the specific situation.
2074 In both these cases, the behavior is contrary to how most users expect
2075 the <filename>+=</filename> operator to work.
2076 </para>
2077
2078 <para>
2079 When you use this variable, it is best to use it as follows:
2080 <literallayout class='monospaced'>
2081 IMAGE_INSTALL_append = " package-name"
2082 </literallayout>
2083 Be sure to include the space between the quotation character and the start of the
2084 package name or names.
2085 </para>
2086 </glossdef>
2087 </glossentry>
2088
2089 <glossentry id='var-IMAGE_LINGUAS'><glossterm>IMAGE_LINGUAS</glossterm>
2090 <glossdef>
2091 <para>
2092 Specifies the list of locales to install into the image
2093 during the root filesystem construction process.
2094 The OpenEmbedded build system automatically splits locale
2095 files, which are used for localization, into separate
2096 packages.
2097 Setting the <filename>IMAGE_LINGUAS</filename> variable
2098 ensures that any locale packages that correspond to packages
2099 already selected for installation into the image are also
2100 installed.
2101 Here is an example:
2102 <literallayout class='monospaced'>
2103 IMAGE_LINGUAS = "pt-br de-de"
2104 </literallayout>
2105 In this example, the build system ensures any Brazilian
2106 Portuguese and German locale files that correspond to
2107 packages in the image are installed (i.e.
2108 <filename>*-locale-pt-br</filename>
2109 and <filename>*-locale-de-de</filename> as well as
2110 <filename>*-locale-pt</filename>
2111 and <filename>*-locale-de</filename>, since some software
2112 packages only provide locale files by language and not by
2113 country-specific language).
2114 </para>
2115 </glossdef>
2116 </glossentry>
2117
2118 <glossentry id='var-IMAGE_NAME'><glossterm>IMAGE_NAME</glossterm>
2119 <glossdef>
2120 <para>
2121 The name of the output image files minus the extension.
2122 This variable is derived using the
2123 <link linkend='var-IMAGE_BASENAME'><filename>IMAGE_BASENAME</filename></link>,
2124 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
2125 and
2126 <link linkend='var-DATETIME'><filename>DATETIME</filename></link>
2127 variables:
2128 <literallayout class='monospaced'>
2129 IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
2130 </literallayout>
2131 </para>
2132 </glossdef>
2133 </glossentry>
2134
2135 <glossentry id='var-IMAGE_OVERHEAD_FACTOR'><glossterm>IMAGE_OVERHEAD_FACTOR</glossterm>
2136 <glossdef>
2137 <para>
2138 Defines a multiplier that the build system applies to the initial image
2139 size for cases when the multiplier times the returned disk usage value
2140 for the image is greater than the sum of
2141 <filename><link linkend='var-IMAGE_ROOTFS_SIZE'>IMAGE_ROOTFS_SIZE</link></filename>
2142 and
2143 <filename><link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'>IMAGE_ROOTFS_EXTRA_SPACE</link></filename>.
2144 The result of the multiplier applied to the initial image size creates
2145 free disk space in the image as overhead.
2146 By default, the build process uses a multiplier of 1.3 for this variable.
2147 This default value results in 30% free disk space added to the image when this
2148 method is used to determine the final generated image size.
2149 You should be aware that post install scripts and the package management
2150 system uses disk space inside this overhead area.
2151 Consequently, the multiplier does not produce an image with
2152 all the theoretical free disk space.
2153 See <filename><link linkend='var-IMAGE_ROOTFS_SIZE'>IMAGE_ROOTFS_SIZE</link></filename>
2154 for information on how the build system determines the overall image size.
2155 </para>
2156
2157 <para>
2158 The default 30% free disk space typically gives the image enough room to boot
2159 and allows for basic post installs while still leaving a small amount of
2160 free disk space.
2161 If 30% free space is inadequate, you can increase the default value.
2162 For example, the following setting gives you 50% free space added to the image:
2163 <literallayout class='monospaced'>
2164 IMAGE_OVERHEAD_FACTOR = "1.5"
2165 </literallayout>
2166 </para>
2167
2168 <para>
2169 Alternatively, you can ensure a specific amount of free disk space is added
2170 to the image by using the
2171 <filename><link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'>IMAGE_ROOTFS_EXTRA_SPACE</link></filename>
2172 variable.
2173 </para>
2174 </glossdef>
2175 </glossentry>
2176
2177 <glossentry id='var-IMAGE_POSTPROCESS_COMMAND'><glossterm>IMAGE_POSTPROCESS_COMMAND</glossterm>
2178 <glossdef>
2179 <para>
2180 Added by classes to run post processing commands once the
2181 OpenEmbedded build system has created the image.
2182 You can specify shell commands separated by semicolons:
2183 <literallayout class='monospaced'>
2184 IMAGE_POSTPROCESS_COMMAND += "&lt;shell_command&gt;; ... "
2185 </literallayout>
2186 If you need to pass the path to the root filesystem within
2187 the command, you can use
2188 <filename>${IMAGE_ROOTFS}</filename>, which points to
2189 the root filesystem image.
2190 </para>
2191 </glossdef>
2192 </glossentry>
2193
2194 <glossentry id='var-IMAGE_ROOTFS'><glossterm>IMAGE_ROOTFS</glossterm>
2195 <glossdef>
2196 <para>
2197 The location of the root filesystem while it is under
2198 construction (i.e. during <filename>do_rootfs</filename>).
2199 This variable is not configurable.
2200 Do not change it.
2201 </para>
2202 </glossdef>
2203 </glossentry>
2204
2205 <glossentry id='var-IMAGE_ROOTFS_EXTRA_SPACE'><glossterm>IMAGE_ROOTFS_EXTRA_SPACE</glossterm>
2206 <glossdef>
2207 <para>
2208 Defines additional free disk space created in the image in Kbytes.
2209 By default, this variable is set to "0".
2210 This free disk space is added to the image after the build system determines
2211 the image size as described in
2212 <filename><link linkend='var-IMAGE_ROOTFS_SIZE'>IMAGE_ROOTFS_SIZE</link></filename>.
2213 </para>
2214
2215 <para>
2216 This variable is particularly useful when you want to ensure that a
2217 specific amount of free disk space is available on a device after an image
2218 is installed and running.
2219 For example, to be sure 5 Gbytes of free disk space is available, set the
2220 variable as follows:
2221 <literallayout class='monospaced'>
2222 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
2223 </literallayout>
2224 </para>
2225
2226 <para>
2227 For example, the Yocto Project Build Appliance specifically requests 40 Gbytes
2228 of extra space with the line:
2229 <literallayout class='monospaced'>
2230 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
2231 </literallayout>
2232 </para>
2233 </glossdef>
2234 </glossentry>
2235
2236 <glossentry id='var-IMAGE_ROOTFS_SIZE'><glossterm>IMAGE_ROOTFS_SIZE</glossterm>
2237 <glossdef>
2238 <para>
2239 Defines the size in Kbytes for the generated image.
2240 The OpenEmbedded build system determines the final size for the generated
2241 image using an algorithm that takes into account the initial disk space used
2242 for the generated image, a requested size for the image, and requested
2243 additional free disk space to be added to the image.
2244 Programatically, the build system determines the final size of the
2245 generated image as follows:
2246 <literallayout class='monospaced'>
2247 if (image-du * overhead) &lt; rootfs-size:
2248 internal-rootfs-size = rootfs-size + xspace
2249 else:
2250 internal-rootfs-size = (image-du * overhead) + xspace
2251
2252 where:
2253
2254 image-du = Returned value of the du command on
2255 the image.
2256
2257 overhead = IMAGE_OVERHEAD_FACTOR
2258
2259 rootfs-size = IMAGE_ROOTFS_SIZE
2260
2261 internal-rootfs-size = Initial root filesystem
2262 size before any modifications.
2263
2264 xspace = IMAGE_ROOTFS_EXTRA_SPACE
2265 </literallayout>
2266 See the <link linkend='var-IMAGE_OVERHEAD_FACTOR'><filename>IMAGE_OVERHEAD_FACTOR</filename></link>
2267 and <link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'><filename>IMAGE_ROOTFS_EXTRA_SPACE</filename></link>
2268 variables for related information.
2269<!-- In the above example, <filename>overhead</filename> is defined by the
2270 <filename><link linkend='var-IMAGE_OVERHEAD_FACTOR'>IMAGE_OVERHEAD_FACTOR</link></filename>
2271 variable, <filename>xspace</filename> is defined by the
2272 <filename><link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'>IMAGE_ROOTFS_EXTRA_SPACE</link></filename>
2273 variable, and <filename>du</filename> is the results of the disk usage command
2274 on the initially generated image. -->
2275 </para>
2276 </glossdef>
2277 </glossentry>
2278
2279 <glossentry id='var-IMAGE_TYPES'><glossterm>IMAGE_TYPES</glossterm>
2280 <glossdef>
2281 <para>
2282 Specifies the complete list of supported image types
2283 by default:
2284 <literallayout class='monospaced'>
2285 jffs2
2286 sum.jffs2
2287 cramfs
2288 ext2
2289 ext2.gz
2290 ext2.bz2
2291 ext3
2292 ext3.gz
2293 ext2.lzma
2294 btrfs
2295 live
2296 squashfs
2297 squashfs-xz
2298 ubi
2299 ubifs
2300 tar
2301 tar.gz
2302 tar.bz2
2303 tar.xz
2304 cpio
2305 cpio.gz
2306 cpio.xz
2307 cpio.lzma
2308 vmdk
2309 elf
2310 </literallayout>
2311 For more information on how these types of images, see
2312 <filename>meta/classes/image_types*.bbclass</filename>
2313 in the
2314 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
2315 </para>
2316 </glossdef>
2317 </glossentry>
2318
2319 <glossentry id='var-INC_PR'><glossterm>INC_PR</glossterm>
2320 <glossdef>
2321 <para>Helps define the recipe revision for recipes that share
2322 a common <filename>include</filename> file.
2323 You can think of this variable as part of the recipe revision
2324 as set from within an include file.</para>
2325 <para>Suppose, for example, you have a set of recipes that
2326 are used across several projects.
2327 And, within each of those recipes the revision
2328 (its <link linkend='var-PR'><filename>PR</filename></link>
2329 value) is set accordingly.
2330 In this case, when the revision of those recipes changes,
2331 the burden is on you to find all those recipes and
2332 be sure that they get changed to reflect the updated
2333 version of the recipe.
2334 In this scenario, it can get complicated when recipes
2335 that are used in many places and provide common functionality
2336 are upgraded to a new revision.</para>
2337 <para>A more efficient way of dealing with this situation is
2338 to set the <filename>INC_PR</filename> variable inside
2339 the <filename>include</filename> files that the recipes
2340 share and then expand the <filename>INC_PR</filename>
2341 variable within the recipes to help
2342 define the recipe revision.
2343 </para>
2344 <para>
2345 The following provides an example that shows how to use
2346 the <filename>INC_PR</filename> variable
2347 given a common <filename>include</filename> file that
2348 defines the variable.
2349 Once the variable is defined in the
2350 <filename>include</filename> file, you can use the
2351 variable to set the <filename>PR</filename> values in
2352 each recipe.
2353 You will notice that when you set a recipe's
2354 <filename>PR</filename> you can provide more granular
2355 revisioning by appending values to the
2356 <filename>INC_PR</filename> variable:
2357 <literallayout class='monospaced'>
2358recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
2359recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
2360recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
2361recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
2362 </literallayout>
2363 The first line of the example establishes the baseline
2364 revision to be used for all recipes that use the
2365 <filename>include</filename> file.
2366 The remaining lines in the example are from individual
2367 recipes and show how the <filename>PR</filename> value
2368 is set.</para>
2369 </glossdef>
2370 </glossentry>
2371
2372 <glossentry id='var-INCOMPATIBLE_LICENSE'><glossterm>INCOMPATIBLE_LICENSE</glossterm>
2373 <glossdef>
2374 <para>
2375 Specifies a space-separated list of license names
2376 (as they would appear in
2377 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>)
2378 that should be excluded from the build.
2379 Recipes that provide no alternatives to listed incompatible
2380 licenses are not built.
2381 Packages that are individually licensed with the specified
2382 incompatible licenses will be deleted.
2383 </para>
2384
2385 <note>
2386 This functionality is only regularly tested using
2387 the following setting:
2388 <literallayout class='monospaced'>
2389 INCOMPATIBLE_LICENSE = "GPLv3"
2390 </literallayout>
2391 Although you can use other settings, you might be required
2392 to remove dependencies on or provide alternatives to
2393 components that are required to produce a functional system
2394 image.
2395 </note>
2396 </glossdef>
2397 </glossentry>
2398
2399 <glossentry id='var-INHIBIT_DEFAULT_DEPS'><glossterm>INHIBIT_DEFAULT_DEPS</glossterm>
2400 <glossdef>
2401 <para>
2402 Prevents the default dependencies, namely the C compiler
2403 and standard C library (libc), from being added to
2404 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>.
2405 This variable is usually used within recipes that do not
2406 require any compilation using the C compiler.
2407 </para>
2408
2409 <para>
2410 Set the variable to "1" to prevent the default dependencies
2411 from being added.
2412 </para>
2413 </glossdef>
2414 </glossentry>
2415
2416 <glossentry id='var-INHIBIT_PACKAGE_STRIP'><glossterm>INHIBIT_PACKAGE_STRIP</glossterm>
2417 <glossdef>
2418 <para>
2419 If set to "1", causes the build to not strip binaries in resulting packages.
2420 </para>
2421 </glossdef>
2422 </glossentry>
2423
2424 <glossentry id='var-INHERIT'><glossterm>INHERIT</glossterm>
2425 <glossdef>
2426 <para>
2427 Causes the named class to be inherited at
2428 this point during parsing.
2429 The variable is only valid in configuration files.
2430 </para>
2431 </glossdef>
2432 </glossentry>
2433
2434 <glossentry id='var-INITRAMFS_FSTYPES'><glossterm>INITRAMFS_FSTYPES</glossterm>
2435 <glossdef>
2436 <para>
2437 Defines the format for the output image of an initial
2438 RAM disk (initramfs), which is used during boot.
2439 Supported formats are the same as those supported by the
2440 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
2441 variable.
2442 </para>
2443 </glossdef>
2444 </glossentry>
2445
2446 <glossentry id='var-INITSCRIPT_NAME'><glossterm>INITSCRIPT_NAME</glossterm>
2447 <glossdef>
2448 <para>
2449 The filename of the initialization script as installed to
2450 <filename>${sysconfdir}/init.d</filename>.
2451 </para>
2452 <para>
2453 This variable is used in recipes when using <filename>update-rc.d.bbclass</filename>.
2454 The variable is mandatory.
2455 </para>
2456 </glossdef>
2457 </glossentry>
2458
2459 <glossentry id='var-INITSCRIPT_PACKAGES'><glossterm>INITSCRIPT_PACKAGES</glossterm>
2460 <glossdef>
2461 <para>
2462 A list of the packages that contain initscripts.
2463 If multiple packages are specified, you need to append the package name
2464 to the other <filename>INITSCRIPT_*</filename> as an override.</para>
2465 <para>
2466 This variable is used in recipes when using <filename>update-rc.d.bbclass</filename>.
2467 The variable is optional and defaults to the
2468 <link linkend='var-PN'><filename>PN</filename></link> variable.
2469 </para>
2470 </glossdef>
2471 </glossentry>
2472
2473 <glossentry id='var-INITSCRIPT_PARAMS'><glossterm>INITSCRIPT_PARAMS</glossterm>
2474 <glossdef>
2475 <para>
2476 Specifies the options to pass to <filename>update-rc.d</filename>.
2477 Here is an example:
2478 <literallayout class='monospaced'>
2479 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
2480 </literallayout>
2481 In this example, the script has a runlevel of 99,
2482 starts the script in initlevels 2 and 5, and
2483 stops the script in levels 0, 1 and 6.
2484 </para>
2485 <para>
2486 The variable is mandatory and is used in recipes when using
2487 <filename>update-rc.d.bbclass</filename>.
2488 </para>
2489 </glossdef>
2490 </glossentry>
2491
2492 <glossentry id='var-INSANE_SKIP'><glossterm>INSANE_SKIP</glossterm>
2493 <glossdef>
2494 <para>
2495 Specifies the QA checks to skip for a specific package
2496 within a recipe.
2497 For example, to skip the check for symbolic link
2498 <filename>.so</filename> files in the main package of a
2499 recipe, add the following to the recipe.
2500 The package name override must be used, which in this
2501 example is <filename>${PN}</filename>:
2502 <literallayout class='monospaced'>
2503 INSANE_SKIP_${PN} += "dev-so"
2504 </literallayout>
2505 </para>
2506 <para>
2507 See the "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
2508 section for a list of the valid QA checks you can
2509 specify using this variable.
2510 </para>
2511 </glossdef>
2512 </glossentry>
2513
2514 <glossentry id='var-IPK_FEED_URIS'><glossterm>IPK_FEED_URIS</glossterm>
2515 <glossdef>
2516 <para>
2517 When the IPK backend is in use and package management
2518 is enabled on the target, you can use this variable to
2519 set up <filename>opkg</filename> in the target image
2520 to point to package feeds on a nominated server.
2521 Once the feed is established, you can perform
2522 installations or upgrades using the package manager
2523 at runtime.
2524 </para>
2525 </glossdef>
2526 </glossentry>
2527
2528<!--
2529 <glossentry id='var-INTERCEPT_DIR'><glossterm>INTERCEPT_DIR</glossterm>
2530 <glossdef>
2531 <para>
2532 An environment variable that defines the directory where
2533 post installation hooks are installed for the
2534 post install environment.
2535 This variable is fixed as follows:
2536 <literallayout class='monospaced'>
2537 ${WORKDIR}/intercept_scripts
2538 </literallayout>
2539 </para>
2540
2541 <para>
2542 After installation of a target's root filesystem,
2543 post installation scripts, which are essentially bash scripts,
2544 are all executed just a single time.
2545 Limiting execution of these scripts minimizes installation
2546 time that would be lengthened due to certain packages
2547 triggering redundant operations.
2548 For example, consider the installation of font packages
2549 as a common example.
2550 Without limiting the execution of post installation scripts,
2551 all font directories would be rescanned to create the
2552 cache after each individual font package was installed.
2553 </para>
2554
2555 <para>
2556 Do not edit the <filename>INTERCEPT_DIR</filename>
2557 variable.
2558 </para>
2559 </glossdef>
2560 </glossentry>
2561-->
2562
2563 </glossdiv>
2564
2565<!-- <glossdiv id='var-glossary-j'><title>J</title>-->
2566<!-- </glossdiv>-->
2567
2568 <glossdiv id='var-glossary-k'><title>K</title>
2569
2570 <glossentry id='var-KARCH'><glossterm>KARCH</glossterm>
2571 <glossdef>
2572 <para>
2573 Defines the kernel architecture used when assembling
2574 the configuration.
2575 Architectures supported for this release are:
2576 <literallayout class='monospaced'>
2577 powerpc
2578 i386
2579 x86_64
2580 arm
2581 qemu
2582 mips
2583 </literallayout>
2584 </para>
2585
2586 <para>
2587 You define the <filename>KARCH</filename> variable in the
2588 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#bsp-descriptions'>BSP Descriptions</ulink>.
2589 </para>
2590 </glossdef>
2591 </glossentry>
2592
2593 <glossentry id='var-KBRANCH'><glossterm>KBRANCH</glossterm>
2594 <glossdef>
2595 <para>
2596 A regular expression used by the build process to explicitly identify the kernel
2597 branch that is validated, patched and configured during a build.
2598 The <filename>KBRANCH</filename> variable is optional.
2599 You can use it to trigger checks to ensure the exact kernel branch you want is
2600 being used by the build process.
2601 </para>
2602
2603 <para>
2604 Values for this variable are set in the kernel's recipe file and the kernel's
2605 append file.
2606 For example, if you are using the Yocto Project kernel that is based on the
2607 Linux 3.4 kernel, the kernel recipe file is the
2608 <filename>meta/recipes-kernel/linux/linux-yocto_3.4.bb</filename> file.
2609 Following is the default value for <filename>KBRANCH</filename> and the default
2610 override for the architectures the Yocto Project supports:
2611 <literallayout class='monospaced'>
2612 KBRANCH_DEFAULT = "standard/base"
2613 KBRANCH = "${KBRANCH_DEFAULT}"
2614 </literallayout>
2615 This branch exists in the <filename>linux-yocto-3.4</filename> kernel Git
2616 repository <ulink url='&YOCTO_GIT_URL;/cgit.cgi/linux-yocto-3.4/refs/heads'></ulink>.
2617 </para>
2618
2619 <para>
2620 This variable is also used from the kernel's append file to identify the kernel
2621 branch specific to a particular machine or target hardware.
2622 The kernel's append file is located in the BSP layer for a given machine.
2623 For example, the kernel append file for the Crown Bay BSP is in the
2624 <filename>meta-intel</filename> Git repository and is named
2625 <filename>meta-crownbay/recipes-kernel/linux/linux-yocto_3.4.bbappend</filename>.
2626 Here are the related statements from the append file:
2627 <literallayout class='monospaced'>
2628 COMPATIBLE_MACHINE_crownbay = "crownbay"
2629 KMACHINE_crownbay = "crownbay"
2630 KBRANCH_crownbay = "standard/crownbay"
2631
2632 COMPATIBLE_MACHINE_crownbay-noemgd = "crownbay-noemgd"
2633 KMACHINE_crownbay-noemgd = "crownbay"
2634 KBRANCH_crownbay-noemgd = "standard/crownbay"
2635 </literallayout>
2636 The <filename>KBRANCH_*</filename> statements identify the kernel branch to
2637 use when building for the Crown Bay BSP.
2638 In this case there are two identical statements: one for each type of
2639 Crown Bay machine.
2640 </para>
2641 </glossdef>
2642 </glossentry>
2643
2644 <glossentry id='var-KBRANCH_DEFAULT'><glossterm>KBRANCH_DEFAULT</glossterm>
2645 <glossdef>
2646 <para>
2647 Defines the Linux kernel source repository's default
2648 branch used to build the Linux kernel.
2649 The <filename>KBRANCH_DEFAULT</filename> value is
2650 the default value for
2651 <link linkend='var-KBRANCH'><filename>KBRANCH</filename></link>.
2652 Unless you specify otherwise,
2653 <filename>KBRANCH_DEFAULT</filename> initializes to
2654 "master".
2655 </para>
2656 </glossdef>
2657 </glossentry>
2658
2659 <glossentry id='var-KERNEL_EXTRA_ARGS'><glossterm>KERNEL_EXTRA_ARGS</glossterm>
2660 <glossdef>
2661 <para>
2662 Specifies additional <filename>make</filename>
2663 command-line arguments the OpenEmbedded build system
2664 passes on when compiling the kernel.
2665 </para>
2666 </glossdef>
2667 </glossentry>
2668
2669 <glossentry id='var-KERNEL_FEATURES'><glossterm>KERNEL_FEATURES</glossterm>
2670 <glossdef>
2671 <para>Includes additional metadata from the Yocto Project kernel Git repository.
2672 In the OpenEmbedded build system, the default Board Support Packages (BSPs)
2673 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
2674 is provided through
2675 the <link linkend='var-KMACHINE'><filename>KMACHINE</filename></link>
2676 and <link linkend='var-KBRANCH'><filename>KBRANCH</filename></link> variables.
2677 You can use the <filename>KERNEL_FEATURES</filename> variable to further
2678 add metadata for all BSPs.</para>
2679 <para>The metadata you add through this variable includes config fragments and
2680 features descriptions,
2681 which usually includes patches as well as config fragments.
2682 You typically override the <filename>KERNEL_FEATURES</filename> variable
2683 for a specific machine.
2684 In this way, you can provide validated, but optional, sets of kernel
2685 configurations and features.</para>
2686 <para>For example, the following adds <filename>netfilter</filename> to all
2687 the Yocto Project kernels and adds sound support to the <filename>qemux86</filename>
2688 machine:
2689 <literallayout class='monospaced'>
2690 # Add netfilter to all linux-yocto kernels
2691 KERNEL_FEATURES="features/netfilter"
2692
2693 # Add sound support to the qemux86 machine
2694 KERNEL_FEATURES_append_qemux86=" cfg/sound"
2695 </literallayout></para>
2696 </glossdef>
2697 </glossentry>
2698
2699 <glossentry id='var-KERNEL_IMAGETYPE'><glossterm>KERNEL_IMAGETYPE</glossterm>
2700 <glossdef>
2701 <para>The type of kernel to build for a device, usually set by the
2702 machine configuration files and defaults to "zImage".
2703 This variable is used
2704 when building the kernel and is passed to <filename>make</filename> as the target to
2705 build.</para>
2706 </glossdef>
2707 </glossentry>
2708
2709 <glossentry id='var-KERNEL_PATH'><glossterm>KERNEL_PATH</glossterm>
2710 <glossdef>
2711 <para>
2712 The location of the kernel sources.
2713 This variable is set to the value of the
2714 <link linkend='var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></link>
2715 within the <filename>module.bbclass</filename> class.
2716 For information on how this variable is used, see the
2717 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
2718 section.
2719 </para>
2720
2721 <para>
2722 The <link linkend='var-KERNEL_SRC'><filename>KERNEL_SRC</filename></link>
2723 variable is identical to the <filename>KERNEL_PATH</filename>
2724 variable.
2725 </para>
2726 </glossdef>
2727 </glossentry>
2728
2729 <glossentry id='var-KERNEL_SRC'><glossterm>KERNEL_SRC</glossterm>
2730 <glossdef>
2731 <para>
2732 The location of the kernel sources.
2733 This variable is set to the value of the
2734 <link linkend='var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></link>
2735 within the <filename>module.bbclass</filename> class.
2736 For information on how this variable is used, see the
2737 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
2738 section.
2739 </para>
2740
2741 <para>
2742 The <link linkend='var-KERNEL_PATH'><filename>KERNEL_PATH</filename></link>
2743 variable is identical to the <filename>KERNEL_SRC</filename>
2744 variable.
2745 </para>
2746 </glossdef>
2747 </glossentry>
2748
2749 <glossentry id='var-KFEATURE_DESCRIPTION'><glossterm>KFEATURE_DESCRIPTION</glossterm>
2750 <glossdef>
2751 <para>
2752 Provides a short description of a configuration fragment.
2753 You use this variable in the <filename>.scc</filename>
2754 file that describes a configuration fragment file.
2755 Here is the variable used in a file named
2756 <filename>smp.scc</filename> to describe SMP being
2757 enabled:
2758 <literallayout class='monospaced'>
2759 define KFEATURE_DESCRIPTION "Enable SMP"
2760 </literallayout>
2761 </para>
2762 </glossdef>
2763 </glossentry>
2764
2765 <glossentry id='var-KMACHINE'><glossterm>KMACHINE</glossterm>
2766 <glossdef>
2767 <para>
2768 The machine as known by the kernel.
2769 Sometimes the machine name used by the kernel does not match the machine name
2770 used by the OpenEmbedded build system.
2771 For example, the machine name that the OpenEmbedded build system understands as
2772 <filename>qemuarm</filename> goes by a different name in the Linux Yocto kernel.
2773 The kernel understands that machine as <filename>arm_versatile926ejs</filename>.
2774 For cases like these, the <filename>KMACHINE</filename> variable maps the
2775 kernel machine name to the OpenEmbedded build system machine name.
2776 </para>
2777
2778 <para>
2779 Kernel machine names are initially defined in the
2780 Yocto Linux Kernel's <filename>meta</filename> branch.
2781 From the <filename>meta</filename> branch, look in
2782 the <filename>meta/cfg/kernel-cache/bsp/&lt;bsp_name&gt;/&lt;bsp-name&gt;-&lt;kernel-type&gt;.scc</filename> file.
2783 For example, from the <filename>meta</filename> branch in the
2784 <filename>linux-yocto-3.0</filename> kernel, the
2785 <filename>meta/cfg/kernel-cache/bsp/cedartrail/cedartrail-standard.scc</filename> file
2786 has the following:
2787 <literallayout class='monospaced'>
2788 define KMACHINE cedartrail
2789 define KTYPE standard
2790 define KARCH i386
2791
2792 include ktypes/standard
2793 branch cedartrail
2794
2795 include cedartrail.scc
2796 </literallayout>
2797 You can see that the kernel understands the machine name for
2798 the Cedar Trail Board Support Package (BSP) as
2799 <filename>cedartrail</filename>.
2800 </para>
2801
2802 <para>
2803 If you look in the Cedar Trail BSP layer in the
2804 <filename>meta-intel</filename>
2805 <ulink url='&YOCTO_DOCS_DEV_URL;#source-repositories'>Source Repositories</ulink>
2806 at <filename>meta-cedartrail/recipes-kernel/linux/linux-yocto_3.0.bbappend</filename>,
2807 you will find the following statements among others:
2808 <literallayout class='monospaced'>
2809 COMPATIBLE_MACHINE_cedartrail = "cedartrail"
2810 KMACHINE_cedartrail = "cedartrail"
2811 KBRANCH_cedartrail = "yocto/standard/cedartrail"
2812 KERNEL_FEATURES_append_cedartrail += "bsp/cedartrail/cedartrail-pvr-merge.scc"
2813 KERNEL_FEATURES_append_cedartrail += "cfg/efi-ext.scc"
2814
2815 COMPATIBLE_MACHINE_cedartrail-nopvr = "cedartrail"
2816 KMACHINE_cedartrail-nopvr = "cedartrail"
2817 KBRANCH_cedartrail-nopvr = "yocto/standard/cedartrail"
2818 KERNEL_FEATURES_append_cedartrail-nopvr += " cfg/smp.scc"
2819 </literallayout>
2820 The <filename>KMACHINE</filename> statements in the kernel's append file make sure that
2821 the OpenEmbedded build system and the Yocto Linux kernel understand the same machine
2822 names.
2823 </para>
2824
2825 <para>
2826 This append file uses two <filename>KMACHINE</filename> statements.
2827 The first is not really necessary but does ensure that the machine known to the
2828 OpenEmbedded build system as <filename>cedartrail</filename> maps to the machine
2829 in the kernel also known as <filename>cedartrail</filename>:
2830 <literallayout class='monospaced'>
2831 KMACHINE_cedartrail = "cedartrail"
2832 </literallayout>
2833 </para>
2834
2835 <para>
2836 The second statement is a good example of why the <filename>KMACHINE</filename> variable
2837 is needed.
2838 In this example, the OpenEmbedded build system uses the <filename>cedartrail-nopvr</filename>
2839 machine name to refer to the Cedar Trail BSP that does not support the proprietary
2840 PowerVR driver.
2841 The kernel, however, uses the machine name <filename>cedartrail</filename>.
2842 Thus, the append file must map the <filename>cedartrail-nopvr</filename> machine name to
2843 the kernel's <filename>cedartrail</filename> name:
2844 <literallayout class='monospaced'>
2845 KMACHINE_cedartrail-nopvr = "cedartrail"
2846 </literallayout>
2847 </para>
2848
2849 <para>
2850 BSPs that ship with the Yocto Project release provide all mappings between the Yocto
2851 Project kernel machine names and the OpenEmbedded machine names.
2852 Be sure to use the <filename>KMACHINE</filename> if you create a BSP and the machine
2853 name you use is different than that used in the kernel.
2854 </para>
2855 </glossdef>
2856 </glossentry>
2857
2858 <glossentry id='var-KTYPE'><glossterm>KTYPE</glossterm>
2859 <glossdef>
2860 <para>
2861 Defines the kernel type to be used in assembling the
2862 configuration.
2863 The linux-yocto recipes define "standard", "tiny",
2864 and "preempt-rt" kernel types.
2865 See the
2866 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#kernel-types'>Kernel Types</ulink>"
2867 section in the Yocto Project Linux Kernel Development
2868 Manual for more information on kernel types.
2869 </para>
2870
2871 <para>
2872 You define the <filename>KTYPE</filename> variable in the
2873 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#bsp-descriptions'>BSP Descriptions</ulink>.
2874 The value you use must match the value used for the
2875 <link linkend='var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></link>
2876 value used by the kernel recipe.
2877 </para>
2878 </glossdef>
2879 </glossentry>
2880 </glossdiv>
2881
2882 <glossdiv id='var-glossary-l'><title>L</title>
2883
2884 <glossentry id='var-LAYERDEPENDS'><glossterm>LAYERDEPENDS</glossterm>
2885 <glossdef>
2886 <para>Lists the layers that this recipe depends upon, separated by spaces.
2887 Optionally, you can specify a specific layer version for a dependency
2888 by adding it to the end of the layer name with a colon, (e.g. "anotherlayer:3"
2889 to be compared against
2890 <link linkend='var-LAYERVERSION'><filename>LAYERVERSION</filename></link><filename>_anotherlayer</filename>
2891 in this case).
2892 An error will be produced if any dependency is missing or
2893 the version numbers do not match exactly (if specified).
2894 This variable is used in the <filename>conf/layer.conf</filename> file
2895 and must be suffixed with the name of the specific layer (e.g.
2896 <filename>LAYERDEPENDS_mylayer</filename>).</para>
2897 </glossdef>
2898 </glossentry>
2899
2900 <glossentry id='var-LAYERDIR'><glossterm>LAYERDIR</glossterm>
2901 <glossdef>
2902 <para>When used inside the <filename>layer.conf</filename> configuration
2903 file, this variable provides the path of the current layer.
2904 This variable is not available outside of <filename>layer.conf</filename>
2905 and references are expanded immediately when parsing of the file completes.</para>
2906 </glossdef>
2907 </glossentry>
2908
2909 <glossentry id='var-LAYERVERSION'><glossterm>LAYERVERSION</glossterm>
2910 <glossdef>
2911 <para>Optionally specifies the version of a layer as a single number.
2912 You can use this within
2913 <link linkend='var-LAYERDEPENDS'><filename>LAYERDEPENDS</filename></link>
2914 for another layer in order to depend on a specific version
2915 of the layer.
2916 This variable is used in the <filename>conf/layer.conf</filename> file
2917 and must be suffixed with the name of the specific layer (e.g.
2918 <filename>LAYERVERSION_mylayer</filename>).</para>
2919 </glossdef>
2920 </glossentry>
2921
2922 <glossentry id='var-LIC_FILES_CHKSUM'><glossterm>LIC_FILES_CHKSUM</glossterm>
2923 <glossdef>
2924 <para>Checksums of the license text in the recipe source code.</para>
2925 <para>This variable tracks changes in license text of the source
2926 code files.
2927 If the license text is changed, it will trigger a build
2928 failure, which gives the developer an opportunity to review any
2929 license change.</para>
2930 <para>
2931 This variable must be defined for all recipes (unless
2932 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
2933 is set to "CLOSED")</para>
2934 <para>For more information, see the
2935 <link linkend='usingpoky-configuring-LIC_FILES_CHKSUM'>
2936 Tracking License Changes</link> section</para>
2937 </glossdef>
2938 </glossentry>
2939
2940 <glossentry id='var-LICENSE'><glossterm>LICENSE</glossterm>
2941 <glossdef>
2942 <para>
2943 The list of source licenses for the recipe.
2944 Follow these rules:
2945 <itemizedlist>
2946 <listitem><para>Do not use spaces within individual
2947 license names.</para></listitem>
2948 <listitem><para>Separate license names using
2949 | (pipe) when there is a choice between licenses.
2950 </para></listitem>
2951 <listitem><para>Separate license names using
2952 &amp; (ampersand) when multiple licenses exist
2953 that cover different parts of the source.
2954 </para></listitem>
2955 <listitem><para>You can use spaces between license
2956 names.</para></listitem>
2957 </itemizedlist>
2958 </para>
2959
2960 <para>
2961 Here are some examples:
2962 <literallayout class='monospaced'>
2963 LICENSE = "LGPLv2.1 | GPLv3"
2964 LICENSE = "MPL-1 &amp; LGPLv2.1"
2965 LICENSE = "GPLv2+"
2966 </literallayout>
2967 The first example is from the recipes for Qt, which the user
2968 may choose to distribute under either the LGPL version
2969 2.1 or GPL version 3.
2970 The second example is from Cairo where two licenses cover
2971 different parts of the source code.
2972 The final example is from <filename>sysstat</filename>,
2973 which presents a single license.
2974 </para>
2975
2976 <para>
2977 You can also specify licenses on a per-package basis to
2978 handle situations where components of the output have
2979 different licenses.
2980 For example, a piece of software whose code is
2981 licensed under GPLv2 but has accompanying documentation
2982 licensed under the GNU Free Documentation License 1.2 could
2983 be specified as follows:
2984 <literallayout class='monospaced'>
2985 LICENSE = "GFDL-1.2 &amp; GPLv2"
2986 LICENSE_${PN} = "GPLv2"
2987 LICENSE_${PN}-doc = "GFDL-1.2"
2988 </literallayout>
2989 </para>
2990 </glossdef>
2991 </glossentry>
2992
2993 <glossentry id='var-LICENSE_PATH'><glossterm>LICENSE_PATH</glossterm>
2994 <glossdef>
2995 <para>Path to additional licenses used during the build.
2996 By default, the OpenEmbedded build system uses <filename>COMMON_LICENSE_DIR</filename>
2997 to define the directory that holds common license text used during the build.
2998 The <filename>LICENSE_PATH</filename> variable allows you to extend that
2999 location to other areas that have additional licenses:
3000 <literallayout class='monospaced'>
3001 LICENSE_PATH += "/path/to/additional/common/licenses"
3002 </literallayout></para>
3003 </glossdef>
3004 </glossentry>
3005
3006 <glossentry id='var-LINUX_KERNEL_TYPE'><glossterm>LINUX_KERNEL_TYPE</glossterm>
3007 <glossdef>
3008 <para>
3009 Defines the kernel type to be used in assembling the
3010 configuration.
3011 The linux-yocto recipes define "standard", "tiny", and
3012 "preempt-rt" kernel types.
3013 See the
3014 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#kernel-types'>Kernel Types</ulink>"
3015 section in the Yocto Project Linux Kernel Development
3016 Manual for more information on kernel types.
3017 </para>
3018
3019 <para>
3020 If you do not specify a
3021 <filename>LINUX_KERNEL_TYPE</filename>, it defaults to
3022 "standard".
3023 Together with
3024 <link linkend='var-KMACHINE'><filename>KMACHINE</filename></link>,
3025 the <filename>LINUX_KERNEL_TYPE</filename> variable
3026 defines the search
3027 arguments used by the kernel tools to find the appropriate
3028 description within the kernel
3029 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
3030 with which to build out the sources and configuration.
3031 </para>
3032 </glossdef>
3033 </glossentry>
3034
3035 <glossentry id='var-LINUX_VERSION'><glossterm>LINUX_VERSION</glossterm>
3036 <glossdef>
3037 <para>The Linux version from <filename>kernel.org</filename>
3038 on which the Linux kernel image being built using the
3039 OpenEmbedded build system is based.
3040 You define this variable in the kernel recipe.
3041 For example, the <filename>linux-yocto-3.4.bb</filename>
3042 kernel recipe found in
3043 <filename>meta/recipes-kernel/linux</filename>
3044 defines the variables as follows:
3045 <literallayout class='monospaced'>
3046 LINUX_VERSION ?= "3.4.24"
3047 </literallayout>
3048 The <filename>LINUX_VERSION</filename> variable is used to
3049 define <link linkend='var-PV'><filename>PV</filename></link>
3050 for the recipe:
3051 <literallayout class='monospaced'>
3052 PV = "${LINUX_VERSION}+git${SRCPV}"
3053 </literallayout></para>
3054 </glossdef>
3055 </glossentry>
3056
3057 <glossentry id='var-LINUX_VERSION_EXTENSION'><glossterm>LINUX_VERSION_EXTENSION</glossterm>
3058 <glossdef>
3059 <para>A string extension compiled into the version
3060 string of the Linux kernel built with the OpenEmbedded
3061 build system.
3062 You define this variable in the kernel recipe.
3063 For example, the linux-yocto kernel recipes all define
3064 the variable as follows:
3065 <literallayout class='monospaced'>
3066 LINUX_VERSION_EXTENSION ?= "-yocto-${<link linkend='var-LINUX_KERNEL_TYPE'>LINUX_KERNEL_TYPE</link>}"
3067 </literallayout>
3068 Defining this variable essentially sets the
3069 Linux kernel configuration item
3070 <filename>CONFIG_LOCALVERSION</filename>, which is visible
3071 through the <filename>uname</filename> command.
3072 Here is an example that shows the extension assuming it
3073 was set as previously shown:
3074 <literallayout class='monospaced'>
3075 $ uname -r
3076 3.7.0-rc8-custom
3077 </literallayout>
3078 </para>
3079 </glossdef>
3080 </glossentry>
3081
3082 <glossentry id='var-LOG_DIR'><glossterm>LOG_DIR</glossterm>
3083 <glossdef>
3084 <para>
3085 Specifies the directory to which the OpenEmbedded build
3086 system writes overall log files.
3087 The default directory is <filename>${TMPDIR}/log</filename>.
3088 </para>
3089 <para>
3090 For the directory containing logs specific to each task,
3091 see the <link linkend='var-T'><filename>T</filename></link>
3092 variable.
3093 </para>
3094 </glossdef>
3095 </glossentry>
3096
3097 </glossdiv>
3098
3099 <glossdiv id='var-glossary-m'><title>M</title>
3100
3101 <glossentry id='var-MACHINE'><glossterm>MACHINE</glossterm>
3102 <glossdef>
3103 <para>
3104 Specifies the target device for which the image is built.
3105 You define <filename>MACHINE</filename> in the
3106 <filename>local.conf</filename> file found in the
3107 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
3108 By default, <filename>MACHINE</filename> is set to
3109 "qemux86", which is an x86-based architecture machine to
3110 be emulated using QEMU:
3111 <literallayout class='monospaced'>
3112 MACHINE ?= "qemux86"
3113 </literallayout>
3114 The variable corresponds to a machine configuration file of the
3115 same name, through which machine-specific configurations are set.
3116 Thus, when <filename>MACHINE</filename> is set to "qemux86" there
3117 exists the corresponding <filename>qemux86.conf</filename> machine
3118 configuration file, which can be found in the
3119 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
3120 in <filename>meta/conf/machine</filename>.
3121 </para>
3122
3123 <para>
3124 The list of machines supported by the Yocto Project as
3125 shipped include the following:
3126 <literallayout class='monospaced'>
3127 MACHINE ?= "qemuarm"
3128 MACHINE ?= "qemumips"
3129 MACHINE ?= "qemuppc"
3130 MACHINE ?= "qemux86"
3131 MACHINE ?= "qemux86-64"
3132 MACHINE ?= "genericx86"
3133 MACHINE ?= "genericx86-64"
3134 MACHINE ?= "beagleboard"
3135 MACHINE ?= "mpc8315e-rdb"
3136 MACHINE ?= "routerstationpro"
3137 </literallayout>
3138 The last five are Yocto Project reference hardware boards, which
3139 are provided in the <filename>meta-yocto-bsp</filename> layer.
3140 <note>Adding additional Board Support Package (BSP) layers
3141 to your configuration adds new possible settings for
3142 <filename>MACHINE</filename>.
3143 </note>
3144 </para>
3145 </glossdef>
3146 </glossentry>
3147
3148 <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</glossterm>
3149 <glossdef>
3150 <para></para>
3151 <para>
3152 A list of required machine-specific packages to install as part of
3153 the image being built.
3154 The build process depends on these packages being present.
3155 Furthermore, because this is a "machine essential" variable, the list of
3156 packages are essential for the machine to boot.
3157 The impact of this variable affects images based on
3158 <filename>packagegroup-core-boot</filename>,
3159 including the <filename>core-image-minimal</filename> image.
3160 </para>
3161 <para>
3162 This variable is similar to the
3163 <filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</link></filename>
3164 variable with the exception that the image being built has a build
3165 dependency on the variable's list of packages.
3166 In other words, the image will not build if a file in this list is not found.
3167 </para>
3168 <para>
3169 As an example, suppose the machine for which you are building requires
3170 <filename>example-init</filename> to be run during boot to initialize the hardware.
3171 In this case, you would use the following in the machine's
3172 <filename>.conf</filename> configuration file:
3173 <literallayout class='monospaced'>
3174 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
3175 </literallayout>
3176 </para>
3177 </glossdef>
3178 </glossentry>
3179
3180 <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</glossterm>
3181 <glossdef>
3182 <para></para>
3183 <para>
3184 A list of recommended machine-specific packages to install as part of
3185 the image being built.
3186 The build process does not depend on these packages being present.
3187 However, because this is a "machine essential" variable, the list of
3188 packages are essential for the machine to boot.
3189 The impact of this variable affects images based on
3190 <filename>packagegroup-core-boot</filename>,
3191 including the <filename>core-image-minimal</filename> image.
3192 </para>
3193 <para>
3194 This variable is similar to the
3195 <filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</link></filename>
3196 variable with the exception that the image being built does not have a build
3197 dependency on the variable's list of packages.
3198 In other words, the image will still build if a package in this list is not found.
3199 Typically, this variable is used to handle essential kernel modules, whose
3200 functionality may be selected to be built into the kernel rather than as a module,
3201 in which case a package will not be produced.
3202 </para>
3203 <para>
3204 Consider an example where you have a custom kernel where a specific touchscreen
3205 driver is required for the machine to be usable.
3206 However, the driver can be built as a module or
3207 into the kernel depending on the kernel configuration.
3208 If the driver is built as a module, you want it to be installed.
3209 But, when the driver is built into the kernel, you still want the
3210 build to succeed.
3211 This variable sets up a "recommends" relationship so that in the latter case,
3212 the build will not fail due to the missing package.
3213 To accomplish this, assuming the package for the module was called
3214 <filename>kernel-module-ab123</filename>, you would use the
3215 following in the machine's <filename>.conf</filename> configuration
3216 file:
3217 <literallayout class='monospaced'>
3218 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
3219 </literallayout>
3220 </para>
3221 <para>
3222 Some examples of these machine essentials are flash, screen, keyboard, mouse,
3223 or touchscreen drivers (depending on the machine).
3224 </para>
3225 </glossdef>
3226 </glossentry>
3227
3228 <glossentry id='var-MACHINE_EXTRA_RDEPENDS'><glossterm>MACHINE_EXTRA_RDEPENDS</glossterm>
3229 <glossdef>
3230 <para>
3231 A list of machine-specific packages to install as part of the
3232 image being built that are not essential for the machine to boot.
3233 However, the build process for more fully-featured images
3234 depends on the packages being present.
3235 </para>
3236 <para>
3237 This variable affects all images based on
3238 <filename>packagegroup-base</filename>, which does not include the
3239 <filename>core-image-minimal</filename> or <filename>core-image-basic</filename>
3240 images.
3241 </para>
3242 <para>
3243 The variable is similar to the
3244 <filename><link linkend='var-MACHINE_EXTRA_RRECOMMENDS'>MACHINE_EXTRA_RRECOMMENDS</link></filename>
3245 variable with the exception that the image being built has a build
3246 dependency on the variable's list of packages.
3247 In other words, the image will not build if a file in this list is not found.
3248 </para>
3249 <para>
3250 An example is a machine that has WiFi capability but is not
3251 essential for the machine to boot the image.
3252 However, if you are building a more fully-featured image, you want to enable
3253 the WiFi.
3254 The package containing the firmware for the WiFi hardware is always
3255 expected to exist, so it is acceptable for the build process to depend upon
3256 finding the package.
3257 In this case, assuming the package for the firmware was called
3258 <filename>wifidriver-firmware</filename>, you would use the following in the
3259 <filename>.conf</filename> file for the machine:
3260 <literallayout class='monospaced'>
3261 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
3262 </literallayout>
3263 </para>
3264 </glossdef>
3265 </glossentry>
3266
3267 <glossentry id='var-MACHINE_EXTRA_RRECOMMENDS'><glossterm>MACHINE_EXTRA_RRECOMMENDS</glossterm>
3268 <glossdef>
3269 <para></para>
3270 <para>
3271 A list of machine-specific packages to install as part of the
3272 image being built that are not essential for booting the machine.
3273 The image being built has no build dependency on this list of packages.
3274 </para>
3275 <para>
3276 This variable affects only images based on
3277 <filename>packagegroup-base</filename>, which does not include the
3278 <filename>core-image-minimal</filename> or <filename>core-image-basic</filename>
3279 images.
3280 </para>
3281 <para>
3282 This variable is similar to the
3283 <filename><link linkend='var-MACHINE_EXTRA_RDEPENDS'>MACHINE_EXTRA_RDEPENDS</link></filename>
3284 variable with the exception that the image being built does not have a build
3285 dependency on the variable's list of packages.
3286 In other words, the image will build if a file in this list is not found.
3287 </para>
3288 <para>
3289 An example is a machine that has WiFi capability but is not essential
3290 For the machine to boot the image.
3291 However, if you are building a more fully-featured image, you want to enable
3292 WiFi.
3293 In this case, the package containing the WiFi kernel module will not be produced
3294 if the WiFi driver is built into the kernel, in which case you still want the
3295 build to succeed instead of failing as a result of the package not being found.
3296 To accomplish this, assuming the package for the module was called
3297 <filename>kernel-module-examplewifi</filename>, you would use the
3298 following in the <filename>.conf</filename> file for the machine:
3299 <literallayout class='monospaced'>
3300 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
3301 </literallayout>
3302 </para>
3303 </glossdef>
3304 </glossentry>
3305
3306 <glossentry id='var-MACHINE_FEATURES'><glossterm>MACHINE_FEATURES</glossterm>
3307 <glossdef>
3308 <para>Specifies the list of hardware features the
3309 <link linkend='var-MACHINE'>MACHINE</link> supports.
3310 For example, including the "bluetooth" feature causes the
3311 <filename>bluez</filename> bluetooth daemon to be built and
3312 added to the image.
3313 It also causes the <filename>connman</filename> recipe
3314 to look at <filename>MACHINE_FEATURES</filename> and when it
3315 finds "bluetooth" there it enables the bluetooth
3316 support in ConnMan.
3317 </para>
3318
3319 <para>
3320 For a list of features supported by the Yocto Project as shipped,
3321 see the "<link linkend='ref-features-machine'>Machine</link>" section.
3322 </para>
3323 </glossdef>
3324 </glossentry>
3325
3326 <glossentry id='var-MACHINE_FEATURES_BACKFILL'><glossterm>MACHINE_FEATURES_BACKFILL</glossterm>
3327 <glossdef>
3328 <para>Features to be added to
3329 <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>
3330 if not also present in
3331 <filename><link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'>MACHINE_FEATURES_BACKFILL_CONSIDERED</link></filename>.
3332 </para>
3333
3334 <para>
3335 This variable is set in the <filename>meta/conf/bitbake.conf</filename> file.
3336 It is not intended to be user-configurable.
3337 It is best to just reference the variable to see which machine features are
3338 being backfilled for all machine configurations.
3339 See the "<link linkend='ref-features-backfill'>Feature backfilling</link>" section for
3340 more information.
3341 </para>
3342 </glossdef>
3343 </glossentry>
3344
3345 <glossentry id='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><glossterm>MACHINE_FEATURES_BACKFILL_CONSIDERED</glossterm>
3346 <glossdef>
3347 <para>Features from
3348 <filename><link linkend='var-MACHINE_FEATURES_BACKFILL'>MACHINE_FEATURES_BACKFILL</link></filename>
3349 that should not be backfilled (i.e. added to
3350 <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>)
3351 during the build.
3352 See the "<link linkend='ref-features-backfill'>Feature backfilling</link>" section for
3353 more information.
3354 </para>
3355 </glossdef>
3356 </glossentry>
3357
3358 <glossentry id='var-MACHINEOVERRIDES'><glossterm>MACHINEOVERRIDES</glossterm>
3359 <glossdef>
3360 <para>
3361 Lists overrides specific to the current machine.
3362 By default, this list includes the value
3363 of <filename><link linkend='var-MACHINE'>MACHINE</link></filename>.
3364 You can extend the list to apply variable overrides for
3365 classes of machines.
3366 For example, all QEMU emulated machines (e.g. qemuarm,
3367 qemux86, and so forth) include a common file named
3368 <filename>meta/conf/machine/include/qemu.inc</filename>
3369 that prepends <filename>MACHINEOVERRIDES</filename> with
3370 the following variable override:
3371 <literallayout class='monospaced'>
3372 MACHINEOVERRIDES =. "qemuall:"
3373 </literallayout>
3374 Applying an override like <filename>qemuall</filename>
3375 affects all QEMU emulated machines elsewhere.
3376 Here is an example from the
3377 <filename>connman-conf</filename> recipe:
3378 <literallayout class='monospaced'>
3379 SRC_URI_append_qemuall = "file://wired.config \
3380 file://wired-setup \
3381 "
3382 </literallayout>
3383 </para>
3384 </glossdef>
3385 </glossentry>
3386
3387 <glossentry id='var-MAINTAINER'><glossterm>MAINTAINER</glossterm>
3388 <glossdef>
3389 <para>The email address of the distribution maintainer.</para>
3390 </glossdef>
3391 </glossentry>
3392
3393 <glossentry id='var-MIRRORS'><glossterm>MIRRORS</glossterm>
3394 <glossdef>
3395 <para>
3396 Specifies additional paths from which the OpenEmbedded
3397 build system gets source code.
3398 When the build system searches for source code, it first
3399 tries the local download directory.
3400 If that location fails, the build system tries locations
3401 defined by
3402 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>,
3403 the upstream source, and then locations specified by
3404 <filename>MIRRORS</filename> in that order.
3405 </para>
3406
3407 <para>
3408 Assuming your distribution
3409 (<link linkend='var-DISTRO'><filename>DISTRO</filename></link>)
3410 is "poky", the default value for
3411 <filename>MIRRORS</filename> is defined in the
3412 <filename>conf/distro/poky.conf</filename> file in the
3413 <filename>meta-yocto</filename> Git repository.
3414 </para>
3415 </glossdef>
3416 </glossentry>
3417
3418 <glossentry id='var-MLPREFIX'><glossterm>MLPREFIX</glossterm>
3419 <glossdef>
3420 <para>
3421 Specifies a prefix has been added to
3422 <link linkend='var-PN'><filename>PN</filename></link> to create a special version
3423 of a recipe or package, such as a Multilib version.
3424 The variable is used in places where the prefix needs to be
3425 added to or removed from a the name (e.g. the
3426 <link linkend='var-BPN'><filename>BPN</filename></link> variable).
3427 <filename>MLPREFIX</filename> gets set when a prefix has been
3428 added to <filename>PN</filename>.
3429 </para>
3430 </glossdef>
3431 </glossentry>
3432
3433 <glossentry id='var-MODULE_TARBALL_DEPLOY'><glossterm>MODULE_TARBALL_DEPLOY</glossterm>
3434 <glossdef>
3435 <para>
3436 Controls creation of the <filename>modules-*.tgz</filename>
3437 file.
3438 Set this variable to "0" to disable creation of this
3439 file, which contains all of the kernel modules resulting
3440 from a kernel build.
3441 </para>
3442 </glossdef>
3443 </glossentry>
3444
3445 <glossentry id='var-MULTIMACH_TARGET_SYS'><glossterm>MULTIMACH_TARGET_SYS</glossterm>
3446 <glossdef>
3447 <para>
3448 Separates files for different machines such that you can build
3449 for multiple target machines using the same output directories.
3450 See the <link linkend='var-STAMP'><filename>STAMP</filename></link> variable
3451 for an example.
3452 </para>
3453 </glossdef>
3454 </glossentry>
3455
3456 </glossdiv>
3457
3458 <glossdiv id='var-glossary-n'><title>N</title>
3459
3460 <glossentry id='var-NATIVELSBSTRING'><glossterm>NATIVELSBSTRING</glossterm>
3461 <glossdef>
3462 <para>
3463 A string identifying the host distribution.
3464 Strings consist of the host distributor ID
3465 followed by the release, as reported by the
3466 <filename>lsb_release</filename> tool
3467 or as read from <filename>/etc/lsb-release</filename>.
3468 For example, when running a build on Ubuntu 12.10, the value
3469 is "Ubuntu-12.10".
3470 If this information is unable to be determined, the value
3471 resolves to "Unknown".
3472 </para>
3473 <para>
3474 This variable is used by default to isolate native shared
3475 state packages for different distributions (e.g. to avoid
3476 problems with <filename>glibc</filename> version
3477 incompatibilities).
3478 Additionally, the variable is checked against
3479 <link linkend='var-SANITY_TESTED_DISTROS'><filename>SANITY_TESTED_DISTROS</filename></link>
3480 if that variable is set.
3481 </para>
3482 </glossdef>
3483 </glossentry>
3484
3485 <glossentry id='var-NO_RECOMMENDATIONS'><glossterm>NO_RECOMMENDATIONS</glossterm>
3486 <glossdef>
3487 <para>
3488 Prevents installation of all "recommended-only" packages.
3489 Recommended-only packages are packages installed only
3490 through the
3491 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
3492 variable).
3493 Setting the <filename>NO_RECOMMENDATIONS</filename> variable
3494 to "1" turns this feature on:
3495 <literallayout class='monospaced'>
3496 NO_RECOMMENDATIONS = "1"
3497 </literallayout>
3498 You can set this variable globally in your
3499 <filename>local.conf</filename> file or you can attach it to
3500 a specific image recipe by using the recipe name override:
3501 <literallayout class='monospaced'>
3502 NO_RECOMMENDATIONS_pn-&lt;target_image&gt; = "&lt;package_name&gt;"
3503 </literallayout>
3504 </para>
3505
3506 <para>
3507 It is important to realize that if you choose to not install
3508 packages using this variable and some other packages are
3509 dependent on them (i.e. listed in a recipe's
3510 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
3511 variable), the OpenEmbedded build system ignores your
3512 request and will install the packages to avoid dependency
3513 errors.
3514 <note>
3515 Some recommended packages might be required for certain
3516 system functionality, such as kernel modules.
3517 It is up to you to add packages with the
3518 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>
3519 variable.
3520 </note>
3521 </para>
3522
3523 <para>
3524 Support for this variable exists only when using the
3525 IPK and RPM packaging backend.
3526 Support does not exist for DEB.
3527 </para>
3528
3529 <para>
3530 See the
3531 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
3532 and the
3533 <link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
3534 variables for related information.
3535 </para>
3536 </glossdef>
3537 </glossentry>
3538 </glossdiv>
3539
3540 <glossdiv id='var-glossary-o'><title>O</title>
3541
3542 <glossentry id='var-OE_BINCONFIG_EXTRA_MANGLE'><glossterm>OE_BINCONFIG_EXTRA_MANGLE</glossterm>
3543 <glossdef>
3544 <para>
3545 When a recipe inherits the
3546 <filename>binconfig.bbclass</filename> class, this variable
3547 specifies additional arguments passed to the "sed" command.
3548 The sed command alters any paths in configuration scripts
3549 that have been set up during compilation.
3550 Inheriting this class results in all paths in these scripts
3551 being changed to point into the
3552 <filename>sysroots/</filename> directory so that all builds
3553 that use the script will use the correct directories
3554 for the cross compiling layout.
3555 </para>
3556
3557 <para>
3558 See the <filename>meta/classes/binconfig.bbclass</filename>
3559 in the
3560 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
3561 for details on how this class applies these additional
3562 sed command arguments.
3563 For general information on the
3564 <filename>binconfig.bbclass</filename> class, see the
3565 "<link linkend='ref-classes-binconfig'>Binary Configuration Scripts - <filename>binconfig.bbclass</filename></link>"
3566 section.
3567 </para>
3568 </glossdef>
3569 </glossentry>
3570
3571 <glossentry id='var-OE_IMPORTS'><glossterm>OE_IMPORTS</glossterm>
3572 <glossdef>
3573 <para>
3574 An internal variable used to tell the OpenEmbedded build
3575 system what Python modules to import for every Python
3576 function run by the system.
3577 </para>
3578
3579 <note>
3580 Do not set this variable.
3581 It is for internal use only.
3582 </note>
3583 </glossdef>
3584 </glossentry>
3585
3586 <glossentry id='var-OE_TERMINAL'><glossterm>OE_TERMINAL</glossterm>
3587 <glossdef>
3588 <para>
3589 Controls how the OpenEmbedded build system spawns
3590 interactive terminals on the host development system
3591 (e.g. using the BitBake command with the
3592 <filename>-c devshell</filename> command-line option).
3593 For more information, see the
3594 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section
3595 in the Yocto Project Development Manual.
3596 </para>
3597
3598 <para>
3599 You can use the following values for the
3600 <filename>OE_TERMINAL</filename> variable:
3601 <literallayout class='monospaced'>
3602 auto
3603 gnome
3604 xfce
3605 rxvt
3606 screen
3607 konsole
3608 none
3609 </literallayout>
3610 <note>Konsole support only works for KDE 3.x.
3611 Also, "auto" is the default behavior for
3612 <filename>OE_TERMINAL</filename></note>
3613 </para>
3614 </glossdef>
3615 </glossentry>
3616
3617 <glossentry id='var-OEROOT'><glossterm>OEROOT</glossterm>
3618 <glossdef>
3619 <para>
3620 The directory from which the top-level build environment
3621 setup script is sourced.
3622 The Yocto Project makes two top-level build environment
3623 setup scripts available:
3624 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
3625 and
3626 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>.
3627 When you run one of these scripts, the
3628 <filename>OEROOT</filename> variable resolves to the
3629 directory that holds the script.
3630 </para>
3631
3632 <para>
3633 For additional information on how this variable is used,
3634 see the initialization scripts.
3635 </para>
3636 </glossdef>
3637 </glossentry>
3638
3639 <glossentry id='var-OLDEST_KERNEL'><glossterm>OLDEST_KERNEL</glossterm>
3640 <glossdef>
3641 <para>
3642 Declares the oldest version of the Linux kernel that the
3643 produced binaries must support.
3644 This variable is passed into the build of the Embedded
3645 GNU C Library (<filename>eglibc</filename>).
3646 </para>
3647
3648 <para>
3649 The default for this variable comes from the
3650 <filename>meta/conf/bitbake.conf</filename> configuration
3651 file.
3652 You can override this default by setting the variable
3653 in a custom distribution configuration file.
3654 </para>
3655 </glossdef>
3656 </glossentry>
3657
3658 <glossentry id='var-OVERRIDES'><glossterm>OVERRIDES</glossterm>
3659 <glossdef>
3660 <para>
3661 BitBake uses <filename>OVERRIDES</filename> to control
3662 what variables are overridden after BitBake parses
3663 recipes and configuration files.
3664 You can find more information on how overrides are handled
3665 in the BitBake Manual that is located at
3666 <filename>bitbake/doc/manual</filename> in the
3667 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
3668 </para>
3669 </glossdef>
3670 </glossentry>
3671 </glossdiv>
3672
3673 <glossdiv id='var-glossary-p'><title>P</title>
3674
3675 <glossentry id='var-P'><glossterm>P</glossterm>
3676 <glossdef>
3677 <para>The recipe name and version.
3678 <filename>P</filename> is comprised of the following:
3679 <literallayout class='monospaced'>
3680 ${PN}-${PV}
3681 </literallayout></para>
3682 </glossdef>
3683 </glossentry>
3684
3685 <glossentry id='var-PACKAGE_ARCH'><glossterm>PACKAGE_ARCH</glossterm>
3686 <glossdef>
3687 <para>The architecture of the resulting package or packages.</para>
3688 </glossdef>
3689 </glossentry>
3690
3691 <glossentry id='var-PACKAGE_BEFORE_PN'><glossterm>PACKAGE_BEFORE_PN</glossterm>
3692 <glossdef>
3693 <para>Enables easily adding packages to
3694 <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
3695 before <filename>${<link linkend='var-PN'>PN</link>}</filename>
3696 so that those added packages can pick up files that would normally be
3697 included in the default package.</para>
3698 </glossdef>
3699 </glossentry>
3700
3701 <glossentry id='var-PACKAGE_CLASSES'><glossterm>PACKAGE_CLASSES</glossterm>
3702 <glossdef>
3703 <para>This variable, which is set in the <filename>local.conf</filename> configuration
3704 file found in the <filename>conf</filename> folder of the
3705 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
3706 specifies the package manager to use when packaging data.
3707 You can provide one or more arguments for the variable with the first
3708 argument being the package manager used to create images:
3709 <literallayout class='monospaced'>
3710 PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
3711 </literallayout>
3712 For information on build performance effects as a result of the
3713 package manager use, see
3714 <link linkend='ref-classes-package'>Packaging - <filename>package*.bbclass</filename></link>
3715 in this manual.
3716 </para>
3717 </glossdef>
3718 </glossentry>
3719
3720 <glossentry id='var-PACKAGE_EXCLUDE'><glossterm>PACKAGE_EXCLUDE</glossterm>
3721 <glossdef>
3722 <para>
3723 Lists packages that should not be installed into an image.
3724 For example:
3725 <literallayout class='monospaced'>
3726 PACKAGE_EXCLUDE = "&lt;package_name&gt; &lt;package_name&gt; &lt;package_name&gt; ..."
3727 </literallayout>
3728 You can set this variable globally in your
3729 <filename>local.conf</filename> file or you can attach it to
3730 a specific image recipe by using the recipe name override:
3731 <literallayout class='monospaced'>
3732 PACKAGE_EXCLUDE_pn-&lt;target_image&gt; = "&lt;package_name&gt;"
3733 </literallayout>
3734 </para>
3735
3736 <para>
3737 If you choose to not install
3738 a package using this variable and some other package is
3739 dependent on it (i.e. listed in a recipe's
3740 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
3741 variable), the OpenEmbedded build system generates a fatal
3742 installation error.
3743 Because the build system halts the process with a fatal
3744 error, you can use the variable with an iterative
3745 development process to remove specific components from a
3746 system.
3747 </para>
3748
3749 <para>
3750 Support for this variable exists only when using the
3751 IPK and RPM packaging backend.
3752 Support does not exist for DEB.
3753 </para>
3754
3755 <para>
3756 See the
3757 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>
3758 and the
3759 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
3760 variables for related information.
3761 </para>
3762 </glossdef>
3763 </glossentry>
3764
3765 <glossentry id='var-PACKAGE_EXTRA_ARCHS'><glossterm>PACKAGE_EXTRA_ARCHS</glossterm>
3766 <glossdef>
3767 <para>Specifies the list of architectures compatible with the device CPU.
3768 This variable is useful when you build for several different devices that use
3769 miscellaneous processors such as XScale and ARM926-EJS).</para>
3770 </glossdef>
3771 </glossentry>
3772
3773 <glossentry id='var-PACKAGE_GROUP'><glossterm>PACKAGE_GROUP</glossterm>
3774 <glossdef>
3775 <para>
3776 Defines one or more packages to include in an image when
3777 a specific item is included in
3778 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
3779 When setting the value, <filename>PACKAGE_GROUP</filename>
3780 should have the name of the feature item as an override.
3781 Here is an example:
3782 <literallayout class='monospaced'>
3783 PACKAGE_GROUP_widget = "package1 package2"
3784 </literallayout>
3785 In this example, if "widget" were added to
3786 <filename>IMAGE_FEATURES</filename>, "package1" and
3787 "package2" would be included in the image.
3788 <note>
3789 Packages installed by features defined through
3790 <filename>PACKAGE_GROUP</filename> are often package
3791 groups.
3792 While similarly named, you should not confuse the
3793 <filename>PACKAGE_GROUP</filename> variable with
3794 package groups, which are discussed elsewhere in the
3795 documentation.
3796 </note>
3797 </para>
3798 </glossdef>
3799 </glossentry>
3800
3801 <glossentry id='var-PACKAGE_INSTALL'><glossterm>PACKAGE_INSTALL</glossterm>
3802 <glossdef>
3803 <para>
3804 The final list of packages passed to the package manager
3805 for installation into the image.
3806 Because the package manager controls actual installation
3807 of all packages, the list of packages passed using
3808 <filename>PACKAGE_INSTALL</filename> is not the final list
3809 of packages that are actually installed.
3810 </para>
3811
3812 <para>
3813 This variable is internal to the image construction
3814 code.
3815 Use the
3816 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>
3817 variable to specify packages for installation.
3818 </para>
3819 </glossdef>
3820 </glossentry>
3821
3822 <glossentry id='var-PACKAGECONFIG'><glossterm>PACKAGECONFIG</glossterm>
3823 <glossdef>
3824 <para>
3825 This variable provides a means of enabling or disabling
3826 features of a recipe on a per-recipe basis.
3827 <filename>PACKAGECONFIG</filename> blocks are defined
3828 in recipes when you specify features and then arguments
3829 that define feature behaviors.
3830 Here is the basic block structure:
3831 <literallayout class='monospaced'>
3832 PACKAGECONFIG ??= "f1 f2 f3 ..."
3833 PACKAGECONFIG[f1] = "--with-f1,--without-f1,build-deps-f1,rt-deps-f1"
3834 PACKAGECONFIG[f2] = "--with-f2,--without-f2,build-deps-f2,rt-deps-f2"
3835 PACKAGECONFIG[f3] = "--with-f3,--without-f3,build-deps-f3,rt-deps-f3"
3836 </literallayout>
3837 The <filename>PACKAGECONFIG</filename>
3838 variable itself specifies a space-separated list of the
3839 features to enable.
3840 Following the features, you can determine the behavior of
3841 each feature by providing up to four order-dependent
3842 arguments, which are separated by commas.
3843 You can omit any argument you like but must retain the
3844 separating commas.
3845 The order is important and specifies the following:
3846 <orderedlist>
3847 <listitem><para>Extra arguments
3848 that should be added to the configure script
3849 argument list
3850 (<link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>)
3851 if the feature is enabled.</para></listitem>
3852 <listitem><para>Extra arguments
3853 that should be added to <filename>EXTRA_OECONF</filename>
3854 if the feature is disabled.
3855 </para></listitem>
3856 <listitem><para>Additional build dependencies
3857 (<link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>)
3858 that should be added if the feature is enabled.
3859 </para></listitem>
3860 <listitem><para>Additional runtime dependencies
3861 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
3862 that should be added if the feature is enabled.
3863 </para></listitem>
3864 </orderedlist>
3865 </para>
3866
3867 <para>
3868 Consider the following
3869 <filename>PACKAGECONFIG</filename> block taken from the
3870 <filename>librsvg</filename> recipe.
3871 In this example the feature is <filename>croco</filename>,
3872 which has three arguments that determine the feature's
3873 behavior.
3874 <literallayout class='monospaced'>
3875 PACKAGECONFIG ??= "croco"
3876 PACKAGECONFIG[croco] = "--with-croco,--without-croco,libcroco"
3877 </literallayout>
3878 The <filename>--with-croco</filename> and
3879 <filename>libcroco</filename> arguments apply only if
3880 the feature is enabled.
3881 In this case, <filename>--with-croco</filename> is
3882 added to the configure script argument list and
3883 <filename>libcroco</filename> is added to
3884 <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename>.
3885 On the other hand, if the feature is disabled say through
3886 a <filename>.bbappend</filename> file in another layer, then
3887 the second argument <filename>--without-croco</filename> is
3888 added to the configure script rather than
3889 <filename>--with-croco</filename>.
3890 </para>
3891
3892 <para>
3893 The basic <filename>PACKAGECONFIG</filename> structure
3894 previously described holds true regardless of whether you
3895 are creating a block or changing a block.
3896 When creating a block, use the structure inside your
3897 recipe.
3898 </para>
3899
3900 <para>
3901 If you want to change an existing
3902 <filename>PACKAGECONFIG</filename> block, you can do so
3903 one of two ways:
3904 <itemizedlist>
3905 <listitem><para><emphasis>Append file:</emphasis>
3906 Create an append file named
3907 <filename>&lt;recipename&gt;.bbappend</filename> in your
3908 layer and override the value of
3909 <filename>PACKAGECONFIG</filename>.
3910 You can either completely override the variable:
3911 <literallayout class='monospaced'>
3912 PACKAGECONFIG="f4 f5"
3913 </literallayout>
3914 Or, you can just append the variable:
3915 <literallayout class='monospaced'>
3916 PACKAGECONFIG_append = " f4"
3917 </literallayout></para></listitem>
3918 <listitem><para><emphasis>Configuration file:</emphasis>
3919 This method is identical to changing the block
3920 through an append file except you edit your
3921 <filename>local.conf</filename> or
3922 <filename>&lt;mydistro&gt;.conf</filename> file.
3923 As with append files previously described,
3924 you can either completely override the variable:
3925 <literallayout class='monospaced'>
3926 PACKAGECONFIG_pn-&lt;recipename&gt;="f4 f5"
3927 </literallayout>
3928 Or, you can just amended the variable:
3929 <literallayout class='monospaced'>
3930 PACKAGECONFIG_append_pn-&lt;recipename&gt; = " f4"
3931 </literallayout></para></listitem>
3932 </itemizedlist>
3933 </para>
3934 </glossdef>
3935 </glossentry>
3936
3937 <glossentry id='var-PACKAGES'><glossterm>PACKAGES</glossterm>
3938 <glossdef>
3939 <para>The list of packages to be created from the recipe.
3940 The default value is the following:
3941 <literallayout class='monospaced'>
3942 ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
3943 </literallayout></para>
3944 </glossdef>
3945 </glossentry>
3946
3947 <glossentry id='var-PACKAGES_DYNAMIC'><glossterm>PACKAGES_DYNAMIC</glossterm>
3948 <glossdef>
3949 <para>
3950 A promise that your recipe satisfies runtime dependencies
3951 for optional modules that are found in other recipes.
3952 <filename>PACKAGES_DYNAMIC</filename>
3953 does not actually satisfy the dependencies, it only states that
3954 they should be satisfied.
3955 For example, if a hard, runtime dependency
3956 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
3957 of another package is satisfied
3958 at build time through the <filename>PACKAGES_DYNAMIC</filename>
3959 variable, but a package with the module name is never actually
3960 produced, then the other package will be broken.
3961 Thus, if you attempt to include that package in an image,
3962 you will get a dependency failure from the packaging system
3963 during <filename>do_rootfs</filename>.
3964 </para>
3965 <para>
3966 Typically, if there is a chance that such a situation can
3967 occur and the package that is not created is valid
3968 without the dependency being satisfied, then you should use
3969 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
3970 (a soft runtime dependency) instead of
3971 <filename>RDEPENDS</filename>.
3972 </para>
3973
3974 <para>
3975 For an example of how to use the <filename>PACKAGES_DYNAMIC</filename>
3976 variable when you are splitting packages, see the
3977 "<ulink url='&YOCTO_DOCS_DEV_URL;#handling-optional-module-packaging'>Handling Optional Module Packaging</ulink>" section
3978 in the Yocto Project Development Manual.
3979 </para>
3980 </glossdef>
3981 </glossentry>
3982
3983 <glossentry id='var-PARALLEL_MAKE'><glossterm>PARALLEL_MAKE</glossterm>
3984 <glossdef>
3985 <para>
3986 Extra options that are passed to the
3987 <filename>make</filename> command during the
3988 <filename>do_compile</filename> task in order to specify
3989 parallel compilation.
3990 This variable is usually in the form
3991 <filename>-j 4</filename>, where the number
3992 represents the maximum number of parallel threads make can
3993 run.
3994 If you development host supports multiple cores a good
3995 rule of thumb is to set this variable to twice the number
3996 of cores on the host.
3997 <note>
3998 Individual recipes might clear out this variable if
3999 the software being built has problems running its
4000 <filename>make</filename> process in parallel.
4001 </note>
4002 </para>
4003 </glossdef>
4004 </glossentry>
4005
4006 <glossentry id='var-PARALLEL_MAKEINST'><glossterm>PARALLEL_MAKEINST</glossterm>
4007 <glossdef>
4008 <para>
4009 Extra options passed to the
4010 <filename>make install</filename> command during the
4011 <filename>do_install</filename> task in order to specify
4012 parallel installation.
4013 This variable defaults to the value of
4014 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>.
4015 <note>
4016 Individual recipes might clear out this variable if
4017 the software being built has problems running its
4018 <filename>make install</filename> process in parallel.
4019 </note>
4020 </para>
4021 </glossdef>
4022 </glossentry>
4023
4024 <glossentry id='var-PATCHRESOLVE'><glossterm>PATCHRESOLVE</glossterm>
4025 <glossdef>
4026 <para>
4027 Determines the action to take when a patch fails.
4028 You can set this variable to one of two values: "noop" and
4029 "user".
4030 </para>
4031
4032 <para>
4033 The default value of "noop" causes the build to simply fail
4034 when the OpenEmbedded build system cannot successfully
4035 apply a patch.
4036 Setting the value to "user" causes the build system to
4037 launch a shell and places you in the right location so that
4038 you can manually resolve the conflicts.
4039 </para>
4040
4041 <para>
4042 Set this variable in your
4043 <filename>local.conf</filename> file.
4044 </para>
4045 </glossdef>
4046 </glossentry>
4047
4048 <glossentry id='var-PATCHTOOL'><glossterm>PATCHTOOL</glossterm>
4049 <glossdef>
4050 <para>
4051 Specifies the utility used to apply patches for a recipe
4052 during <filename>do_patch</filename>.
4053 You can specify one of three utilities: "patch", "quilt", or
4054 "git".
4055 The default utility used is "quilt" except for the
4056 quilt-native recipe itself.
4057 Because the quilt tool is not available at the
4058 time quilt-native is being patched, it uses "patch".
4059 </para>
4060
4061 <para>
4062 If you wish to use an alternative patching tool, set the
4063 variable in the recipe using one of the following:
4064 <literallayout class='monospaced'>
4065 PATCHTOOL = "patch"
4066 PATCHTOOL = "quilt"
4067 PATCHTOOL = "git"
4068 </literallayout>
4069 </para>
4070 </glossdef>
4071 </glossentry>
4072
4073 <glossentry id='var-PE'><glossterm>PE</glossterm>
4074 <glossdef>
4075 <para>
4076 the epoch of the recipe.
4077 By default, this variable is unset.
4078 The field is used to make upgrades possible when the
4079 versioning scheme changes in some backwards incompatible
4080 way.
4081 </para>
4082 </glossdef>
4083 </glossentry>
4084
4085 <glossentry id='var-PF'><glossterm>PF</glossterm>
4086 <glossdef>
4087 <para>Specifies the recipe or package name and includes all version and revision
4088 numbers (i.e. <filename>eglibc-2.13-r20+svnr15508/</filename> and
4089 <filename>bash-4.2-r1/</filename>).
4090 This variable is comprised of the following:
4091 <literallayout class='monospaced'>
4092 ${<link linkend='var-PN'>PN</link>}-${<link linkend='var-EXTENDPE'>EXTENDPE</link>}${<link linkend='var-PV'>PV</link>}-${<link linkend='var-PR'>PR</link>}
4093 </literallayout></para>
4094 </glossdef>
4095 </glossentry>
4096
4097 <glossentry id='var-PKGD'><glossterm>PKGD</glossterm>
4098 <glossdef>
4099 <para>
4100 Points to the destination directory for files to be
4101 packaged before they are split into individual packages.
4102 This directory defaults to the following:
4103 <literallayout class='monospaced'>
4104 ${WORKDIR}/package
4105 </literallayout>
4106 Do not change this default.
4107 </para>
4108 </glossdef>
4109 </glossentry>
4110
4111 <glossentry id='var-PKGDATA_DIR'><glossterm>PKGDATA_DIR</glossterm>
4112 <glossdef>
4113 <para>
4114 Points to a shared, global-state directory that holds data
4115 generated during the packaging process.
4116 During the packaging process, the
4117 <filename>do_packagedata</filename> task packages
4118 data for each recipe and installs it into this temporary,
4119 shared area.
4120 This directory defaults to the following:
4121 <literallayout class='monospaced'>
4122 ${STAGING_DIR_HOST}/pkgdata
4123 </literallayout>
4124 Do not change this default.
4125 </para>
4126 </glossdef>
4127 </glossentry>
4128
4129 <glossentry id='var-PKGDEST'><glossterm>PKGDEST</glossterm>
4130 <glossdef>
4131 <para>
4132 Points to the parent directory for files to be packaged
4133 after they have been split into individual packages.
4134 This directory defaults to the following:
4135 <literallayout class='monospaced'>
4136 ${WORKDIR}/packages-split
4137 </literallayout>
4138 Under this directory, the build system creates
4139 directories for each package specified in
4140 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>.
4141 Do not change this default.
4142 </para>
4143 </glossdef>
4144 </glossentry>
4145
4146 <glossentry id='var-PKGDESTWORK'><glossterm>PKGDESTWORK</glossterm>
4147 <glossdef>
4148 <para>
4149 Points to a temporary work area used by the
4150 <filename>do_package</filename> task to write output
4151 from the <filename>do_packagedata</filename> task.
4152 The <filename>PKGDESTWORK</filename> location defaults to
4153 the following:
4154 <literallayout class='monospaced'>
4155 ${WORKDIR}/pkgdata
4156 </literallayout>
4157 The <filename>do_packagedata</filename> task then packages
4158 the data in the temporary work area and installs it into a
4159 shared directory pointed to by
4160 <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>.
4161 </para>
4162
4163 <para>
4164 Do not change this default.
4165 </para>
4166 </glossdef>
4167 </glossentry>
4168
4169 <glossentry id='var-PN'><glossterm>PN</glossterm>
4170 <glossdef>
4171 <para>This variable can have two separate functions depending on the context: a recipe
4172 name or a resulting package name.</para>
4173 <para><filename>PN</filename> refers to a recipe name in the context of a file used
4174 by the OpenEmbedded build system as input to create a package.
4175 The name is normally extracted from the recipe file name.
4176 For example, if the recipe is named
4177 <filename>expat_2.0.1.bb</filename>, then the default value of <filename>PN</filename>
4178 will be "expat".</para>
4179 <para>
4180 The variable refers to a package name in the context of a file created or produced by the
4181 OpenEmbedded build system.</para>
4182 <para>If applicable, the <filename>PN</filename> variable also contains any special
4183 suffix or prefix.
4184 For example, using <filename>bash</filename> to build packages for the native
4185 machine, <filename>PN</filename> is <filename>bash-native</filename>.
4186 Using <filename>bash</filename> to build packages for the target and for Multilib,
4187 <filename>PN</filename> would be <filename>bash</filename> and
4188 <filename>lib64-bash</filename>, respectively.
4189 </para>
4190 </glossdef>
4191 </glossentry>
4192
4193 <glossentry id='var-PR'><glossterm>PR</glossterm>
4194 <glossdef>
4195 <para>The revision of the recipe.
4196 The default value for this variable is "r0".
4197 </para>
4198 </glossdef>
4199 </glossentry>
4200
4201 <glossentry id='var-PREFERRED_PROVIDER'><glossterm>PREFERRED_PROVIDER</glossterm>
4202 <glossdef>
4203 <para>
4204 If multiple recipes provide an item, this variable
4205 determines which recipe should be given preference.
4206 You should always suffix the variable with the name of the
4207 provided item, and you should set it to the
4208 <link linkend='var-PN'><filename>PN</filename></link>
4209 of the recipe to which you want to give precedence.
4210 Some examples:
4211 <literallayout class='monospaced'>
4212 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
4213 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
4214 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
4215 </literallayout>
4216 </para>
4217 </glossdef>
4218 </glossentry>
4219
4220 <glossentry id='var-PREFERRED_VERSION'><glossterm>PREFERRED_VERSION</glossterm>
4221 <glossdef>
4222 <para>
4223 If there are multiple versions of recipes available, this
4224 variable determines which recipe should be given preference.
4225 You must always suffix the variable with the
4226 <link linkend='var-PN'><filename>PN</filename></link>
4227 you want to select, and you should set the
4228 <link linkend='var-PV'><filename>PV</filename></link>
4229 accordingly for precedence.
4230 You can use the "<filename>%</filename>" character as a
4231 wildcard to match any number of characters, which can be
4232 useful when specifying versions that contain long revision
4233 numbers that could potentially change.
4234 Here are two examples:
4235 <literallayout class='monospaced'>
4236 PREFERRED_VERSION_python = "2.7.3"
4237 PREFERRED_VERSION_linux-yocto = "3.10%"
4238 </literallayout>
4239 </para>
4240 </glossdef>
4241 </glossentry>
4242
4243 <glossentry id='var-PREMIRRORS'><glossterm>PREMIRRORS</glossterm>
4244 <glossdef>
4245 <para>
4246 Specifies additional paths from which the OpenEmbedded
4247 build system gets source code.
4248 When the build system searches for source code, it first
4249 tries the local download directory.
4250 If that location fails, the build system tries locations
4251 defined by <filename>PREMIRRORS</filename>, the upstream
4252 source, and then locations specified by
4253 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
4254 in that order.
4255 </para>
4256
4257 <para>
4258 Assuming your distribution
4259 (<link linkend='var-DISTRO'><filename>DISTRO</filename></link>)
4260 is "poky", the default value for
4261 <filename>PREMIRRORS</filename> is defined in the
4262 <filename>conf/distro/poky.conf</filename> file in the
4263 <filename>meta-yocto</filename> Git repository.
4264 </para>
4265
4266 <para>
4267 Typically, you could add a specific server for the
4268 build system to attempt before any others by adding
4269 something like the following to the
4270 <filename>local.conf</filename> configuration file in the
4271 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
4272 <literallayout class='monospaced'>
4273 PREMIRRORS_prepend = "\
4274 git://.*/.* http://www.yoctoproject.org/sources/ \n \
4275 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
4276 http://.*/.* http://www.yoctoproject.org/sources/ \n \
4277 https://.*/.* http://www.yoctoproject.org/sources/ \n"
4278 </literallayout>
4279 These changes cause the build system to intercept
4280 Git, FTP, HTTP, and HTTPS requests and direct them to
4281 the <filename>http://</filename> sources mirror.
4282 You can use <filename>file://</filename> URLs to point
4283 to local directories or network shares as well.
4284 </para>
4285 </glossdef>
4286 </glossentry>
4287
4288 <glossentry id='var-PRINC'><glossterm>PRINC</glossterm>
4289 <glossdef>
4290 <para>Causes the <link linkend='var-PR'><filename>PR</filename></link>
4291 variable of <filename>.bbappend</filename> files to
4292 dynamically increment.
4293 This increment minimizes the impact of layer ordering.</para>
4294 <para>In order to ensure multiple <filename>.bbappend</filename> files can co-exist,
4295 <filename>PRINC</filename> should be self-referencing.
4296 This variable defaults to 0.</para>
4297 <para>Following is an example that increments <filename>PR</filename> by two:
4298 <literallayout class='monospaced'>
4299 PRINC := "${@int(PRINC) + 2}"
4300 </literallayout>
4301 It is advisable not to use strings such as ".= '.1'" with the variable because
4302 this usage is very sensitive to layer ordering.
4303 You should avoid explicit assignments as they cannot
4304 adequately represent multiple
4305 <filename>.bbappend</filename> files.</para>
4306 </glossdef>
4307 </glossentry>
4308
4309 <glossentry id='var-PROVIDES'><glossterm>PROVIDES</glossterm>
4310 <glossdef>
4311 <para>
4312 A list of aliases that a recipe also provides.
4313 These aliases are useful for satisfying dependencies of
4314 other recipes during the build (as specified by
4315 <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename>).
4316 <note>
4317 A recipe's own
4318 <filename><link linkend='var-PN'>PN</link></filename>
4319 is implicitly already in its
4320 <filename>PROVIDES</filename> list.
4321 </note>
4322 </para>
4323 </glossdef>
4324 </glossentry>
4325
4326 <glossentry id='var-PV'><glossterm>PV</glossterm>
4327 <glossdef>
4328 <para>The version of the recipe.
4329 The version is normally extracted from the recipe filename.
4330 For example, if the recipe is named
4331 <filename>expat_2.0.1.bb</filename>, then the default value of <filename>PV</filename>
4332 will be "2.0.1".
4333 <filename>PV</filename> is generally not overridden within
4334 a recipe unless it is building an unstable (i.e. development) version from a source code repository
4335 (e.g. Git or Subversion).
4336 </para>
4337 </glossdef>
4338 </glossentry>
4339
4340 </glossdiv>
4341
4342<!-- <glossdiv id='var-glossary-q'><title>Q</title>-->
4343<!-- </glossdiv>-->
4344
4345 <glossdiv id='var-glossary-r'><title>R</title>
4346
4347 <glossentry id='var-RCONFLICTS'><glossterm>RCONFLICTS</glossterm>
4348 <glossdef>
4349 <para>
4350 The list of packages that conflict with packages.
4351 Note that packages will not be installed if conflicting
4352 packages are not first removed.
4353 </para>
4354
4355 <para>
4356 Like all package-controlling variables, you must always use
4357 them in conjunction with a package name override.
4358 Here is an example:
4359 <literallayout class='monospaced'>
4360 RCONFLICTS_${PN} = "another-conflicting-package-name"
4361 </literallayout>
4362 </para>
4363
4364 <para>
4365 BitBake, which the OpenEmbedded build system uses, supports
4366 specifying versioned dependencies.
4367 Although the syntax varies depending on the packaging
4368 format, BitBake hides these differences from you.
4369 Here is the general syntax to specify versions with
4370 the <filename>RCONFLICTS</filename> variable:
4371 <literallayout class='monospaced'>
4372 RCONFLICTS_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
4373 </literallayout>
4374 For <filename>operator</filename>, you can specify the
4375 following:
4376 <literallayout class='monospaced'>
4377 =
4378 &lt;
4379 &gt;
4380 &lt;=
4381 &gt;=
4382 </literallayout>
4383 For example, the following sets up a dependency on version
4384 1.2 or greater of the package <filename>foo</filename>:
4385 <literallayout class='monospaced'>
4386 RCONFLICTS_${PN} = "foo (>= 1.2)"
4387 </literallayout>
4388 </para>
4389 </glossdef>
4390 </glossentry>
4391
4392 <glossentry id='var-RDEPENDS'><glossterm>RDEPENDS</glossterm>
4393 <glossdef>
4394 <para>
4395 Lists a package's runtime dependencies (i.e. other packages)
4396 that must be installed in order for the built package to run
4397 correctly.
4398 If a package in this list cannot be found during the build,
4399 you will get a build error.
4400 </para>
4401
4402 <para>
4403 When you use the <filename>RDEPENDS</filename> variable
4404 in a recipe, you are essentially stating that the recipe's
4405 <filename>do_build</filename> task depends on the existence
4406 of a specific package.
4407 Consider this simple example for two recipes named "a" and
4408 "b" that produce similarly named packages.
4409 In this example, the <filename>RDEPENDS</filename>
4410 statement appears in the "a" recipe:
4411 <literallayout class='monospaced'>
4412 RDEPENDS_${PN} = "b"
4413 </literallayout>
4414 Here, the dependency is such that the
4415 <filename>do_build</filename> task for recipe "a" depends
4416 on the <filename>do_package_write</filename> task
4417 of recipe "b".
4418 This means the package file for "b" must be available when
4419 the output for recipe "a" has been completely built.
4420 More importantly, package "a" will be marked as depending
4421 on package "b" in a manner that is understood by the
4422 package manager in use (i.e. rpm, opkg, or dpkg).
4423 </para>
4424
4425 <para>
4426 The names of the packages you list within
4427 <filename>RDEPENDS</filename> must be the names of other
4428 packages - they cannot be recipe names.
4429 Although package names and recipe names usually match,
4430 the important point here is that you are
4431 providing package names within the
4432 <filename>RDEPENDS</filename> variable.
4433 For an example of the default list of packages created from
4434 a recipe, see the
4435 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
4436 variable.
4437 </para>
4438
4439 <para>
4440 Because the <filename>RDEPENDS</filename> variable applies
4441 to packages being built, you should always use the variable
4442 in a form with an attached package name.
4443 For example, suppose you are building a development package
4444 that depends on the <filename>perl</filename> package.
4445 In this case, you would use the following
4446 <filename>RDEPENDS</filename> statement:
4447 <literallayout class='monospaced'>
4448 RDEPENDS_${PN}-dev += "perl"
4449 </literallayout>
4450 In the example, the development package depends on
4451 the <filename>perl</filename> package.
4452 Thus, the <filename>RDEPENDS</filename> variable has the
4453 <filename>${PN}-dev</filename> package name as part of the
4454 variable.
4455 </para>
4456
4457 <para>
4458 The package name you attach to the
4459 <filename>RDEPENDS</filename> variable must appear
4460 as it would in the <filename>PACKAGES</filename>
4461 namespace before any renaming of the output package by
4462 classes like <filename>debian.bbclass</filename>.
4463 </para>
4464
4465 <para>
4466 In many cases you do not need to explicitly add
4467 runtime dependencies using
4468 <filename>RDEPENDS</filename> since some automatic
4469 handling occurs:
4470 <itemizedlist>
4471 <listitem><para><emphasis><filename>shlibdeps</filename></emphasis>: If
4472 a runtime package contains a shared library
4473 (<filename>.so</filename>), the build
4474 processes the library in order to determine other
4475 libraries to which it is dynamically linked.
4476 The build process adds these libraries to
4477 <filename>RDEPENDS</filename> when creating the runtime
4478 package.</para></listitem>
4479 <listitem><para><emphasis><filename>pcdeps</filename></emphasis>: If
4480 the package ships a <filename>pkg-config</filename>
4481 information file, the build process uses this file
4482 to add items to the <filename>RDEPENDS</filename>
4483 variable to create the runtime packages.
4484 </para></listitem>
4485 </itemizedlist>
4486 </para>
4487
4488 <para>
4489 BitBake, which the OpenEmbedded build system uses, supports
4490 specifying versioned dependencies.
4491 Although the syntax varies depending on the packaging
4492 format, BitBake hides these differences from you.
4493 Here is the general syntax to specify versions with
4494 the <filename>RDEPENDS</filename> variable:
4495 <literallayout class='monospaced'>
4496 RDEPENDS_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
4497 </literallayout>
4498 For <filename>operator</filename>, you can specify the
4499 following:
4500 <literallayout class='monospaced'>
4501 =
4502 &lt;
4503 &gt;
4504 &lt;=
4505 &gt;=
4506 </literallayout>
4507 For example, the following sets up a dependency on version
4508 1.2 or greater of the package <filename>foo</filename>:
4509 <literallayout class='monospaced'>
4510 RDEPENDS_${PN} = "foo (>= 1.2)"
4511 </literallayout>
4512 </para>
4513
4514 <para>
4515 For information on build-time dependencies, see the
4516 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
4517 variable.
4518 </para>
4519 </glossdef>
4520 </glossentry>
4521
4522 <glossentry id='var-RM_OLD_IMAGE'><glossterm>RM_OLD_IMAGE</glossterm>
4523 <glossdef>
4524 <para>
4525 Reclaims disk space by removing previously built
4526 versions of the same image from the
4527 <filename>images</filename> directory pointed to by the
4528 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>
4529 variable.
4530 </para>
4531
4532 <para>
4533 Set this variable to "1" in your
4534 <filename>local.conf</filename> file to remove these
4535 images.
4536 </para>
4537 </glossdef>
4538 </glossentry>
4539
4540 <glossentry id='var-RM_WORK_EXCLUDE'><glossterm>RM_WORK_EXCLUDE</glossterm>
4541 <glossdef>
4542 <para>
4543 With <filename>rm_work</filename> enabled, this
4544 variable specifies a list of recipes whose work directories
4545 should not be removed.
4546 See the "<link linkend='ref-classes-rm-work'>Removing Work Files During the Build - <filename>rm_work.bbclass</filename></link>"
4547 section for more details.
4548 </para>
4549 </glossdef>
4550 </glossentry>
4551
4552 <glossentry id='var-ROOTFS_POSTPROCESS_COMMAND'><glossterm>ROOTFS_POSTPROCESS_COMMAND</glossterm>
4553 <glossdef>
4554 <para>
4555 Added by classes to run post processing commands once the
4556 OpenEmbedded build system has created the root filesystem.
4557 You can specify shell commands separated by semicolons:
4558 <literallayout class='monospaced'>
4559 ROOTFS_POSTPROCESS_COMMAND += "&lt;shell_command&gt;; ... "
4560 </literallayout>
4561 If you need to pass the path to the root filesystem within
4562 the command, you can use
4563 <filename>${IMAGE_ROOTFS}</filename>, which points to
4564 the root filesystem image.
4565 </para>
4566 </glossdef>
4567 </glossentry>
4568
4569 <glossentry id='var-RPROVIDES'><glossterm>RPROVIDES</glossterm>
4570 <glossdef>
4571 <para>
4572 A list of package name aliases that a package also provides.
4573 These aliases are useful for satisfying runtime dependencies
4574 of other packages both during the build and on the target
4575 (as specified by
4576 <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename>).
4577 <note>
4578 A package's own name is implicitly already in its
4579 <filename>RPROVIDES</filename> list.
4580 </note>
4581 </para>
4582 <para>
4583 As with all package-controlling variables, you must always
4584 use the variable in conjunction with a package name override.
4585 Here is an example:
4586 <literallayout class='monospaced'>
4587 RPROVIDES_${PN} = "widget-abi-2"
4588 </literallayout>
4589 </para>
4590 </glossdef>
4591 </glossentry>
4592
4593 <glossentry id='var-RRECOMMENDS'><glossterm>RRECOMMENDS</glossterm>
4594 <glossdef>
4595 <para>
4596 A list of packages that extends the usability of a package
4597 being built.
4598 The package being built does not depend on this list of
4599 packages in order to successfully build, but needs them for
4600 the extended usability.
4601 To specify runtime dependencies for packages, see the
4602 <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename>
4603 variable.
4604 </para>
4605
4606 <para>
4607 The OpenEmbedded build process automatically installs the
4608 list of packages as part of the built package.
4609 However, you can remove these packages later if you want.
4610 If, during the build, a package from the
4611 <filename>RRECOMMENDS</filename> list cannot be
4612 found, the build process continues without an error.
4613 </para>
4614
4615 <para>
4616 You can also prevent packages in the list from being
4617 installed by using several variables.
4618 See the
4619 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>,
4620 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>,
4621 and
4622 <link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
4623 variables for more information.
4624 </para>
4625
4626 <para>
4627 Because the <filename>RRECOMMENDS</filename> variable
4628 applies to packages being built, you should always attach
4629 an override to the variable to specify the particular
4630 package whose usability is being extended.
4631 For example, suppose you are building a development package
4632 that is extended to support wireless functionality.
4633 In this case, you would use the following:
4634 <literallayout class='monospaced'>
4635 RRECOMMENDS_${PN}-dev += "&lt;wireless_package_name&gt;"
4636 </literallayout>
4637 In the example, the package name
4638 (<filename>${<link linkend='var-PN'>PN</link>}-dev</filename>)
4639 must appear as it would in the
4640 <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
4641 namespace before any renaming of the output package by
4642 classes such as <filename>debian.bbclass</filename>.
4643 </para>
4644
4645 <para>
4646 BitBake, which the OpenEmbedded build system uses, supports
4647 specifying versioned recommends.
4648 Although the syntax varies depending on the packaging
4649 format, BitBake hides these differences from you.
4650 Here is the general syntax to specify versions with
4651 the <filename>RRECOMMENDS</filename> variable:
4652 <literallayout class='monospaced'>
4653 RRECOMMENDS_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
4654 </literallayout>
4655 For <filename>operator</filename>, you can specify the
4656 following:
4657 <literallayout class='monospaced'>
4658 =
4659 &lt;
4660 &gt;
4661 &lt;=
4662 &gt;=
4663 </literallayout>
4664 For example, the following sets up a recommend on version
4665 1.2 or greater of the package <filename>foo</filename>:
4666 <literallayout class='monospaced'>
4667 RRECOMMENDS_${PN} = "foo (>= 1.2)"
4668 </literallayout>
4669 </para>
4670 </glossdef>
4671 </glossentry>
4672
4673 <glossentry id='var-RREPLACES'><glossterm>RREPLACES</glossterm>
4674 <glossdef>
4675 <para>
4676 A list of packages replaced by a package.
4677 The package manager uses this variable to determine which
4678 package should be installed to replace other package(s)
4679 during an upgrade.
4680 In order to also have the other package(s) removed at the
4681 same time, you must add the name of the other
4682 package to the
4683 <filename><link linkend='var-RCONFLICTS'>RCONFLICTS</link></filename> variable.
4684 </para>
4685 <para>
4686 As with all package-controlling variables, you must use
4687 this variable in conjunction with a package name
4688 override.
4689 Here is an example:
4690 <literallayout class='monospaced'>
4691 RREPLACES_${PN} = "other-package-being-replaced"
4692 </literallayout>
4693 </para>
4694
4695 <para>
4696 BitBake, which the OpenEmbedded build system uses, supports
4697 specifying versioned replacements.
4698 Although the syntax varies depending on the packaging
4699 format, BitBake hides these differences from you.
4700 Here is the general syntax to specify versions with
4701 the <filename>RREPLACES</filename> variable:
4702 <literallayout class='monospaced'>
4703 RREPLACES_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
4704 </literallayout>
4705 For <filename>operator</filename>, you can specify the
4706 following:
4707 <literallayout class='monospaced'>
4708 =
4709 &lt;
4710 &gt;
4711 &lt;=
4712 &gt;=
4713 </literallayout>
4714 For example, the following sets up a replacement using
4715 version 1.2 or greater of the package
4716 <filename>foo</filename>:
4717 <literallayout class='monospaced'>
4718 RREPLACES_${PN} = "foo (>= 1.2)"
4719 </literallayout>
4720 </para>
4721 </glossdef>
4722 </glossentry>
4723
4724 <glossentry id='var-RSUGGESTS'><glossterm>RSUGGESTS</glossterm>
4725 <glossdef>
4726 <para>
4727 A list of additional packages that you can suggest for
4728 installation by the package manager at the time a package
4729 is installed.
4730 Not all package managers support this functionality.
4731 </para>
4732 <para>
4733 As with all package-controlling variables, you must always
4734 use this variable in conjunction with a package name
4735 override.
4736 Here is an example:
4737 <literallayout class='monospaced'>
4738 RSUGGESTS_${PN} = "useful-package another-package"
4739 </literallayout>
4740 </para>
4741 </glossdef>
4742 </glossentry>
4743
4744 </glossdiv>
4745
4746 <glossdiv id='var-glossary-s'><title>S</title>
4747
4748 <glossentry id='var-S'><glossterm>S</glossterm>
4749 <glossdef>
4750 <para>
4751 The location in the
4752 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
4753 where unpacked recipe source code resides.
4754 This location is within the working directory
4755 (<filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>),
4756 which is not static.
4757 The unpacked source location depends on the recipe name
4758 (<filename><link linkend='var-PN'>PN</link></filename>) and
4759 recipe version
4760 (<filename><link linkend='var-PV'>PV</link></filename>) as
4761 follows:
4762 <literallayout class='monospaced'>
4763 ${WORKDIR}/${PN}-${PV}
4764 </literallayout>
4765 As an example, assume a
4766 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
4767 top-level folder named <filename>poky</filename> and a
4768 default Build Directory at <filename>poky/build</filename>.
4769 In this case, the working directory the build system uses
4770 to keep the unpacked recipe for <filename>db</filename>
4771 is the following:
4772 <literallayout class='monospaced'>
4773 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
4774 </literallayout>
4775 </para>
4776 </glossdef>
4777 </glossentry>
4778
4779 <glossentry id='var-SANITY_TESTED_DISTROS'><glossterm>SANITY_TESTED_DISTROS</glossterm>
4780 <glossdef>
4781 <para>
4782 A list of the host distribution identifiers that the
4783 build system has been tested against.
4784 Identifiers consist of the host distributor ID
4785 followed by the release,
4786 as reported by the <filename>lsb_release</filename> tool
4787 or as read from <filename>/etc/lsb-release</filename>.
4788 Separate the list items with explicit newline
4789 characters (<filename>\n</filename>).
4790 If <filename>SANITY_TESTED_DISTROS</filename> is not empty
4791 and the current value of
4792 <link linkend='var-NATIVELSBSTRING'><filename>NATIVELSBSTRING</filename></link>
4793 does not appear in the list, then the build system reports
4794 a warning that indicates the current host distribution has
4795 not been tested as a build host.
4796 </para>
4797 </glossdef>
4798 </glossentry>
4799
4800 <glossentry id='var-SDK_ARCH'><glossterm>SDK_ARCH</glossterm>
4801 <glossdef>
4802 <para>
4803 The target architecture for the SDK.
4804 Typically, you do not directly set this variable.
4805 Instead, use
4806 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>.
4807 </para>
4808 </glossdef>
4809 </glossentry>
4810
4811 <glossentry id='var-SDK_NAME'><glossterm>SDK_NAME</glossterm>
4812 <glossdef>
4813 <para>
4814 The base name for SDK output files.
4815 The name is derived from the
4816 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>,
4817 <link linkend='var-TCLIBC'><filename>TCLIBC</filename></link>,
4818 <link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link>,
4819 <link linkend='var-IMAGE_BASENAME'><filename>IMAGE_BASENAME</filename></link>,
4820 and
4821 <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link>
4822 variables:
4823 <literallayout class='monospaced'>
4824 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
4825 </literallayout>
4826 </para>
4827 </glossdef>
4828 </glossentry>
4829
4830 <glossentry id='var-SDKIMAGE_FEATURES'><glossterm>SDKIMAGE_FEATURES</glossterm>
4831 <glossdef>
4832 <para>Equivalent to
4833 <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>.
4834 However, this variable applies to the SDK generated from an
4835 image using the following command:
4836 <literallayout class='monospaced'>
4837 $ bitbake -c populate_sdk imagename
4838 </literallayout>
4839 </para>
4840 </glossdef>
4841 </glossentry>
4842
4843 <glossentry id='var-SDKMACHINE'><glossterm>SDKMACHINE</glossterm>
4844 <glossdef>
4845 <para>
4846 The architecture of the machine that runs Application
4847 Development Toolkit (ADT) items.
4848 In other words, packages are built so that they will run
4849 on the target you specify with the argument.
4850 This implies that you can build out ADT/SDK items that
4851 run on an architecture other than that of your build host.
4852 For example, you can use an x86_64-based build host to
4853 create packages that will run on an i686-based
4854 SDK Machine.
4855 </para>
4856
4857 <para>
4858 You can use "i686" and "x86_64" as possible values for this
4859 variable.
4860 The variable defaults to "i686" and is set in the
4861 <filename>local.conf</filename> file in the
4862 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
4863 <literallayout class='monospaced'>
4864 SDKMACHINE ?= "i686"
4865 </literallayout>
4866 </para>
4867 </glossdef>
4868 </glossentry>
4869
4870 <glossentry id='var-SECTION'><glossterm>SECTION</glossterm>
4871 <glossdef>
4872 <para>The section in which packages should be categorized.
4873 Package management utilities can make use of this variable.</para>
4874 </glossdef>
4875 </glossentry>
4876
4877 <glossentry id='var-SELECTED_OPTIMIZATION'><glossterm>SELECTED_OPTIMIZATION</glossterm>
4878 <glossdef>
4879 <para>
4880 The variable takes the value of
4881 <filename><link linkend='var-FULL_OPTIMIZATION'>FULL_OPTIMIZATION</link></filename>
4882 unless <filename><link linkend='var-DEBUG_BUILD'>DEBUG_BUILD</link></filename> = "1".
4883 In this case the value of
4884 <filename><link linkend='var-DEBUG_OPTIMIZATION'>DEBUG_OPTIMIZATION</link></filename> is used.
4885 </para>
4886 </glossdef>
4887 </glossentry>
4888
4889 <glossentry id='var-SERIAL_CONSOLE'><glossterm>SERIAL_CONSOLE</glossterm>
4890 <glossdef>
4891 <para>
4892 Defines a serial console (TTY) to enable using getty.
4893 Provide a value that specifies the baud rate followed by
4894 the TTY device name separated by a space.
4895 You cannot specify more than one TTY device:
4896 <literallayout class='monospaced'>
4897 SERIAL_CONSOLE = "115200 ttyS0"
4898 </literallayout>
4899 <note>
4900 The <filename>SERIAL_CONSOLE</filename> variable
4901 is deprecated.
4902 Please use the
4903 <link linkend='var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></link>
4904 variable.
4905 </note>
4906 </para>
4907 </glossdef>
4908 </glossentry>
4909
4910 <glossentry id='var-SERIAL_CONSOLES'><glossterm>SERIAL_CONSOLES</glossterm>
4911 <glossdef>
4912 <para>
4913 Defines the serial consoles (TTYs) to enable using getty.
4914 Provide a value that specifies the baud rate followed by
4915 the TTY device name separated by a semicolon.
4916 Use spaces to separate multiple devices:
4917 <literallayout class='monospaced'>
4918 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
4919 </literallayout>
4920 </para>
4921 </glossdef>
4922 </glossentry>
4923
4924 <glossentry id='var-SERIAL_CONSOLES_CHECK'><glossterm>SERIAL_CONSOLES_CHECK</glossterm>
4925 <glossdef>
4926 <para>
4927 Similar to
4928 <link linkend='var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></link>
4929 except the device is checked for existence before attempting
4930 to enable it.
4931 This variable is currently only supported with SysVinit
4932 (i.e. not with systemd).
4933 </para>
4934 </glossdef>
4935 </glossentry>
4936
4937 <glossentry id='var-SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS'><glossterm>SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS</glossterm>
4938 <glossdef>
4939 <para>
4940 A list of recipe dependencies that should not be used to
4941 determine signatures of tasks from one recipe when they
4942 depend on tasks from another recipe.
4943 For example:
4944 <literallayout class='monospaced'>
4945 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
4946 </literallayout>
4947 In this example, <filename>intone</filename> depends on
4948 <filename>mplayer2</filename>.
4949 </para>
4950
4951 <para>
4952 Use of this variable is one mechanism to remove dependencies
4953 that affect task signatures and thus force rebuilds when a
4954 recipe changes.
4955 <note><title>Caution</title>
4956 If you add an inappropriate dependency for a recipe
4957 relationship, the software might break during
4958 runtime if the interface of the second recipe was
4959 changed after the first recipe had been built.
4960 </note>
4961 </para>
4962 </glossdef>
4963 </glossentry>
4964
4965 <glossentry id='var-SIGGEN_EXCLUDERECIPES_ABISAFE'><glossterm>SIGGEN_EXCLUDERECIPES_ABISAFE</glossterm>
4966 <glossdef>
4967 <para>
4968 A list of recipes that are completely stable and will
4969 never change.
4970 The ABI for the recipes in the list are presented by
4971 output from the tasks run to build the recipe.
4972 Use of this variable is one way to remove dependencies from
4973 one recipe on another that affect task signatures and
4974 thus force rebuilds when the recipe changes.
4975 <note><title>Caution</title>
4976 If you add an inappropriate variable to this list,
4977 the software might break at runtime if the
4978 interface of the recipe was changed after the other
4979 had been built.
4980 </note>
4981 </para>
4982 </glossdef>
4983 </glossentry>
4984
4985 <glossentry id='var-SITEINFO_BITS'><glossterm>SITEINFO_BITS</glossterm>
4986 <glossdef>
4987 <para>
4988 Specifies the number of bits for the target system CPU.
4989 The value should be either "32" or "64".
4990 </para>
4991 </glossdef>
4992 </glossentry>
4993
4994 <glossentry id='var-SITEINFO_ENDIANNESS'><glossterm>SITEINFO_ENDIANNESS</glossterm>
4995 <glossdef>
4996 <para>
4997 Specifies the endian byte order of the target system.
4998 The value should be either "le" for little-endian or "be" for big-endian.
4999 </para>
5000 </glossdef>
5001 </glossentry>
5002
5003 <glossentry id='var-SOC_FAMILY'><glossterm>SOC_FAMILY</glossterm>
5004 <glossdef>
5005 <para>
5006 Groups together machines based upon the same family
5007 of SOC (System On Chip).
5008 You typically set this variable in a common
5009 <filename>.inc</filename> file that you include in the
5010 configuration files of all the machines.
5011 <note>
5012 You must include
5013 <filename>conf/machine/include/soc-family.inc</filename>
5014 for this variable to appear in
5015 <link linkend='var-MACHINEOVERRIDES'><filename>MACHINEOVERRIDES</filename></link>.
5016 </note>
5017 </para>
5018 </glossdef>
5019 </glossentry>
5020
5021 <glossentry id='var-SOLIBS'><glossterm>SOLIBS</glossterm>
5022 <glossdef>
5023 <para>
5024 Defines the suffix for shared libraries used on the
5025 target platform.
5026 By default, this suffix is ".so.*" for all Linux-based
5027 systems and is defined in the
5028 <filename>meta/conf/bitbake.conf</filename> configuration
5029 file.
5030 </para>
5031
5032 <para>
5033 You will see this variable referenced in the default values
5034 of <filename>FILES_${PN}</filename>.
5035 </para>
5036 </glossdef>
5037 </glossentry>
5038
5039 <glossentry id='var-SOLIBSDEV'><glossterm>SOLIBSDEV</glossterm>
5040 <glossdef>
5041 <para>
5042 Defines the suffix for the development symbolic link
5043 (symlink) for shared libraries on the target platform.
5044 By default, this suffix is ".so" for Linux-based
5045 systems and is defined in the
5046 <filename>meta/conf/bitbake.conf</filename> configuration
5047 file.
5048 </para>
5049
5050 <para>
5051 You will see this variable referenced in the default values
5052 of <filename>FILES_${PN}-dev</filename>.
5053 </para>
5054 </glossdef>
5055 </glossentry>
5056
5057 <glossentry id='var-SPECIAL_PKGSUFFIX'><glossterm>SPECIAL_PKGSUFFIX</glossterm>
5058 <glossdef>
5059 <para>
5060 A list of prefixes for <link linkend='var-PN'><filename>PN</filename></link> used by the
5061 OpenEmbedded build system to create variants of recipes or packages.
5062 The list specifies the prefixes to strip off during certain circumstances
5063 such as the generation of the <link linkend='var-BPN'><filename>BPN</filename></link> variable.
5064 </para>
5065 </glossdef>
5066 </glossentry>
5067
5068 <glossentry id='var-SRC_URI'><glossterm>SRC_URI</glossterm>
5069 <glossdef>
5070 <para>The list of source files - local or remote.
5071 This variable tells the OpenEmbedded build system which bits
5072 to pull in for the build and how to pull them in.
5073 For example, if the recipe or append file only needs to
5074 fetch a tarball from the Internet, the recipe or
5075 append file uses a single <filename>SRC_URI</filename>
5076 entry.
5077 On the other hand, if the recipe or append file needs to
5078 fetch a tarball, apply two patches, and include a custom
5079 file, the recipe or append file would include four
5080 instances of the variable.</para>
5081 <para>The following list explains the available URI protocols:
5082 <itemizedlist>
5083 <listitem><para><emphasis><filename>file://</filename> -</emphasis>
5084 Fetches files, which are usually files shipped with
5085 the
5086 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>,
5087 from the local machine.
5088 The path is relative to the
5089 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
5090 variable.
5091 Thus, the build system searches, in order, from the
5092 following directories, which are assumed to be a
5093 subdirectories of the directory in which the
5094 recipe file (<filename>.bb</filename>) or
5095 append file (<filename>.bbappend</filename>)
5096 resides:
5097 <itemizedlist>
5098 <listitem><para><emphasis><filename>${BPN}</filename> -</emphasis>
5099 The base recipe name without any special
5100 suffix or version numbers.
5101 </para></listitem>
5102 <listitem><para><emphasis><filename>${BP}</filename> -</emphasis>
5103 <filename>${<link linkend='var-BPN'>BPN</link>}-${PV}</filename>.
5104 The base recipe name and version but without
5105 any special package name suffix.
5106 </para></listitem>
5107 <listitem><para><emphasis>files -</emphasis>
5108 Files within a directory, which is named
5109 <filename>files</filename> and is also
5110 alongside the recipe or append file.
5111 </para></listitem>
5112 </itemizedlist>
5113 <note>
5114 If you want the build system to pick up files
5115 specified through a
5116 <filename>SRC_URI</filename>
5117 statement from your append file, you need to be
5118 sure to extend the
5119 <filename>FILESPATH</filename>
5120 variable by also using the
5121 <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
5122 variable from within your append file.
5123 </note>
5124 </para></listitem>
5125 <listitem><para><emphasis><filename>bzr://</filename> -</emphasis> Fetches files from a
5126 Bazaar revision control repository.</para></listitem>
5127 <listitem><para><emphasis><filename>git://</filename> -</emphasis> Fetches files from a
5128 Git revision control repository.</para></listitem>
5129 <listitem><para><emphasis><filename>osc://</filename> -</emphasis> Fetches files from
5130 an OSC (OpenSUSE Build service) revision control repository.</para></listitem>
5131 <listitem><para><emphasis><filename>repo://</filename> -</emphasis> Fetches files from
5132 a repo (Git) repository.</para></listitem>
5133 <listitem><para><emphasis><filename>svk://</filename> -</emphasis> Fetches files from
5134 an SVK revision control repository.</para></listitem>
5135 <listitem><para><emphasis><filename>http://</filename> -</emphasis> Fetches files from
5136 the Internet using <filename>http</filename>.</para></listitem>
5137 <listitem><para><emphasis><filename>https://</filename> -</emphasis> Fetches files
5138 from the Internet using <filename>https</filename>.</para></listitem>
5139 <listitem><para><emphasis><filename>ftp://</filename> -</emphasis> Fetches files
5140 from the Internet using <filename>ftp</filename>.</para></listitem>
5141 <listitem><para><emphasis><filename>cvs://</filename> -</emphasis> Fetches files from
5142 a CVS revision control repository.</para></listitem>
5143 <listitem><para><emphasis><filename>hg://</filename> -</emphasis> Fetches files from
5144 a Mercurial (<filename>hg</filename>) revision control repository.</para></listitem>
5145 <listitem><para><emphasis><filename>p4://</filename> -</emphasis> Fetches files from
5146 a Perforce (<filename>p4</filename>) revision control repository.</para></listitem>
5147 <listitem><para><emphasis><filename>ssh://</filename> -</emphasis> Fetches files from
5148 a secure shell.</para></listitem>
5149 <listitem><para><emphasis><filename>svn://</filename> -</emphasis> Fetches files from
5150 a Subversion (<filename>svn</filename>) revision control repository.</para></listitem>
5151 </itemizedlist>
5152 </para>
5153 <para>Standard and recipe-specific options for <filename>SRC_URI</filename> exist.
5154 Here are standard options:
5155 <itemizedlist>
5156 <listitem><para><emphasis><filename>apply</filename> -</emphasis> Whether to apply
5157 the patch or not.
5158 The default action is to apply the patch.</para></listitem>
5159 <listitem><para><emphasis><filename>striplevel</filename> -</emphasis> Which
5160 striplevel to use when applying the patch.
5161 The default level is 1.</para></listitem>
5162 <listitem><para><emphasis><filename>patchdir</filename> -</emphasis> Specifies
5163 the directory in which the patch should be applied.
5164 The default is <filename>${</filename><link linkend='var-S'><filename>S</filename></link><filename>}</filename>.
5165 </para></listitem>
5166 </itemizedlist>
5167 </para>
5168 <para>Here are options specific to recipes building code from a revision control system:
5169 <itemizedlist>
5170 <listitem><para><emphasis><filename>mindate</filename> -</emphasis>
5171 Apply the patch only if
5172 <link linkend='var-SRCDATE'><filename>SRCDATE</filename></link>
5173 is equal to or greater than <filename>mindate</filename>.
5174 </para></listitem>
5175 <listitem><para><emphasis><filename>maxdate</filename> -</emphasis>
5176 Apply the patch only if <filename>SRCDATE</filename>
5177 is not later than <filename>mindate</filename>.
5178 </para></listitem>
5179 <listitem><para><emphasis><filename>minrev</filename> -</emphasis>
5180 Apply the patch only if <filename>SRCREV</filename>
5181 is equal to or greater than <filename>minrev</filename>.
5182 </para></listitem>
5183 <listitem><para><emphasis><filename>maxrev</filename> -</emphasis>
5184 Apply the patch only if <filename>SRCREV</filename>
5185 is not later than <filename>maxrev</filename>.
5186 </para></listitem>
5187 <listitem><para><emphasis><filename>rev</filename> -</emphasis>
5188 Apply the patch only if <filename>SRCREV</filename>
5189 is equal to <filename>rev</filename>.
5190 </para></listitem>
5191 <listitem><para><emphasis><filename>notrev</filename> -</emphasis>
5192 Apply the patch only if <filename>SRCREV</filename>
5193 is not equal to <filename>rev</filename>.
5194 </para></listitem>
5195 </itemizedlist>
5196 </para>
5197 <para>Here are some additional options worth mentioning:
5198 <itemizedlist>
5199 <listitem><para><emphasis><filename>unpack</filename> -</emphasis> Controls
5200 whether or not to unpack the file if it is an archive.
5201 The default action is to unpack the file.</para></listitem>
5202 <listitem><para><emphasis><filename>subdir</filename> -</emphasis> Places the file
5203 (or extracts its contents) into the specified
5204 subdirectory of <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
5205 This option is useful for unusual tarballs or other archives that
5206 do not have their files already in a subdirectory within the archive.
5207 </para></listitem>
5208 <listitem><para><emphasis><filename>name</filename> -</emphasis> Specifies a
5209 name to be used for association with <filename>SRC_URI</filename> checksums
5210 when you have more than one file specified in <filename>SRC_URI</filename>.
5211 </para></listitem>
5212 <listitem><para><emphasis><filename>downloadfilename</filename> -</emphasis> Specifies
5213 the filename used when storing the downloaded file.</para></listitem>
5214 </itemizedlist>
5215 </para>
5216 </glossdef>
5217 </glossentry>
5218
5219 <glossentry id='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'><glossterm>SRC_URI_OVERRIDES_PACKAGE_ARCH</glossterm>
5220 <glossdef>
5221 <para></para>
5222 <para>
5223 By default, the OpenEmbedded build system automatically detects whether
5224 <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>
5225 contains files that are machine-specific.
5226 If so, the build system automatically changes
5227 <filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>.
5228 Setting this variable to "0" disables this behavior.
5229 </para>
5230 </glossdef>
5231 </glossentry>
5232
5233 <glossentry id='var-SRCDATE'><glossterm>SRCDATE</glossterm>
5234 <glossdef>
5235 <para>
5236 The date of the source code used to build the package.
5237 This variable applies only if the source was fetched from a Source Code Manager (SCM).
5238 </para>
5239 </glossdef>
5240 </glossentry>
5241
5242 <glossentry id='var-SRCPV'><glossterm>SRCPV</glossterm>
5243 <glossdef>
5244 <para>
5245 Returns the version string of the current package.
5246 This string is used to help define the value of
5247 <link linkend='var-PV'><filename>PV</filename></link>.
5248 </para>
5249
5250 <para>
5251 The <filename>SRCPV</filename> variable is defined in the
5252 <filename>meta/conf/bitbake.conf</filename> configuration
5253 file in the
5254 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
5255 as follows:
5256 <literallayout class='monospaced'>
5257 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
5258 </literallayout>
5259 </para>
5260
5261 <para>
5262 Recipes that need to define <filename>PV</filename> do so
5263 with the help of the <filename>SRCPV</filename>.
5264 For example, the <filename>ofono</filename> recipe
5265 (<filename>ofono_git.bb</filename>) located in
5266 <filename>meta/recipes-connectivity</filename> in the
5267 Source Directory defines <filename>PV</filename> as
5268 follows:
5269 <literallayout class='monospaced'>
5270 PV = "0.12-git${SRCPV}"
5271 </literallayout>
5272 </para>
5273 </glossdef>
5274 </glossentry>
5275
5276 <glossentry id='var-SRCREV'><glossterm>SRCREV</glossterm>
5277 <glossdef>
5278 <para>
5279 The revision of the source code used to build the package.
5280 This variable applies to Subversion, Git, Mercurial and Bazaar
5281 only.
5282 Note that if you wish to build a fixed revision and you wish
5283 to avoid performing a query on the remote repository every time
5284 BitBake parses your recipe, you should specify a <filename>SRCREV</filename> that is a
5285 full revision identifier and not just a tag.
5286 </para>
5287 </glossdef>
5288 </glossentry>
5289
5290 <glossentry id='var-SSTATE_DIR'><glossterm>SSTATE_DIR</glossterm>
5291 <glossdef>
5292 <para>The directory for the shared state cache.</para>
5293 </glossdef>
5294 </glossentry>
5295
5296 <glossentry id='var-SSTATE_MIRRORS'><glossterm>SSTATE_MIRRORS</glossterm>
5297 <glossdef>
5298 <para>
5299 Configures the OpenEmbedded build system to search other
5300 mirror locations for prebuilt cache data objects before
5301 building out the data.
5302 This variable works like fetcher
5303 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
5304 and <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
5305 and points to the cache locations to check for the shared
5306 objects.
5307 </para>
5308
5309 <para>
5310 You can specify a filesystem directory or a remote URL such
5311 as HTTP or FTP.
5312 The locations you specify need to contain the shared state
5313 cache (sstate-cache) results from previous builds.
5314 The sstate-cache you point to can also be from builds on
5315 other machines.
5316 </para>
5317
5318 <para>
5319 If a mirror uses the same structure as
5320 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>,
5321 you need to add
5322 "PATH" at the end as shown in the examples below.
5323 The build system substitutes the correct path within the
5324 directory structure.
5325 <literallayout class='monospaced'>
5326 SSTATE_MIRRORS ?= "\
5327 file://.* http://someserver.tld/share/sstate/PATH \n \
5328 file://.* file:///some/local/dir/sstate/PATH"
5329 </literallayout>
5330 </para>
5331 </glossdef>
5332 </glossentry>
5333
5334 <glossentry id='var-STAGING_KERNEL_DIR'><glossterm>STAGING_KERNEL_DIR</glossterm>
5335 <glossdef>
5336 <para>
5337 The directory with kernel headers that are required to build out-of-tree
5338 modules.
5339 </para>
5340 </glossdef>
5341 </glossentry>
5342
5343 <glossentry id='var-STAMP'><glossterm>STAMP</glossterm>
5344 <glossdef>
5345 <para>
5346 Specifies the base path used to create recipe stamp files.
5347 The path to an actual stamp file is constructed by evaluating this
5348 string and then appending additional information.
5349 Currently, the default assignment for <filename>STAMP</filename>
5350 as set in the <filename>meta/conf/bitbake.conf</filename> file
5351 is:
5352 <literallayout class='monospaced'>
5353 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
5354 </literallayout>
5355 See <link linkend='var-STAMPS_DIR'><filename>STAMPS_DIR</filename></link>,
5356 <link linkend='var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></link>,
5357 <link linkend='var-PN'><filename>PN</filename></link>,
5358 <link linkend='var-EXTENDPE'><filename>EXTENDPE</filename></link>,
5359 <link linkend='var-PV'><filename>PV</filename></link>, and
5360 <link linkend='var-PR'><filename>PR</filename></link> for related variable
5361 information.
5362 </para>
5363 </glossdef>
5364 </glossentry>
5365
5366 <glossentry id='var-STAMPS_DIR'><glossterm>STAMPS_DIR</glossterm>
5367 <glossdef>
5368 <para>
5369 Specifies the base directory in which the OpenEmbedded
5370 build system places stamps.
5371 The default directory is
5372 <filename>${TMPDIR}/stamps</filename>.
5373 </para>
5374 </glossdef>
5375 </glossentry>
5376
5377 <glossentry id='var-SUMMARY'><glossterm>SUMMARY</glossterm>
5378 <glossdef>
5379 <para>The short (72 characters or less) summary of the binary package for packaging
5380 systems such as <filename>opkg</filename>, <filename>rpm</filename> or
5381 <filename>dpkg</filename>.
5382 By default, <filename>SUMMARY</filename> is used to define
5383 the <link linkend='var-DESCRIPTION'><filename>DESCRIPTION</filename></link>
5384 variable if <filename>DESCRIPTION</filename> is not set
5385 in the recipe.
5386 </para>
5387 </glossdef>
5388 </glossentry>
5389
5390 <glossentry id='var-SYSROOT_PREPROCESS_FUNCS'><glossterm>SYSROOT_PREPROCESS_FUNCS</glossterm>
5391 <glossdef>
5392 <para>
5393 A list of functions to execute after files are staged into
5394 the sysroot.
5395 These functions are usually used to apply additional
5396 processing on the staged files, or to stage additional
5397 files.
5398 </para>
5399 </glossdef>
5400 </glossentry>
5401
5402 </glossdiv>
5403
5404 <glossdiv id='var-glossary-t'><title>T</title>
5405
5406 <glossentry id='var-T'><glossterm>T</glossterm>
5407 <glossdef>
5408 <para>This variable points to a directory were BitBake places
5409 temporary files, which consist mostly of task logs and
5410 scripts, when building a particular recipe.
5411 The variable is typically set as follows:
5412 <literallayout class='monospaced'>
5413 T = "${WORKDIR}/temp"
5414 </literallayout>
5415 The <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
5416 is the directory into which BitBake unpacks and builds the
5417 recipe.
5418 The default <filename>bitbake.conf</filename> file sets this variable.</para>
5419 <para>The <filename>T</filename> variable is not to be confused with
5420 the <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link> variable,
5421 which points to the root of the directory tree where BitBake
5422 places the output of an entire build.
5423 </para>
5424 </glossdef>
5425 </glossentry>
5426
5427 <glossentry id='var-TARGET_ARCH'><glossterm>TARGET_ARCH</glossterm>
5428 <glossdef>
5429 <para>
5430 The target machine's architecture.
5431 The OpenEmbedded build system supports many
5432 architectures.
5433 Here is an example list of architectures supported.
5434 This list is by no means complete as the architecture
5435 is configurable:
5436 <literallayout class='monospaced'>
5437 arm
5438 i586
5439 x86_64
5440 powerpc
5441 powerpc64
5442 mips
5443 mipsel
5444 </literallayout>
5445 </para>
5446 </glossdef>
5447 </glossentry>
5448
5449 <glossentry id='var-TARGET_CFLAGS'><glossterm>TARGET_CFLAGS</glossterm>
5450 <glossdef>
5451 <para>
5452 Flags passed to the C compiler for the target system.
5453 This variable evaluates to the same as
5454 <filename><link linkend='var-CFLAGS'>CFLAGS</link></filename>.
5455 </para>
5456 </glossdef>
5457 </glossentry>
5458
5459
5460 <glossentry id='var-TARGET_FPU'><glossterm>TARGET_FPU</glossterm>
5461 <glossdef>
5462 <para>Specifies the method for handling FPU code.
5463 For FPU-less targets, which include most ARM CPUs, the variable must be
5464 set to "soft".
5465 If not, the kernel emulation gets used, which results in a performance penalty.</para>
5466 </glossdef>
5467 </glossentry>
5468
5469 <glossentry id='var-TARGET_OS'><glossterm>TARGET_OS</glossterm>
5470 <glossdef>
5471 <para>Specifies the target's operating system.
5472 The variable can be set to "linux" for <filename>eglibc</filename>-based systems and
5473 to "linux-uclibc" for <filename>uclibc</filename>.
5474 For ARM/EABI targets, there are also "linux-gnueabi" and
5475 "linux-uclibc-gnueabi" values possible.</para>
5476 </glossdef>
5477 </glossentry>
5478
5479 <glossentry id='var-TCLIBC'><glossterm>TCLIBC</glossterm>
5480 <glossdef>
5481 <para>
5482 Specifies which variant of the GNU standard C library (<filename>libc</filename>)
5483 to use during the build process.
5484 This variable replaces <filename>POKYLIBC</filename>, which is no longer
5485 supported.
5486 </para>
5487 <para>
5488 You can select <filename>eglibc</filename> or <filename>uclibc</filename>.
5489 <note>
5490 This release of the Yocto Project does not support the
5491 <filename>glibc</filename> implementation of <filename>libc</filename>.
5492 </note>
5493 </para>
5494 </glossdef>
5495 </glossentry>
5496
5497 <glossentry id='var-TCMODE'><glossterm>TCMODE</glossterm>
5498 <glossdef>
5499 <para>
5500 The toolchain selector.
5501 This variable replaces <filename>POKYMODE</filename>, which is no longer
5502 supported.
5503 </para>
5504 <para>
5505 The <filename>TCMODE</filename> variable selects the external toolchain
5506 built using the OpenEmbedded build system or a few supported combinations of
5507 the upstream GCC or CodeSourcery Labs toolchain.
5508 The variable identifies the <filename>tcmode-*</filename> files used in
5509 the <filename>meta/conf/distro/include</filename> directory, which is found in the
5510 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
5511 </para>
5512 <para>
5513 By default, <filename>TCMODE</filename> is set to "default", which
5514 chooses the <filename>tcmode-default.inc</filename> file.
5515 The variable is similar to
5516 <link linkend='var-TCLIBC'><filename>TCLIBC</filename></link>, which controls
5517 the variant of the GNU standard C library (<filename>libc</filename>)
5518 used during the build process: <filename>eglibc</filename> or <filename>uclibc</filename>.
5519 </para>
5520 </glossdef>
5521 </glossentry>
5522
5523 <glossentry id='var-TEST_IMAGE'><glossterm>TEST_IMAGE</glossterm>
5524 <glossdef>
5525 <para>
5526 Automatically runs the series of automated tests for
5527 images when an image is successfully built.
5528 <note>
5529 Currently, there is only support for running these tests
5530 under QEMU.
5531 </note>
5532 These tests are written in Python making use of the
5533 <filename>unittest</filename> module, and the majority of
5534 them run commands on the target system over
5535 <filename>ssh</filename>.
5536 You can set this variable to "1" in your
5537 <filename>local.conf</filename> file in the
5538 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
5539 to have the OpenEmbedded build system automatically run
5540 these tests after an image successfully builds:
5541 <literallayout class='monospaced'>
5542 TEST_IMAGE = "1"
5543 </literallayout>
5544 For more information on enabling, running, and writing
5545 these tests, see the
5546 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
5547 section in the Yocto Project Development Manual and the
5548 "<link linkend='ref-classes-testimage'><filename>testimage.bbclass</filename></link>"
5549 section.
5550 </para>
5551 </glossdef>
5552 </glossentry>
5553
5554 <glossentry id='var-TEST_QEMUBOOT_TIMEOUT'><glossterm>TEST_QEMUBOOT_TIMEOUT</glossterm>
5555 <glossdef>
5556 <para>
5557 The time in seconds allowed for an image to boot before
5558 automated runtime tests begin to run against an
5559 image.
5560 The default timeout period to allow the boot process to
5561 reach the login prompt is 500 seconds.
5562 You can specify a different value in the
5563 <filename>local.conf</filename> file.
5564 </para>
5565
5566 <para>
5567 For more information on testing images, see the
5568 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
5569 section in the Yocto Project Development Manual.
5570 </para>
5571 </glossdef>
5572 </glossentry>
5573
5574 <glossentry id='var-TEST_SUITES'><glossterm>TEST_SUITES</glossterm>
5575 <glossdef>
5576 <para>
5577 An ordered list of tests (modules) to run against
5578 an image when performing automated runtime testing.
5579 </para>
5580
5581 <para>
5582 The OpenEmbedded build system provides a core set of tests
5583 that can be used against images.
5584 <note>
5585 Currently, there is only support for running these tests
5586 under QEMU.
5587 </note>
5588 Tests include <filename>ping</filename>,
5589 <filename>ssh</filename>, <filename>df</filename> among
5590 others.
5591 You can add your own tests to the list of tests by
5592 appending <filename>TEST_SUITES</filename> as follows:
5593 <literallayout class='monospaced'>
5594 TEST_SUITES_append = " mytest"
5595 </literallayout>
5596 Alternatively, you can provide the "auto" option to
5597 have all applicable tests run against the image.
5598 <literallayout class='monospaced'>
5599 TEST_SUITES_append = " auto"
5600 </literallayout>
5601 Using this option causes the build system to automatically
5602 run tests that are applicable to the image.
5603 Tests that are not applicable are skipped.
5604 </para>
5605
5606 <para>
5607 The order in which tests are run is important.
5608 Tests that depend on another test must appear later in the
5609 list than the test on which they depend.
5610 For example, if you append the list of tests with two
5611 tests (<filename>test_A</filename> and
5612 <filename>test_B</filename>) where
5613 <filename>test_B</filename> is dependent on
5614 <filename>test_A</filename>, then you must order the tests
5615 as follows:
5616 <literallayout class='monospaced'>
5617 TEST_SUITES = " test_A test_B"
5618 </literallayout>
5619 </para>
5620
5621 <para>
5622 For more information on testing images, see the
5623 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
5624 section in the Yocto Project Development Manual.
5625 </para>
5626 </glossdef>
5627 </glossentry>
5628
5629 <glossentry id='var-THISDIR'><glossterm>THISDIR</glossterm>
5630 <glossdef>
5631 <para>
5632 The directory in which the file BitBake is currently
5633 parsing is located.
5634 Do not manually set this variable.
5635 </para>
5636 </glossdef>
5637 </glossentry>
5638
5639 <glossentry id='var-TMPDIR'><glossterm>TMPDIR</glossterm>
5640 <glossdef>
5641 <para>
5642 This variable is the base directory the OpenEmbedded
5643 build system uses for all build output and intermediate
5644 files (other than the shared state cache).
5645 By default, the <filename>TMPDIR</filename> variable points
5646 to <filename>tmp</filename> within the
5647 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
5648 </para>
5649
5650 <para>
5651 If you want to establish this directory in a location other
5652 than the default, you can uncomment and edit the following
5653 statement in the
5654 <filename>conf/local.conf</filename> file in the
5655 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
5656 <literallayout class='monospaced'>
5657 #TMPDIR = "${TOPDIR}/tmp"
5658 </literallayout>
5659 </para>
5660 </glossdef>
5661 </glossentry>
5662
5663 <glossentry id='var-TOOLCHAIN_HOST_TASK'><glossterm>TOOLCHAIN_HOST_TASK</glossterm>
5664 <glossdef>
5665 <para>
5666 This variable lists packages the OpenEmbedded build system
5667 uses when building an SDK, which contains a
5668 cross-development environment.
5669 The packages specified by this variable are part of the
5670 toolchain set that runs on the
5671 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
5672 and each package should usually have the prefix
5673 "nativesdk-".
5674 When building an SDK using
5675 <filename>bitbake -c populate_sdk &lt;imagename&gt;</filename>,
5676 a default list of packages is set in this variable, but
5677 you can add additional packages to the list.
5678 </para>
5679
5680 <para>
5681 For background information on cross-development toolchains
5682 in the Yocto Project development environment, see the
5683 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
5684 section.
5685 For information on setting up a cross-development
5686 environment, see the
5687 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
5688 section in the Yocto Project Application Developer's Guide.
5689 </para>
5690 </glossdef>
5691 </glossentry>
5692
5693 <glossentry id='var-TOOLCHAIN_TARGET_TASK'><glossterm>TOOLCHAIN_TARGET_TASK</glossterm>
5694 <glossdef>
5695 <para>
5696 This variable lists packages the OpenEmbedded build system
5697 uses when it creates the target part of an SDK
5698 (i.e. the part built for the target hardware), which
5699 includes libraries and headers.
5700 </para>
5701
5702 <para>
5703 For background information on cross-development toolchains
5704 in the Yocto Project development environment, see the
5705 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
5706 section.
5707 For information on setting up a cross-development
5708 environment, see the
5709 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
5710 section in the Yocto Project Application Developer's Guide.
5711 </para>
5712 </glossdef>
5713 </glossentry>
5714
5715 <glossentry id='var-TOPDIR'><glossterm>TOPDIR</glossterm>
5716 <glossdef>
5717 <para>
5718 This variable points to the
5719 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
5720 BitBake automatically sets this variable.
5721 </para>
5722 </glossdef>
5723 </glossentry>
5724
5725 <glossentry id='var-TRANSLATED_TARGET_ARCH'><glossterm>TRANSLATED_TARGET_ARCH</glossterm>
5726 <glossdef>
5727 <para>
5728 A sanitized version of
5729 <link linkend='var-TARGET_ARCH'><filename>TARGET_ARCH</filename></link>.
5730 This variable is used where the architecture is needed in
5731 a value where underscores are not allowed, for example
5732 within package filenames.
5733 In this case, dash characters replace any underscore
5734 characters used in TARGET_ARCH.
5735 </para>
5736
5737 <para>
5738 Do not edit this variable.
5739 </para>
5740 </glossdef>
5741 </glossentry>
5742
5743 <glossentry id='var-TUNE_PKGARCH'><glossterm>TUNE_PKGARCH</glossterm>
5744 <glossdef>
5745 <para>
5746 The package architecture understood by the packaging
5747 system to define the architecture, ABI, and tuning of
5748 output packages.
5749 </para>
5750 </glossdef>
5751 </glossentry>
5752
5753 </glossdiv>
5754
5755 <glossdiv id='var-glossary-u'><title>U</title>
5756
5757 <glossentry id='var-UBOOT_ENTRYPOINT'><glossterm>UBOOT_ENTRYPOINT</glossterm>
5758 <glossdef>
5759 <para>
5760 Specifies the entry point for the U-Boot image.
5761 During U-Boot image creation, the
5762 <filename>UBOOT_ENTRYPOINT</filename> variable is passed
5763 as a command-line parameter to the
5764 <filename>uboot-mkimage</filename> utility.
5765 </para>
5766 </glossdef>
5767 </glossentry>
5768
5769 <glossentry id='var-UBOOT_LOADADDRESS'><glossterm>UBOOT_LOADADDRESS</glossterm>
5770 <glossdef>
5771 <para>
5772 Specifies the load address for the U-Boot image.
5773 During U-Boot image creation, the
5774 <filename>UBOOT_LOADADDRESS</filename> variable is passed
5775 as a command-line parameter to the
5776 <filename>uboot-mkimage</filename> utility.
5777 </para>
5778 </glossdef>
5779 </glossentry>
5780
5781 <glossentry id='var-UBOOT_MACHINE'><glossterm>UBOOT_MACHINE</glossterm>
5782 <glossdef>
5783 <para>
5784 Specifies the value passed on the
5785 <filename>make</filename> command line when building
5786 a U-Boot image.
5787 The value indicates the target platform configuration.
5788 You typically set this variable from the machine
5789 configuration file (i.e.
5790 <filename>conf/machine/&lt;machine_name&gt;.conf</filename>).
5791 </para>
5792 </glossdef>
5793 </glossentry>
5794
5795 <glossentry id='var-UBOOT_TARGET'><glossterm>UBOOT_TARGET</glossterm>
5796 <glossdef>
5797 <para>
5798 Specifies the target used for building U-Boot.
5799 The target is passed directly as part of the "make" command
5800 (e.g. SPL and AIS).
5801 If you do not specifically set this variable, the
5802 OpenEmbedded build process passes and uses "all" for the
5803 target during the U-Boot building process.
5804 </para>
5805 </glossdef>
5806 </glossentry>
5807
5808 <glossentry id='var-USER_CLASSES'><glossterm>USER_CLASSES</glossterm>
5809 <glossdef>
5810 <para>
5811 A list of classes to globally inherit.
5812 These classes are used by the OpenEmbedded build system
5813 to enable extra features (e.g.
5814 <filename>buildstats</filename>,
5815 <filename>image-mklibs</filename>, and so forth).
5816 </para>
5817
5818 <para>
5819 The default list is set in your
5820 <filename>local.conf</filename> file:
5821 <literallayout class='monospaced'>
5822 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
5823 </literallayout>
5824 For more information, see
5825 <filename>meta-yocto/conf/local.conf.sample</filename> in
5826 the
5827 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
5828 </para>
5829 </glossdef>
5830 </glossentry>
5831
5832 </glossdiv>
5833
5834<!-- <glossdiv id='var-glossary-v'><title>V</title>-->
5835<!-- </glossdiv>-->
5836
5837 <glossdiv id='var-glossary-w'><title>W</title>
5838
5839 <glossentry id='var-WARN_QA'><glossterm>WARN_QA</glossterm>
5840 <glossdef>
5841 <para>
5842 Specifies the quality assurance checks whose failures are
5843 reported as warnings by the OpenEmbedded build system.
5844 You set this variable in your distribution configuration
5845 file.
5846 For a list of the checks you can control with this variable,
5847 see the
5848 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
5849 section.
5850 </para>
5851 </glossdef>
5852 </glossentry>
5853
5854 <glossentry id='var-WORKDIR'><glossterm>WORKDIR</glossterm>
5855 <glossdef>
5856 <para>
5857 The pathname of the working directory in which the OpenEmbedded build system
5858 builds a recipe.
5859 This directory is located within the
5860 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link> directory structure and changes
5861 as different packages are built.
5862 </para>
5863
5864 <para>
5865 The actual <filename>WORKDIR</filename> directory depends on several things:
5866 <itemizedlist>
5867 <listitem>The temporary directory - <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link></listitem>
5868 <listitem>The package architecture - <link linkend='var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></link></listitem>
5869 <listitem>The target machine - <link linkend='var-MACHINE'><filename>MACHINE</filename></link></listitem>
5870 <listitem>The target operating system - <link linkend='var-TARGET_OS'><filename>TARGET_OS</filename></link></listitem>
5871 <listitem>The recipe name - <link linkend='var-PN'><filename>PN</filename></link></listitem>
5872 <listitem>The recipe version - <link linkend='var-PV'><filename>PV</filename></link></listitem>
5873 <listitem>The recipe revision - <link linkend='var-PR'><filename>PR</filename></link></listitem>
5874 </itemizedlist>
5875 </para>
5876
5877 <para>
5878 For packages that are not dependent on a particular machine,
5879 <filename>WORKDIR</filename> is defined as follows:
5880 <literallayout class='monospaced'>
5881 ${TMPDIR}/work/${PACKAGE_ARCH}-poky-${TARGET_OS}/${PN}/${PV}-${PR}
5882 </literallayout>
5883 As an example, assume a
5884 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> top-level
5885 folder name <filename>poky</filename> and a default
5886 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
5887 at <filename>poky/build</filename>.
5888 In this case, the working directory the build system uses to build
5889 the <filename>v86d</filename> package is the following:
5890 <literallayout class='monospaced'>
5891 poky/build/tmp/work/qemux86-poky-linux/v86d/01.9-r0
5892 </literallayout>
5893 </para>
5894
5895 <para>
5896 For packages that are dependent on a particular machine, <filename>WORKDIR</filename>
5897 is defined slightly differently:
5898 <literallayout class='monospaced'>
5899 ${TMPDIR}/work/${MACHINE}-poky-${TARGET_OS}/${PN}/${PV}-${PR}
5900 </literallayout>
5901 As an example, again assume a Source Directory top-level folder
5902 named <filename>poky</filename> and a default Build Directory
5903 at <filename>poky/build</filename>.
5904 In this case, the working directory the build system uses to build
5905 the <filename>acl</filename> recipe, which is being built for a
5906 MIPS-based device, is the following:
5907 <literallayout class='monospaced'>
5908 poky/build/tmp/work/mips-poky-linux/acl/2.2.51-r2
5909 </literallayout>
5910 </para>
5911 </glossdef>
5912 </glossentry>
5913
5914 </glossdiv>
5915
5916<!-- <glossdiv id='var-glossary-x'><title>X</title>-->
5917<!-- </glossdiv>-->
5918
5919<!-- <glossdiv id='var-glossary-y'><title>Y</title>-->
5920<!-- </glossdiv>-->
5921
5922<!-- <glossdiv id='var-glossary-z'><title>Z</title>-->
5923<!-- </glossdiv>-->
5924
5925</glossary>
5926</chapter>
5927<!--
5928vim: expandtab tw=80 ts=4
5929-->
diff --git a/documentation/ref-manual/ref-varlocality.xml b/documentation/ref-manual/ref-varlocality.xml
new file mode 100644
index 0000000..d3f8732
--- /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 0000000..c48951f
--- /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 BitBake User Manual:</emphasis>
96 A comprehensive guide to the BitBake tool.
97 You can find the BitBake User Manual in the
98 <filename>bitbake/doc/manual</filename> directory, which is
99 found in the
100 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
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 0000000..6d4c6b7
--- /dev/null
+++ b/documentation/ref-manual/technical-details.xml
@@ -0,0 +1,1358 @@
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 Yocto Project.
10 Currently, topics include Yocto Project components,
11 shared state (sstate) cache, x32, and Licenses.
12 </para>
13
14<section id='usingpoky-components'>
15 <title>Yocto Project Components</title>
16
17 <para>
18 The BitBake task executor together with various types of configuration files form the
19 OpenEmbedded Core.
20 This section overviews these by describing what they are used for
21 and how they interact.
22 </para>
23
24 <para>
25 BitBake handles the parsing and execution of the data files.
26 The data itself is of various types:
27 <itemizedlist>
28 <listitem><para><emphasis>Recipes:</emphasis> Provides details about particular
29 pieces of software.</para></listitem>
30 <listitem><para><emphasis>Class Data:</emphasis> Abstracts common build
31 information (e.g. how to build a Linux kernel).</para></listitem>
32 <listitem><para><emphasis>Configuration Data:</emphasis> Defines machine-specific settings,
33 policy decisions, and so forth.
34 Configuration data acts as the glue to bind everything together.</para></listitem>
35 </itemizedlist>
36 For more information on data, see the
37 "<ulink url='&YOCTO_DOCS_DEV_URL;#yocto-project-terms'>Yocto Project Terms</ulink>"
38 section in the Yocto Project Development Manual.
39 </para>
40
41 <para>
42 BitBake knows how to combine multiple data sources together and refers to each data source
43 as a layer.
44 For information on layers, see the
45 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and
46 Creating Layers</ulink>" section of the Yocto Project Development Manual.
47 </para>
48
49 <para>
50 Following are some brief details on these core components.
51 For more detailed information on these components, see the
52 "<link linkend='ref-structure'>Source Directory Structure</link>" chapter.
53 </para>
54
55 <section id='usingpoky-components-bitbake'>
56 <title>BitBake</title>
57
58 <para>
59 BitBake is the tool at the heart of the OpenEmbedded build system
60 and is responsible for parsing the
61 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>,
62 generating a list of tasks from it, and then executing those tasks.
63 To see a list of the options BitBake supports, use either of
64 the following commands:
65 <literallayout class='monospaced'>
66 $ bitbake -h
67 $ bitbake --help
68 </literallayout>
69 </para>
70
71 <para>
72 The most common usage for BitBake is <filename>bitbake &lt;packagename&gt;</filename>, where
73 <filename>packagename</filename> is the name of the package you want to build
74 (referred to as the "target" in this manual).
75 The target often equates to the first part of a <filename>.bb</filename> filename.
76 So, to process the <filename>matchbox-desktop_1.2.3.bb</filename> recipe file, you
77 might type the following:
78 <literallayout class='monospaced'>
79 $ bitbake matchbox-desktop
80 </literallayout>
81 Several different versions of <filename>matchbox-desktop</filename> might exist.
82 BitBake chooses the one selected by the distribution configuration.
83 You can get more details about how BitBake chooses between different
84 target versions and providers in the
85 "<link linkend='ref-bitbake-providers'>Preferences and Providers</link>" section.
86 </para>
87
88 <para>
89 BitBake also tries to execute any dependent tasks first.
90 So for example, before building <filename>matchbox-desktop</filename>, BitBake
91 would build a cross compiler and <filename>eglibc</filename> if they had not already
92 been built.
93 <note>This release of the Yocto Project does not support the <filename>glibc</filename>
94 GNU version of the Unix standard C library. By default, the OpenEmbedded build system
95 builds with <filename>eglibc</filename>.</note>
96 </para>
97
98 <para>
99 A useful BitBake option to consider is the <filename>-k</filename> or
100 <filename>--continue</filename> option.
101 This option instructs BitBake to try and continue processing the job as much
102 as possible even after encountering an error.
103 When an error occurs, the target that
104 failed and those that depend on it cannot be remade.
105 However, when you use this option other dependencies can still be processed.
106 </para>
107 </section>
108
109 <section id='usingpoky-components-metadata'>
110 <title>Metadata (Recipes)</title>
111
112 <para>
113 The <filename>.bb</filename> files are usually referred to as "recipes."
114 In general, a recipe contains information about a single piece of software.
115 This information includes the location from which to download the
116 unaltered source, any source patches to be applied to that source
117 (if needed), which special configuration options to apply,
118 how to compile the source files, and how to package the compiled output.
119 </para>
120
121 <para>
122 The term "package" is sometimes used to refer to recipes. However,
123 since the word "package" is used for the packaged output from the OpenEmbedded
124 build system (i.e. <filename>.ipk</filename> or <filename>.deb</filename> files),
125 this document avoids using the term "package" when referring to recipes.
126 </para>
127 </section>
128
129 <section id='usingpoky-components-classes'>
130 <title>Classes</title>
131
132 <para>
133 Class files (<filename>.bbclass</filename>) contain information that
134 is useful to share between
135 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> files.
136 An example is the Autotools class, which contains
137 common settings for any application that Autotools uses.
138 The "<link linkend='ref-classes'>Classes</link>" chapter provides details
139 about common classes and how to use them.
140 </para>
141 </section>
142
143 <section id='usingpoky-components-configuration'>
144 <title>Configuration</title>
145
146 <para>
147 The configuration files (<filename>.conf</filename>) define various configuration variables
148 that govern the OpenEmbedded build process.
149 These files fall into several areas that define machine configuration options,
150 distribution configuration options, compiler tuning options, general common configuration
151 options, and user configuration options in <filename>local.conf</filename>, which is found
152 in the
153 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
154 </para>
155 </section>
156</section>
157
158<section id="cross-development-toolchain-generation">
159 <title>Cross-Development Toolchain Generation</title>
160
161 <para>
162 The Yocto Project does most of the work for you when it comes to
163 creating
164 <ulink url='&YOCTO_DOCS_DEV_URL;#cross-development-toolchain'>cross-development toolchains</ulink>.
165 This section provides some technical background information on how
166 cross-development toolchains are created and used.
167 For more information on toolchains, you can also see the
168 <ulink url='&YOCTO_DOCS_ADT_URL;'>the Yocto Project Application Developer's Guide</ulink>.
169 </para>
170
171 <para>
172 In the Yocto Project development environment, cross-development
173 toolchains are used to build the image and applications that run on the
174 target hardware.
175 With just a few commands, the OpenEmbedded build system creates
176 these necessary toolchains for you.
177 </para>
178
179 <para>
180 The following figure shows a high-level build environment regarding
181 toolchain construction and use.
182 </para>
183
184 <para>
185 <imagedata fileref="figures/cross-development-toolchains.png" width="8in" depth="6in" align="center" />
186 </para>
187
188 <para>
189 Most of the work occurs on the Build Host.
190 This is the machine used to build images and generally work within the
191 the Yocto Project environment.
192 When you run BitBake to create an image, the OpenEmbedded build system
193 uses the host <filename>gcc</filename> compiler to bootstrap a
194 cross-compiler named <filename>gcc-cross</filename>.
195 The <filename>gcc-cross</filename> compiler is what BitBake uses to
196 compile source files when creating the target image.
197 You can think of <filename>gcc-cross</filename> simply as an
198 automatically generated cross-compiler that is used internally within
199 BitBake only.
200 </para>
201
202 <para>
203 The chain of events that occurs when <filename>gcc-cross</filename> is
204 bootstrapped is as follows:
205 <literallayout class='monospaced'>
206 gcc -> binutils-cross -> gcc-cross-initial -> linux-libc-headers -> eglibc-initial -> eglibc -> gcc-cross -> gcc-runtime
207 </literallayout>
208 <itemizedlist>
209 <listitem><para><filename>gcc</filename>:
210 The build host's GNU Compiler Collection (GCC).
211 </para></listitem>
212 <listitem><para><filename>binutils-cross</filename>:
213 The bare minimum binary utilities needed in order to run
214 the <filename>gcc-cross-initial</filename> phase of the
215 bootstrap operation.
216 </para></listitem>
217 <listitem><para><filename>gcc-cross-initial</filename>:
218 An early stage of the bootstrap process for creating
219 the cross-compiler.
220 This stage builds enough of the <filename>gcc-cross</filename>,
221 the C library, and other pieces needed to finish building the
222 final cross-compiler in later stages.
223 This tool is a "native" package (i.e. it is designed to run on
224 the build host).
225 </para></listitem>
226 <listitem><para><filename>linux-libc-headers</filename>:
227 Headers needed for the cross-compiler.
228 </para></listitem>
229 <listitem><para><filename>eglibc-initial</filename>:
230 An initial version of the Embedded GLIBC needed to bootstrap
231 <filename>eglibc</filename>.
232 </para></listitem>
233 <listitem><para><filename>gcc-cross</filename>:
234 The final stage of the bootstrap process for the
235 cross-compiler.
236 This stage results in the actual cross-compiler that
237 BitBake uses when it builds an image for a targeted
238 device.
239 <note>
240 If you are replacing this cross compiler toolchain
241 with a custom version, you must replace
242 <filename>gcc-cross</filename>.
243 </note>
244 This tool is also a "native" package (i.e. it is
245 designed to run on the build host).
246 </para></listitem>
247 <listitem><para><filename>gcc-runtime</filename>:
248 Runtime libraries resulting from the toolchain bootstrapping
249 process.
250 This tool produces a binary that consists of the
251 runtime libraries need for the targeted device.
252 </para></listitem>
253 </itemizedlist>
254 </para>
255
256 <para>
257 You can use the OpenEmbedded build system to build an installer for
258 the relocatable SDK used to develop applications.
259 When you run the installer, it installs the toolchain, which contains
260 the development tools (e.g., the
261 <filename>gcc-cross-canadian</filename>),
262 <filename>binutils-cross-canadian</filename>, and other
263 <filename>nativesdk-*</filename> tools you need to cross-compile and
264 test your software.
265 The figure shows the commands you use to easily build out this
266 toolchain.
267 This cross-development toolchain is built to execute on the
268 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
269 which might or might not be the same
270 machine as the Build Host.
271 <note>
272 If your target architecture is supported by the Yocto Project,
273 you can take advantage of pre-built images that ship with the
274 Yocto Project and already contain cross-development toolchain
275 installers.
276 </note>
277 </para>
278
279 <para>
280 Here is the bootstrap process for the relocatable toolchain:
281 <literallayout class='monospaced'>
282 gcc -> binutils-crosssdk -> gcc-crosssdk-initial -> linux-libc-headers -> eglibc-initial -> nativesdk-eglibc -> gcc-crosssdk -> gcc-cross-canadian
283 </literallayout>
284 <itemizedlist>
285 <listitem><para><filename>gcc</filename>:
286 The build host's GNU Compiler Collection (GCC).
287 </para></listitem>
288 <listitem><para><filename>binutils-crosssdk</filename>:
289 The bare minimum binary utilities needed in order to run
290 the <filename>gcc-crosssdk-initial</filename> phase of the
291 bootstrap operation.
292 </para></listitem>
293 <listitem><para><filename>gcc-crosssdk-initial</filename>:
294 An early stage of the bootstrap process for creating
295 the cross-compiler.
296 This stage builds enough of the
297 <filename>gcc-crosssdk</filename> and supporting pieces so that
298 the final stage of the bootstrap process can produce the
299 finished cross-compiler.
300 This tool is a "native" binary that runs on the build host.
301 </para></listitem>
302 <listitem><para><filename>linux-libc-headers</filename>:
303 Headers needed for the cross-compiler.
304 </para></listitem>
305 <listitem><para><filename>eglibc-initial</filename>:
306 An initial version of the Embedded GLIBC needed to bootstrap
307 <filename>nativesdk-eglibc</filename>.
308 </para></listitem>
309 <listitem><para><filename>nativesdk-eglibc</filename>:
310 The Embedded GLIBC needed to bootstrap the
311 <filename>gcc-crosssdk</filename>.
312 </para></listitem>
313 <listitem><para><filename>gcc-crosssdk</filename>:
314 The final stage of the bootstrap process for the
315 relocatable cross-compiler.
316 The <filename>gcc-crosssdk</filename> is a transitory compiler
317 and never leaves the build host.
318 Its purpose is to help in the bootstrap process to create the
319 eventual relocatable <filename>gcc-cross-canadian</filename>
320 compiler, which is relocatable.
321 This tool is also a "native" package (i.e. it is
322 designed to run on the build host).
323 </para></listitem>
324 <listitem><para><filename>gcc-cross-canadian</filename>:
325 The final relocatable cross-compiler.
326 When run on the
327 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
328 this tool
329 produces executable code that runs on the target device.
330 </para></listitem>
331 </itemizedlist>
332 </para>
333</section>
334
335<section id="shared-state-cache">
336 <title>Shared State Cache</title>
337
338 <para>
339 By design, the OpenEmbedded build system builds everything from scratch unless
340 BitBake can determine that parts do not need to be rebuilt.
341 Fundamentally, building from scratch is attractive as it means all parts are
342 built fresh and there is no possibility of stale data causing problems.
343 When developers hit problems, they typically default back to building from scratch
344 so they know the state of things from the start.
345 </para>
346
347 <para>
348 Building an image from scratch is both an advantage and a disadvantage to the process.
349 As mentioned in the previous paragraph, building from scratch ensures that
350 everything is current and starts from a known state.
351 However, building from scratch also takes much longer as it generally means
352 rebuilding things that do not necessarily need to be rebuilt.
353 </para>
354
355 <para>
356 The Yocto Project implements shared state code that supports incremental builds.
357 The implementation of the shared state code answers the following questions that
358 were fundamental roadblocks within the OpenEmbedded incremental build support system:
359 <itemizedlist>
360 <listitem><para>What pieces of the system have changed and what pieces have
361 not changed?</para></listitem>
362 <listitem><para>How are changed pieces of software removed and replaced?</para></listitem>
363 <listitem><para>How are pre-built components that do not need to be rebuilt from scratch
364 used when they are available?</para></listitem>
365 </itemizedlist>
366 </para>
367
368 <para>
369 For the first question, the build system detects changes in the "inputs" to a given task by
370 creating a checksum (or signature) of the task's inputs.
371 If the checksum changes, the system assumes the inputs have changed and the task needs to be
372 rerun.
373 For the second question, the shared state (sstate) code tracks which tasks add which output
374 to the build process.
375 This means the output from a given task can be removed, upgraded or otherwise manipulated.
376 The third question is partly addressed by the solution for the second question
377 assuming the build system can fetch the sstate objects from remote locations and
378 install them if they are deemed to be valid.
379 </para>
380
381 <note>
382 The OpenEmbedded build system does not maintain
383 <link linkend='var-PR'><filename>PR</filename></link> information
384 as part of the shared state packages.
385 Consequently, considerations exist that affect maintaining shared
386 state feeds.
387 For information on how the OpenEmbedded works with packages and can
388 track incrementing <filename>PR</filename> information, see the
389 "<ulink url='&YOCTO_DOCS_DEV_URL;#incrementing-a-package-revision-number'>Incrementing a Package Revision Number</ulink>"
390 section.
391 </note>
392
393 <para>
394 The rest of this section goes into detail about the overall incremental build
395 architecture, the checksums (signatures), shared state, and some tips and tricks.
396 </para>
397
398 <section id='overall-architecture'>
399 <title>Overall Architecture</title>
400
401 <para>
402 When determining what parts of the system need to be built, BitBake
403 works on a per-task basis rather than a per-recipe basis.
404 You might wonder why using a per-task basis is preferred over a per-recipe basis.
405 To help explain, consider having the IPK packaging backend enabled and then switching to DEB.
406 In this case, <filename>do_install</filename> and <filename>do_package</filename>
407 outputs are still valid.
408 However, with a per-recipe approach, the build would not include the
409 <filename>.deb</filename> files.
410 Consequently, you would have to invalidate the whole build and rerun it.
411 Rerunning everything is not the best solution.
412 Also, in this case, the core must be "taught" much about specific tasks.
413 This methodology does not scale well and does not allow users to easily add new tasks
414 in layers or as external recipes without touching the packaged-staging core.
415 </para>
416 </section>
417
418 <section id='checksums'>
419 <title>Checksums (Signatures)</title>
420
421 <para>
422 The shared state code uses a checksum, which is a unique signature of a task's
423 inputs, to determine if a task needs to be run again.
424 Because it is a change in a task's inputs that triggers a rerun, the process
425 needs to detect all the inputs to a given task.
426 For shell tasks, this turns out to be fairly easy because
427 the build process generates a "run" shell script for each task and
428 it is possible to create a checksum that gives you a good idea of when
429 the task's data changes.
430 </para>
431
432 <para>
433 To complicate the problem, there are things that should not be included in
434 the checksum.
435 First, there is the actual specific build path of a given task -
436 the <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
437 It does not matter if the working directory changes because it should not
438 affect the output for target packages.
439 Also, the build process has the objective of making native or cross packages relocatable.
440 The checksum therefore needs to exclude <filename>WORKDIR</filename>.
441 The simplistic approach for excluding the working directory is to set
442 <filename>WORKDIR</filename> to some fixed value and create the checksum
443 for the "run" script.
444 </para>
445
446 <para>
447 Another problem results from the "run" scripts containing functions that
448 might or might not get called.
449 The incremental build solution contains code that figures out dependencies
450 between shell functions.
451 This code is used to prune the "run" scripts down to the minimum set,
452 thereby alleviating this problem and making the "run" scripts much more
453 readable as a bonus.
454 </para>
455
456 <para>
457 So far we have solutions for shell scripts.
458 What about Python tasks?
459 The same approach applies even though these tasks are more difficult.
460 The process needs to figure out what variables a Python function accesses
461 and what functions it calls.
462 Again, the incremental build solution contains code that first figures out
463 the variable and function dependencies, and then creates a checksum for the data
464 used as the input to the task.
465 </para>
466
467 <para>
468 Like the <filename>WORKDIR</filename> case, situations exist where dependencies
469 should be ignored.
470 For these cases, you can instruct the build process to ignore a dependency
471 by using a line like the following:
472 <literallayout class='monospaced'>
473 PACKAGE_ARCHS[vardepsexclude] = "MACHINE"
474 </literallayout>
475 This example ensures that the <filename>PACKAGE_ARCHS</filename> variable does not
476 depend on the value of <filename>MACHINE</filename>, even if it does reference it.
477 </para>
478
479 <para>
480 Equally, there are cases where we need to add dependencies BitBake is not able to find.
481 You can accomplish this by using a line like the following:
482 <literallayout class='monospaced'>
483 PACKAGE_ARCHS[vardeps] = "MACHINE"
484 </literallayout>
485 This example explicitly adds the <filename>MACHINE</filename> variable as a
486 dependency for <filename>PACKAGE_ARCHS</filename>.
487 </para>
488
489 <para>
490 Consider a case with in-line Python, for example, where BitBake is not
491 able to figure out dependencies.
492 When running in debug mode (i.e. using <filename>-DDD</filename>), BitBake
493 produces output when it discovers something for which it cannot figure out
494 dependencies.
495 The Yocto Project team has currently not managed to cover those dependencies
496 in detail and is aware of the need to fix this situation.
497 </para>
498
499 <para>
500 Thus far, this section has limited discussion to the direct inputs into a task.
501 Information based on direct inputs is referred to as the "basehash" in the
502 code.
503 However, there is still the question of a task's indirect inputs - the
504 things that were already built and present in the
505 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
506 The checksum (or signature) for a particular task needs to add the hashes
507 of all the tasks on which the particular task depends.
508 Choosing which dependencies to add is a policy decision.
509 However, the effect is to generate a master checksum that combines the basehash
510 and the hashes of the task's dependencies.
511 </para>
512
513 <para>
514 At the code level, there are a variety of ways both the basehash and the
515 dependent task hashes can be influenced.
516 Within the BitBake configuration file, we can give BitBake some extra information
517 to help it construct the basehash.
518 The following statement effectively results in a list of global variable
519 dependency excludes - variables never included in any checksum:
520 <literallayout class='monospaced'>
521 BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \
522 SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
523 USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
524 PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
525 CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX"
526 </literallayout>
527 The previous example excludes
528 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
529 since that variable is actually constructed as a path within
530 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>, which is on
531 the whitelist.
532 </para>
533
534 <para>
535 The rules for deciding which hashes of dependent tasks to include through
536 dependency chains are more complex and are generally accomplished with a
537 Python function.
538 The code in <filename>meta/lib/oe/sstatesig.py</filename> shows two examples
539 of this and also illustrates how you can insert your own policy into the system
540 if so desired.
541 This file defines the two basic signature generators <filename>OE-Core</filename>
542 uses: "OEBasic" and "OEBasicHash".
543 By default, there is a dummy "noop" signature handler enabled in BitBake.
544 This means that behavior is unchanged from previous versions.
545 <filename>OE-Core</filename> uses the "OEBasicHash" signature handler by default
546 through this setting in the <filename>bitbake.conf</filename> file:
547 <literallayout class='monospaced'>
548 BB_SIGNATURE_HANDLER ?= "OEBasicHash"
549 </literallayout>
550 The "OEBasicHash" <filename>BB_SIGNATURE_HANDLER</filename> is the same as the
551 "OEBasic" version but adds the task hash to the stamp files.
552 This results in any
553 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
554 change that changes the task hash, automatically
555 causing the task to be run again.
556 This removes the need to bump <link linkend='var-PR'><filename>PR</filename></link>
557 values, and changes to Metadata automatically ripple across the build.
558 </para>
559
560 <para>
561 It is also worth noting that the end result of these signature generators is to
562 make some dependency and hash information available to the build.
563 This information includes:
564 <literallayout class='monospaced'>
565 BB_BASEHASH_task-&lt;taskname&gt; - the base hashes for each task in the recipe
566 BB_BASEHASH_&lt;filename:taskname&gt; - the base hashes for each dependent task
567 BBHASHDEPS_&lt;filename:taskname&gt; - The task dependencies for each task
568 BB_TASKHASH - the hash of the currently running task
569 </literallayout>
570 </para>
571 </section>
572
573 <section id='shared-state'>
574 <title>Shared State</title>
575
576 <para>
577 Checksums and dependencies, as discussed in the previous section, solve half the
578 problem of supporting a shared state.
579 The other part of the problem is being able to use checksum information during the build
580 and being able to reuse or rebuild specific components.
581 </para>
582
583 <para>
584 The shared state class (<filename>sstate.bbclass</filename>)
585 is a relatively generic implementation of how to "capture" a snapshot of a given task.
586 The idea is that the build process does not care about the source of a task's output.
587 Output could be freshly built or it could be downloaded and unpacked from
588 somewhere - the build process does not need to worry about its origin.
589 </para>
590
591 <para>
592 There are two types of output, one is just about creating a directory
593 in <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
594 A good example is the output of either <filename>do_install</filename> or
595 <filename>do_package</filename>.
596 The other type of output occurs when a set of data is merged into a shared directory
597 tree such as the sysroot.
598 </para>
599
600 <para>
601 The Yocto Project team has tried to keep the details of the implementation hidden in
602 <filename>sstate.bbclass</filename>.
603 From a user's perspective, adding shared state wrapping to a task
604 is as simple as this <filename>do_deploy</filename> example taken from
605 <filename>deploy.bbclass</filename>:
606 <literallayout class='monospaced'>
607 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
608 SSTATETASKS += "do_deploy"
609 do_deploy[sstate-name] = "deploy"
610 do_deploy[sstate-inputdirs] = "${DEPLOYDIR}"
611 do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
612
613 python do_deploy_setscene () {
614 sstate_setscene(d)
615 }
616 addtask do_deploy_setscene
617 do_deploy[dirs] = "${DEPLOYDIR} ${B}"
618 </literallayout>
619 In this example, we add some extra flags to the task, a name field ("deploy"), an
620 input directory where the task sends data, and the output
621 directory where the data from the task should eventually be copied.
622 We also add a <filename>_setscene</filename> variant of the task and add the task
623 name to the <filename>SSTATETASKS</filename> list.
624 </para>
625
626 <para>
627 If you have a directory whose contents you need to preserve, you can do this with
628 a line like the following:
629 <literallayout class='monospaced'>
630 do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}"
631 </literallayout>
632 This method, as well as the following example, also works for multiple directories.
633 <literallayout class='monospaced'>
634 do_package[sstate-inputdirs] = "${PKGDESTWORK} ${SHLIBSWORKDIR}"
635 do_package[sstate-outputdirs] = "${PKGDATA_DIR} ${SHLIBSDIR}"
636 do_package[sstate-lockfile] = "${PACKAGELOCK}"
637 </literallayout>
638 These methods also include the ability to take a lockfile when manipulating
639 shared state directory structures since some cases are sensitive to file
640 additions or removals.
641 </para>
642
643 <para>
644 Behind the scenes, the shared state code works by looking in
645 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link> and
646 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
647 for shared state files.
648 Here is an example:
649 <literallayout class='monospaced'>
650 SSTATE_MIRRORS ?= "\
651 file://.* http://someserver.tld/share/sstate/PATH \n \
652 file://.* file:///some/local/dir/sstate/PATH"
653 </literallayout>
654 <note>
655 The shared state directory (<filename>SSTATE_DIR</filename>) is
656 organized into two-character subdirectories, where the subdirectory
657 names are based on the first two characters of the hash.
658 If the shared state directory structure for a mirror has the
659 same structure as <filename>SSTATE_DIR</filename>, you must
660 specify "PATH" as part of the URI to enable the build system
661 to map to the appropriate subdirectory.
662 </note>
663 </para>
664
665 <para>
666 The shared state package validity can be detected just by looking at the
667 filename since the filename contains the task checksum (or signature) as
668 described earlier in this section.
669 If a valid shared state package is found, the build process downloads it
670 and uses it to accelerate the task.
671 </para>
672
673 <para>
674 The build processes use the <filename>*_setscene</filename> tasks
675 for the task acceleration phase.
676 BitBake goes through this phase before the main execution code and tries
677 to accelerate any tasks for which it can find shared state packages.
678 If a shared state package for a task is available, the shared state
679 package is used.
680 This means the task and any tasks on which it is dependent are not
681 executed.
682 </para>
683
684 <para>
685 As a real world example, the aim is when building an IPK-based image,
686 only the <filename>do_package_write_ipk</filename> tasks would have their
687 shared state packages fetched and extracted.
688 Since the sysroot is not used, it would never get extracted.
689 This is another reason why a task-based approach is preferred over a
690 recipe-based approach, which would have to install the output from every task.
691 </para>
692 </section>
693
694 <section id='tips-and-tricks'>
695 <title>Tips and Tricks</title>
696
697 <para>
698 The code in the build system that supports incremental builds is not
699 simple code.
700 This section presents some tips and tricks that help you work around
701 issues related to shared state code.
702 </para>
703
704 <section id='debugging'>
705 <title>Debugging</title>
706
707 <para>
708 When things go wrong, debugging needs to be straightforward.
709 Because of this, the Yocto Project team included strong debugging
710 tools:
711 <itemizedlist>
712 <listitem><para>Whenever a shared state package is written out, so is a
713 corresponding <filename>.siginfo</filename> file.
714 This practice results in a pickled Python database of all
715 the metadata that went into creating the hash for a given shared state
716 package.</para></listitem>
717 <listitem><para>If you run BitBake with the <filename>--dump-signatures</filename>
718 (or <filename>-S</filename>) option, BitBake dumps out
719 <filename>.siginfo</filename> files in
720 the stamp directory for every task it would have executed instead of
721 building the specified target package.</para></listitem>
722 <listitem><para>There is a <filename>bitbake-diffsigs</filename> command that
723 can process <filename>.siginfo</filename> files.
724 If you specify one of these files, BitBake dumps out the dependency
725 information in the file.
726 If you specify two files, BitBake compares the two files and dumps out
727 the differences between the two.
728 This more easily helps answer the question of "What
729 changed between X and Y?"</para></listitem>
730 </itemizedlist>
731 </para>
732 </section>
733
734 <section id='invalidating-shared-state'>
735 <title>Invalidating Shared State</title>
736
737 <para>
738 The OpenEmbedded build system uses checksums and shared state
739 cache to avoid unnecessarily rebuilding tasks.
740 Collectively, this scheme is known as "shared state code."
741 </para>
742
743 <para>
744 As with all schemes, this one has some drawbacks.
745 It is possible that you could make implicit changes to your
746 code that the checksum calculations do not take into
747 account (i.e. implicit changes).
748 These implicit changes affect a task's output but do not trigger
749 the shared state code into rebuilding a recipe.
750 Consider an example during which a tool changes its output.
751 Assume that the output of <filename>rpmdeps</filename> changes.
752 The result of the change should be that all the
753 <filename>package</filename> and
754 <filename>package_write_rpm</filename> shared state cache
755 items become invalid.
756 However, because the change to the output is
757 external to the code and therefore implicit,
758 the associated shared state cache items do not become
759 invalidated.
760 In this case, the build process uses the cached items rather
761 than running the task again.
762 Obviously, these types of implicit changes can cause problems.
763 </para>
764
765 <para>
766 To avoid these problems during the build, you need to
767 understand the effects of any changes you make.
768 Realize that changes you make directly to a function
769 are automatically factored into the checksum calculation.
770 Thus, these explicit changes invalidate the associated area of
771 sstate cache.
772 However, you need to be aware of any implicit changes that
773 are not obvious changes to the code and could affect the output
774 of a given task.
775 </para>
776
777 <para>
778 When you identify an implicit change, you can easily take steps
779 to invalidate the cache and force the tasks to run.
780 The steps you can take are as simple as changing a function's
781 comments in the source code.
782 For example, to invalidate package shared state files, change
783 the comment statements of <filename>do_package</filename> or
784 the comments of one of the functions it calls.
785 Even though the change is purely cosmetic, it causes the
786 checksum to be recalculated and forces the OpenEmbedded build
787 system to run the task again.
788 </para>
789
790 <note>
791 For an example of a commit that makes a cosmetic change to
792 invalidate shared state, see this
793 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/commit/meta/classes/package.bbclass?id=737f8bbb4f27b4837047cb9b4fbfe01dfde36d54'>commit</ulink>.
794 </note>
795 </section>
796 </section>
797</section>
798
799<section id='x32'>
800 <title>x32</title>
801
802 <para>
803 x32 is a processor-specific Application Binary Interface (psABI) for x86_64.
804 An ABI defines the calling conventions between functions in a processing environment.
805 The interface determines what registers are used and what the sizes are for various C data types.
806 </para>
807
808 <para>
809 Some processing environments prefer using 32-bit applications even when running
810 on Intel 64-bit platforms.
811 Consider the i386 psABI, which is a very old 32-bit ABI for Intel 64-bit platforms.
812 The i386 psABI does not provide efficient use and access of the Intel 64-bit processor resources,
813 leaving the system underutilized.
814 Now consider the x86_64 psABI.
815 This ABI is newer and uses 64-bits for data sizes and program pointers.
816 The extra bits increase the footprint size of the programs, libraries,
817 and also increases the memory and file system size requirements.
818 Executing under the x32 psABI enables user programs to utilize CPU and system resources
819 more efficiently while keeping the memory footprint of the applications low.
820 Extra bits are used for registers but not for addressing mechanisms.
821 </para>
822
823 <section id='support'>
824 <title>Support</title>
825
826 <para>
827 While the x32 psABI specifications are not fully finalized, this Yocto Project
828 release supports current development specifications of x32 psABI.
829 As of this release of the Yocto Project, x32 psABI support exists as follows:
830 <itemizedlist>
831 <listitem><para>You can create packages and images in x32 psABI format on x86_64 architecture targets.
832 </para></listitem>
833 <listitem><para>You can successfully build many recipes with the x32 toolchain.</para></listitem>
834 <listitem><para>You can create and boot <filename>core-image-minimal</filename> and
835 <filename>core-image-sato</filename> images.</para></listitem>
836 </itemizedlist>
837 </para>
838 </section>
839
840 <section id='stabilizing-and-completing-x32'>
841 <title>Stabilizing and Completing x32</title>
842
843 <para>
844 As of this Yocto Project release, the x32 psABI kernel and library
845 interfaces specifications are not finalized.
846 </para>
847
848 <para>
849 Future Plans for the x32 psABI in the Yocto Project include the following:
850 <itemizedlist>
851 <listitem><para>Enhance and fix the few remaining recipes so they
852 work with and support x32 toolchains.</para></listitem>
853 <listitem><para>Enhance RPM Package Manager (RPM) support for x32 binaries.</para></listitem>
854 <listitem><para>Support larger images.</para></listitem>
855 </itemizedlist>
856 </para>
857 </section>
858
859 <section id='using-x32-right-now'>
860 <title>Using x32 Right Now</title>
861
862 <para>
863 Follow these steps to use the x32 spABI:
864 <itemizedlist>
865 <listitem><para>Enable the x32 psABI tuning file for <filename>x86_64</filename>
866 machines by editing the <filename>conf/local.conf</filename> like this:
867 <literallayout class='monospaced'>
868 MACHINE = "qemux86-64"
869 DEFAULTTUNE = "x86-64-x32"
870 baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) \
871 or 'INVALID'), True) or 'lib'}"
872 #MACHINE = "genericx86"
873 #DEFAULTTUNE = "core2-64-x32"
874 </literallayout></para></listitem>
875 <listitem><para>As usual, use BitBake to build an image that supports the x32 psABI.
876 Here is an example:
877 <literallayout class='monospaced'>
878 $ bitbake core-image-sato
879 </literallayout></para></listitem>
880 <listitem><para>As usual, run your image using QEMU:
881 <literallayout class='monospaced'>
882 $ runqemu qemux86-64 core-image-sato
883 </literallayout></para></listitem>
884 </itemizedlist>
885 </para>
886 </section>
887</section>
888
889<section id="wayland">
890 <title>Wayland</title>
891
892 <para>
893 <ulink url='http://en.wikipedia.org/wiki/Wayland_(display_server_protocol)#Weston'>Wayland</ulink>
894 is a computer display server protocol that
895 provides a method for compositing window managers to communicate
896 directly with applications and video hardware and expects them to
897 communicate with input hardware using other libraries.
898 Using Wayland with supporting targets can result in better control
899 over graphics frame rendering than an application might otherwise
900 achieve.
901 </para>
902
903 <para>
904 The Yocto Project provides the Wayland protocol libraries and the
905 reference Weston compositor as part of its release.
906 This section describes what you need to do to implement Wayland and
907 use the compositor when building an image for a supporting target.
908 </para>
909
910 <section id="wayland-support">
911 <title>Support</title>
912
913 <para>
914 The Wayland protocol libraries and the reference Weston compositor
915 ship as integrated packages in the <filename>meta</filename> layer
916 of the
917 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
918 Specifically, you can find the recipes that build both Wayland
919 and Weston at <filename>meta/recipes-graphics/wayland</filename>.
920 </para>
921
922 <para>
923 You can build both the Wayland and Weston packages for use only
924 with targets that accept the
925 <ulink url='http://dri.freedesktop.org/wiki/'>Mesa 3D and Direct Rendering Infrastructure</ulink>,
926 which is also known as Mesa DRI.
927 This implies that you cannot build and use the packages if your
928 target uses, for example, the
929 <trademark class='registered'>Intel</trademark> Embedded Media and
930 Graphics Driver (<trademark class='registered'>Intel</trademark>
931 EMGD) that overrides Mesa DRI.
932 </para>
933
934 <note>
935 Due to lack of EGL support, Weston 1.0.3 will not run directly on
936 the emulated QEMU hardware.
937 However, this version of Weston will run under X emulation without
938 issues.
939 </note>
940 </section>
941
942 <section id="enabling-wayland-in-an-image">
943 <title>Enabling Wayland in an Image</title>
944
945 <para>
946 To enable Wayland, you need to enable it to be built and enable
947 it to be included in the image.
948 </para>
949
950 <section id="enable-building">
951 <title>Building</title>
952
953 <para>
954 To cause Mesa to build the <filename>wayland-egl</filename>
955 platform and Weston to build Wayland with Kernel Mode
956 Setting
957 (<ulink url='https://wiki.archlinux.org/index.php/Kernel_Mode_Setting'>KMS</ulink>)
958 support, include the "wayland" flag in the
959 <link linkend="var-DISTRO_FEATURES"><filename>DISTRO_FEATURES</filename></link>
960 statement in your <filename>local.conf</filename> file:
961 <literallayout class='monospaced'>
962 DISTRO_FEATURES_append = " wayland"
963 </literallayout>
964 </para>
965
966 <note>
967 If X11 has been enabled elsewhere, Weston will build Wayland
968 with X11 support
969 </note>
970 </section>
971
972 <section id="enable-installation-in-an-image">
973 <title>Installing</title>
974
975 <para>
976 To install the Wayland feature into an image, you must
977 include the following
978 <link linkend='var-CORE_IMAGE_EXTRA_INSTALL'><filename>CORE_IMAGE_EXTRA_INSTALL</filename></link>
979 statement in your <filename>local.conf</filename> file:
980 <literallayout class='monospaced'>
981 CORE_IMAGE_EXTRA_INSTALL += "wayland weston"
982 </literallayout>
983 </para>
984 </section>
985 </section>
986
987 <section id="running-weston">
988 <title>Running Weston</title>
989
990 <para>
991 To run Weston inside X11, enabling it as described earlier and
992 building a Sato image is sufficient.
993 If you are running your image under Sato, a Weston Launcher appears
994 in the "Utility" category.
995 </para>
996
997 <para>
998 Alternatively, you can run Weston through the command-line
999 interpretor (CLI), which is better suited for development work.
1000 To run Weston under the CLI, you need to do the following after
1001 your image is built:
1002 <orderedlist>
1003 <listitem><para>Run these commands to export
1004 <filename>XDG_RUNTIME_DIR</filename>:
1005 <literallayout class='monospaced'>
1006 mkdir -p /tmp/$USER-weston
1007 chmod 0700 /tmp/$USER-weston
1008 export XDG_RUNTIME_DIR=/tmp/$USER=weston
1009 </literallayout></para></listitem>
1010 <listitem><para>Launch Weston in the shell:
1011 <literallayout class='monospaced'>
1012 weston
1013 </literallayout></para></listitem>
1014 </orderedlist>
1015 </para>
1016 </section>
1017</section>
1018
1019<section id="licenses">
1020 <title>Licenses</title>
1021
1022 <para>
1023 This section describes the mechanism by which the OpenEmbedded build system
1024 tracks changes to licensing text.
1025 The section also describes how to enable commercially licensed recipes,
1026 which by default are disabled.
1027 </para>
1028
1029 <para>
1030 For information that can help you maintain compliance with various open
1031 source licensing during the lifecycle of the product, see the
1032 "<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
1033 in the Yocto Project Development Manual.
1034 </para>
1035
1036 <section id="usingpoky-configuring-LIC_FILES_CHKSUM">
1037 <title>Tracking License Changes</title>
1038
1039 <para>
1040 The license of an upstream project might change in the future.
1041 In order to prevent these changes going unnoticed, the
1042 <filename><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link></filename>
1043 variable tracks changes to the license text. The checksums are validated at the end of the
1044 configure step, and if the checksums do not match, the build will fail.
1045 </para>
1046
1047 <section id="usingpoky-specifying-LIC_FILES_CHKSUM">
1048 <title>Specifying the <filename>LIC_FILES_CHKSUM</filename> Variable</title>
1049
1050 <para>
1051 The <filename>LIC_FILES_CHKSUM</filename>
1052 variable contains checksums of the license text in the source code for the recipe.
1053 Following is an example of how to specify <filename>LIC_FILES_CHKSUM</filename>:
1054 <literallayout class='monospaced'>
1055 LIC_FILES_CHKSUM = "file://COPYING;md5=xxxx \
1056 file://licfile1.txt;beginline=5;endline=29;md5=yyyy \
1057 file://licfile2.txt;endline=50;md5=zzzz \
1058 ..."
1059 </literallayout>
1060 </para>
1061
1062 <para>
1063 The build system uses the
1064 <filename><link linkend='var-S'>S</link></filename> variable as
1065 the default directory used when searching files listed in
1066 <filename>LIC_FILES_CHKSUM</filename>.
1067 The previous example employs the default directory.
1068 </para>
1069
1070 <para>
1071 Consider this next example:
1072 <literallayout class='monospaced'>
1073 LIC_FILES_CHKSUM = "file://src/ls.c;beginline=5;endline=16;\
1074 md5=bb14ed3c4cda583abc85401304b5cd4e"
1075 LIC_FILES_CHKSUM = "file://${WORKDIR}/license.html;md5=5c94767cedb5d6987c902ac850ded2c6"
1076 </literallayout>
1077 </para>
1078
1079 <para>
1080 The first line locates a file in
1081 <filename>${S}/src/ls.c</filename>.
1082 The second line refers to a file in
1083 <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>.
1084 </para>
1085 <para>
1086 Note that <filename>LIC_FILES_CHKSUM</filename> variable is
1087 mandatory for all recipes, unless the
1088 <filename>LICENSE</filename> variable is set to "CLOSED".
1089 </para>
1090 </section>
1091
1092 <section id="usingpoky-LIC_FILES_CHKSUM-explanation-of-syntax">
1093 <title>Explanation of Syntax</title>
1094 <para>
1095 As mentioned in the previous section, the
1096 <filename>LIC_FILES_CHKSUM</filename> variable lists all the
1097 important files that contain the license text for the source code.
1098 It is possible to specify a checksum for an entire file, or a specific section of a
1099 file (specified by beginning and ending line numbers with the "beginline" and "endline"
1100 parameters, respectively).
1101 The latter is useful for source files with a license notice header,
1102 README documents, and so forth.
1103 If you do not use the "beginline" parameter, then it is assumed that the text begins on the
1104 first line of the file.
1105 Similarly, if you do not use the "endline" parameter, it is assumed that the license text
1106 ends with the last line of the file.
1107 </para>
1108
1109 <para>
1110 The "md5" parameter stores the md5 checksum of the license text.
1111 If the license text changes in any way as compared to this parameter
1112 then a mismatch occurs.
1113 This mismatch triggers a build failure and notifies the developer.
1114 Notification allows the developer to review and address the license text changes.
1115 Also note that if a mismatch occurs during the build, the correct md5
1116 checksum is placed in the build log and can be easily copied to the recipe.
1117 </para>
1118
1119 <para>
1120 There is no limit to how many files you can specify using the
1121 <filename>LIC_FILES_CHKSUM</filename> variable.
1122 Generally, however, every project requires a few specifications for license tracking.
1123 Many projects have a "COPYING" file that stores the license information for all the source
1124 code files.
1125 This practice allows you to just track the "COPYING" file as long as it is kept up to date.
1126 </para>
1127
1128 <tip>
1129 If you specify an empty or invalid "md5" parameter, BitBake returns an md5 mis-match
1130 error and displays the correct "md5" parameter value during the build.
1131 The correct parameter is also captured in the build log.
1132 </tip>
1133
1134 <tip>
1135 If the whole file contains only license text, you do not need to use the "beginline" and
1136 "endline" parameters.
1137 </tip>
1138 </section>
1139 </section>
1140
1141 <section id="enabling-commercially-licensed-recipes">
1142 <title>Enabling Commercially Licensed Recipes</title>
1143
1144 <para>
1145 By default, the OpenEmbedded build system disables
1146 components that have commercial or other special licensing
1147 requirements.
1148 Such requirements are defined on a
1149 recipe-by-recipe basis through the <filename>LICENSE_FLAGS</filename> variable
1150 definition in the affected recipe.
1151 For instance, the
1152 <filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
1153 recipe contains the following statement:
1154 <literallayout class='monospaced'>
1155 LICENSE_FLAGS = "commercial"
1156 </literallayout>
1157 Here is a slightly more complicated example that contains both an
1158 explicit recipe name and version (after variable expansion):
1159 <literallayout class='monospaced'>
1160 LICENSE_FLAGS = "license_${PN}_${PV}"
1161 </literallayout>
1162 In order for a component restricted by a <filename>LICENSE_FLAGS</filename>
1163 definition to be enabled and included in an image, it
1164 needs to have a matching entry in the global
1165 <filename>LICENSE_FLAGS_WHITELIST</filename> variable, which is a variable
1166 typically defined in your <filename>local.conf</filename> file.
1167 For example, to enable
1168 the <filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
1169 package, you could add either the string
1170 "commercial_gst-plugins-ugly" or the more general string
1171 "commercial" to <filename>LICENSE_FLAGS_WHITELIST</filename>.
1172 See the
1173 "<link linkend='license-flag-matching'>License Flag Matching</link>" section
1174 for a full explanation of how <filename>LICENSE_FLAGS</filename> matching works.
1175 Here is the example:
1176 <literallayout class='monospaced'>
1177 LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly"
1178 </literallayout>
1179 Likewise, to additionally enable the package built from the recipe containing
1180 <filename>LICENSE_FLAGS = "license_${PN}_${PV}"</filename>, and assuming
1181 that the actual recipe name was <filename>emgd_1.10.bb</filename>,
1182 the following string would enable that package as well as
1183 the original <filename>gst-plugins-ugly</filename> package:
1184 <literallayout class='monospaced'>
1185 LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly license_emgd_1.10"
1186 </literallayout>
1187 As a convenience, you do not need to specify the complete license string
1188 in the whitelist for every package.
1189 You can use an abbreviated form, which consists
1190 of just the first portion or portions of the license string before
1191 the initial underscore character or characters.
1192 A partial string will match
1193 any license that contains the given string as the first
1194 portion of its license.
1195 For example, the following
1196 whitelist string will also match both of the packages
1197 previously mentioned as well as any other packages that have
1198 licenses starting with "commercial" or "license".
1199 <literallayout class='monospaced'>
1200 LICENSE_FLAGS_WHITELIST = "commercial license"
1201 </literallayout>
1202 </para>
1203
1204 <section id="license-flag-matching">
1205 <title>License Flag Matching</title>
1206
1207 <para>
1208 License flag matching allows you to control what recipes the
1209 OpenEmbedded build system includes in the build.
1210 Fundamentally, the build system attempts to match
1211 <filename>LICENSE_FLAGS</filename> strings found in
1212 recipes against <filename>LICENSE_FLAGS_WHITELIST</filename>
1213 strings found in the whitelist.
1214 A match causes the build system to include a recipe in the
1215 build, while failure to find a match causes the build system to
1216 exclude a recipe.
1217 </para>
1218
1219 <para>
1220 In general, license flag matching is simple.
1221 However, understanding some concepts will help you
1222 correctly and effectively use matching.
1223 </para>
1224
1225 <para>
1226 Before a flag
1227 defined by a particular recipe is tested against the
1228 contents of the whitelist, the expanded string
1229 <filename>_${PN}</filename> is appended to the flag.
1230 This expansion makes each <filename>LICENSE_FLAGS</filename>
1231 value recipe-specific.
1232 After expansion, the string is then matched against the
1233 whitelist.
1234 Thus, specifying
1235 <filename>LICENSE_FLAGS = "commercial"</filename>
1236 in recipe "foo", for example, results in the string
1237 <filename>"commercial_foo"</filename>.
1238 And, to create a match, that string must appear in the
1239 whitelist.
1240 </para>
1241
1242 <para>
1243 Judicious use of the <filename>LICENSE_FLAGS</filename>
1244 strings and the contents of the
1245 <filename>LICENSE_FLAGS_WHITELIST</filename> variable
1246 allows you a lot of flexibility for including or excluding
1247 recipes based on licensing.
1248 For example, you can broaden the matching capabilities by
1249 using license flags string subsets in the whitelist.
1250 <note>When using a string subset, be sure to use the part of
1251 the expanded string that precedes the appended underscore
1252 character (e.g. <filename>usethispart_1.3</filename>,
1253 <filename>usethispart_1.4</filename>, and so forth).
1254 </note>
1255 For example, simply specifying the string "commercial" in
1256 the whitelist matches any expanded
1257 <filename>LICENSE_FLAGS</filename> definition that starts with
1258 the string "commercial" such as "commercial_foo" and
1259 "commercial_bar", which are the strings the build system
1260 automatically generates for hypothetical recipes named
1261 "foo" and "bar" assuming those recipes simply specify the
1262 following:
1263 <literallayout class='monospaced'>
1264 LICENSE_FLAGS = "commercial"
1265 </literallayout>
1266 Thus, you can choose to exhaustively
1267 enumerate each license flag in the whitelist and
1268 allow only specific recipes into the image, or
1269 you can use a string subset that causes a broader range of
1270 matches to allow a range of recipes into the image.
1271 </para>
1272
1273 <para>
1274 This scheme works even if the
1275 <filename>LICENSE_FLAGS</filename> string already
1276 has <filename>_${PN}</filename> appended.
1277 For example, the build system turns the license flag
1278 "commercial_1.2_foo" into "commercial_1.2_foo_foo" and would
1279 match both the general "commercial" and the specific
1280 "commercial_1.2_foo" strings found in the whitelist, as
1281 expected.
1282 </para>
1283
1284 <para>
1285 Here are some other scenarios:
1286 <itemizedlist>
1287 <listitem><para>You can specify a versioned string in the
1288 recipe such as "commercial_foo_1.2" in a "foo" recipe.
1289 The build system expands this string to
1290 "commercial_foo_1.2_foo".
1291 Combine this license flag with a whitelist that has
1292 the string "commercial" and you match the flag along
1293 with any other flag that starts with the string
1294 "commercial".</para></listitem>
1295 <listitem><para>Under the same circumstances, you can
1296 use "commercial_foo" in the whitelist and the
1297 build system not only matches "commercial_foo_1.2" but
1298 also matches any license flag with the string
1299 "commercial_foo", regardless of the version.
1300 </para></listitem>
1301 <listitem><para>You can be very specific and use both the
1302 package and version parts in the whitelist (e.g.
1303 "commercial_foo_1.2") to specifically match a
1304 versioned recipe.</para></listitem>
1305 </itemizedlist>
1306 </para>
1307 </section>
1308
1309 <section id="other-variables-related-to-commercial-licenses">
1310 <title>Other Variables Related to Commercial Licenses</title>
1311
1312 <para>
1313 Other helpful variables related to commercial
1314 license handling exist and are defined in the
1315 <filename>poky/meta/conf/distro/include/default-distrovars.inc</filename> file:
1316 <literallayout class='monospaced'>
1317 COMMERCIAL_AUDIO_PLUGINS ?= ""
1318 COMMERCIAL_VIDEO_PLUGINS ?= ""
1319 COMMERCIAL_QT = ""
1320 </literallayout>
1321 If you want to enable these components, you can do so by making sure you have
1322 statements similar to the following
1323 in your <filename>local.conf</filename> configuration file:
1324 <literallayout class='monospaced'>
1325 COMMERCIAL_AUDIO_PLUGINS = "gst-plugins-ugly-mad \
1326 gst-plugins-ugly-mpegaudioparse"
1327 COMMERCIAL_VIDEO_PLUGINS = "gst-plugins-ugly-mpeg2dec \
1328 gst-plugins-ugly-mpegstream gst-plugins-bad-mpegvideoparse"
1329 COMMERCIAL_QT ?= "qmmp"
1330 LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly commercial_gst-plugins-bad commercial_qmmp"
1331 </literallayout>
1332 Of course, you could also create a matching whitelist
1333 for those components using the more general "commercial"
1334 in the whitelist, but that would also enable all the
1335 other packages with <filename>LICENSE_FLAGS</filename> containing
1336 "commercial", which you may or may not want:
1337 <literallayout class='monospaced'>
1338 LICENSE_FLAGS_WHITELIST = "commercial"
1339 </literallayout>
1340 </para>
1341
1342 <para>
1343 Specifying audio and video plug-ins as part of the
1344 <filename>COMMERCIAL_AUDIO_PLUGINS</filename> and
1345 <filename>COMMERCIAL_VIDEO_PLUGINS</filename> statements
1346 or commercial Qt components as part of
1347 the <filename>COMMERCIAL_QT</filename> statement (along
1348 with the enabling <filename>LICENSE_FLAGS_WHITELIST</filename>) includes the
1349 plug-ins or components into built images, thus adding
1350 support for media formats or components.
1351 </para>
1352 </section>
1353 </section>
1354</section>
1355</chapter>
1356<!--
1357vim: expandtab tw=80 ts=4
1358-->
diff --git a/documentation/ref-manual/usingpoky.xml b/documentation/ref-manual/usingpoky.xml
new file mode 100644
index 0000000..b9df733
--- /dev/null
+++ b/documentation/ref-manual/usingpoky.xml
@@ -0,0 +1,859 @@
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 See the "<link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>"
52 section for more information on this script.
53 </para>
54
55 <para>
56 Once the build environment is set up, you can build a target using:
57 <literallayout class='monospaced'>
58 $ bitbake &lt;target&gt;
59 </literallayout>
60 </para>
61
62 <para>
63 The <filename>target</filename> is the name of the recipe you want to build.
64 Common targets are the images in <filename>meta/recipes-core/images</filename>,
65 <filename>meta/recipes-sato/images</filename>, etc. all found in the
66 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
67 Or, the target can be the name of a recipe for a specific piece of software such as
68 BusyBox.
69 For more details about the images the OpenEmbedded build system supports, see the
70 "<link linkend="ref-images">Images</link>" chapter.
71 </para>
72
73 <note>
74 Building an image without GNU General Public License Version 3 (GPLv3) components
75 is supported for only minimal and base images.
76 See the "<link linkend='ref-images'>Images</link>" chapter for more information.
77 </note>
78 </section>
79
80 <section id='building-an-image-using-gpl-components'>
81 <title>Building an Image Using GPL Components</title>
82
83 <para>
84 When building an image using GPL components, you need to maintain your original
85 settings and not switch back and forth applying different versions of the GNU
86 General Public License.
87 If you rebuild using different versions of GPL, dependency errors might occur
88 due to some components not being rebuilt.
89 </para>
90 </section>
91</section>
92
93<section id='usingpoky-install'>
94 <title>Installing and Using the Result</title>
95
96 <para>
97 Once an image has been built, it often needs to be installed.
98 The images and kernels built by the OpenEmbedded build system are placed in the
99 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink> in
100 <filename class="directory">tmp/deploy/images</filename>.
101 For information on how to run pre-built images such as <filename>qemux86</filename>
102 and <filename>qemuarm</filename>, see the
103 "<ulink url='&YOCTO_DOCS_QS_URL;#using-pre-built'>Using Pre-Built Binaries and QEMU</ulink>"
104 section in the Yocto Project Quick Start.
105 For information about how to install these images, see the documentation for your
106 particular board or machine.
107 </para>
108</section>
109
110<section id='usingpoky-debugging'>
111 <title>Debugging Build Failures</title>
112
113 <para>
114 The exact method for debugging build failures depends on the nature of the
115 problem and on the system's area from which the bug originates.
116 Standard debugging practices such as comparison against the last
117 known working version with examination of the changes and the re-application of steps
118 to identify the one causing the problem are
119 valid for the Yocto Project just as they are for any other system.
120 Even though it is impossible to detail every possible potential failure,
121 this section provides some general tips to aid in debugging.
122 </para>
123
124 <para>
125 For discussions on debugging, see the
126 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
127 and
128 "<ulink url='&YOCTO_DOCS_DEV_URL;#adt-eclipse'>Working within Eclipse</ulink>"
129 sections in the Yocto Project Development Manual.
130 </para>
131
132 <section id='usingpoky-debugging-taskfailures'>
133 <title>Task Failures</title>
134
135 <para>The log file for shell tasks is available in
136 <filename>${WORKDIR}/temp/log.do_taskname.pid</filename>.
137 For example, the <filename>compile</filename> task for the QEMU minimal image for the x86
138 machine (<filename>qemux86</filename>) might be
139 <filename>tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_compile.20830</filename>.
140 To see what BitBake runs to generate that log, look at the corresponding
141 <filename>run.do_taskname.pid</filename> file located in the same directory.
142 </para>
143
144 <para>
145 Presently, the output from Python tasks is sent directly to the console.
146 </para>
147 </section>
148
149 <section id='usingpoky-debugging-taskrunning'>
150 <title>Running Specific Tasks</title>
151
152 <para>
153 Any given package consists of a set of tasks.
154 The standard BitBake behavior in most cases is: <filename>fetch</filename>,
155 <filename>unpack</filename>,
156 <filename>patch</filename>, <filename>configure</filename>,
157 <filename>compile</filename>, <filename>install</filename>, <filename>package</filename>,
158 <filename>package_write</filename>, and <filename>build</filename>.
159 The default task is <filename>build</filename> and any tasks on which it depends
160 build first.
161 Some tasks, such as <filename>devshell</filename>, are not part of the
162 default build chain.
163 If you wish to run a task that is not part of the default build chain, you can use the
164 <filename>-c</filename> option in BitBake.
165 Here is an example:
166 <literallayout class='monospaced'>
167 $ bitbake matchbox-desktop -c devshell
168 </literallayout>
169 </para>
170
171 <para>
172 If you wish to rerun a task, use the <filename>-f</filename> force option.
173 For example, the following sequence forces recompilation after changing files in the
174 working directory.
175 <literallayout class='monospaced'>
176 $ bitbake matchbox-desktop
177 .
178 .
179 [make some changes to the source code in the working directory]
180 .
181 .
182 $ bitbake matchbox-desktop -c compile -f
183 $ bitbake matchbox-desktop
184 </literallayout>
185 </para>
186
187 <para>
188 This sequence first builds and then recompiles
189 <filename>matchbox-desktop</filename>.
190 The last command reruns all tasks (basically the packaging tasks) after the compile.
191 BitBake recognizes that the <filename>compile</filename> task was rerun and therefore
192 understands that the other tasks also need to be run again.
193 </para>
194
195 <para>
196 You can view a list of tasks in a given package by running the
197 <filename>listtasks</filename> task as follows:
198 <literallayout class='monospaced'>
199 $ bitbake matchbox-desktop -c listtasks
200 </literallayout>
201 The results are in the file <filename>${WORKDIR}/temp/log.do_listtasks</filename>.
202 </para>
203 </section>
204
205 <section id='usingpoky-debugging-dependencies'>
206 <title>Dependency Graphs</title>
207
208 <para>
209 Sometimes it can be hard to see why BitBake wants to build some other packages before a given
210 package you have specified.
211 The <filename>bitbake -g targetname</filename> command creates the
212 <filename>depends.dot</filename>, <filename>package-depends.dot</filename>,
213 and <filename>task-depends.dot</filename> files in the current directory.
214 These files show the package and task dependencies and are useful for debugging problems.
215 You can use the <filename>bitbake -g -u depexp targetname</filename> command to
216 display the results in a more human-readable form.
217 </para>
218 </section>
219
220 <section id='usingpoky-debugging-bitbake'>
221 <title>General BitBake Problems</title>
222
223 <para>
224 You can see debug output from BitBake by using the <filename>-D</filename> option.
225 The debug output gives more information about what BitBake
226 is doing and the reason behind it.
227 Each <filename>-D</filename> option you use increases the logging level.
228 The most common usage is <filename>-DDD</filename>.
229 </para>
230
231 <para>
232 The output from <filename>bitbake -DDD -v targetname</filename> can reveal why
233 BitBake chose a certain version of a package or why BitBake
234 picked a certain provider.
235 This command could also help you in a situation where you think BitBake did something
236 unexpected.
237 </para>
238 </section>
239
240 <section id='development-host-system-issues'>
241 <title>Development Host System Issues</title>
242
243 <para>
244 Sometimes issues on the host development system can cause your
245 build to fail.
246 Following are known, host-specific problems.
247 Be sure to always consult the
248 <ulink url='&YOCTO_RELEASE_NOTES;'>Release Notes</ulink>
249 for a look at all release-related issues.
250 <itemizedlist>
251 <listitem><para><emphasis><filename>eglibc-initial</filename> fails to build</emphasis>:
252 If your development host system has the unpatched
253 <filename>GNU Make 3.82</filename>,
254 the <filename>do_install</filename> task
255 fails for <filename>eglibc-initial</filename> during the
256 build.</para>
257 <para>Typically, every distribution that ships
258 <filename>GNU Make 3.82</filename> as
259 the default already has the patched version.
260 However, some distributions, such as Debian, have
261 <filename>GNU Make 3.82</filename> as an option, which
262 is unpatched.
263 You will see this error on these types of distributions.
264 Switch to <filename>GNU Make 3.81</filename> or patch
265 your <filename>make</filename> to solve the problem.
266 </para></listitem>
267 </itemizedlist>
268 </para>
269 </section>
270
271 <section id='usingpoky-debugging-buildfile'>
272 <title>Building with No Dependencies</title>
273 <para>
274 To build a specific recipe (<filename>.bb</filename> file),
275 you can use the following command form:
276 <literallayout class='monospaced'>
277 $ bitbake -b &lt;somepath/somerecipe.bb&gt;
278 </literallayout>
279 This command form does not check for dependencies.
280 Consequently, you should use it
281 only when you know dependencies already exist.
282 <note>
283 You can also specify fragments of the filename.
284 In this case, BitBake checks for a unique match.
285 </note>
286 </para>
287 </section>
288
289 <section id='usingpoky-debugging-variables'>
290 <title>Variables</title>
291 <para>
292 You can use the <filename>-e</filename> BitBake option to
293 display the parsing environment for a configuration.
294 The following displays the general parsing environment:
295 <literallayout class='monospaced'>
296 $ bitbake -e
297 </literallayout>
298 This next example shows the parsing environment for a specific
299 recipe:
300 <literallayout class='monospaced'>
301 $ bitbake -e &lt;recipename&gt;
302 </literallayout>
303 </para>
304 </section>
305
306 <section id='recipe-logging-mechanisms'>
307 <title>Recipe Logging Mechanisms</title>
308 <para>
309 Best practices exist while writing recipes that both log build progress and
310 act on build conditions such as warnings and errors.
311 Both Python and Bash language bindings exist for the logging mechanism:
312 <itemizedlist>
313 <listitem><para><emphasis>Python:</emphasis> For Python functions, BitBake
314 supports several loglevels: <filename>bb.fatal</filename>,
315 <filename>bb.error</filename>, <filename>bb.warn</filename>,
316 <filename>bb.note</filename>, <filename>bb.plain</filename>,
317 and <filename>bb.debug</filename>.</para></listitem>
318 <listitem><para><emphasis>Bash:</emphasis> For Bash functions, the same set
319 of loglevels exist and are accessed with a similar syntax:
320 <filename>bbfatal</filename>, <filename>bberror</filename>,
321 <filename>bbwarn</filename>, <filename>bbnote</filename>,
322 <filename>bbplain</filename>, and <filename>bbdebug</filename>.</para></listitem>
323 </itemizedlist>
324 </para>
325
326 <para>
327 For guidance on how logging is handled in both Python and Bash recipes, see the
328 <filename>logging.bbclass</filename> file in the
329 <filename>meta/classes</filename> folder of the
330 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
331 </para>
332
333 <section id='logging-with-python'>
334 <title>Logging With Python</title>
335 <para>
336 When creating recipes using Python and inserting code that handles build logs,
337 keep in mind the goal is to have informative logs while keeping the console as
338 "silent" as possible.
339 Also, if you want status messages in the log, use the "debug" loglevel.
340 </para>
341
342 <para>
343 Following is an example written in Python.
344 The code handles logging for a function that determines the number of tasks
345 needed to be run:
346 <literallayout class='monospaced'>
347 python do_listtasks() {
348 bb.debug(2, "Starting to figure out the task list")
349 if noteworthy_condition:
350 bb.note("There are 47 tasks to run")
351 bb.debug(2, "Got to point xyz")
352 if warning_trigger:
353 bb.warn("Detected warning_trigger, this might be a problem later.")
354 if recoverable_error:
355 bb.error("Hit recoverable_error, you really need to fix this!")
356 if fatal_error:
357 bb.fatal("fatal_error detected, unable to print the task list")
358 bb.plain("The tasks present are abc")
359 bb.debug(2, "Finished figuring out the tasklist")
360 }
361 </literallayout>
362 </para>
363 </section>
364
365 <section id='logging-with-bash'>
366 <title>Logging With Bash</title>
367 <para>
368 When creating recipes using Bash and inserting code that handles build
369 logs, you have the same goals - informative with minimal console output.
370 The syntax you use for recipes written in Bash is similar to that of
371 recipes written in Python described in the previous section.
372 </para>
373
374 <para>
375 Following is an example written in Bash.
376 The code logs the progress of the <filename>do_my_function</filename> function.
377 <literallayout class='monospaced'>
378 do_my_function() {
379 bbdebug 2 "Running do_my_function"
380 if [ exceptional_condition ]; then
381 bbnote "Hit exceptional_condition"
382 fi
383 bbdebug 2 "Got to point xyz"
384 if [ warning_trigger ]; then
385 bbwarn "Detected warning_trigger, this might cause a problem later."
386 fi
387 if [ recoverable_error ]; then
388 bberror "Hit recoverable_error, correcting"
389 fi
390 if [ fatal_error ]; then
391 bbfatal "fatal_error detected"
392 fi
393 bbdebug 2 "Completed do_my_function"
394 }
395 </literallayout>
396 </para>
397 </section>
398 </section>
399
400 <section id='usingpoky-debugging-others'>
401 <title>Other Tips</title>
402
403 <para>
404 Here are some other tips that you might find useful:
405 <itemizedlist>
406 <listitem><para>When adding new packages, it is worth watching for
407 undesirable items making their way into compiler command lines.
408 For example, you do not want references to local system files like
409 <filename>/usr/lib/</filename> or <filename>/usr/include/</filename>.
410 </para></listitem>
411 <listitem><para>If you want to remove the <filename>psplash</filename>
412 boot splashscreen,
413 add <filename>psplash=false</filename> to the kernel command line.
414 Doing so prevents <filename>psplash</filename> from loading
415 and thus allows you to see the console.
416 It is also possible to switch out of the splashscreen by
417 switching the virtual console (e.g. Fn+Left or Fn+Right on a Zaurus).
418 </para></listitem>
419 </itemizedlist>
420 </para>
421 </section>
422</section>
423
424<section id='maintaining-build-output-quality'>
425 <title>Maintaining Build Output Quality</title>
426
427 <para>
428 Many factors can influence the quality of a build.
429 For example, if you upgrade a recipe to use a new version of an upstream software
430 package or you experiment with some new configuration options, subtle changes
431 can occur that you might not detect until later.
432 Consider the case where your recipe is using a newer version of an upstream package.
433 In this case, a new version of a piece of software might introduce an optional
434 dependency on another library, which is auto-detected.
435 If that library has already been built when the software is building,
436 the software will link to the built library and that library will be pulled
437 into your image along with the new software even if you did not want the
438 library.
439 </para>
440
441 <para>
442 The <filename>buildhistory</filename> class exists to help you maintain
443 the quality of your build output.
444 You can use the class to highlight unexpected and possibly unwanted
445 changes in the build output.
446 When you enable build history, it records information about the contents of
447 each package and image and then commits that information to a local Git
448 repository where you can examine the information.
449 </para>
450
451 <para>
452 The remainder of this section describes the following:
453 <itemizedlist>
454 <listitem><para>How you can enable and disable
455 build history</para></listitem>
456 <listitem><para>How to understand what the build history contains
457 </para></listitem>
458 <listitem><para>How to limit the information used for build history
459 </para></listitem>
460 <listitem><para>How to examine the build history from both a
461 command-line and web interface</para></listitem>
462 </itemizedlist>
463 </para>
464
465 <section id='enabling-and-disabling-build-history'>
466 <title>Enabling and Disabling Build History</title>
467
468 <para>
469 Build history is disabled by default.
470 To enable it, add the following statements to the end of your
471 <filename>conf/local.conf</filename> file found in the
472 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
473 <literallayout class='monospaced'>
474 INHERIT += "buildhistory"
475 BUILDHISTORY_COMMIT = "1"
476 </literallayout>
477 Enabling build history as previously described
478 causes the build process to collect build
479 output information and commit it to a local
480 <ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink> repository.
481 <note>
482 Enabling build history increases your build times slightly,
483 particularly for images, and increases the amount of disk
484 space used during the build.
485 </note>
486 </para>
487
488 <para>
489 You can disable build history by removing the previous statements
490 from your <filename>conf/local.conf</filename> file.
491 However, you should realize that enabling and disabling
492 build history in this manner can change the
493 <filename>do_package</filename> task checksums which, if you
494 are using the OEBasicHash signature generator (the default
495 for many current distro configurations including
496 <filename>DISTRO = "poky"</filename> and
497 <filename>DISTRO = ""</filename>) will result in the packaging
498 tasks being re-run during the subsequent build.
499 </para>
500
501 <para>
502 To disable the build history functionality without causing the
503 packaging tasks to be re-run, add this statement to your
504 <filename>conf/local.conf</filename> file:
505 <literallayout class='monospaced'>
506 BUILDHISTORY_FEATURES = ""
507 </literallayout>
508 </para>
509 </section>
510
511 <section id='understanding-what-the-build-history-contains'>
512 <title>Understanding What the Build History Contains</title>
513
514 <para>
515 Build history information is kept in
516 <filename>$</filename><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link><filename>/buildhistory</filename>
517 in the Build Directory.
518 The following is an example abbreviated listing:
519 <imagedata fileref="figures/buildhistory.png" align="center" width="6in" depth="4in" />
520 </para>
521
522 <para>
523 At the top level, there is a <filename>metadata-revs</filename> file
524 that lists the revisions of the repositories for the layers enabled
525 when the build was produced.
526 The rest of the data splits into separate
527 <filename>packages</filename>, <filename>images</filename> and
528 <filename>sdk</filename> directories, the contents of which are
529 described below.
530 </para>
531
532 <section id='build-history-package-information'>
533 <title>Build History Package Information</title>
534
535 <para>
536 The history for each package contains a text file that has
537 name-value pairs with information about the package.
538 For example, <filename>buildhistory/packages/core2-poky-linux/busybox/busybox/latest</filename>
539 contains the following:
540 <literallayout class='monospaced'>
541 PV = 1.19.3
542 PR = r3
543 RDEPENDS = update-rc.d eglibc (>= 2.13)
544 RRECOMMENDS = busybox-syslog busybox-udhcpc
545 PKGSIZE = 564701
546 FILES = /usr/bin/* /usr/sbin/* /usr/libexec/* /usr/lib/lib*.so.* \
547 /etc /com /var /bin/* /sbin/* /lib/*.so.* /usr/share/busybox \
548 /usr/lib/busybox/* /usr/share/pixmaps /usr/share/applications \
549 /usr/share/idl /usr/share/omf /usr/share/sounds /usr/lib/bonobo/servers
550 FILELIST = /etc/busybox.links /etc/init.d/hwclock.sh /bin/busybox /bin/sh
551 </literallayout>
552 Most of these name-value pairs correspond to variables used
553 to produce the package.
554 The exceptions are <filename>FILELIST</filename>, which is the
555 actual list of files in the package, and
556 <filename>PKGSIZE</filename>, which is the total size of files
557 in the package in bytes.
558 </para>
559
560 <para>
561 There is also a file corresponding to the recipe from which the
562 package came (e.g.
563 <filename>buildhistory/packages/core2-poky-linux/busybox/latest</filename>):
564 <literallayout class='monospaced'>
565 PV = 1.19.3
566 PR = r3
567 DEPENDS = virtual/i586-poky-linux-gcc virtual/i586-poky-linux-compilerlibs \
568 virtual/libc update-rc.d-native
569 PACKAGES = busybox-httpd busybox-udhcpd busybox-udhcpc busybox-syslog \
570 busybox-mdev busybox-dbg busybox busybox-doc busybox-dev \
571 busybox-staticdev busybox-locale
572 </literallayout>
573 </para>
574
575 <para>
576 Finally, for those recipes fetched from a version control
577 system (e.g., Git), a file exists that lists source revisions
578 that are specified in the recipe and lists the actual revisions
579 used during the build.
580 Listed and actual revisions might differ when
581 <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
582 is set to
583 <filename>${<link linkend='var-AUTOREV'>AUTOREV</link>}</filename>.
584 Here is an example assuming
585 <filename>buildhistory/packages/emenlow-poky-linux/linux-yocto/latest_srcrev</filename>):
586 <literallayout class='monospaced'>
587 # SRCREV_machine = "b5c37fe6e24eec194bb29d22fdd55d73bcc709bf"
588 SRCREV_machine = "b5c37fe6e24eec194bb29d22fdd55d73bcc709bf"
589 # SRCREV_emgd = "caea08c988e0f41103bbe18eafca20348f95da02"
590 SRCREV_emgd = "caea08c988e0f41103bbe18eafca20348f95da02"
591 # SRCREV_meta = "c2ed0f16fdec628242a682897d5d86df4547cf24"
592 SRCREV_meta = "c2ed0f16fdec628242a682897d5d86df4547cf24"
593 </literallayout>
594 You can use the <filename>buildhistory-collect-srcrevs</filename>
595 command to collect the stored <filename>SRCREV</filename> values
596 from build history and report them in a format suitable for use in
597 global configuration (e.g., <filename>local.conf</filename>
598 or a distro include file) to override floating
599 <filename>AUTOREV</filename> values to a fixed set of revisions.
600 Here is some example output from this command:
601 <literallayout class='monospaced'>
602 # emenlow-poky-linux
603 SRCREV_machine_pn-linux-yocto = "b5c37fe6e24eec194bb29d22fdd55d73bcc709bf"
604 SRCREV_emgd_pn-linux-yocto = "caea08c988e0f41103bbe18eafca20348f95da02"
605 SRCREV_meta_pn-linux-yocto = "c2ed0f16fdec628242a682897d5d86df4547cf24"
606 # core2-poky-linux
607 SRCREV_pn-kmod = "62081c0f68905b22f375156d4532fd37fa5c8d33"
608 SRCREV_pn-blktrace = "d6918c8832793b4205ed3bfede78c2f915c23385"
609 SRCREV_pn-opkg = "649"
610 </literallayout>
611 <note>
612 Here are some notes on using the
613 <filename>buildhistory-collect-srcrevs</filename> command:
614 <itemizedlist>
615 <listitem><para>By default, only values where the
616 <filename>SRCREV</filename> was
617 not hardcoded (usually when <filename>AUTOREV</filename>
618 was used) are reported.
619 Use the <filename>-a</filename> option to see all
620 <filename>SRCREV</filename> values.
621 </para></listitem>
622 <listitem><para>The output statements might not have any effect
623 if overrides are applied elsewhere in the build system
624 configuration.
625 Use the <filename>-f</filename> option to add the
626 <filename>forcevariable</filename> override to each output line
627 if you need to work around this restriction.
628 </para></listitem>
629 <listitem><para>The script does apply special handling when
630 building for multiple machines.
631 However, the script does place a
632 comment before each set of values that specifies
633 which triplet to which they belong as shown above
634 (e.g., <filename>emenlow-poky-linux</filename>).
635 </para></listitem>
636 </itemizedlist>
637 </note>
638 </para>
639 </section>
640
641 <section id='build-history-image-information'>
642 <title>Build History Image Information</title>
643
644 <para>
645 The files produced for each image are as follows:
646 <itemizedlist>
647 <listitem><para><filename>image-files:</filename>
648 A directory containing selected files from the root
649 filesystem.
650 The files are defined by
651 <filename>BUILDHISTORY_IMAGE_FILES</filename>.
652 </para></listitem>
653 <listitem><para><filename>build-id:</filename>
654 Human-readable information about the build configuration
655 and metadata source revisions.</para></listitem>
656 <listitem><para><filename>*.dot:</filename>
657 Dependency graphs for the image that are
658 compatible with <filename>graphviz</filename>.
659 </para></listitem>
660 <listitem><para><filename>files-in-image.txt:</filename>
661 A list of files in the image with permissions,
662 owner, group, size, and symlink information.
663 </para></listitem>
664 <listitem><para><filename>image-info.txt:</filename>
665 A text file containing name-value pairs with information
666 about the image.
667 See the following listing example for more information.
668 </para></listitem>
669 <listitem><para><filename>installed-package-names.txt:</filename>
670 A list of installed packages by name only.</para></listitem>
671 <listitem><para><filename>installed-package-sizes.txt:</filename>
672 A list of installed packages ordered by size.
673 </para></listitem>
674 <listitem><para><filename>installed-packages.txt:</filename>
675 A list of installed packages with full package
676 filenames.</para></listitem>
677 </itemizedlist>
678 <note>
679 Installed package information is able to be gathered and
680 produced even if package management is disabled for the final
681 image.
682 </note>
683 </para>
684
685 <para>
686 Here is an example of <filename>image-info.txt</filename>:
687 <literallayout class='monospaced'>
688 DISTRO = poky
689 DISTRO_VERSION = 1.1+snapshot-20120207
690 USER_CLASSES = image-mklibs image-prelink
691 IMAGE_CLASSES = image_types
692 IMAGE_FEATURES = debug-tweaks x11-base apps-x11-core \
693 package-management ssh-server-dropbear package-management
694 IMAGE_LINGUAS = en-us en-gb
695 IMAGE_INSTALL = task-core-boot task-base-extended
696 BAD_RECOMMENDATIONS =
697 ROOTFS_POSTPROCESS_COMMAND = buildhistory_get_image_installed ; rootfs_update_timestamp ;
698 IMAGE_POSTPROCESS_COMMAND = buildhistory_get_imageinfo ;
699 IMAGESIZE = 171816
700 </literallayout>
701 Other than <filename>IMAGESIZE</filename>, which is the
702 total size of the files in the image in Kbytes, the
703 name-value pairs are variables that may have influenced the
704 content of the image.
705 This information is often useful when you are trying to determine
706 why a change in the package or file listings has occurred.
707 </para>
708 </section>
709
710 <section id='using-build-history-to-gather-image-information-only'>
711 <title>Using Build History to Gather Image Information Only</title>
712
713 <para>
714 As you can see, build history produces image information,
715 including dependency graphs, so you can see why something
716 was pulled into the image.
717 If you are just interested in this information and not
718 interested in collecting history or any package information,
719 you can enable writing only image information without
720 any history by adding the following
721 to your <filename>conf/local.conf</filename> file found in the
722 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
723 <literallayout class='monospaced'>
724 INHERIT += "buildhistory"
725 BUILDHISTORY_COMMIT = "0"
726 BUILDHISTORY_FEATURES = "image"
727 </literallayout>
728 </para>
729 </section>
730
731 <section id='build-history-sdk-information'>
732 <title>Build History SDK Information</title>
733 <para>
734 Build history collects similar information on the contents
735 of SDKs (e.g., <filename>meta-toolchain</filename>
736 or <filename>bitbake -c populate_sdk imagename</filename>)
737 as compared to information it collects for images.
738 The following list shows the files produced for each SDK:
739 <itemizedlist>
740 <listitem><para><filename>files-in-sdk.txt:</filename>
741 A list of files in the SDK with permissions,
742 owner, group, size, and symlink information.
743 This list includes both the host and target parts
744 of the SDK.
745 </para></listitem>
746 <listitem><para><filename>sdk-info.txt:</filename>
747 A text file containing name-value pairs with information
748 about the SDK.
749 See the following listing example for more information.
750 </para></listitem>
751 <listitem><para>The following information appears under
752 each of the <filename>host</filename>
753 and <filename>target</filename> directories
754 for the portions of the SDK that run on the host and
755 on the target, respectively:
756 <itemizedlist>
757 <listitem><para><filename>depends.dot:</filename>
758 Dependency graph for the SDK that is
759 compatible with <filename>graphviz</filename>.
760 </para></listitem>
761 <listitem><para><filename>installed-package-names.txt:</filename>
762 A list of installed packages by name only.
763 </para></listitem>
764 <listitem><para><filename>installed-package-sizes.txt:</filename>
765 A list of installed packages ordered by size.
766 </para></listitem>
767 <listitem><para><filename>installed-packages.txt:</filename>
768 A list of installed packages with full package
769 filenames.</para></listitem>
770 </itemizedlist>
771 </para></listitem>
772 </itemizedlist>
773 </para>
774
775 <para>
776 Here is an example of <filename>sdk-info.txt</filename>:
777 <literallayout class='monospaced'>
778 DISTRO = poky
779 DISTRO_VERSION = 1.3+snapshot-20130327
780 SDK_NAME = poky-eglibc-i686-arm
781 SDK_VERSION = 1.3+snapshot
782 SDKMACHINE =
783 SDKIMAGE_FEATURES = dev-pkgs dbg-pkgs
784 BAD_RECOMMENDATIONS =
785 SDKSIZE = 352712
786 </literallayout>
787 Other than <filename>SDKSIZE</filename>, which is the
788 total size of the files in the SDK in Kbytes, the
789 name-value pairs are variables that might have influenced the
790 content of the SDK.
791 This information is often useful when you are trying to
792 determine why a change in the package or file listings
793 has occurred.
794 </para>
795 </section>
796
797 <section id='examining-build-history-information'>
798 <title>Examining Build History Information</title>
799
800 <para>
801 You can examine build history output from the command line or
802 from a web interface.
803 </para>
804
805 <para>
806 To see any changes that have occurred (assuming you have
807 <filename>BUILDHISTORY_COMMIT = "1"</filename>), you can simply
808 use any Git command that allows you to view the history of
809 a repository.
810 Here is one method:
811 <literallayout class='monospaced'>
812 $ git log -p
813 </literallayout>
814 You need to realize, however, that this method does show
815 changes that are not significant (e.g. a package's size
816 changing by a few bytes).
817 </para>
818
819 <para>
820 A command-line tool called <filename>buildhistory-diff</filename>
821 does exist, though, that queries the Git repository and prints just
822 the differences that might be significant in human-readable form.
823 Here is an example:
824 <literallayout class='monospaced'>
825 $ ~/poky/poky/scripts/buildhistory-diff . HEAD^
826 Changes to images/qemux86_64/eglibc/core-image-minimal (files-in-image.txt):
827 /etc/anotherpkg.conf was added
828 /sbin/anotherpkg was added
829 * (installed-package-names.txt):
830 * anotherpkg was added
831 Changes to images/qemux86_64/eglibc/core-image-minimal (installed-package-names.txt):
832 anotherpkg was added
833 packages/qemux86_64-poky-linux/v86d: PACKAGES: added "v86d-extras"
834 * PR changed from "r0" to "r1"
835 * PV changed from "0.1.10" to "0.1.12"
836 packages/qemux86_64-poky-linux/v86d/v86d: PKGSIZE changed from 110579 to 144381 (+30%)
837 * PR changed from "r0" to "r1"
838 * PV changed from "0.1.10" to "0.1.12"
839 </literallayout>
840 </para>
841
842 <para>
843 To see changes to the build history using a web interface, follow
844 the instruction in the <filename>README</filename> file here.
845 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/buildhistory-web/'></ulink>.
846 </para>
847
848 <para>
849 Here is a sample screenshot of the interface:
850 <imagedata fileref="figures/buildhistory-web.png" align="center" scalefit="1" width="130%" contentdepth="130%" />
851 </para>
852 </section>
853 </section>
854</section>
855
856</chapter>
857<!--
858vim: expandtab tw=80 ts=4
859-->