summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /documentation/ref-manual
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'documentation/ref-manual')
-rw-r--r--documentation/ref-manual/TODO11
-rw-r--r--documentation/ref-manual/closer-look.xml1304
-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.xml799
-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 -> 44913 bytes
-rw-r--r--documentation/ref-manual/figures/configuration-compile-autoreconf.pngbin0 -> 46080 bytes
-rw-r--r--documentation/ref-manual/figures/cross-development-toolchains.pngbin0 -> 59275 bytes
-rw-r--r--documentation/ref-manual/figures/image-generation.pngbin0 -> 50418 bytes
-rw-r--r--documentation/ref-manual/figures/images.pngbin0 -> 22926 bytes
-rw-r--r--documentation/ref-manual/figures/layer-input.pngbin0 -> 45856 bytes
-rw-r--r--documentation/ref-manual/figures/package-feeds.pngbin0 -> 27711 bytes
-rw-r--r--documentation/ref-manual/figures/patching.pngbin0 -> 42523 bytes
-rw-r--r--documentation/ref-manual/figures/poky-title.pngbin0 -> 11592 bytes
-rw-r--r--documentation/ref-manual/figures/sdk-generation.pngbin0 -> 45456 bytes
-rw-r--r--documentation/ref-manual/figures/sdk.pngbin0 -> 20074 bytes
-rw-r--r--documentation/ref-manual/figures/source-fetching.pngbin0 -> 38860 bytes
-rw-r--r--documentation/ref-manual/figures/source-input.pngbin0 -> 39872 bytes
-rw-r--r--documentation/ref-manual/figures/user-configuration.pngbin0 -> 23687 bytes
-rw-r--r--documentation/ref-manual/figures/yocto-environment-ref.pngbin0 -> 83206 bytes
-rw-r--r--documentation/ref-manual/introduction.xml572
-rw-r--r--documentation/ref-manual/migration.xml2019
-rw-r--r--documentation/ref-manual/ref-bitbake.xml472
-rw-r--r--documentation/ref-manual/ref-classes.xml3489
-rw-r--r--documentation/ref-manual/ref-features.xml420
-rw-r--r--documentation/ref-manual/ref-images.xml169
-rw-r--r--documentation/ref-manual/ref-manual-customization.xsl21
-rw-r--r--documentation/ref-manual/ref-manual-eclipse-customization.xsl27
-rw-r--r--documentation/ref-manual/ref-manual.xml160
-rw-r--r--documentation/ref-manual/ref-qa-checks.xml1217
-rw-r--r--documentation/ref-manual/ref-structure.xml1129
-rw-r--r--documentation/ref-manual/ref-style.css985
-rw-r--r--documentation/ref-manual/ref-tasks.xml695
-rw-r--r--documentation/ref-manual/ref-variables.xml10284
-rw-r--r--documentation/ref-manual/ref-varlocality.xml196
-rw-r--r--documentation/ref-manual/resources.xml130
-rw-r--r--documentation/ref-manual/technical-details.xml1421
-rw-r--r--documentation/ref-manual/usingpoky.xml915
43 files changed, 26497 insertions, 0 deletions
diff --git a/documentation/ref-manual/TODO b/documentation/ref-manual/TODO
new file mode 100644
index 0000000000..ee0db977cc
--- /dev/null
+++ b/documentation/ref-manual/TODO
@@ -0,0 +1,11 @@
1Handbook Todo List:
2
3 * Document adding a new IMAGE_FEATURE to the customising images section
4 * Add instructions about using zaurus/openmoko emulation
5 * Add component overview/block diagrams
6 * Software Deevelopment intro should mention its software development for
7 intended target and could be a different arch etc and thus special case.
8 * Expand insane.bbclass documentation to cover tests
9 * Document remaining classes (see list in ref-classes)
10 * Document formfactor
11
diff --git a/documentation/ref-manual/closer-look.xml b/documentation/ref-manual/closer-look.xml
new file mode 100644
index 0000000000..c0c0d619a4
--- /dev/null
+++ b/documentation/ref-manual/closer-look.xml
@@ -0,0 +1,1304 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='closer-look'>
6<title>A Closer Look at the Yocto Project Development Environment</title>
7
8 <para>
9 This chapter takes a more detailed look at the Yocto Project
10 development environment.
11 The following diagram represents the development environment at a
12 high level.
13 The remainder of this chapter expands on the fundamental input, output,
14 process, and
15 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>) blocks
16 in the Yocto Project development environment.
17 </para>
18
19 <para id='general-yocto-environment-figure'>
20 <imagedata fileref="figures/yocto-environment-ref.png" align="center" width="8in" depth="4.25in" />
21 </para>
22
23 <para>
24 The generalized Yocto Project Development Environment consists of
25 several functional areas:
26 <itemizedlist>
27 <listitem><para><emphasis>User Configuration:</emphasis>
28 Metadata you can use to control the build process.
29 </para></listitem>
30 <listitem><para><emphasis>Metadata Layers:</emphasis>
31 Various layers that provide software, machine, and
32 distro Metadata.</para></listitem>
33 <listitem><para><emphasis>Source Files:</emphasis>
34 Upstream releases, local projects, and SCMs.</para></listitem>
35 <listitem><para><emphasis>Build System:</emphasis>
36 Processes under the control of
37 <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
38 This block expands on how BitBake fetches source, applies
39 patches, completes compilation, analyzes output for package
40 generation, creates and tests packages, generates images, and
41 generates cross-development tools.</para></listitem>
42 <listitem><para><emphasis>Package Feeds:</emphasis>
43 Directories containing output packages (RPM, DEB or IPK),
44 which are subsequently used in the construction of an image or
45 SDK, produced by the build system.
46 These feeds can also be copied and shared using a web server or
47 other means to facilitate extending or updating existing
48 images on devices at runtime if runtime package management is
49 enabled.</para></listitem>
50 <listitem><para><emphasis>Images:</emphasis>
51 Images produced by the development process.
52 </para></listitem>
53 <listitem><para><emphasis>Application Development SDK:</emphasis>
54 Cross-development tools that are produced along with an image
55 or separately with BitBake.</para></listitem>
56 </itemizedlist>
57 </para>
58
59 <section id="user-configuration">
60 <title>User Configuration</title>
61
62 <para>
63 User configuration helps define the build.
64 Through user configuration, you can tell BitBake the
65 target architecture for which you are building the image,
66 where to store downloaded source, and other build properties.
67 </para>
68
69 <para>
70 The following figure shows an expanded representation of the
71 "User Configuration" box of the
72 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>:
73 </para>
74
75 <para>
76 <imagedata fileref="figures/user-configuration.png" align="center" width="5.5in" depth="3.5in" />
77 </para>
78
79 <para>
80 BitBake needs some basic configuration files in order to complete
81 a build.
82 These files are <filename>*.conf</filename> files.
83 The minimally necessary ones reside as example files in the
84 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
85 For simplicity, this section refers to the Source Directory as
86 the "Poky Directory."
87 </para>
88
89 <para>
90 When you clone the <filename>poky</filename> Git repository or you
91 download and unpack a Yocto Project release, you can set up the
92 Source Directory to be named anything you want.
93 For this discussion, the cloned repository uses the default
94 name <filename>poky</filename>.
95 <note>
96 The Poky repository is primarily an aggregation of existing
97 repositories.
98 It is not a canonical upstream source.
99 </note>
100 </para>
101
102 <para>
103 The <filename>meta-yocto</filename> layer inside Poky contains
104 a <filename>conf</filename> directory that has example
105 configuration files.
106 These example files are used as a basis for creating actual
107 configuration files when you source the build environment
108 script
109 (i.e.
110 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
111 or
112 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
113 </para>
114
115 <para>
116 Sourcing the build environment script creates a
117 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
118 if one does not already exist.
119 BitBake uses the Build Directory for all its work during builds.
120 The Build Directory has a <filename>conf</filename> directory that
121 contains default versions of your <filename>local.conf</filename>
122 and <filename>bblayers.conf</filename> configuration files.
123 These default configuration files are created only if versions
124 do not already exist in the Build Directory at the time you
125 source the build environment setup script.
126 </para>
127
128 <para>
129 Because the Poky repository is fundamentally an aggregation of
130 existing repositories, some users might be familiar with running
131 the <filename>&OE_INIT_FILE;</filename> or
132 <filename>oe-init-build-env-memres</filename> script in the context
133 of separate OpenEmbedded-Core and BitBake repositories rather than a
134 single Poky repository.
135 This discussion assumes the script is executed from within a cloned
136 or unpacked version of Poky.
137 </para>
138
139 <para>
140 Depending on where the script is sourced, different sub-scripts
141 are called to set up the Build Directory (Yocto or OpenEmbedded).
142 Specifically, the script
143 <filename>scripts/oe-setup-builddir</filename> inside the
144 poky directory sets up the Build Directory and seeds the directory
145 (if necessary) with configuration files appropriate for the
146 Yocto Project development environment.
147 <note>
148 The <filename>scripts/oe-setup-builddir</filename> script
149 uses the <filename>$TEMPLATECONF</filename> variable to
150 determine which sample configuration files to locate.
151 </note>
152 </para>
153
154 <para>
155 The <filename>local.conf</filename> file provides many
156 basic variables that define a build environment.
157 Here is a list of a few.
158 To see the default configurations in a <filename>local.conf</filename>
159 file created by the build environment script, see the
160 <filename>local.conf.sample</filename> in the
161 <filename>meta-yocto</filename> layer:
162 <itemizedlist>
163 <listitem><para><emphasis>Parallelism Options:</emphasis>
164 Controlled by the
165 <link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>
166 and
167 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
168 variables.</para></listitem>
169 <listitem><para><emphasis>Target Machine Selection:</emphasis>
170 Controlled by the
171 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
172 variable.</para></listitem>
173 <listitem><para><emphasis>Download Directory:</emphasis>
174 Controlled by the
175 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
176 variable.</para></listitem>
177 <listitem><para><emphasis>Shared State Directory:</emphasis>
178 Controlled by the
179 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>
180 variable.</para></listitem>
181 <listitem><para><emphasis>Build Output:</emphasis>
182 Controlled by the
183 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
184 variable.</para></listitem>
185 </itemizedlist>
186 <note>
187 Configurations set in the <filename>conf/local.conf</filename>
188 file can also be set in the
189 <filename>conf/site.conf</filename> and
190 <filename>conf/auto.conf</filename> configuration files.
191 </note>
192 </para>
193
194 <para>
195 The <filename>bblayers.conf</filename> file tells BitBake what
196 layers you want considered during the build.
197 By default, the layers listed in this file include layers
198 minimally needed by the build system.
199 However, you must manually add any custom layers you have created.
200 You can find more information on working with the
201 <filename>bblayers.conf</filename> file in the
202 "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>"
203 section in the Yocto Project Development Manual.
204 </para>
205
206 <para>
207 The files <filename>site.conf</filename> and
208 <filename>auto.conf</filename> are not created by the environment
209 initialization script.
210 If you want these configuration files, you must create them
211 yourself:
212 <itemizedlist>
213 <listitem><para><emphasis><filename>site.conf</filename>:</emphasis>
214 You can use the <filename>conf/site.conf</filename>
215 configuration file to configure multiple build directories.
216 For example, suppose you had several build environments and
217 they shared some common features.
218 You can set these default build properties here.
219 A good example is perhaps the level of parallelism you want
220 to use through the
221 <link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>
222 and
223 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
224 variables.</para>
225 <para>One useful scenario for using the
226 <filename>conf/site.conf</filename> file is to extend your
227 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
228 variable to include the path to a
229 <filename>conf/site.conf</filename>.
230 Then, when BitBake looks for Metadata using
231 <filename>BBPATH</filename>, it finds the
232 <filename>conf/site.conf</filename> file and applies your
233 common configurations found in the file.
234 To override configurations in a particular build directory,
235 alter the similar configurations within that build
236 directory's <filename>conf/local.conf</filename> file.
237 </para></listitem>
238 <listitem><para><emphasis><filename>auto.conf</filename>:</emphasis>
239 This file is not hand-created.
240 Rather, the file is usually created and written to by
241 an autobuilder.
242 The settings put into the file are typically the same as
243 you would find in the <filename>conf/local.conf</filename>
244 or the <filename>conf/site.conf</filename> files.
245 </para></listitem>
246 </itemizedlist>
247 </para>
248
249 <para>
250 You can edit all configuration files to further define
251 any particular build environment.
252 This process is represented by the "User Configuration Edits"
253 box in the figure.
254 </para>
255
256 <para>
257 When you launch your build with the
258 <filename>bitbake <replaceable>target</replaceable></filename> command, BitBake
259 sorts out the configurations to ultimately define your build
260 environment.
261 </para>
262 </section>
263
264 <section id="metadata-machine-configuration-and-policy-configuration">
265 <title>Metadata, Machine Configuration, and Policy Configuration</title>
266
267 <para>
268 The previous section described the user configurations that
269 define BitBake's global behavior.
270 This section takes a closer look at the layers the build system
271 uses to further control the build.
272 These layers provide Metadata for the software, machine, and
273 policy.
274 </para>
275
276 <para>
277 In general, three types of layer input exist:
278 <itemizedlist>
279 <listitem><para><emphasis>Policy Configuration:</emphasis>
280 Distribution Layers provide top-level or general
281 policies for the image or SDK being built.
282 For example, this layer would dictate whether BitBake
283 produces RPM or IPK packages.</para></listitem>
284 <listitem><para><emphasis>Machine Configuration:</emphasis>
285 Board Support Package (BSP) layers provide machine
286 configurations.
287 This type of information is specific to a particular
288 target architecture.</para></listitem>
289 <listitem><para><emphasis>Metadata:</emphasis>
290 Software layers contain user-supplied recipe files,
291 patches, and append files.
292 </para></listitem>
293 </itemizedlist>
294 </para>
295
296 <para>
297 The following figure shows an expanded representation of the
298 Metadata, Machine Configuration, and Policy Configuration input
299 (layers) boxes of the
300 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>:
301 </para>
302
303 <para>
304 <imagedata fileref="figures/layer-input.png" align="center" width="8in" depth="7.5in" />
305 </para>
306
307 <para>
308 In general, all layers have a similar structure.
309 They all contain a licensing file
310 (e.g. <filename>COPYING</filename>) if the layer is to be
311 distributed, a <filename>README</filename> file as good practice
312 and especially if the layer is to be distributed, a
313 configuration directory, and recipe directories.
314 </para>
315
316 <para>
317 The Yocto Project has many layers that can be used.
318 You can see a web-interface listing of them on the
319 <ulink url="http://git.yoctoproject.org/">Source Repositories</ulink>
320 page.
321 The layers are shown at the bottom categorized under
322 "Yocto Metadata Layers."
323 These layers are fundamentally a subset of the
324 <ulink url="http://layers.openembedded.org/layerindex/layers/">OpenEmbedded Metadata Index</ulink>,
325 which lists all layers provided by the OpenEmbedded community.
326 <note>
327 Layers exist in the Yocto Project Source Repositories that
328 cannot be found in the OpenEmbedded Metadata Index.
329 These layers are either deprecated or experimental in nature.
330 </note>
331 </para>
332
333 <para>
334 BitBake uses the <filename>conf/bblayers.conf</filename> file,
335 which is part of the user configuration, to find what layers it
336 should be using as part of the build.
337 </para>
338
339 <para>
340 For more information on layers, see the
341 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
342 section in the Yocto Project Development Manual.
343 </para>
344
345 <section id="distro-layer">
346 <title>Distro Layer</title>
347
348 <para>
349 The distribution layer provides policy configurations for your
350 distribution.
351 Best practices dictate that you isolate these types of
352 configurations into their own layer.
353 Settings you provide in
354 <filename>conf/distro/<replaceable>distro</replaceable>.conf</filename> override
355 similar
356 settings that BitBake finds in your
357 <filename>conf/local.conf</filename> file in the Build
358 Directory.
359 </para>
360
361 <para>
362 The following list provides some explanation and references
363 for what you typically find in the distribution layer:
364 <itemizedlist>
365 <listitem><para><emphasis>classes:</emphasis>
366 Class files (<filename>.bbclass</filename>) hold
367 common functionality that can be shared among
368 recipes in the distribution.
369 When your recipes inherit a class, they take on the
370 settings and functions for that class.
371 You can read more about class files in the
372 "<link linkend='ref-classes'>Classes</link>" section.
373 </para></listitem>
374 <listitem><para><emphasis>conf:</emphasis>
375 This area holds configuration files for the
376 layer (<filename>conf/layer.conf</filename>),
377 the distribution
378 (<filename>conf/distro/<replaceable>distro</replaceable>.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/<replaceable>machine</replaceable>.conf</filename>) and,
412 of course, the layer (<filename>conf/layer.conf</filename>).
413 </para>
414
415 <para>
416 The remainder of the layer is dedicated to specific recipes
417 by function: <filename>recipes-bsp</filename>,
418 <filename>recipes-core</filename>,
419 <filename>recipes-graphics</filename>, and
420 <filename>recipes-kernel</filename>.
421 Metadata can exist for multiple formfactors, graphics
422 support systems, and so forth.
423 <note>
424 While the figure shows several <filename>recipes-*</filename>
425 directories, not all these directories appear in all
426 BSP layers.
427 </note>
428 </para>
429 </section>
430
431 <section id="software-layer">
432 <title>Software Layer</title>
433
434 <para>
435 The software layer provides the Metadata for additional
436 software packages used during the build.
437 This layer does not include Metadata that is specific to the
438 distribution or the machine, which are found in their
439 respective layers.
440 </para>
441
442 <para>
443 This layer contains any new recipes that your project needs
444 in the form of recipe files.
445 </para>
446 </section>
447 </section>
448
449 <section id="sources-dev-environment">
450 <title>Sources</title>
451
452 <para>
453 In order for the OpenEmbedded build system to create an image or
454 any target, it must be able to access source files.
455 The
456 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>
457 represents source files using the "Upstream Project Releases",
458 "Local Projects", and "SCMs (optional)" boxes.
459 The figure represents mirrors, which also play a role in locating
460 source files, with the "Source Mirror(s)" box.
461 </para>
462
463 <para>
464 The method by which source files are ultimately organized is
465 a function of the project.
466 For example, for released software, projects tend to use tarballs
467 or other archived files that can capture the state of a release
468 guaranteeing that it is statically represented.
469 On the other hand, for a project that is more dynamic or
470 experimental in nature, a project might keep source files in a
471 repository controlled by a Source Control Manager (SCM) such as
472 Git.
473 Pulling source from a repository allows you to control
474 the point in the repository (the revision) from which you want to
475 build software.
476 Finally, a combination of the two might exist, which would give the
477 consumer a choice when deciding where to get source files.
478 </para>
479
480 <para>
481 BitBake uses the
482 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
483 variable to point to source files regardless of their location.
484 Each recipe must have a <filename>SRC_URI</filename> variable
485 that points to the source.
486 </para>
487
488 <para>
489 Another area that plays a significant role in where source files
490 come from is pointed to by the
491 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
492 variable.
493 This area is a cache that can hold previously downloaded source.
494 You can also instruct the OpenEmbedded build system to create
495 tarballs from Git repositories, which is not the default behavior,
496 and store them in the <filename>DL_DIR</filename> by using the
497 <link linkend='var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></link>
498 variable.
499 </para>
500
501 <para>
502 Judicious use of a <filename>DL_DIR</filename> directory can
503 save the build system a trip across the Internet when looking
504 for files.
505 A good method for using a download directory is to have
506 <filename>DL_DIR</filename> point to an area outside of your
507 Build Directory.
508 Doing so allows you to safely delete the Build Directory
509 if needed without fear of removing any downloaded source file.
510 </para>
511
512 <para>
513 The remainder of this section provides a deeper look into the
514 source files and the mirrors.
515 Here is a more detailed look at the source file area of the
516 base figure:
517 <imagedata fileref="figures/source-input.png" align="center" width="7in" depth="7.5in" />
518 </para>
519
520 <section id='upstream-project-releases'>
521 <title>Upstream Project Releases</title>
522
523 <para>
524 Upstream project releases exist anywhere in the form of an
525 archived file (e.g. tarball or zip file).
526 These files correspond to individual recipes.
527 For example, the figure uses specific releases each for
528 BusyBox, Qt, and Dbus.
529 An archive file can be for any released product that can be
530 built using a recipe.
531 </para>
532 </section>
533
534 <section id='local-projects'>
535 <title>Local Projects</title>
536
537 <para>
538 Local projects are custom bits of software the user provides.
539 These bits reside somewhere local to a project - perhaps
540 a directory into which the user checks in items (e.g.
541 a local directory containing a development source tree
542 used by the group).
543 </para>
544
545 <para>
546 The canonical method through which to include a local project
547 is to use the
548 <link linkend='ref-classes-externalsrc'><filename>externalsrc</filename></link>
549 class to include that local project.
550 You use either the <filename>local.conf</filename> or a
551 recipe's append file to override or set the
552 recipe to point to the local directory on your disk to pull
553 in the whole source tree.
554 </para>
555
556 <para>
557 For information on how to use the
558 <filename>externalsrc</filename> class, see the
559 "<link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>"
560 section.
561 </para>
562 </section>
563
564 <section id='scms'>
565 <title>Source Control Managers (Optional)</title>
566
567 <para>
568 Another place the build system can get source files from is
569 through an SCM such as Git or Subversion.
570 In this case, a repository is cloned or checked out.
571 The
572 <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>
573 task inside BitBake uses
574 the <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
575 variable and the argument's prefix to determine the correct
576 fetcher module.
577 </para>
578
579 <note>
580 For information on how to have the OpenEmbedded build system
581 generate tarballs for Git repositories and place them in the
582 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
583 directory, see the
584 <link linkend='var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></link>
585 variable.
586 </note>
587
588 <para>
589 When fetching a repository, BitBake uses the
590 <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
591 variable to determine the specific revision from which to
592 build.
593 </para>
594 </section>
595
596 <section id='source-mirrors'>
597 <title>Source Mirror(s)</title>
598
599 <para>
600 Two kinds of mirrors exist: pre-mirrors and regular mirrors.
601 The <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
602 and
603 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
604 variables point to these, respectively.
605 BitBake checks pre-mirrors before looking upstream for any
606 source files.
607 Pre-mirrors are appropriate when you have a shared directory
608 that is not a directory defined by the
609 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
610 variable.
611 A Pre-mirror typically points to a shared directory that is
612 local to your organization.
613 </para>
614
615 <para>
616 Regular mirrors can be any site across the Internet that is
617 used as an alternative location for source code should the
618 primary site not be functioning for some reason or another.
619 </para>
620 </section>
621 </section>
622
623 <section id="package-feeds-dev-environment">
624 <title>Package Feeds</title>
625
626 <para>
627 When the OpenEmbedded build system generates an image or an SDK,
628 it gets the packages from a package feed area located in the
629 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
630 The
631 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>
632 shows this package feeds area in the upper-right corner.
633 </para>
634
635 <para>
636 This section looks a little closer into the package feeds area used
637 by the build system.
638 Here is a more detailed look at the area:
639 <imagedata fileref="figures/package-feeds.png" align="center" width="7in" depth="6in" />
640 </para>
641
642 <para>
643 Package feeds are an intermediary step in the build process.
644 BitBake generates packages whose types are defined by the
645 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
646 variable.
647 Before placing the packages into package feeds,
648 the build process validates them with generated output quality
649 assurance checks through the
650 <link linkend='ref-classes-insane'><filename>insane</filename></link>
651 class.
652 </para>
653
654 <para>
655 The package feed area resides in
656 <filename>tmp/deploy</filename> of the Build Directory.
657 Folders are created that correspond to the package type
658 (IPK, DEB, or RPM) created.
659 Further organization is derived through the value of the
660 <link linkend='var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></link>
661 variable for each package.
662 For example, packages can exist for the i586 or qemux86
663 architectures.
664 The package files themselves reside within the appropriate
665 architecture folder.
666 </para>
667
668 <para>
669 BitBake uses the <filename>do_package_write_*</filename> tasks to
670 place generated packages into the package holding area (e.g.
671 <filename>do_package_write_ipk</filename> for IPK packages).
672 See the
673 "<link linkend='ref-tasks-package_write_deb'><filename>do_package_write_deb</filename></link>",
674 "<link linkend='ref-tasks-package_write_ipk'><filename>do_package_write_ipk</filename></link>",
675 "<link linkend='ref-tasks-package_write_rpm'><filename>do_package_write_rpm</filename></link>",
676 and
677 "<link linkend='ref-tasks-package_write_tar'><filename>do_package_write_tar</filename></link>"
678 sections for additional information.
679 </para>
680 </section>
681
682 <section id='bitbake-dev-environment'>
683 <title>BitBake</title>
684
685 <para>
686 The OpenEmbedded build system uses
687 <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
688 to produce images.
689 You can see from the
690 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>,
691 the BitBake area consists of several functional areas.
692 This section takes a closer look at each of those areas.
693 </para>
694
695 <para>
696 Separate documentation exists for the BitBake tool.
697 See the
698 <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>
699 for reference material on BitBake.
700 </para>
701
702 <section id='source-fetching-dev-environment'>
703 <title>Source Fetching</title>
704
705 <para>
706 The first stages of building a recipe are to fetch and unpack
707 the source code:
708 <imagedata fileref="figures/source-fetching.png" align="center" width="6.5in" depth="5in" />
709 </para>
710
711 <para>
712 The
713 <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>
714 and
715 <link linkend='ref-tasks-unpack'><filename>do_unpack</filename></link>
716 tasks fetch the source files and unpack them into the work
717 directory.
718 <note>
719 For every local file (e.g. <filename>file://</filename>)
720 that is part of a recipe's
721 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
722 statement, the OpenEmbedded build system takes a checksum
723 of the file for the recipe and inserts the checksum into
724 the signature for the <filename>do_fetch</filename>.
725 If any local file has been modified, the
726 <filename>do_fetch</filename> task and all tasks that
727 depend on it are re-executed.
728 </note>
729 By default, everything is accomplished in the
730 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
731 which has a defined structure.
732 For additional general information on the Build Directory,
733 see the
734 "<link linkend='structure-core-build'><filename>build/</filename></link>"
735 section.
736 </para>
737
738 <para>
739 Unpacked source files are pointed to by the
740 <link linkend='var-S'><filename>S</filename></link> variable.
741 Each recipe has an area in the Build Directory where the
742 unpacked source code resides.
743 The name of that directory for any given recipe is defined from
744 several different variables.
745 You can see the variables that define these directories
746 by looking at the figure:
747 <itemizedlist>
748 <listitem><para><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link> -
749 The base directory where the OpenEmbedded build system
750 performs all its work during the build.
751 </para></listitem>
752 <listitem><para><link linkend='var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></link> -
753 The architecture of the built package or packages.
754 </para></listitem>
755 <listitem><para><link linkend='var-TARGET_OS'><filename>TARGET_OS</filename></link> -
756 The operating system of the target device.
757 </para></listitem>
758 <listitem><para><link linkend='var-PN'><filename>PN</filename></link> -
759 The name of the built package.
760 </para></listitem>
761 <listitem><para><link linkend='var-PV'><filename>PV</filename></link> -
762 The version of the recipe used to build the package.
763 </para></listitem>
764 <listitem><para><link linkend='var-PR'><filename>PR</filename></link> -
765 The revision of the recipe used to build the package.
766 </para></listitem>
767 <listitem><para><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link> -
768 The location within <filename>TMPDIR</filename> where
769 a specific package is built.
770 </para></listitem>
771 <listitem><para><link linkend='var-S'><filename>S</filename></link> -
772 Contains the unpacked source files for a given recipe.
773 </para></listitem>
774 </itemizedlist>
775 </para>
776 </section>
777
778 <section id='patching-dev-environment'>
779 <title>Patching</title>
780
781 <para>
782 Once source code is fetched and unpacked, BitBake locates
783 patch files and applies them to the source files:
784 <imagedata fileref="figures/patching.png" align="center" width="6in" depth="5in" />
785 </para>
786
787 <para>
788 The
789 <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>
790 task processes recipes by
791 using the
792 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
793 variable to locate applicable patch files, which by default
794 are <filename>*.patch</filename> or
795 <filename>*.diff</filename> files, or any file if
796 "apply=yes" is specified for the file in
797 <filename>SRC_URI</filename>.
798 </para>
799
800 <para>
801 BitBake finds and applies multiple patches for a single recipe
802 in the order in which it finds the patches.
803 Patches are applied to the recipe's source files located in the
804 <link linkend='var-S'><filename>S</filename></link> directory.
805 </para>
806
807 <para>
808 For more information on how the source directories are
809 created, see the
810 "<link linkend='source-fetching-dev-environment'>Source Fetching</link>"
811 section.
812 </para>
813 </section>
814
815 <section id='configuration-and-compilation-dev-environment'>
816 <title>Configuration and Compilation</title>
817
818 <para>
819 After source code is patched, BitBake executes tasks that
820 configure and compile the source code:
821 <imagedata fileref="figures/configuration-compile-autoreconf.png" align="center" width="7in" depth="5in" />
822 </para>
823
824 <para>
825 This step in the build process consists of three tasks:
826 <itemizedlist>
827 <listitem><para><emphasis><filename>do_configure</filename>:</emphasis>
828 This task configures the source by enabling and
829 disabling any build-time and configuration options for
830 the software being built.
831 Configurations can come from the recipe itself as well
832 as from an inherited class.
833 Additionally, the software itself might configure itself
834 depending on the target for which it is being built.
835 </para>
836
837 <para>The configurations handled by the
838 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
839 task are specific
840 to source code configuration for the source code
841 being built by the recipe.</para>
842
843 <para>If you are using the
844 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
845 class,
846 you can add additional configuration options by using
847 the <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
848 variable.
849 For information on how this variable works within
850 that class, see the
851 <filename>meta/classes/autotools.bbclass</filename> file.
852 </para></listitem>
853 <listitem><para><emphasis><filename>do_compile</filename>:</emphasis>
854 Once a configuration task has been satisfied, BitBake
855 compiles the source using the
856 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
857 task.
858 Compilation occurs in the directory pointed to by the
859 <link linkend='var-B'><filename>B</filename></link>
860 variable.
861 Realize that the <filename>B</filename> directory is, by
862 default, the same as the
863 <link linkend='var-S'><filename>S</filename></link>
864 directory.</para></listitem>
865 <listitem><para><emphasis><filename>do_install</filename>:</emphasis>
866 Once compilation is done, BitBake executes the
867 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
868 task.
869 This task copies files from the <filename>B</filename>
870 directory and places them in a holding area pointed to
871 by the
872 <link linkend='var-D'><filename>D</filename></link>
873 variable.</para></listitem>
874 </itemizedlist>
875 </para>
876 </section>
877
878 <section id='package-splitting-dev-environment'>
879 <title>Package Splitting</title>
880
881 <para>
882 After source code is configured and compiled, the
883 OpenEmbedded build system analyzes
884 the results and splits the output into packages:
885 <imagedata fileref="figures/analysis-for-package-splitting.png" align="center" width="7in" depth="7in" />
886 </para>
887
888 <para>
889 The
890 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
891 and
892 <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
893 tasks combine to analyze
894 the files found in the
895 <link linkend='var-D'><filename>D</filename></link> directory
896 and split them into subsets based on available packages and
897 files.
898 The analyzing process involves the following as well as other
899 items: splitting out debugging symbols,
900 looking at shared library dependencies between packages,
901 and looking at package relationships.
902 The <filename>do_packagedata</filename> task creates package
903 metadata based on the analysis such that the
904 OpenEmbedded build system can generate the final packages.
905 Working, staged, and intermediate results of the analysis
906 and package splitting process use these areas:
907 <itemizedlist>
908 <listitem><para><link linkend='var-PKGD'><filename>PKGD</filename></link> -
909 The destination directory for packages before they are
910 split.
911 </para></listitem>
912 <listitem><para><link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link> -
913 A shared, global-state directory that holds data
914 generated during the packaging process.
915 </para></listitem>
916 <listitem><para><link linkend='var-PKGDESTWORK'><filename>PKGDESTWORK</filename></link> -
917 A temporary work area used by the
918 <filename>do_package</filename> task.
919 </para></listitem>
920 <listitem><para><link linkend='var-PKGDEST'><filename>PKGDEST</filename></link> -
921 The parent directory for packages after they have
922 been split.
923 </para></listitem>
924 </itemizedlist>
925 The <link linkend='var-FILES'><filename>FILES</filename></link>
926 variable defines the files that go into each package in
927 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>.
928 If you want details on how this is accomplished, you can
929 look at the
930 <link linkend='ref-classes-package'><filename>package</filename></link>
931 class.
932 </para>
933
934 <para>
935 Depending on the type of packages being created (RPM, DEB, or
936 IPK), the <filename>do_package_write_*</filename> task
937 creates the actual packages and places them in the
938 Package Feed area, which is
939 <filename>${TMPDIR}/deploy</filename>.
940 You can see the
941 "<link linkend='package-feeds-dev-environment'>Package Feeds</link>"
942 section for more detail on that part of the build process.
943 <note>
944 Support for creating feeds directly from the
945 <filename>deploy/*</filename> directories does not exist.
946 Creating such feeds usually requires some kind of feed
947 maintenance mechanism that would upload the new packages
948 into an official package feed (e.g. the
949 Ångström distribution).
950 This functionality is highly distribution-specific
951 and thus is not provided out of the box.
952 </note>
953 </para>
954 </section>
955
956 <section id='image-generation-dev-environment'>
957 <title>Image Generation</title>
958
959 <para>
960 Once packages are split and stored in the Package Feeds area,
961 the OpenEmbedded build system uses BitBake to generate the
962 root filesystem image:
963 <imagedata fileref="figures/image-generation.png" align="center" width="6in" depth="7in" />
964 </para>
965
966 <para>
967 The image generation process consists of several stages and
968 depends on many variables.
969 The
970 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
971 task uses these key variables
972 to help create the list of packages to actually install:
973 <itemizedlist>
974 <listitem><para><link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>:
975 Lists out the base set of packages to install from
976 the Package Feeds area.</para></listitem>
977 <listitem><para><link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>:
978 Specifies packages that should not be installed.
979 </para></listitem>
980 <listitem><para><link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>:
981 Specifies features to include in the image.
982 Most of these features map to additional packages for
983 installation.</para></listitem>
984 <listitem><para><link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>:
985 Specifies the package backend to use and consequently
986 helps determine where to locate packages within the
987 Package Feeds area.</para></listitem>
988 <listitem><para><link linkend='var-IMAGE_LINGUAS'><filename>IMAGE_LINGUAS</filename></link>:
989 Determines the language(s) for which additional
990 language support packages are installed.
991 </para></listitem>
992 </itemizedlist>
993 </para>
994
995 <para>
996 Package installation is under control of the package manager
997 (e.g. smart/rpm, opkg, or apt/dpkg) regardless of whether or
998 not package management is enabled for the target.
999 At the end of the process, if package management is not
1000 enabled for the target, the package manager's data files
1001 are deleted from the root filesystem.
1002 </para>
1003
1004 <para>
1005 During image generation, the build system attempts to run
1006 all post-installation scripts.
1007 Any that fail to run on the build host are run on the
1008 target when the target system is first booted.
1009 If you are using a
1010 <ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>read-only root filesystem</ulink>,
1011 all the post installation scripts must succeed during the
1012 package installation phase since the root filesystem is
1013 read-only.
1014 </para>
1015
1016 <para>
1017 During Optimization, optimizing processes are run across
1018 the image.
1019 These processes include <filename>mklibs</filename> and
1020 <filename>prelink</filename>.
1021 The <filename>mklibs</filename> process optimizes the size
1022 of the libraries.
1023 A <filename>prelink</filename> process optimizes the dynamic
1024 linking of shared libraries to reduce start up time of
1025 executables.
1026 </para>
1027
1028 <para>
1029 Along with writing out the root filesystem image, the
1030 <filename>do_rootfs</filename> task creates a manifest file
1031 (<filename>.manifest</filename>) in the same directory as
1032 the root filesystem image that lists out, line-by-line, the
1033 installed packages.
1034 This manifest file is useful for the
1035 <link linkend='ref-classes-testimage'><filename>testimage</filename></link>
1036 class, for example, to determine whether or not to run
1037 specific tests.
1038 See the
1039 <link linkend='var-IMAGE_MANIFEST'><filename>IMAGE_MANIFEST</filename></link>
1040 variable for additional information.
1041 </para>
1042
1043 <para>
1044 Part of the image generation process includes compressing the
1045 root filesystem image.
1046 Compression is accomplished through several optimization
1047 routines designed to reduce the overall size of the image.
1048 </para>
1049
1050 <para>
1051 After the root filesystem has been constructed, the image
1052 generation process turns everything into an image file or
1053 a set of image files.
1054 The formats used for the root filesystem depend on the
1055 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
1056 variable.
1057 </para>
1058
1059 <note>
1060 The entire image generation process is run under Pseudo.
1061 Running under Pseudo ensures that the files in the root
1062 filesystem have correct ownership.
1063 </note>
1064 </section>
1065
1066 <section id='sdk-generation-dev-environment'>
1067 <title>SDK Generation</title>
1068
1069 <para>
1070 The OpenEmbedded build system uses BitBake to generate the
1071 Software Development Kit (SDK) installer script:
1072 <imagedata fileref="figures/sdk-generation.png" align="center" width="6in" depth="7in" />
1073 </para>
1074
1075 <note>
1076 For more information on the cross-development toolchain
1077 generation, see the
1078 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
1079 section.
1080 For information on advantages gained when building a
1081 cross-development toolchain using the
1082 <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
1083 task, see the
1084 "<ulink url='&YOCTO_DOCS_ADT_URL;#optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</ulink>"
1085 section in the Yocto Project Application Developer's Guide.
1086 </note>
1087
1088 <para>
1089 Like image generation, the SDK script process consists of
1090 several stages and depends on many variables.
1091 The <filename>do_populate_sdk</filename> task uses these
1092 key variables to help create the list of packages to actually
1093 install.
1094 For information on the variables listed in the figure, see the
1095 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
1096 section.
1097 </para>
1098
1099 <para>
1100 The <filename>do_populate_sdk</filename> task handles two
1101 parts: a target part and a host part.
1102 The target part is the part built for the target hardware and
1103 includes libraries and headers.
1104 The host part is the part of the SDK that runs on the
1105 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>.
1106 </para>
1107
1108 <para>
1109 Once both parts are constructed, the
1110 <filename>do_populate_sdk</filename> task performs some cleanup
1111 on both parts.
1112 After the cleanup, the task creates a cross-development
1113 environment setup script and any configuration files that
1114 might be needed.
1115 </para>
1116
1117 <para>
1118 The final output of the task is the Cross-development
1119 toolchain installation script (<filename>.sh</filename> file),
1120 which includes the environment setup script.
1121 </para>
1122 </section>
1123 </section>
1124
1125 <section id='images-dev-environment'>
1126 <title>Images</title>
1127
1128 <para>
1129 The images produced by the OpenEmbedded build system
1130 are compressed forms of the
1131 root filesystem that are ready to boot on a target device.
1132 You can see from the
1133 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>
1134 that BitBake output, in part, consists of images.
1135 This section is going to look more closely at this output:
1136 <imagedata fileref="figures/images.png" align="center" width="5.5in" depth="5.5in" />
1137 </para>
1138
1139 <para>
1140 For a list of example images that the Yocto Project provides,
1141 see the
1142 "<link linkend='ref-images'>Images</link>" chapter.
1143 </para>
1144
1145 <para>
1146 Images are written out to the
1147 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1148 inside the <filename>tmp/deploy/images/<replaceable>machine</replaceable>/</filename>
1149 folder as shown in the figure.
1150 This folder contains any files expected to be loaded on the
1151 target device.
1152 The
1153 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>
1154 variable points to the <filename>deploy</filename> directory,
1155 while the
1156 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
1157 variable points to the appropriate directory containing images for
1158 the current configuration.
1159 <itemizedlist>
1160 <listitem><para><filename><replaceable>kernel-image</replaceable></filename>:
1161 A kernel binary file.
1162 The <link linkend='var-KERNEL_IMAGETYPE'><filename>KERNEL_IMAGETYPE</filename></link>
1163 variable setting determines the naming scheme for the
1164 kernel image file.
1165 Depending on that variable, the file could begin with
1166 a variety of naming strings.
1167 The <filename>deploy/images/<replaceable>machine</replaceable></filename>
1168 directory can contain multiple image files for the
1169 machine.</para></listitem>
1170 <listitem><para><filename><replaceable>root-filesystem-image</replaceable></filename>:
1171 Root filesystems for the target device (e.g.
1172 <filename>*.ext3</filename> or <filename>*.bz2</filename>
1173 files).
1174 The <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
1175 variable setting determines the root filesystem image
1176 type.
1177 The <filename>deploy/images/<replaceable>machine</replaceable></filename>
1178 directory can contain multiple root filesystems for the
1179 machine.</para></listitem>
1180 <listitem><para><filename><replaceable>kernel-modules</replaceable></filename>:
1181 Tarballs that contain all the modules built for the kernel.
1182 Kernel module tarballs exist for legacy purposes and
1183 can be suppressed by setting the
1184 <link linkend='var-MODULE_TARBALL_DEPLOY'><filename>MODULE_TARBALL_DEPLOY</filename></link>
1185 variable to "0".
1186 The <filename>deploy/images/<replaceable>machine</replaceable></filename>
1187 directory can contain multiple kernel module tarballs
1188 for the machine.</para></listitem>
1189 <listitem><para><filename><replaceable>bootloaders</replaceable></filename>:
1190 Bootloaders supporting the image, if applicable to the
1191 target machine.
1192 The <filename>deploy/images/<replaceable>machine</replaceable></filename>
1193 directory can contain multiple bootloaders for the
1194 machine.</para></listitem>
1195 <listitem><para><filename><replaceable>symlinks</replaceable></filename>:
1196 The <filename>deploy/images/<replaceable>machine</replaceable></filename>
1197 folder contains
1198 a symbolic link that points to the most recently built file
1199 for each machine.
1200 These links might be useful for external scripts that
1201 need to obtain the latest version of each file.
1202 </para></listitem>
1203 </itemizedlist>
1204 </para>
1205 </section>
1206
1207 <section id='sdk-dev-environment'>
1208 <title>Application Development SDK</title>
1209
1210 <para>
1211 In the
1212 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>,
1213 the output labeled "Application Development SDK" represents an
1214 SDK.
1215 This section is going to take a closer look at this output:
1216 <imagedata fileref="figures/sdk.png" align="center" width="5in" depth="4in" />
1217 </para>
1218
1219 <para>
1220 The specific form of this output is a self-extracting
1221 SDK installer (<filename>*.sh</filename>) that, when run,
1222 installs the SDK, which consists of a cross-development
1223 toolchain, a set of libraries and headers, and an SDK
1224 environment setup script.
1225 Running this installer essentially sets up your
1226 cross-development environment.
1227 You can think of the cross-toolchain as the "host"
1228 part because it runs on the SDK machine.
1229 You can think of the libraries and headers as the "target"
1230 part because they are built for the target hardware.
1231 The setup script is added so that you can initialize the
1232 environment before using the tools.
1233 </para>
1234
1235 <note>
1236 <para>
1237 The Yocto Project supports several methods by which you can
1238 set up this cross-development environment.
1239 These methods include downloading pre-built SDK installers,
1240 building and installing your own SDK installer, or running
1241 an Application Development Toolkit (ADT) installer to
1242 install not just cross-development toolchains
1243 but also additional tools to help in this type of
1244 development.
1245 </para>
1246
1247 <para>
1248 For background information on cross-development toolchains
1249 in the Yocto Project development environment, see the
1250 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
1251 section.
1252 For information on setting up a cross-development
1253 environment, see the
1254 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
1255 section in the Yocto Project Application Developer's Guide.
1256 </para>
1257 </note>
1258
1259 <para>
1260 Once built, the SDK installers are written out to the
1261 <filename>deploy/sdk</filename> folder inside the
1262 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1263 as shown in the figure at the beginning of this section.
1264 Several variables exist that help configure these files:
1265 <itemizedlist>
1266 <listitem><para><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>:
1267 Points to the <filename>deploy</filename>
1268 directory.</para></listitem>
1269 <listitem><para><link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>:
1270 Specifies the architecture of the machine
1271 on which the cross-development tools are run to
1272 create packages for the target hardware.
1273 </para></listitem>
1274 <listitem><para><link linkend='var-SDKIMAGE_FEATURES'><filename>SDKIMAGE_FEATURES</filename></link>:
1275 Lists the features to include in the "target" part
1276 of the SDK.
1277 </para></listitem>
1278 <listitem><para><link linkend='var-TOOLCHAIN_HOST_TASK'><filename>TOOLCHAIN_HOST_TASK</filename></link>:
1279 Lists packages that make up the host
1280 part of the SDK (i.e. the part that runs on
1281 the <filename>SDKMACHINE</filename>).
1282 When you use
1283 <filename>bitbake -c populate_sdk <replaceable>imagename</replaceable></filename>
1284 to create the SDK, a set of default packages
1285 apply.
1286 This variable allows you to add more packages.
1287 </para></listitem>
1288 <listitem><para><link linkend='var-TOOLCHAIN_TARGET_TASK'><filename>TOOLCHAIN_TARGET_TASK</filename></link>:
1289 Lists packages that make up the target part
1290 of the SDK (i.e. the part built for the
1291 target hardware).
1292 </para></listitem>
1293 <listitem><para><link linkend='var-SDKPATH'><filename>SDKPATH</filename></link>:
1294 Defines the default SDK installation path offered by the
1295 installation script.
1296 </para></listitem>
1297 </itemizedlist>
1298 </para>
1299 </section>
1300
1301</chapter>
1302<!--
1303vim: expandtab tw=80 ts=4
1304-->
diff --git a/documentation/ref-manual/examples/hello-autotools/hello_2.3.bb b/documentation/ref-manual/examples/hello-autotools/hello_2.3.bb
new file mode 100644
index 0000000000..5dfb0b30cf
--- /dev/null
+++ b/documentation/ref-manual/examples/hello-autotools/hello_2.3.bb
@@ -0,0 +1,8 @@
1DESCRIPTION = "GNU Helloworld application"
2SECTION = "examples"
3LICENSE = "GPLv3"
4LIC_FILES_CHKSUM = "file://COPYING;md5=adefda309052235aa5d1e99ce7557010"
5
6SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.bz2"
7
8inherit autotools
diff --git a/documentation/ref-manual/examples/hello-single/files/helloworld.c b/documentation/ref-manual/examples/hello-single/files/helloworld.c
new file mode 100644
index 0000000000..fc7169b7b8
--- /dev/null
+++ b/documentation/ref-manual/examples/hello-single/files/helloworld.c
@@ -0,0 +1,8 @@
1#include <stdio.h>
2
3int main(void)
4{
5 printf("Hello world!\n");
6
7 return 0;
8}
diff --git a/documentation/ref-manual/examples/hello-single/hello.bb b/documentation/ref-manual/examples/hello-single/hello.bb
new file mode 100644
index 0000000000..0812743e39
--- /dev/null
+++ b/documentation/ref-manual/examples/hello-single/hello.bb
@@ -0,0 +1,17 @@
1DESCRIPTION = "Simple helloworld application"
2SECTION = "examples"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
5
6SRC_URI = "file://helloworld.c"
7
8S = "${WORKDIR}"
9
10do_compile() {
11 ${CC} helloworld.c -o helloworld
12}
13
14do_install() {
15 install -d ${D}${bindir}
16 install -m 0755 helloworld ${D}${bindir}
17}
diff --git a/documentation/ref-manual/examples/libxpm/libxpm_3.5.6.bb b/documentation/ref-manual/examples/libxpm/libxpm_3.5.6.bb
new file mode 100644
index 0000000000..b58d4d7bd1
--- /dev/null
+++ b/documentation/ref-manual/examples/libxpm/libxpm_3.5.6.bb
@@ -0,0 +1,14 @@
1require xorg-lib-common.inc
2
3DESCRIPTION = "X11 Pixmap library"
4LICENSE = "X-BSD"
5LIC_FILES_CHKSUM = "file://COPYING;md5=3e07763d16963c3af12db271a31abaa5"
6DEPENDS += "libxext"
7PR = "r2"
8PE = "1"
9
10XORG_PN = "libXpm"
11
12PACKAGES =+ "sxpm cxpm"
13FILES_cxpm = "${bindir}/cxpm"
14FILES_sxpm = "${bindir}/sxpm"
diff --git a/documentation/ref-manual/examples/mtd-makefile/mtd-utils_1.0.0.bb b/documentation/ref-manual/examples/mtd-makefile/mtd-utils_1.0.0.bb
new file mode 100644
index 0000000000..5d05a437a4
--- /dev/null
+++ b/documentation/ref-manual/examples/mtd-makefile/mtd-utils_1.0.0.bb
@@ -0,0 +1,15 @@
1DESCRIPTION = "Tools for managing memory technology devices."
2SECTION = "base"
3DEPENDS = "zlib"
4HOMEPAGE = "http://www.linux-mtd.infradead.org/"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
7 file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
8
9SRC_URI = "ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-${PV}.tar.gz"
10
11CFLAGS_prepend = "-I ${S}/include "
12
13do_install() {
14 oe_runmake install DESTDIR=${D}
15}
diff --git a/documentation/ref-manual/faq.xml b/documentation/ref-manual/faq.xml
new file mode 100644
index 0000000000..da6ce20eef
--- /dev/null
+++ b/documentation/ref-manual/faq.xml
@@ -0,0 +1,799 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='faq'>
6<title>FAQ</title>
7<qandaset>
8 <qandaentry>
9 <question>
10 <para>
11 How does Poky differ from <ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>?
12 </para>
13 </question>
14 <answer>
15 <para>
16 The term "<ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink>"
17 refers to the specific reference build system that
18 the Yocto Project provides.
19 Poky is based on <ulink url='&YOCTO_DOCS_DEV_URL;#oe-core'>OE-Core</ulink>
20 and <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
21 Thus, the generic term used here for the build system is
22 the "OpenEmbedded build system."
23 Development in the Yocto Project using Poky is closely tied to OpenEmbedded, with
24 changes always being merged to OE-Core or BitBake first before being pulled back
25 into Poky.
26 This practice benefits both projects immediately.
27 </para>
28 </answer>
29 </qandaentry>
30
31 <qandaentry>
32 <question>
33 <para id='faq-not-meeting-requirements'>
34 My development system does not meet the
35 required Git, tar, and Python versions.
36 In particular, I do not have Python 2.7.3 or greater, or
37 I do have Python 3.x, which is specifically not supported by
38 the Yocto Project.
39 Can I still use the Yocto Project?
40 </para>
41 </question>
42 <answer>
43 <para>
44 You can get the required tools on your host development
45 system a couple different ways (i.e. building a tarball or
46 downloading a tarball).
47 See the
48 "<link linkend='required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</link>"
49 section for steps on how to update your build tools.
50 </para>
51 </answer>
52 </qandaentry>
53
54 <qandaentry>
55 <question>
56 <para>
57 How can you claim Poky / OpenEmbedded-Core is stable?
58 </para>
59 </question>
60 <answer>
61 <para>
62 There are three areas that help with stability;
63 <itemizedlist>
64 <listitem><para>The Yocto Project team keeps
65 <ulink url='&YOCTO_DOCS_DEV_URL;#oe-core'>OE-Core</ulink> small
66 and focused, containing around 830 recipes as opposed to the thousands
67 available in other OpenEmbedded community layers.
68 Keeping it small makes it easy to test and maintain.</para></listitem>
69 <listitem><para>The Yocto Project team runs manual and automated tests
70 using a small, fixed set of reference hardware as well as emulated
71 targets.</para></listitem>
72 <listitem><para>The Yocto Project uses an autobuilder,
73 which provides continuous build and integration tests.</para></listitem>
74 </itemizedlist>
75 </para>
76 </answer>
77 </qandaentry>
78
79 <qandaentry>
80 <question>
81 <para>
82 How do I get support for my board added to the Yocto Project?
83 </para>
84 </question>
85 <answer>
86 <para>
87 Support for an additional board is added by creating a
88 Board Support Package (BSP) layer for it.
89 For more information on how to create a BSP layer, see the
90 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
91 section in the Yocto Project Development Manual and the
92 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
93 </para>
94 <para>
95 Usually, if the board is not completely exotic, adding support in
96 the Yocto Project is fairly straightforward.
97 </para>
98 </answer>
99 </qandaentry>
100
101 <qandaentry>
102 <question>
103 <para>
104 Are there any products built using the OpenEmbedded build system?
105 </para>
106 </question>
107 <answer>
108 <para>
109 The software running on the <ulink url='http://vernier.com/labquest/'>Vernier LabQuest</ulink>
110 is built using the OpenEmbedded build system.
111 See the <ulink url='http://www.vernier.com/products/interfaces/labq/'>Vernier LabQuest</ulink>
112 website for more information.
113 There are a number of pre-production devices using the OpenEmbedded build system
114 and the Yocto Project team
115 announces them as soon as they are released.
116 </para>
117 </answer>
118 </qandaentry>
119
120 <qandaentry>
121 <question>
122 <para>
123 What does the OpenEmbedded build system produce as output?
124 </para>
125 </question>
126 <answer>
127 <para>
128 Because you can use the same set of recipes to create output of
129 various formats, the output of an OpenEmbedded build depends on
130 how you start it.
131 Usually, the output is a flashable image ready for the target
132 device.
133 </para>
134 </answer>
135 </qandaentry>
136
137 <qandaentry>
138 <question>
139 <para>
140 How do I add my package to the Yocto Project?
141 </para>
142 </question>
143 <answer>
144 <para>
145 To add a package, you need to create a BitBake recipe.
146 For information on how to create a BitBake recipe, see the
147 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-writing-a-new-recipe'>Writing a New Recipe</ulink>"
148 in the Yocto Project Development Manual.
149 </para>
150 </answer>
151 </qandaentry>
152
153 <qandaentry>
154 <question>
155 <para>
156 Do I have to reflash my entire board with a new Yocto Project image when recompiling
157 a package?
158 </para>
159 </question>
160 <answer>
161 <para>
162 The OpenEmbedded build system can build packages in various
163 formats such as IPK for OPKG, Debian package
164 (<filename>.deb</filename>), or RPM.
165 You can then upgrade the packages using the package tools on
166 the device, much like on a desktop distribution such as
167 Ubuntu or Fedora.
168 However, package management on the target is entirely optional.
169 </para>
170 </answer>
171 </qandaentry>
172
173 <qandaentry>
174 <question>
175 <para>
176 What is GNOME Mobile and what is the difference between GNOME Mobile and GNOME?
177 </para>
178 </question>
179 <answer>
180 <para>
181 GNOME Mobile is a subset of the <ulink url='http://www.gnome.org'>GNOME</ulink>
182 platform targeted at mobile and embedded devices.
183 The main difference between GNOME Mobile and standard GNOME is that
184 desktop-orientated libraries have been removed, along with deprecated libraries,
185 creating a much smaller footprint.
186 </para>
187 </answer>
188 </qandaentry>
189
190 <qandaentry>
191 <question>
192 <para>
193 I see the error '<filename>chmod: XXXXX new permissions are r-xrwxrwx, not r-xr-xr-x</filename>'.
194 What is wrong?
195 </para>
196 </question>
197 <answer>
198 <para>
199 You are probably running the build on an NTFS filesystem.
200 Use <filename>ext2</filename>, <filename>ext3</filename>, or <filename>ext4</filename> instead.
201 </para>
202 </answer>
203 </qandaentry>
204
205<!-- <qandaentry>
206 <question>
207 <para>
208 How do I make the Yocto Project work in RHEL/CentOS?
209 </para>
210 </question>
211 <answer>
212 <para>
213 To get the Yocto Project working under RHEL/CentOS 5.1 you need to first
214 install some required packages.
215 The standard CentOS packages needed are:
216 <itemizedlist>
217 <listitem><para>"Development tools" (selected during installation)</para></listitem>
218 <listitem><para><filename>texi2html</filename></para></listitem>
219 <listitem><para><filename>compat-gcc-34</filename></para></listitem>
220 </itemizedlist>
221 On top of these, you need the following external packages:
222 <itemizedlist>
223 <listitem><para><filename>python-sqlite2</filename> from
224 <ulink url='http://dag.wieers.com/rpm/packages/python-sqlite2/'>DAG repository</ulink>
225 </para></listitem>
226 <listitem><para><filename>help2man</filename> from
227 <ulink url='http://centos.karan.org/el4/extras/stable/x86_64/RPMS/repodata/repoview/help2man-0-1.33.1-2.html'>Karan repository</ulink></para></listitem>
228 </itemizedlist>
229 </para>
230
231 <para>
232 Once these packages are installed, the OpenEmbedded build system will be able
233 to build standard images.
234 However, there might be a problem with the QEMU emulator segfaulting.
235 You can either disable the generation of binary locales by setting
236 <filename><link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>ENABLE_BINARY_LOCALE_GENERATION</link>
237 </filename> to "0" or by removing the <filename>linux-2.6-execshield.patch</filename>
238 from the kernel and rebuilding it since that is the patch that causes the problems with QEMU.
239 </para>
240
241 <note>
242 <para>For information on distributions that the Yocto Project
243 uses during validation, see the
244 <ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution Support</ulink>
245 Wiki page.</para>
246 <para>For notes about using the Yocto Project on a RHEL 4-based
247 host, see the
248 <ulink url='&YOCTO_WIKI_URL;/wiki/BuildingOnRHEL4'>Building on RHEL4</ulink>
249 Wiki page.</para>
250 </note>
251 </answer>
252 </qandaentry> -->
253
254 <qandaentry>
255 <question>
256 <para>
257 I see lots of 404 responses for files on
258 <filename>&YOCTO_HOME_URL;/sources/*</filename>. Is something wrong?
259 </para>
260 </question>
261 <answer>
262 <para>
263 Nothing is wrong.
264 The OpenEmbedded build system checks any configured source mirrors before downloading
265 from the upstream sources.
266 The build system does this searching for both source archives and
267 pre-checked out versions of SCM-managed software.
268 These checks help in large installations because it can reduce load on the SCM servers
269 themselves.
270 The address above is one of the default mirrors configured into the
271 build system.
272 Consequently, if an upstream source disappears, the team
273 can place sources there so builds continue to work.
274 </para>
275 </answer>
276 </qandaentry>
277
278 <qandaentry>
279 <question>
280 <para>
281 I have machine-specific data in a package for one machine only but the package is
282 being marked as machine-specific in all cases, how do I prevent this?
283 </para>
284 </question>
285 <answer>
286 <para>
287 Set <filename><link linkend='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'>SRC_URI_OVERRIDES_PACKAGE_ARCH</link>
288 </filename> = "0" in the <filename>.bb</filename> file but make sure the package is
289 manually marked as
290 machine-specific for the case that needs it.
291 The code that handles
292 <filename>SRC_URI_OVERRIDES_PACKAGE_ARCH</filename> is in
293 the <filename>meta/classes/base.bbclass</filename> file.
294 </para>
295 </answer>
296 </qandaentry>
297
298 <qandaentry>
299 <question>
300 <para>
301 I'm behind a firewall and need to use a proxy server. How do I do that?
302 </para>
303 </question>
304 <answer>
305 <para>
306 Most source fetching by the OpenEmbedded build system is done by <filename>wget</filename>
307 and you therefore need to specify the proxy settings in a
308 <filename>.wgetrc</filename> file in your home directory.
309 Here are some example settings:
310 <literallayout class='monospaced'>
311 http_proxy = http://proxy.yoyodyne.com:18023/
312 ftp_proxy = http://proxy.yoyodyne.com:18023/
313 </literallayout>
314 The Yocto Project also includes a
315 <filename>site.conf.sample</filename> file that shows how to
316 configure CVS and Git proxy servers if needed.
317 </para>
318 </answer>
319 </qandaentry>
320
321 <qandaentry>
322 <question>
323 <para>
324 What’s the difference between <replaceable>target</replaceable> and <replaceable>target</replaceable><filename>-native</filename>?
325 </para>
326 </question>
327 <answer>
328 <para>
329 The <filename>*-native</filename> targets are designed to run on the system
330 being used for the build.
331 These are usually tools that are needed to assist the build in some way such as
332 <filename>quilt-native</filename>, which is used to apply patches.
333 The non-native version is the one that runs on the target device.
334 </para>
335 </answer>
336 </qandaentry>
337
338 <qandaentry>
339 <question>
340 <para>
341 I'm seeing random build failures. Help?!
342 </para>
343 </question>
344 <answer>
345 <para>
346 If the same build is failing in totally different and random
347 ways, the most likely explanation is:
348 <itemizedlist>
349 <listitem><para>The hardware you are running the build on
350 has some problem.</para></listitem>
351 <listitem><para>You are running the build under
352 virtualization, in which case the virtualization
353 probably has bugs.</para></listitem>
354 </itemizedlist>
355 The OpenEmbedded build system processes a massive amount of
356 data that causes lots of network, disk and CPU activity and
357 is sensitive to even single-bit failures in any of these areas.
358 True random failures have always been traced back to hardware
359 or virtualization issues.
360 </para>
361 </answer>
362 </qandaentry>
363
364 <qandaentry>
365 <question>
366 <para>
367 What do we need to ship for license compliance?
368 </para>
369 </question>
370 <answer>
371 <para>
372 This is a difficult question and you need to consult your lawyer
373 for the answer for your specific case.
374 It is worth bearing in mind that for GPL compliance, there needs
375 to be enough information shipped to allow someone else to
376 rebuild and produce the same end result you are shipping.
377 This means sharing the source code, any patches applied to it,
378 and also any configuration information about how that package
379 was configured and built.
380 </para>
381
382 <para>
383 You can find more information on licensing in the
384 "<ulink url='&YOCTO_DOCS_DEV_URL;#licensing'>Licensing</ulink>"
385 and "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
386 sections, both of which are in the Yocto Project Development
387 Manual.
388 </para>
389 </answer>
390 </qandaentry>
391
392 <qandaentry>
393 <question>
394 <para>
395 How do I disable the cursor on my touchscreen device?
396 </para>
397 </question>
398 <answer>
399 <para>
400 You need to create a form factor file as described in the
401 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-misc-recipes'>Miscellaneous BSP-Specific Recipe Files</ulink>"
402 section in the Yocto Project Board Support Packages (BSP)
403 Developer's Guide.
404 Set the <filename>HAVE_TOUCHSCREEN</filename> variable equal to
405 one as follows:
406 <literallayout class='monospaced'>
407 HAVE_TOUCHSCREEN=1
408 </literallayout>
409 </para>
410 </answer>
411 </qandaentry>
412
413 <qandaentry>
414 <question>
415 <para>
416 How do I make sure connected network interfaces are brought up by default?
417 </para>
418 </question>
419 <answer>
420 <para>
421 The default interfaces file provided by the netbase recipe does not
422 automatically bring up network interfaces.
423 Therefore, you will need to add a BSP-specific netbase that includes an interfaces
424 file.
425 See the "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-misc-recipes'>Miscellaneous BSP-Specific Recipe Files</ulink>"
426 section in the Yocto Project Board Support Packages (BSP)
427 Developer's Guide for information on creating these types of
428 miscellaneous recipe files.
429 </para>
430 <para>
431 For example, add the following files to your layer:
432 <literallayout class='monospaced'>
433 meta-MACHINE/recipes-bsp/netbase/netbase/MACHINE/interfaces
434 meta-MACHINE/recipes-bsp/netbase/netbase_5.0.bbappend
435 </literallayout>
436 </para>
437 </answer>
438 </qandaentry>
439
440 <qandaentry>
441 <question>
442 <para>
443 How do I create images with more free space?
444 </para>
445 </question>
446 <answer>
447 <para>
448 By default, the OpenEmbedded build system creates images
449 that are 1.3 times the size of the populated root filesystem.
450 To affect the image size, you need to set various
451 configurations:
452 <itemizedlist>
453 <listitem><para><emphasis>Image Size:</emphasis>
454 The OpenEmbedded build system uses the
455 <link linkend='var-IMAGE_ROOTFS_SIZE'><filename>IMAGE_ROOTFS_SIZE</filename></link>
456 variable to define the size of the image in Kbytes.
457 The build system determines the size by taking into
458 account the initial root filesystem size before any
459 modifications such as requested size for the image and
460 any requested additional free disk space to be
461 added to the image.</para></listitem>
462 <listitem><para><emphasis>Overhead:</emphasis>
463 Use the
464 <link linkend='var-IMAGE_OVERHEAD_FACTOR'><filename>IMAGE_OVERHEAD_FACTOR</filename></link>
465 variable to define the multiplier that the build system
466 applies to the initial image size, which is 1.3 by
467 default.</para></listitem>
468 <listitem><para><emphasis>Additional Free Space:</emphasis>
469 Use the
470 <link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'><filename>IMAGE_ROOTFS_EXTRA_SPACE</filename></link>
471 variable to add additional free space to the image.
472 The build system adds this space to the image after
473 it determines its
474 <filename>IMAGE_ROOTFS_SIZE</filename>.
475 </para></listitem>
476 </itemizedlist>
477 </para>
478 </answer>
479 </qandaentry>
480
481 <qandaentry>
482 <question>
483 <para>
484 Why don't you support directories with spaces in the pathnames?
485 </para>
486 </question>
487 <answer>
488 <para>
489 The Yocto Project team has tried to do this before but too
490 many of the tools the OpenEmbedded build system depends on,
491 such as <filename>autoconf</filename>, break when they find
492 spaces in pathnames.
493 Until that situation changes, the team will not support spaces
494 in pathnames.
495 </para>
496 </answer>
497 </qandaentry>
498
499 <qandaentry>
500 <question>
501 <para>
502 How do I use an external toolchain?
503 </para>
504 </question>
505 <answer>
506 <para>
507 The toolchain configuration is very flexible and customizable.
508 It is primarily controlled with the
509 <filename><link linkend='var-TCMODE'>TCMODE</link></filename>
510 variable.
511 This variable controls which <filename>tcmode-*.inc</filename>
512 file to include from the
513 <filename>meta/conf/distro/include</filename> directory within
514 the
515 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
516 </para>
517
518 <para>
519 The default value of <filename>TCMODE</filename> is "default",
520 which tells the OpenEmbedded build system to use its internally
521 built toolchain (i.e. <filename>tcmode-default.inc</filename>).
522 However, other patterns are accepted.
523 In particular, "external-*" refers to external toolchains.
524 One example is the Sourcery G++ Toolchain.
525 The support for this toolchain resides in the separate
526 <filename>meta-sourcery</filename> layer at
527 <ulink url='http://github.com/MentorEmbedded/meta-sourcery/'></ulink>.
528 </para>
529
530 <para>
531 In addition to the toolchain configuration, you also need a
532 corresponding toolchain recipe file.
533 This recipe file needs to package up any pre-built objects in
534 the toolchain such as <filename>libgcc</filename>,
535 <filename>libstdcc++</filename>, any locales, and
536 <filename>libc</filename>.
537 </para>
538 </answer>
539 </qandaentry>
540
541 <qandaentry>
542 <question>
543 <para id='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>
544 How does the OpenEmbedded build system obtain source code and
545 will it work behind my firewall or proxy server?
546 </para>
547 </question>
548 <answer>
549 <para>
550 The way the build system obtains source code is highly
551 configurable.
552 You can setup the build system to get source code in most
553 environments if HTTP transport is available.
554 </para>
555 <para>
556 When the build system searches for source code, it first
557 tries the local download directory.
558 If that location fails, Poky tries
559 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>,
560 the upstream source, and then
561 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
562 in that order.
563 </para>
564 <para>
565 Assuming your distribution is "poky", the OpenEmbedded build
566 system uses the Yocto Project source
567 <filename>PREMIRRORS</filename> by default for SCM-based
568 sources, upstreams for normal tarballs, and then falls back
569 to a number of other mirrors including the Yocto Project
570 source mirror if those fail.
571 </para>
572 <para>
573 As an example, you could add a specific server for the
574 build system to attempt before any others by adding something
575 like the following to the <filename>local.conf</filename>
576 configuration file:
577 <literallayout class='monospaced'>
578 PREMIRRORS_prepend = "\
579 git://.*/.* http://www.yoctoproject.org/sources/ \n \
580 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
581 http://.*/.* http://www.yoctoproject.org/sources/ \n \
582 https://.*/.* http://www.yoctoproject.org/sources/ \n"
583 </literallayout>
584 </para>
585 <para>
586 These changes cause the build system to intercept Git, FTP,
587 HTTP, and HTTPS requests and direct them to the
588 <filename>http://</filename> sources mirror.
589 You can use <filename>file://</filename> URLs to point to
590 local directories or network shares as well.
591 </para>
592 <para>
593 Aside from the previous technique, these options also exist:
594 <literallayout class='monospaced'>
595 BB_NO_NETWORK = "1"
596 </literallayout>
597 This statement tells BitBake to issue an error instead of
598 trying to access the Internet.
599 This technique is useful if you want to ensure code builds
600 only from local sources.
601 </para>
602 <para>
603 Here is another technique:
604 <literallayout class='monospaced'>
605 BB_FETCH_PREMIRRORONLY = "1"
606 </literallayout>
607 This statement limits the build system to pulling source
608 from the <filename>PREMIRRORS</filename> only.
609 Again, this technique is useful for reproducing builds.
610 </para>
611 <para>
612 Here is another technique:
613 <literallayout class='monospaced'>
614 BB_GENERATE_MIRROR_TARBALLS = "1"
615 </literallayout>
616 This statement tells the build system to generate mirror
617 tarballs.
618 This technique is useful if you want to create a mirror server.
619 If not, however, the technique can simply waste time during
620 the build.
621 </para>
622 <para>
623 Finally, consider an example where you are behind an
624 HTTP-only firewall.
625 You could make the following changes to the
626 <filename>local.conf</filename> configuration file as long as
627 the <filename>PREMIRRORS</filename> server is current:
628 <literallayout class='monospaced'>
629 PREMIRRORS_prepend = "\
630 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
631 http://.*/.* http://www.yoctoproject.org/sources/ \n \
632 https://.*/.* http://www.yoctoproject.org/sources/ \n"
633 BB_FETCH_PREMIRRORONLY = "1"
634 </literallayout>
635 These changes would cause the build system to successfully
636 fetch source over HTTP and any network accesses to anything
637 other than the <filename>PREMIRRORS</filename> would fail.
638 </para>
639 <para>
640 The build system also honors the standard shell environment
641 variables <filename>http_proxy</filename>,
642 <filename>ftp_proxy</filename>,
643 <filename>https_proxy</filename>, and
644 <filename>all_proxy</filename> to redirect requests through
645 proxy servers.
646 </para>
647 <note>
648 You can find more information on the
649 "<ulink url='&YOCTO_WIKI_URL;/wiki/Working_Behind_a_Network_Proxy'>Working Behind a Network Proxy</ulink>"
650 Wiki page.
651 </note>
652 </answer>
653 </qandaentry>
654
655 <qandaentry>
656 <question>
657 <para>
658 Can I get rid of build output so I can start over?
659 </para>
660 </question>
661 <answer>
662 <para>
663 Yes - you can easily do this.
664 When you use BitBake to build an image, all the build output
665 goes into the directory created when you run the
666 build environment setup script (i.e.
667 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
668 or
669 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
670 By default, this <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
671 is named <filename>build</filename> but can be named
672 anything you want.
673 </para>
674
675 <para>
676 Within the Build Directory, is the <filename>tmp</filename>
677 directory.
678 To remove all the build output yet preserve any source code or
679 downloaded files from previous builds, simply remove the
680 <filename>tmp</filename> directory.
681 </para>
682 </answer>
683 </qandaentry>
684
685 <qandaentry>
686 <question>
687 <para>
688 Why do <filename>${bindir}</filename> and <filename>${libdir}</filename> have strange values for <filename>-native</filename> recipes?
689 </para>
690 </question>
691 <answer>
692 <para>
693 Executables and libraries might need to be used from a
694 directory other than the directory into which they were
695 initially installed.
696 Complicating this situation is the fact that sometimes these
697 executables and libraries are compiled with the expectation
698 of being run from that initial installation target directory.
699 If this is the case, moving them causes problems.
700 </para>
701
702 <para>
703 This scenario is a fundamental problem for package maintainers
704 of mainstream Linux distributions as well as for the
705 OpenEmbedded build system.
706 As such, a well-established solution exists.
707 Makefiles, Autotools configuration scripts, and other build
708 systems are expected to respect environment variables such as
709 <filename>bindir</filename>, <filename>libdir</filename>,
710 and <filename>sysconfdir</filename> that indicate where
711 executables, libraries, and data reside when a program is
712 actually run.
713 They are also expected to respect a
714 <filename>DESTDIR</filename> environment variable, which is
715 prepended to all the other variables when the build system
716 actually installs the files.
717 It is understood that the program does not actually run from
718 within <filename>DESTDIR</filename>.
719 </para>
720
721 <para>
722 When the OpenEmbedded build system uses a recipe to build a
723 target-architecture program (i.e. one that is intended for
724 inclusion on the image being built), that program eventually
725 runs from the root file system of that image.
726 Thus, the build system provides a value of "/usr/bin" for
727 <filename>bindir</filename>, a value of "/usr/lib" for
728 <filename>libdir</filename>, and so forth.
729 </para>
730
731 <para>
732 Meanwhile, <filename>DESTDIR</filename> is a path within the
733 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
734 However, when the recipe builds a native program (i.e. one
735 that is intended to run on the build machine), that program
736 is never installed directly to the build machine's root
737 file system.
738 Consequently, the build system uses paths within the Build
739 Directory for <filename>DESTDIR</filename>,
740 <filename>bindir</filename> and related variables.
741 To better understand this, consider the following two paths
742 where the first is relatively normal and the second is not:
743 <note>
744 Due to these lengthy examples, the paths are artificially
745 broken across lines for readability.
746 </note>
747 <literallayout class='monospaced'>
748 /home/maxtothemax/poky-bootchart2/build/tmp/work/i586-poky-linux/zlib/
749 1.2.8-r0/sysroot-destdir/usr/bin
750
751 /home/maxtothemax/poky-bootchart2/build/tmp/work/x86_64-linux/
752 zlib-native/1.2.8-r0/sysroot-destdir/home/maxtothemax/poky-bootchart2/
753 build/tmp/sysroots/x86_64-linux/usr/bin
754 </literallayout>
755 Even if the paths look unusual, they both are correct -
756 the first for a target and the second for a native recipe.
757 These paths are a consequence of the
758 <filename>DESTDIR</filename> mechanism and while they
759 appear strange, they are correct and in practice very effective.
760 </para>
761 </answer>
762 </qandaentry>
763
764 <qandaentry>
765 <question>
766 <para>
767 The files provided by my <filename>-native</filename> recipe do
768 not appear to be available to other recipes.
769 Files are missing from the native sysroot, my recipe is
770 installing to the wrong place, or I am getting permissions
771 errors during the do_install task in my recipe! What is wrong?
772 </para>
773 </question>
774 <answer>
775 <para>
776 This situation results when a build system does
777 not recognize the environment variables supplied to it by
778 <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
779 The incident that prompted this FAQ entry involved a Makefile
780 that used an environment variable named
781 <filename>BINDIR</filename> instead of the more standard
782 variable <filename>bindir</filename>.
783 The makefile's hardcoded default value of "/usr/bin" worked
784 most of the time, but not for the recipe's
785 <filename>-native</filename> variant.
786 For another example, permissions errors might be caused
787 by a Makefile that ignores <filename>DESTDIR</filename> or uses
788 a different name for that environment variable.
789 Check the the build system to see if these kinds of
790 issues exist.
791 </para>
792 </answer>
793 </qandaentry>
794
795</qandaset>
796</chapter>
797<!--
798vim: expandtab tw=80 ts=4
799-->
diff --git a/documentation/ref-manual/figures/analysis-for-package-splitting.png b/documentation/ref-manual/figures/analysis-for-package-splitting.png
new file mode 100644
index 0000000000..04f2794ea9
--- /dev/null
+++ b/documentation/ref-manual/figures/analysis-for-package-splitting.png
Binary files differ
diff --git a/documentation/ref-manual/figures/buildhistory-web.png b/documentation/ref-manual/figures/buildhistory-web.png
new file mode 100644
index 0000000000..f6db86c977
--- /dev/null
+++ b/documentation/ref-manual/figures/buildhistory-web.png
Binary files differ
diff --git a/documentation/ref-manual/figures/buildhistory.png b/documentation/ref-manual/figures/buildhistory.png
new file mode 100644
index 0000000000..9a77bde68b
--- /dev/null
+++ b/documentation/ref-manual/figures/buildhistory.png
Binary files differ
diff --git a/documentation/ref-manual/figures/configuration-compile-autoreconf.png b/documentation/ref-manual/figures/configuration-compile-autoreconf.png
new file mode 100644
index 0000000000..a07464f04c
--- /dev/null
+++ b/documentation/ref-manual/figures/configuration-compile-autoreconf.png
Binary files differ
diff --git a/documentation/ref-manual/figures/cross-development-toolchains.png b/documentation/ref-manual/figures/cross-development-toolchains.png
new file mode 100644
index 0000000000..d36670a198
--- /dev/null
+++ b/documentation/ref-manual/figures/cross-development-toolchains.png
Binary files differ
diff --git a/documentation/ref-manual/figures/image-generation.png b/documentation/ref-manual/figures/image-generation.png
new file mode 100644
index 0000000000..ab962580c3
--- /dev/null
+++ b/documentation/ref-manual/figures/image-generation.png
Binary files differ
diff --git a/documentation/ref-manual/figures/images.png b/documentation/ref-manual/figures/images.png
new file mode 100644
index 0000000000..d99eac1fbf
--- /dev/null
+++ b/documentation/ref-manual/figures/images.png
Binary files differ
diff --git a/documentation/ref-manual/figures/layer-input.png b/documentation/ref-manual/figures/layer-input.png
new file mode 100644
index 0000000000..0a4f2e74f3
--- /dev/null
+++ b/documentation/ref-manual/figures/layer-input.png
Binary files differ
diff --git a/documentation/ref-manual/figures/package-feeds.png b/documentation/ref-manual/figures/package-feeds.png
new file mode 100644
index 0000000000..4bc311f3d6
--- /dev/null
+++ b/documentation/ref-manual/figures/package-feeds.png
Binary files differ
diff --git a/documentation/ref-manual/figures/patching.png b/documentation/ref-manual/figures/patching.png
new file mode 100644
index 0000000000..8ecd018502
--- /dev/null
+++ b/documentation/ref-manual/figures/patching.png
Binary files differ
diff --git a/documentation/ref-manual/figures/poky-title.png b/documentation/ref-manual/figures/poky-title.png
new file mode 100644
index 0000000000..2893d84620
--- /dev/null
+++ b/documentation/ref-manual/figures/poky-title.png
Binary files differ
diff --git a/documentation/ref-manual/figures/sdk-generation.png b/documentation/ref-manual/figures/sdk-generation.png
new file mode 100644
index 0000000000..c37e2748ca
--- /dev/null
+++ b/documentation/ref-manual/figures/sdk-generation.png
Binary files differ
diff --git a/documentation/ref-manual/figures/sdk.png b/documentation/ref-manual/figures/sdk.png
new file mode 100644
index 0000000000..a539cc52f0
--- /dev/null
+++ b/documentation/ref-manual/figures/sdk.png
Binary files differ
diff --git a/documentation/ref-manual/figures/source-fetching.png b/documentation/ref-manual/figures/source-fetching.png
new file mode 100644
index 0000000000..26aefb50c2
--- /dev/null
+++ b/documentation/ref-manual/figures/source-fetching.png
Binary files differ
diff --git a/documentation/ref-manual/figures/source-input.png b/documentation/ref-manual/figures/source-input.png
new file mode 100644
index 0000000000..f7515058ef
--- /dev/null
+++ b/documentation/ref-manual/figures/source-input.png
Binary files differ
diff --git a/documentation/ref-manual/figures/user-configuration.png b/documentation/ref-manual/figures/user-configuration.png
new file mode 100644
index 0000000000..f2b3f8e7fe
--- /dev/null
+++ b/documentation/ref-manual/figures/user-configuration.png
Binary files differ
diff --git a/documentation/ref-manual/figures/yocto-environment-ref.png b/documentation/ref-manual/figures/yocto-environment-ref.png
new file mode 100644
index 0000000000..650c6c8030
--- /dev/null
+++ b/documentation/ref-manual/figures/yocto-environment-ref.png
Binary files differ
diff --git a/documentation/ref-manual/introduction.xml b/documentation/ref-manual/introduction.xml
new file mode 100644
index 0000000000..19e9895ee6
--- /dev/null
+++ b/documentation/ref-manual/introduction.xml
@@ -0,0 +1,572 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='intro'>
6<title>Introduction</title>
7
8<section id='intro-welcome'>
9 <title>Introduction</title>
10
11 <para>
12 This manual provides reference information for the current release of the Yocto Project.
13 The Yocto Project is an open-source collaboration project focused on embedded Linux
14 developers.
15 Amongst other things, the Yocto Project uses the OpenEmbedded build system, which
16 is based on the Poky project, to construct complete Linux images.
17 You can find complete introductory and getting started information on the Yocto Project
18 by reading the
19 <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
20 For task-based information using the Yocto Project, see the
21 <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Manual</ulink>
22 and the <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>.
23 For Board Support Package (BSP) structure information, see the
24 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
25 You can find information on tracing and profiling in the
26 <ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual'>Yocto Project Profiling and Tracing Manual</ulink>.
27 For information on BitBake, which is the task execution tool the
28 OpenEmbedded build system is based on, see the
29 <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>.
30 Finally, you can also find lots of Yocto Project information on the
31 <ulink url="&YOCTO_HOME_URL;">Yocto Project website</ulink>.
32 </para>
33</section>
34
35<section id='intro-manualoverview'>
36 <title>Documentation Overview</title>
37 <para>
38 This reference manual consists of the following:
39 <itemizedlist>
40 <listitem><para><emphasis>
41 <link linkend='usingpoky'>Using the Yocto Project</link>:</emphasis>
42 Provides an overview of the components that make up the Yocto Project
43 followed by information about debugging images created in the Yocto Project.
44 </para></listitem>
45 <listitem><para><emphasis>
46 <link linkend='closer-look'>A Closer Look at the Yocto Project Development Environment</link>:</emphasis>
47 Provides a more detailed look at the Yocto Project development
48 environment within the context of development.
49 </para></listitem>
50 <listitem><para><emphasis>
51 <link linkend='technical-details'>Technical Details</link>:</emphasis>
52 Describes fundamental Yocto Project components as well as an explanation
53 behind how the Yocto Project uses shared state (sstate) cache to speed build time.
54 </para></listitem>
55 <listitem><para><emphasis>
56 <link linkend='migration'>Migrating to a Newer Yocto Project Release</link>:</emphasis>
57 Describes release-specific information that helps you move from
58 one Yocto Project Release to another.
59 </para></listitem>
60 <listitem><para><emphasis>
61 <link linkend='ref-structure'>Directory Structure</link>:</emphasis>
62 Describes the
63 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> created
64 either by unpacking a released Yocto Project tarball on your host development system,
65 or by cloning the upstream
66 <ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink> Git repository.
67 </para></listitem>
68 <listitem><para><emphasis>
69 <link linkend='ref-classes'>Classes</link>:</emphasis>
70 Describes the classes used in the Yocto Project.</para></listitem>
71 <listitem><para><emphasis>
72 <link linkend='ref-tasks'>Tasks</link>:</emphasis>
73 Describes the tasks defined by the OpenEmbedded build system.
74 </para></listitem>
75 <listitem><para><emphasis>
76 <link linkend='ref-qa-checks'>QA Error and Warning Messages</link>:</emphasis>
77 Lists and describes QA warning and error messages.
78 </para></listitem>
79 <listitem><para><emphasis>
80 <link linkend='ref-images'>Images</link>:</emphasis>
81 Describes the standard images that the Yocto Project supports.
82 </para></listitem>
83 <listitem><para><emphasis>
84 <link linkend='ref-features'>Features</link>:</emphasis>
85 Describes mechanisms for creating distribution, machine, and image
86 features during the build process using the OpenEmbedded build system.</para></listitem>
87 <listitem><para><emphasis>
88 <link linkend='ref-variables-glos'>Variables Glossary</link>:</emphasis>
89 Presents most variables used by the OpenEmbedded build system, which
90 uses BitBake.
91 Entries describe the function of the variable and how to apply them.
92 </para></listitem>
93 <listitem><para><emphasis>
94 <link linkend='ref-varlocality'>Variable Context</link>:</emphasis>
95 Provides variable locality or context.</para></listitem>
96 <listitem><para><emphasis>
97 <link linkend='faq'>FAQ</link>:</emphasis>
98 Provides answers for commonly asked questions in the Yocto Project
99 development environment.</para></listitem>
100 <listitem><para><emphasis>
101 <link linkend='resources'>Contributing to the Yocto Project</link>:</emphasis>
102 Provides guidance on how you can contribute back to the Yocto
103 Project.</para></listitem>
104 </itemizedlist>
105 </para>
106</section>
107
108
109<section id='intro-requirements'>
110<title>System Requirements</title>
111 <para>
112 For general Yocto Project system requirements, see the
113 "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>What You Need and How You Get It</ulink>" section
114 in the Yocto Project Quick Start.
115 The remainder of this section provides details on system requirements
116 not covered in the Yocto Project Quick Start.
117 </para>
118
119 <section id='detailed-supported-distros'>
120 <title>Supported Linux Distributions</title>
121
122 <para>
123 Currently, the Yocto Project is supported on the following
124 distributions:
125 <note>
126 <para>
127 Yocto Project releases are tested against the stable Linux
128 distributions in the following list.
129 The Yocto Project should work on other distributions but
130 validation is not performed against them.
131 </para>
132
133 <para>
134 In particular, the Yocto Project does not support
135 and currently has no plans to support
136 rolling-releases or development distributions due to their
137 constantly changing nature.
138 We welcome patches and bug reports, but keep in mind that
139 our priority is on the supported platforms listed below.
140 </para>
141
142 <para>
143 If you encounter problems, please go to
144 <ulink url='&YOCTO_BUGZILLA_URL;'>Yocto Project Bugzilla</ulink>
145 and submit a bug.
146 We are interested in hearing about your experience.
147 </para>
148 </note>
149 <itemizedlist>
150<!-- <listitem><para>Ubuntu 10.04</para></listitem>
151 <listitem><para>Ubuntu 11.10</para></listitem> -->
152 <listitem><para>Ubuntu 12.04 (LTS)</para></listitem>
153 <listitem><para>Ubuntu 13.10</para></listitem>
154 <listitem><para>Ubuntu 14.04 (LTS)</para></listitem>
155<!-- <listitem><para>Fedora 16 (Verne)</para></listitem>
156 <listitem><para>Fedora 17 (Spherical)</para></listitem> -->
157 <listitem><para>Fedora release 19 (Schrödinger's Cat)</para></listitem>
158 <listitem><para>Fedora release 20 (Heisenbug)</para></listitem>
159<!-- <listitem><para>CentOS release 5.6 (Final)</para></listitem>
160 <listitem><para>CentOS release 5.7 (Final)</para></listitem>
161 <listitem><para>CentOS release 5.8 (Final)</para></listitem>
162 <listitem><para>CentOS release 6.3 (Final)</para></listitem> -->
163 <listitem><para>CentOS release 6.4</para></listitem>
164 <listitem><para>CentOS release 6.5</para></listitem>
165<!-- <listitem><para>Debian GNU/Linux 6.0 (Squeeze)</para></listitem> -->
166 <listitem><para>Debian GNU/Linux 7.0 (Wheezy)</para></listitem>
167 <listitem><para>Debian GNU/Linux 7.1 (Wheezy)</para></listitem>
168 <listitem><para>Debian GNU/Linux 7.2 (Wheezy)</para></listitem>
169 <listitem><para>Debian GNU/Linux 7.3 (Wheezy)</para></listitem>
170 <listitem><para>Debian GNU/Linux 7.4 (Wheezy)</para></listitem>
171 <listitem><para>Debian GNU/Linux 7.5 (Wheezy)</para></listitem>
172 <listitem><para>Debian GNU/Linux 7.6 (Wheezy)</para></listitem>
173<!-- <listitem><para>openSUSE 11.4</para></listitem>
174 <listitem><para>openSUSE 12.1</para></listitem> -->
175 <listitem><para>openSUSE 12.2</para></listitem>
176 <listitem><para>openSUSE 12.3</para></listitem>
177 <listitem><para>openSUSE 13.1</para></listitem>
178 </itemizedlist>
179 </para>
180
181 <note>
182 While the Yocto Project Team attempts to ensure all Yocto Project
183 releases are one hundred percent compatible with each officially
184 supported Linux distribution, instances might exist where you
185 encounter a problem while using the Yocto Project on a specific
186 distribution.
187 For example, the CentOS 6.4 distribution does not include the
188 Gtk+ 2.20.0 and PyGtk 2.21.0 (or higher) packages, which are
189 required to run
190 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink>.
191 </note>
192 </section>
193
194 <section id='required-packages-for-the-host-development-system'>
195 <title>Required Packages for the Host Development System</title>
196
197 <para>
198 The list of packages you need on the host development system can
199 be large when covering all build scenarios using the Yocto Project.
200 This section provides required packages according to
201 Linux distribution and function.
202 </para>
203
204 <section id='ubuntu-packages'>
205 <title>Ubuntu and Debian</title>
206
207 <para>
208 The following list shows the required packages by function
209 given a supported Ubuntu or Debian Linux distribution:
210 <itemizedlist>
211 <listitem><para><emphasis>Essentials:</emphasis>
212 Packages needed to build an image on a headless
213 system:
214 <literallayout class='monospaced'>
215 $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
216 </literallayout></para></listitem>
217 <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
218 Packages recommended if the host system has graphics
219 support or if you are going to use the Eclipse
220 IDE:
221 <literallayout class='monospaced'>
222 $ sudo apt-get install libsdl1.2-dev xterm
223 </literallayout></para></listitem>
224 <listitem><para><emphasis>Documentation:</emphasis>
225 Packages needed if you are going to build out the
226 Yocto Project documentation manuals:
227 <literallayout class='monospaced'>
228 $ sudo apt-get install make xsltproc docbook-utils fop dblatex xmlto
229 </literallayout></para></listitem>
230 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
231 Packages needed if you are going to be using the
232 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
233 <literallayout class='monospaced'>
234 $ sudo apt-get install autoconf automake libtool libglib2.0-dev
235 </literallayout></para></listitem>
236 </itemizedlist>
237 </para>
238 </section>
239
240 <section id='fedora-packages'>
241 <title>Fedora Packages</title>
242
243 <para>
244 The following list shows the required packages by function
245 given a supported Fedora Linux distribution:
246 <itemizedlist>
247 <listitem><para><emphasis>Essentials:</emphasis>
248 Packages needed to build an image for a headless
249 system:
250 <literallayout class='monospaced'>
251 $ sudo yum install &FEDORA_HOST_PACKAGES_ESSENTIAL;
252 </literallayout></para></listitem>
253 <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
254 Packages recommended if the host system has graphics
255 support or if you are going to use the Eclipse
256 IDE:
257 <literallayout class='monospaced'>
258 $ sudo yum install SDL-devel xterm perl-Thread-Queue
259 </literallayout></para></listitem>
260 <listitem><para><emphasis>Documentation:</emphasis>
261 Packages needed if you are going to build out the
262 Yocto Project documentation manuals:
263 <literallayout class='monospaced'>
264 $ sudo yum install make docbook-style-dsssl docbook-style-xsl \
265 docbook-dtds docbook-utils fop libxslt dblatex xmlto
266 </literallayout></para></listitem>
267 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
268 Packages needed if you are going to be using the
269 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
270 <literallayout class='monospaced'>
271 $ sudo yum install autoconf automake libtool glib2-devel
272 </literallayout></para></listitem>
273 </itemizedlist>
274 </para>
275 </section>
276
277 <section id='opensuse-packages'>
278 <title>openSUSE Packages</title>
279
280 <para>
281 The following list shows the required packages by function
282 given a supported openSUSE Linux distribution:
283 <itemizedlist>
284 <listitem><para><emphasis>Essentials:</emphasis>
285 Packages needed to build an image for a headless
286 system:
287 <literallayout class='monospaced'>
288 $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
289 </literallayout></para></listitem>
290 <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
291 Packages recommended if the host system has graphics
292 support or if you are going to use the Eclipse
293 IDE:
294 <literallayout class='monospaced'>
295 $ sudo zypper install libSDL-devel xterm
296 </literallayout></para></listitem>
297 <listitem><para><emphasis>Documentation:</emphasis>
298 Packages needed if you are going to build out the
299 Yocto Project documentation manuals:
300 <literallayout class='monospaced'>
301 $ sudo zypper install make fop xsltproc dblatex xmlto
302 </literallayout></para></listitem>
303 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
304 Packages needed if you are going to be using the
305 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
306 <literallayout class='monospaced'>
307 $ sudo zypper install autoconf automake libtool glib2-devel
308 </literallayout></para></listitem>
309 </itemizedlist>
310 </para>
311 </section>
312
313 <section id='centos-packages'>
314 <title>CentOS Packages</title>
315
316 <para>
317 The following list shows the required packages by function
318 given a supported CentOS Linux distribution:
319 <note>
320 For CentOS 6.x, some of the versions of the components
321 provided by the distribution are too old (e.g. Git, Python,
322 and tar).
323 It is recommended that you install the buildtools in order
324 to provide versions that will work with the OpenEmbedded
325 build system.
326 For information on how to install the buildtools tarball,
327 see the
328 "<link linkend='required-git-tar-and-python-versions'>Required Git, Tar, and Python Versions</link>"
329 section.
330 </note>
331 <itemizedlist>
332 <listitem><para><emphasis>Essentials:</emphasis>
333 Packages needed to build an image for a headless
334 system:
335 <literallayout class='monospaced'>
336 $ sudo yum install &CENTOS_HOST_PACKAGES_ESSENTIAL;
337 </literallayout></para></listitem>
338 <listitem><para><emphasis>Graphical and Eclipse Plug-In Extras:</emphasis>
339 Packages recommended if the host system has graphics
340 support or if you are going to use the Eclipse
341 IDE:
342 <literallayout class='monospaced'>
343 $ sudo yum install SDL-devel xterm
344 </literallayout></para></listitem>
345 <listitem><para><emphasis>Documentation:</emphasis>
346 Packages needed if you are going to build out the
347 Yocto Project documentation manuals:
348 <literallayout class='monospaced'>
349 $ sudo yum install make docbook-style-dsssl docbook-style-xsl \
350 docbook-dtds docbook-utils fop libxslt dblatex xmlto
351 </literallayout></para></listitem>
352 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
353 Packages needed if you are going to be using the
354 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
355 <literallayout class='monospaced'>
356 $ sudo yum install autoconf automake libtool glib2-devel
357 </literallayout></para></listitem>
358 </itemizedlist>
359 </para>
360 </section>
361 </section>
362
363 <section id='required-git-tar-and-python-versions'>
364 <title>Required Git, tar, and Python Versions</title>
365
366 <para>
367 In order to use the build system, your host development system
368 must meet the following version requirements for Git, tar, and
369 Python:
370 <itemizedlist>
371 <listitem><para>Git 1.7.8 or greater</para></listitem>
372 <listitem><para>tar 1.24 or greater</para></listitem>
373 <listitem><para>Python 2.7.3 or greater not including
374 Python 3.x, which is not supported.</para></listitem>
375 </itemizedlist>
376 </para>
377
378 <para>
379 If your host development system does not meet all these requirements,
380 you can resolve this by installing a <filename>buildtools</filename>
381 tarball that contains these tools.
382 You can get the tarball one of two ways: download a pre-built
383 tarball or use BitBake to build the tarball.
384 </para>
385
386 <section id='downloading-a-pre-built-buildtools-tarball'>
387 <title>Downloading a Pre-Built <filename>buildtools</filename> Tarball</title>
388
389 <para>
390 Downloading and running a pre-built buildtools installer is
391 the easiest of the two methods by which you can get these tools:
392 <orderedlist>
393 <listitem><para>
394 Locate and download the <filename>*.sh</filename> at
395 <ulink url='&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;/buildtools/'></ulink>.
396 </para></listitem>
397 <listitem><para>
398 Execute the installation script.
399 Here is an example:
400 <literallayout class='monospaced'>
401 $ sh poky-glibc-x86_64-buildtools-tarball-x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
402 </literallayout>
403 During execution, a prompt appears that allows you to
404 choose the installation directory.
405 For example, you could choose the following:
406 <literallayout class='monospaced'>
407 /home/<replaceable>your-username</replaceable>/buildtools
408 </literallayout>
409 </para></listitem>
410 <listitem><para>
411 Source the tools environment setup script by using a
412 command like the following:
413 <literallayout class='monospaced'>
414 $ source /home/<replaceable>your-username</replaceable>/buildtools/environment-setup-i586-poky-linux
415 </literallayout>
416 Of course, you need to supply your installation directory and be
417 sure to use the right file (i.e. i585 or x86-64).
418 </para>
419 <para>
420 After you have sourced the setup script,
421 the tools are added to <filename>PATH</filename>
422 and any other environment variables required to run the
423 tools are initialized.
424 The results are working versions versions of Git, tar,
425 Python and <filename>chrpath</filename>.
426 </para></listitem>
427 </orderedlist>
428 </para>
429 </section>
430
431 <section id='building-your-own-buildtools-tarball'>
432 <title>Building Your Own <filename>buildtools</filename> Tarball</title>
433
434 <para>
435 Building and running your own buildtools installer applies
436 only when you have a build host that can already run BitBake.
437 In this case, you use that machine to build the
438 <filename>.sh</filename> file and then
439 take steps to transfer and run it on a
440 machine that does not meet the minimal Git, tar, and Python
441 requirements.
442 </para>
443
444 <para>
445 Here are the steps to take to build and run your own
446 buildtools installer:
447 <orderedlist>
448 <listitem><para>
449 On the machine that is able to run BitBake,
450 be sure you have set up your build environment with
451 the setup script
452 (<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
453 or
454 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
455 </para></listitem>
456 <listitem><para>
457 Run the BitBake command to build the tarball:
458 <literallayout class='monospaced'>
459 $ bitbake buildtools-tarball
460 </literallayout>
461 <note>
462 The
463 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>
464 variable in your <filename>local.conf</filename> file
465 determines whether you build tools for a 32-bit
466 or 64-bit system.
467 </note>
468 Once the build completes, you can find the
469 <filename>.sh</filename> file that installs
470 the tools in the <filename>tmp/deploy/sdk</filename>
471 subdirectory of the
472 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
473 The installer file has the string "buildtools"
474 in the name.
475 </para></listitem>
476 <listitem><para>
477 Transfer the <filename>.sh</filename> file from the
478 build host to the machine that does not meet the
479 Git, tar, or Python requirements.
480 </para></listitem>
481 <listitem><para>
482 On the machine that does not meet the requirements,
483 run the <filename>.sh</filename> file
484 to install the tools.
485 Here is an example:
486 <literallayout class='monospaced'>
487 $ sh poky-glibc-x86_64-buildtools-tarball-x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
488 </literallayout>
489 During execution, a prompt appears that allows you to
490 choose the installation directory.
491 For example, you could choose the following:
492 <literallayout class='monospaced'>
493 /home/<replaceable>your-username</replaceable>/buildtools
494 </literallayout>
495 </para></listitem>
496 <listitem><para>
497 Source the tools environment setup script by using a
498 command like the following:
499 <literallayout class='monospaced'>
500 $ source /home/<replaceable>your-username</replaceable>/buildtools/environment-setup-i586-poky-linux
501 </literallayout>
502 Of course, you need to supply your installation directory and be
503 sure to use the right file (i.e. i585 or x86-64).
504 </para>
505 <para>
506 After you have sourced the setup script,
507 the tools are added to <filename>PATH</filename>
508 and any other environment variables required to run the
509 tools are initialized.
510 The results are working versions versions of Git, tar,
511 Python and <filename>chrpath</filename>.
512 </para></listitem>
513 </orderedlist>
514 </para>
515 </section>
516 </section>
517</section>
518
519<section id='intro-getit'>
520 <title>Obtaining the Yocto Project</title>
521 <para>
522 The Yocto Project development team makes the Yocto Project available through a number
523 of methods:
524 <itemizedlist>
525 <listitem><para><emphasis>Source Repositories:</emphasis>
526 Working from a copy of the upstream
527 <filename>poky</filename> repository is the
528 preferred method for obtaining and using a Yocto Project
529 release.
530 You can view the Yocto Project Source Repositories at
531 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
532 In particular, you can find the
533 <filename>poky</filename> repository at
534 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/'></ulink>.
535 </para></listitem>
536 <listitem><para><emphasis>Releases:</emphasis> Stable, tested
537 releases are available as tarballs through
538 <ulink url='&YOCTO_DL_URL;/releases/yocto/'/>.</para></listitem>
539 <listitem><para><emphasis>Nightly Builds:</emphasis> These
540 tarball releases are available at
541 <ulink url='http://autobuilder.yoctoproject.org/nightly'/>.
542 These builds include Yocto Project releases, meta-toolchain
543 tarball installation scripts, and experimental builds.
544 </para></listitem>
545 <listitem><para><emphasis>Yocto Project Website:</emphasis> You can
546 find tarball releases of the Yocto Project and supported BSPs
547 at the
548 <ulink url='&YOCTO_HOME_URL;'>Yocto Project website</ulink>.
549 Along with these downloads, you can find lots of other
550 information at this site.
551 </para></listitem>
552 </itemizedlist>
553 </para>
554</section>
555
556<section id='intro-getit-dev'>
557 <title>Development Checkouts</title>
558 <para>
559 Development using the Yocto Project requires a local
560 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
561 You can set up the Source Directory by cloning a copy of the upstream
562 <ulink url='&YOCTO_DOCS_DEV_URL;#poky'>poky</ulink> Git repository.
563 For information on how to do this, see the
564 "<ulink url='&YOCTO_DOCS_DEV_URL;#getting-setup'>Getting Set Up</ulink>"
565 section in the Yocto Project Development Manual.
566 </para>
567</section>
568
569</chapter>
570<!--
571vim: expandtab tw=80 ts=4
572-->
diff --git a/documentation/ref-manual/migration.xml b/documentation/ref-manual/migration.xml
new file mode 100644
index 0000000000..d072ecfa0e
--- /dev/null
+++ b/documentation/ref-manual/migration.xml
@@ -0,0 +1,2019 @@
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='general-migration-considerations'>
15 <title>General Migration Considerations</title>
16
17 <para>
18 Some considerations are not tied to a specific Yocto Project
19 release.
20 This section presents information you should consider when
21 migrating to any new Yocto Project release.
22 <itemizedlist>
23 <listitem><para><emphasis>Dealing with Customized Recipes</emphasis>:
24 Issues could arise if you take older recipes that contain
25 customizations and simply copy them forward expecting them
26 to work after you migrate to new Yocto Project metadata.
27 For example, suppose you have a recipe in your layer that is
28 a customized version of a core recipe copied from the earlier
29 release, rather than through the use of an append file.
30 When you migrate to a newer version of Yocto Project, the
31 metadata (e.g. perhaps an include file used by the recipe)
32 could have changed in a way that would break the build.
33 Say, for example, a function is removed from an include file
34 and the customized recipe tries to call that function.
35 </para>
36
37 <para>You could "forward-port" all your customizations in your
38 recipe so that everything works for the new release.
39 However, this is not the optimal solution as you would have
40 to repeat this process with each new release if changes
41 occur that give rise to problems.</para>
42
43 <para>The better solution (where practical) is to use append
44 files (<filename>*.bbappend</filename>) to capture any
45 customizations you want to make to a recipe.
46 Doing so, isolates your changes from the main recipe making
47 them much more manageable.
48 However, sometimes it is not practical to use an append
49 file.
50 A good example of this is when introducing a newer or older
51 version of a recipe in another layer.</para>
52 </listitem>
53 <listitem><para><emphasis>Updating Append Files</emphasis>:
54 Since append files generally only contain your customizations,
55 they often do not need to be adjusted for new releases.
56 However, if the <filename>.bbappend</filename> file is
57 specific to a particular version of the recipe (i.e. its
58 name does not use the % wildcard) and the version of the
59 recipe to which it is appending has changed, then you will
60 at a minimum need to rename the append file to match the
61 name of the recipe file.
62 A mismatch between an append file and its corresponding
63 recipe file (<filename>.bb</filename>) will
64 trigger an error during parsing.</para>
65 <para>Depending on the type of customization the append file
66 applies, other incompatibilities might occur when you
67 upgrade.
68 For example, if your append file applies a patch and the
69 recipe to which it is appending is updated to a newer
70 version, the patch might no longer apply.
71 If this is the case and assuming the patch is still needed,
72 you must modify the patch file so that it does apply.
73 </para></listitem>
74 </itemizedlist>
75 </para>
76</section>
77
78<section id='moving-to-the-yocto-project-1.3-release'>
79 <title>Moving to the Yocto Project 1.3 Release</title>
80
81 <para>
82 This section provides migration information for moving to the
83 Yocto Project 1.3 Release from the prior release.
84 </para>
85
86 <section id='1.3-local-configuration'>
87 <title>Local Configuration</title>
88
89 <para>
90 Differences include changes for
91 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
92 and <filename>bblayers.conf</filename>.
93 </para>
94
95 <section id='migration-1.3-sstate-mirrors'>
96 <title>SSTATE_MIRRORS</title>
97
98 <para>
99 The shared state cache (sstate-cache), as pointed to by
100 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>, by default
101 now has two-character subdirectories to prevent issues arising
102 from too many files in the same directory.
103 Also, native sstate-cache packages will go into a subdirectory named using
104 the distro ID string.
105 If you copy the newly structured sstate-cache to a mirror location
106 (either local or remote) and then point to it in
107 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>,
108 you need to append "PATH" to the end of the mirror URL so that
109 the path used by BitBake before the mirror substitution is
110 appended to the path used to access the mirror.
111 Here is an example:
112 <literallayout class='monospaced'>
113 SSTATE_MIRRORS = "file://.* http://<replaceable>someserver</replaceable>.tld/share/sstate/PATH"
114 </literallayout>
115 </para>
116 </section>
117
118 <section id='migration-1.3-bblayers-conf'>
119 <title>bblayers.conf</title>
120
121 <para>
122 The <filename>meta-yocto</filename> layer consists of two parts
123 that correspond to the Poky reference distribution and the
124 reference hardware Board Support Packages (BSPs), respectively:
125 <filename>meta-yocto</filename> and
126 <filename>meta-yocto-bsp</filename>.
127 When running BitBake or Hob for the first time after upgrading,
128 your <filename>conf/bblayers.conf</filename> file will be
129 updated to handle this change and you will be asked to
130 re-run or restart for the changes to take effect.
131 </para>
132 </section>
133 </section>
134
135 <section id='1.3-recipes'>
136 <title>Recipes</title>
137
138 <para>
139 Differences include changes for the following:
140 <itemizedlist>
141 <listitem><para>Python function whitespace</para></listitem>
142 <listitem><para><filename>proto=</filename> in <filename>SRC_URI</filename></para></listitem>
143 <listitem><para><filename>nativesdk</filename></para></listitem>
144 <listitem><para>Task recipes</para></listitem>
145 <listitem><para><filename>IMAGE_FEATURES</filename></para></listitem>
146 <listitem><para>Removed recipes</para></listitem>
147 </itemizedlist>
148 </para>
149
150 <section id='migration-1.3-python-function-whitespace'>
151 <title>Python Function Whitespace</title>
152
153 <para>
154 All Python functions must now use four spaces for indentation.
155 Previously, an inconsistent mix of spaces and tabs existed,
156 which made extending these functions using
157 <filename>_append</filename> or <filename>_prepend</filename>
158 complicated given that Python treats whitespace as
159 syntactically significant.
160 If you are defining or extending any Python functions (e.g.
161 <filename>populate_packages</filename>, <filename>do_unpack</filename>,
162 <filename>do_patch</filename> and so forth) in custom recipes
163 or classes, you need to ensure you are using consistent
164 four-space indentation.
165 </para>
166 </section>
167
168 <section id='migration-1.3-proto=-in-src-uri'>
169 <title>proto= in SRC_URI</title>
170
171 <para>
172 Any use of <filename>proto=</filename> in
173 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
174 needs to be changed to <filename>protocol=</filename>.
175 In particular, this applies to the following URIs:
176 <itemizedlist>
177 <listitem><para><filename>svn://</filename></para></listitem>
178 <listitem><para><filename>bzr://</filename></para></listitem>
179 <listitem><para><filename>hg://</filename></para></listitem>
180 <listitem><para><filename>osc://</filename></para></listitem>
181 </itemizedlist>
182 Other URIs were already using <filename>protocol=</filename>.
183 This change improves consistency.
184 </para>
185 </section>
186
187 <section id='migration-1.3-nativesdk'>
188 <title>nativesdk</title>
189
190 <para>
191 The suffix <filename>nativesdk</filename> is now implemented
192 as a prefix, which simplifies a lot of the packaging code for
193 <filename>nativesdk</filename> recipes.
194 All custom <filename>nativesdk</filename> recipes and any
195 references need to be updated to use
196 <filename>nativesdk-*</filename> instead of
197 <filename>*-nativesdk</filename>.
198 </para>
199 </section>
200
201 <section id='migration-1.3-task-recipes'>
202 <title>Task Recipes</title>
203
204 <para>
205 "Task" recipes are now known as "Package groups" and have
206 been renamed from <filename>task-*.bb</filename> to
207 <filename>packagegroup-*.bb</filename>.
208 Existing references to the previous <filename>task-*</filename>
209 names should work in most cases as there is an automatic
210 upgrade path for most packages.
211 However, you should update references in your own recipes and
212 configurations as they could be removed in future releases.
213 You should also rename any custom <filename>task-*</filename>
214 recipes to <filename>packagegroup-*</filename>, and change
215 them to inherit <filename>packagegroup</filename> instead of
216 <filename>task</filename>, as well as taking the opportunity
217 to remove anything now handled by
218 <filename>packagegroup.bbclass</filename>, such as providing
219 <filename>-dev</filename> and <filename>-dbg</filename>
220 packages, setting
221 <link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>,
222 and so forth.
223 See the
224 "<link linkend='ref-classes-packagegroup'><filename>packagegroup.bbclass</filename></link>"
225 section for further details.
226 </para>
227 </section>
228
229 <section id='migration-1.3-image-features'>
230 <title>IMAGE_FEATURES</title>
231
232 <para>
233 Image recipes that previously included "apps-console-core"
234 in <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
235 should now include "splash" instead to enable the boot-up
236 splash screen.
237 Retaining "apps-console-core" will still include the splash
238 screen but generates a warning.
239 The "apps-x11-core" and "apps-x11-games"
240 <filename>IMAGE_FEATURES</filename> features have been removed.
241 </para>
242 </section>
243
244 <section id='migration-1.3-removed-recipes'>
245 <title>Removed Recipes</title>
246
247 <para>
248 The following recipes have been removed.
249 For most of them, it is unlikely that you would have any
250 references to them in your own
251 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>.
252 However, you should check your metadata against this list to be sure:
253 <itemizedlist>
254 <listitem><para><emphasis><filename>libx11-trim</filename></emphasis>:
255 Replaced by <filename>libx11</filename>, which has a negligible
256 size difference with modern Xorg.</para></listitem>
257 <listitem><para><emphasis><filename>xserver-xorg-lite</filename></emphasis>:
258 Use <filename>xserver-xorg</filename>, which has a negligible
259 size difference when DRI and GLX modules are not installed.</para></listitem>
260 <listitem><para><emphasis><filename>xserver-kdrive</filename></emphasis>:
261 Effectively unmaintained for many years.</para></listitem>
262 <listitem><para><emphasis><filename>mesa-xlib</filename></emphasis>:
263 No longer serves any purpose.</para></listitem>
264 <listitem><para><emphasis><filename>galago</filename></emphasis>:
265 Replaced by telepathy.</para></listitem>
266 <listitem><para><emphasis><filename>gail</filename></emphasis>:
267 Functionality was integrated into GTK+ 2.13.</para></listitem>
268 <listitem><para><emphasis><filename>eggdbus</filename></emphasis>:
269 No longer needed.</para></listitem>
270 <listitem><para><emphasis><filename>gcc-*-intermediate</filename></emphasis>:
271 The build has been restructured to avoid the need for
272 this step.</para></listitem>
273 <listitem><para><emphasis><filename>libgsmd</filename></emphasis>:
274 Unmaintained for many years.
275 Functionality now provided by
276 <filename>ofono</filename> instead.</para></listitem>
277 <listitem><para><emphasis>contacts, dates, tasks, eds-tools</emphasis>:
278 Largely unmaintained PIM application suite.
279 It has been moved to <filename>meta-gnome</filename>
280 in <filename>meta-openembedded</filename>.</para></listitem>
281 </itemizedlist>
282 In addition to the previously listed changes, the
283 <filename>meta-demoapps</filename> directory has also been removed
284 because the recipes in it were not being maintained and many
285 had become obsolete or broken.
286 Additionally, these recipes were not parsed in the default configuration.
287 Many of these recipes are already provided in an updated and
288 maintained form within the OpenEmbedded community layers such as
289 <filename>meta-oe</filename> and <filename>meta-gnome</filename>.
290 For the remainder, you can now find them in the
291 <filename>meta-extras</filename> repository, which is in the
292 Yocto Project
293 <ulink url='&YOCTO_DOCS_DEV_URL;#source-repositories'>Source Repositories</ulink>.
294 </para>
295 </section>
296 </section>
297
298 <section id='1.3-linux-kernel-naming'>
299 <title>Linux Kernel Naming</title>
300
301 <para>
302 The naming scheme for kernel output binaries has been changed to
303 now include
304 <link linkend='var-PE'><filename>PE</filename></link> as part of the
305 filename:
306 <literallayout class='monospaced'>
307 KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
308 </literallayout>
309 </para>
310
311 <para>
312 Because the <filename>PE</filename> variable is not set by default,
313 these binary files could result with names that include two dash
314 characters.
315 Here is an example:
316 <literallayout class='monospaced'>
317 bzImage--3.10.9+git0+cd502a8814_7144bcc4b8-r0-qemux86-64-20130830085431.bin
318 </literallayout>
319 </para>
320 </section>
321</section>
322
323<section id='moving-to-the-yocto-project-1.4-release'>
324 <title>Moving to the Yocto Project 1.4 Release</title>
325
326 <para>
327 This section provides migration information for moving to the
328 Yocto Project 1.4 Release from the prior release.
329 </para>
330
331 <section id='migration-1.4-bitbake'>
332 <title>BitBake</title>
333
334 <para>
335 Differences include the following:
336 <itemizedlist>
337 <listitem><para><emphasis>Comment Continuation:</emphasis>
338 If a comment ends with a line continuation (\) character,
339 then the next line must also be a comment.
340 Any instance where this is not the case, now triggers
341 a warning.
342 You must either remove the continuation character, or be
343 sure the next line is a comment.
344 </para></listitem>
345 <listitem><para><emphasis>Package Name Overrides:</emphasis>
346 The runtime package specific variables
347 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
348 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
349 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
350 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
351 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>,
352 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
353 <link linkend='var-FILES'><filename>FILES</filename></link>,
354 <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>,
355 and the pre, post, install, and uninstall script functions
356 <filename>pkg_preinst</filename>,
357 <filename>pkg_postinst</filename>,
358 <filename>pkg_prerm</filename>, and
359 <filename>pkg_postrm</filename> should always have a
360 package name override.
361 For example, use <filename>RDEPENDS_${PN}</filename> for
362 the main package instead of <filename>RDEPENDS</filename>.
363 BitBake uses more strict checks when it parses recipes.
364 </para></listitem>
365 </itemizedlist>
366 </para>
367 </section>
368
369 <section id='migration-1.4-build-behavior'>
370 <title>Build Behavior</title>
371
372 <para>
373 Differences include the following:
374 <itemizedlist>
375 <listitem><para><emphasis>Shared State Code:</emphasis>
376 The shared state code has been optimized to avoid running
377 unnecessary tasks.
378 For example, the following no longer populates the target
379 sysroot since that is not necessary:
380 <literallayout class='monospaced'>
381 $ bitbake -c rootfs <replaceable>some-image</replaceable>
382 </literallayout>
383 Instead, the system just needs to extract the output
384 package contents, re-create the packages, and construct
385 the root filesystem.
386 This change is unlikely to cause any problems unless
387 you have missing declared dependencies.
388 </para></listitem>
389 <listitem><para><emphasis>Scanning Directory Names:</emphasis>
390 When scanning for files in
391 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>,
392 the build system now uses
393 <link linkend='var-FILESOVERRIDES'><filename>FILESOVERRIDES</filename></link>
394 instead of <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
395 for the directory names.
396 In general, the values previously in
397 <filename>OVERRIDES</filename> are now in
398 <filename>FILESOVERRIDES</filename> as well.
399 However, if you relied upon an additional value
400 you previously added to <filename>OVERRIDES</filename>,
401 you might now need to add it to
402 <filename>FILESOVERRIDES</filename> unless you are already
403 adding it through the
404 <link linkend='var-MACHINEOVERRIDES'><filename>MACHINEOVERRIDES</filename></link>
405 or <link linkend='var-DISTROOVERRIDES'><filename>DISTROOVERRIDES</filename></link>
406 variables, as appropriate.
407 For more related changes, see the
408 "<link linkend='migration-1.4-variables'>Variables</link>"
409 section.
410 </para></listitem>
411 </itemizedlist>
412 </para>
413 </section>
414
415
416 <section id='migration-1.4-proxies-and-fetching-source'>
417 <title>Proxies and Fetching Source</title>
418
419 <para>
420 A new <filename>oe-git-proxy</filename> script has been added to
421 replace previous methods of handling proxies and fetching source
422 from Git.
423 See the <filename>meta-yocto/conf/site.conf.sample</filename> file
424 for information on how to use this script.
425 </para>
426 </section>
427
428 <section id='migration-1.4-custom-interfaces-file-netbase-change'>
429 <title>Custom Interfaces File (netbase change)</title>
430
431 <para>
432 If you have created your own custom
433 <filename>etc/network/interfaces</filename> file by creating
434 an append file for the <filename>netbase</filename> recipe,
435 you now need to create an append file for the
436 <filename>init-ifupdown</filename> recipe instead, which you can
437 find in the
438 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
439 at <filename>meta/recipes-core/init-ifupdown</filename>.
440 For information on how to use append files, see the
441 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files</ulink>"
442 in the Yocto Project Development Manual.
443 </para>
444 </section>
445
446 <section id='migration-1.4-remote-debugging'>
447 <title>Remote Debugging</title>
448
449 <para>
450 Support for remote debugging with the Eclipse IDE is now
451 separated into an image feature
452 (<filename>eclipse-debug</filename>) that corresponds to the
453 <filename>packagegroup-core-eclipse-debug</filename> package group.
454 Previously, the debugging feature was included through the
455 <filename>tools-debug</filename> image feature, which corresponds
456 to the <filename>packagegroup-core-tools-debug</filename>
457 package group.
458 </para>
459 </section>
460
461 <section id='migration-1.4-variables'>
462 <title>Variables</title>
463
464 <para>
465 The following variables have changed:
466 <itemizedlist>
467 <listitem><para><emphasis><filename>SANITY_TESTED_DISTROS</filename>:</emphasis>
468 This variable now uses a distribution ID, which is composed
469 of the host distributor ID followed by the release.
470 Previously,
471 <link linkend='var-SANITY_TESTED_DISTROS'><filename>SANITY_TESTED_DISTROS</filename></link>
472 was composed of the description field.
473 For example, "Ubuntu 12.10" becomes "Ubuntu-12.10".
474 You do not need to worry about this change if you are not
475 specifically setting this variable, or if you are
476 specifically setting it to "".
477 </para></listitem>
478 <listitem><para><emphasis><filename>SRC_URI</filename>:</emphasis>
479 The <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>,
480 <filename>${</filename><link linkend='var-PF'><filename>PF</filename></link><filename>}</filename>,
481 <filename>${</filename><link linkend='var-P'><filename>P</filename></link><filename>}</filename>,
482 and <filename>FILE_DIRNAME</filename> directories have been
483 dropped from the default value of the
484 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
485 variable, which is used as the search path for finding files
486 referred to in
487 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>.
488 If you have a recipe that relied upon these directories,
489 which would be unusual, then you will need to add the
490 appropriate paths within the recipe or, alternatively,
491 rearrange the files.
492 The most common locations are still covered by
493 <filename>${BP}</filename>, <filename>${BPN}</filename>,
494 and "files", which all remain in the default value of
495 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>.
496 </para></listitem>
497 </itemizedlist>
498 </para>
499 </section>
500
501 <section id='migration-target-package-management-with-rpm'>
502 <title>Target Package Management with RPM</title>
503
504 <para>
505 If runtime package management is enabled and the RPM backend
506 is selected, Smart is now installed for package download, dependency
507 resolution, and upgrades instead of Zypper.
508 For more information on how to use Smart, run the following command
509 on the target:
510 <literallayout class='monospaced'>
511 smart --help
512 </literallayout>
513 </para>
514 </section>
515
516 <section id='migration-1.4-recipes-moved'>
517 <title>Recipes Moved</title>
518
519 <para>
520 The following recipes were moved from their previous locations
521 because they are no longer used by anything in
522 the OpenEmbedded-Core:
523 <itemizedlist>
524 <listitem><para><emphasis><filename>clutter-box2d</filename>:</emphasis>
525 Now resides in the <filename>meta-oe</filename> layer.
526 </para></listitem>
527 <listitem><para><emphasis><filename>evolution-data-server</filename>:</emphasis>
528 Now resides in the <filename>meta-gnome</filename> layer.
529 </para></listitem>
530 <listitem><para><emphasis><filename>gthumb</filename>:</emphasis>
531 Now resides in the <filename>meta-gnome</filename> layer.
532 </para></listitem>
533 <listitem><para><emphasis><filename>gtkhtml2</filename>:</emphasis>
534 Now resides in the <filename>meta-oe</filename> layer.
535 </para></listitem>
536 <listitem><para><emphasis><filename>gupnp</filename>:</emphasis>
537 Now resides in the <filename>meta-multimedia</filename> layer.
538 </para></listitem>
539 <listitem><para><emphasis><filename>gypsy</filename>:</emphasis>
540 Now resides in the <filename>meta-oe</filename> layer.
541 </para></listitem>
542 <listitem><para><emphasis><filename>libcanberra</filename>:</emphasis>
543 Now resides in the <filename>meta-gnome</filename> layer.
544 </para></listitem>
545 <listitem><para><emphasis><filename>libgdata</filename>:</emphasis>
546 Now resides in the <filename>meta-gnome</filename> layer.
547 </para></listitem>
548 <listitem><para><emphasis><filename>libmusicbrainz</filename>:</emphasis>
549 Now resides in the <filename>meta-multimedia</filename> layer.
550 </para></listitem>
551 <listitem><para><emphasis><filename>metacity</filename>:</emphasis>
552 Now resides in the <filename>meta-gnome</filename> layer.
553 </para></listitem>
554 <listitem><para><emphasis><filename>polkit</filename>:</emphasis>
555 Now resides in the <filename>meta-oe</filename> layer.
556 </para></listitem>
557 <listitem><para><emphasis><filename>zeroconf</filename>:</emphasis>
558 Now resides in the <filename>meta-networking</filename> layer.
559 </para></listitem>
560 </itemizedlist>
561 </para>
562 </section>
563
564 <section id='migration-1.4-removals-and-renames'>
565 <title>Removals and Renames</title>
566
567 <para>
568 The following list shows what has been removed or renamed:
569 <itemizedlist>
570 <listitem><para><emphasis><filename>evieext</filename>:</emphasis>
571 Removed because it has been removed from
572 <filename>xserver</filename> since 2008.
573 </para></listitem>
574 <listitem><para><emphasis>Gtk+ DirectFB:</emphasis>
575 Removed support because upstream Gtk+ no longer supports it
576 as of version 2.18.
577 </para></listitem>
578 <listitem><para><emphasis><filename>libxfontcache / xfontcacheproto</filename>:</emphasis>
579 Removed because they were removed from the Xorg server in 2008.
580 </para></listitem>
581 <listitem><para><emphasis><filename>libxp / libxprintapputil / libxprintutil / printproto</filename>:</emphasis>
582 Removed because the XPrint server was removed from
583 Xorg in 2008.
584 </para></listitem>
585 <listitem><para><emphasis><filename>libxtrap / xtrapproto</filename>:</emphasis>
586 Removed because their functionality was broken upstream.
587 </para></listitem>
588 <listitem><para><emphasis>linux-yocto 3.0 kernel:</emphasis>
589 Removed with linux-yocto 3.8 kernel being added.
590 The linux-yocto 3.2 and linux-yocto 3.4 kernels remain
591 as part of the release.
592 </para></listitem>
593 <listitem><para><emphasis><filename>lsbsetup</filename>:</emphasis>
594 Removed with functionality now provided by
595 <filename>lsbtest</filename>.
596 </para></listitem>
597 <listitem><para><emphasis><filename>matchbox-stroke</filename>:</emphasis>
598 Removed because it was never more than a proof-of-concept.
599 </para></listitem>
600 <listitem><para><emphasis><filename>matchbox-wm-2 / matchbox-theme-sato-2</filename>:</emphasis>
601 Removed because they are not maintained.
602 However, <filename>matchbox-wm</filename> and
603 <filename>matchbox-theme-sato</filename> are still
604 provided.
605 </para></listitem>
606 <listitem><para><emphasis><filename>mesa-dri</filename>:</emphasis>
607 Renamed to <filename>mesa</filename>.
608 </para></listitem>
609 <listitem><para><emphasis><filename>mesa-xlib</filename>:</emphasis>
610 Removed because it was no longer useful.
611 </para></listitem>
612 <listitem><para><emphasis><filename>mutter</filename>:</emphasis>
613 Removed because nothing ever uses it and the recipe is
614 very old.
615 </para></listitem>
616 <listitem><para><emphasis><filename>orinoco-conf</filename>:</emphasis>
617 Removed because it has become obsolete.
618 </para></listitem>
619 <listitem><para><emphasis><filename>update-modules</filename>:</emphasis>
620 Removed because it is no longer used.
621 The kernel module <filename>postinstall</filename> and
622 <filename>postrm</filename> scripts can now do the same
623 task without the use of this script.
624 </para></listitem>
625 <listitem><para><emphasis><filename>web</filename>:</emphasis>
626 Removed because it is not maintained. Superseded by
627 <filename>web-webkit</filename>.
628 </para></listitem>
629 <listitem><para><emphasis><filename>xf86bigfontproto</filename>:</emphasis>
630 Removed because upstream it has been disabled by default
631 since 2007.
632 Nothing uses <filename>xf86bigfontproto</filename>.
633 </para></listitem>
634 <listitem><para><emphasis><filename>xf86rushproto</filename>:</emphasis>
635 Removed because its dependency in
636 <filename>xserver</filename> was spurious and it was
637 removed in 2005.
638 </para></listitem>
639 <listitem><para><emphasis><filename>zypper / libzypp / sat-solver</filename>:</emphasis>
640 Removed and been functionally replaced with Smart
641 (<filename>python-smartpm</filename>) when RPM packaging
642 is used and package management is enabled on the target.
643 </para></listitem>
644 </itemizedlist>
645 </para>
646 </section>
647</section>
648
649<section id='moving-to-the-yocto-project-1.5-release'>
650 <title>Moving to the Yocto Project 1.5 Release</title>
651
652 <para>
653 This section provides migration information for moving to the
654 Yocto Project 1.5 Release from the prior release.
655 </para>
656
657 <section id='migration-1.5-host-dependency-changes'>
658 <title>Host Dependency Changes</title>
659
660 <para>
661 The OpenEmbedded build system now has some additional requirements
662 on the host system:
663 <itemizedlist>
664 <listitem><para>Python 2.7.3+</para></listitem>
665 <listitem><para>Tar 1.24+</para></listitem>
666 <listitem><para>Git 1.7.8+</para></listitem>
667 <listitem><para>Patched version of Make if you are using
668 3.82.
669 Most distributions that provide Make 3.82 use the patched
670 version.</para></listitem>
671 </itemizedlist>
672 If the Linux distribution you are using on your build host
673 does not provide packages for these, you can install and use
674 the Buildtools tarball, which provides an SDK-like environment
675 containing them.
676 </para>
677
678 <para>
679 For more information on this requirement, see the
680 "<link linkend='required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</link>"
681 section.
682 </para>
683 </section>
684
685 <section id='migration-1.5-atom-pc-bsp'>
686 <title><filename>atom-pc</filename> Board Support Package (BSP)</title>
687
688 <para>
689 The <filename>atom-pc</filename> hardware reference BSP has been
690 replaced by a <filename>genericx86</filename> BSP.
691 This BSP is not necessarily guaranteed to work on all x86
692 hardware, but it will run on a wider range of systems than the
693 <filename>atom-pc</filename> did.
694 <note>
695 Additionally, a <filename>genericx86-64</filename> BSP has
696 been added for 64-bit Atom systems.
697 </note>
698 </para>
699 </section>
700
701 <section id='migration-1.5-bitbake'>
702 <title>BitBake</title>
703
704 <para>
705 The following changes have been made that relate to BitBake:
706 <itemizedlist>
707 <listitem><para>
708 BitBake now supports a <filename>_remove</filename>
709 operator.
710 The addition of this operator means you will have to
711 rename any items in recipe space (functions, variables)
712 whose names currently contain
713 <filename>_remove_</filename> or end with
714 <filename>_remove</filename> to avoid unexpected behavior.
715 </para></listitem>
716 <listitem><para>
717 BitBake's global method pool has been removed.
718 This method is not particularly useful and led to clashes
719 between recipes containing functions that had the
720 same name.</para></listitem>
721 <listitem><para>
722 The "none" server backend has been removed.
723 The "process" server backend has been serving well as the
724 default for a long time now.</para></listitem>
725 <listitem><para>
726 The <filename>bitbake-runtask</filename> script has been
727 removed.</para></listitem>
728 <listitem><para>
729 <filename>${</filename><link linkend='var-P'><filename>P</filename></link><filename>}</filename>
730 and
731 <filename>${</filename><link linkend='var-PF'><filename>PF</filename></link><filename>}</filename>
732 are no longer added to
733 <link linkend='var-PROVIDES'><filename>PROVIDES</filename></link>
734 by default in <filename>bitbake.conf</filename>.
735 These version-specific <filename>PROVIDES</filename>
736 items were seldom used.
737 Attempting to use them could result in two versions being
738 built simultaneously rather than just one version due to
739 the way BitBake resolves dependencies.</para></listitem>
740 </itemizedlist>
741 </para>
742 </section>
743
744 <section id='migration-1.5-qa-warnings'>
745 <title>QA Warnings</title>
746
747 <para>
748 The following changes have been made to the package QA checks:
749 <itemizedlist>
750 <listitem><para>
751 If you have customized
752 <link linkend='var-ERROR_QA'><filename>ERROR_QA</filename></link>
753 or <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link>
754 values in your configuration, check that they contain all of
755 the issues that you wish to be reported.
756 Previous Yocto Project versions contained a bug that meant
757 that any item not mentioned in <filename>ERROR_QA</filename>
758 or <filename>WARN_QA</filename> would be treated as a
759 warning.
760 Consequently, several important items were not already in
761 the default value of <filename>WARN_QA</filename>.
762 All of the possible QA checks are now documented in the
763 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
764 section.</para></listitem>
765 <listitem><para>
766 An additional QA check has been added to check if
767 <filename>/usr/share/info/dir</filename> is being installed.
768 Your recipe should delete this file within
769 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
770 if "make install" is installing it.
771 </para></listitem>
772 <listitem><para>
773 If you are using the buildhistory class, the check for the
774 package version going backwards is now controlled using a
775 standard QA check.
776 Thus, if you have customized your
777 <filename>ERROR_QA</filename> or
778 <filename>WARN_QA</filename> values and still wish to have
779 this check performed, you should add
780 "version-going-backwards" to your value for one or the
781 other variables depending on how you wish it to be handled.
782 See the documented QA checks in the
783 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
784 section.
785 </para></listitem>
786 </itemizedlist>
787 </para>
788 </section>
789
790 <section id='migration-1.5-directory-layout-changes'>
791 <title>Directory Layout Changes</title>
792
793 <para>
794 The following directory changes exist:
795 <itemizedlist>
796 <listitem><para>
797 Output SDK installer files are now named to include the
798 image name and tuning architecture through the
799 <link linkend='var-SDK_NAME'><filename>SDK_NAME</filename></link>
800 variable.</para></listitem>
801 <listitem><para>
802 Images and related files are now installed into a directory
803 that is specific to the machine, instead of a parent
804 directory containing output files for multiple machines.
805 The
806 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
807 variable continues to point to the directory containing
808 images for the current
809 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
810 and should be used anywhere there is a need to refer to
811 this directory.
812 The <filename>runqemu</filename> script now uses this
813 variable to find images and kernel binaries and will use
814 BitBake to determine the directory.
815 Alternatively, you can set the
816 <filename>DEPLOY_DIR_IMAGE</filename> variable in the
817 external environment.</para></listitem>
818 <listitem><para>
819 When buildhistory is enabled, its output is now written
820 under the
821 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
822 rather than
823 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>.
824 Doing so makes it easier to delete
825 <filename>TMPDIR</filename> and preserve the build history.
826 Additionally, data for produced SDKs is now split by
827 <link linkend='var-IMAGE_NAME'><filename>IMAGE_NAME</filename></link>.
828 </para></listitem>
829 <listitem><para>
830 The <filename>pkgdata</filename> directory produced as
831 part of the packaging process has been collapsed into a
832 single machine-specific directory.
833 This directory is located under
834 <filename>sysroots</filename> and uses a machine-specific
835 name (i.e.
836 <filename>tmp/sysroots/<replaceable>machine</replaceable>/pkgdata</filename>).
837 </para></listitem>
838 </itemizedlist>
839 </para>
840 </section>
841
842 <section id='migration-1.5-shortened-git-srcrev-values'>
843 <title>Shortened Git <filename>SRCREV</filename> Values</title>
844
845 <para>
846 BitBake will now shorten revisions from Git repositories from the
847 normal 40 characters down to 10 characters within
848 <link linkend='var-SRCPV'><filename>SRCPV</filename></link>
849 for improved usability in path and file names.
850 This change should be safe within contexts where these revisions
851 are used because the chances of spatially close collisions
852 is very low.
853 Distant collisions are not a major issue in the way
854 the values are used.
855 </para>
856 </section>
857
858 <section id='migration-1.5-image-features'>
859 <title><filename>IMAGE_FEATURES</filename></title>
860
861 <para>
862 The following changes have been made that relate to
863 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>:
864 <itemizedlist>
865 <listitem><para>
866 The value of
867 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
868 is now validated to ensure invalid feature items are not
869 added.
870 Some users mistakenly add package names to this variable
871 instead of using
872 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>
873 in order to have the package added to the image, which does
874 not work.
875 This change is intended to catch those kinds of situations.
876 Valid <filename>IMAGE_FEATURES</filename> are drawn from
877 <link linkend='var-PACKAGE_GROUP'><filename>PACKAGE_GROUP</filename></link>
878 definitions,
879 <link linkend='var-COMPLEMENTARY_GLOB'><filename>COMPLEMENTARY_GLOB</filename></link>
880 and a new "validitems" varflag on
881 <filename>IMAGE_FEATURES</filename>.
882 The "validitems" varflag change allows additional features
883 to be added if they are not provided using the previous
884 two mechanisms.
885 </para></listitem>
886 <listitem><para>
887 The previously deprecated "apps-console-core"
888 <filename>IMAGE_FEATURES</filename> item is no longer
889 supported.
890 Add "splash" to <filename>IMAGE_FEATURES</filename> if you
891 wish to have the splash screen enabled, since this is
892 all that apps-console-core was doing.</para></listitem>
893 </itemizedlist>
894 </para>
895 </section>
896
897 <section id='migration-1.5-run'>
898 <title><filename>/run</filename></title>
899
900 <para>
901 The <filename>/run</filename> directory from the Filesystem
902 Hierarchy Standard 3.0 has been introduced.
903 You can find some of the implications for this change
904 <ulink url='http://cgit.openembedded.org/openembedded-core/commit/?id=0e326280a15b0f2c4ef2ef4ec441f63f55b75873'>here</ulink>.
905 The change also means that recipes that install files to
906 <filename>/var/run</filename> must be changed.
907 You can find a guide on how to make these changes
908 <ulink url='http://permalink.gmane.org/gmane.comp.handhelds.openembedded/58530'>here</ulink>.
909 </para>
910 </section>
911
912 <section id='migration-1.5-removal-of-package-manager-database-within-image-recipes'>
913 <title>Removal of Package Manager Database Within Image Recipes</title>
914
915 <para>
916 The image <filename>core-image-minimal</filename> no longer adds
917 <filename>remove_packaging_data_files</filename> to
918 <link linkend='var-ROOTFS_POSTPROCESS_COMMAND'><filename>ROOTFS_POSTPROCESS_COMMAND</filename></link>.
919 This addition is now handled automatically when "package-management"
920 is not in
921 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
922 If you have custom image recipes that make this addition,
923 you should remove the lines, as they are not needed and might
924 interfere with correct operation of postinstall scripts.
925 </para>
926 </section>
927
928 <section id='migration-1.5-images-now-rebuild-only-on-changes-instead-of-every-time'>
929 <title>Images Now Rebuild Only on Changes Instead of Every Time</title>
930
931 <para>
932 The
933 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
934 and other related image
935 construction tasks are no longer marked as "nostamp".
936 Consequently, they will only be re-executed when their inputs have
937 changed.
938 Previous versions of the OpenEmbedded build system always rebuilt
939 the image when requested rather when necessary.
940 </para>
941 </section>
942
943 <section id='migration-1.5-task-recipes'>
944 <title>Task Recipes</title>
945
946 <para>
947 The previously deprecated <filename>task.bbclass</filename> has
948 now been dropped.
949 For recipes that previously inherited from this class, you should
950 rename them from <filename>task-*</filename> to
951 <filename>packagegroup-*</filename> and inherit packagegroup
952 instead.
953 </para>
954
955 <para>
956 For more information, see the
957 "<link linkend='ref-classes-packagegroup'><filename>packagegroup.bbclass</filename></link>"
958 section.
959 </para>
960 </section>
961
962 <section id='migration-1.5-busybox'>
963 <title>BusyBox</title>
964
965 <para>
966 By default, we now split BusyBox into two binaries:
967 one that is suid root for those components that need it, and
968 another for the rest of the components.
969 Splitting BusyBox allows for optimization that eliminates the
970 <filename>tinylogin</filename> recipe as recommended by upstream.
971 You can disable this split by setting
972 <link linkend='var-BUSYBOX_SPLIT_SUID'><filename>BUSYBOX_SPLIT_SUID</filename></link>
973 to "0".
974 </para>
975 </section>
976
977 <section id='migration-1.5-automated-image-testing'>
978 <title>Automated Image Testing</title>
979
980 <para>
981 A new automated image testing framework has been added
982 through the
983 <link linkend='ref-classes-testimage'><filename>testimage*.bbclass</filename></link>
984 class.
985 This framework replaces the older
986 <filename>imagetest-qemu</filename> framework.
987 </para>
988
989 <para>
990 You can learn more about performing automated image tests in the
991 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
992 section.
993 </para>
994 </section>
995
996 <section id='migration-1.5-build-history'>
997 <title>Build History</title>
998
999 <para>
1000 Following are changes to Build History:
1001 <itemizedlist>
1002 <listitem><para>
1003 Installed package sizes:
1004 <filename>installed-package-sizes.txt</filename> for an
1005 image now records the size of the files installed by each
1006 package instead of the size of each compressed package
1007 archive file.</para></listitem>
1008 <listitem><para>
1009 The dependency graphs (<filename>depends*.dot</filename>)
1010 now use the actual package names instead of replacing
1011 dashes, dots and plus signs with underscores.
1012 </para></listitem>
1013 <listitem><para>
1014 The <filename>buildhistory-diff</filename> and
1015 <filename>buildhistory-collect-srcrevs</filename>
1016 utilities have improved command-line handling.
1017 Use the <filename>&dash;&dash;help</filename> option for
1018 each utility for more information on the new syntax.
1019 </para></listitem>
1020 </itemizedlist>
1021 For more information on Build History, see the
1022 "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
1023 section.
1024 </para>
1025 </section>
1026
1027 <section id='migration-1.5-udev'>
1028 <title><filename>udev</filename></title>
1029
1030 <para>
1031 Following are changes to <filename>udev</filename>:
1032 <itemizedlist>
1033 <listitem><para>
1034 <filename>udev</filename> no longer brings in
1035 <filename>udev-extraconf</filename> automatically
1036 through
1037 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
1038 since this was originally intended to be optional.
1039 If you need the extra rules, then add
1040 <filename>udev-extraconf</filename> to your image.
1041 </para></listitem>
1042 <listitem><para>
1043 <filename>udev</filename> no longer brings in
1044 <filename>pciutils-ids</filename> or
1045 <filename>usbutils-ids</filename> through
1046 <filename>RRECOMMENDS</filename>.
1047 These are not needed by <filename>udev</filename> itself
1048 and removing them saves around 350KB.
1049 </para></listitem>
1050 </itemizedlist>
1051 </para>
1052 </section>
1053
1054 <section id='migration-1.5-removed-renamed-recipes'>
1055 <title>Removed and Renamed Recipes</title>
1056
1057 <itemizedlist>
1058 <listitem><para>
1059 The <filename>linux-yocto</filename> 3.2 kernel has been
1060 removed.</para></listitem>
1061 <listitem><para>
1062 <filename>libtool-nativesdk</filename> has been renamed to
1063 <filename>nativesdk-libtool</filename>.</para></listitem>
1064 <listitem><para>
1065 <filename>tinylogin</filename> has been removed.
1066 It has been replaced by a suid portion of Busybox.
1067 See the
1068 "<link linkend='migration-1.5-busybox'>BusyBox</link>" section
1069 for more information.</para></listitem>
1070 <listitem><para>
1071 <filename>external-python-tarball</filename> has been renamed
1072 to <filename>buildtools-tarball</filename>.
1073 </para></listitem>
1074 <listitem><para>
1075 <filename>web-webkit</filename> has been removed.
1076 It has been functionally replaced by
1077 <filename>midori</filename>.</para></listitem>
1078 <listitem><para>
1079 <filename>imake</filename> has been removed.
1080 It is no longer needed by any other recipe.
1081 </para></listitem>
1082 <listitem><para>
1083 <filename>transfig-native</filename> has been removed.
1084 It is no longer needed by any other recipe.
1085 </para></listitem>
1086 <listitem><para>
1087 <filename>anjuta-remote-run</filename> has been removed.
1088 Anjuta IDE integration has not been officially supported for
1089 several releases.</para></listitem>
1090 </itemizedlist>
1091 </section>
1092
1093 <section id='migration-1.5-other-changes'>
1094 <title>Other Changes</title>
1095
1096 <para>
1097 Following is a list of short entries describing other changes:
1098 <itemizedlist>
1099 <listitem><para>
1100 <filename>run-postinsts</filename>: Make this generic.
1101 </para></listitem>
1102 <listitem><para>
1103 <filename>base-files</filename>: Remove the unnecessary
1104 <filename>media/</filename><replaceable>xxx</replaceable> directories.
1105 </para></listitem>
1106 <listitem><para>
1107 <filename>alsa-state</filename>: Provide an empty
1108 <filename>asound.conf</filename> by default.
1109 </para></listitem>
1110 <listitem><para>
1111 <filename>classes/image</filename>: Ensure
1112 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
1113 supports pre-renamed package names.</para></listitem>
1114 <listitem><para>
1115 <filename>classes/rootfs_rpm</filename>: Implement
1116 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
1117 for RPM.</para></listitem>
1118 <listitem><para>
1119 <filename>systemd</filename>: Remove
1120 <filename>systemd_unitdir</filename> if
1121 <filename>systemd</filename> is not in
1122 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
1123 </para></listitem>
1124 <listitem><para>
1125 <filename>systemd</filename>: Remove
1126 <filename>init.d</filename> dir if
1127 <filename>systemd</filename> unit file is present and
1128 <filename>sysvinit</filename> is not a distro feature.
1129 </para></listitem>
1130 <listitem><para>
1131 <filename>libpam</filename>: Deny all services for the
1132 <filename>OTHER</filename> entries.
1133 </para></listitem>
1134 <listitem><para>
1135 <filename>image.bbclass</filename>: Move
1136 <filename>runtime_mapping_rename</filename> to avoid
1137 conflict with <filename>multilib</filename>.
1138 See
1139 <ulink url='https://bugzilla.yoctoproject.org/show_bug.cgi?id=4993'><filename>YOCTO #4993</filename></ulink>
1140 in Bugzilla for more information.
1141 </para></listitem>
1142 <listitem><para>
1143 <filename>linux-dtb</filename>: Use kernel build system
1144 to generate the <filename>dtb</filename> files.
1145 </para></listitem>
1146 <listitem><para>
1147 <filename>kern-tools</filename>: Switch from guilt to
1148 new <filename>kgit-s2q</filename> tool.
1149 </para></listitem>
1150 </itemizedlist>
1151 </para>
1152 </section>
1153</section>
1154
1155<section id='moving-to-the-yocto-project-1.6-release'>
1156 <title>Moving to the Yocto Project 1.6 Release</title>
1157
1158 <para>
1159 This section provides migration information for moving to the
1160 Yocto Project 1.6 Release from the prior release.
1161 </para>
1162
1163
1164 <section id='migration-1.6-archiver-class'>
1165 <title><filename>archiver</filename> Class</title>
1166
1167 <para>
1168 The
1169 <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
1170 class has been rewritten and its configuration has been simplified.
1171 For more details on the source archiver, see the
1172 "<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>"
1173 section in the Yocto Project Development Manual.
1174 </para>
1175 </section>
1176
1177 <section id='migration-1.6-packaging-changes'>
1178 <title>Packaging Changes</title>
1179
1180 <para>
1181 The following packaging changes have been made:
1182 <itemizedlist>
1183 <listitem><para>
1184 The <filename>binutils</filename> recipe no longer produces
1185 a <filename>binutils-symlinks</filename> package.
1186 <filename>update-alternatives</filename> is now used to
1187 handle the preferred <filename>binutils</filename>
1188 variant on the target instead.
1189 </para></listitem>
1190 <listitem><para>
1191 The tc (traffic control) utilities have been split out of
1192 the main <filename>iproute2</filename> package and put
1193 into the <filename>iproute2-tc</filename> package.
1194 </para></listitem>
1195 <listitem><para>
1196 The <filename>gtk-engines</filename> schemas have been
1197 moved to a dedicated
1198 <filename>gtk-engines-schemas</filename> package.
1199 </para></listitem>
1200 <listitem><para>
1201 The <filename>armv7a</filename> with thumb package
1202 architecture suffix has changed.
1203 The suffix for these packages with the thumb
1204 optimization enabled is "t2" as it should be.
1205 Use of this suffix was not the case in the 1.5 release.
1206 Architecture names will change within package feeds as a
1207 result.
1208 </para></listitem>
1209 </itemizedlist>
1210 </para>
1211 </section>
1212
1213 <section id='migration-1.6-bitbake'>
1214 <title>BitBake</title>
1215
1216 <para>
1217 The following changes have been made to
1218 <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
1219 </para>
1220
1221 <section id='migration-1.6-matching-branch-requirement-for-git-fetching'>
1222 <title>Matching Branch Requirement for Git Fetching</title>
1223
1224 <para>
1225 When fetching source from a Git repository using
1226 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>,
1227 BitBake will now validate the
1228 <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
1229 value against the branch.
1230 You can specify the branch using the following form:
1231 <literallayout class='monospaced'>
1232 SRC_URI = "git://server.name/repository;branch=<replaceable>branchname</replaceable>"
1233 </literallayout>
1234 If you do not specify a branch, BitBake looks
1235 in the default "master" branch.
1236 </para>
1237
1238 <para>
1239 Alternatively, if you need to bypass this check (e.g.
1240 if you are fetching a revision corresponding to a tag that
1241 is not on any branch), you can add ";nobranch=1" to
1242 the end of the URL within <filename>SRC_URI</filename>.
1243 </para>
1244 </section>
1245
1246 <section id='migration-1.6-bitbake-deps'>
1247 <title>Python Definition substitutions</title>
1248
1249 <para>
1250 BitBake had some previously deprecated Python definitions
1251 within its <filename>bb</filename> module removed.
1252 You should use their sub-module counterparts instead:
1253 <itemizedlist>
1254 <listitem><para><filename>bb.MalformedUrl</filename>:
1255 Use <filename>bb.fetch.MalformedUrl</filename>.
1256 </para></listitem>
1257 <listitem><para><filename>bb.fetch.encodeurl</filename>:
1258 Use <filename>bb.fetch.encodeurl</filename>.
1259 </para></listitem>
1260 <listitem><para><filename>bb.decodeurl</filename>:
1261 Use <filename>bb.fetch.decodeurl</filename>
1262 </para></listitem>
1263 <listitem><para><filename>bb.mkdirhier</filename>:
1264 Use <filename>bb.utils.mkdirhier</filename>.
1265 </para></listitem>
1266 <listitem><para><filename>bb.movefile</filename>:
1267 Use <filename>bb.utils.movefile</filename>.
1268 </para></listitem>
1269 <listitem><para><filename>bb.copyfile</filename>:
1270 Use <filename>bb.utils.copyfile</filename>.
1271 </para></listitem>
1272 <listitem><para><filename>bb.which</filename>:
1273 Use <filename>bb.utils.which</filename>.
1274 </para></listitem>
1275 <listitem><para><filename>bb.vercmp_string</filename>:
1276 Use <filename>bb.utils.vercmp_string</filename>.
1277 </para></listitem>
1278 <listitem><para><filename>bb.vercmp</filename>:
1279 Use <filename>bb.utils.vercmp</filename>.
1280 </para></listitem>
1281 </itemizedlist>
1282 </para>
1283 </section>
1284
1285 <section id='migration-1.6-bitbake-fetcher'>
1286 <title>SVK Fetcher</title>
1287
1288 <para>
1289 The SVK fetcher has been removed from BitBake.
1290 </para>
1291 </section>
1292
1293 <section id='migration-1.6-bitbake-console-output'>
1294 <title>Console Output Error Redirection</title>
1295
1296 <para>
1297 The BitBake console UI will now output errors to
1298 <filename>stderr</filename> instead of
1299 <filename>stdout</filename>.
1300 Consequently, if you are piping or redirecting the output of
1301 <filename>bitbake</filename> to somewhere else, and you wish
1302 to retain the errors, you will need to add
1303 <filename>2>&amp;1</filename> (or something similar) to the
1304 end of your <filename>bitbake</filename> command line.
1305 </para>
1306 </section>
1307
1308 <section id='migration-1.6-task-taskname-overrides'>
1309 <title><filename>task-</filename><replaceable>taskname</replaceable> Overrides</title>
1310
1311 <para>
1312 <filename>task-</filename><replaceable>taskname</replaceable> overrides have been
1313 adjusted so that tasks whose names contain underscores have the
1314 underscores replaced by hyphens for the override so that they
1315 now function properly.
1316 For example, the task override for
1317 <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
1318 is <filename>task-populate-sdk</filename>.
1319 </para>
1320 </section>
1321 </section>
1322
1323 <section id='migration-1.6-variable-changes'>
1324 <title>Changes to Variables</title>
1325
1326 <para>
1327 The following variables have changed.
1328 For information on the OpenEmbedded build system variables, see the
1329 "<link linkend='ref-variables-glos'>Variables Glossary</link>" Chapter.
1330 </para>
1331
1332 <section id='migration-1.6-variable-changes-TMPDIR'>
1333 <title><filename>TMPDIR</filename></title>
1334
1335 <para>
1336 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
1337 can no longer be on an NFS mount.
1338 NFS does not offer full POSIX locking and inode consistency
1339 and can cause unexpected issues if used to store
1340 <filename>TMPDIR</filename>.
1341 </para>
1342
1343 <para>
1344 The check for this occurs on startup.
1345 If <filename>TMPDIR</filename> is detected on an NFS mount,
1346 an error occurs.
1347 </para>
1348 </section>
1349
1350 <section id='migration-1.6-variable-changes-PRINC'>
1351 <title><filename>PRINC</filename></title>
1352
1353 <para>
1354 The
1355 <link linkend='var-PRINC'><filename>PRINC</filename></link>
1356 variable has been deprecated and triggers a warning if
1357 detected during a build.
1358 For
1359 <link linkend='var-PR'><filename>PR</filename></link>
1360 increments on changes, use the PR service instead.
1361 You can find out more about this service in the
1362 "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>Working With a PR Service</ulink>"
1363 section in the Yocto Project Development Manual.
1364 </para>
1365 </section>
1366
1367 <section id='migration-1.6-variable-changes-IMAGE_TYPES'>
1368 <title><filename>IMAGE_TYPES</filename></title>
1369
1370 <para>
1371 The "sum.jffs2" option for
1372 <link linkend='var-IMAGE_TYPES'><filename>IMAGE_TYPES</filename></link>
1373 has been replaced by the "jffs2.sum" option, which fits the
1374 processing order.
1375 </para>
1376 </section>
1377
1378 <section id='migration-1.6-variable-changes-COPY_LIC_MANIFEST'>
1379 <title><filename>COPY_LIC_MANIFEST</filename></title>
1380
1381 <para>
1382 The
1383 <link linkend='var-COPY_LIC_MANIFEST'><filename>COPY_LIC_MANIFEST</filename></link>
1384 variable must
1385 now be set to "1" rather than any value in order to enable
1386 it.
1387 </para>
1388 </section>
1389
1390 <section id='migration-1.6-variable-changes-COPY_LIC_DIRS'>
1391 <title><filename>COPY_LIC_DIRS</filename></title>
1392
1393 <para>
1394 The
1395 <link linkend='var-COPY_LIC_DIRS'><filename>COPY_LIC_DIRS</filename></link>
1396 variable must
1397 now be set to "1" rather than any value in order to enable
1398 it.
1399 </para>
1400 </section>
1401
1402 <section id='migration-1.6-variable-changes-PACKAGE_GROUP'>
1403 <title><filename>PACKAGE_GROUP</filename></title>
1404
1405 <para>
1406 The
1407 <link linkend='var-PACKAGE_GROUP'><filename>PACKAGE_GROUP</filename></link>
1408 variable has been renamed to
1409 <link linkend='var-FEATURE_PACKAGES'><filename>FEATURE_PACKAGES</filename></link>
1410 to more accurately reflect its purpose.
1411 You can still use <filename>PACKAGE_GROUP</filename> but
1412 the OpenEmbedded build system produces a warning message when
1413 it encounters the variable.
1414 </para>
1415 </section>
1416 </section>
1417
1418 <section id='migration-1.6-directory-layout-changes'>
1419 <title>Directory Layout Changes</title>
1420
1421 <para>
1422 The <filename>meta-hob</filename> layer has been removed from
1423 the top-level of the
1424 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1425 The contents of this layer are no longer needed by the Hob
1426 user interface for building images and toolchains.
1427 </para>
1428 </section>
1429
1430 <section id='migration-1.6-package-test-ptest'>
1431 <title>Package Test (ptest)</title>
1432
1433 <para>
1434 Package Tests (ptest) are built but not installed by default.
1435 For information on using Package Tests, see the
1436 "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Setting up and running package test (ptest)</ulink>"
1437 section in the Yocto Project Development Manual.
1438 For information on the <filename>ptest</filename> class, see the
1439 "<link linkend='ref-classes-ptest'><filename>ptest.bbclass</filename></link>"
1440 section.
1441 </para>
1442 </section>
1443
1444 <section id='migration-1.6-build-changes'>
1445 <title>Build Changes</title>
1446
1447 <para>
1448 Separate build and source directories have been enabled
1449 by default for selected recipes where it is known to work
1450 (a whitelist) and for all recipes that inherit the
1451 <link linkend='ref-classes-cmake'><filename>cmake</filename></link>
1452 class.
1453 In future releases the
1454 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
1455 class will enable a separate build directory by default as
1456 well.
1457 Recipes building Autotools-based
1458 software that fails to build with a separate build directory
1459 should be changed to inherit from the
1460 <link linkend='ref-classes-autotools-brokensep'><filename>autotools-brokensep</filename></link>
1461 class instead of the <filename>autotools</filename> class.
1462 </para>
1463 </section>
1464
1465 <section id='migration-1.6-building-qemu-native'>
1466 <title><filename>qemu-native</filename></title>
1467
1468 <para>
1469 <filename>qemu-native</filename> now builds without
1470 SDL-based graphical output support by default.
1471 The following additional lines are needed in your
1472 <filename>local.conf</filename> to enable it:
1473 <literallayout class='monospaced'>
1474 PACKAGECONFIG_pn-qemu-native = "sdl"
1475 ASSUME_PROVIDED += "libsdl-native"
1476 </literallayout>
1477 <note>
1478 The default <filename>local.conf</filename>
1479 contains these statements.
1480 Consequently, if you are building a headless system and using
1481 a default <filename>local.conf</filename> file, you will need
1482 comment these two lines out.
1483 </note>
1484 </para>
1485 </section>
1486
1487 <section id='migration-1.6-core-image-basic'>
1488 <title><filename>core-image-basic</filename></title>
1489
1490 <para>
1491 <filename>core-image-basic</filename> has been renamed to
1492 <filename>core-image-full-cmdline</filename>.
1493 </para>
1494
1495 <para>
1496 In addition to <filename>core-image-basic</filename> being renamed,
1497 <filename>packagegroup-core-basic</filename> has been renamed to
1498 <filename>packagegroup-core-full-cmdline</filename> to match.
1499 </para>
1500 </section>
1501
1502 <section id='migration-1.6-licensing'>
1503 <title>Licensing</title>
1504
1505 <para>
1506 The top-level <filename>LICENSE</filename> file has been changed
1507 to better describe the license of the various components of
1508 OE-Core.
1509 However, the licensing itself remains unchanged.
1510 </para>
1511
1512 <para>
1513 Normally, this change would not cause any side-effects.
1514 However, some recipes point to this file within
1515 <link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>
1516 (as <filename>${COREBASE}/LICENSE</filename>) and thus the
1517 accompanying checksum must be changed from
1518 3f40d7994397109285ec7b81fdeb3b58 to
1519 4d92cd373abda3937c2bc47fbc49d690.
1520 A better alternative is to have
1521 <filename>LIC_FILES_CHKSUM</filename> point to a file
1522 describing the license that is distributed with the source
1523 that the recipe is building, if possible, rather than pointing
1524 to <filename>${COREBASE}/LICENSE</filename>.
1525 </para>
1526 </section>
1527
1528 <section id='migration-1.6-cflags-options'>
1529 <title><filename>CFLAGS</filename> Options</title>
1530
1531 <para>
1532 The "-fpermissive" option has been removed from the default
1533 <link linkend='var-CFLAGS'><filename>CFLAGS</filename></link>
1534 value.
1535 You need to take action on individual recipes that fail when
1536 building with this option.
1537 You need to either patch the recipes to fix the issues reported by
1538 the compiler, or you need to add "-fpermissive" to
1539 <filename>CFLAGS</filename> in the recipes.
1540 </para>
1541 </section>
1542
1543 <section id='migration-1.6-custom-images'>
1544 <title>Custom Image Output Types</title>
1545
1546 <para>
1547 Custom image output types, as selected using
1548 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>,
1549 must declare their dependencies on other image types (if any) using
1550 a new
1551 <link linkend='var-IMAGE_TYPEDEP'><filename>IMAGE_TYPEDEP</filename></link>
1552 variable.
1553 </para>
1554 </section>
1555
1556 <section id='migration-1.6-do-package-write-task'>
1557 <title>Tasks</title>
1558
1559 <para>
1560 The <filename>do_package_write</filename> task has been removed.
1561 The task is no longer needed.
1562 </para>
1563 </section>
1564
1565 <section id='migration-1.6-update-alternatives-provider'>
1566 <title><filename>update-alternative</filename> Provider</title>
1567
1568 <para>
1569 The default <filename>update-alternatives</filename> provider has
1570 been changed from <filename>opkg</filename> to
1571 <filename>opkg-utils</filename>.
1572 This change resolves some troublesome circular dependencies.
1573 The runtime package has also been renamed from
1574 <filename>update-alternatives-cworth</filename>
1575 to <filename>update-alternatives-opkg</filename>.
1576 </para>
1577 </section>
1578
1579 <section id='migration-1.6-virtclass-overrides'>
1580 <title><filename>virtclass</filename> Overrides</title>
1581
1582 <para>
1583 The <filename>virtclass</filename> overrides are now deprecated.
1584 Use the equivalent class overrides instead (e.g.
1585 <filename>virtclass-native</filename> becomes
1586 <filename>class-native</filename>.)
1587 </para>
1588 </section>
1589
1590 <section id='migration-1.6-removed-renamed-recipes'>
1591 <title>Removed and Renamed Recipes</title>
1592
1593 <para>
1594 The following recipes have been removed:
1595 <itemizedlist>
1596 <listitem><para><filename>packagegroup-toolset-native</filename> -
1597 This recipe is largely unused.
1598 </para></listitem>
1599 <listitem><para><filename>linux-yocto-3.8</filename> -
1600 Support for the Linux yocto 3.8 kernel has been dropped.
1601 Support for the 3.10 and 3.14 kernels have been added
1602 with the <filename>linux-yocto-3.10</filename> and
1603 <filename>linux-yocto-3.14</filename> recipes.
1604 </para></listitem>
1605 <listitem><para><filename>ocf-linux</filename> -
1606 This recipe has been functionally replaced using
1607 <filename>cryptodev-linux</filename>.
1608 </para></listitem>
1609 <listitem><para><filename>genext2fs</filename> -
1610 <filename>genext2fs</filename> is no longer used by the
1611 build system and is unmaintained upstream.
1612 </para></listitem>
1613 <listitem><para><filename>js</filename> -
1614 This provided an ancient version of Mozilla's javascript
1615 engine that is no longer needed.
1616 </para></listitem>
1617 <listitem><para><filename>zaurusd</filename> -
1618 The recipe has been moved to the
1619 <filename>meta-handheld</filename> layer.
1620 </para></listitem>
1621 <listitem><para><filename>eglibc 2.17</filename> -
1622 Replaced by the <filename>eglibc 2.19</filename>
1623 recipe.
1624 </para></listitem>
1625 <listitem><para><filename>gcc 4.7.2</filename> -
1626 Replaced by the now stable
1627 <filename>gcc 4.8.2</filename>.
1628 </para></listitem>
1629 <listitem><para><filename>external-sourcery-toolchain</filename> -
1630 this recipe is now maintained in the
1631 <filename>meta-sourcery</filename> layer.
1632 </para></listitem>
1633 <listitem><para><filename>linux-libc-headers-yocto 3.4+git</filename> -
1634 Now using version 3.10 of the
1635 <filename>linux-libc-headers</filename> by default.
1636 </para></listitem>
1637 <listitem><para><filename>meta-toolchain-gmae</filename> -
1638 This recipe is obsolete.
1639 </para></listitem>
1640 <listitem><para><filename>packagegroup-core-sdk-gmae</filename> -
1641 This recipe is obsolete.
1642 </para></listitem>
1643 <listitem><para><filename>packagegroup-core-standalone-gmae-sdk-target</filename> -
1644 This recipe is obsolete.
1645 </para></listitem>
1646 </itemizedlist>
1647 </para>
1648 </section>
1649
1650 <section id='migration-1.6-removed-classes'>
1651 <title>Removed Classes</title>
1652
1653 <para>
1654 The following classes have become obsolete and have been removed:
1655 <itemizedlist>
1656 <listitem><para><filename>module_strip</filename>
1657 </para></listitem>
1658 <listitem><para><filename>pkg_metainfo</filename>
1659 </para></listitem>
1660 <listitem><para><filename>pkg_distribute</filename>
1661 </para></listitem>
1662 <listitem><para><filename>image-empty</filename>
1663 </para></listitem>
1664 </itemizedlist>
1665 </para>
1666 </section>
1667
1668 <section id='migration-1.6-reference-bsps'>
1669 <title>Reference Board Support Packages (BSPs)</title>
1670
1671 <para>
1672 The following reference BSPs changes occurred:
1673 <itemizedlist>
1674 <listitem><para>The BeagleBoard
1675 (<filename>beagleboard</filename>) ARM reference hardware
1676 has been replaced by the BeagleBone
1677 (<filename>beaglebone</filename>) hardware.
1678 </para></listitem>
1679 <listitem><para>The RouterStation Pro
1680 (<filename>routerstationpro</filename>) MIPS reference
1681 hardware has been replaced by the EdgeRouter Lite
1682 (<filename>edgerouter</filename>) hardware.
1683 </para></listitem>
1684 </itemizedlist>
1685 The previous reference BSPs for the
1686 <filename>beagleboard</filename> and
1687 <filename>routerstationpro</filename> machines are still available
1688 in a new <filename>meta-yocto-bsp-old</filename> layer in the
1689 <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>
1690 at
1691 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/meta-yocto-bsp-old/'>http://git.yoctoproject.org/cgit/cgit.cgi/meta-yocto-bsp-old/</ulink>.
1692 </para>
1693 </section>
1694</section>
1695
1696<section id='moving-to-the-yocto-project-1.7-release'>
1697 <title>Moving to the Yocto Project 1.7 Release</title>
1698
1699 <para>
1700 This section provides migration information for moving to the
1701 Yocto Project 1.7 Release from the prior release.
1702 </para>
1703
1704 <section id='migration-1.7-changes-to-setting-qemu-packageconfig-options'>
1705 <title>Changes to Setting QEMU <filename>PACKAGECONFIG</filename> Options in <filename>local.conf</filename></title>
1706
1707 <para>
1708 The QEMU recipe now uses a number of
1709 <link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
1710 options to enable various optional features.
1711 The method used to set defaults for these options means that
1712 existing
1713 <filename>local.conf</filename> files will need to be be
1714 modified to append to <filename>PACKAGECONFIG</filename> for
1715 <filename>qemu-native</filename> and
1716 <filename>nativesdk-qemu</filename> instead of setting it.
1717 In other words, to enable graphical output for QEMU, you should
1718 now have these lines in <filename>local.conf</filename>:
1719 <literallayout class='monospaced'>
1720 PACKAGECONFIG_append_pn-qemu-native = " sdl"
1721 PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
1722 </literallayout>
1723 </para>
1724 </section>
1725
1726 <section id='migration-1.7-minimum-git-version'>
1727 <title>Minimum Git version</title>
1728
1729 <para>
1730 The minimum
1731 <ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink> version required
1732 on the build host is now 1.7.8 because the
1733 <filename>&dash;&dash;list</filename> option is now required by
1734 BitBake's Git fetcher.
1735 As always, if your host distribution does not provide a version of
1736 Git that meets this requirement, you can use the
1737 <filename>buildtools-tarball</filename> that does.
1738 See the
1739 "<link linkend='required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</link>"
1740 section for more information.
1741 </para>
1742 </section>
1743
1744 <section id='migration-1.7-autotools-class-changes'>
1745 <title>Autotools Class Changes</title>
1746
1747 <para>
1748 The following
1749 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
1750 class changes occurred:
1751 <itemizedlist>
1752 <listitem><para><emphasis>
1753 A separate build directory is now used by default:</emphasis>
1754 The <filename>autotools</filename> class has been changed
1755 to use a directory for building
1756 (<link linkend='var-B'><filename>B</filename></link>),
1757 which is separate from the source directory
1758 (<link linkend='var-S'><filename>S</filename></link>).
1759 This is commonly referred to as
1760 <filename>B != S</filename>, or an out-of-tree build.</para>
1761 <para>If the software being built is already capable of
1762 building in a directory separate from the source, you
1763 do not need to do anything.
1764 However, if the software is not capable of being built
1765 in this manner, you will
1766 need to either patch the software so that it can build
1767 separately, or you will need to change the recipe to
1768 inherit the
1769 <link linkend='ref-classes-autotools-brokensep'><filename>autotools-brokensep</filename></link>
1770 class instead of the <filename>autotools</filename> class.
1771 </para></listitem>
1772 <listitem><para><emphasis>
1773 The <filename>&dash;&dash;foreign</filename> option is
1774 no longer passed to <filename>automake</filename> when
1775 running <filename>autoconf</filename>:</emphasis>
1776 This option tells <filename>automake</filename> that a
1777 particular software package does not follow the GNU
1778 standards and therefore should not be expected
1779 to distribute certain files such as
1780 <filename>ChangeLog</filename>,
1781 <filename>AUTHORS</filename>, and so forth.
1782 Because the majority of upstream software packages already
1783 tell <filename>automake</filename> to enable foreign mode
1784 themselves, the option is mostly superfluous.
1785 However, some recipes will need patches for this change.
1786 You can easily make the change by patching
1787 <filename>configure.ac</filename> so that it passes
1788 "foreign" to <filename>AM_INIT_AUTOMAKE()</filename>.
1789 See
1790 <ulink url='http://cgit.openembedded.org/openembedded-core/commit/?id=01943188f85ce6411717fb5bf702d609f55813f2'>this commit</ulink>
1791 for an example showing how to make the patch.
1792 </para></listitem>
1793 </itemizedlist>
1794 </para>
1795 </section>
1796
1797 <section id='migration-1.7-binary-configuration-scripts-disabled'>
1798 <title>Binary Configuration Scripts Disabled</title>
1799
1800 <para>
1801 Some of the core recipes that package binary configuration scripts
1802 now disable the scripts due to the
1803 scripts previously requiring error-prone path substitution.
1804 Software that links against these libraries using these scripts
1805 should use the much more robust <filename>pkg-config</filename>
1806 instead.
1807 The list of recipes changed in this version (and their
1808 configuration scripts) is as follows:
1809 <literallayout class='monospaced'>
1810 directfb (directfb-config)
1811 freetype (freetype-config)
1812 gpgme (gpgme-config)
1813 libassuan (libassuan-config)
1814 libcroco (croco-6.0-config)
1815 libgcrypt (libgcrypt-config)
1816 libgpg-error (gpg-error-config)
1817 libksba (ksba-config)
1818 libpcap (pcap-config)
1819 libpcre (pcre-config)
1820 libpng (libpng-config, libpng16-config)
1821 libsdl (sdl-config)
1822 libusb-compat (libusb-config)
1823 libxml2 (xml2-config)
1824 libxslt (xslt-config)
1825 ncurses (ncurses-config)
1826 neon (neon-config)
1827 npth (npth-config)
1828 pth (pth-config)
1829 taglib (taglib-config)
1830 </literallayout>
1831 Additionally, support for <filename>pkg-config</filename> has been
1832 added to some recipes in the previous list in the rare cases
1833 where the upstream software package does not already provide
1834 it.
1835 </para>
1836 </section>
1837
1838 <section id='migration-1.7-glibc-replaces-eglibc'>
1839 <title><filename>eglibc 2.19</filename> Replaced with <filename>glibc 2.20</filename></title>
1840
1841 <para>
1842 Because <filename>eglibc</filename> and
1843 <filename>glibc</filename> were already fairly close, this
1844 replacement should not require any significant changes to other
1845 software that links to <filename>eglibc</filename>.
1846 However, there were a number of minor changes in
1847 <filename>glibc 2.20</filename> upstream that could require
1848 patching some software (e.g. the removal of the
1849 <filename>_BSD_SOURCE</filename> feature test macro).
1850 </para>
1851
1852 <para>
1853 <filename>glibc 2.20</filename> requires version 2.6.32 or greater
1854 of the Linux kernel.
1855 Thus, older kernels will no longer be usable in conjunction with it.
1856 </para>
1857
1858 <para>
1859 For full details on the changes in <filename>glibc 2.20</filename>,
1860 see the upstream release notes
1861 <ulink url='https://sourceware.org/ml/libc-alpha/2014-09/msg00088.html'>here</ulink>.
1862 </para>
1863 </section>
1864
1865 <section id='migration-1.7-kernel-module-autoloading'>
1866 <title>Kernel Module Autoloading</title>
1867
1868 <para>
1869 The
1870 <link linkend='var-module_autoload'><filename>module_autoload_*</filename></link>
1871 variable is now deprecated and a new
1872 <link linkend='var-KERNEL_MODULE_AUTOLOAD'><filename>KERNEL_MODULE_AUTOLOAD</filename></link>
1873 variable should be used instead.
1874 Also,
1875 <link linkend='var-module_conf'><filename>module_conf_*</filename></link>
1876 must now be used in conjunction with a new
1877 <link linkend='var-KERNEL_MODULE_PROBECONF'><filename>KERNEL_MODULE_PROBECONF</filename></link>
1878 variable.
1879 The new variables no longer require you to specify the module name
1880 as part of the variable name.
1881 This change not only simplifies usage but also allows the values
1882 of these variables to be appropriately incorporated into task
1883 signatures and thus trigger the appropriate tasks to re-execute
1884 when changed.
1885 You should replace any references to
1886 <filename>module_autoload_*</filename> with
1887 <filename>KERNEL_MODULE_AUTOLOAD</filename>, and add any modules
1888 for which <filename>module_conf_*</filename> is specified to
1889 <filename>KERNEL_MODULE_PROBECONF</filename>.
1890 </para>
1891
1892 <para>
1893 For more information, see the
1894 <link linkend='var-KERNEL_MODULE_AUTOLOAD'><filename>KERNEL_MODULE_AUTOLOAD</filename></link>
1895 and
1896 <link linkend='var-KERNEL_MODULE_PROBECONF'><filename>KERNEL_MODULE_PROBECONF</filename></link>
1897 variables.
1898 </para>
1899 </section>
1900
1901 <section id='migration-1.7-qa-check-changes'>
1902 <title>QA Check Changes</title>
1903
1904 <para>
1905 The following changes have occurred to the QA check process:
1906 <itemizedlist>
1907 <listitem><para>
1908 Additional QA checks <filename>file-rdeps</filename>
1909 and <filename>build-deps</filename> have been added in
1910 order to verify that file dependencies are satisfied
1911 (e.g. package contains a script requiring
1912 <filename>/bin/bash</filename>) and build-time dependencies
1913 are declared, respectively.
1914 For more information, please see the
1915 "<link linkend='ref-qa-checks'>QA Error and Warning Messages</link>"
1916 chapter.
1917 </para></listitem>
1918 <listitem><para>
1919 Package QA checks are now performed during a new
1920 <link linkend='ref-tasks-package_qa'><filename>do_package_qa</filename></link>
1921 task rather than being part of the
1922 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
1923 task.
1924 This allows more parallel execution.
1925 This change is unlikely to be an issue except for highly
1926 customized recipes that disable packaging tasks themselves
1927 by marking them as <filename>noexec</filename>.
1928 For those packages, you will need to disable the
1929 <filename>do_package_qa</filename> task as well.
1930 </para></listitem>
1931 <listitem><para>
1932 Files being overwritten during the
1933 <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
1934 task now trigger an error instead of a warning.
1935 Recipes should not be overwriting files written to the
1936 sysroot by other recipes.
1937 If you have these types of recipes, you need to alter them
1938 so that they do not overwrite these files.</para>
1939 <para>You might now receive this error after changes in
1940 configuration or metadata resulting in orphaned files
1941 being left in the sysroot.
1942 If you do receive this error, the way to resolve the issue
1943 is to delete your
1944 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
1945 or to move it out of the way and then re-start the build.
1946 Anything that has been fully built up to that point and
1947 does not need rebuilding will be restored from the shared
1948 state cache and the rest of the build will be able to
1949 proceed as normal.
1950 </para></listitem>
1951 </itemizedlist>
1952 </para>
1953 </section>
1954
1955 <section id='migration-1.7-removed-recipes'>
1956 <title>Removed Recipes</title>
1957
1958 <para>
1959 The following recipes have been removed:
1960 <itemizedlist>
1961 <listitem><para>
1962 <filename>x-load</filename>:
1963 This recipe has been superseded by
1964 U-boot SPL for all Cortex-based TI SoCs.
1965 For legacy boards, the <filename>meta-ti</filename>
1966 layer, which contains a maintained recipe, should be used
1967 instead.
1968 </para></listitem>
1969 <listitem><para>
1970 <filename>ubootchart</filename>:
1971 This recipe is obsolete.
1972 A <filename>bootchart2</filename> recipe has been added
1973 to functionally replace it.
1974 </para></listitem>
1975 <listitem><para>
1976 <filename>linux-yocto 3.4</filename>:
1977 Support for the linux-yocto 3.4 kernel has been dropped.
1978 Support for the 3.10 and 3.14 kernels remains, while
1979 support for version 3.17 has been added.
1980 </para></listitem>
1981 <listitem><para>
1982 <filename>eglibc</filename> has been removed in favor of
1983 <filename>glibc</filename>.
1984 See the
1985 "<link linkend='migration-1.7-glibc-replaces-eglibc'><filename>eglibc 2.19</filename> Replaced with <filename>glibc 2.20</filename></link>"
1986 section for more information.
1987 </para></listitem>
1988 </itemizedlist>
1989 </para>
1990 </section>
1991
1992 <section id='migration-1.7-miscellaneous-changes'>
1993 <title>Miscellaneous Changes</title>
1994
1995 <para>
1996 The following miscellaneous change occurred:
1997 <itemizedlist>
1998 <listitem><para>
1999 The build history feature now writes
2000 <filename>build-id.txt</filename> instead of
2001 <filename>build-id</filename>.
2002 Additionally, <filename>build-id.txt</filename>
2003 now contains the full build header as printed by
2004 BitBake upon starting the build.
2005 You should manually remove old "build-id" files from your
2006 existing build history repositories to avoid confusion.
2007 For information on the build history feature, see the
2008 "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
2009 section.
2010 </para></listitem>
2011 </itemizedlist>
2012 </para>
2013 </section>
2014</section>
2015
2016</chapter>
2017<!--
2018vim: expandtab tw=80 ts=4
2019-->
diff --git a/documentation/ref-manual/ref-bitbake.xml b/documentation/ref-manual/ref-bitbake.xml
new file mode 100644
index 0000000000..30aff6431f
--- /dev/null
+++ b/documentation/ref-manual/ref-bitbake.xml
@@ -0,0 +1,472 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='ref-bitbake'>
6
7 <title>BitBake</title>
8
9 <para>
10 BitBake is a program written in Python that interprets the
11 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> used by
12 the OpenEmbedded build system.
13 At some point, developers wonder what actually happens when you enter:
14 <literallayout class='monospaced'>
15 $ bitbake core-image-sato
16 </literallayout>
17 </para>
18
19 <para>
20 This chapter provides an overview of what happens behind the scenes from BitBake's perspective.
21 </para>
22
23 <note>
24 BitBake strives to be a generic "task" executor that is capable of handling complex dependency relationships.
25 As such, it has no real knowledge of what the tasks being executed actually do.
26 BitBake just considers a list of tasks with dependencies and handles
27 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
28 consisting of variables in a certain format that get passed to the tasks.
29 </note>
30
31 <section id='ref-bitbake-parsing'>
32 <title>Parsing</title>
33
34 <para>
35 BitBake parses configuration files, classes, and <filename>.bb</filename> files.
36 </para>
37
38 <para>
39 The first thing BitBake does is look for the <filename>bitbake.conf</filename> file.
40 This file resides in the
41 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
42 within the <filename>meta/conf/</filename> directory.
43 BitBake finds it by examining its
44 <link linkend='var-BBPATH'><filename>BBPATH</filename></link> environment
45 variable and looking for the <filename>meta/conf/</filename>
46 directory.
47 </para>
48
49 <para>
50 The <filename>bitbake.conf</filename> file lists other configuration
51 files to include from a <filename>conf/</filename>
52 directory below the directories listed in <filename>BBPATH</filename>.
53 In general, the most important configuration file from a user's perspective
54 is <filename>local.conf</filename>, which contains a user's customized
55 settings for the OpenEmbedded build environment.
56 Other notable configuration files are the distribution
57 configuration file (set by the
58 <filename><link linkend='var-DISTRO'>DISTRO</link></filename> variable)
59 and the machine configuration file
60 (set by the
61 <filename><link linkend='var-MACHINE'>MACHINE</link></filename> variable).
62 The <filename>DISTRO</filename> and <filename>MACHINE</filename> BitBake environment
63 variables are both usually set in
64 the <filename>local.conf</filename> file.
65 Valid distribution
66 configuration files are available in the <filename>meta/conf/distro/</filename> directory
67 and valid machine configuration
68 files in the <filename>meta/conf/machine/</filename> directory.
69 Within the <filename>meta/conf/machine/include/</filename>
70 directory are various <filename>tune-*.inc</filename> configuration files that provide common
71 "tuning" settings specific to and shared between particular architectures and machines.
72 </para>
73
74 <para>
75 After the parsing of the configuration files, some standard classes are included.
76 The <filename>base.bbclass</filename> file is always included.
77 Other classes that are specified in the configuration using the
78 <filename><link linkend='var-INHERIT'>INHERIT</link></filename>
79 variable are also included.
80 Class files are searched for in a <filename>classes</filename> subdirectory
81 under the paths in <filename>BBPATH</filename> in the same way as
82 configuration files.
83 </para>
84
85 <para>
86 After classes are included, the variable
87 <filename><link linkend='var-BBFILES'>BBFILES</link></filename>
88 is set, usually in
89 <filename>local.conf</filename>, and defines the list of places to search for
90 <filename>.bb</filename> files.
91 By default, the <filename>BBFILES</filename> variable specifies the
92 <filename>meta/recipes-*/</filename> directory within Poky.
93 Adding extra content to <filename>BBFILES</filename> is best achieved through the use of
94 BitBake layers as described in the
95 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and
96 Creating Layers</ulink>" section of the Yocto Project Development Manual.
97 </para>
98
99 <para>
100 BitBake parses each <filename>.bb</filename> file in <filename>BBFILES</filename> and
101 stores the values of various variables.
102 In summary, for each <filename>.bb</filename>
103 file the configuration plus the base class of variables are set, followed
104 by the data in the <filename>.bb</filename> file
105 itself, followed by any inherit commands that
106 <filename>.bb</filename> file might contain.
107 </para>
108
109 <para>
110 Because parsing <filename>.bb</filename> files is a time
111 consuming process, a cache is kept to speed up subsequent parsing.
112 This cache is invalid if the timestamp of the <filename>.bb</filename>
113 file itself changes, or if the timestamps of any of the include,
114 configuration files or class files on which the
115 <filename>.bb</filename> file depends change.
116 </para>
117
118 <note>
119 <para>
120 You need to be aware of how BitBake parses curly braces.
121 If a recipe uses a closing curly brace within the function and
122 the character has no leading spaces, BitBake produces a parsing
123 error.
124 If you use a pair of curly brace in a shell function, the
125 closing curly brace must not be located at the start of the line
126 without leading spaces.
127 </para>
128
129 <para>
130 Here is an example that causes BitBake to produce a parsing
131 error:
132 <literallayout class='monospaced'>
133 fakeroot create_shar() {
134 cat &lt;&lt; "EOF" &gt; ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
135 usage()
136 {
137 echo "test"
138 ###### The following "}" at the start of the line causes a parsing error ######
139 }
140 EOF
141 }
142 </literallayout>
143 Writing the recipe this way avoids the error:
144 <literallayout class='monospaced'>
145 fakeroot create_shar() {
146 cat &lt;&lt; "EOF" &gt; ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
147 usage()
148 {
149 echo "test"
150 ######The following "}" with a leading space at the start of the line avoids the error ######
151 }
152 EOF
153 }
154 </literallayout>
155 </para>
156 </note>
157 </section>
158
159 <section id='ref-bitbake-providers'>
160 <title>Preferences and Providers</title>
161
162 <para>
163 Once all the <filename>.bb</filename> files have been
164 parsed, BitBake starts to build the target (<filename>core-image-sato</filename>
165 in the previous section's example) and looks for providers of that target.
166 Once a provider is selected, BitBake resolves all the dependencies for
167 the target.
168 In the case of <filename>core-image-sato</filename>, it would lead to
169 <filename>packagegroup-core-x11-sato</filename>,
170 which in turn leads to recipes like <filename>matchbox-terminal</filename>,
171 <filename>pcmanfm</filename> and <filename>gthumb</filename>.
172 These recipes in turn depend on <filename>glibc</filename> and the toolchain.
173 </para>
174
175 <para>
176 Sometimes a target might have multiple providers.
177 A common example is "virtual/kernel", which is provided by each kernel package.
178 Each machine often selects the best kernel provider by using a line similar to the
179 following in the machine configuration file:
180 </para>
181
182 <literallayout class='monospaced'>
183 PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
184 </literallayout>
185
186 <para>
187 The default <filename><link linkend='var-PREFERRED_PROVIDER'>PREFERRED_PROVIDER</link></filename>
188 is the provider with the same name as the target.
189 </para>
190
191 <para>
192 Understanding how providers are chosen is made complicated by the fact
193 that multiple versions might exist.
194 BitBake defaults to the highest version of a provider.
195 Version comparisons are made using the same method as Debian.
196 You can use the
197 <filename><link linkend='var-PREFERRED_VERSION'>PREFERRED_VERSION</link></filename>
198 variable to specify a particular version (usually in the distro configuration).
199 You can influence the order by using the
200 <filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE</link></filename>
201 variable.
202 By default, files have a preference of "0".
203 Setting the <filename>DEFAULT_PREFERENCE</filename> to "-1" makes the
204 package unlikely to be used unless it is explicitly referenced.
205 Setting the <filename>DEFAULT_PREFERENCE</filename> to "1" makes it likely the package is used.
206 <filename>PREFERRED_VERSION</filename> overrides any <filename>DEFAULT_PREFERENCE</filename> setting.
207 <filename>DEFAULT_PREFERENCE</filename> is often used to mark newer and more experimental package
208 versions until they have undergone sufficient testing to be considered stable.
209 </para>
210
211 <para>
212 In summary, BitBake has created a list of providers, which is prioritized, for each target.
213 </para>
214 </section>
215
216 <section id='ref-bitbake-dependencies'>
217 <title>Dependencies</title>
218
219 <para>
220 Each target BitBake builds consists of multiple tasks such as
221 <filename>fetch</filename>, <filename>unpack</filename>,
222 <filename>patch</filename>, <filename>configure</filename>,
223 and <filename>compile</filename>.
224 For best performance on multi-core systems, BitBake considers each task as an independent
225 entity with its own set of dependencies.
226 </para>
227
228 <para>
229 Dependencies are defined through several variables.
230 You can find information about variables BitBake uses in the BitBake documentation,
231 which is found in the <filename>bitbake/doc/manual</filename> directory within the
232 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
233 At a basic level, it is sufficient to know that BitBake uses the
234 <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename> and
235 <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename> variables when
236 calculating dependencies.
237 </para>
238 </section>
239
240 <section id='ref-bitbake-tasklist'>
241 <title>The Task List</title>
242
243 <para>
244 Based on the generated list of providers and the dependency information,
245 BitBake can now calculate exactly what tasks it needs to run and in what
246 order it needs to run them.
247 The build now starts with BitBake forking off threads up to the limit set in the
248 <filename><link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link></filename> variable.
249 BitBake continues to fork threads as long as there are tasks ready to run,
250 those tasks have all their dependencies met, and the thread threshold has not been
251 exceeded.
252 </para>
253
254 <para>
255 It is worth noting that you can greatly speed up the build time by properly setting
256 the <filename>BB_NUMBER_THREADS</filename> variable.
257 See the
258 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
259 section in the Yocto Project Quick Start for more information.
260 </para>
261
262 <para>
263 As each task completes, a timestamp is written to the directory specified by the
264 <filename><link linkend='var-STAMP'>STAMP</link></filename> variable.
265 On subsequent runs, BitBake looks within the <filename>build/tmp/stamps</filename>
266 directory and does not rerun
267 tasks that are already completed unless a timestamp is found to be invalid.
268 Currently, invalid timestamps are only considered on a per
269 <filename>.bb</filename> file basis.
270 So, for example, if the configure stamp has a timestamp greater than the
271 compile timestamp for a given target, then the compile task would rerun.
272 Running the compile task again, however, has no effect on other providers
273 that depend on that target.
274 This behavior could change or become configurable in future versions of BitBake.
275 </para>
276
277 <note>
278 Some tasks are marked as "nostamp" tasks.
279 No timestamp file is created when these tasks are run.
280 Consequently, "nostamp" tasks are always rerun.
281 </note>
282 </section>
283
284 <section id='ref-bitbake-runtask'>
285 <title>Running a Task</title>
286
287 <para>
288 Tasks can either be a shell task or a Python task.
289 For shell tasks, BitBake writes a shell script to
290 <filename>${WORKDIR}/temp/run.do_taskname.pid</filename> and then executes the script.
291 The generated shell script contains all the exported variables, and the shell functions
292 with all variables expanded.
293 Output from the shell script goes to the file <filename>${WORKDIR}/temp/log.do_taskname.pid</filename>.
294 Looking at the expanded shell functions in the run file and the output in the log files
295 is a useful debugging technique.
296 </para>
297
298 <para>
299 For Python tasks, BitBake executes the task internally and logs information to the
300 controlling terminal.
301 Future versions of BitBake will write the functions to files similar to the way
302 shell tasks are handled.
303 Logging will be handled in a way similar to shell tasks as well.
304 </para>
305
306 <para>
307 Once all the tasks have been completed BitBake exits.
308 </para>
309
310 <para>
311 When running a task, BitBake tightly controls the execution environment
312 of the build tasks to make sure unwanted contamination from the build machine
313 cannot influence the build.
314 Consequently, if you do want something to get passed into the build
315 task's environment, you must take a few steps:
316 <orderedlist>
317 <listitem><para>Tell BitBake to load what you want from the environment
318 into the data store.
319 You can do so through the <filename>BB_ENV_EXTRAWHITE</filename>
320 variable.
321 For example, assume you want to prevent the build system from
322 accessing your <filename>$HOME/.ccache</filename> directory.
323 The following command tells BitBake to load
324 <filename>CCACHE_DIR</filename> from the environment into the data
325 store:
326 <literallayout class='monospaced'>
327 export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR"
328 </literallayout></para></listitem>
329 <listitem><para>Tell BitBake to export what you have loaded into the
330 environment store to the task environment of every running task.
331 Loading something from the environment into the data store
332 (previous step) only makes it available in the datastore.
333 To export it to the task environment of every running task,
334 use a command similar to the following in your
335 <filename>local.conf</filename> or distro configuration file:
336 <literallayout class='monospaced'>
337 export CCACHE_DIR
338 </literallayout></para></listitem>
339 </orderedlist>
340 </para>
341
342 <note>
343 A side effect of the previous steps is that BitBake records the variable
344 as a dependency of the build process in things like the shared state
345 checksums.
346 If doing so results in unnecessary rebuilds of tasks, you can whitelist the
347 variable so that the shared state code ignores the dependency when it creates
348 checksums.
349 For information on this process, see the <filename>BB_HASHBASE_WHITELIST</filename>
350 example in the "<link linkend='checksums'>Checksums (Signatures)</link>" section.
351 </note>
352 </section>
353
354 <section id='ref-bitbake-commandline'>
355 <title>BitBake Command Line</title>
356
357 <para>
358 Following is the BitBake help output:
359 </para>
360
361 <screen>
362$ bitbake --help
363Usage: bitbake [options] [recipename/target ...]
364
365 Executes the specified task (default is 'build') for a given set of target recipes (.bb files).
366 It is assumed there is a conf/bblayers.conf available in cwd or in BBPATH which
367 will provide the layer, BBFILES and other configuration information.
368
369Options:
370 --version show program's version number and exit
371 -h, --help show this help message and exit
372 -b BUILDFILE, --buildfile=BUILDFILE
373 Execute tasks from a specific .bb recipe directly.
374 WARNING: Does not handle any dependencies from other
375 recipes.
376 -k, --continue Continue as much as possible after an error. While the
377 target that failed and anything depending on it cannot
378 be built, as much as possible will be built before
379 stopping.
380 -a, --tryaltconfigs Continue with builds by trying to use alternative
381 providers where possible.
382 -f, --force Force the specified targets/task to run (invalidating
383 any existing stamp file).
384 -c CMD, --cmd=CMD Specify the task to execute. The exact options
385 available depend on the metadata. Some examples might
386 be 'compile' or 'populate_sysroot' or 'listtasks' may
387 give a list of the tasks available.
388 -C INVALIDATE_STAMP, --clear-stamp=INVALIDATE_STAMP
389 Invalidate the stamp for the specified task such as
390 'compile' and then run the default task for the
391 specified target(s).
392 -r PREFILE, --read=PREFILE
393 Read the specified file before bitbake.conf.
394 -R POSTFILE, --postread=POSTFILE
395 Read the specified file after bitbake.conf.
396 -v, --verbose Output more log message data to the terminal.
397 -D, --debug Increase the debug level. You can specify this more
398 than once.
399 -n, --dry-run Don't execute, just go through the motions.
400 -S, --dump-signatures
401 Don't execute, just dump out the signature
402 construction information.
403 -p, --parse-only Quit after parsing the BB recipes.
404 -s, --show-versions Show current and preferred versions of all recipes.
405 -e, --environment Show the global or per-package environment complete
406 with information about where variables were
407 set/changed.
408 -g, --graphviz Save dependency tree information for the specified
409 targets in the dot syntax.
410 -I EXTRA_ASSUME_PROVIDED, --ignore-deps=EXTRA_ASSUME_PROVIDED
411 Assume these dependencies don't exist and are already
412 provided (equivalent to ASSUME_PROVIDED). Useful to
413 make dependency graphs more appealing
414 -l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS
415 Show debug logging for the specified logging domains
416 -P, --profile Profile the command and save reports.
417 -u UI, --ui=UI The user interface to use (e.g. knotty, hob, depexp).
418 -t SERVERTYPE, --servertype=SERVERTYPE
419 Choose which server to use, process or xmlrpc.
420 --revisions-changed Set the exit code depending on whether upstream
421 floating revisions have changed or not.
422 --server-only Run bitbake without a UI, only starting a server
423 (cooker) process.
424 -B BIND, --bind=BIND The name/address for the bitbake server to bind to.
425 --no-setscene Do not run any setscene tasks. sstate will be ignored
426 and everything needed, built.
427 --remote-server=REMOTE_SERVER
428 Connect to the specified server.
429 -m, --kill-server Terminate the remote server.
430 --observe-only Connect to a server as an observing-only client.
431 </screen>
432 </section>
433
434 <section id='ref-bitbake-fetchers'>
435 <title>Fetchers</title>
436
437 <para>
438 BitBake also contains a set of "fetcher" modules that allow
439 retrieval of source code from various types of sources.
440 For example, BitBake can get source code from a disk with the metadata, from websites,
441 from remote shell accounts, or from Source Code Management (SCM) systems
442 like <filename>cvs/subversion/git</filename>.
443 </para>
444
445 <para>
446 Fetchers are usually triggered by entries in
447 <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>.
448 You can find information about the options and formats of entries for specific
449 fetchers in the BitBake manual located in the
450 <filename>bitbake/doc/manual</filename> directory of the
451 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
452 </para>
453
454 <para>
455 One useful feature for certain Source Code Manager (SCM) fetchers is the ability to
456 "auto-update" when the upstream SCM changes version.
457 Since this ability requires certain functionality from the SCM, not all
458 systems support it.
459 Currently Subversion, Bazaar and to a limited extent, Git support the ability to "auto-update".
460 This feature works using the <filename><link linkend='var-SRCREV'>SRCREV</link></filename>
461 variable.
462 See the
463 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-srcrev'>Using an External SCM</ulink>" section
464 in the Yocto Project Development Manual for more information.
465 </para>
466
467 </section>
468
469</chapter>
470<!--
471vim: expandtab tw=80 ts=4 spell spelllang=en_gb
472-->
diff --git a/documentation/ref-manual/ref-classes.xml b/documentation/ref-manual/ref-classes.xml
new file mode 100644
index 0000000000..f60b907e85
--- /dev/null
+++ b/documentation/ref-manual/ref-classes.xml
@@ -0,0 +1,3489 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='ref-classes'>
6<title>Classes</title>
7
8<para>
9 Class files are used to abstract common functionality and share it amongst
10 multiple recipe (<filename>.bb</filename>) files.
11 To use a class file, you simply make sure the recipe inherits the class.
12 In most cases, when a recipe inherits a class it is enough to enable its
13 features.
14 There are cases, however, where in the recipe you might need to set
15 variables or override some default behavior.
16</para>
17
18<para>
19 Any <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> usually
20 found in a recipe can also be placed in a class file.
21 Class files are identified by the extension <filename>.bbclass</filename>
22 and are usually placed in a <filename>classes/</filename> directory beneath
23 the <filename>meta*/</filename> directory found in the
24 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
25 Class files can also be pointed to by
26 <link linkend='var-BUILDDIR'><filename>BUILDDIR</filename></link>
27 (e.g. <filename>build/</filename>) in the same way as
28 <filename>.conf</filename> files in the <filename>conf</filename> directory.
29 Class files are searched for in
30 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
31 using the same method by which <filename>.conf</filename> files are
32 searched.
33</para>
34
35<para>
36 This chapter discusses only the most useful and important classes.
37 Other classes do exist within the <filename>meta/classes</filename>
38 directory in the
39 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
40 You can reference the <filename>.bbclass</filename> files directly
41 for more information.
42</para>
43
44<section id='ref-classes-allarch'>
45 <title><filename>allarch.bbclass</filename></title>
46
47 <para>
48 The <filename>allarch</filename> class is inherited
49 by recipes that do not produce architecture-specific output.
50 The class disables functionality that is normally needed for recipes
51 that produce executable binaries (such as building the cross-compiler
52 and a C library as pre-requisites, and splitting out of debug symbols
53 during packaging).
54 </para>
55
56 <para>
57 By default, all recipes inherit the
58 <link linkend='ref-classes-base'><filename>base</filename></link> and
59 <link linkend='ref-classes-package'><filename>package</filename></link>
60 classes, which enable functionality
61 needed for recipes that produce executable output.
62 If your recipe, for example, only produces packages that contain
63 configuration files, media files, or scripts (e.g. Python and Perl),
64 then it should inherit the <filename>allarch</filename> class.
65 </para>
66</section>
67
68<section id='ref-classes-archiver'>
69 <title><filename>archiver.bbclass</filename></title>
70
71 <para>
72 The <filename>archiver</filename> class supports releasing
73 source code and other materials with the binaries.
74 </para>
75
76 <para>
77 For more details on the source archiver, see the
78 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
79 section in the Yocto Project Development Manual.
80 </para>
81</section>
82
83<section id='ref-classes-autotools'>
84 <title><filename>autotools.bbclass</filename></title>
85
86 <para>
87 The <filename>autotools</filename> class supports Autotooled
88 packages.
89 </para>
90
91 <para>
92 The <filename>autoconf</filename>, <filename>automake</filename>,
93 and <filename>libtool</filename> bring standardization.
94 This class defines a set of tasks (configure, compile etc.) that
95 work for all Autotooled packages.
96 It should usually be enough to define a few standard variables
97 and then simply <filename>inherit autotools</filename>.
98 This class can also work with software that emulates Autotools.
99 For more information, see the
100 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-autotooled-package'>Autotooled Package</ulink>"
101 section in the Yocto Project Development Manual.
102 </para>
103
104 <para>
105 By default, the <filename>autotools</filename> class
106 uses out-of-tree builds
107 (<link linkend='var-B'><filename>B</filename></link> <filename>!=</filename>
108 <link linkend='var-S'><filename>S</filename></link>).
109 If the software being built by a recipe does not support
110 using out-of-tree builds, you should have the recipe inherit the
111 <link linkend='ref-classes-autotools-brokensep'><filename>autotools-brokensep</filename></link>
112 class.
113 </para>
114
115 <para>
116 It's useful to have some idea of how the tasks defined by this class work
117 and what they do behind the scenes.
118 <itemizedlist>
119 <listitem><para><link linkend='ref-tasks-configure'><filename>do_configure</filename></link> &dash;
120 Regenerates the
121 configure script (using <filename>autoreconf</filename>) and then launches it
122 with a standard set of arguments used during cross-compilation.
123 You can pass additional parameters to <filename>configure</filename> through the
124 <filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></filename> variable.
125 </para></listitem>
126 <listitem><para><link linkend='ref-tasks-compile'><filename>do_compile</filename></link> &dash; Runs <filename>make</filename> with
127 arguments that specify the compiler and linker.
128 You can pass additional arguments through
129 the <filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></filename> variable.
130 </para></listitem>
131 <listitem><para><link linkend='ref-tasks-install'><filename>do_install</filename></link> &dash; Runs <filename>make install</filename>
132 and passes in
133 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>
134 as <filename>DESTDIR</filename>.
135 </para></listitem>
136 </itemizedlist>
137 </para>
138</section>
139
140<section id='ref-classes-autotools-brokensep'>
141 <title><filename>autotools-brokensep.bbclass</filename></title>
142
143 <para>
144 The <filename>autotools-brokensep</filename> class behaves the same
145 as the
146 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
147 class but builds with
148 <link linkend='var-B'><filename>B</filename></link> ==
149 <link linkend='var-S'><filename>S</filename></link>.
150 This method is useful when out-of-tree build support is either not
151 present or is broken.
152 <note>
153 It is recommended that out-of-tree support be fixed and used
154 if at all possible.
155 </note>
156 </para>
157</section>
158
159<section id='ref-classes-base'>
160 <title><filename>base.bbclass</filename></title>
161
162 <para>
163 The <filename>base</filename> class is special in that every
164 <filename>.bb</filename> file implicitly inherits the class.
165 This class contains definitions for standard basic
166 tasks such as fetching, unpacking, configuring (empty by default),
167 compiling (runs any <filename>Makefile</filename> present), installing
168 (empty by default) and packaging (empty by default).
169 These classes are often overridden or extended by other classes
170 such as the
171 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
172 class or the
173 <link linkend='ref-classes-package'><filename>package</filename></link>
174 class.
175 The class also contains some commonly used functions such as
176 <filename>oe_runmake</filename>.
177 </para>
178</section>
179
180<section id='ref-classes-bin-package'>
181 <title><filename>bin_package.bbclass</filename></title>
182
183 <para>
184 The <filename>bin_package</filename> class is a
185 helper class for recipes that extract the contents of a binary package
186 (e.g. an RPM) and install those contents rather than building the
187 binary from source.
188 The binary package is extracted and new packages in the configured
189 output package format are created.
190 Extraction and installation of proprietary binaries is a good example
191 use for this class.
192 <note>
193 For RPMs and other packages that do not contain a subdirectory,
194 you should specify a "subdir" parameter.
195 Here is an example where <filename>${BP}</filename> is used so that
196 the files are extracted into the subdirectory expected by the
197 default value of
198 <link linkend='var-S'><filename>S</filename></link>:
199 <literallayout class='monospaced'>
200 SRC_URI = "http://example.com/downloads/somepackage.rpm;subdir=${BP}"
201 </literallayout>
202 </note>
203 </para>
204</section>
205
206<section id='ref-classes-binconfig'>
207 <title><filename>binconfig.bbclass</filename></title>
208
209 <para>
210 The <filename>binconfig</filename> class helps to correct paths in
211 shell scripts.
212 </para>
213
214 <para>
215 Before <filename>pkg-config</filename> had become widespread, libraries
216 shipped shell scripts to give information about the libraries and
217 include paths needed to build software (usually named
218 <filename>LIBNAME-config</filename>).
219 This class assists any recipe using such scripts.
220 </para>
221
222 <para>
223 During staging, the OpenEmbedded build system installs such scripts
224 into the <filename>sysroots/</filename> directory.
225 Inheriting this class results in all paths in these scripts being
226 changed to point into the <filename>sysroots/</filename> directory so
227 that all builds that use the script use the correct directories
228 for the cross compiling layout.
229 See the
230 <link linkend='var-BINCONFIG_GLOB'><filename>BINCONFIG_GLOB</filename></link>
231 variable for more information.
232 </para>
233</section>
234
235<section id='ref-classes-binconfig-disabled'>
236 <title><filename>binconfig-disabled.bbclass</filename></title>
237
238 <para>
239 An alternative version of the
240 <link linkend='ref-classes-binconfig'><filename>binconfig</filename></link>
241 class, which disables binary configuration scripts by making them
242 return an error in favor of using <filename>pkg-config</filename>
243 to query the information.
244 The scripts to be disabled should be specified using the
245 <link linkend='var-BINCONFIG'><filename>BINCONFIG</filename></link>
246 variable within the recipe inheriting the class.
247 </para>
248</section>
249
250<section id='ref-classes-blacklist'>
251 <title><filename>blacklist.bbclass</filename></title>
252
253 <para>
254 The <filename>blacklist</filename> class prevents
255 the OpenEmbedded build system from building specific recipes
256 (blacklists them).
257 To use this class, inherit the class globally and set
258 <link linkend='var-PNBLACKLIST'><filename>PNBLACKLIST</filename></link>
259 for each recipe you wish to blacklist.
260 Specify the <link linkend='var-PN'><filename>PN</filename></link>
261 value as a variable flag (varflag) and provide a reason, which is
262 reported, if the package is requested to be built as the value.
263 For example, if you want to blacklist a recipe called "exoticware",
264 you add the following to your <filename>local.conf</filename>
265 or distribution configuration:
266 <literallayout class='monospaced'>
267 INHERIT += "blacklist"
268 PNBLACKLIST[exoticware] = "Not supported by our organization."
269 </literallayout>
270 </para>
271</section>
272
273<section id='ref-classes-boot-directdisk'>
274 <title><filename>boot-directdisk.bbclass</filename></title>
275
276 <para>
277 The <filename>boot-directdisk</filename> class
278 creates an image that can be placed directly onto a hard disk using
279 <filename>dd</filename> and then booted.
280 The image uses SYSLINUX.
281 </para>
282
283 <para>
284 The end result is a 512 boot sector populated with a
285 Master Boot Record (MBR) and partition table followed by an MSDOS
286 FAT16 partition containing SYSLINUX and a Linux kernel completed by
287 the <filename>ext2</filename> and <filename>ext3</filename>
288 root filesystems.
289 </para>
290</section>
291
292<section id='ref-classes-bootimg'>
293 <title><filename>bootimg.bbclass</filename></title>
294
295 <para>
296 The <filename>bootimg</filename> class creates a bootable
297 image using SYSLINUX, your kernel, and an optional initial RAM disk
298 (<filename>initrd</filename>).
299 </para>
300
301 <para>
302 When you use this class, two things happen:
303 <itemizedlist>
304 <listitem><para>
305 A <filename>.hddimg</filename> file is created.
306 This file is an MSDOS filesystem that contains SYSLINUX,
307 a kernel, an <filename>initrd</filename>, and a root filesystem
308 image.
309 All three of these can be written to hard drives directly and
310 also booted on a USB flash disks using <filename>dd</filename>.
311 </para></listitem>
312 <listitem><para>
313 A CD <filename>.iso</filename> image is created.
314 When this file is booted, the <filename>initrd</filename>
315 boots and processes the label selected in SYSLINUX.
316 Actions based on the label are then performed (e.g. installing
317 to a hard drive).</para></listitem>
318 </itemizedlist>
319 </para>
320
321 <para>
322 The <filename>bootimg</filename> class supports the
323 <link linkend='var-INITRD'><filename>INITRD</filename></link>,
324 <link linkend='var-NOISO'><filename>NOISO</filename></link>,
325 <link linkend='var-NOHDD'><filename>NOHDD</filename></link>, and
326 <link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>
327 variables.
328 </para>
329</section>
330
331<section id='ref-classes-bugzilla'>
332 <title><filename>bugzilla.bbclass</filename></title>
333
334 <para>
335 The <filename>bugzilla</filename> class supports setting up an
336 instance of Bugzilla in which you can automatically files bug reports
337 in response to build failures.
338 For this class to work, you need to enable the XML-RPC interface in
339 the instance of Bugzilla.
340 </para>
341</section>
342
343<section id='ref-classes-buildhistory'>
344 <title><filename>buildhistory.bbclass</filename></title>
345
346 <para>
347 The <filename>buildhistory</filename> class records a
348 history of build output metadata, which can be used to detect possible
349 regressions as well as used for analysis of the build output.
350 For more information on using Build History, see the
351 "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
352 section.
353 </para>
354</section>
355
356<section id='ref-classes-buildstats'>
357 <title><filename>buildstats.bbclass</filename></title>
358
359 <para>
360 The <filename>buildstats</filename> class records
361 performance statistics about each task executed during the build
362 (e.g. elapsed time, CPU usage, and I/O usage).
363 </para>
364
365 <para>
366 When you use this class, the output goes into the
367 <link linkend='var-BUILDSTATS_BASE'><filename>BUILDSTATS_BASE</filename></link>
368 directory, which defaults to <filename>${TMPDIR}/buildstats/</filename>.
369 You can analyze the elapsed time using
370 <filename>scripts/pybootchartgui/pybootchartgui.py</filename>, which
371 produces a cascading chart of the entire build process and can be
372 useful for highlighting bottlenecks.
373 </para>
374
375 <para>
376 Collecting build statistics is enabled by default through the
377 <link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link>
378 variable from your <filename>local.conf</filename> file.
379 Consequently, you do not have to do anything to enable the class.
380 However, if you want to disable the class, simply remove "buildstats"
381 from the <filename>USER_CLASSES</filename> list.
382 </para>
383</section>
384
385<section id='ref-classes-buildstats-summary'>
386 <title><filename>buildstats-summary.bbclass</filename></title>
387
388 <para>
389 When inherited globally, prints statistics at the end of the build
390 on sstate re-use.
391 In order to function, this class requires the
392 <link linkend='ref-classes-buildstats'><filename>buildstats</filename></link>
393 class be enabled.
394 </para>
395</section>
396
397<section id='ref-classes-ccache'>
398 <title><filename>ccache.bbclass</filename></title>
399
400 <para>
401 The <filename>ccache</filename> class enables the
402 <ulink url='http://ccache.samba.org/'>C/C++ Compiler Cache</ulink>
403 for the build.
404 This class is used to give a minor performance boost during the build.
405 However, using the class can lead to unexpected side-effects.
406 Thus, it is recommended that you do not use this class.
407 See <ulink url='http://ccache.samba.org/'></ulink> for information on
408 the C/C++ Compiler Cache.
409 </para>
410</section>
411
412<section id='ref-classes-chrpath'>
413 <title><filename>chrpath.bbclass</filename></title>
414
415 <para>
416 The <filename>chrpath</filename> class
417 is a wrapper around the "chrpath" utility, which is used during the
418 build process for <filename>nativesdk</filename>,
419 <filename>cross</filename>, and
420 <filename>cross-canadian</filename> recipes to change
421 <filename>RPATH</filename> records within binaries in order to make
422 them relocatable.
423 </para>
424</section>
425
426<section id='ref-classes-clutter'>
427 <title><filename>clutter.bbclass</filename></title>
428
429 <para>
430 The <filename>clutter</filename> class consolidates the
431 major and minor version naming and other common items used by Clutter
432 and related recipes.
433 <note>
434 Unlike some other classes related to specific libraries, recipes
435 building other software that uses Clutter do not need to
436 inherit this class unless they use the same recipe versioning
437 scheme that the Clutter and related recipes do.
438 </note>
439 </para>
440</section>
441
442<section id='ref-classes-cmake'>
443 <title><filename>cmake.bbclass</filename></title>
444
445 <para>
446 The <filename>cmake</filename> class allows for
447 recipes that need to build software using the CMake build system.
448 You can use the
449 <link linkend='var-EXTRA_OECMAKE'><filename>EXTRA_OECMAKE</filename></link>
450 variable to specify additional configuration options to be passed on
451 the <filename>cmake</filename> command line.
452 </para>
453</section>
454
455<section id='ref-classes-cml1'>
456 <title><filename>cml1.bbclass</filename></title>
457
458 <para>
459 The <filename>cml1</filename> class provides basic support for the
460 Linux kernel style build configuration system.
461 </para>
462</section>
463
464<section id='ref-classes-compress_doc'>
465 <title><filename>compress_doc.bbclass</filename></title>
466
467 <para>
468 Enables compression for man pages and info pages.
469 This class is intended to be inherited globally.
470 The default compression mechanism is gz (gzip) but you can
471 select an alternative mechanism by setting the
472 <link linkend='var-DOC_COMPRESS'><filename>DOC_COMPRESS</filename></link>
473 variable.
474 </para>
475</section>
476
477<section id='ref-classes-copyleft_compliance'>
478 <title><filename>copyleft_compliance.bbclass</filename></title>
479
480 <para>
481 The <filename>copyleft_compliance</filename> class
482 preserves source code for the purposes of license compliance.
483 This class is an alternative to the <filename>archiver</filename>
484 class and is still used by some users even though it has been
485 deprecated in favor of the
486 <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
487 class.
488 </para>
489</section>
490
491<section id='ref-classes-copyleft_filter'>
492 <title><filename>copyleft_filter.bbclass</filename></title>
493
494 <para>
495 A class used by the
496 <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
497 and
498 <link linkend='ref-classes-copyleft_compliance'><filename>copyleft_compliance</filename></link>
499 classes for filtering licenses.
500 The <filename>copyleft_filter</filename> class is an internal class
501 and is not intended to be used directly.
502 </para>
503</section>
504
505<section id='ref-classes-core-image'>
506 <title><filename>core-image.bbclass</filename></title>
507
508 <para>
509 The <filename>core-image</filename> class
510 provides common definitions for the
511 <filename>core-image-*</filename> image recipes, such as support for
512 additional
513 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
514 </para>
515</section>
516
517<section id='ref-classes-cpan'>
518 <title><filename>cpan.bbclass</filename></title>
519
520 <para>
521 The <filename>cpan</filename> class supports Perl modules.
522 </para>
523
524 <para>
525 Recipes for Perl modules are simple.
526 These recipes usually only need to point to the source's archive and
527 then inherit the proper class file.
528 Building is split into two methods depending on which method the module
529 authors used.
530 <itemizedlist>
531 <listitem><para>Modules that use old
532 <filename>Makefile.PL</filename>-based build system require
533 <filename>cpan.bbclass</filename> in their recipes.
534 </para></listitem>
535 <listitem><para>Modules that use
536 <filename>Build.PL</filename>-based build system require
537 using <filename>cpan_build.bbclass</filename> in their recipes.
538 </para></listitem>
539 </itemizedlist>
540 </para>
541</section>
542
543<section id='ref-classes-cross'>
544 <title><filename>cross.bbclass</filename></title>
545
546 <para>
547 The <filename>cross</filename> class provides support for the recipes
548 that build the cross-compilation tools.
549 </para>
550</section>
551
552<section id='ref-classes-cross-canadian'>
553 <title><filename>cross-canadian.bbclass</filename></title>
554
555 <para>
556 The <filename>cross-canadian</filename> class
557 provides support for the recipes that build the Canadian
558 Cross-compilation tools for SDKs.
559 See the
560 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
561 section for more discussion on these cross-compilation tools.
562 </para>
563</section>
564
565<section id='ref-classes-crosssdk'>
566 <title><filename>crosssdk.bbclass</filename></title>
567
568 <para>
569 The <filename>crosssdk</filename> class
570 provides support for the recipes that build the cross-compilation
571 tools used for building SDKs.
572 See the
573 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
574 section for more discussion on these cross-compilation tools.
575 </para>
576</section>
577
578<section id='ref-classes-debian'>
579 <title><filename>debian.bbclass</filename></title>
580
581 <para>
582 The <filename>debian</filename> class renames output packages so that
583 they follow the Debian naming policy (i.e. <filename>glibc</filename>
584 becomes <filename>libc6</filename> and <filename>glibc-devel</filename>
585 becomes <filename>libc6-dev</filename>.)
586 Renaming includes the library name and version as part of the package
587 name.
588 </para>
589
590 <para>
591 If a recipe creates packages for multiple libraries
592 (shared object files of <filename>.so</filename> type), use the
593 <link linkend='var-LEAD_SONAME'><filename>LEAD_SONAME</filename></link>
594 variable in the recipe to specify the library on which to apply the
595 naming scheme.
596 </para>
597</section>
598
599<section id='ref-classes-deploy'>
600 <title><filename>deploy.bbclass</filename></title>
601
602 <para>
603 The <filename>deploy</filename> class handles deploying files
604 to the
605 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
606 directory.
607 The main function of this class is to allow the deploy step to be
608 accelerated by shared state.
609 Recipes that inherit this class should define their own
610 <link linkend='ref-tasks-deploy'><filename>do_deploy</filename></link>
611 function to copy the files to be deployed to
612 <link linkend='var-DEPLOYDIR'><filename>DEPLOYDIR</filename></link>,
613 and use <filename>addtask</filename> to add the task at the appropriate
614 place, which is usually after
615 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
616 or
617 <link linkend='ref-tasks-install'><filename>do_install</filename></link>.
618 The class then takes care of staging the files from
619 <filename>DEPLOYDIR</filename> to
620 <filename>DEPLOY_DIR_IMAGE</filename>.
621 </para>
622</section>
623
624<section id='ref-classes-devshell'>
625 <title><filename>devshell.bbclass</filename></title>
626
627 <para>
628 The <filename>devshell</filename> class adds the
629 <filename>do_devshell</filename> task.
630 Distribution policy dictates whether to include this class.
631 See the
632 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section
633 in the Yocto Project Development Manual for more information about
634 using <filename>devshell</filename>.
635 </para>
636</section>
637
638<section id='ref-classes-distro_features_check'>
639 <title><filename>distro_features_check.bbclass</filename></title>
640
641 <para>
642 The <filename>distro_features_check</filename> class
643 allows individual recipes to check for required and conflicting
644 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
645 </para>
646
647 <para>
648 This class provides support for the
649 <link linkend='var-REQUIRED_DISTRO_FEATURES'><filename>REQUIRED_DISTRO_FEATURES</filename></link>
650 and
651 <link linkend='var-CONFLICT_DISTRO_FEATURES'><filename>CONFLICT_DISTRO_FEATURES</filename></link>
652 variables.
653 If any conditions specified in the recipe using the above variables are
654 not met, the recipe will be skipped.
655 </para>
656</section>
657
658<section id='ref-classes-distrodata'>
659 <title><filename>distrodata.bbclass</filename></title>
660
661 <para>
662 The <filename>distrodata</filename> class
663 provides for automatic checking for upstream recipe updates.
664 The class creates a comma-separated value (CSV) spreadsheet that
665 contains information about the recipes.
666 The information provides the <filename>do_distrodata</filename> and
667 <filename>do_distro_check</filename> tasks, which do upstream checking
668 and also verify if a package is used in multiple major distributions.
669 </para>
670
671 <para>
672 The class is not included by default.
673 To use it, you must include the following files and set the
674 <link linkend='var-INHERIT'><filename>INHERIT</filename></link>
675 variable:
676 <literallayout class='monospaced'>
677 include conf/distro/include/distro_alias.inc
678 include conf/distro/include/recipe_color.inc
679 include conf/distro/include/maintainers.inc
680 include conf/distro/include/upstream_tracking.inc
681 include conf/distro/include/package_regex.inc
682 INHERIT+= "distrodata"
683 </literallayout>
684 </para>
685</section>
686
687<section id='ref-classes-distutils'>
688 <title><filename>distutils.bbclass</filename></title>
689
690 <para>
691 The <filename>distutils</filename> class supports recipes for Python
692 version 2.x extensions, which are simple.
693 These recipes usually only need to point to the source's archive and
694 then inherit the proper class.
695 Building is split into two methods depending on which method the
696 module authors used.
697 <itemizedlist>
698 <listitem><para>Extensions that use an Autotools-based build system
699 require Autotools and
700 <filename>distutils</filename>-based classes in their recipes.
701 </para></listitem>
702 <listitem><para>Extensions that use build systems based on
703 <filename>distutils</filename> require
704 the <filename>distutils</filename> class in their recipes.
705 </para></listitem>
706 <listitem><para>Extensions that use build systems based on
707 <filename>setuptools</filename> require the
708 <link linkend='ref-classes-setuptools'><filename>setuptools</filename></link>
709 class in their recipes.
710 </para></listitem>
711 </itemizedlist>
712 </para>
713</section>
714
715<section id='ref-classes-distutils3'>
716 <title><filename>distutils3.bbclass</filename></title>
717
718 <para>
719 The <filename>distutils3</filename> class supports recipes for Python
720 version 3.x extensions, which are simple.
721 These recipes usually only need to point to the source's archive and
722 then inherit the proper class.
723 Building is split into two methods depending on which method the
724 module authors used.
725 <itemizedlist>
726 <listitem><para>Extensions that use an Autotools-based build system
727 require Autotools and
728 <filename>distutils</filename>-based classes in their recipes.
729 </para></listitem>
730 <listitem><para>Extensions that use
731 <filename>distutils</filename>-based build systems require
732 the <filename>distutils</filename> class in their recipes.
733 </para></listitem>
734 <listitem><para>Extensions that use build systems based on
735 <filename>setuptools3</filename> require the
736 <link linkend='ref-classes-setuptools'><filename>setuptools3</filename></link>
737 class in their recipes.
738 </para></listitem>
739 </itemizedlist>
740 </para>
741</section>
742
743<section id='ref-classes-externalsrc'>
744 <title><filename>externalsrc.bbclass</filename></title>
745
746 <para>
747 The <filename>externalsrc</filename> class supports building software
748 from source code that is external to the OpenEmbedded build system.
749 Building software from an external source tree means that the build
750 system's normal fetch, unpack, and patch process is not used.
751 </para>
752
753 <para>
754 By default, the OpenEmbedded build system uses the
755 <link linkend='var-S'><filename>S</filename></link> and
756 <link linkend='var-B'><filename>B</filename></link> variables to
757 locate unpacked recipe source code and to build it, respectively.
758 When your recipe inherits the <filename>externalsrc</filename> class,
759 you use the
760 <link linkend='var-EXTERNALSRC'><filename>EXTERNALSRC</filename></link>
761 and
762 <link linkend='var-EXTERNALSRC_BUILD'><filename>EXTERNALSRC_BUILD</filename></link>
763 variables to ultimately define <filename>S</filename> and
764 <filename>B</filename>.
765 </para>
766
767 <para>
768 By default, this class expects the source code to support recipe builds
769 that use the <link linkend='var-B'><filename>B</filename></link>
770 variable to point to the directory in which the OpenEmbedded build
771 system places the generated objects built from the recipes.
772 By default, the <filename>B</filename> directory is set to the
773 following, which is separate from the source directory
774 (<filename>S</filename>):
775 <literallayout class='monospaced'>
776 ${WORKDIR}/${BPN}/{PV}/
777 </literallayout>
778 See these variables for more information:
779 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
780 <link linkend='var-BPN'><filename>BPN</filename></link>, and
781 <link linkend='var-PV'><filename>PV</filename></link>,
782 </para>
783
784 <para>
785 For more information on the
786 <filename>externalsrc</filename> class, see the comments in
787 <filename>meta/classes/externalsrc.bbclass</filename> in the
788 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
789 For information on how to use the <filename>externalsrc</filename>
790 class, see the
791 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
792 section in the Yocto Project Development Manual.
793 </para>
794</section>
795
796<section id='ref-classes-extrausers'>
797 <title><filename>extrausers.bbclass</filename></title>
798
799 <para>
800 The <filename>extrausers</filename> class allows
801 additional user and group configuration to be applied at the image
802 level.
803 Inheriting this class either globally or from an image recipe allows
804 additional user and group operations to be performed using the
805 <link linkend='var-EXTRA_USERS_PARAMS'><filename>EXTRA_USERS_PARAMS</filename></link>
806 variable.
807 <note>
808 The user and group operations added using the
809 <filename>extrausers</filename> class are not tied to a specific
810 recipe outside of the recipe for the image.
811 Thus, the operations can be performed across the image as a whole.
812 Use the
813 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
814 class to add user and group configuration to a specific recipe.
815 </note>
816 Here is an example that uses this class in an image recipe:
817 <literallayout class='monospaced'>
818 inherit extrausers
819 EXTRA_USERS_PARAMS = "\
820 useradd -p '' tester; \
821 groupadd developers; \
822 userdel nobody; \
823 groupdel -g video; \
824 groupmod -g 1020 developers; \
825 usermod -s /bin/sh tester; \
826 "
827 </literallayout>
828 Here is an example that adds two users named "tester-jim" and
829 "tester-sue" and assigns passwords:
830 <literallayout class='monospaced'>
831 inherit extrausers
832 EXTRA_USERS_PARAMS = "\
833 useradd -P tester01 tester-jim; \
834 useradd -P tester01 tester-sue; \
835 "
836 </literallayout>
837 Finally, here is an example that sets the root password to
838 "1876*18":
839 <literallayout class='monospaced'>
840 inherit extrausers
841 EXTRA_USERS_PARAMS = "\
842 useradd -P 1876*18 root; \
843 "
844 </literallayout>
845 </para>
846</section>
847
848<section id='ref-classes-fontcache'>
849 <title><filename>fontcache.bbclass</filename></title>
850
851 <para>
852 The <filename>fontcache</filename> class generates the
853 proper post-install and post-remove (postinst and postrm)
854 scriptlets for font packages.
855 These scriptlets call <filename>fc-cache</filename> (part of
856 <filename>Fontconfig</filename>) to add the fonts to the font
857 information cache.
858 Since the cache files are architecture-specific,
859 <filename>fc-cache</filename> runs using QEMU if the postinst
860 scriptlets need to be run on the build host during image creation.
861 </para>
862
863 <para>
864 If the fonts being installed are in packages other than the main
865 package, set
866 <link linkend='var-FONT_PACKAGES'><filename>FONT_PACKAGES</filename></link>
867 to specify the packages containing the fonts.
868 </para>
869</section>
870
871<section id='ref-classes-gconf'>
872 <title><filename>gconf.bbclass</filename></title>
873
874 <para>
875 The <filename>gconf</filename> class provides common
876 functionality for recipes that need to install GConf schemas.
877 The schemas will be put into a separate package
878 (<filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-gconf</filename>)
879 that is created automatically when this class is inherited.
880 This package uses the appropriate post-install and post-remove
881 (postinst/postrm) scriptlets to register and unregister the schemas
882 in the target image.
883 </para>
884</section>
885
886<section id='ref-classes-gettext'>
887 <title><filename>gettext.bbclass</filename></title>
888
889 <para>
890 The <filename>gettext</filename> class provides support for
891 building software that uses the GNU <filename>gettext</filename>
892 internationalization and localization system.
893 All recipes building software that use
894 <filename>gettext</filename> should inherit this class.
895 </para>
896</section>
897
898<section id='ref-classes-gnome'>
899 <title><filename>gnome.bbclass</filename></title>
900
901 <para>
902 The <filename>gnome</filename> class supports recipes that
903 build software from the GNOME stack.
904 This class inherits the
905 <link linkend='ref-classes-gnomebase'><filename>gnomebase</filename></link>,
906 <link linkend='ref-classes-gtk-icon-cache'><filename>gtk-icon-cache</filename></link>,
907 <link linkend='ref-classes-gconf'><filename>gconf</filename></link> and
908 <link linkend='ref-classes-mime'><filename>mime</filename></link> classes.
909 The class also disables GObject introspection where applicable.
910 </para>
911</section>
912
913<section id='ref-classes-gnomebase'>
914 <title><filename>gnomebase.bbclass</filename></title>
915
916 <para>
917 The <filename>gnomebase</filename> class is the base
918 class for recipes that build software from the GNOME stack.
919 This class sets
920 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link> to
921 download the source from the GNOME mirrors as well as extending
922 <link linkend='var-FILES'><filename>FILES</filename></link>
923 with the typical GNOME installation paths.
924 </para>
925</section>
926
927<section id='ref-classes-grub-efi'>
928 <title><filename>grub-efi.bbclass</filename></title>
929
930 <para>
931 The <filename>grub-efi</filename>
932 class provides <filename>grub-efi</filename>-specific functions for
933 building bootable images.
934 </para>
935
936 <para>
937 This class supports several variables:
938 <itemizedlist>
939 <listitem><para>
940 <link linkend='var-INITRD'><filename>INITRD</filename></link>:
941 Indicates list of filesystem images to concatenate and use
942 as an initial RAM disk (initrd) (optional).
943 </para></listitem>
944 <listitem><para>
945 <link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>:
946 Indicates a filesystem image to include as the root filesystem
947 (optional).</para></listitem>
948 <listitem><para>
949 <link linkend='var-GRUB_GFXSERIAL'><filename>GRUB_GFXSERIAL</filename></link>:
950 Set this to "1" to have graphics and serial in the boot menu.
951 </para></listitem>
952 <listitem><para>
953 <link linkend='var-LABELS'><filename>LABELS</filename></link>:
954 A list of targets for the automatic configuration.
955 </para></listitem>
956 <listitem><para>
957 <link linkend='var-APPEND'><filename>APPEND</filename></link>:
958 An override list of append strings for each
959 <filename>LABEL</filename>.
960 </para></listitem>
961 <listitem><para>
962 <link linkend='var-GRUB_OPTS'><filename>GRUB_OPTS</filename></link>:
963 Additional options to add to the configuration (optional).
964 Options are delimited using semi-colon characters
965 (<filename>;</filename>).</para></listitem>
966 <listitem><para>
967 <link linkend='var-GRUB_TIMEOUT'><filename>GRUB_TIMEOUT</filename></link>:
968 Timeout before executing the default <filename>LABEL</filename>
969 (optional).
970 </para></listitem>
971 </itemizedlist>
972 </para>
973</section>
974
975<section id='ref-classes-gsettings'>
976 <title><filename>gsettings.bbclass</filename></title>
977
978 <para>
979 The <filename>gsettings</filename> class
980 provides common functionality for recipes that need to install
981 GSettings (glib) schemas.
982 The schemas are assumed to be part of the main package.
983 Appropriate post-install and post-remove (postinst/postrm)
984 scriptlets are added to register and unregister the schemas in the
985 target image.
986 </para>
987</section>
988
989<section id='ref-classes-gtk-doc'>
990 <title><filename>gtk-doc.bbclass</filename></title>
991
992 <para>
993 The <filename>gtk-doc</filename> class
994 is a helper class to pull in the appropriate
995 <filename>gtk-doc</filename> dependencies and disable
996 <filename>gtk-doc</filename>.
997 </para>
998</section>
999
1000<section id='ref-classes-gtk-icon-cache'>
1001 <title><filename>gtk-icon-cache.bbclass</filename></title>
1002
1003 <para>
1004 The <filename>gtk-icon-cache</filename> class
1005 generates the proper post-install and post-remove (postinst/postrm)
1006 scriptlets for packages that use GTK+ and install icons.
1007 These scriptlets call <filename>gtk-update-icon-cache</filename> to add
1008 the fonts to GTK+'s icon cache.
1009 Since the cache files are architecture-specific,
1010 <filename>gtk-update-icon-cache</filename> is run using QEMU if the
1011 postinst scriptlets need to be run on the build host during image
1012 creation.
1013 </para>
1014</section>
1015
1016<section id='ref-classes-gtk-immodules-cache'>
1017 <title><filename>gtk-immodules-cache.bbclass</filename></title>
1018
1019 <para>
1020 The <filename>gtk-immodules-cache</filename> class
1021 generates the proper post-install and post-remove (postinst/postrm)
1022 scriptlets for packages that install GTK+ input method modules for
1023 virtual keyboards.
1024 These scriptlets call <filename>gtk-update-icon-cache</filename> to add
1025 the input method modules to the cache.
1026 Since the cache files are architecture-specific,
1027 <filename>gtk-update-icon-cache</filename> is run using QEMU if the
1028 postinst scriptlets need to be run on the build host during image
1029 creation.
1030 </para>
1031
1032 <para>
1033 If the input method modules being installed are in packages other than
1034 the main package, set
1035 <link linkend='var-GTKIMMODULES_PACKAGES'><filename>GTKIMMODULES_PACKAGES</filename></link>
1036 to specify the packages containing the modules.
1037 </para>
1038</section>
1039
1040<section id='ref-classes-gummiboot'>
1041 <title><filename>gummiboot.bbclass</filename></title>
1042
1043 <para>
1044 The <filename>gummiboot</filename> class provides functions specific
1045 to the gummiboot bootloader for building bootable images.
1046 This is an internal class and is not intended to be
1047 used directly.
1048 Set the
1049 <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link>
1050 variable to "gummiboot" to use this class.
1051 </para>
1052
1053 <para>
1054 For information on more variables used and supported in this class,
1055 see the
1056 <link linkend='var-GUMMIBOOT_CFG'><filename>GUMMIBOOT_CFG</filename></link>,
1057 <link linkend='var-GUMMIBOOT_ENTRIES'><filename>GUMMIBOOT_ENTRIES</filename></link>,
1058 and
1059 <link linkend='var-GUMMIBOOT_TIMEOUT'><filename>GUMMIBOOT_TIMEOUT</filename></link>
1060 variables.
1061 </para>
1062
1063 <para>
1064 You can also see the
1065 <ulink url='http://freedesktop.org/wiki/Software/gummiboot/'>Gummiboot documentation</ulink>
1066 for more information.
1067 </para>
1068</section>
1069
1070<section id='ref-classes-gzipnative'>
1071 <title><filename>gzipnative.bbclass</filename></title>
1072
1073 <para>
1074 The <filename>gzipnative</filename>
1075 class enables the use of native versions of <filename>gzip</filename>
1076 and <filename>pigz</filename> rather than the versions of these tools
1077 from the build host.
1078 </para>
1079</section>
1080
1081<section id='ref-classes-icecc'>
1082 <title><filename>icecc.bbclass</filename></title>
1083
1084 <para>
1085 The <filename>icecc</filename> class supports
1086 <ulink url='https://github.com/icecc/icecream'>Icecream</ulink>, which
1087 facilitates taking compile jobs and distributing them among remote
1088 machines.
1089 </para>
1090
1091 <para>
1092 The class stages directories with symlinks from <filename>gcc</filename>
1093 and <filename>g++</filename> to <filename>icecc</filename>, for both
1094 native and cross compilers.
1095 Depending on each configure or compile, the OpenEmbedded build system
1096 adds the directories at the head of the <filename>PATH</filename> list
1097 and then sets the <filename>ICECC_CXX</filename> and
1098 <filename>ICEC_CC</filename> variables, which are the paths to the
1099 <filename>g++</filename> and <filename>gcc</filename> compilers,
1100 respectively.
1101 </para>
1102
1103 <para>
1104 For the cross compiler, the class creates a <filename>tar.gz</filename>
1105 file that contains the Yocto Project toolchain and sets
1106 <filename>ICECC_VERSION</filename>, which is the version of the
1107 cross-compiler used in the cross-development toolchain, accordingly.
1108 </para>
1109
1110 <para>
1111 The class handles all three different compile stages
1112 (i.e native ,cross-kernel and target) and creates the necessary
1113 environment <filename>tar.gz</filename> file to be used by the remote
1114 machines.
1115 The class also supports SDK generation.
1116 </para>
1117
1118 <para>
1119 If <link linkend='var-ICECC_PATH'><filename>ICECC_PATH</filename></link>
1120 is not set in your <filename>local.conf</filename> file, then the
1121 class tries to locate the <filename>icecc</filename> binary
1122 using <filename>which</filename>.
1123
1124 If
1125 <link linkend='var-ICECC_ENV_EXEC'><filename>ICECC_ENV_EXEC</filename></link>
1126 is set in your <filename>local.conf</filename> file, the variable should
1127 point to the <filename>icecc-create-env</filename> script
1128 provided by the user.
1129 If you do not point to a user-provided script, the build system
1130 uses the default script provided by the recipe
1131 <filename>icecc-create-env-native.bb</filename>.
1132 <note>
1133 This script is a modified version and not the one that comes with
1134 <filename>icecc</filename>.
1135 </note>
1136 </para>
1137
1138 <para>
1139 If you do not want the Icecream distributed compile support to apply
1140 to specific recipes or classes, you can effectively "blacklist" them
1141 by listing the recipes and classes using the
1142 <link linkend='var-ICECC_USER_PACKAGE_BL'><filename>ICECC_USER_PACKAGE_BL</filename></link>
1143 and
1144 <link linkend='var-ICECC_USER_CLASS_BL'><filename>ICECC_USER_CLASS_BL</filename></link>,
1145 variables, respectively, in your <filename>local.conf</filename> file.
1146 Doing so causes the OpenEmbedded build system to handle these
1147 compilations locally.
1148 </para>
1149
1150 <para>
1151 Additionally, you can list recipes using the
1152 <link linkend='var-ICECC_USER_PACKAGE_WL'><filename>ICECC_USER_PACKAGE_WL</filename></link>
1153 variable in your <filename>local.conf</filename> file to force
1154 <filename>icecc</filename> to be enabled for recipes using an empty
1155 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
1156 variable.
1157 </para>
1158
1159 <para>
1160 Inheriting the <filename>icecc</filename> class changes all sstate
1161 signatures.
1162 Consequently, if a development team has a dedicated build system
1163 that populates
1164 <link linkend='var-SSTATE_MIRRORS'><filename>STATE_MIRRORS</filename></link>
1165 and they want to reuse sstate from
1166 <filename>STATE_MIRRORS</filename>, then all developers and the
1167 build system need to either inherit the <filename>icecc</filename>
1168 class or nobody should.
1169 </para>
1170
1171 <para>
1172 At the distribution level, you can inherit the
1173 <filename>icecc</filename> class to be sure that all builders start
1174 with the same sstate signatures.
1175 After inheriting the class, you can then disable the feature by setting
1176 the
1177 <link linkend='var-ICECC_DISABLED'><filename>ICECC_DISABLED</filename></link>
1178 variable to "1" as follows:
1179 <literallayout class='monospaced'>
1180 INHERIT_DISTRO_append = " icecc"
1181 ICECC_DISABLED ??= "1"
1182 </literallayout>
1183 This practice makes sure everyone is using the same signatures but also
1184 requires individuals that do want to use Icecream to enable the feature
1185 individually as follows in your <filename>local.conf</filename> file:
1186 <literallayout class='monospaced'>
1187 ICECC_DISABLED = ""
1188 </literallayout>
1189 </para>
1190</section>
1191
1192<section id='ref-classes-image'>
1193 <title><filename>image.bbclass</filename></title>
1194
1195 <para>
1196 The <filename>image</filename> class helps support creating images
1197 in different formats.
1198 First, the root filesystem is created from packages using
1199 one of the <filename>rootfs*.bbclass</filename>
1200 files (depending on the package format used) and then one or more image
1201 files are created.
1202 <itemizedlist>
1203 <listitem><para>The
1204 <filename><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link></filename>
1205 variable controls the types of images to generate.
1206 </para></listitem>
1207 <listitem><para>The
1208 <filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename>
1209 variable controls the list of packages to install into the
1210 image.</para></listitem>
1211 </itemizedlist>
1212 For information on customizing images, see the
1213 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage'>Customizing Images</ulink>"
1214 section in the Yocto Project Development Manual.
1215 For information on how images are created, see the
1216 "<link linkend='images-dev-environment'>Images</link>" section elsewhere
1217 in this manual.
1218 </para>
1219</section>
1220
1221<section id='ref-classes-image_types'>
1222 <title><filename>image_types.bbclass</filename></title>
1223
1224 <para>
1225 The <filename>image_types</filename> class defines all of
1226 the standard image output types that you can enable through the
1227 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
1228 variable.
1229 You can use this class as a reference on how to add support for custom
1230 image output types.
1231 </para>
1232
1233 <para>
1234 By default, this class is enabled through the
1235 <link linkend='var-IMAGE_CLASSES'><filename>IMAGE_CLASSES</filename></link>
1236 variable in
1237 <link linkend='ref-classes-image'><filename>image.bbclass</filename></link>.
1238 If you define your own image types using a custom BitBake class and
1239 then use <filename>IMAGE_CLASSES</filename> to enable it, the custom
1240 class must either inherit <filename>image_types</filename> or
1241 <filename>image_types</filename> must also appear in
1242 <filename>IMAGE_CLASSES</filename>.
1243 </para>
1244</section>
1245
1246<section id='ref-classes-image_types_uboot'>
1247 <title><filename>image_types_uboot.bbclass</filename></title>
1248
1249 <para>
1250 The <filename>image_types_uboot</filename> class
1251 defines additional image types specifically for the U-Boot bootloader.
1252 </para>
1253</section>
1254
1255<section id='ref-classes-image-live'>
1256 <title><filename>image-live.bbclass</filename></title>
1257
1258 <para>
1259 The <filename>image-live</filename> class supports building "live"
1260 images.
1261 </para>
1262
1263 <para>
1264 Normally, you do not use this class directly.
1265 Instead, you add "live" to
1266 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>.
1267 For example, if you were building an ISO image, you would add "live"
1268 to <filename>IMAGE_FSTYPES</filename>, set the
1269 <link linkend='var-NOISO'><filename>NOISO</filename></link> variable to
1270 "0" and the build system would use the <filename>image-live</filename>
1271 class to build the ISO image.
1272 </para>
1273</section>
1274
1275<section id='ref-classes-image-mklibs'>
1276 <title><filename>image-mklibs.bbclass</filename></title>
1277
1278 <para>
1279 The <filename>image-mklibs</filename> class
1280 enables the use of the <filename>mklibs</filename> utility during the
1281 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
1282 task, which optimizes the size of
1283 libraries contained in the image.
1284 </para>
1285
1286 <para>
1287 By default, the class is enabled in the
1288 <filename>local.conf.template</filename> using the
1289 <link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link>
1290 variable as follows:
1291 <literallayout class='monospaced'>
1292 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
1293 </literallayout>
1294 </para>
1295</section>
1296
1297<section id='ref-classes-image-prelink'>
1298 <title><filename>image-prelink.bbclass</filename></title>
1299
1300 <para>
1301 The <filename>image-prelink</filename> class
1302 enables the use of the <filename>prelink</filename> utility during
1303 the
1304 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
1305 task, which optimizes the dynamic
1306 linking of shared libraries to reduce executable startup time.
1307 </para>
1308
1309 <para>
1310 By default, the class is enabled in the
1311 <filename>local.conf.template</filename> using the
1312 <link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link>
1313 variable as follows:
1314 <literallayout class='monospaced'>
1315 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
1316 </literallayout>
1317 </para>
1318</section>
1319
1320<section id='ref-classes-image-swab'>
1321 <title><filename>image-swab.bbclass</filename></title>
1322
1323 <para>
1324 The <filename>image-swab</filename> class enables the
1325 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/swabber'>Swabber</ulink>
1326 tool in order to detect and log accesses to the host system during
1327 the OpenEmbedded build process.
1328 <note>
1329 This class is currently unmaintained.
1330 </note>
1331 </para>
1332</section>
1333
1334<section id='ref-classes-image-vmdk'>
1335 <title><filename>image-vmdk.bbclass</filename></title>
1336
1337 <para>
1338 The <filename>image-vmdk</filename> class supports building VMware
1339 VMDK images.
1340 Normally, you do not use this class directly.
1341 Instead, you add "vmdk" to
1342 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>.
1343 </para>
1344</section>
1345
1346<section id='ref-classes-insane'>
1347 <title><filename>insane.bbclass</filename></title>
1348
1349 <para>
1350 The <filename>insane</filename> class adds a step to the package
1351 generation process so that output quality assurance checks are
1352 generated by the OpenEmbedded build system.
1353 A range of checks are performed that check the build's output
1354 for common problems that show up during runtime.
1355 Distribution policy usually dictates whether to include this class.
1356 </para>
1357
1358 <para>
1359 You can configure the sanity checks so that specific test failures
1360 either raise a warning or an error message.
1361 Typically, failures for new tests generate a warning.
1362 Subsequent failures for the same test would then generate an error
1363 message once the metadata is in a known and good condition.
1364 See the
1365 "<link linkend='ref-qa-checks'>QA Error and Warning Messages</link>"
1366 Chapter for a list of all the warning and error messages
1367 you might encounter using a default configuration.
1368 </para>
1369
1370 <para>
1371 Use the
1372 <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link> and
1373 <link linkend='var-ERROR_QA'><filename>ERROR_QA</filename></link>
1374 variables to control the behavior of
1375 these checks at the global level (i.e. in your custom distro
1376 configuration).
1377 However, to skip one or more checks in recipes, you should use
1378 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>.
1379 For example, to skip the check for symbolic link
1380 <filename>.so</filename> files in the main package of a recipe,
1381 add the following to the recipe.
1382 You need to realize that the package name override, in this example
1383 <filename>${PN}</filename>, must be used:
1384 <literallayout class='monospaced'>
1385 INSANE_SKIP_${PN} += "dev-so"
1386 </literallayout>
1387 Please keep in mind that the QA checks exist in order to detect real
1388 or potential problems in the packaged output.
1389 So exercise caution when disabling these checks.
1390 </para>
1391
1392 <para>
1393 The following list shows the tests you can list with the
1394 <filename>WARN_QA</filename> and <filename>ERROR_QA</filename>
1395 variables:
1396 <itemizedlist>
1397 <listitem><para><emphasis><filename>already-stripped:</filename></emphasis>
1398 Checks that produced binaries have not already been
1399 stripped prior to the build system extracting debug symbols.
1400 It is common for upstream software projects to default to
1401 stripping debug symbols for output binaries.
1402 In order for debugging to work on the target using
1403 <filename>-dbg</filename> packages, this stripping must be
1404 disabled.
1405 </para></listitem>
1406 <listitem><para><emphasis><filename>arch:</filename></emphasis>
1407 Checks the Executable and Linkable Format (ELF) type, bit size,
1408 and endianness of any binaries to ensure they match the target
1409 architecture.
1410 This test fails if any binaries do not match the type since
1411 there would be an incompatibility.
1412 The test could indicate that the
1413 wrong compiler or compiler options have been used.
1414 Sometimes software, like bootloaders, might need to bypass
1415 this check.
1416 </para></listitem>
1417 <listitem><para><emphasis><filename>buildpaths:</filename></emphasis>
1418 Checks for paths to locations on the build host inside the
1419 output files.
1420 Currently, this test triggers too many false positives and
1421 thus is not normally enabled.
1422 </para></listitem>
1423 <listitem><para><emphasis><filename>build-deps:</filename></emphasis>
1424 Determines if a build-time dependency that is specified through
1425 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>,
1426 explicit
1427 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
1428 or task-level dependencies exists to match any runtime
1429 dependency.
1430 This determination is particularly useful to discover where
1431 runtime dependencies are detected and added during packaging.
1432 If no explicit dependency has been specified within the
1433 metadata, at the packaging stage it is too late to ensure that
1434 the dependency is built, and thus you can end up with an
1435 error when the package is installed into the image during the
1436 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
1437 task because the auto-detected dependency was not satisfied.
1438 An example of this would be where the
1439 <link linkend='ref-classes-update-rc.d'><filename>update-rc.d</filename></link>
1440 class automatically adds a dependency on the
1441 <filename>initscripts-functions</filename> package to packages
1442 that install an initscript that refers to
1443 <filename>/etc/init.d/functions</filename>.
1444 The recipe should really have an explicit
1445 <filename>RDEPENDS</filename> for the package in question on
1446 <filename>initscripts-functions</filename> so that the
1447 OpenEmbedded build system is able to ensure that the
1448 <filename>initscripts</filename> recipe is actually built and
1449 thus the <filename>initscripts-functions</filename> package is
1450 made available.
1451 </para></listitem>
1452 <listitem><para><emphasis><filename>compile-host-path:</filename></emphasis>
1453 Checks the
1454 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
1455 log for indications
1456 that paths to locations on the build host were used.
1457 Using such paths might result in host contamination of the
1458 build output.
1459 </para></listitem>
1460 <listitem><para><emphasis><filename>debug-deps:</filename></emphasis>
1461 Checks that all packages except <filename>-dbg</filename>
1462 packages do not depend on <filename>-dbg</filename>
1463 packages, which would cause a packaging bug.
1464 </para></listitem>
1465 <listitem><para><emphasis><filename>debug-files:</filename></emphasis>
1466 Checks for <filename>.debug</filename> directories in anything but the
1467 <filename>-dbg</filename> package.
1468 The debug files should all be in the <filename>-dbg</filename> package.
1469 Thus, anything packaged elsewhere is incorrect packaging.</para></listitem>
1470 <listitem><para><emphasis><filename>dep-cmp:</filename></emphasis>
1471 Checks for invalid version comparison statements in runtime
1472 dependency relationships between packages (i.e. in
1473 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
1474 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
1475 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
1476 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
1477 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
1478 and
1479 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>
1480 variable values).
1481 Any invalid comparisons might trigger failures or undesirable
1482 behavior when passed to the package manager.
1483 </para></listitem>
1484 <listitem><para><emphasis><filename>desktop:</filename></emphasis>
1485 Runs the <filename>desktop-file-validate</filename> program
1486 against any <filename>.desktop</filename> files to validate
1487 their contents against the specification for
1488 <filename>.desktop</filename> files.</para></listitem>
1489 <listitem><para><emphasis><filename>dev-deps:</filename></emphasis>
1490 Checks that all packages except <filename>-dev</filename>
1491 or <filename>-staticdev</filename> packages do not depend on
1492 <filename>-dev</filename> packages, which would be a
1493 packaging bug.</para></listitem>
1494 <listitem><para><emphasis><filename>dev-so:</filename></emphasis>
1495 Checks that the <filename>.so</filename> symbolic links are in the
1496 <filename>-dev</filename> package and not in any of the other packages.
1497 In general, these symlinks are only useful for development purposes.
1498 Thus, the <filename>-dev</filename> package is the correct location for
1499 them.
1500 Some very rare cases do exist for dynamically loaded modules where
1501 these symlinks are needed instead in the main package.
1502 </para></listitem>
1503 <listitem><para><emphasis><filename>file-rdeps:</filename></emphasis>
1504 Checks that file-level dependencies identified by the
1505 OpenEmbedded build system at packaging time are satisfied.
1506 For example, a shell script might start with the line
1507 <filename>#!/bin/bash</filename>.
1508 This line would translate to a file dependency on
1509 <filename>/bin/bash</filename>.
1510 Of the three package managers that the OpenEmbedded build
1511 system supports, only RPM directly handles file-level
1512 dependencies, resolving them automatically to packages
1513 providing the files.
1514 However, the lack of that functionality in the other two
1515 package managers does not mean the dependencies do not still
1516 need resolving.
1517 This QA check attempts to ensure that explicitly declared
1518 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
1519 exist to handle any file-level dependency detected in
1520 packaged files.
1521 </para></listitem>
1522 <listitem><para><emphasis><filename>files-invalid:</filename></emphasis>
1523 Checks for
1524 <link linkend='var-FILES'><filename>FILES</filename></link>
1525 variable values that contain "//", which is invalid.
1526 </para></listitem>
1527 <listitem><para><emphasis><filename>incompatible-license:</filename></emphasis>
1528 Report when packages are excluded from being created due to
1529 being marked with a license that is in
1530 <link linkend='var-INCOMPATIBLE_LICENSE'><filename>INCOMPATIBLE_LICENSE</filename></link>.
1531 </para></listitem>
1532 <listitem><para><emphasis><filename>install-host-path:</filename></emphasis>
1533 Checks the
1534 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
1535 log for indications
1536 that paths to locations on the build host were used.
1537 Using such paths might result in host contamination of the
1538 build output.
1539 </para></listitem>
1540 <listitem><para><emphasis><filename>installed-vs-shipped:</filename></emphasis>
1541 Reports when files have been installed within
1542 <filename>do_install</filename> but have not been included in
1543 any package by way of the
1544 <link linkend='var-FILES'><filename>FILES</filename></link>
1545 variable.
1546 Files that do not appear in any package cannot be present in
1547 an image later on in the build process.
1548 Ideally, all installed files should be packaged or not
1549 installed at all.
1550 These files can be deleted at the end of
1551 <filename>do_install</filename> if the files are not
1552 needed in any package.
1553 </para></listitem>
1554 <listitem><para><emphasis><filename>la:</filename></emphasis>
1555 Checks <filename>.la</filename> files for any <filename>TMPDIR</filename>
1556 paths.
1557 Any <filename>.la</filename> file containing these paths is incorrect since
1558 <filename>libtool</filename> adds the correct sysroot prefix when using the
1559 files automatically itself.</para></listitem>
1560 <listitem><para><emphasis><filename>ldflags:</filename></emphasis>
1561 Ensures that the binaries were linked with the
1562 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
1563 options provided by the build system.
1564 If this test fails, check that the <filename>LDFLAGS</filename> variable
1565 is being passed to the linker command.</para></listitem>
1566 <listitem><para><emphasis><filename>libdir:</filename></emphasis>
1567 Checks for libraries being installed into incorrect
1568 (possibly hardcoded) installation paths.
1569 For example, this test will catch recipes that install
1570 <filename>/lib/bar.so</filename> when
1571 <filename>${base_libdir}</filename> is "lib32".
1572 Another example is when recipes install
1573 <filename>/usr/lib64/foo.so</filename> when
1574 <filename>${libdir}</filename> is "/usr/lib".
1575 </para></listitem>
1576 <listitem><para><emphasis><filename>libexec:</filename></emphasis>
1577 Checks if a package contains files in
1578 <filename>/usr/libexec</filename>.
1579 This check is not performed if the
1580 <filename>libexecdir</filename> variable has been set
1581 explicitly to <filename>/usr/libexec</filename>.
1582 </para></listitem>
1583 <listitem><para><emphasis><filename>packages-list:</filename></emphasis>
1584 Checks for the same package being listed multiple times through
1585 the <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
1586 variable value.
1587 Installing the package in this manner can cause errors during
1588 packaging.
1589 </para></listitem>
1590 <listitem><para><emphasis><filename>perm-config:</filename></emphasis>
1591 Reports lines in <filename>fs-perms.txt</filename> that have
1592 an invalid format.
1593 </para></listitem>
1594 <listitem><para><emphasis><filename>perm-line:</filename></emphasis>
1595 Reports lines in <filename>fs-perms.txt</filename> that have
1596 an invalid format.
1597 </para></listitem>
1598 <listitem><para><emphasis><filename>perm-link:</filename></emphasis>
1599 Reports lines in <filename>fs-perms.txt</filename> that
1600 specify 'link' where the specified target already exists.
1601 </para></listitem>
1602 <listitem><para><emphasis><filename>perms:</filename></emphasis>
1603 Currently, this check is unused but reserved.
1604 </para></listitem>
1605 <listitem><para><emphasis><filename>pkgconfig:</filename></emphasis>
1606 Checks <filename>.pc</filename> files for any
1607 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>/<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
1608 paths.
1609 Any <filename>.pc</filename> file containing these paths is incorrect
1610 since <filename>pkg-config</filename> itself adds the correct sysroot prefix
1611 when the files are accessed.</para></listitem>
1612 <listitem><para><emphasis><filename>pkgname:</filename></emphasis>
1613 Checks that all packages in
1614 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
1615 have names that do not contain invalid characters (i.e.
1616 characters other than 0-9, a-z, ., +, and -).
1617 </para></listitem>
1618 <listitem><para><emphasis><filename>pkgv-undefined:</filename></emphasis>
1619 Checks to see if the <filename>PKGV</filename> variable
1620 is undefined during
1621 <link linkend='ref-tasks-package'><filename>do_package</filename></link>.
1622 </para></listitem>
1623 <listitem><para><emphasis><filename>pkgvarcheck:</filename></emphasis>
1624 Checks through the variables
1625 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
1626 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
1627 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
1628 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>,
1629 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
1630 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
1631 <link linkend='var-FILES'><filename>FILES</filename></link>,
1632 <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>,
1633 <filename>pkg_preinst</filename>,
1634 <filename>pkg_postinst</filename>,
1635 <filename>pkg_prerm</filename>
1636 and <filename>pkg_postrm</filename>, and reports if there are
1637 variable sets that are not package-specific.
1638 Using these variables without a package suffix is bad practice,
1639 and might unnecessarily complicate dependencies of other packages
1640 within the same recipe or have other unintended consequences.
1641 </para></listitem>
1642 <listitem><para><emphasis><filename>pn-overrides:</filename></emphasis>
1643 Checks that a recipe does not have a name
1644 (<link linkend='var-PN'><filename>PN</filename></link>) value
1645 that appears in
1646 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
1647 If a recipe is named such that its <filename>PN</filename>
1648 value matches something already in
1649 <filename>OVERRIDES</filename> (e.g. <filename>PN</filename>
1650 happens to be the same as
1651 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
1652 or
1653 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>),
1654 it can have unexpected consequences.
1655 For example, assignments such as
1656 <filename>FILES_${PN} = "xyz"</filename> effectively turn into
1657 <filename>FILES = "xyz"</filename>.
1658 </para></listitem>
1659 <listitem><para><emphasis><filename>rpaths:</filename></emphasis>
1660 Checks for rpaths in the binaries that contain build system paths such
1661 as <filename>TMPDIR</filename>.
1662 If this test fails, bad <filename>-rpath</filename> options are being
1663 passed to the linker commands and your binaries have potential security
1664 issues.</para></listitem>
1665 <listitem><para><emphasis><filename>split-strip:</filename></emphasis>
1666 Reports that splitting or stripping debug symbols from binaries
1667 has failed.
1668 </para></listitem>
1669 <listitem><para><emphasis><filename>staticdev:</filename></emphasis>
1670 Checks for static library files (<filename>*.a</filename>) in
1671 non-<filename>staticdev</filename> packages.
1672 </para></listitem>
1673 <listitem><para><emphasis><filename>symlink-to-sysroot:</filename></emphasis>
1674 Checks for symlinks in packages that point into
1675 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
1676 on the host.
1677 Such symlinks will work on the host, but are clearly invalid
1678 when running on the target.
1679 </para></listitem>
1680 <listitem><para><emphasis><filename>textrel:</filename></emphasis>
1681 Checks for ELF binaries that contain relocations in their
1682 <filename>.text</filename> sections, which can result in a
1683 performance impact at runtime.</para></listitem>
1684 <listitem><para><emphasis><filename>unsafe-references-in-binaries:</filename></emphasis>
1685 Reports when a binary installed in
1686 <filename>${base_libdir}</filename>,
1687 <filename>${base_bindir}</filename>, or
1688 <filename>${base_sbindir}</filename>, depends on another
1689 binary installed under <filename>${exec_prefix}</filename>.
1690 This dependency is a concern if you want the system to remain
1691 basically operable if <filename>/usr</filename> is mounted
1692 separately and is not mounted.
1693 <note>
1694 Defaults for binaries installed in
1695 <filename>${base_libdir}</filename>,
1696 <filename>${base_bindir}</filename>, and
1697 <filename>${base_sbindir}</filename> are
1698 <filename>/lib</filename>, <filename>/bin</filename>, and
1699 <filename>/sbin</filename>, respectively.
1700 The default for a binary installed
1701 under <filename>${exec_prefix}</filename> is
1702 <filename>/usr</filename>.
1703 </note>
1704 </para></listitem>
1705 <listitem><para><emphasis><filename>unsafe-references-in-scripts:</filename></emphasis>
1706 Reports when a script file installed in
1707 <filename>${base_libdir}</filename>,
1708 <filename>${base_bindir}</filename>, or
1709 <filename>${base_sbindir}</filename>, depends on files
1710 installed under <filename>${exec_prefix}</filename>.
1711 This dependency is a concern if you want the system to remain
1712 basically operable if <filename>/usr</filename> is mounted
1713 separately and is not mounted.
1714 <note>
1715 Defaults for binaries installed in
1716 <filename>${base_libdir}</filename>,
1717 <filename>${base_bindir}</filename>, and
1718 <filename>${base_sbindir}</filename> are
1719 <filename>/lib</filename>, <filename>/bin</filename>, and
1720 <filename>/sbin</filename>, respectively.
1721 The default for a binary installed
1722 under <filename>${exec_prefix}</filename> is
1723 <filename>/usr</filename>.
1724 </note>
1725 </para></listitem>
1726 <listitem><para><emphasis><filename>useless-rpaths:</filename></emphasis>
1727 Checks for dynamic library load paths (rpaths) in the binaries that
1728 by default on a standard system are searched by the linker (e.g.
1729 <filename>/lib</filename> and <filename>/usr/lib</filename>).
1730 While these paths will not cause any breakage, they do waste space and
1731 are unnecessary.</para></listitem>
1732 <listitem><para><emphasis><filename>var-undefined:</filename></emphasis>
1733 Reports when variables fundamental to packaging (i.e.
1734 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
1735 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>,
1736 <link linkend='var-D'><filename>D</filename></link>,
1737 <link linkend='var-PN'><filename>PN</filename></link>, and
1738 <link linkend='var-PKGD'><filename>PKGD</filename></link>) are
1739 undefined during
1740 <link linkend='ref-tasks-package'><filename>do_package</filename></link>.
1741 </para></listitem>
1742 <listitem><para><emphasis><filename>version-going-backwards:</filename></emphasis>
1743 If Build History is enabled, reports when a package
1744 being written out has a lower version than the previously
1745 written package under the same name.
1746 If you are placing output packages into a feed and
1747 upgrading packages on a target system using that feed, the
1748 version of a package going backwards can result in the target
1749 system not correctly upgrading to the "new" version of the
1750 package.
1751 <note>
1752 If you are not using runtime package management on your
1753 target system, then you do not need to worry about
1754 this situation.
1755 </note>
1756 </para></listitem>
1757 <listitem><para><emphasis><filename>xorg-driver-abi:</filename></emphasis>
1758 Checks that all packages containing Xorg drivers have ABI
1759 dependencies.
1760 The <filename>xserver-xorg</filename> recipe provides driver
1761 ABI names.
1762 All drivers should depend on the ABI versions that they have
1763 been built against.
1764 Driver recipes that include
1765 <filename>xorg-driver-input.inc</filename>
1766 or <filename>xorg-driver-video.inc</filename> will
1767 automatically get these versions.
1768 Consequently, you should only need to explicitly add
1769 dependencies to binary driver recipes.
1770 </para></listitem>
1771 </itemizedlist>
1772 </para>
1773</section>
1774
1775<section id='ref-classes-insserv'>
1776 <title><filename>insserv.bbclass</filename></title>
1777
1778 <para>
1779 The <filename>insserv</filename> class
1780 uses the <filename>insserv</filename> utility to update the order of
1781 symbolic links in <filename>/etc/rc?.d/</filename> within an image
1782 based on dependencies specified by LSB headers in the
1783 <filename>init.d</filename> scripts themselves.
1784 </para>
1785</section>
1786
1787<section id='ref-classes-kernel'>
1788 <title><filename>kernel.bbclass</filename></title>
1789
1790 <para>
1791 The <filename>kernel</filename> class handles building Linux kernels.
1792 The class contains code to build all kernel trees.
1793 All needed headers are staged into the
1794 <filename><link linkend='var-STAGING_KERNEL_DIR'>STAGING_KERNEL_DIR</link></filename>
1795 directory to allow out-of-tree module builds using
1796 the
1797 <link linkend='ref-classes-module'><filename>module</filename></link>
1798 class.
1799 </para>
1800
1801 <para>
1802 This means that each built kernel module is packaged separately and inter-module
1803 dependencies are created by parsing the <filename>modinfo</filename> output.
1804 If all modules are required, then installing the <filename>kernel-modules</filename>
1805 package installs all packages with modules and various other kernel packages
1806 such as <filename>kernel-vmlinux</filename>.
1807 </para>
1808
1809 <para>
1810 Various other classes are used by the <filename>kernel</filename>
1811 and <filename>module</filename> classes internally including the
1812 <link linkend='ref-classes-kernel-arch'><filename>kernel-arch</filename></link>,
1813 <link linkend='ref-classes-module-base'><filename>module-base</filename></link>,
1814 and
1815 <link linkend='ref-classes-linux-kernel-base'><filename>linux-kernel-base</filename></link>
1816 classes.
1817 </para>
1818</section>
1819
1820<section id='ref-classes-kernel-arch'>
1821 <title><filename>kernel-arch.bbclass</filename></title>
1822
1823 <para>
1824 The <filename>kernel-arch</filename> class
1825 sets the <filename>ARCH</filename> environment variable for Linux
1826 kernel compilation (including modules).
1827 </para>
1828</section>
1829
1830<section id='ref-classes-kernel-module-split'>
1831 <title><filename>kernel-module-split.bbclass</filename></title>
1832
1833 <para>
1834 The <filename>kernel-module-split</filename> class
1835 provides common functionality for splitting Linux kernel modules into
1836 separate packages.
1837 </para>
1838</section>
1839
1840<section id='ref-classes-kernel-yocto'>
1841 <title><filename>kernel-yocto.bbclass</filename></title>
1842
1843 <para>
1844 The <filename>kernel-yocto</filename> class
1845 provides common functionality for building from linux-yocto style
1846 kernel source repositories.
1847 </para>
1848</section>
1849
1850<section id='ref-classes-lib_package'>
1851 <title><filename>lib_package.bbclass</filename></title>
1852
1853 <para>
1854 The <filename>lib_package</filename> class
1855 supports recipes that build libraries and produce executable
1856 binaries, where those binaries should not be installed by default
1857 along with the library.
1858 Instead, the binaries are added to a separate
1859 <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-bin</filename>
1860 package to make their installation optional.
1861 </para>
1862</section>
1863
1864<section id='ref-classes-license'>
1865 <title><filename>license.bbclass</filename></title>
1866
1867 <para>
1868 The <filename>license</filename> class provides license
1869 manifest creation and license exclusion.
1870 This class is enabled by default using the default value for the
1871 <link linkend='var-INHERIT_DISTRO'><filename>INHERIT_DISTRO</filename></link>
1872 variable.
1873 </para>
1874</section>
1875
1876<section id='ref-classes-linux-kernel-base'>
1877 <title><filename>linux-kernel-base.bbclass</filename></title>
1878
1879 <para>
1880 The <filename>linux-kernel-base</filename> class
1881 provides common functionality for recipes that build out of the Linux
1882 kernel source tree.
1883 These builds goes beyond the kernel itself.
1884 For example, the Perf recipe also inherits this class.
1885 </para>
1886</section>
1887
1888<section id='ref-classes-logging'>
1889 <title><filename>logging.bbclass</filename></title>
1890
1891 <para>
1892 The <filename>logging</filename> class provides the standard
1893 shell functions used to log messages for various BitBake severity levels
1894 (i.e. <filename>bbplain</filename>, <filename>bbnote</filename>,
1895 <filename>bbwarn</filename>, <filename>bberror</filename>,
1896 <filename>bbfatal</filename>, and <filename>bbdebug</filename>).
1897 </para>
1898
1899 <para>
1900 This class is enabled by default since it is inherited by
1901 the <filename>base</filename> class.
1902 </para>
1903</section>
1904
1905<section id='ref-classes-meta'>
1906 <title><filename>meta.bbclass</filename></title>
1907
1908 <para>
1909 The <filename>meta</filename> class is inherited by recipes
1910 that do not build any output packages themselves, but act as a "meta"
1911 target for building other recipes.
1912 </para>
1913</section>
1914
1915<section id='ref-classes-metadata_scm'>
1916 <title><filename>metadata_scm.bbclass</filename></title>
1917
1918 <para>
1919 The <filename>metadata_scm</filename> class provides functionality for
1920 querying the branch and revision of a Source Code Manager (SCM)
1921 repository.
1922 </para>
1923
1924 <para>
1925 The <link linkend='ref-classes-base'><filename>base</filename></link>
1926 class uses this class to print the revisions of each layer before
1927 starting every build.
1928 The <filename>metadata_scm</filename> class is enabled by default
1929 because it is inherited by the <filename>base</filename> class.
1930 </para>
1931</section>
1932
1933<section id='ref-classes-mime'>
1934 <title><filename>mime.bbclass</filename></title>
1935
1936 <para>
1937 The <filename>mime</filename> class generates the proper
1938 post-install and post-remove (postinst/postrm) scriptlets for packages
1939 that install MIME type files.
1940 These scriptlets call <filename>update-mime-database</filename> to add
1941 the MIME types to the shared database.
1942 </para>
1943</section>
1944
1945<section id='ref-classes-mirrors'>
1946 <title><filename>mirrors.bbclass</filename></title>
1947
1948 <para>
1949 The <filename>mirrors</filename> class sets up some standard
1950 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link> entries
1951 for source code mirrors.
1952 These mirrors provide a fall-back path in case the upstream source
1953 specified in
1954 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
1955 within recipes is unavailable.
1956 </para>
1957
1958 <para>
1959 This class is enabled by default since it is inherited by the
1960 <link linkend='ref-classes-base'><filename>base</filename></link> class.
1961 </para>
1962</section>
1963
1964<section id='ref-classes-module'>
1965 <title><filename>module.bbclass</filename></title>
1966
1967 <para>
1968 The <filename>module</filename> class provides support for building
1969 out-of-tree Linux kernel modules.
1970 The class inherits the
1971 <link linkend='ref-classes-module-base'><filename>module-base</filename></link>
1972 and
1973 <link linkend='ref-classes-kernel-module-split'><filename>kernel-module-split</filename></link>
1974 classes, and implements the
1975 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
1976 and
1977 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
1978 tasks.
1979 The class provides everything needed to build and package a kernel
1980 module.
1981 </para>
1982
1983 <para>
1984 For general information on out-of-tree Linux kernel modules, see the
1985 "<ulink url='&YOCTO_DOCS_KERNEL_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
1986 section in the Yocto Project Linux Kernel Development Manual.
1987 </para>
1988</section>
1989
1990<section id='ref-classes-module-base'>
1991 <title><filename>module-base.bbclass</filename></title>
1992
1993 <para>
1994 The <filename>module-base</filename> class provides the base
1995 functionality for building Linux kernel modules.
1996 Typically, a recipe that builds software that includes one or
1997 more kernel modules and has its own means of building
1998 the module inherits this class as opposed to inheriting the
1999 <link linkend='ref-classes-module'><filename>module</filename></link>
2000 class.
2001 </para>
2002</section>
2003
2004<section id='ref-classes-multilib*'>
2005 <title><filename>multilib*.bbclass</filename></title>
2006
2007 <para>
2008 The <filename>multilib*</filename> classes provide support
2009 for building libraries with different target optimizations or target
2010 architectures and installing them side-by-side in the same image.
2011 </para>
2012
2013 <para>
2014 For more information on using the Multilib feature, see the
2015 "<ulink url='&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image'>Combining Multiple Versions of Library Files into One Image</ulink>"
2016 section in the Yocto Project Development Manual.
2017 </para>
2018</section>
2019
2020<section id='ref-classes-native'>
2021 <title><filename>native.bbclass</filename></title>
2022
2023 <para>
2024 The <filename>native</filename> class provides common
2025 functionality for recipes that wish to build tools to run on the build
2026 host (i.e. tools that use the compiler or other tools from the
2027 build host).
2028 </para>
2029
2030 <para>
2031 You can create a recipe that builds tools that run natively on the
2032 host a couple different ways:
2033 <itemizedlist>
2034 <listitem><para>Create a <replaceable>myrecipe</replaceable><filename>-native.bb</filename>
2035 that inherits the <filename>native</filename> class.
2036 If you use this method, you must order the inherit statement
2037 in the recipe after all other inherit statements so that the
2038 <filename>native</filename> class is inherited last.
2039 </para></listitem>
2040 <listitem><para>Create or modify a target recipe that contains
2041 the following:
2042 <literallayout class='monospaced'>
2043 <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> = "native"
2044 </literallayout>
2045 Inside the recipe, use <filename>_class-native</filename> and
2046 <filename>_class-target</filename> overrides to specify any
2047 functionality specific to the respective native or target
2048 case.</para></listitem>
2049 </itemizedlist>
2050 </para>
2051
2052 <para>
2053 Although applied differently, the <filename>native</filename> class is
2054 used with both methods.
2055 The advantage of the second method is that you do not need to have two
2056 separate recipes (assuming you need both) for native and target.
2057 All common parts of the recipe are automatically shared.
2058 </para>
2059</section>
2060
2061<section id='ref-classes-nativesdk'>
2062 <title><filename>nativesdk.bbclass</filename></title>
2063
2064 <para>
2065 The <filename>nativesdk</filename> class provides common
2066 functionality for recipes that wish to build tools to run as part of
2067 an SDK (i.e. tools that run on
2068 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>).
2069 </para>
2070
2071 <para>
2072 You can create a recipe that builds tools that run on the SDK machine
2073 a couple different ways:
2074 <itemizedlist>
2075 <listitem><para>Create a <replaceable>myrecipe</replaceable><filename>-nativesdk.bb</filename>
2076 recipe that inherits the <filename>nativesdk</filename> class.
2077 If you use this method, you must order the inherit statement
2078 in the recipe after all other inherit statements so that the
2079 <filename>nativesdk</filename> class is inherited last.
2080 </para></listitem>
2081 <listitem><para>Create a <filename>nativesdk</filename> variant
2082 of any recipe by adding the following:
2083 <literallayout class='monospaced'>
2084 <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> = "nativesdk"
2085 </literallayout>
2086 Inside the recipe, use <filename>_class-nativesdk</filename> and
2087 <filename>_class-target</filename> overrides to specify any
2088 functionality specific to the respective SDK machine or target
2089 case.</para></listitem>
2090 </itemizedlist>
2091 </para>
2092
2093 <para>
2094 Although applied differently, the <filename>nativesdk</filename> class
2095 is used with both methods.
2096 The advantage of the second method is that you do not need to have two
2097 separate recipes (assuming you need both) for the SDK machine and the
2098 target.
2099 All common parts of the recipe are automatically shared.
2100 </para>
2101</section>
2102
2103<section id='ref-classes-oelint'>
2104 <title><filename>oelint.bbclass</filename></title>
2105
2106 <para>
2107 The <filename>oelint</filename> class is an
2108 obsolete lint checking tool that exists in
2109 <filename>meta/classes</filename> in the
2110 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
2111 </para>
2112
2113 <para>
2114 A number of classes exist that are could be generally useful in
2115 OE-Core but are never actually used within OE-Core itself.
2116 The <filename>oelint</filename> class is one such example.
2117 However, being aware of this class can reduce the proliferation of
2118 different versions of similar classes across multiple layers.
2119 </para>
2120</section>
2121
2122<section id='ref-classes-own-mirrors'>
2123 <title><filename>own-mirrors.bbclass</filename></title>
2124
2125 <para>
2126 The <filename>own-mirrors</filename> class makes it
2127 easier to set up your own
2128 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
2129 from which to first fetch source before attempting to fetch it from the
2130 upstream specified in
2131 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
2132 within each recipe.
2133 </para>
2134
2135 <para>
2136 To use this class, inherit it globally and specify
2137 <link linkend='var-SOURCE_MIRROR_URL'><filename>SOURCE_MIRROR_URL</filename></link>.
2138 Here is an example:
2139 <literallayout class='monospaced'>
2140 INHERIT += "own-mirrors"
2141 SOURCE_MIRROR_URL = "http://example.com/my-source-mirror"
2142 </literallayout>
2143 You can specify only a single URL in
2144 <filename>SOURCE_MIRROR_URL</filename>.
2145 </para>
2146</section>
2147
2148<section id='ref-classes-package'>
2149 <title><filename>package.bbclass</filename></title>
2150
2151 <para>
2152 The <filename>package</filename> class supports generating
2153 packages from a build's output.
2154 The core generic functionality is in
2155 <filename>package.bbclass</filename>.
2156 The code specific to particular package types resides in these
2157 package-specific classes:
2158 <link linkend='ref-classes-package_deb'><filename>package_deb</filename></link>,
2159 <link linkend='ref-classes-package_rpm'><filename>package_rpm</filename></link>,
2160 <link linkend='ref-classes-package_ipk'><filename>package_ipk</filename></link>,
2161 and
2162 <link linkend='ref-classes-package_tar'><filename>package_tar</filename></link>.
2163 </para>
2164
2165 <para>
2166 You can control the list of resulting package formats by using the
2167 <filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></filename>
2168 variable defined in your <filename>conf/local.conf</filename>
2169 configuration file, which is located in the
2170 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
2171 When defining the variable, you can specify one or more package types.
2172 Since images are generated from packages, a packaging class is
2173 needed to enable image generation.
2174 The first class listed in this variable is used for image generation.
2175 </para>
2176
2177 <para>
2178 If you take the optional step to set up a repository (package feed)
2179 on the development host that can be used by Smart, you can
2180 install packages from the feed while you are running the image
2181 on the target (i.e. runtime installation of packages).
2182 For more information, see the
2183 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-runtime-package-management'>Using Runtime Package Management</ulink>"
2184 section in the Yocto Project Development Manual.
2185 </para>
2186
2187 <para>
2188 The package-specific class you choose can affect build-time performance
2189 and has space ramifications.
2190 In general, building a package with IPK takes about thirty percent less
2191 time as compared to using RPM to build the same or similar package.
2192 This comparison takes into account a complete build of the package with
2193 all dependencies previously built.
2194 The reason for this discrepancy is because the RPM package manager
2195 creates and processes more
2196 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> than the
2197 IPK package manager.
2198 Consequently, you might consider setting
2199 <filename>PACKAGE_CLASSES</filename> to "package_ipk" if you are
2200 building smaller systems.
2201 </para>
2202
2203 <para>
2204 Before making your package manager decision, however, you should
2205 consider some further things about using RPM:
2206 <itemizedlist>
2207 <listitem><para>
2208 RPM starts to provide more abilities than IPK due to
2209 the fact that it processes more Metadata.
2210 For example, this information includes individual file types,
2211 file checksum generation and evaluation on install, sparse file
2212 support, conflict detection and resolution for Multilib systems,
2213 ACID style upgrade, and repackaging abilities for rollbacks.
2214 </para></listitem>
2215 <listitem><para>
2216 For smaller systems, the extra space used for the Berkeley
2217 Database and the amount of metadata when using RPM can affect
2218 your ability to perform on-device upgrades.
2219 </para></listitem>
2220 </itemizedlist>
2221 </para>
2222
2223 <para>
2224 You can find additional information on the effects of the package
2225 class at these two Yocto Project mailing list links:
2226 <itemizedlist>
2227 <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006362.html'>
2228 https://lists.yoctoproject.org/pipermail/poky/2011-May/006362.html</ulink></para></listitem>
2229 <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006363.html'>
2230 https://lists.yoctoproject.org/pipermail/poky/2011-May/006363.html</ulink></para></listitem>
2231 </itemizedlist>
2232 </para>
2233</section>
2234
2235<section id='ref-classes-package_deb'>
2236 <title><filename>package_deb.bbclass</filename></title>
2237
2238 <para>
2239 The <filename>package_deb</filename> class
2240 provides support for creating packages that use the
2241 <filename>.deb</filename> file format.
2242 The class ensures the packages are written out to the
2243 <filename>${</filename><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link><filename>}/deb</filename>
2244 directory in a <filename>.deb</filename> file format.
2245 </para>
2246
2247 <para>
2248 This class inherits the
2249 <link linkend='ref-classes-package'><filename>package</filename></link>
2250 class and is enabled through the
2251 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
2252 variable in the <filename>local.conf</filename> file.
2253 </para>
2254</section>
2255
2256<section id='ref-classes-package_ipk'>
2257 <title><filename>package_ipk.bbclass</filename></title>
2258
2259 <para>
2260 The <filename>package_ipk</filename> class
2261 provides support for creating packages that use the
2262 <filename>.ipk</filename> file format.
2263 The class ensures the packages are written out to the
2264 <filename>${</filename><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link><filename>}/ipk</filename>
2265 directory in a <filename>.ipk</filename> file format.
2266 </para>
2267
2268 <para>
2269 This class inherits the
2270 <link linkend='ref-classes-package'><filename>package</filename></link>
2271 class and is enabled through the
2272 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
2273 variable in the <filename>local.conf</filename> file.
2274 </para>
2275</section>
2276
2277<section id='ref-classes-package_rpm'>
2278 <title><filename>package_rpm.bbclass</filename></title>
2279
2280 <para>
2281 The <filename>package_rpm</filename> class
2282 provides support for creating packages that use the
2283 <filename>.rpm</filename> file format.
2284 The class ensures the packages are written out to the
2285 <filename>${</filename><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link><filename>}/rpm</filename>
2286 directory in a <filename>.rpm</filename> file format.
2287 </para>
2288
2289 <para>
2290 This class inherits the
2291 <link linkend='ref-classes-package'><filename>package</filename></link>
2292 class and is enabled through the
2293 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
2294 variable in the <filename>local.conf</filename> file.
2295 </para>
2296</section>
2297
2298<section id='ref-classes-package_tar'>
2299 <title><filename>package_tar.bbclass</filename></title>
2300
2301 <para>
2302 The <filename>package_tar</filename>
2303 class provides support for creating packages that use the
2304 <filename>.tar</filename> file format.
2305 The class ensures the packages are written out to the
2306 <filename>${</filename><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link><filename>}/tar</filename>
2307 directory in a <filename>.tar</filename> file format.
2308 </para>
2309
2310 <para>
2311 This class inherits the
2312 <link linkend='ref-classes-package'><filename>package</filename></link>
2313 class and is enabled through the
2314 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
2315 variable in the <filename>local.conf</filename> file.
2316 <note>
2317 You cannot specify the <filename>package_tar</filename> class
2318 first using the <filename>PACKAGE_CLASSES</filename> variable.
2319 You must use <filename>.deb</filename>,
2320 <filename>.ipk</filename>, or <filename>.rpm</filename> file
2321 formats for your image or SDK.
2322 </note>
2323 </para>
2324</section>
2325
2326<section id='ref-classes-packagedata'>
2327 <title><filename>packagedata.bbclass</filename></title>
2328
2329 <para>
2330 The <filename>packagedata</filename> class provides
2331 common functionality for reading <filename>pkgdata</filename> files
2332 found in
2333 <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>.
2334 These files contain information about each output package produced by
2335 the OpenEmbedded build system.
2336 </para>
2337
2338 <para>
2339 This class is enabled by default because it is inherited by the
2340 <link linkend='ref-classes-package'><filename>package</filename></link>
2341 class.
2342 </para>
2343</section>
2344
2345<section id='ref-classes-packagegroup'>
2346 <title><filename>packagegroup.bbclass</filename></title>
2347
2348 <para>
2349 The <filename>packagegroup</filename> class sets default values
2350 appropriate for package group recipes (e.g.
2351 <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>,
2352 <filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>,
2353 <filename><link linkend='var-ALLOW_EMPTY'>ALLOW_EMPTY</link></filename>,
2354 and so forth).
2355 It is highly recommended that all package group recipes inherit this class.
2356 </para>
2357
2358 <para>
2359 For information on how to use this class, see the
2360 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-customtasks'>Customizing Images Using Custom Package Groups</ulink>"
2361 section in the Yocto Project Development Manual.
2362 </para>
2363
2364 <para>
2365 Previously, this class was called the <filename>task</filename> class.
2366 </para>
2367</section>
2368
2369<section id='ref-classes-packageinfo'>
2370 <title><filename>packageinfo.bbclass</filename></title>
2371
2372 <para>
2373 The <filename>packageinfo</filename> class
2374 gives a BitBake user interface the ability to retrieve information
2375 about output packages from the <filename>pkgdata</filename> files.
2376 </para>
2377
2378 <para>
2379 This class is enabled automatically when using the
2380 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink>
2381 user interface.
2382 </para>
2383</section>
2384
2385<section id='ref-classes-patch'>
2386 <title><filename>patch.bbclass</filename></title>
2387
2388 <para>
2389 The <filename>patch</filename> class provides all functionality for
2390 applying patches during the
2391 <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>
2392 task.
2393 </para>
2394
2395 <para>
2396 This class is enabled by default because it is inherited by the
2397 <link linkend='ref-classes-base'><filename>base</filename></link>
2398 class.
2399 </para>
2400</section>
2401
2402<section id='ref-classes-perlnative'>
2403 <title><filename>perlnative.bbclass</filename></title>
2404
2405 <para>
2406 When inherited by a recipe, the <filename>perlnative</filename> class
2407 supports using the native version of Perl built by the build system
2408 rather than using the version provided by the build host.
2409 </para>
2410</section>
2411
2412<section id='ref-classes-pixbufcache'>
2413 <title><filename>pixbufcache.bbclass</filename></title>
2414
2415 <para>
2416 The <filename>pixbufcache</filename> class generates the proper
2417 post-install and post-remove (postinst/postrm) scriptlets for packages
2418 that install pixbuf loaders, which are used with
2419 <filename>gdk-pixbuf</filename>.
2420 These scriptlets call <filename>update_pixbuf_cache</filename>
2421 to add the pixbuf loaders to the cache.
2422 Since the cache files are architecture-specific,
2423 <filename>update_pixbuf_cache</filename> is run using QEMU if the
2424 postinst scriptlets need to be run on the build host during image
2425 creation.
2426 </para>
2427
2428 <para>
2429 If the pixbuf loaders being installed are in packages other
2430 than the recipe's main package, set
2431 <link linkend='var-PIXBUF_PACKAGES'><filename>PIXBUF_PACKAGES</filename></link>
2432 to specify the packages containing the loaders.
2433 </para>
2434</section>
2435
2436<section id='ref-classes-pkgconfig'>
2437 <title><filename>pkgconfig.bbclass</filename></title>
2438
2439 <para>
2440 The <filename>pkg-config</filename> class provides a standard way to get
2441 header and library information.
2442 This class aims to smooth integration of
2443 <filename>pkg-config</filename> into libraries that use it.
2444 </para>
2445
2446 <para>
2447 During staging, BitBake installs <filename>pkg-config</filename> data into the
2448 <filename>sysroots/</filename> directory.
2449 By making use of sysroot functionality within <filename>pkg-config</filename>,
2450 this class no longer has to manipulate the files.
2451 </para>
2452</section>
2453
2454<section id='ref-classes-populate-sdk'>
2455 <title><filename>populate_sdk.bbclass</filename></title>
2456
2457 <para>
2458 The <filename>populate_sdk</filename> class provides support for
2459 SDK-only recipes.
2460 For information on advantages gained when building a cross-development
2461 toolchain using the
2462 <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
2463 task, see the
2464 "<ulink url='&YOCTO_DOCS_ADT_URL;#optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</ulink>"
2465 section in the Yocto Project Application Developer's Guide.
2466 </para>
2467</section>
2468
2469<section id='ref-classes-populate-sdk-*'>
2470 <title><filename>populate_sdk_*.bbclass</filename></title>
2471
2472 <para>
2473 The <filename>populate_sdk_*</filename> classes support SDK creation
2474 and consist of the following classes:
2475 <itemizedlist>
2476 <listitem><para><emphasis><filename>populate_sdk_base</filename>:</emphasis>
2477 The base class supporting SDK creation under all package
2478 managers (i.e. DEB, RPM, and opkg).</para></listitem>
2479 <listitem><para><emphasis><filename>populate_sdk_deb</filename>:</emphasis>
2480 Supports creation of the SDK given the Debian package manager.
2481 </para></listitem>
2482 <listitem><para><emphasis><filename>populate_sdk_rpm</filename>:</emphasis>
2483 Supports creation of the SDK given the RPM package manager.
2484 </para></listitem>
2485 <listitem><para><emphasis><filename>populate_sdk_ipk</filename>:</emphasis>
2486 Supports creation of the SDK given the opkg (IPK format)
2487 package manager.
2488 </para></listitem>
2489 </itemizedlist>
2490 </para>
2491
2492 <para>
2493 The <filename>populate_sdk_base</filename> class inherits the
2494 appropriate <filename>populate_sdk_*</filename> (i.e.
2495 <filename>deb</filename>, <filename>rpm</filename>, and
2496 <filename>ipk</filename>) based on
2497 <link linkend='var-IMAGE_PKGTYPE'><filename>IMAGE_PKGTYPE</filename></link>.
2498 </para>
2499
2500 <para>
2501 The base class ensures all source and destination directories are
2502 established and then populates the SDK.
2503 After populating the SDK, the <filename>populate_sdk_base</filename>
2504 class constructs two sysroots:
2505 <filename>${</filename><link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link><filename>}-nativesdk</filename>,
2506 which contains the cross-compiler and associated tooling, and the
2507 target, which contains a target root filesystem that is configured for
2508 the SDK usage.
2509 These two images reside in
2510 <link linkend='var-SDK_OUTPUT'><filename>SDK_OUTPUT</filename></link>,
2511 which consists of the following:
2512 <literallayout class='monospaced'>
2513 ${SDK_OUTPUT}/${SDK_ARCH}<replaceable>-nativesdk-pkgs</replaceable>
2514 ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/<replaceable>target-pkgs</replaceable>
2515 </literallayout>
2516 </para>
2517
2518 <para>
2519 Finally, the base populate SDK class creates the toolchain
2520 environment setup script, the tarball of the SDK, and the installer.
2521 </para>
2522
2523 <para>
2524 The respective <filename>populate_sdk_deb</filename>,
2525 <filename>populate_sdk_rpm</filename>, and
2526 <filename>populate_sdk_ipk</filename> classes each support the
2527 specific type of SDK.
2528 These classes are inherited by and used with the
2529 <filename>populate_sdk_base</filename> class.
2530 </para>
2531
2532 <para>
2533 For more information on the cross-development toolchain
2534 generation, see the
2535 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
2536 section.
2537 For information on advantages gained when building a
2538 cross-development toolchain using the
2539 <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
2540 task, see the
2541 "<ulink url='&YOCTO_DOCS_ADT_URL;#optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</ulink>"
2542 section in the Yocto Project Application Developer's Guide.
2543 </para>
2544</section>
2545
2546<section id='ref-classes-prexport'>
2547 <title><filename>prexport.bbclass</filename></title>
2548
2549 <para>
2550 The <filename>prexport</filename> class provides functionality for
2551 exporting
2552 <link linkend='var-PR'><filename>PR</filename></link> values.
2553 <note>
2554 This class is not intended to be used directly.
2555 Rather, it is enabled when using
2556 "<filename>bitbake-prserv-tool export</filename>".
2557 </note>
2558 </para>
2559</section>
2560
2561<section id='ref-classes-primport'>
2562 <title><filename>primport.bbclass</filename></title>
2563
2564 <para>
2565 The <filename>primport</filename> class provides functionality for
2566 importing
2567 <link linkend='var-PR'><filename>PR</filename></link> values.
2568 <note>
2569 This class is not intended to be used directly.
2570 Rather, it is enabled when using
2571 "<filename>bitbake-prserv-tool import</filename>".
2572 </note>
2573 </para>
2574</section>
2575
2576<section id='ref-classes-prserv'>
2577 <title><filename>prserv.bbclass</filename></title>
2578
2579 <para>
2580 The <filename>prserv</filename> class provides functionality for
2581 using a
2582 <ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>PR service</ulink>
2583 in order to automatically manage the incrementing of the
2584 <link linkend='var-PR'><filename>PR</filename></link> variable for
2585 each recipe.
2586 </para>
2587
2588 <para>
2589 This class is enabled by default because it is inherited by the
2590 <link linkend='ref-classes-package'><filename>package</filename></link>
2591 class.
2592 However, the OpenEmbedded build system will not enable the
2593 functionality of this class unless
2594 <link linkend='var-PRSERV_HOST'><filename>PRSERV_HOST</filename></link>
2595 has been set.
2596 </para>
2597</section>
2598
2599<section id='ref-classes-ptest'>
2600 <title><filename>ptest.bbclass</filename></title>
2601
2602 <para>
2603 The <filename>ptest</filename> class provides functionality for
2604 packaging and installing runtime tests for recipes that build software
2605 that provides these tests.
2606 </para>
2607
2608 <para>
2609 This class is intended to be inherited by individual recipes.
2610 However, the class' functionality is largely disabled unless "ptest"
2611 appears in
2612 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
2613 See the
2614 "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>"
2615 section in the Yocto Project Development Manual for more information
2616 on ptest.
2617 </para>
2618</section>
2619
2620<section id='ref-classes-ptest-gnome'>
2621 <title><filename>ptest-gnome.bbclass</filename></title>
2622
2623 <para>
2624 Enables package tests (ptests) specifically for GNOME packages,
2625 which have tests intended to be executed with
2626 <filename>gnome-desktop-testing</filename>.
2627 </para>
2628
2629 <para>
2630 For information on setting up and running ptests, see the
2631 "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>"
2632 section in the Yocto Project Development Manual.
2633 </para>
2634</section>
2635
2636<section id='ref-classes-python-dir'>
2637 <title><filename>python-dir.bbclass</filename></title>
2638
2639 <para>
2640 The <filename>python-dir</filename> class provides the base version,
2641 location, and site package location for Python.
2642 </para>
2643</section>
2644
2645<section id='ref-classes-pythonnative'>
2646 <title><filename>pythonnative.bbclass</filename></title>
2647
2648 <para>
2649 When inherited by a recipe, the <filename>pythonnative</filename> class
2650 supports using the native version of Python built by the build system
2651 rather than using the version provided by the build host.
2652 </para>
2653</section>
2654
2655<section id='ref-classes-qemu'>
2656 <title><filename>qemu.bbclass</filename></title>
2657
2658 <para>
2659 The <filename>qemu</filename> class provides functionality for recipes
2660 that either need QEMU or test for the existence of QEMU.
2661 Typically, this class is used to run programs for a target system on
2662 the build host using QEMU's application emulation mode.
2663 </para>
2664</section>
2665
2666<section id='ref-classes-qmake*'>
2667 <title><filename>qmake*.bbclass</filename></title>
2668
2669 <para>
2670 The <filename>qmake*</filename> classes support recipes that
2671 need to build software that uses Qt's <filename>qmake</filename>
2672 build system and are comprised of the following:
2673 <itemizedlist>
2674 <listitem><para><emphasis><filename>qmake_base</filename>:</emphasis>
2675 Provides base functionality for all versions of
2676 <filename>qmake</filename>.</para></listitem>
2677 <listitem><para><emphasis><filename>qmake2</filename>:</emphasis>
2678 Extends base functionality for <filename>qmake</filename> 2.x as
2679 used by Qt 4.x.</para></listitem>
2680 </itemizedlist>
2681 </para>
2682
2683 <para>
2684 If you need to set any configuration variables or pass any options to
2685 <filename>qmake</filename>, you can add these to the
2686 <link linkend='var-EXTRA_QMAKEVARS_PRE'><filename>EXTRA_QMAKEVARS_PRE</filename></link>
2687 or
2688 <link linkend='var-EXTRA_QMAKEVARS_POST'><filename>EXTRA_QMAKEVARS_POST</filename></link>
2689 variables, depending on whether the arguments need to be before or
2690 after the <filename>.pro</filename> file list on the command line,
2691 respectively.
2692 </para>
2693
2694 <para>
2695 By default, all <filename>.pro</filename> files are built.
2696 If you want to specify your own subset of <filename>.pro</filename>
2697 files to be built, specify them in the
2698 <link linkend='var-QMAKE_PROFILES'><filename>QMAKE_PROFILES</filename></link>
2699 variable.
2700 </para>
2701</section>
2702
2703<section id='ref-classes-qt4*'>
2704 <title><filename>qt4*.bbclass</filename></title>
2705
2706 <para>
2707 The <filename>qt4*</filename> classes support recipes that need to
2708 build software that uses the Qt development framework version 4.x
2709 and consist of the following:
2710 <itemizedlist>
2711 <listitem><para><emphasis><filename>qt4e</filename>:</emphasis>
2712 Supports building against Qt/Embedded, which uses the
2713 framebuffer for graphical output.</para></listitem>
2714 <listitem><para><emphasis><filename>qt4x11</filename>:</emphasis>
2715 Supports building against Qt/X11.</para></listitem>
2716 </itemizedlist>
2717 </para>
2718
2719 <para>
2720 The classes inherit the
2721 <link linkend='ref-classes-qmake*'><filename>qmake2</filename></link>
2722 class.
2723 </para>
2724</section>
2725
2726<section id='ref-classes-relocatable'>
2727 <title><filename>relocatable.bbclass</filename></title>
2728
2729 <para>
2730 The <filename>relocatable</filename> class enables relocation of
2731 binaries when they are installed into the sysroot.
2732 </para>
2733
2734 <para>
2735 This class makes use of the
2736 <link linkend='ref-classes-chrpath'><filename>chrpath</filename></link>
2737 class and is used by both the
2738 <link linkend='ref-classes-cross'><filename>cross</filename></link>
2739 and
2740 <link linkend='ref-classes-native'><filename>native</filename></link>
2741 classes.
2742 </para>
2743</section>
2744
2745<section id='ref-classes-report-error'>
2746 <title><filename>report-error.bbclass</filename></title>
2747
2748 <para>
2749 The <filename>report-error</filename> class supports enabling the
2750 <ulink url='&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool'>error reporting tool</ulink>,
2751 which allows you to submit build error information to a central
2752 database.
2753 </para>
2754
2755 <para>
2756 The class collects debug information for recipe, recipe version, task,
2757 machine, distro, build system, target system, host distro, branch,
2758 commit, and log.
2759 From the information, report files using a JSON format are created and
2760 stored in
2761 <filename>${</filename><link linkend='var-LOG_DIR'><filename>LOG_DIR</filename></link><filename>}/error-report</filename>.
2762 </para>
2763</section>
2764
2765<section id='ref-classes-rm-work'>
2766 <title><filename>rm_work.bbclass</filename></title>
2767
2768 <para>
2769 The <filename>rm_work</filename> class supports deletion of temporary
2770 workspace, which can ease your hard drive demands during builds.
2771 </para>
2772
2773 <para>
2774 The OpenEmbedded build system can use a substantial amount of disk
2775 space during the build process.
2776 A portion of this space is the work files under the
2777 <filename>${TMPDIR}/work</filename> directory for each recipe.
2778 Once the build system generates the packages for a recipe, the work
2779 files for that recipe are no longer needed.
2780 However, by default, the build system preserves these files
2781 for inspection and possible debugging purposes.
2782 If you would rather have these files deleted to save disk space
2783 as the build progresses, you can enable <filename>rm_work</filename>
2784 by adding the following to your <filename>local.conf</filename> file,
2785 which is found in the
2786 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
2787 <literallayout class='monospaced'>
2788 INHERIT += "rm_work"
2789 </literallayout>
2790 If you are modifying and building source code out of the work directory
2791 for a recipe, enabling <filename>rm_work</filename> will potentially
2792 result in your changes to the source being lost.
2793 To exclude some recipes from having their work directories deleted by
2794 <filename>rm_work</filename>, you can add the names of the recipe or
2795 recipes you are working on to the <filename>RM_WORK_EXCLUDE</filename>
2796 variable, which can also be set in your <filename>local.conf</filename>
2797 file.
2798 Here is an example:
2799 <literallayout class='monospaced'>
2800 RM_WORK_EXCLUDE += "busybox glibc"
2801 </literallayout>
2802 </para>
2803</section>
2804
2805<section id='ref-classes-rootfs*'>
2806 <title><filename>rootfs*.bbclass</filename></title>
2807
2808 <para>
2809 The <filename>rootfs*</filename> classes support creating
2810 the root filesystem for an image and consist of the following classes:
2811 <itemizedlist>
2812 <listitem><para>
2813 The <filename>rootfs_deb</filename> class, which supports
2814 creation of root filesystems for images built using
2815 <filename>.deb</filename> packages.</para></listitem>
2816 <listitem><para>
2817 The <filename>rootfs_rpm</filename> class, which supports
2818 creation of root filesystems for images built using
2819 <filename>.rpm</filename> packages.</para></listitem>
2820 <listitem><para>
2821 The <filename>rootfs_ipk</filename> class, which supports
2822 creation of root filesystems for images built using
2823 <filename>.ipk</filename> packages.</para></listitem>
2824 </itemizedlist>
2825 </para>
2826
2827 <para>
2828 The root filesystem is created from packages using one of the
2829 <filename>rootfs*.bbclass</filename> files as determined by the
2830 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
2831 variable.
2832 </para>
2833
2834 <para>
2835 For information on how root filesystem images are created, see the
2836 "<link linkend='image-generation-dev-environment'>Image Generation</link>"
2837 section.
2838 </para>
2839</section>
2840
2841<section id='ref-classes-sanity'>
2842 <title><filename>sanity.bbclass</filename></title>
2843
2844 <para>
2845 The <filename>sanity</filename> class checks to see if prerequisite
2846 software is present on the host system so that users can be notified
2847 of potential problems that might affect their build.
2848 The class also performs basic user configuration checks from
2849 the <filename>local.conf</filename> configuration file to
2850 prevent common mistakes that cause build failures.
2851 Distribution policy usually determines whether to include this class.
2852 </para>
2853</section>
2854
2855<section id='ref-classes-scons'>
2856 <title><filename>scons.bbclass</filename></title>
2857
2858 <para>
2859 The <filename>scons</filename> class supports recipes that need to
2860 build software that uses the SCons build system.
2861 You can use the
2862 <link linkend='var-EXTRA_OESCONS'><filename>EXTRA_OESCONS</filename></link>
2863 variable to specify additional configuration options you want to pass
2864 SCons command line.
2865 </para>
2866</section>
2867
2868<section id='ref-classes-sdl'>
2869 <title><filename>sdl.bbclass</filename></title>
2870
2871 <para>
2872 The <filename>sdl</filename> class supports recipes that need to build
2873 software that uses the Simple DirectMedia Layer (SDL) library.
2874 </para>
2875</section>
2876
2877<section id='ref-classes-setuptools'>
2878 <title><filename>setuptools.bbclass</filename></title>
2879
2880 <para>
2881 The <filename>setuptools</filename> class supports Python
2882 version 2.x extensions that use build systems based on
2883 <filename>setuptools</filename>.
2884 If your recipe uses these build systems, the recipe needs to
2885 inherit the <filename>setuptools</filename> class.
2886 </para>
2887</section>
2888
2889<section id='ref-classes-setuptools3'>
2890 <title><filename>setuptools3.bbclass</filename></title>
2891
2892 <para>
2893 The <filename>setuptools3</filename> class supports Python
2894 version 3.x extensions that use build systems based on
2895 <filename>setuptools3</filename>.
2896 If your recipe uses these build systems, the recipe needs to
2897 inherit the <filename>setuptools3</filename> class.
2898 </para>
2899</section>
2900
2901<section id='ref-classes-sip'>
2902 <title><filename>sip.bbclass</filename></title>
2903
2904 <para>
2905 The <filename>sip</filename> class
2906 supports recipes that build or package SIP-based Python bindings.
2907 </para>
2908</section>
2909
2910<section id='ref-classes-siteconfig'>
2911 <title><filename>siteconfig.bbclass</filename></title>
2912
2913 <para>
2914 The <filename>siteconfig</filename> class
2915 provides functionality for handling site configuration.
2916 The class is used by the
2917 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
2918 class to accelerate the
2919 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
2920 task.
2921 </para>
2922</section>
2923
2924<section id='ref-classes-siteinfo'>
2925 <title><filename>siteinfo.bbclass</filename></title>
2926
2927 <para>
2928 The <filename>siteinfo</filename> class provides information about
2929 the targets that might be needed by other classes or recipes.
2930 </para>
2931
2932 <para>
2933 As an example, consider Autotools, which can require tests that must
2934 execute on the target hardware.
2935 Since this is not possible in general when cross compiling, site
2936 information is used to provide cached test results so these tests can
2937 be skipped over but still make the correct values available.
2938 The
2939 <filename><link linkend='structure-meta-site'>meta/site directory</link></filename>
2940 contains test results sorted into different categories such as
2941 architecture, endianness, and the <filename>libc</filename> used.
2942 Site information provides a list of files containing data relevant to
2943 the current build in the
2944 <filename><link linkend='var-CONFIG_SITE'>CONFIG_SITE</link></filename> variable
2945 that Autotools automatically picks up.
2946 </para>
2947
2948 <para>
2949 The class also provides variables like
2950 <filename><link linkend='var-SITEINFO_ENDIANNESS'>SITEINFO_ENDIANNESS</link></filename>
2951 and <filename><link linkend='var-SITEINFO_BITS'>SITEINFO_BITS</link></filename>
2952 that can be used elsewhere in the metadata.
2953 </para>
2954
2955 <para>
2956 Because the
2957 <link linkend='ref-classes-base'><filename>base</filename></link> class
2958 includes the <filename>siteinfo</filename> class, it is always active.
2959 </para>
2960</section>
2961
2962<section id='ref-classes-spdx'>
2963 <title><filename>spdx.bbclass</filename></title>
2964
2965 <para>
2966 The <filename>spdx</filename> class integrates real-time license
2967 scanning, generation of SPDX standard output, and verification
2968 of license information during the build.
2969 <note>
2970 This class is currently at the prototype stage in the 1.6
2971 release.
2972 </note>
2973 </para>
2974</section>
2975
2976<section id='ref-classes-sstate'>
2977 <title><filename>sstate.bbclass</filename></title>
2978
2979 <para>
2980 The <filename>sstate</filename> class provides support for Shared
2981 State (sstate).
2982 By default, the class is enabled through the
2983 <link linkend='var-INHERIT_DISTRO'><filename>INHERIT_DISTRO</filename></link>
2984 variable's default value.
2985 </para>
2986
2987 <para>
2988 For more information on sstate, see the
2989 "<link linkend='shared-state-cache'>Shared State Cache</link>"
2990 section.
2991 </para>
2992</section>
2993
2994<section id='ref-classes-staging'>
2995 <title><filename>staging.bbclass</filename></title>
2996
2997 <para>
2998 The <filename>staging</filename> class provides support for staging
2999 files into the sysroot during the
3000 <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
3001 task.
3002 The class is enabled by default because it is inherited by the
3003 <link linkend='ref-classes-base'><filename>base</filename></link>
3004 class.
3005 </para>
3006</section>
3007
3008<section id='ref-classes-syslinux'>
3009 <title><filename>syslinux.bbclass</filename></title>
3010
3011 <para>
3012 The <filename>syslinux</filename> class provides syslinux-specific
3013 functions for building bootable images.
3014 </para>
3015
3016 <para>
3017 The class supports the following variables:
3018 <itemizedlist>
3019 <listitem><para><link linkend='var-INITRD'><filename>INITRD</filename></link>:
3020 Indicates list of filesystem images to concatenate and use as
3021 an initial RAM disk (initrd).
3022 This variable is optional.</para></listitem>
3023 <listitem><para><link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>:
3024 Indicates a filesystem image to include as the root filesystem.
3025 This variable is optional.</para></listitem>
3026 <listitem><para><link linkend='var-AUTO_SYSLINUXMENU'><filename>AUTO_SYSLINUXMENU</filename></link>:
3027 Enables creating an automatic menu when set to "1".
3028 </para></listitem>
3029 <listitem><para><link linkend='var-LABELS'><filename>LABELS</filename></link>:
3030 Lists targets for automatic configuration.
3031 </para></listitem>
3032 <listitem><para><link linkend='var-APPEND'><filename>APPEND</filename></link>:
3033 Lists append string overrides for each label.
3034 </para></listitem>
3035 <listitem><para><link linkend='var-SYSLINUX_OPTS'><filename>SYSLINUX_OPTS</filename></link>:
3036 Lists additional options to add to the syslinux file.
3037 Semicolon characters separate multiple options.
3038 </para></listitem>
3039 <listitem><para><link linkend='var-SYSLINUX_SPLASH'><filename>SYSLINUX_SPLASH</filename></link>:
3040 Lists a background for the VGA boot menu when you are using the
3041 boot menu.</para></listitem>
3042 <listitem><para><link linkend='var-SYSLINUX_DEFAULT_CONSOLE'><filename>SYSLINUX_DEFAULT_CONSOLE</filename></link>:
3043 Set to "console=ttyX" to change kernel boot default console.
3044 </para></listitem>
3045 <listitem><para><link linkend='var-SYSLINUX_SERIAL'><filename>SYSLINUX_SERIAL</filename></link>:
3046 Sets an alternate serial port.
3047 Or, turns off serial when the variable is set with an
3048 empty string.</para></listitem>
3049 <listitem><para><link linkend='var-SYSLINUX_SERIAL_TTY'><filename>SYSLINUX_SERIAL_TTY</filename></link>:
3050 Sets an alternate "console=tty..." kernel boot argument.
3051 </para></listitem>
3052 </itemizedlist>
3053 </para>
3054</section>
3055
3056<section id='ref-classes-systemd'>
3057 <title><filename>systemd.bbclass</filename></title>
3058
3059 <para>
3060 The <filename>systemd</filename> class provides support for recipes
3061 that install systemd unit files.
3062 </para>
3063
3064 <para>
3065 The functionality for this class is disabled unless you have "systemd"
3066 in
3067 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
3068 </para>
3069
3070 <para>
3071 Under this class, the recipe or Makefile (i.e. whatever the recipe is
3072 calling during the
3073 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
3074 task) installs unit files into
3075 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}${systemd_unitdir}/system</filename>.
3076 If the unit files being installed go into packages other than the
3077 main package, you need to set
3078 <link linkend='var-SYSTEMD_PACKAGES'><filename>SYSTEMD_PACKAGES</filename></link>
3079 in your recipe to identify the packages in which the files will be
3080 installed.
3081 </para>
3082
3083 <para>
3084 You should set
3085 <link linkend='var-SYSTEMD_SERVICE'><filename>SYSTEMD_SERVICE</filename></link>
3086 to the name of the service file.
3087 You should also use a package name override to indicate the package
3088 to which the value applies.
3089 If the value applies to the recipe's main package, use
3090 <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>.
3091 Here is an example from the connman recipe:
3092 <literallayout class='monospaced'>
3093 SYSTEMD_SERVICE_${PN} = "connman.service"
3094 </literallayout>
3095 Services are set up to start on boot automatically unless
3096 you have set
3097 <link linkend='var-SYSTEMD_AUTO_ENABLE'><filename>SYSTEMD_AUTO_ENABLE</filename></link>
3098 to "disable".
3099 </para>
3100
3101 <para>
3102 For more information on <filename>systemd</filename>, see the
3103 "<ulink url='&YOCTO_DOCS_DEV_URL;#selecting-an-initialization-manager'>Selecting an Initialization Manager</ulink>"
3104 section in the Yocto Project Development Manual.
3105 </para>
3106</section>
3107
3108<section id='ref-classes-terminal'>
3109 <title><filename>terminal.bbclass</filename></title>
3110
3111 <para>
3112 The <filename>terminal</filename> class provides support for starting
3113 a terminal session.
3114 The
3115 <link linkend='var-OE_TERMINAL'><filename>OE_TERMINAL</filename></link>
3116 variable controls which terminal emulator is used for the session.
3117 </para>
3118
3119 <para>
3120 Other classes use the <filename>terminal</filename> class anywhere a
3121 separate terminal session needs to be started.
3122 For example, the
3123 <link linkend='ref-classes-patch'><filename>patch</filename></link>
3124 class assuming
3125 <link linkend='var-PATCHRESOLVE'><filename>PATCHRESOLVE</filename></link>
3126 is set to "user", the
3127 <link linkend='ref-classes-cml1'><filename>cml1</filename></link>
3128 class, and the
3129 <link linkend='ref-classes-devshell'><filename>devshell</filename></link>
3130 class all use the <filename>terminal</filename> class.
3131 </para>
3132</section>
3133
3134<section id='ref-classes-testimage'>
3135 <title><filename>testimage.bbclass</filename></title>
3136
3137 <para>
3138 The <filename>testimage</filename> class supports running automated
3139 tests against images using QEMU and on actual hardware.
3140 The class handles loading the tests and starting the image.
3141 </para>
3142
3143 <para>
3144 To use the class, you need to perform steps to set up the
3145 environment.
3146 The tests are commands that run on the target system over
3147 <filename>ssh</filename>.
3148 they are written in Python and make use of the
3149 <filename>unittest</filename> module.
3150 </para>
3151
3152 <para>
3153 For information on how to enable, run, and create new tests, see the
3154 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
3155 section.
3156 </para>
3157</section>
3158
3159<section id='ref-classes-texinfo'>
3160 <title><filename>texinfo.bbclass</filename></title>
3161
3162 <para>
3163 This class should be inherited by recipes whose upstream packages
3164 invoke the <filename>texinfo</filename> utilities at build-time.
3165 Native and cross recipes are made to use the dummy scripts provided
3166 by <filename>texinfo-dummy-native</filename>, for improved performance.
3167 Target architecture recipes use the genuine
3168 Texinfo utilities.
3169 By default, they use the Texinfo utilities on the host system.
3170 <note>
3171 If you want to use the Texinfo recipe shipped with the build
3172 system, you can remove "texinfo-native" from
3173 <link linkend='var-ASSUME_PROVIDED'><filename>ASSUME_PROVIDED</filename></link>
3174 and makeinfo from
3175 <link linkend='var-SANITY_REQUIRED_UTILITIES'><filename>SANITY_REQUIRED_UTILITIES</filename></link>.
3176 </note>
3177 </para>
3178</section>
3179
3180<section id='ref-classes-tinderclient'>
3181 <title><filename>tinderclient.bbclass</filename></title>
3182
3183 <para>
3184 The <filename>tinderclient</filename> class submits build results to
3185 an external Tinderbox instance.
3186 <note>
3187 This class is currently unmaintained.
3188 </note>
3189 </para>
3190</section>
3191
3192<section id='ref-classes-toaster'>
3193 <title><filename>toaster.bbclass</filename></title>
3194
3195 <para>
3196 The <filename>toaster</filename> class collects information about
3197 packages and images and sends them as events that the BitBake
3198 user interface can receive.
3199 The class is enabled when the Toaster user interface is running.
3200 </para>
3201
3202 <para>
3203 This class is not intended to be used directly.
3204 </para>
3205</section>
3206
3207<section id='ref-classes-toolchain-scripts'>
3208 <title><filename>toolchain-scripts.bbclass</filename></title>
3209
3210 <para>
3211 The <filename>toolchain-scripts</filename> class provides the scripts
3212 used for setting up the environment for installed SDKs.
3213 </para>
3214</section>
3215
3216<section id='ref-classes-typecheck'>
3217 <title><filename>typecheck.bbclass</filename></title>
3218
3219 <para>
3220 The <filename>typecheck</filename> class provides support for
3221 validating the values of variables set at the configuration level
3222 against their defined types.
3223 The OpenEmbedded build system allows you to define the type of a
3224 variable using the "type" varflag.
3225 Here is an example:
3226 <literallayout class='monospaced'>
3227 IMAGE_FEATURES[type] = "list"
3228 </literallayout>
3229 </para>
3230</section>
3231
3232<section id='ref-classes-uboot-config'>
3233 <title><filename>uboot-config.bbclass</filename></title>
3234
3235 <para>
3236 The <filename>uboot-config</filename> class provides support for
3237 U-Boot configuration for a machine.
3238 Specify the machine in your recipe as follows:
3239 <literallayout class='monospaced'>
3240 UBOOT_CONFIG ??= &lt;default&gt;
3241 UBOOT_CONFIG[foo] = "config,images"
3242 </literallayout>
3243 You can also specify the machine using this method:
3244 <literallayout class='monospaced'>
3245 UBOOT_MACHINE = "config"
3246 </literallayout>
3247 See the
3248 <link linkend='var-UBOOT_CONFIG'><filename>UBOOT_CONFIG</filename></link>
3249 and
3250 <link linkend='var-UBOOT_MACHINE'><filename>UBOOT_MACHINE</filename></link>
3251 variables for additional information.
3252 </para>
3253</section>
3254
3255<section id='ref-classes-uninative'>
3256 <title><filename>uninative.bbclass</filename></title>
3257
3258 <para>
3259 Provides a means of reusing <filename>native/cross</filename> over
3260 multiple distros.
3261 <note>
3262 Currently, the method used by the <filename>uninative</filename>
3263 class is experimental.
3264 </note>
3265 For more information, see the commit message
3266 <ulink url='http://cgit.openembedded.org/openembedded-core/commit/?id=e66c96ae9c7ba21ebd04a4807390f0031238a85a'>here</ulink>.
3267 </para>
3268</section>
3269
3270<section id='ref-classes-update-alternatives'>
3271 <title><filename>update-alternatives.bbclass</filename></title>
3272
3273 <para>
3274 The <filename>update-alternatives</filename> class helps the
3275 alternatives system when multiple sources provide the same command.
3276 This situation occurs when several programs that have the same or
3277 similar function are installed with the same name.
3278 For example, the <filename>ar</filename> command is available from the
3279 <filename>busybox</filename>, <filename>binutils</filename> and
3280 <filename>elfutils</filename> packages.
3281 The <filename>update-alternatives</filename> class handles
3282 renaming the binaries so that multiple packages can be installed
3283 without conflicts.
3284 The <filename>ar</filename> command still works regardless of which
3285 packages are installed or subsequently removed.
3286 The class renames the conflicting binary in each package and symlinks
3287 the highest priority binary during installation or removal of packages.
3288 </para>
3289
3290 <para>
3291 To use this class, you need to define a number of variables:
3292 <itemizedlist>
3293 <listitem><para><link linkend='var-ALTERNATIVE'><filename>ALTERNATIVE</filename></link>
3294 </para></listitem>
3295 <listitem><para><link linkend='var-ALTERNATIVE_LINK_NAME'><filename>ALTERNATIVE_LINK_NAME</filename></link>
3296 </para></listitem>
3297 <listitem><para><link linkend='var-ALTERNATIVE_TARGET'><filename>ALTERNATIVE_TARGET</filename></link>
3298 </para></listitem>
3299 <listitem><para><link linkend='var-ALTERNATIVE_PRIORITY'><filename>ALTERNATIVE_PRIORITY</filename></link>
3300 </para></listitem>
3301 </itemizedlist>
3302 These variables list alternative commands needed by a package,
3303 provide pathnames for links, default links for targets, and
3304 so forth.
3305 For details on how to use this class, see the comments in the
3306 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/update-alternatives.bbclass'><filename>update-alternatives.bbclass</filename></ulink>.
3307 </para>
3308
3309 <note>
3310 You can use the <filename>update-alternatives</filename> command
3311 directly in your recipes.
3312 However, this class simplifies things in most cases.
3313 </note>
3314</section>
3315
3316<section id='ref-classes-update-rc.d'>
3317 <title><filename>update-rc.d.bbclass</filename></title>
3318
3319 <para>
3320 The <filename>update-rc.d</filename> class uses
3321 <filename>update-rc.d</filename> to safely install an
3322 initialization script on behalf of the package.
3323 The OpenEmbedded build system takes care of details such as making
3324 sure the script is stopped before a package is removed and started when
3325 the package is installed.
3326 </para>
3327
3328 <para>
3329 Three variables control this class:
3330 <filename><link linkend='var-INITSCRIPT_PACKAGES'>INITSCRIPT_PACKAGES</link></filename>,
3331 <filename><link linkend='var-INITSCRIPT_NAME'>INITSCRIPT_NAME</link></filename> and
3332 <filename><link linkend='var-INITSCRIPT_PARAMS'>INITSCRIPT_PARAMS</link></filename>.
3333 See the variable links for details.
3334 </para>
3335</section>
3336
3337<section id='ref-classes-useradd'>
3338 <title><filename>useradd.bbclass</filename></title>
3339
3340 <para>
3341 The <filename>useradd</filename> class supports the addition of users
3342 or groups for usage by the package on the target.
3343 For example, if you have packages that contain system services that
3344 should be run under their own user or group, you can use this class to
3345 enable creation of the user or group.
3346 The <filename>meta-skeleton/recipes-skeleton/useradd/useradd-example.bb</filename>
3347 recipe in the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
3348 provides a simple example that shows how to add three
3349 users and groups to two packages.
3350 See the <filename>useradd-example.bb</filename> recipe for more
3351 information on how to use this class.
3352 </para>
3353
3354 <para>
3355 The <filename>useradd</filename> class supports the
3356 <link linkend='var-USERADD_PACKAGES'><filename>USERADD_PACKAGES</filename></link>,
3357 <link linkend='var-USERADD_PARAM'><filename>USERADD_PARAM</filename></link>,
3358 <link linkend='var-GROUPADD_PARAM'><filename>GROUPADD_PARAM</filename></link>,
3359 and
3360 <link linkend='var-GROUPMEMS_PARAM'><filename>GROUPMEMS_PARAM</filename></link>
3361 variables.
3362 </para>
3363</section>
3364
3365<section id='ref-classes-useradd-staticids'>
3366 <title><filename>useradd-staticids.bbclass</filename></title>
3367
3368 <para>
3369 The <filename>useradd-staticids</filename> class supports the addition
3370 of users or groups that have static user identification
3371 (<filename>uid</filename>) and group identification
3372 (<filename>gid</filename>) values.
3373 </para>
3374
3375 <para>
3376 The default behavior of the OpenEmbedded build system for assigning
3377 <filename>uid</filename> and <filename>gid</filename> values when
3378 packages add users and groups during package install time is to
3379 add them dynamically.
3380 This works fine for programs that do not care what the values of the
3381 resulting users and groups become.
3382 In these cases, the order of the installation determines the final
3383 <filename>uid</filename> and <filename>gid</filename> values.
3384 However, if non-deterministic
3385 <filename>uid</filename> and <filename>gid</filename> values are a
3386 problem, you can override the default, dynamic application of these
3387 values by setting static values.
3388 When you set static values, the OpenEmbedded build system looks in
3389 <link linkend='var-BBPATH'><filename>BBPATH</filename></link> for
3390 <filename>files/passwd</filename> and <filename>files/group</filename>
3391 files for the values.
3392 </para>
3393
3394 <para>
3395 To use static <filename>uid</filename> and <filename>gid</filename>
3396 values, you need to set some variables.
3397 See the
3398 <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>,
3399 <link linkend='var-USERADD_UID_TABLES'><filename>USERADD_UID_TABLES</filename></link>,
3400 <link linkend='var-USERADD_GID_TABLES'><filename>USERADD_GID_TABLES</filename></link>,
3401 and
3402 <link linkend='var-USERADD_ERROR_DYNAMIC'><filename>USERADD_ERROR_DYNAMIC</filename></link>
3403 variables.
3404 You can also see the
3405 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
3406 class for additional information.
3407 </para>
3408
3409 <note><title>Notes</title>
3410 You do not use this class directly.
3411 You either enable or disable the class by setting the
3412 <filename>USERADDEXTENSION</filename> variable.
3413 If you enable or disable the class in a configured system,
3414 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
3415 might contain incorrect <filename>uid</filename> and
3416 <filename>gid</filename> values.
3417 Deleting the <filename>TMPDIR</filename> directory
3418 will correct this condition.
3419 </note>
3420</section>
3421
3422<section id='ref-classes-utility-tasks'>
3423 <title><filename>utility-tasks.bbclass</filename></title>
3424
3425 <para>
3426 The <filename>utility-tasks</filename> class provides support for
3427 various "utility" type tasks that are applicable to all recipes,
3428 such as
3429 <link linkend='ref-tasks-clean'><filename>do_clean</filename></link> and
3430 <link linkend='ref-tasks-listtasks'><filename>do_listtasks</filename></link>.
3431 </para>
3432
3433 <para>
3434 This class is enabled by default because it is inherited by
3435 the
3436 <link linkend='ref-classes-base'><filename>base</filename></link>
3437 class.
3438 </para>
3439</section>
3440
3441<section id='ref-classes-utils'>
3442 <title><filename>utils.bbclass</filename></title>
3443
3444 <para>
3445 The <filename>utils</filename> class provides some useful Python
3446 functions that are typically used in inline Python expressions
3447 (e.g. <filename>${@...}</filename>).
3448 One example use is for <filename>bb.utils.contains()</filename>.
3449 </para>
3450
3451 <para>
3452 This class is enabled by default because it is inherited by the
3453 <link linkend='ref-classes-base'><filename>base</filename></link>
3454 class.
3455 </para>
3456</section>
3457
3458<section id='ref-classes-vala'>
3459 <title><filename>vala.bbclass</filename></title>
3460
3461 <para>
3462 The <filename>vala</filename> class supports recipes that need to
3463 build software written using the Vala programming language.
3464 </para>
3465</section>
3466
3467<section id='ref-classes-waf'>
3468 <title><filename>waf.bbclass</filename></title>
3469
3470 <para>
3471 The <filename>waf</filename> class supports recipes that need to build
3472 software that uses the Waf build system.
3473 You can use the
3474 <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
3475 variable to specify additional configuration options to be passed on
3476 the Waf command line.
3477 </para>
3478</section>
3479
3480<!-- Undocumented classes are:
3481 image-empty.bbclass (possibly being dropped)
3482 migrate_localcount.bbclass (still need a description)
3483-->
3484
3485
3486</chapter>
3487<!--
3488vim: expandtab tw=80 ts=4
3489-->
diff --git a/documentation/ref-manual/ref-features.xml b/documentation/ref-manual/ref-features.xml
new file mode 100644
index 0000000000..230cabd155
--- /dev/null
+++ b/documentation/ref-manual/ref-features.xml
@@ -0,0 +1,420 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='ref-features'>
6 <title>Features</title>
7
8 <para>
9 This chapter provides a reference of shipped machine and distro features
10 you can include as part of your image, a reference on image features you can
11 select, 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 or appended to in a distribution's configuration file such as
20 <filename>poky.conf</filename>,
21 <filename>poky-tiny.conf</filename>,
22 <filename>poky-lsb.conf</filename> and so forth.
23 Machine features are set in the
24 <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>
25 variable, which is set in the machine configuration file and
26 specifies the hardware features for a given machine.
27 </para>
28
29 <para>
30 These two variables combine to work out which kernel modules,
31 utilities, and other packages to include.
32 A given distribution can support a selected subset of features so some machine features might not
33 be included if the distribution itself does not support them.
34 </para>
35
36 <para>
37 One method you can use to determine which recipes are checking to see if a
38 particular feature is contained or not is to <filename>grep</filename> through
39 the <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
40 for the feature.
41 Here is an example that discovers the recipes whose build is potentially
42 changed based on a given feature:
43 <literallayout class='monospaced'>
44 $ cd poky
45 $ git grep 'contains.*MACHINE_FEATURES.*<replaceable>feature</replaceable>'
46 </literallayout>
47 </para>
48
49 <section id='ref-features-machine'>
50 <title>Machine Features</title>
51
52 <para>
53 The items below are features you can use with
54 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>.
55 Features do not have a one-to-one correspondence to packages, and they can
56 go beyond simply controlling the installation of a package or packages.
57 Sometimes a feature can influence how certain recipes are built.
58 For example, a feature might determine whether a particular configure option
59 is specified within the
60 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
61 task for a particular recipe.
62 </para>
63
64 <para>
65 This feature list only represents features as shipped with the Yocto Project metadata:
66 <itemizedlist>
67 <listitem><para><emphasis>acpi:</emphasis> Hardware has ACPI (x86/x86_64 only)
68 </para></listitem>
69 <listitem><para><emphasis>alsa:</emphasis> Hardware has ALSA audio drivers
70 </para></listitem>
71 <listitem><para><emphasis>apm:</emphasis> Hardware uses APM (or APM emulation)
72 </para></listitem>
73 <listitem><para><emphasis>bluetooth:</emphasis> Hardware has integrated BT
74 </para></listitem>
75 <listitem><para><emphasis>efi:</emphasis> Support for booting through EFI
76 </para></listitem>
77 <listitem><para><emphasis>ext2:</emphasis> Hardware HDD or Microdrive
78 </para></listitem>
79 <listitem><para><emphasis>irda:</emphasis> Hardware has IrDA support
80 </para></listitem>
81 <listitem><para><emphasis>keyboard:</emphasis> Hardware has a keyboard
82 </para></listitem>
83 <listitem><para><emphasis>pcbios:</emphasis> Support for booting through BIOS
84 </para></listitem>
85 <listitem><para><emphasis>pci:</emphasis> Hardware has a PCI bus
86 </para></listitem>
87 <listitem><para><emphasis>pcmcia:</emphasis> Hardware has PCMCIA or CompactFlash sockets
88 </para></listitem>
89 <listitem><para><emphasis>phone:</emphasis> Mobile phone (voice) support
90 </para></listitem>
91 <listitem><para><emphasis>qvga:</emphasis> Machine has a QVGA (320x240) display
92 </para></listitem>
93 <listitem><para><emphasis>rtc:</emphasis> Machine has a Real-Time Clock
94 </para></listitem>
95 <listitem><para><emphasis>screen:</emphasis> Hardware has a screen
96 </para></listitem>
97 <listitem><para><emphasis>serial:</emphasis> Hardware has serial support (usually RS232)
98 </para></listitem>
99 <listitem><para><emphasis>touchscreen:</emphasis> Hardware has a touchscreen
100 </para></listitem>
101 <listitem><para><emphasis>usbgadget:</emphasis> Hardware is USB gadget device capable
102 </para></listitem>
103 <listitem><para><emphasis>usbhost:</emphasis> Hardware is USB Host capable
104 </para></listitem>
105 <listitem><para><emphasis>vfat:</emphasis> FAT file system support
106 </para></listitem>
107 <listitem><para><emphasis>wifi:</emphasis> Hardware has integrated WiFi
108 </para></listitem>
109 </itemizedlist>
110 </para>
111 </section>
112
113 <section id='ref-features-distro'>
114 <title>Distro Features</title>
115
116 <para>
117 The items below are features you can use with
118 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
119 to enable features across your distribution.
120 Features do not have a one-to-one correspondence to packages,
121 and they can go beyond simply controlling the installation of a
122 package or packages.
123 In most cases, the presence or absence of a feature translates to
124 the appropriate option supplied to the configure script during the
125 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
126 task for the recipes that optionally
127 support the feature.
128 </para>
129
130 <para>
131 Some distro features are also machine features.
132 These select features make sense to be controlled both at
133 the machine and distribution configuration level.
134 See the
135 <ulink url='&YOCTO_DOCS_REF_URL;#var-COMBINED_FEATURES'><filename>COMBINED_FEATURES</filename></ulink>
136 variable for more information.
137 </para>
138
139 <para>
140 This list only represents features as shipped with the Yocto Project metadata:
141 <itemizedlist>
142 <listitem><para><emphasis>alsa:</emphasis> Include ALSA support
143 (OSS compatibility kernel modules installed if available).
144 </para></listitem>
145 <listitem><para><emphasis>bluetooth:</emphasis> Include
146 bluetooth support (integrated BT only).</para></listitem>
147 <listitem><para><emphasis>cramfs:</emphasis> Include CramFS
148 support.</para></listitem>
149 <listitem><para><emphasis>directfb:</emphasis>
150 Include DirectFB support.
151 </para></listitem>
152 <listitem><para><emphasis>ext2:</emphasis> Include tools for
153 supporting for devices with internal HDD/Microdrive for
154 storing files (instead of Flash only devices).
155 </para></listitem>
156 <listitem><para><emphasis>ipsec:</emphasis> Include IPSec
157 support.</para></listitem>
158 <listitem><para><emphasis>ipv6:</emphasis> Include IPv6 support.
159 </para></listitem>
160 <listitem><para><emphasis>irda:</emphasis> Include IrDA support.
161 </para></listitem>
162 <listitem><para><emphasis>keyboard:</emphasis> Include keyboard
163 support (e.g. keymaps will be loaded during boot).
164 </para></listitem>
165 <listitem><para><emphasis>nfs:</emphasis> Include NFS client
166 support (for mounting NFS exports on device).
167 </para></listitem>
168 <listitem><para><emphasis>opengl:</emphasis>
169 Include the Open Graphics Library, which is a
170 cross-language, multi-platform application programming
171 interface used for rendering two and three-dimensional
172 graphics.</para></listitem>
173 <listitem><para><emphasis>pci:</emphasis> Include PCI bus
174 support.</para></listitem>
175 <listitem><para><emphasis>pcmcia:</emphasis> Include
176 PCMCIA/CompactFlash support.</para></listitem>
177 <listitem><para><emphasis>ppp:</emphasis> Include PPP dialup
178 support.</para></listitem>
179 <listitem><para><emphasis>smbfs:</emphasis> Include SMB networks
180 client support (for mounting Samba/Microsoft Windows shares
181 on device).</para></listitem>
182 <listitem><para><emphasis>systemd:</emphasis> Include support
183 for this <filename>init</filename> manager, which is a full
184 replacement of for <filename>init</filename> with parallel
185 starting of services, reduced shell overhead, and other
186 features.
187 This <filename>init</filename> manager is used by many
188 distributions.</para></listitem>
189 <listitem><para><emphasis>usbgadget:</emphasis> Include USB
190 Gadget Device support (for USB networking/serial/storage).
191 </para></listitem>
192 <listitem><para><emphasis>usbhost:</emphasis> Include USB Host
193 support (allows to connect external keyboard, mouse,
194 storage, network etc).</para></listitem>
195 <listitem><para><emphasis>wayland:</emphasis> Include the
196 Wayland display server protocol and the library that
197 supports it.</para></listitem>
198 <listitem><para><emphasis>wifi:</emphasis> Include WiFi support
199 (integrated only).</para></listitem>
200 <listitem><para><emphasis>x11:</emphasis> Include the X server
201 and libraries.</para></listitem>
202 </itemizedlist>
203 </para>
204 </section>
205
206 <section id='ref-features-image'>
207 <title>Image Features</title>
208
209 <para>
210 The contents of images generated by the OpenEmbedded build system
211 can be controlled by the
212 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
213 and
214 <link linkend='var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></link>
215 variables that you typically configure in your image recipes.
216 Through these variables, you can add several different
217 predefined packages such as development utilities or packages with
218 debug information needed to investigate application problems or
219 profile applications.
220 </para>
221
222 <para>
223 The following image features are available for all images:
224 <itemizedlist>
225 <listitem><para><emphasis>dbg-pkgs:</emphasis>
226 Installs debug symbol packages for all packages installed
227 in a given image.
228 </para></listitem>
229 <listitem><para><emphasis>debug-tweaks:</emphasis>
230 Makes an image suitable for development (e.g.
231 allows root logins without passwords).
232 </para></listitem>
233 <listitem><para><emphasis>dev-pkgs:</emphasis>
234 Installs development packages (headers and extra library
235 links) for all packages installed in a given image.
236 </para></listitem>
237 <listitem><para><emphasis>doc-pkgs:</emphasis> Installs
238 documentation packages for all packages installed in a
239 given image.
240 </para></listitem>
241 <listitem><para><emphasis>package-management:</emphasis>
242 Installs package management tools and preserves the package
243 manager database.
244 </para></listitem>
245 <listitem><para><emphasis>ptest-pkgs:</emphasis>
246 Installs ptest packages for all ptest-enabled recipes.
247 </para></listitem>
248 <listitem><para><emphasis>read-only-rootfs:</emphasis>
249 Creates an image whose root filesystem is read-only.
250 See the
251 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>Creating a Read-Only Root Filesystem</ulink>"
252 section in the Yocto Project Development Manual for more
253 information.
254 </para></listitem>
255 <listitem><para><emphasis>splash:</emphasis>
256 Enables showing a splash screen during boot.
257 By default, this screen is provided by
258 <filename>psplash</filename>, which does allow
259 customization.
260 If you prefer to use an alternative splash screen package,
261 you can do so by setting the <filename>SPLASH</filename>
262 variable to a different package name (or names) within the
263 image recipe or at the distro configuration level.
264 </para></listitem>
265 <listitem><para><emphasis>staticdev-pkgs:</emphasis>
266 Installs static development packages, which are
267 static libraries (i.e. <filename>*.a</filename> files), for
268 all packages installed in a given image.
269 </para></listitem>
270 </itemizedlist>
271 </para>
272
273 <para>
274 Some image features are available only when you inherit the
275 <link linkend='ref-classes-core-image'><filename>core-image</filename></link>
276 class.
277 The current list of these valid features is as follows:
278 <itemizedlist>
279 <listitem><para><emphasis>eclipse-debug:</emphasis> Provides
280 Eclipse remote debugging support.
281 </para></listitem>
282 <listitem><para><emphasis>hwcodecs:</emphasis> Installs
283 hardware acceleration codecs.
284 </para></listitem>
285 <listitem><para><emphasis>nfs-server:</emphasis>
286 Installs an NFS server.
287 </para></listitem>
288 <listitem><para><emphasis>qt4-pkgs:</emphasis>
289 Supports Qt4/X11 and demo applications.
290 </para></listitem>
291 <listitem><para><emphasis>ssh-server-dropbear:</emphasis>
292 Installs the Dropbear minimal SSH server.
293 </para></listitem>
294 <listitem><para><emphasis>ssh-server-openssh:</emphasis>
295 Installs the OpenSSH SSH server, which is more
296 full-featured than Dropbear.
297 Note that if both the OpenSSH SSH server and the Dropbear
298 minimal SSH server are present in
299 <filename>IMAGE_FEATURES</filename>, then OpenSSH will take
300 precedence and Dropbear will not be installed.
301 </para></listitem>
302 <listitem><para><emphasis>tools-debug:</emphasis>
303 Installs debugging tools such as
304 <filename>strace</filename> and <filename>gdb</filename>.
305 For information on GDB, see the
306 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
307 section in the Yocto Project Development Manual.
308 For information on tracing and profiling, see the
309 <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>.
310 </para></listitem>
311 <listitem><para><emphasis>tools-profile:</emphasis>
312 Installs profiling tools such as
313 <filename>oprofile</filename>, <filename>exmap</filename>,
314 and <filename>LTTng</filename>.
315 For general information on user-space tools, see the
316 "<ulink url='&YOCTO_DOCS_ADT_URL;#user-space-tools'>User-Space Tools</ulink>"
317 section in the Yocto Project Application Developer's
318 Guide.
319 </para></listitem>
320 <listitem><para><emphasis>tools-sdk:</emphasis>
321 Installs a full SDK that runs on the device.
322 </para></listitem>
323 <listitem><para><emphasis>tools-testapps:</emphasis>
324 Installs device testing tools (e.g. touchscreen debugging).
325 </para></listitem>
326 <listitem><para><emphasis>x11:</emphasis>
327 Installs the X server.
328 </para></listitem>
329 <listitem><para><emphasis>x11-base:</emphasis>
330 Installs the X server with a minimal environment.
331 </para></listitem>
332 <listitem><para><emphasis>x11-sato:</emphasis>
333 Installs the OpenedHand Sato environment.
334 </para></listitem>
335 </itemizedlist>
336 </para>
337
338 </section>
339
340 <section id='ref-features-backfill'>
341 <title>Feature Backfilling</title>
342
343 <para>
344 Sometimes it is necessary in the OpenEmbedded build system to extend
345 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
346 or <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
347 to control functionality that was previously enabled and not able
348 to be disabled.
349 For these cases, we need to add an
350 additional feature item to appear in one of these variables,
351 but we do not want to force developers who have existing values
352 of the variables in their configuration to add the new feature
353 in order to retain the same overall level of functionality.
354 Thus, the OpenEmbedded build system has a mechanism to
355 automatically "backfill" these added features into existing
356 distro or machine configurations.
357 You can see the list of features for which this is done by
358 finding the
359 <link linkend='var-DISTRO_FEATURES_BACKFILL'><filename>DISTRO_FEATURES_BACKFILL</filename></link>
360 and <link linkend='var-MACHINE_FEATURES_BACKFILL'><filename>MACHINE_FEATURES_BACKFILL</filename></link>
361 variables in the <filename>meta/conf/bitbake.conf</filename> file.
362 </para>
363
364 <para>
365 Because such features are backfilled by default into all
366 configurations as described in the previous paragraph, developers
367 who wish to disable the new features need to be able to selectively
368 prevent the backfilling from occurring.
369 They can do this by adding the undesired feature or features to the
370 <link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
371 or <link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename></link>
372 variables for distro features and machine features respectively.
373 </para>
374
375 <para>
376 Here are two examples to help illustrate feature backfilling:
377 <itemizedlist>
378 <listitem><para><emphasis>The "pulseaudio" distro feature option</emphasis>:
379 Previously, PulseAudio support was enabled within the Qt and
380 GStreamer frameworks.
381 Because of this, the feature is backfilled and thus
382 enabled for all distros through the
383 <filename>DISTRO_FEATURES_BACKFILL</filename>
384 variable in the <filename>meta/conf/bitbake.conf</filename> file.
385 However, your distro needs to disable the feature.
386 You can disable the feature without affecting
387 other existing distro configurations that need PulseAudio support
388 by adding "pulseaudio" to
389 <filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename>
390 in your distro's <filename>.conf</filename> file.
391 Adding the feature to this variable when it also
392 exists in the <filename>DISTRO_FEATURES_BACKFILL</filename>
393 variable prevents the build system from adding the feature to
394 your configuration's <filename>DISTRO_FEATURES</filename>, effectively disabling
395 the feature for that particular distro.</para></listitem>
396 <listitem><para><emphasis>The "rtc" machine feature option</emphasis>:
397 Previously, real time clock (RTC) support was enabled for all
398 target devices.
399 Because of this, the feature is backfilled and thus enabled
400 for all machines through the <filename>MACHINE_FEATURES_BACKFILL</filename>
401 variable in the <filename>meta/conf/bitbake.conf</filename> file.
402 However, your target device does not have this capability.
403 You can disable RTC support for your device without
404 affecting other machines that need RTC support
405 by adding the feature to your machine's
406 <filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename>
407 list in the machine's <filename>.conf</filename> file.
408 Adding the feature to this variable when it also
409 exists in the <filename>MACHINE_FEATURES_BACKFILL</filename>
410 variable prevents the build system from adding the feature to
411 your configuration's <filename>MACHINE_FEATURES</filename>, effectively
412 disabling RTC support for that particular machine.</para></listitem>
413 </itemizedlist>
414 </para>
415 </section>
416</chapter>
417
418<!--
419vim: expandtab tw=80 ts=4 spell spelllang=en_gb
420-->
diff --git a/documentation/ref-manual/ref-images.xml b/documentation/ref-manual/ref-images.xml
new file mode 100644
index 0000000000..d15ca5b93a
--- /dev/null
+++ b/documentation/ref-manual/ref-images.xml
@@ -0,0 +1,169 @@
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),
17 GNU Lesser General Public License Version 3 (LGPLv3), and the
18 GNU Affero General Public License Version 3 (AGPL-3.0) components
19 is only supported for minimal and base images.
20 Furthermore, if you are going to build an image using non-GPLv3 and
21 similarly licensed components, you must make the following changes in
22 the <filename>local.conf</filename> file before using the BitBake
23 command to build the minimal or base image:
24 <literallayout class='monospaced'>
25 1. Comment out the EXTRA_IMAGE_FEATURES line
26 2. Set INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
27 </literallayout>
28 </note>
29
30 <para>
31 From within the <filename>poky</filename> Git repository, you can use
32 the following command to display the list of directories within the
33 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
34 that containe image recipe files:
35 <literallayout class='monospaced'>
36 $ ls meta*/recipes*/images/*.bb
37 </literallayout>
38 </para>
39
40 <para>
41 Following is a list of supported recipes:
42 <itemizedlist>
43 <listitem><para><filename>build-appliance-image</filename>:
44 An example virtual machine that contains all the pieces required to
45 run builds using the build system as well as the build system itself.
46 You can boot and run the image using either the
47 <ulink url='http://www.vmware.com/products/player/overview.html'>VMware Player</ulink>
48 or <ulink url='http://www.vmware.com/products/workstation/overview.html'>VMware Workstation</ulink>.
49 For more information on this image, see the
50 <ulink url='&YOCTO_HOME_URL;/documentation/build-appliance'>Build Appliance</ulink> page on
51 the Yocto Project website.</para></listitem>
52 <listitem><para><filename>core-image-base</filename>:
53 A console-only image that fully supports the target device hardware.</para></listitem>
54 <listitem><para><filename>core-image-clutter</filename>:
55 An image with support for the Open GL-based toolkit Clutter, which enables development of
56 rich and animated graphical user interfaces.</para></listitem>
57 <listitem><para><filename>core-image-directfb</filename>:
58 An image that uses <filename>directfb</filename> instead of X11.
59 </para></listitem>
60 <listitem><para><filename>core-image-full-cmdline</filename>:
61 A console-only image with more full-featured Linux system
62 functionality installed.</para></listitem>
63 <listitem><para><filename>core-image-lsb</filename>:
64 An image that conforms to the Linux Standard Base (LSB)
65 specification.
66 This image requires a distribution configuration that
67 enables LSB compliance (e.g. <filename>poky-lsb</filename>).
68 If you build <filename>core-image-lsb</filename> without that
69 configuration, the image will not be LSB-compliant.
70 </para></listitem>
71 <listitem><para><filename>core-image-lsb-dev</filename>:
72 A <filename>core-image-lsb</filename> image that is suitable for development work
73 using the host.
74 The image includes headers and libraries you can use in a host development
75 environment.
76 This image requires a distribution configuration that
77 enables LSB compliance (e.g. <filename>poky-lsb</filename>).
78 If you build <filename>core-image-lsb-dev</filename> without that
79 configuration, the image will not be LSB-compliant.
80 </para></listitem>
81 <listitem><para><filename>core-image-lsb-sdk</filename>:
82 A <filename>core-image-lsb</filename> that includes everything in
83 meta-toolchain but also includes development headers and libraries
84 to form a complete standalone SDK.
85 This image requires a distribution configuration that
86 enables LSB compliance (e.g. <filename>poky-lsb</filename>).
87 If you build <filename>core-image-lsb-sdk</filename> without that
88 configuration, the image will not be LSB-compliant.
89 This image is suitable for development using the target.</para></listitem>
90 <listitem><para><filename>core-image-minimal</filename>:
91 A small image just capable of allowing a device to boot.</para></listitem>
92 <listitem><para><filename>core-image-minimal-dev</filename>:
93 A <filename>core-image-minimal</filename> image suitable for development work
94 using the host.
95 The image includes headers and libraries you can use in a host development
96 environment.
97 </para></listitem>
98 <listitem><para id='images-core-image-minimal-initramfs'><filename>core-image-minimal-initramfs</filename>:
99 A <filename>core-image-minimal</filename> image that has the Minimal RAM-based
100 Initial Root Filesystem (initramfs) as part of the kernel,
101 which allows the system to find the first “init” program more efficiently.
102 See the
103 <link linkend='var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></link>
104 variable for additional information helpful when working with
105 initramfs images.
106 </para></listitem>
107 <listitem><para><filename>core-image-minimal-mtdutils</filename>:
108 A <filename>core-image-minimal</filename> image that has support
109 for the Minimal MTD Utilities, which let the user interact with the
110 MTD subsystem in the kernel to perform operations on flash devices.
111 </para></listitem>
112 <listitem><para><filename>core-image-rt</filename>:
113 A <filename>core-image-minimal</filename> image plus a real-time test suite and
114 tools appropriate for real-time use.</para></listitem>
115 <listitem><para><filename>core-image-rt-sdk</filename>:
116 A <filename>core-image-rt</filename> image that includes everything in
117 <filename>meta-toolchain</filename>.
118 The image also includes development headers and libraries to form a complete
119 stand-alone SDK and is suitable for development using the target.
120 </para></listitem>
121 <listitem><para><filename>core-image-sato</filename>:
122 An image with Sato support, a mobile environment and visual style that works well
123 with mobile devices.
124 The image supports X11 with a Sato theme and applications such as
125 a terminal, editor, file manager, media player, and so forth.
126 </para></listitem>
127 <listitem><para><filename>core-image-sato-dev</filename>:
128 A <filename>core-image-sato</filename> image suitable for development
129 using the host.
130 The image includes libraries needed to build applications on the device itself,
131 testing and profiling tools, and debug symbols.
132 This image was formerly <filename>core-image-sdk</filename>.
133 </para></listitem>
134 <listitem><para><filename>core-image-sato-sdk</filename>:
135 A <filename>core-image-sato</filename> image that includes everything in meta-toolchain.
136 The image also includes development headers and libraries to form a complete standalone SDK
137 and is suitable for development using the target.</para></listitem>
138 <listitem><para><filename>core-image-testmaster</filename>:
139 A "master" image designed to be used for automated runtime testing.
140 Provides a "known good" image that is deployed to a separate
141 partition so that you can boot into it and use it to deploy a
142 second image to be tested.
143 You can find more information about runtime testing in the
144 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
145 section in the Yocto Project Development Manual.
146 </para></listitem>
147 <listitem><para><filename>core-image-testmaster-initramfs</filename>:
148 A RAM-based Initial Root Filesystem (initramfs) image tailored for
149 use with the <filename>core-image-testmaster</filename> image.
150 </para></listitem>
151 <listitem><para><filename>core-image-weston</filename>:
152 A very basic Wayland image with a terminal.
153 This image provides the Wayland protocol libraries and the
154 reference Weston compositor.
155 For more information, see the
156 "<link linkend='wayland'>Wayland</link>" section.
157 </para></listitem>
158 <listitem><para><filename>core-image-x11</filename>:
159 A very basic X11 image with a terminal.
160 </para></listitem>
161 <listitem><para><filename>qt4e-demo-image</filename>:
162 An image that launches into the demo application for the embedded
163 (not based on X11) version of Qt.</para></listitem>
164 </itemizedlist>
165 </para>
166</chapter>
167<!--
168vim: expandtab tw=80 ts=4
169-->
diff --git a/documentation/ref-manual/ref-manual-customization.xsl b/documentation/ref-manual/ref-manual-customization.xsl
new file mode 100644
index 0000000000..1bee3bd5d3
--- /dev/null
+++ b/documentation/ref-manual/ref-manual-customization.xsl
@@ -0,0 +1,21 @@
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/1.76.1/xhtml/docbook.xsl" />
5
6 <xsl:include href="../template/permalinks.xsl"/>
7 <xsl:include href="../template/section.title.xsl"/>
8 <xsl:include href="../template/component.title.xsl"/>
9 <xsl:include href="../template/division.title.xsl"/>
10 <xsl:include href="../template/formal.object.heading.xsl"/>
11 <xsl:include href="../template/gloss-permalinks.xsl"/>
12 <xsl:include href="../template/qa-code-permalinks.xsl"/>
13
14 <xsl:param name="html.stylesheet" select="'ref-style.css'" />
15 <xsl:param name="chapter.autolabel" select="1" />
16 <xsl:param name="appendix.autolabel" select="A" />
17 <xsl:param name="section.autolabel" select="1" />
18 <xsl:param name="section.label.includes.component.label" select="1" />
19 <xsl:param name="generate.id.attributes" select="1" />
20
21</xsl:stylesheet>
diff --git a/documentation/ref-manual/ref-manual-eclipse-customization.xsl b/documentation/ref-manual/ref-manual-eclipse-customization.xsl
new file mode 100644
index 0000000000..4e6b7997b8
--- /dev/null
+++ b/documentation/ref-manual/ref-manual-eclipse-customization.xsl
@@ -0,0 +1,27 @@
1<?xml version='1.0'?>
2<xsl:stylesheet
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/1999/xhtml"
5 xmlns:fo="http://www.w3.org/1999/XSL/Format"
6 version="1.0">
7
8 <xsl:import
9 href="http://docbook.sourceforge.net/release/xsl/current/eclipse/eclipse3.xsl" />
10
11 <xsl:param name="chunker.output.indent" select="'yes'"/>
12 <xsl:param name="chunk.quietly" select="1"/>
13 <xsl:param name="chunk.first.sections" select="1"/>
14 <xsl:param name="chunk.section.depth" select="10"/>
15 <xsl:param name="use.id.as.filename" select="1"/>
16 <xsl:param name="ulink.target" select="'_self'" />
17 <xsl:param name="base.dir" select="'html/ref-manual/'"/>
18 <xsl:param name="html.stylesheet" select="'../book.css'"/>
19 <xsl:param name="eclipse.manifest" select="0"/>
20 <xsl:param name="create.plugin.xml" select="0"/>
21 <xsl:param name="suppress.navigation" select="1"/>
22 <xsl:param name="generate.index" select="0"/>
23 <xsl:param name="chapter.autolabel" select="1" />
24 <xsl:param name="appendix.autolabel">A</xsl:param>
25 <xsl:param name="section.autolabel" select="1" />
26 <xsl:param name="section.label.includes.component.label" select="1" />
27</xsl:stylesheet>
diff --git a/documentation/ref-manual/ref-manual.xml b/documentation/ref-manual/ref-manual.xml
new file mode 100644
index 0000000000..bf9f65fb5e
--- /dev/null
+++ b/documentation/ref-manual/ref-manual.xml
@@ -0,0 +1,160 @@
1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<book id='ref-manual' lang='en'
6 xmlns:xi="http://www.w3.org/2003/XInclude"
7 xmlns="http://docbook.org/ns/docbook"
8 >
9 <bookinfo>
10
11 <mediaobject>
12 <imageobject>
13 <imagedata fileref='figures/poky-title.png'
14 format='SVG'
15 align='left' scalefit='1' width='100%'/>
16 </imageobject>
17 </mediaobject>
18
19 <title>
20 Yocto Project Reference Manual
21 </title>
22
23 <authorgroup>
24 <author>
25 <firstname>Richard</firstname> <surname>Purdie</surname>
26 <affiliation>
27 <orgname>Linux Foundation</orgname>
28 </affiliation>
29 <email>richard.purdie@linuxfoundation.org</email>
30 </author>
31
32 </authorgroup>
33
34 <revhistory>
35 <revision>
36 <revnumber>4.0+git</revnumber>
37 <date>24 November 2010</date>
38 <revremark>Released with the Yocto Project 0.9 Release</revremark>
39 </revision>
40 <revision>
41 <revnumber>1.0</revnumber>
42 <date>6 April 2011</date>
43 <revremark>Released with the Yocto Project 1.0 Release.</revremark>
44 </revision>
45 <revision>
46 <revnumber>1.0.1</revnumber>
47 <date>23 May 2011</date>
48 <revremark>Released with the Yocto Project 1.0.1 Release.</revremark>
49 </revision>
50 <revision>
51 <revnumber>1.1</revnumber>
52 <date>6 October 2011</date>
53 <revremark>Released with the Yocto Project 1.1 Release.</revremark>
54 </revision>
55 <revision>
56 <revnumber>1.2</revnumber>
57 <date>April 2012</date>
58 <revremark>Released with the Yocto Project 1.2 Release.</revremark>
59 </revision>
60 <revision>
61 <revnumber>1.3</revnumber>
62 <date>October 2012</date>
63 <revremark>Released with the Yocto Project 1.3 Release.</revremark>
64 </revision>
65 <revision>
66 <revnumber>1.4</revnumber>
67 <date>April 2013</date>
68 <revremark>Released with the Yocto Project 1.4 Release.</revremark>
69 </revision>
70 <revision>
71 <revnumber>1.5</revnumber>
72 <date>October 2013</date>
73 <revremark>Released with the Yocto Project 1.5 Release.</revremark>
74 </revision>
75 <revision>
76 <revnumber>1.5.1</revnumber>
77 <date>January 2014</date>
78 <revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
79 </revision>
80 <revision>
81 <revnumber>1.6</revnumber>
82 <date>April 2014</date>
83 <revremark>Released with the Yocto Project 1.6 Release.</revremark>
84 </revision>
85 <revision>
86 <revnumber>1.7</revnumber>
87 <date>October 2014</date>
88 <revremark>Released with the Yocto Project 1.7 Release.</revremark>
89 </revision>
90 <revision>
91 <revnumber>1.7.1</revnumber>
92 <date>January 2015</date>
93 <revremark>Released with the Yocto Project 1.7.1 Release.</revremark>
94 </revision>
95 <revision>
96 <revnumber>1.7.2</revnumber>
97 <date>June 2015</date>
98 <revremark>Released with the Yocto Project 1.7.2 Release.</revremark>
99 </revision>
100 </revhistory>
101
102 <copyright>
103 <year>&COPYRIGHT_YEAR;</year>
104 <holder>Linux Foundation</holder>
105 </copyright>
106
107 <legalnotice>
108 <para>
109 Permission is granted to copy, distribute and/or modify this document under
110 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.
111 </para>
112 <note>
113 For the latest version of this manual associated with this
114 Yocto Project release, see the
115 <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>
116 from the Yocto Project website.
117 </note>
118 </legalnotice>
119
120 </bookinfo>
121
122 <xi:include href="introduction.xml"/>
123
124 <xi:include href="usingpoky.xml"/>
125
126 <xi:include href="closer-look.xml"/>
127
128 <xi:include href="technical-details.xml"/>
129
130 <xi:include href="migration.xml"/>
131
132 <xi:include href="ref-structure.xml"/>
133
134 <xi:include href="ref-classes.xml"/>
135
136 <xi:include href="ref-tasks.xml"/>
137
138 <xi:include href="ref-qa-checks.xml"/>
139
140 <xi:include href="ref-images.xml"/>
141
142 <xi:include href="ref-features.xml"/>
143
144 <xi:include href="ref-variables.xml"/>
145
146 <xi:include href="ref-varlocality.xml"/>
147
148 <xi:include href="faq.xml"/>
149
150 <xi:include href="resources.xml"/>
151
152<!-- <index id='index'>
153 <title>Index</title>
154 </index>
155-->
156
157</book>
158<!--
159vim: expandtab tw=80 ts=4
160-->
diff --git a/documentation/ref-manual/ref-qa-checks.xml b/documentation/ref-manual/ref-qa-checks.xml
new file mode 100644
index 0000000000..871cd294f6
--- /dev/null
+++ b/documentation/ref-manual/ref-qa-checks.xml
@@ -0,0 +1,1217 @@
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-qa-checks'>
6<title>QA Error and Warning Messages</title>
7
8<section id='qa-introduction'>
9 <title>Introduction</title>
10
11 <para>
12 When building a recipe, the OpenEmbedded build system performs
13 various QA checks on the output to ensure that common issues are
14 detected and reported.
15 Sometimes when you create a new recipe to build new software,
16 it will build with no problems.
17 When this is not the case, or when you have QA issues building any
18 software, it could take a little time to resolve them.
19 </para>
20
21 <para>
22 While it is tempting to ignore a QA message or even to
23 disable QA checks, it is best to try and resolve any
24 reported QA issues.
25 This chapter provides a list of the QA messages and brief explanations
26 of the issues you could encounter so that you can properly resolve
27 problems.
28 </para>
29
30 <para>
31 The next section provides a list of all QA error and warning
32 messages based on a default configuration.
33 Each entry provides the message or error form along with an
34 explanation.
35 <note>
36 <title>Notes</title>
37 <itemizedlist>
38 <listitem><para>
39 At the end of each message, the name of the associated
40 QA test (as listed in the
41 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
42 section) appears within square brackets.
43 </para></listitem>
44 <listitem><para>
45 As mentioned, this list of error and warning messages is for
46 QA checks only.
47 The list does not cover all possible build errors or
48 warnings you could encounter.
49 </para></listitem>
50 <listitem><para>
51 Because some QA checks are disabled by default, this list
52 does not include all possible QA check errors and warnings.
53 </para></listitem>
54 </itemizedlist>
55 </note>
56 </para>
57</section>
58
59<section id='qa-errors-and-warnings'>
60 <title>Errors and Warnings</title>
61
62<!--
63This section uses the <para><code> construct to enable permalinks for the
64various QA issue and warning messages. The file templates/qa-code-permalinks.xsl
65is used to locate the construct and generate the permalink. This solution
66leverages the fact that right now this section in the ref-manual is the only
67place is all the YP docs that uses the <para><code> construct. If, in the
68future, that construct were to appear in the ref-manual, a generic permalink
69would be generated for the text between <code></code>. If a better solution
70can be found then it should be implemented. I can't find one at the moment.
71-->
72
73 <para>
74 <itemizedlist>
75 <listitem>
76 <para id='qa-issue-libexec'>
77 <code>
78 &lt;packagename&gt;: &lt;path&gt; is using libexec please relocate to &lt;libexecdir&gt; [libexec]
79 </code>
80 </para>
81
82 <para>
83 The specified package contains files in
84 <filename>/usr/libexec</filename>.
85 By default, <filename>libexecdir</filename> is set to
86 "${libdir}/${BPN}" rather than to "/usr/libexec".
87 Thus, installing to <filename>/usr/libexec</filename>
88 is likely not desirable.
89 </para>
90
91 <para>
92 &nbsp;
93 </para>
94 </listitem>
95 </itemizedlist>
96 </para>
97
98 <para>
99 <itemizedlist>
100 <listitem>
101 <para id='qa-issue-rpaths'>
102 <code>
103 package &lt;packagename&gt; contains bad RPATH &lt;rpath&gt; in file &lt;file&gt; [rpaths]
104 </code>
105 </para>
106
107 <para>
108 The specified binary produced by the recipe contains dynamic
109 library load paths (rpaths) that contain build system paths
110 such as
111 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>,
112 which are incorrect for the target and could potentially
113 be a security issue.
114 Check for bad <filename>-rpath</filename> options being
115 passed to the linker in your
116 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
117 log.
118 Depending on the build system used by the software being
119 built, there might be a configure option to disable rpath
120 usage completely within the build of the software.
121 </para>
122
123 <para>
124 &nbsp;
125 </para>
126 </listitem>
127 </itemizedlist>
128 </para>
129
130 <para>
131 <itemizedlist>
132 <listitem>
133 <para id='qa-issue-useless-rpaths'>
134 <code>
135 &lt;packagename&gt;: &lt;file&gt; contains probably-redundant RPATH &lt;rpath&gt; [useless-rpaths]
136 </code>
137 </para>
138
139 <para>
140 The specified binary produced by the recipe contains dynamic
141 library load paths (rpaths) that on a standard system are
142 searched by default by the linker (e.g.
143 <filename>/lib</filename> and <filename>/usr/lib</filename>).
144 While these paths will not cause any breakage, they do waste
145 space and are unnecessary.
146 Depending on the build system used by the software being
147 built, there might be a configure option to disable rpath
148 usage completely within the build of the software.
149 </para>
150
151 <para>
152 &nbsp;
153 </para>
154 </listitem>
155 </itemizedlist>
156 </para>
157
158 <para>
159 <itemizedlist>
160 <listitem>
161 <para id='qa-issue-file-rdeps'>
162 <code>
163 &lt;packagename&gt; requires &lt;files&gt;, but no providers in its RDEPENDS [file-rdeps]
164 </code>
165 </para>
166
167 <para>
168 A file-level dependency has been identified from the
169 specified package on the specified files, but there is
170 no explicit corresponding entry in
171 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>.
172 If particular files are required at runtime then
173 <filename>RDEPENDS</filename> should be declared in the
174 recipe to ensure the packages providing them are built.
175 </para>
176
177 <para>
178 &nbsp;
179 </para>
180 </listitem>
181 </itemizedlist>
182 </para>
183
184 <para>
185 <itemizedlist>
186 <listitem>
187 <para id='qa-issue-build-deps'>
188 <code>
189 &lt;packagename1&gt; rdepends on &lt;packagename2&gt;, but it isn't a build dependency? [build-deps]
190 </code>
191 </para>
192
193 <para>
194 A runtime dependency exists between the two specified
195 packages, but there is nothing explicit within the recipe
196 to enable the OpenEmbedded build system to ensure that
197 dependency is satisfied.
198 This condition is usually triggered by an
199 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
200 value being added at the packaging stage rather than up
201 front, which is usually automatic based on the contents of
202 the package.
203 In most cases, you should change the recipe to add an
204 explicit <filename>RDEPENDS</filename> for the dependency.
205 </para>
206
207 <para>
208 &nbsp;
209 </para>
210 </listitem>
211 </itemizedlist>
212 </para>
213
214 <para>
215 <itemizedlist>
216 <listitem>
217 <para id='qa-issue-dev-so'>
218 <code>
219 non -dev/-dbg/-nativesdk package contains symlink .so: &lt;packagename&gt; path '&lt;path&gt;' [dev-so]
220 </code>
221 </para>
222
223 <para>
224 Symlink <filename>.so</filename> files are for development
225 only, and should therefore go into the
226 <filename>-dev</filename> package.
227 This situation might occur if you add
228 <filename>*.so*</filename> rather than
229 <filename>*.so.*</filename> to a non-dev package.
230 Change
231 <link linkend='var-FILES'><filename>FILES</filename></link>
232 (and possibly
233 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>)
234 such that the specified <filename>.so</filename> file goes
235 into an appropriate <filename>-dev</filename> package.
236 </para>
237
238 <para>
239 &nbsp;
240 </para>
241 </listitem>
242 </itemizedlist>
243 </para>
244
245 <para>
246 <itemizedlist>
247 <listitem>
248 <para id='qa-issue-staticdev'>
249 <code>
250 non -staticdev package contains static .a library: &lt;packagename&gt; path '&lt;path&gt;' [staticdev]
251 </code>
252 </para>
253
254 <para>
255 Static <filename>.a</filename> library files should go into
256 a <filename>-staticdev</filename> package.
257 Change
258 <link linkend='var-FILES'><filename>FILES</filename></link>
259 (and possibly
260 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>)
261 such that the specified <filename>.a</filename> file goes
262 into an appropriate <filename>-staticdev</filename> package.
263 </para>
264
265 <para>
266 &nbsp;
267 </para>
268 </listitem>
269 </itemizedlist>
270 </para>
271
272 <para>
273 <itemizedlist>
274 <listitem>
275 <para id='qa-issue-libdir'>
276 <code>
277 &lt;packagename&gt;: found library in wrong location [libdir]
278 </code>
279 </para>
280
281 <para>
282 The specified file may have been installed into an incorrect
283 (possibly hardcoded) installation path.
284 For example, this test will catch recipes that install
285 <filename>/lib/bar.so</filename> when
286 <filename>${base_libdir}</filename> is "lib32".
287 Another example is when recipes install
288 <filename>/usr/lib64/foo.so</filename> when
289 <filename>${libdir}</filename> is "/usr/lib".
290 False positives occasionally exist.
291 For these cases add "libdir" to
292 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>
293 for the package.
294 </para>
295
296 <para>
297 &nbsp;
298 </para>
299 </listitem>
300 </itemizedlist>
301 </para>
302
303 <para>
304 <itemizedlist>
305 <listitem>
306 <para id='qa-issue-debug-files'>
307 <code>
308 non debug package contains .debug directory: &lt;packagename&gt; path &lt;path&gt; [debug-files]
309 </code>
310 </para>
311
312 <para>
313 The specified package contains a
314 <filename>.debug</filename> directory, which should not
315 appear in anything but the <filename>-dbg</filename>
316 package.
317 This situation might occur if you add a path which contains
318 a <filename>.debug</filename> directory and do not
319 explicitly add the <filename>.debug</filename> directory
320 to the <filename>-dbg</filename> package.
321 If this is the case, add the <filename>.debug</filename>
322 directory explicitly to
323 <filename>FILES_${PN}-dbg</filename>.
324 See
325 <link linkend='var-FILES'><filename>FILES</filename></link>
326 for additional information on <filename>FILES</filename>.
327 </para>
328
329 <para>
330 &nbsp;
331 </para>
332 </listitem>
333 </itemizedlist>
334 </para>
335
336 <para>
337 <itemizedlist>
338 <listitem>
339 <para id='qa-issue-arch'>
340 <code>
341 Architecture did not match (&lt;machine_arch&gt; to &lt;file_arch&gt;) on &lt;file&gt; [arch]
342 </code>
343 </para>
344
345 <para>
346 By default, the OpenEmbedded build system checks the
347 Executable and Linkable Format (ELF) type, bit size, and
348 endianness of any binaries to ensure they match the
349 target architecture.
350 This test fails if any binaries do not match the type since
351 there would be an incompatibility.
352 The test could indicate that the wrong compiler or compiler
353 options have been used.
354 Sometimes software, like bootloaders, might need to
355 bypass this check.
356 If the file you receive the error for is firmware
357 that is not intended to be executed within the target
358 operating system or is intended to run on a separate
359 processor within the device, you can add "arch" to
360 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>
361 for the package.
362 Another option is to check the
363 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
364 log and verify that the compiler options being used
365 are correct.
366 </para>
367
368 <para>
369 &nbsp;
370 </para>
371 </listitem>
372 </itemizedlist>
373 </para>
374
375 <para>
376 <itemizedlist>
377 <listitem>
378 <para id='qa-issue-arch-bit-size-no-match'>
379 <code>
380 Bit size did not match (&lt;machine_bits&gt; to &lt;file_bits&gt;) &lt;recipe&gt; on &lt;file&gt; [arch]
381 </code>
382 </para>
383
384 <para>
385 By default, the OpenEmbedded build system checks
386 the Executable and Linkable Format (ELF) type,
387 bit size, and endianness of any binaries to ensure
388 they match the target architecture.
389 This test fails if any binaries do not match the type since
390 there would be an incompatibility.
391 The test could indicate that the wrong compiler or compiler
392 options have been used.
393 Sometimes software, like bootloaders, might need to
394 bypass this check.
395 If the file you receive the error for is firmware that
396 is not intended to be executed within the target
397 operating system or is intended to run on a separate
398 processor within the device, you can add "arch" to
399 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>
400 for the package.
401 Another option is to check the
402 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
403 log and verify that the compiler options being used are
404 correct.
405 </para>
406
407 <para>
408 &nbsp;
409 </para>
410 </listitem>
411 </itemizedlist>
412 </para>
413
414 <para>
415 <itemizedlist>
416 <listitem>
417 <para id='qa-issue-arch-endianness-no-match'>
418 <code>
419 Endianness did not match (&lt;machine_endianness&gt; to &lt;file_endianness&gt;) on &lt;file&gt; [arch]
420 </code>
421 </para>
422
423 <para>
424 By default, the OpenEmbedded build system checks
425 the Executable and Linkable Format (ELF) type, bit
426 size, and endianness of any binaries to ensure they
427 match the target architecture.
428 This test fails if any binaries do not match the type since
429 there would be an incompatibility.
430 The test could indicate that the wrong compiler or compiler
431 options have been used.
432 Sometimes software, like bootloaders, might need to
433 bypass this check.
434 If the file you receive the error for is firmware
435 that is not intended to be executed within the target
436 operating system or is intended to run on a separate
437 processor within the device, you can add "arch" to
438 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>
439 for the package.
440 Another option is to check the
441 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
442 log and verify that the compiler options being used
443 are correct.
444 </para>
445
446 <para>
447 &nbsp;
448 </para>
449 </listitem>
450 </itemizedlist>
451 </para>
452
453 <para>
454 <itemizedlist>
455 <listitem>
456 <para id='qa-issue-textrel'>
457 <code>
458 ELF binary '&lt;file&gt;' has relocations in .text [textrel]
459 </code>
460 </para>
461
462 <para>
463 The specified ELF binary contains relocations in its
464 <filename>.text</filename> sections.
465 This situation can result in a performance impact
466 at runtime.
467 </para>
468
469 <para>
470 &nbsp;
471 </para>
472 </listitem>
473 </itemizedlist>
474 </para>
475
476 <para>
477 <itemizedlist>
478 <listitem>
479 <para id='qa-issue-ldflags'>
480 <code>
481 No GNU_HASH in the elf binary: '&lt;file&gt;' [ldflags]
482 </code>
483 </para>
484
485 <para>
486 This indicates that binaries produced when building the
487 recipe have not been linked with the
488 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
489 options provided by the build system.
490 Check to be sure that the <filename>LDFLAGS</filename>
491 variable is being passed to the linker command.
492 A common workaround for this situation is to pass in
493 <filename>LDFLAGS</filename> using
494 <link linkend='var-TARGET_CC_ARCH'><filename>TARGET_CC_ARCH</filename></link>
495 within the recipe as follows:
496 <literallayout class='monospaced'>
497 TARGET_CC_ARCH += "${LDFLAGS}"
498 </literallayout>
499 </para>
500
501 <para>
502 &nbsp;
503 </para>
504 </listitem>
505 </itemizedlist>
506 </para>
507
508 <para>
509 <itemizedlist>
510 <listitem>
511 <para id='qa-issue-xorg-driver-abi'>
512 <code>
513 Package &lt;packagename&gt; contains Xorg driver (&lt;driver&gt;) but no xorg-abi- dependencies [xorg-driver-abi]
514 </code>
515 </para>
516
517 <para>
518 The specified package contains an Xorg driver, but does not
519 have a corresponding ABI package dependency.
520 The xserver-xorg recipe provides driver ABI names.
521 All drivers should depend on the ABI versions that they have
522 been built against.
523 Driver recipes that include
524 <filename>xorg-driver-input.inc</filename> or
525 <filename>xorg-driver-video.inc</filename> will
526 automatically get these versions.
527 Consequently, you should only need to explicitly add
528 dependencies to binary driver recipes.
529 </para>
530
531 <para>
532 &nbsp;
533 </para>
534 </listitem>
535 </itemizedlist>
536 </para>
537
538 <para>
539 <itemizedlist>
540 <listitem>
541 <para id='qa-issue-infodir'>
542 <code>
543 The /usr/share/info/dir file is not meant to be shipped in a particular package. [infodir]
544 </code>
545 </para>
546
547 <para>
548 The <filename>/usr/share/info/dir</filename> should not be
549 packaged.
550 Add the following line to your
551 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
552 task or to your <filename>do_install_append</filename>
553 within the recipe as follows:
554 <literallayout class='monospaced'>
555 rm ${D}${infodir}/dir
556 </literallayout>
557 </para>
558
559 <para>
560 &nbsp;
561 </para>
562 </listitem>
563 </itemizedlist>
564 </para>
565
566 <para>
567 <itemizedlist>
568 <listitem>
569 <para id='qa-issue-symlink-to-sysroot'>
570 <code>
571 Symlink &lt;path&gt; in &lt;packagename&gt; points to TMPDIR [symlink-to-sysroot]
572 </code>
573 </para>
574
575 <para>
576 The specified symlink points into
577 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
578 on the host.
579 Such symlinks will work on the host.
580 However, they are clearly invalid when running on
581 the target.
582 You should either correct the symlink to use a relative
583 path or remove the symlink.
584 </para>
585
586 <para>
587 &nbsp;
588 </para>
589 </listitem>
590 </itemizedlist>
591 </para>
592
593 <para>
594 <itemizedlist>
595 <listitem>
596 <para id='qa-issue-la'>
597 <code>
598 &lt;file&gt; failed sanity test (workdir) in path &lt;path&gt; [la]
599 </code>
600 </para>
601
602 <para>
603 The specified <filename>.la</filename> file contains
604 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
605 paths.
606 Any <filename>.la</filename> file containing these paths
607 is incorrect since <filename>libtool</filename> adds the
608 correct sysroot prefix when using the files automatically
609 itself.
610 </para>
611
612 <para>
613 &nbsp;
614 </para>
615 </listitem>
616 </itemizedlist>
617 </para>
618
619 <para>
620 <itemizedlist>
621 <listitem>
622 <para id='qa-issue-pkgconfig'>
623 <code>
624 &lt;file&gt; failed sanity test (tmpdir) in path &lt;path&gt; [pkgconfig]
625 </code>
626 </para>
627
628 <para>
629 The specified <filename>.pc</filename> file contains
630 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link><filename>/</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
631 paths.
632 Any <filename>.pc</filename> file containing these paths is
633 incorrect since <filename>pkg-config</filename> itself adds
634 the correct sysroot prefix when the files are accessed.
635 </para>
636
637 <para>
638 &nbsp;
639 </para>
640 </listitem>
641 </itemizedlist>
642 </para>
643
644 <para>
645 <itemizedlist>
646 <listitem>
647 <para id='qa-issue-debug-deps'>
648 <code>
649 &lt;packagename&gt; rdepends on &lt;debug_packagename&gt; [debug-deps]
650 </code>
651 </para>
652
653 <para>
654 A dependency exists between the specified non-dbg package
655 (i.e. a package whose name does not end in
656 <filename>-dbg</filename>) and a package that is a
657 <filename>dbg</filename> package.
658 The <filename>dbg</filename> packages contain
659 debug symbols and are brought in using several
660 different methods:
661 <itemizedlist>
662 <listitem><para>
663 Using the <filename>dbg-pkgs</filename>
664 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
665 value.
666 </para></listitem>
667 <listitem><para>
668 Using
669 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>.
670 </para></listitem>
671 <listitem><para>
672 As a dependency of another
673 <filename>dbg</filename> package that was brought
674 in using one of the above methods.
675 </para></listitem>
676 </itemizedlist>
677 The dependency might have been automatically added
678 because the <filename>dbg</filename> package erroneously
679 contains files that it should not contain (e.g. a
680 non-symlink <filename>.so</filename> file) or it might
681 have been added manually (e.g. by adding to
682 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>).
683 </para>
684
685 <para>
686 &nbsp;
687 </para>
688 </listitem>
689 </itemizedlist>
690 </para>
691
692 <para>
693 <itemizedlist>
694 <listitem>
695 <para id='qa-issue-dev-deps'>
696 <code>
697 &lt;packagename&gt; rdepends on &lt;dev_packagename&gt; [dev-deps]
698 </code>
699 </para>
700
701 <para>
702 A dependency exists between the specified non-dev package
703 (a package whose name does not end in
704 <filename>-dev</filename>) and a package that is a
705 <filename>dev</filename> package.
706 The <filename>dev</filename> packages contain development
707 headers and are usually brought in using several different
708 methods:
709 <itemizedlist>
710 <listitem><para>
711 Using the <filename>dev-pkgs</filename>
712 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
713 value.
714 </para></listitem>
715 <listitem><para>
716 Using
717 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>.
718 </para></listitem>
719 <listitem><para>
720 As a dependency of another
721 <filename>dev</filename> package that was brought
722 in using one of the above methods.
723 </para></listitem>
724 </itemizedlist>
725 The dependency might have been automatically added (because
726 the <filename>dev</filename> package erroneously contains
727 files that it should not have (e.g. a non-symlink
728 <filename>.so</filename> file) or it might have been added
729 manually (e.g. by adding to
730 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>).
731 </para>
732
733 <para>
734 &nbsp;
735 </para>
736 </listitem>
737 </itemizedlist>
738 </para>
739
740 <para>
741 <itemizedlist>
742 <listitem>
743 <para id='qa-issue-dep-cmp'>
744 <code>
745 &lt;var&gt;_&lt;packagename&gt; is invalid: &lt;comparison&gt; (&lt;value&gt;) only comparisons &lt;, =, &gt;, &lt;=, and &gt;= are allowed [dep-cmp]
746 </code>
747 </para>
748
749 <para>
750 If you are adding a versioned dependency relationship to one
751 of the dependency variables
752 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
753 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
754 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
755 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
756 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
757 or
758 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>),
759 you must only use the named comparison operators.
760 Change the versioned dependency values you are adding
761 to match those listed in the message.
762 </para>
763
764 <para>
765 &nbsp;
766 </para>
767 </listitem>
768 </itemizedlist>
769 </para>
770
771 <para>
772 <itemizedlist>
773 <listitem>
774 <para id='qa-issue-compile-host-path'>
775 <code>
776 &lt;recipename&gt;: The compile log indicates that host include and/or library paths were used. Please check the log '&lt;logfile&gt;' for more information. [compile-host-path]
777 </code>
778 </para>
779
780 <para>
781 The log for the
782 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
783 task indicates that paths on the host were searched
784 for files, which is not appropriate when cross-compiling.
785 Look for "is unsafe for cross-compilation" or "CROSS COMPILE
786 Badness" in the specified log file.
787 </para>
788
789 <para>
790 &nbsp;
791 </para>
792 </listitem>
793 </itemizedlist>
794 </para>
795
796 <para>
797 <itemizedlist>
798 <listitem>
799 <para id='qa-issue-install-host-path'>
800 <code>
801 &lt;recipename&gt;: The install log indicates that host include and/or library paths were used. Please check the log '&lt;logfile&gt;' for more information. [install-host-path]
802 </code>
803 </para>
804
805 <para>
806 The log for the
807 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
808 task indicates that paths on the host were searched
809 for files, which is not appropriate when cross-compiling.
810 Look for "is unsafe for cross-compilation"
811 or "CROSS COMPILE Badness" in the specified log file.
812 </para>
813
814 <para>
815 &nbsp;
816 </para>
817 </listitem>
818 </itemizedlist>
819 </para>
820
821 <para>
822 <itemizedlist>
823 <listitem>
824 <para id='qa-issue-autoconf-log'>
825 <code>
826 This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. Rerun configure task after fixing this. The path was '&lt;path&gt;'
827 </code>
828 </para>
829
830 <para>
831 The log for the
832 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
833 task indicates that paths on the host were searched
834 for files, which is not appropriate when cross-compiling.
835 Look for "is unsafe for cross-compilation" or
836 "CROSS COMPILE Badness" in the specified log file.
837 </para>
838
839 <para>
840 &nbsp;
841 </para>
842 </listitem>
843 </itemizedlist>
844 </para>
845
846 <para>
847 <itemizedlist>
848 <listitem>
849 <para id='qa-issue-pkgname'>
850 <code>
851 &lt;packagename&gt; doesn't match the [a-z0-9.+-]+ regex [pkgname]
852 </code>
853 </para>
854
855 <para>
856 The convention within the OpenEmbedded build system
857 (sometimes enforced by the package manager itself) is to
858 require that package names are all lower case
859 and to allow a restricted set of characters.
860 If your recipe name does not match this, or you add
861 packages to
862 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
863 that do not conform to the convention, then you
864 will receive this error.
865 Rename your recipe.
866 Or, if you have added a non-conforming package name to
867 <filename>PACKAGES</filename>, change the package name
868 appropriately.
869 </para>
870
871 <para>
872 &nbsp;
873 </para>
874 </listitem>
875 </itemizedlist>
876 </para>
877
878 <para>
879 <itemizedlist>
880 <listitem>
881 <para id='qa-issue-unknown-configure-option'>
882 <code>
883 &lt;recipe&gt;: configure was passed unrecognized options: &lt;options&gt; [unknown-configure-option]
884 </code>
885 </para>
886
887 <para>
888 The configure script is reporting that the specified
889 options are unrecognized.
890 This situation could be because the options
891 were previously valid but have been removed from the
892 configure script.
893 Or, there was a mistake when the options were added
894 and there is another option that should be used instead.
895 If you are unsure, consult the upstream build
896 documentation, the
897 <filename>./configure &dash;&dash;help</filename> output,
898 and the upstream change log or release notes.
899 Once you have worked out what the appropriate
900 change is, you can update
901 <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
902 or the individual
903 <link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
904 option values accordingly.
905 </para>
906
907 <para>
908 &nbsp;
909 </para>
910 </listitem>
911 </itemizedlist>
912 </para>
913
914 <para>
915 <itemizedlist>
916 <listitem>
917 <para id='qa-issue-pn-overrides'>
918 <code>
919 Recipe &lt;recipefile&gt; has PN of "&lt;recipename&gt;" which is in OVERRIDES, this can result in unexpected behavior. [pn-overrides]
920 </code>
921 </para>
922
923 <para>
924 The specified recipe has a name
925 (<link linkend='var-PN'><filename>PN</filename></link>)
926 value that appears in
927 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
928 If a recipe is named such that its <filename>PN</filename>
929 value matches something already in
930 <filename>OVERRIDES</filename> (e.g. <filename>PN</filename>
931 happens to be the same as
932 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
933 or
934 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>),
935 it can have unexpected consequences.
936 For example, assignments such as
937 <filename>FILES_${PN} = "xyz"</filename> effectively
938 turn into <filename>FILES = "xyz"</filename>.
939 Rename your recipe (or if <filename>PN</filename> is being
940 set explicitly, change the <filename>PN</filename> value) so
941 that the conflict does not occur.
942 See
943 <link linkend='var-FILES'><filename>FILES</filename></link>
944 for additional information.
945 </para>
946
947 <para>
948 &nbsp;
949 </para>
950 </listitem>
951 </itemizedlist>
952 </para>
953
954 <para>
955 <itemizedlist>
956 <listitem>
957 <para id='qa-issue-pkgvarcheck'>
958 <code>
959 &lt;recipefile&gt;: Variable &lt;variable&gt; is set as not being package specific, please fix this. [pkgvarcheck]
960 </code>
961 </para>
962
963 <para>
964 Certain variables
965 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
966 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
967 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
968 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>,
969 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
970 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
971 <link linkend='var-FILES'><filename>FILES</filename></link>,
972 <filename>pkg_preinst</filename>,
973 <filename>pkg_postinst</filename>,
974 <filename>pkg_prerm</filename>,
975 <filename>pkg_postrm</filename>, and
976 <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>)
977 should always be set specific to a package (i.e. they
978 should be set with a package name override such as
979 <filename>RDEPENDS_${PN} = "value"</filename> rather than
980 <filename>RDEPENDS = "value"</filename>).
981 If you receive this error, correct any assignments to these
982 variables within your recipe.
983 </para>
984
985 <para>
986 &nbsp;
987 </para>
988 </listitem>
989 </itemizedlist>
990 </para>
991
992 <para>
993 <itemizedlist>
994 <listitem>
995 <para id='qa-issue-already-stripped'>
996 <code>
997 File '&lt;file&gt;' from &lt;recipename&gt; was already stripped, this will prevent future debugging! [already-stripped]
998 </code>
999 </para>
1000
1001 <para>
1002 Produced binaries have already been stripped prior to the
1003 build system extracting debug symbols.
1004 It is common for upstream software projects to default to
1005 stripping debug symbols for output binaries.
1006 In order for debugging to work on the target using
1007 <filename>-dbg</filename> packages, this stripping must be
1008 disabled.
1009 </para>
1010
1011 <para>
1012 Depending on the build system used by the software being
1013 built, disabling this stripping could be as easy as
1014 specifying an additional configure option.
1015 If not, disabling stripping might involve patching
1016 the build scripts.
1017 In the latter case, look for references to "strip" or
1018 "STRIP", or the "-s" or "-S" command-line options being
1019 specified on the linker command line (possibly
1020 through the compiler command line if preceded with "-Wl,").
1021 <note>
1022 Disabling stripping here does not mean that the final
1023 packaged binaries will be unstripped.
1024 Once the OpenEmbedded build system splits out debug
1025 symbols to the <filename>-dbg</filename> package,
1026 it will then strip the symbols from the binaries.
1027 </note>
1028 </para>
1029
1030 <para>
1031 &nbsp;
1032 </para>
1033 </listitem>
1034 </itemizedlist>
1035 </para>
1036
1037 <para>
1038 <itemizedlist>
1039 <listitem>
1040 <para id='qa-issue-packages-list'>
1041 <code>
1042 &lt;packagename&gt; is listed in PACKAGES multiple times, this leads to packaging errors. [packages-list]
1043 </code>
1044 </para>
1045
1046 <para>
1047 Package names must appear only once in the
1048 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
1049 variable.
1050 You might receive this error if you are attempting to add a
1051 package to <filename>PACKAGES</filename> that is
1052 already in the variable's value.
1053 </para>
1054
1055 <para>
1056 &nbsp;
1057 </para>
1058 </listitem>
1059 </itemizedlist>
1060 </para>
1061
1062 <para>
1063 <itemizedlist>
1064 <listitem>
1065 <para id='qa-issue-files-invalid'>
1066 <code>
1067 FILES variable for package &lt;packagename&gt; contains '//' which is invalid. Attempting to fix this but you should correct the metadata. [files-invalid]
1068 </code>
1069 </para>
1070
1071 <para>
1072 The string "//" is invalid in a Unix path.
1073 Correct all occurrences where this string appears in a
1074 <link linkend='var-FILES'><filename>FILES</filename></link>
1075 variable so that there is only a single "/".
1076 </para>
1077
1078 <para>
1079 &nbsp;
1080 </para>
1081 </listitem>
1082 </itemizedlist>
1083 </para>
1084
1085 <para>
1086 <itemizedlist>
1087 <listitem>
1088 <para id='qa-issue-installed-vs-shipped'>
1089 <code>
1090 &lt;recipename&gt;: Files/directories were installed but not shipped [installed-vs-shipped]
1091 </code>
1092 </para>
1093
1094 <para>
1095 Files have been installed within the
1096 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
1097 task but have not been included in any package by way of the
1098 <link linkend='var-FILES'><filename>FILES</filename></link>
1099 variable.
1100 Files that do not appear in any package cannot be present in
1101 an image later on in the build process.
1102 You need to do one of the following:
1103 <itemizedlist>
1104 <listitem><para>
1105 Add the files to <filename>FILES</filename> for the
1106 package you want them to appear in (e.g.
1107 <filename>FILES_${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename> for the main
1108 package).
1109 </para></listitem>
1110 <listitem><para>
1111 Delete the files at the end of the
1112 <filename>do_install</filename> task if the files
1113 are not needed in any package.
1114 </para></listitem>
1115 </itemizedlist>
1116 </para>
1117
1118 <para>
1119 &nbsp;
1120 </para>
1121 </listitem>
1122 </itemizedlist>
1123 </para>
1124
1125 <para>
1126 <itemizedlist>
1127 <listitem>
1128 <para id='qa-issue-old-and-new-package-and-version-names'>
1129 <code>
1130 &lt;oldpackage&gt;-&lt;oldpkgversion&gt; was registered as shlib provider for &lt;library&gt;, changing it to &lt;newpackage&gt;-&lt;newpkgversion&gt; because it was built later
1131 </code>
1132 </para>
1133
1134 <para>
1135 This message means that both
1136 <filename>&lt;oldpackage&gt;</filename> and
1137 <filename>&lt;newpackage&gt;</filename> provide the specified
1138 shared library.
1139 You can expect this message when a recipe has been renamed.
1140 However, if that is not the case, the message might indicate
1141 that a private version of a library is being erroneously
1142 picked up as the provider for a common library.
1143 If that is the case, you should add the library's
1144 <filename>.so</filename> file name to
1145 <link linkend='var-PRIVATE_LIBS'><filename>PRIVATE_LIBS</filename></link>
1146 in the recipe that provides
1147 the private version of the library.
1148 </para>
1149 </listitem>
1150 </itemizedlist>
1151 </para>
1152
1153<!--
1154Here are some messages that might be documented in the future.
1155Right now we are not documenting them because the QA checks are not
1156enabled by default:
1157
1158 <para>
1159 <itemizedlist>
1160 <listitem><para>
1161 <literallayout class='monospaced'>
1162 Desktop file issue: &lt;error&gt; [desktop]
1163 </literallayout>
1164 NEED A DESCRIPTION AND SOLUTION
1165 </para></listitem>
1166 </itemizedlist>
1167 </para>
1168
1169 <para>
1170 <itemizedlist>
1171 <listitem><para>
1172 <literallayout class='monospaced'>
1173 &lt;packagename&gt;: &lt;file&gt;, installed in the base_prefix, requires a shared library under exec_prefix (&lt;exec_prefix&t;g) [unsafe-references-in-binaries]
1174 </literallayout>
1175 NEED A DESCRIPTION AND SOLUTION
1176 </para></listitem>
1177 </itemizedlist>
1178 </para>
1179
1180 <para>
1181 <itemizedlist>
1182 <listitem><para>
1183 <literallayout class='monospaced'>
1184 &lt;packagename&gt;: Found a reference to &lt;exec_prefix&gt;/ in &lt;path&gt; - Shell scripts in base_bindir and base_sbindir should not reference anything in exec_prefix [unsafe-references-in-scripts]
1185 </literallayout>
1186 NEED A DESCRIPTION AND SOLUTION
1187 </para></listitem>
1188 </itemizedlist>
1189 </para>
1190-->
1191</section>
1192
1193<section id='configuring-and-disabling-qa-checks'>
1194 <title>Configuring and Disabling QA Checks</title>
1195
1196 <para>
1197 You can configure the QA checks globally so that specific check
1198 failures either raise a warning or an error message, using the
1199 <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link> and
1200 <link linkend='var-ERROR_QA'><filename>ERROR_QA</filename></link>
1201 variables, respectively.
1202 You can also disable checks within a particular recipe using
1203 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>.
1204 For information on how to work with the QA checks, see the
1205 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
1206 section.
1207 <note><title>Tip</title>
1208 Please keep in mind that the QA checks exist in order to
1209 detect real or potential problems in the packaged output.
1210 So exercise caution when disabling these checks.
1211 </note>
1212 </para>
1213</section>
1214</chapter>
1215<!--
1216vim: expandtab tw=80 ts=4
1217-->
diff --git a/documentation/ref-manual/ref-structure.xml b/documentation/ref-manual/ref-structure.xml
new file mode 100644
index 0000000000..e7ca7b334b
--- /dev/null
+++ b/documentation/ref-manual/ref-structure.xml
@@ -0,0 +1,1129 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='ref-structure'>
6
7<title>Source Directory Structure</title>
8
9<para>
10 The <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> consists of several components.
11 Understanding them and knowing where they are located is key to using the Yocto Project well.
12 This chapter describes the Source Directory and gives information about the various
13 files and directories.
14</para>
15
16<para>
17 For information on how to establish a local Source Directory on your development system, see the
18 "<ulink url='&YOCTO_DOCS_DEV_URL;#getting-setup'>Getting Set Up</ulink>"
19 section in the Yocto Project Development Manual.
20</para>
21
22<note>
23 The OpenEmbedded build system does not support file or directory names that
24 contain spaces.
25 Be sure that the Source Directory you use does not contain these types
26 of names.
27</note>
28
29<section id='structure-core'>
30 <title>Top-Level Core Components</title>
31
32 <para>
33 This section describes the top-level components of the
34 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
35 </para>
36
37 <section id='structure-core-bitbake'>
38 <title><filename>bitbake/</filename></title>
39
40 <para>
41 This directory includes a copy of BitBake for ease of use.
42 The copy usually matches the current stable BitBake release from
43 the BitBake project.
44 BitBake, a
45 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
46 interpreter, reads the Yocto Project Metadata and runs the tasks
47 defined by that data.
48 Failures are usually from the Metadata and not from BitBake itself.
49 Consequently, most users do not need to worry about BitBake.
50 </para>
51
52 <para>
53 When you run the <filename>bitbake</filename> command, the
54 main BitBake executable, which resides in the
55 <filename>bitbake/bin/</filename> directory, starts.
56 Sourcing an environment setup script (e.g.
57 <link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>
58 or
59 <link linkend="structure-memres-core-script"><filename>oe-init-build-env-memres</filename></link>)
60 places the <filename>scripts</filename> and
61 <filename>bitbake/bin</filename> directories (in that order) into
62 the shell's <filename>PATH</filename> environment variable.
63 </para>
64
65 <para>
66 For more information on BitBake, see the
67 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
68 </para>
69 </section>
70
71 <section id='structure-core-build'>
72 <title><filename>build/</filename></title>
73
74 <para>
75 This directory contains user configuration files and the output
76 generated by the OpenEmbedded build system in its standard configuration where
77 the source tree is combined with the output.
78 The <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
79 is created initially when you <filename>source</filename>
80 the OpenEmbedded build environment setup script
81 (i.e.
82 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
83 or
84 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
85 </para>
86
87 <para>
88 It is also possible to place output and configuration
89 files in a directory separate from the
90 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
91 by providing a directory name when you <filename>source</filename>
92 the setup script.
93 For information on separating output from your local
94 Source Directory files, see the
95 "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
96 and
97 "<link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>"
98 sections.
99 </para>
100 </section>
101
102 <section id='handbook'>
103 <title><filename>documentation/</filename></title>
104
105 <para>
106 This directory holds the source for the Yocto Project documentation
107 as well as templates and tools that allow you to generate PDF and HTML
108 versions of the manuals.
109 Each manual is contained in a sub-folder.
110 For example, the files for this manual reside in
111 the <filename>ref-manual/</filename> directory.
112 </para>
113 </section>
114
115 <section id='structure-core-meta'>
116 <title><filename>meta/</filename></title>
117
118 <para>
119 This directory contains the OpenEmbedded Core metadata.
120 The directory holds recipes, common classes, and machine
121 configuration for emulated targets (<filename>qemux86</filename>,
122 <filename>qemuarm</filename>, and so forth.)
123 </para>
124 </section>
125
126 <section id='structure-core-meta-yocto'>
127 <title><filename>meta-yocto/</filename></title>
128
129 <para>
130 This directory contains the configuration for the Poky
131 reference distribution.
132 </para>
133 </section>
134
135 <section id='structure-core-meta-yocto-bsp'>
136 <title><filename>meta-yocto-bsp/</filename></title>
137
138 <para>
139 This directory contains the Yocto Project reference
140 hardware Board Support Packages (BSPs).
141 For more information on BSPs, see the
142 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support
143 Package (BSP) Developer's Guide</ulink>.
144 </para>
145 </section>
146
147 <section id='structure-meta-selftest'>
148 <title><filename>meta-selftest/</filename></title>
149
150 <para>
151 This directory adds additional recipes and append files
152 used by the OpenEmbedded selftests to verify the behavior
153 of the build system.
154 </para>
155
156 <para>
157 You do not have to add this layer to your
158 <filename>bblayers.conf</filename> file unless you want to run the
159 selftests.
160 </para>
161 </section>
162
163 <section id='structure-meta-skeleton'>
164 <title><filename>meta-skeleton/</filename></title>
165
166 <para>
167 This directory contains template recipes for BSP and kernel development.
168 </para>
169 </section>
170
171 <section id='structure-core-scripts'>
172 <title><filename>scripts/</filename></title>
173
174 <para>
175 This directory contains various integration scripts that implement
176 extra functionality in the Yocto Project environment (e.g. QEMU scripts).
177 The <link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>
178 and
179 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
180 scripts append this directory to the shell's
181 <filename>PATH</filename> environment variable.
182 </para>
183
184 <para>
185 The <filename>scripts</filename> directory has useful scripts that assist in contributing
186 back to the Yocto Project, such as <filename>create-pull-request</filename> and
187 <filename>send-pull-request</filename>.
188 </para>
189 </section>
190
191 <section id='structure-core-script'>
192 <title><filename>&OE_INIT_FILE;</filename></title>
193
194 <para>
195 This script is one of two scripts that set up the OpenEmbedded build
196 environment.
197 For information on the other script, see the
198 "<link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>"
199 section.
200 </para>
201
202 <para>
203 Running this script with the <filename>source</filename> command in
204 a shell makes changes to <filename>PATH</filename> and sets other
205 core BitBake variables based on the current working directory.
206 You need to run an environment setup script before running BitBake
207 commands.
208 The script uses other scripts within the
209 <filename>scripts</filename> directory to do the bulk of the work.
210 </para>
211
212 <para>
213 When you run this script, your Yocto Project environment is set
214 up, a
215 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
216 is created, your working directory becomes the Build Directory,
217 and you are presented with a list of common BitBake targets.
218 Here is an example:
219 <literallayout class='monospaced'>
220 $ source oe-init-build-env
221
222 ### Shell environment set up for builds. ###
223
224 You can now run 'bitbake &lt;target&gt;'
225
226 Common targets are:
227 core-image-minimal
228 core-image-sato
229 meta-toolchain
230 adt-installer
231 meta-ide-support
232
233 You can also run generated qemu images with a command like 'runqemu qemux86'
234 </literallayout>
235 The script gets its default list of common targets from the
236 <filename>conf-notes.txt</filename> file, which is found in the
237 <filename>meta-yocto</filename> directory within the
238 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
239 Should you have custom distributions, it is very easy to modify
240 this configuration file to include your targets for your
241 distribution.
242 See the
243 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory'>Creating a Custom Template Configuration Directory</ulink>"
244 section in the Yocto Project Development Manual for more
245 information.
246 </para>
247
248 <para>
249 By default, running this script without a
250 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
251 argument creates the <filename>build</filename> directory
252 in your current working directory.
253 If you provide a Build Directory argument when you
254 <filename>source</filename> the script, you direct the OpenEmbedded
255 build system to create a Build Directory of your choice.
256 For example, the following command creates a Build Directory named
257 <filename>mybuilds</filename> that is outside of the
258 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
259 <literallayout class='monospaced'>
260 $ source &OE_INIT_FILE; ~/mybuilds
261 </literallayout>
262 The OpenEmbedded build system uses the template configuration
263 files, which are found by default in the
264 <filename>meta-yocto/conf</filename> directory in the
265 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
266 See the
267 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory'>Creating a Custom Template Configuration Directory</ulink>"
268 section in the Yocto Project Development Manual for more
269 information.
270 <note>
271 The OpenEmbedded build system does not support file or directory names that
272 contain spaces.
273 If you attempt to run the <filename>&OE_INIT_FILE;</filename> script
274 from a Source Directory that contains spaces in either the filenames
275 or directory names, the script returns an error indicating no such
276 file or directory.
277 Be sure to use a Source Directory free of names containing spaces.
278 </note>
279 </para>
280 </section>
281
282 <section id='structure-memres-core-script'>
283 <title><filename>oe-init-build-env-memres</filename></title>
284
285 <para>
286 This script is one of two scripts that set up the OpenEmbedded
287 build environment.
288 Aside from setting up the environment, this script starts a
289 memory-resident BitBake server.
290 For information on the other setup script, see the
291 "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>"
292 section.
293 </para>
294
295 <para>
296 Memory-resident BitBake resides in memory until you specifically
297 remove it using the following BitBake command:
298 <literallayout class='monospaced'>
299 $ bitbake -m
300 </literallayout>
301 </para>
302
303 <para>
304 Running this script with the <filename>source</filename> command in
305 a shell makes changes to <filename>PATH</filename> and sets other
306 core BitBake variables based on the current working directory.
307 One of these variables is the
308 <link linkend='var-BBSERVER'><filename>BBSERVER</filename></link>
309 variable, which allows the OpenEmbedded build system to locate
310 the server that is running BitBake.
311 </para>
312
313 <para>
314 You need to run an environment setup script before using BitBake
315 commands.
316 Following is the script syntax:
317 <literallayout class='monospaced'>
318 $ source oe-init-build-env-memres <replaceable>port_number</replaceable> <replaceable>build_dir</replaceable>
319 </literallayout>
320 The script uses other scripts within the
321 <filename>scripts</filename> directory to do the bulk of the work.
322 </para>
323
324 <para>
325 If you do not provide a port number with the script, the
326 BitBake server at port "12345" is started.
327 </para>
328
329 <para>
330 When you run this script, your Yocto Project environment is set
331 up, a
332 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
333 is created, your working directory becomes the Build Directory,
334 and you are presented with a list of common BitBake targets.
335 Here is an example:
336 <literallayout class='monospaced'>
337 $ source oe-init-build-env-memres
338 No port specified, using dynamically selected port
339
340 ### Shell environment set up for builds. ###
341
342 You can now run 'bitbake &lt;target&gt;'
343
344 Common targets are:
345 core-image-minimal
346 core-image-sato
347 meta-toolchain
348 adt-installer
349 meta-ide-support
350
351 You can also run generated qemu images with a command like 'runqemu qemux86'
352 Bitbake server started on demand as needed, use bitbake -m to shut it down
353 </literallayout>
354 The script gets its default list of common targets from the
355 <filename>conf-notes.txt</filename> file, which is found in the
356 <filename>meta-yocto</filename> directory within the
357 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
358 Should you have custom distributions, it is very easy to modify
359 this configuration file to include your targets for your
360 distribution.
361 See the
362 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory'>Creating a Custom Template Configuration Directory</ulink>"
363 section in the Yocto Project Development Manual for more
364 information.
365 </para>
366
367 <para>
368 By default, running this script without a
369 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
370 argument creates a build directory named
371 <filename>build</filename>.
372 If you provide a Build Directory argument when you
373 <filename>source</filename> the script, the Build Directory is
374 created using that name.
375 For example, the following command starts the BitBake server using
376 the default port "12345" and creates a Build Directory named
377 <filename>mybuilds</filename> that is outside of the
378 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
379 <literallayout class='monospaced'>
380 $ source oe-init-build-env-memres ~/mybuilds
381 </literallayout>
382 The OpenEmbedded build system uses the template configuration
383 files, which are found by default in the
384 <filename>meta-yocto/conf</filename> directory in the
385 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
386 See the
387 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory'>Creating a Custom Template Configuration Directory</ulink>"
388 section in the Yocto Project Development Manual for more
389 information.
390 <note>
391 The OpenEmbedded build system does not support file or
392 directory names that contain spaces.
393 If you attempt to run the
394 <filename>oe-init-build-env-memres</filename> script
395 from a Source Directory that contains spaces in either the
396 filenames or directory names, the script returns an error
397 indicating no such file or directory.
398 Be sure to use a Source Directory free of names containing
399 spaces.
400 </note>
401 </para>
402 </section>
403
404 <section id='structure-basic-top-level'>
405 <title><filename>LICENSE, README, and README.hardware</filename></title>
406
407 <para>
408 These files are standard top-level files.
409 </para>
410 </section>
411</section>
412
413<section id='structure-build'>
414 <title>The Build Directory - <filename>build/</filename></title>
415
416 <para>
417 The OpenEmbedded build system creates the
418 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
419 when you run one of the build environment setup scripts (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 If you do not give the Build Directory a specific name when you run
427 a setup script, the name defaults to <filename>build</filename>.
428 </para>
429
430 <para>
431 The
432 <link linkend='var-TOPDIR'><filename>TOPDIR</filename></link> variable
433 points to the Build Directory.
434 </para>
435
436 <section id='structure-build-buildhistory'>
437 <title><filename>build/buildhistory</filename></title>
438
439 <para>
440 The OpenEmbedded build system creates this directory when you
441 enable the build history feature.
442 The directory tracks build information into image, packages, and
443 SDK subdirectories.
444 For information on the build history feature, see the
445 "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
446 section.
447 </para>
448 </section>
449
450 <section id='structure-build-conf-local.conf'>
451 <title><filename>build/conf/local.conf</filename></title>
452
453 <para>
454 This configuration file contains all the local user configurations
455 for your build environment.
456 The <filename>local.conf</filename> file contains documentation on
457 the various configuration options.
458 Any variable set here overrides any variable set elsewhere within
459 the environment unless that variable is hard-coded within a file
460 (e.g. by using '=' instead of '?=').
461 Some variables are hard-coded for various reasons but these
462 variables are relatively rare.
463 </para>
464
465 <para>
466 Edit this file to set the
467 <filename><link linkend='var-MACHINE'>MACHINE</link></filename>
468 for which you want to build, which package types you wish to use
469 (<link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>),
470 the location from which you want to access downloaded files
471 (<filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>),
472 and how you want your host machine to use resources
473 (<link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>
474 and
475 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>).
476 </para>
477
478 <para>
479 If <filename>local.conf</filename> is not present when you
480 start the build, the OpenEmbedded build system creates it from
481 <filename>local.conf.sample</filename> when
482 you <filename>source</filename> the top-level build environment
483 setup script (i.e.
484 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
485 or
486 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
487 </para>
488
489 <para>
490 The source <filename>local.conf.sample</filename> file used
491 depends on the <filename>$TEMPLATECONF</filename> script variable,
492 which defaults to <filename>meta-yocto/conf</filename>
493 when you are building from the Yocto Project development
494 environment and defaults to <filename>meta/conf</filename> when
495 you are building from the OpenEmbedded Core environment.
496 Because the script variable points to the source of the
497 <filename>local.conf.sample</filename> file, this implies that
498 you can configure your build environment from any layer by setting
499 the variable in the top-level build environment setup script as
500 follows:
501 <literallayout class='monospaced'>
502 TEMPLATECONF=<replaceable>your_layer</replaceable>/conf
503 </literallayout>
504 Once the build process gets the sample file, it uses
505 <filename>sed</filename> to substitute final
506 <filename>${</filename><link linkend='var-OEROOT'><filename>OEROOT</filename></link><filename>}</filename>
507 values for all <filename>##OEROOT##</filename> values.
508 <note>
509 You can see how the <filename>TEMPLATECONF</filename> variable
510 is used by looking at the
511 <filename>scripts/oe-setup-builddir</filename> script in the
512 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
513 You can find the Yocto Project version of the
514 <filename>local.conf.sample</filename> file in the
515 <filename>meta-yocto/conf</filename> directory.
516 </note>
517 </para>
518 </section>
519
520 <section id='structure-build-conf-bblayers.conf'>
521 <title><filename>build/conf/bblayers.conf</filename></title>
522
523 <para>
524 This configuration file defines
525 <ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>layers</ulink>,
526 which are directory trees, traversed (or walked) by BitBake.
527 The <filename>bblayers.conf</filename> file uses the
528 <link linkend='var-BBLAYERS'><filename>BBLAYERS</filename></link>
529 variable to list the layers BitBake tries to find, and uses the
530 <link linkend='var-BBLAYERS_NON_REMOVABLE'><filename>BBLAYERS_NON_REMOVABLE</filename></link>
531 variable to list layers that must not be removed.
532 </para>
533
534 <para>
535 If <filename>bblayers.conf</filename> is not present when you
536 start the build, the OpenEmbedded build system creates it from
537 <filename>bblayers.conf.sample</filename> when
538 you <filename>source</filename> the top-level build environment
539 setup script (i.e.
540 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
541 or
542 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
543 </para>
544
545 <para>
546 The source <filename>bblayers.conf.sample</filename> file used
547 depends on the <filename>$TEMPLATECONF</filename> script variable,
548 which defaults to <filename>meta-yocto/conf</filename>
549 when you are building from the Yocto Project development
550 environment and defaults to <filename>meta/conf</filename> when
551 you are building from the OpenEmbedded Core environment.
552 Because the script variable points to the source of the
553 <filename>bblayers.conf.sample</filename> file, this implies that
554 you can base your build from any layer by setting the variable in
555 the top-level build environment setup script as follows:
556 <literallayout class='monospaced'>
557 TEMPLATECONF=<replaceable>your_layer</replaceable>/conf
558 </literallayout>
559 Once the build process gets the sample file, it uses
560 <filename>sed</filename> to substitute final
561 <filename>${</filename><link linkend='var-OEROOT'><filename>OEROOT</filename></link><filename>}</filename>
562 values for all <filename>##OEROOT##</filename> values.
563 <note>
564 You can see how the <filename>TEMPLATECONF</filename> variable
565 <filename>scripts/oe-setup-builddir</filename> script in the
566 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
567 You can find the Yocto Project version of the
568 <filename>bblayers.conf.sample</filename> file in the
569 <filename>meta-yocto/conf</filename> directory.
570 </note>
571 </para>
572 </section>
573
574 <section id='structure-build-conf-sanity_info'>
575 <title><filename>build/conf/sanity_info</filename></title>
576
577 <para>
578 This file indicates the state of the sanity checks and is created
579 during the build.
580 </para>
581 </section>
582
583 <section id='structure-build-downloads'>
584 <title><filename>build/downloads/</filename></title>
585
586 <para>
587 This directory contains downloaded upstream source tarballs.
588 You can reuse the directory for multiple builds or move
589 the directory to another location.
590 You can control the location of this directory through the
591 <filename><link linkend='var-DL_DIR'>DL_DIR</link></filename> variable.
592 </para>
593 </section>
594
595 <section id='structure-build-sstate-cache'>
596 <title><filename>build/sstate-cache/</filename></title>
597
598 <para>
599 This directory contains the shared state cache.
600 You can reuse the directory for multiple builds or move
601 the directory to another location.
602 You can control the location of this directory through the
603 <filename><link linkend='var-SSTATE_DIR'>SSTATE_DIR</link></filename> variable.
604 </para>
605 </section>
606
607 <section id='structure-build-tmp'>
608 <title><filename>build/tmp/</filename></title>
609
610 <para>
611 The OpenEmbedded build system creates and uses this directory
612 for all the build system's output.
613 The
614 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
615 variable points to this directory.
616 </para>
617
618 <para>
619 BitBake creates this directory if it does not exist.
620 As a last resort, to clean up a build and start it from scratch
621 (other than the downloads), you can remove everything in the
622 <filename>tmp</filename> directory or get rid of the
623 directory completely.
624 If you do, you should also completely remove the
625 <filename>build/sstate-cache</filename> directory.
626 </para>
627 </section>
628
629 <section id='structure-build-tmp-buildstats'>
630 <title><filename>build/tmp/buildstats/</filename></title>
631
632 <para>
633 This directory stores the build statistics.
634 </para>
635 </section>
636
637 <section id='structure-build-tmp-cache'>
638 <title><filename>build/tmp/cache/</filename></title>
639
640 <para>
641 When BitBake parses the metadata, it creates a cache file of the result that can
642 be used when subsequently running commands.
643 BitBake stores these results here on a per-machine basis.
644 </para>
645 </section>
646
647 <section id='structure-build-tmp-deploy'>
648 <title><filename>build/tmp/deploy/</filename></title>
649
650 <para>
651 This directory contains any "end result" output from the
652 OpenEmbedded build process.
653 The <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>
654 variable points to this directory.
655 For more detail on the contents of the <filename>deploy</filename>
656 directory, see the
657 "<link linkend='images-dev-environment'>Images</link>" and
658 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
659 sections.
660 </para>
661 </section>
662
663 <section id='structure-build-tmp-deploy-deb'>
664 <title><filename>build/tmp/deploy/deb/</filename></title>
665
666 <para>
667 This directory receives any <filename>.deb</filename> packages produced by
668 the build process.
669 The packages are sorted into feeds for different architecture types.
670 </para>
671 </section>
672
673 <section id='structure-build-tmp-deploy-rpm'>
674 <title><filename>build/tmp/deploy/rpm/</filename></title>
675
676 <para>
677 This directory receives any <filename>.rpm</filename> packages produced by
678 the build process.
679 The packages are sorted into feeds for different architecture types.
680 </para>
681 </section>
682
683 <section id='structure-build-tmp-deploy-ipk'>
684 <title><filename>build/tmp/deploy/ipk/</filename></title>
685
686 <para>
687 This directory receives <filename>.ipk</filename> packages produced by
688 the build process.
689 </para>
690 </section>
691
692 <section id='structure-build-tmp-deploy-licenses'>
693 <title><filename>build/tmp/deploy/licenses/</filename></title>
694
695 <para>
696 This directory receives package licensing information.
697 For example, the directory contains sub-directories for <filename>bash</filename>,
698 <filename>busybox</filename>, and <filename>glibc</filename> (among others) that in turn
699 contain appropriate <filename>COPYING</filename> license files with other licensing information.
700 For information on licensing, see the
701 "<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>"
702 section.
703 </para>
704 </section>
705
706 <section id='structure-build-tmp-deploy-images'>
707 <title><filename>build/tmp/deploy/images/</filename></title>
708
709 <para>
710 This directory receives complete filesystem images.
711 If you want to flash the resulting image from a build onto a device, look here for the image.
712 </para>
713
714 <para>
715 Be careful when deleting files in this directory.
716 You can safely delete old images from this directory (e.g.
717 <filename>core-image-*</filename>, <filename>hob-image-*</filename>,
718 etc.).
719 However, the kernel (<filename>*zImage*</filename>, <filename>*uImage*</filename>, etc.),
720 bootloader and other supplementary files might be deployed here prior to building an
721 image.
722 Because these files are not directly produced from the image, if you
723 delete them they will not be automatically re-created when you build the image again.
724 </para>
725
726 <para>
727 If you do accidentally delete files here, you will need to force them to be
728 re-created.
729 In order to do that, you will need to know the target that produced them.
730 For example, these commands rebuild and re-create the kernel files:
731 <literallayout class='monospaced'>
732 $ bitbake -c clean virtual/kernel
733 $ bitbake virtual/kernel
734 </literallayout>
735 </para>
736 </section>
737
738 <section id='structure-build-tmp-deploy-sdk'>
739 <title><filename>build/tmp/deploy/sdk/</filename></title>
740
741 <para>
742 The OpenEmbedded build system creates this directory to hold
743 toolchain installer scripts, which when executed, install the
744 sysroot that matches your target hardware.
745 You can find out more about these installers in the
746 "<ulink url='&YOCTO_DOCS_ADT_URL;#optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</ulink>"
747 section in the Yocto Project Application Developer's Guide.
748 </para>
749 </section>
750
751 <section id='structure-build-tmp-sstate-control'>
752 <title><filename>build/tmp/sstate-control/</filename></title>
753
754 <para>
755 The OpenEmbedded build system uses this directory for the
756 shared state manifest files.
757 The shared state code uses these files to record the files
758 installed by each sstate task so that the files can be removed
759 when cleaning the recipe or when a newer version is about to
760 be installed.
761 The build system also uses the manifests to detect and produce
762 a warning when files from one task are overwriting those from
763 another.
764 </para>
765 </section>
766
767 <section id='structure-build-tmp-sysroots'>
768 <title><filename>build/tmp/sysroots/</filename></title>
769
770 <para>
771 This directory contains shared header files and libraries as well as other shared
772 data.
773 Packages that need to share output with other packages do so within this directory.
774 The directory is subdivided by architecture so multiple builds can run within
775 the one Build Directory.
776 </para>
777 </section>
778
779 <section id='structure-build-tmp-stamps'>
780 <title><filename>build/tmp/stamps/</filename></title>
781
782 <para>
783 This directory holds information that BitBake uses for accounting purposes
784 to track what tasks have run and when they have run.
785 The directory is sub-divided by architecture, package name, and
786 version.
787 Following is an example:
788 <literallayout class='monospaced'>
789 stamps/all-poky-linux/distcc-config/1.0-r0.do_build-2fdd....2do
790 </literallayout>
791 Although the files in the directory are empty of data,
792 BitBake uses the filenames and timestamps for tracking purposes.
793 </para>
794 </section>
795
796 <section id='structure-build-tmp-log'>
797 <title><filename>build/tmp/log/</filename></title>
798
799 <para>
800 This directory contains general logs that are not otherwise placed using the
801 package's <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>.
802 Examples of logs are the output from the
803 <filename>do_check_pkg</filename> or
804 <filename>do_distro_check</filename> tasks.
805 Running a build does not necessarily mean this directory is created.
806 </para>
807 </section>
808
809 <section id='structure-build-tmp-work'>
810 <title><filename>build/tmp/work/</filename></title>
811
812 <para>
813 This directory contains architecture-specific work sub-directories
814 for packages built by BitBake.
815 All tasks execute from the appropriate work directory.
816 For example, the source for a particular package is unpacked,
817 patched, configured and compiled all within its own work directory.
818 Within the work directory, organization is based on the package group
819 and version for which the source is being compiled
820 as defined by the
821 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
822 </para>
823
824 <para>
825 It is worth considering the structure of a typical work directory.
826 As an example, consider <filename>linux-yocto-kernel-3.0</filename>
827 on the machine <filename>qemux86</filename>
828 built within the Yocto Project.
829 For this package, a work directory of
830 <filename>tmp/work/qemux86-poky-linux/linux-yocto/3.0+git1+&lt;.....&gt;</filename>,
831 referred to as the
832 <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>, is created.
833 Within this directory, the source is unpacked to
834 <filename>linux-qemux86-standard-build</filename> and then patched by Quilt.
835 (See the
836 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-a-quilt-workflow'>Using a Quilt Flow</ulink>"
837 section in the Yocto Project Development Manual for more information.)
838 Within the <filename>linux-qemux86-standard-build</filename> directory,
839 standard Quilt directories <filename>linux-3.0/patches</filename>
840 and <filename>linux-3.0/.pc</filename> are created,
841 and standard Quilt commands can be used.
842 </para>
843
844 <para>
845 There are other directories generated within <filename>WORKDIR</filename>.
846 The most important directory is <filename>WORKDIR/temp/</filename>,
847 which has log files for each task (<filename>log.do_*.pid</filename>)
848 and contains the scripts BitBake runs for each task
849 (<filename>run.do_*.pid</filename>).
850 The <filename>WORKDIR/image/</filename> directory is where "make
851 install" places its output that is then split into sub-packages
852 within <filename>WORKDIR/packages-split/</filename>.
853 </para>
854 </section>
855
856 <section id='structure-build-work-shared'>
857 <title><filename>build/tmp/work-shared/</filename></title>
858
859 <para>
860 For efficiency, the OpenEmbedded build system creates and uses
861 this directory to hold recipes that share a work directory with
862 other recipes.
863 In practice, this is only used for <filename>gcc</filename>
864 and its variants (e.g. <filename>gcc-cross</filename>,
865 <filename>libgcc</filename>, <filename>gcc-runtime</filename>,
866 and so forth).
867 </para>
868 </section>
869</section>
870
871<section id='structure-meta'>
872 <title>The Metadata - <filename>meta/</filename></title>
873
874 <para>
875 As mentioned previously,
876 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> is the core
877 of the Yocto Project.
878 Metadata has several important subdivisions:
879 </para>
880
881 <section id='structure-meta-classes'>
882 <title><filename>meta/classes/</filename></title>
883
884 <para>
885 This directory contains the <filename>*.bbclass</filename> files.
886 Class files are used to abstract common code so it can be reused by multiple
887 packages.
888 Every package inherits the <filename>base.bbclass</filename> file.
889 Examples of other important classes are <filename>autotools.bbclass</filename>, which
890 in theory allows any Autotool-enabled package to work with the Yocto Project with minimal effort.
891 Another example is <filename>kernel.bbclass</filename> that contains common code and functions
892 for working with the Linux kernel.
893 Functions like image generation or packaging also have their specific class files
894 such as <filename>image.bbclass</filename>, <filename>rootfs_*.bbclass</filename> and
895 <filename>package*.bbclass</filename>.
896 </para>
897
898 <para>
899 For reference information on classes, see the
900 "<link linkend='ref-classes'>Classes</link>" chapter.
901 </para>
902 </section>
903
904 <section id='structure-meta-conf'>
905 <title><filename>meta/conf/</filename></title>
906
907 <para>
908 This directory contains the core set of configuration files that start from
909 <filename>bitbake.conf</filename> and from which all other configuration
910 files are included.
911 See the include statements at the end of the
912 <filename>bitbake.conf</filename> file and you will note that even
913 <filename>local.conf</filename> is loaded from there.
914 While <filename>bitbake.conf</filename> sets up the defaults, you can often override
915 these by using the (<filename>local.conf</filename>) file, machine file or
916 the distribution configuration file.
917 </para>
918 </section>
919
920 <section id='structure-meta-conf-machine'>
921 <title><filename>meta/conf/machine/</filename></title>
922
923 <para>
924 This directory contains all the machine configuration files.
925 If you set <filename>MACHINE = "qemux86"</filename>,
926 the OpenEmbedded build system looks for a <filename>qemux86.conf</filename> file in this
927 directory.
928 The <filename>include</filename> directory contains various data common to multiple machines.
929 If you want to add support for a new machine to the Yocto Project, look in this directory.
930 </para>
931 </section>
932
933 <section id='structure-meta-conf-distro'>
934 <title><filename>meta/conf/distro/</filename></title>
935
936 <para>
937 The contents of this directory controls any distribution-specific
938 configurations.
939 For the Yocto Project, the <filename>defaultsetup.conf</filename> is the main file here.
940 This directory includes the versions and the
941 <filename>SRCDATE</filename> definitions for applications that are configured here.
942 An example of an alternative configuration might be <filename>poky-bleeding.conf</filename>.
943 Although this file mainly inherits its configuration from Poky.
944 </para>
945 </section>
946
947 <section id='structure-meta-conf-machine-sdk'>
948 <title><filename>meta/conf/machine-sdk/</filename></title>
949
950 <para>
951 The OpenEmbedded build system searches this directory for
952 configuration files that correspond to the value of
953 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>.
954 By default, 32-bit and 64-bit x86 files ship with the Yocto
955 Project that support some SDK hosts.
956 However, it is possible to extend that support to other SDK hosts
957 by adding additional configuration files in this subdirectory
958 within another layer.
959 </para>
960 </section>
961
962 <section id='structure-meta-files'>
963 <title><filename>meta/files/</filename></title>
964
965 <para>
966 This directory contains common license files and several text files
967 used by the build system.
968 The text files contain minimal device information and
969 lists of files and directories with known permissions.
970 </para>
971 </section>
972
973 <section id='structure-meta-lib'>
974 <title><filename>meta/lib/</filename></title>
975
976 <para>
977 This directory contains OpenEmbedded Python library code
978 used during the build process.
979 </para>
980 </section>
981
982 <section id='structure-meta-recipes-bsp'>
983 <title><filename>meta/recipes-bsp/</filename></title>
984
985 <para>
986 This directory contains anything linking to specific hardware or hardware
987 configuration information such as "u-boot" and "grub".
988 </para>
989 </section>
990
991 <section id='structure-meta-recipes-connectivity'>
992 <title><filename>meta/recipes-connectivity/</filename></title>
993
994 <para>
995 This directory contains libraries and applications related to communication with other devices.
996 </para>
997 </section>
998
999 <section id='structure-meta-recipes-core'>
1000 <title><filename>meta/recipes-core/</filename></title>
1001
1002 <para>
1003 This directory contains what is needed to build a basic working Linux image
1004 including commonly used dependencies.
1005 </para>
1006 </section>
1007
1008 <section id='structure-meta-recipes-devtools'>
1009 <title><filename>meta/recipes-devtools/</filename></title>
1010
1011 <para>
1012 This directory contains tools that are primarily used by the build system.
1013 The tools, however, can also be used on targets.
1014 </para>
1015 </section>
1016
1017 <section id='structure-meta-recipes-extended'>
1018 <title><filename>meta/recipes-extended/</filename></title>
1019
1020 <para>
1021 This directory contains non-essential applications that add features compared to the
1022 alternatives in core.
1023 You might need this directory for full tool functionality or for Linux Standard Base (LSB)
1024 compliance.
1025 </para>
1026 </section>
1027
1028 <section id='structure-meta-recipes-gnome'>
1029 <title><filename>meta/recipes-gnome/</filename></title>
1030
1031 <para>
1032 This directory contains all things related to the GTK+ application framework.
1033 </para>
1034 </section>
1035
1036 <section id='structure-meta-recipes-graphics'>
1037 <title><filename>meta/recipes-graphics/</filename></title>
1038
1039 <para>
1040 This directory contains X and other graphically related system libraries
1041 </para>
1042 </section>
1043
1044 <section id='structure-meta-recipes-kernel'>
1045 <title><filename>meta/recipes-kernel/</filename></title>
1046
1047 <para>
1048 This directory contains the kernel and generic applications and libraries that
1049 have strong kernel dependencies.
1050 </para>
1051 </section>
1052
1053 <section id='structure-meta-recipes-lsb4'>
1054 <title><filename>meta/recipes-lsb4/</filename></title>
1055
1056 <para>
1057 This directory contains recipes specifically added to support
1058 the Linux Standard Base (LSB) version 4.x.
1059 </para>
1060 </section>
1061
1062 <section id='structure-meta-recipes-multimedia'>
1063 <title><filename>meta/recipes-multimedia/</filename></title>
1064
1065 <para>
1066 This directory contains codecs and support utilities for audio, images and video.
1067 </para>
1068 </section>
1069
1070 <section id='structure-meta-recipes-qt'>
1071 <title><filename>meta/recipes-qt/</filename></title>
1072
1073 <para>
1074 This directory contains all things related to the Qt application framework.
1075 </para>
1076 </section>
1077
1078 <section id='structure-meta-recipes-rt'>
1079 <title><filename>meta/recipes-rt/</filename></title>
1080
1081 <para>
1082 This directory contains package and image recipes for using and testing
1083 the <filename>PREEMPT_RT</filename> kernel.
1084 </para>
1085 </section>
1086
1087 <section id='structure-meta-recipes-sato'>
1088 <title><filename>meta/recipes-sato/</filename></title>
1089
1090 <para>
1091 This directory contains the Sato demo/reference UI/UX and its associated applications
1092 and configuration data.
1093 </para>
1094 </section>
1095
1096 <section id='structure-meta-recipes-support'>
1097 <title><filename>meta/recipes-support/</filename></title>
1098
1099 <para>
1100 This directory contains recipes used by other recipes, but that are
1101 not directly included in images (i.e. dependencies of other
1102 recipes).
1103 </para>
1104 </section>
1105
1106 <section id='structure-meta-site'>
1107 <title><filename>meta/site/</filename></title>
1108
1109 <para>
1110 This directory contains a list of cached results for various architectures.
1111 Because certain "autoconf" test results cannot be determined when cross-compiling due to
1112 the tests not able to run on a live system, the information in this directory is
1113 passed to "autoconf" for the various architectures.
1114 </para>
1115 </section>
1116
1117 <section id='structure-meta-recipes-txt'>
1118 <title><filename>meta/recipes.txt</filename></title>
1119
1120 <para>
1121 This file is a description of the contents of <filename>recipes-*</filename>.
1122 </para>
1123 </section>
1124</section>
1125
1126</chapter>
1127<!--
1128vim: expandtab tw=80 ts=4
1129-->
diff --git a/documentation/ref-manual/ref-style.css b/documentation/ref-manual/ref-style.css
new file mode 100644
index 0000000000..e04b5006b4
--- /dev/null
+++ b/documentation/ref-manual/ref-style.css
@@ -0,0 +1,985 @@
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/* This style defines how the permalink character
317 appears by itself and when hovered over with
318 the mouse. */
319
320[alt='Permalink'] { color: #eee; }
321[alt='Permalink']:hover { color: black; }
322
323
324div.informalfigure,
325div.informalexample,
326div.informaltable,
327div.figure,
328div.table,
329div.example {
330 margin: 1em 0em;
331 padding: 1em;
332 page-break-inside: avoid;
333}
334
335
336div.informalfigure p.title b,
337div.informalexample p.title b,
338div.informaltable p.title b,
339div.figure p.title b,
340div.example p.title b,
341div.table p.title b{
342 padding-top: 0em;
343 margin-top: 0em;
344 font-size: 100%;
345 font-weight: normal;
346}
347
348.mediaobject .caption,
349.mediaobject .caption p {
350 text-align: center;
351 font-size: 80%;
352 padding-top: 0.5em;
353 padding-bottom: 0.5em;
354}
355
356.epigraph {
357 padding-left: 55%;
358 margin-bottom: 1em;
359}
360
361.epigraph p {
362 text-align: left;
363}
364
365.epigraph .quote {
366 font-style: italic;
367}
368.epigraph .attribution {
369 font-style: normal;
370 text-align: right;
371}
372
373span.application {
374 font-style: italic;
375}
376
377.programlisting {
378 font-family: monospace;
379 font-size: 80%;
380 white-space: pre;
381 margin: 1.33em 0em;
382 padding: 1.33em;
383}
384
385.tip,
386.warning,
387.caution,
388.note {
389 margin-top: 1em;
390 margin-bottom: 1em;
391
392}
393
394/* force full width of table within div */
395.tip table,
396.warning table,
397.caution table,
398.note table {
399 border: none;
400 width: 100%;
401}
402
403
404.tip table th,
405.warning table th,
406.caution table th,
407.note table th {
408 padding: 0.8em 0.0em 0.0em 0.0em;
409 margin : 0em 0em 0em 0em;
410}
411
412.tip p,
413.warning p,
414.caution p,
415.note p {
416 margin-top: 0.5em;
417 margin-bottom: 0.5em;
418 padding-right: 1em;
419 text-align: left;
420}
421
422.acronym {
423 text-transform: uppercase;
424}
425
426b.keycap,
427.keycap {
428 padding: 0.09em 0.3em;
429 margin: 0em;
430}
431
432.itemizedlist li {
433 clear: none;
434}
435
436.filename {
437 font-size: medium;
438 font-family: Courier, monospace;
439}
440
441
442div.navheader, div.heading{
443 position: absolute;
444 left: 0em;
445 top: 0em;
446 width: 100%;
447 background-color: #cdf;
448 width: 100%;
449}
450
451div.navfooter, div.footing{
452 position: fixed;
453 left: 0em;
454 bottom: 0em;
455 background-color: #eee;
456 width: 100%;
457}
458
459
460div.navheader td,
461div.navfooter td {
462 font-size: 66%;
463}
464
465div.navheader table th {
466 /*font-family: Georgia, Times, serif;*/
467 /*font-size: x-large;*/
468 font-size: 80%;
469}
470
471div.navheader table {
472 border-left: 0em;
473 border-right: 0em;
474 border-top: 0em;
475 width: 100%;
476}
477
478div.navfooter table {
479 border-left: 0em;
480 border-right: 0em;
481 border-bottom: 0em;
482 width: 100%;
483}
484
485div.navheader table td a,
486div.navfooter table td a {
487 color: #777;
488 text-decoration: none;
489}
490
491/* normal text in the footer */
492div.navfooter table td {
493 color: black;
494}
495
496div.navheader table td a:visited,
497div.navfooter table td a:visited {
498 color: #444;
499}
500
501
502/* links in header and footer */
503div.navheader table td a:hover,
504div.navfooter table td a:hover {
505 text-decoration: underline;
506 background-color: transparent;
507 color: #33a;
508}
509
510div.navheader hr,
511div.navfooter hr {
512 display: none;
513}
514
515
516.qandaset tr.question td p {
517 margin: 0em 0em 1em 0em;
518 padding: 0em 0em 0em 0em;
519}
520
521.qandaset tr.answer td p {
522 margin: 0em 0em 1em 0em;
523 padding: 0em 0em 0em 0em;
524}
525.answer td {
526 padding-bottom: 1.5em;
527}
528
529.emphasis {
530 font-weight: bold;
531}
532
533
534 /************* /
535 / decorations /
536/ *************/
537
538.titlepage {
539}
540
541.part .title {
542}
543
544.subtitle {
545 border: none;
546}
547
548/*
549h1 {
550 border: none;
551}
552
553h2 {
554 border-top: solid 0.2em;
555 border-bottom: solid 0.06em;
556}
557
558h3 {
559 border-top: 0em;
560 border-bottom: solid 0.06em;
561}
562
563h4 {
564 border: 0em;
565 border-bottom: solid 0.06em;
566}
567
568h5 {
569 border: 0em;
570}
571*/
572
573.programlisting {
574 border: solid 1px;
575}
576
577div.figure,
578div.table,
579div.informalfigure,
580div.informaltable,
581div.informalexample,
582div.example {
583 border: 1px solid;
584}
585
586
587
588.tip,
589.warning,
590.caution,
591.note {
592 border: 1px solid;
593}
594
595.tip table th,
596.warning table th,
597.caution table th,
598.note table th {
599 border-bottom: 1px solid;
600}
601
602.question td {
603 border-top: 1px solid black;
604}
605
606.answer {
607}
608
609
610b.keycap,
611.keycap {
612 border: 1px solid;
613}
614
615
616div.navheader, div.heading{
617 border-bottom: 1px solid;
618}
619
620
621div.navfooter, div.footing{
622 border-top: 1px solid;
623}
624
625 /********* /
626 / colors /
627/ *********/
628
629body {
630 color: #333;
631 background: white;
632}
633
634a {
635 background: transparent;
636}
637
638a:hover {
639 background-color: #dedede;
640}
641
642
643h1,
644h2,
645h3,
646h4,
647h5,
648h6,
649h7,
650h8 {
651 background-color: transparent;
652}
653
654hr {
655 border-color: #aaa;
656}
657
658
659.tip, .warning, .caution, .note {
660 border-color: #fff;
661}
662
663
664.tip table th,
665.warning table th,
666.caution table th,
667.note table th {
668 border-bottom-color: #fff;
669}
670
671
672.warning {
673 background-color: #f0f0f2;
674}
675
676.caution {
677 background-color: #f0f0f2;
678}
679
680.tip {
681 background-color: #f0f0f2;
682}
683
684.note {
685 background-color: #f0f0f2;
686}
687
688.glossary dl dt,
689.variablelist dl dt,
690.variablelist dl dt span.term {
691 color: #044;
692}
693
694div.figure,
695div.table,
696div.example,
697div.informalfigure,
698div.informaltable,
699div.informalexample {
700 border-color: #aaa;
701}
702
703pre.programlisting {
704 color: black;
705 background-color: #fff;
706 border-color: #aaa;
707 border-width: 2px;
708}
709
710.guimenu,
711.guilabel,
712.guimenuitem {
713 background-color: #eee;
714}
715
716
717b.keycap,
718.keycap {
719 background-color: #eee;
720 border-color: #999;
721}
722
723
724div.navheader {
725 border-color: black;
726}
727
728
729div.navfooter {
730 border-color: black;
731}
732
733
734 /*********** /
735 / graphics /
736/ ***********/
737
738/*
739body {
740 background-image: url("images/body_bg.jpg");
741 background-attachment: fixed;
742}
743
744.navheader,
745.note,
746.tip {
747 background-image: url("images/note_bg.jpg");
748 background-attachment: fixed;
749}
750
751.warning,
752.caution {
753 background-image: url("images/warning_bg.jpg");
754 background-attachment: fixed;
755}
756
757.figure,
758.informalfigure,
759.example,
760.informalexample,
761.table,
762.informaltable {
763 background-image: url("images/figure_bg.jpg");
764 background-attachment: fixed;
765}
766
767*/
768h1,
769h2,
770h3,
771h4,
772h5,
773h6,
774h7{
775}
776
777/*
778Example of how to stick an image as part of the title.
779
780div.article .titlepage .title
781{
782 background-image: url("figures/white-on-black.png");
783 background-position: center;
784 background-repeat: repeat-x;
785}
786*/
787
788div.preface .titlepage .title,
789div.colophon .title,
790div.chapter .titlepage .title,
791div.article .titlepage .title
792{
793}
794
795div.section div.section .titlepage .title,
796div.sect2 .titlepage .title {
797 background: none;
798}
799
800
801h1.title {
802 background-color: transparent;
803 background-image: url("figures/poky-title.png");
804 background-repeat: no-repeat;
805 height: 256px;
806 text-indent: -9000px;
807 overflow:hidden;
808}
809
810h2.subtitle {
811 background-color: transparent;
812 text-indent: -9000px;
813 overflow:hidden;
814 width: 0px;
815 display: none;
816}
817
818 /*************************************** /
819 / pippin.gimp.org specific alterations /
820/ ***************************************/
821
822/*
823div.heading, div.navheader {
824 color: #777;
825 font-size: 80%;
826 padding: 0;
827 margin: 0;
828 text-align: left;
829 position: absolute;
830 top: 0px;
831 left: 0px;
832 width: 100%;
833 height: 50px;
834 background: url('/gfx/heading_bg.png') transparent;
835 background-repeat: repeat-x;
836 background-attachment: fixed;
837 border: none;
838}
839
840div.heading a {
841 color: #444;
842}
843
844div.footing, div.navfooter {
845 border: none;
846 color: #ddd;
847 font-size: 80%;
848 text-align:right;
849
850 width: 100%;
851 padding-top: 10px;
852 position: absolute;
853 bottom: 0px;
854 left: 0px;
855
856 background: url('/gfx/footing_bg.png') transparent;
857}
858*/
859
860
861
862 /****************** /
863 / nasty ie tweaks /
864/ ******************/
865
866/*
867div.heading, div.navheader {
868 width:expression(document.body.clientWidth + "px");
869}
870
871div.footing, div.navfooter {
872 width:expression(document.body.clientWidth + "px");
873 margin-left:expression("-5em");
874}
875body {
876 padding:expression("4em 5em 0em 5em");
877}
878*/
879
880 /**************************************** /
881 / mozilla vendor specific css extensions /
882/ ****************************************/
883/*
884div.navfooter, div.footing{
885 -moz-opacity: 0.8em;
886}
887
888div.figure,
889div.table,
890div.informalfigure,
891div.informaltable,
892div.informalexample,
893div.example,
894.tip,
895.warning,
896.caution,
897.note {
898 -moz-border-radius: 0.5em;
899}
900
901b.keycap,
902.keycap {
903 -moz-border-radius: 0.3em;
904}
905*/
906
907table tr td table tr td {
908 display: none;
909}
910
911
912hr {
913 display: none;
914}
915
916table {
917 border: 0em;
918}
919
920 .photo {
921 float: right;
922 margin-left: 1.5em;
923 margin-bottom: 1.5em;
924 margin-top: 0em;
925 max-width: 17em;
926 border: 1px solid gray;
927 padding: 3px;
928 background: white;
929}
930 .seperator {
931 padding-top: 2em;
932 clear: both;
933 }
934
935 #validators {
936 margin-top: 5em;
937 text-align: right;
938 color: #777;
939 }
940 @media print {
941 body {
942 font-size: 8pt;
943 }
944 .noprint {
945 display: none;
946 }
947 }
948
949
950.tip,
951.note {
952 background: #f0f0f2;
953 color: #333;
954 padding: 20px;
955 margin: 20px;
956}
957
958.tip h3,
959.note h3 {
960 padding: 0em;
961 margin: 0em;
962 font-size: 2em;
963 font-weight: bold;
964 color: #333;
965}
966
967.tip a,
968.note a {
969 color: #333;
970 text-decoration: underline;
971}
972
973.footnote {
974 font-size: small;
975 color: #333;
976}
977
978/* Changes the announcement text */
979.tip h3,
980.warning h3,
981.caution h3,
982.note h3 {
983 font-size:large;
984 color: #00557D;
985}
diff --git a/documentation/ref-manual/ref-tasks.xml b/documentation/ref-manual/ref-tasks.xml
new file mode 100644
index 0000000000..f325f0e233
--- /dev/null
+++ b/documentation/ref-manual/ref-tasks.xml
@@ -0,0 +1,695 @@
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-tasks'>
6<title>Tasks</title>
7
8<para>
9 Tasks are units of execution for BitBake.
10 Recipes (<filename>.bb</filename> files) use tasks to complete
11 configuring, compiling, and packaging software.
12 This chapter provides a reference of the tasks defined in the
13 OpenEmbedded build system.
14</para>
15
16<section id='normal-recipe-build-tasks'>
17 <title>Normal Recipe Build Tasks</title>
18
19 <para>
20 The following sections describe normal tasks associated with building
21 a recipe.
22 </para>
23
24 <section id='ref-tasks-build'>
25 <title><filename>do_build</filename></title>
26
27 <para>
28 The default task for all recipes.
29 This task depends on all other normal tasks
30 required to build a recipe.
31 </para>
32 </section>
33
34 <section id='ref-tasks-compile'>
35 <title><filename>do_compile</filename></title>
36
37 <para>
38 Compiles the source in the compilation directory, which is pointed
39 to by the
40 <link linkend='var-B'><filename>B</filename></link> variable.
41 </para>
42 </section>
43
44 <section id='ref-tasks-compile_ptest_base'>
45 <title><filename>do_compile_ptest_base</filename></title>
46
47 <para>
48 Compiles the runtime test suite included in the software being
49 built.
50 </para>
51 </section>
52
53 <section id='ref-tasks-configure'>
54 <title><filename>do_configure</filename></title>
55
56 <para>
57 Configures the source by enabling and disabling any build-time and
58 configuration options for the software being built.
59 </para>
60 </section>
61
62 <section id='ref-tasks-configure_ptest_base'>
63 <title><filename>do_configure_ptest_base</filename></title>
64
65 <para>
66 Configures the runtime test suite included in the software being
67 built.
68 </para>
69 </section>
70
71 <section id='ref-tasks-deploy'>
72 <title><filename>do_deploy</filename></title>
73
74 <para>
75 Writes output files that are to be deployed to the deploy
76 directory, which is defined by the
77 <link linkend='var-DEPLOYDIR'><filename>DEPLOYDIR</filename></link>
78 variable.
79 </para>
80
81 <para>
82 The <filename>do_deploy</filename> task is a
83 shared state (sstate) task, which means that the task can
84 be accelerated through sstate use.
85 Realize also that if the task is re-executed, any previous output
86 is removed (i.e. "cleaned").
87 </para>
88 </section>
89
90 <section id='ref-tasks-fetch'>
91 <title><filename>do_fetch</filename></title>
92
93 <para>
94 Fetches the source code.
95 This task uses the
96 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
97 variable and the argument's prefix to determine the correct
98 fetcher module.
99 </para>
100 </section>
101
102 <section id='ref-tasks-install'>
103 <title><filename>do_install</filename></title>
104
105 <para>
106 Copies files from the compilation directory, which is defined by
107 the
108 <link linkend='var-B'><filename>B</filename></link> variable,
109 to a holding area defined by the
110 <link linkend='var-D'><filename>D</filename></link> variable.
111 </para>
112 </section>
113
114 <section id='ref-tasks-install_ptest_base'>
115 <title><filename>do_install_ptest_base</filename></title>
116
117 <para>
118 Copies the runtime test suite files from the compilation directory
119 to a holding area.
120 </para>
121 </section>
122
123 <section id='ref-tasks-package'>
124 <title><filename>do_package</filename></title>
125
126 <para>
127 Analyzes the content of the holding area and splits it into subsets
128 based on available packages and files.
129 </para>
130 </section>
131
132 <section id='ref-tasks-package_qa'>
133 <title><filename>do_package_qa</filename></title>
134
135 <para>
136 Runs QA checks on packaged files.
137 For more information on these checks, see the
138 <link linkend='ref-classes-insane'><filename>insane</filename></link>
139 class.
140 </para>
141 </section>
142
143 <section id='ref-tasks-package_write_deb'>
144 <title><filename>do_package_write_deb</filename></title>
145
146 <para>
147 Creates the actual DEB packages and places them in the
148 <link linkend='package-feeds-dev-environment'>Package Feeds</link>
149 area.
150 </para>
151 </section>
152
153 <section id='ref-tasks-package_write_ipk'>
154 <title><filename>do_package_write_ipk</filename></title>
155
156 <para>
157 Creates the actual IPK packages and places them in the
158 <link linkend='package-feeds-dev-environment'>Package Feeds</link>
159 area.
160 </para>
161 </section>
162
163 <section id='ref-tasks-package_write_rpm'>
164 <title><filename>do_package_write_rpm</filename></title>
165
166 <para>
167 Creates the actual RPM packages and places them in the
168 <link linkend='package-feeds-dev-environment'>Package Feeds</link>
169 area.
170 </para>
171 </section>
172
173 <section id='ref-tasks-package_write_tar'>
174 <title><filename>do_package_write_tar</filename></title>
175
176 <para>
177 Creates tar archives for packages and places them in the
178 <link linkend='package-feeds-dev-environment'>Package Feeds</link>
179 area.
180 </para>
181 </section>
182
183 <section id='ref-tasks-packagedata'>
184 <title><filename>do_packagedata</filename></title>
185
186 <para>
187 Creates package metadata used by the build system to generate the
188 final packages.
189 </para>
190 </section>
191
192 <section id='ref-tasks-patch'>
193 <title><filename>do_patch</filename></title>
194
195 <para>
196 Locates patch files and applies them to the source code.
197 See the
198 "<link linkend='patching-dev-environment'>Patching</link>"
199 section for more information.
200 </para>
201 </section>
202
203 <section id='ref-tasks-populate_lic'>
204 <title><filename>do_populate_lic</filename></title>
205
206 <para>
207 Writes license information for the recipe that is collected later
208 when the image is constructed.
209 </para>
210 </section>
211
212 <section id='ref-tasks-populate_sdk'>
213 <title><filename>do_populate_sdk</filename></title>
214
215 <para>
216 Creates the file and directory structure for an installable SDK.
217 See the
218 "<link linkend='sdk-generation-dev-environment'>SDK Generation</link>"
219 section for more information.
220 </para>
221 </section>
222
223 <section id='ref-tasks-populate_sysroot'>
224 <title><filename>do_populate_sysroot</filename></title>
225
226 <para>
227 Copies a subset of files installed by the
228 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
229 task into the sysroot in order to make them available to other
230 recipes.
231 </para>
232
233 <para>
234 The <filename>do_populate_sysroot</filename> task is a
235 shared state (sstate) task, which means that the task can
236 be accelerated through sstate use.
237 Realize also that if the task is re-executed, any previous output
238 is removed (i.e. "cleaned").
239 </para>
240 </section>
241
242 <section id='ref-tasks-rm_work'>
243 <title><filename>do_rm_work</filename></title>
244
245 <para>
246 Removes work files after the OpenEmbedded build system has
247 finished with them.
248 You can learn more by looking at the
249 "<link linkend='ref-classes-rm-work'><filename>rm_work.bbclass</filename></link>"
250 section.
251 </para>
252 </section>
253
254 <section id='ref-tasks-rm_work_all'>
255 <title><filename>do_rm_work_all</filename></title>
256
257 <para>
258 Top-level task for removing work files after the build system has
259 finished with them.
260 </para>
261 </section>
262
263 <section id='ref-tasks-unpack'>
264 <title><filename>do_unpack</filename></title>
265
266 <para>
267 Unpacks the source code into a working directory pointed to
268 by
269 <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}</filename>.
270 The
271 <link linkend='var-S'><filename>S</filename></link> variable also
272 plays a role in where unpacked source files ultimately reside.
273 For more information on how source files are unpacked, see the
274 "<link linkend='source-fetching-dev-environment'>Source Fetching</link>"
275 section and the <filename>WORKDIR</filename> and
276 <filename>S</filename> variable descriptions.
277 </para>
278 </section>
279</section>
280
281<section id='manually-called-tasks'>
282 <title>Manually Called Tasks</title>
283
284 <para>
285 These tasks are typically manually triggered (e.g. by using the
286 <filename>bitbake -c</filename> command-line option):
287 </para>
288
289 <section id='ref-tasks-checkuri'>
290 <title><filename>do_checkuri</filename></title>
291
292 <para>
293 Validates the
294 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
295 value.
296 </para>
297 </section>
298
299 <section id='ref-tasks-checkuriall'>
300 <title><filename>do_checkuriall</filename></title>
301
302 <para>
303 Validates the
304 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
305 value for all recipes required to build a target.
306 </para>
307 </section>
308
309 <section id='ref-tasks-clean'>
310 <title><filename>do_clean</filename></title>
311
312 <para>
313 Removes all output files for a target from the
314 <link linkend='ref-tasks-unpack'><filename>do_unpack</filename></link>
315 task forward (i.e.
316 <link linkend='ref-tasks-patch'><filename>do_unpack</filename></link>,
317 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>,
318 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>,
319 <link linkend='ref-tasks-install'><filename>do_install</filename></link>,
320 and
321 <link linkend='ref-tasks-package'><filename>do_package</filename></link>).
322 </para>
323
324 <para>
325 You can run this task using BitBake as follows:
326 <literallayout class='monospaced'>
327 $ bitbake -c clean <replaceable>recipe</replaceable>
328 </literallayout>
329 </para>
330
331 <para>
332 Running this task does not remove the
333 <link linkend='shared-state-cache'>sstate</link>) cache
334 files.
335 Consequently, if no changes have been made and the recipe is
336 rebuilt after cleaning, output files are simply restored from the
337 sstate cache.
338 If you want to remove the sstate cache files for the recipe,
339 you need to use the
340 <link linkend='ref-tasks-cleansstate'><filename>do_cleansstate</filename></link>
341 task instead (i.e. <filename>bitbake -c cleansstate</filename> <replaceable>recipe</replaceable>).
342 </para>
343 </section>
344
345 <section id='ref-tasks-cleanall'>
346 <title><filename>do_cleanall</filename></title>
347
348 <para>
349 Removes all output files, shared state
350 (<link linkend='shared-state-cache'>sstate</link>) cache, and
351 downloaded source files for a target (i.e. the contents of
352 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>).
353 Essentially, the <filename>do_cleanall</filename> task is
354 identical to the
355 <link linkend='ref-tasks-cleansstate'><filename>do_cleansstate</filename></link>
356 task with the added removal of downloaded source files.
357 </para>
358
359 <para>
360 You can run this task using BitBake as follows:
361 <literallayout class='monospaced'>
362 $ bitbake -c cleanall <replaceable>recipe</replaceable>
363 </literallayout>
364 </para>
365
366 <para>
367 Typically, you would not normally use the
368 <filename>cleanall</filename> task.
369 Do so only if you want to start fresh with the
370 <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>
371 task.
372 </para>
373 </section>
374
375 <section id='ref-tasks-cleansstate'>
376 <title><filename>do_cleansstate</filename></title>
377
378 <para>
379 Removes all output files and shared state
380 (<link linkend='shared-state-cache'>sstate</link>)
381 cache for a target.
382 Essentially, the <filename>do_cleansstate</filename> task is
383 identical to the
384 <link linkend='ref-tasks-clean'><filename>do_clean</filename></link>
385 task with the added removal of shared state
386 (<link linkend='shared-state-cache'>sstate</link>) cache.
387 </para>
388
389 <para>
390 You can run this task using BitBake as follows:
391 <literallayout class='monospaced'>
392 $ bitbake -c cleansstate <replaceable>recipe</replaceable>
393 </literallayout>
394 </para>
395
396 <para>
397 When you run the <filename>do_cleansstate</filename> task,
398 the OpenEmbedded build system no longer uses any
399 sstate.
400 Consequently, building the recipe from scratch is guaranteed.
401 <note>
402 The <filename>do_cleansstate</filename> task cannot remove
403 sstate from a remote sstate mirror.
404 If you need to build a target from scratch using remote
405 mirrors, use the "-f" option as follows:
406 <literallayout class='monospaced'>
407 $ bitbake -f -c do_cleansstate <replaceable>target</replaceable>
408 </literallayout>
409 </note>
410 </para>
411 </section>
412
413 <section id='ref-tasks-devshell'>
414 <title><filename>do_devshell</filename></title>
415
416 <para>
417 Starts a shell whose environment is set up for
418 development, debugging, or both.
419 See the
420 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>"
421 section in the Yocto Project Development Manual for more
422 information about using <filename>devshell</filename>.
423 </para>
424 </section>
425
426 <section id='ref-tasks-fetchall'>
427 <title><filename>do_fetchall</filename></title>
428
429 <para>
430 Fetches all remote sources required to build a target.
431 </para>
432 </section>
433
434 <section id='ref-tasks-listtasks'>
435 <title><filename>do_listtasks</filename></title>
436
437 <para>
438 Lists all defined tasks for a target.
439 </para>
440 </section>
441
442 <section id='ref-tasks-package_index'>
443 <title><filename>do_package_index</filename></title>
444
445 <para>
446 Creates or updates the index in the
447 <link linkend='package-feeds-dev-environment'>Package Feeds</link>
448 area.
449 <note>
450 This task is not triggered with the
451 <filename>bitbake -c</filename> command-line option as
452 are the other tasks in this section.
453 Because this task is specifically for the
454 <filename>package-index</filename> recipe,
455 you run it using
456 <filename>bitbake package-index</filename>.
457 </note>
458 </para>
459 </section>
460</section>
461
462<section id='image-related-tasks'>
463 <title>Image-Related Tasks</title>
464
465 <para>
466 The following tasks are applicable to image recipes.
467 </para>
468
469 <section id='ref-tasks-bootimg'>
470 <title><filename>do_bootimg</filename></title>
471
472 <para>
473 Creates a bootable live image.
474 See the
475 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
476 variable for additional information on live image types.
477 </para>
478 </section>
479
480 <section id='ref-tasks-bundle_initramfs'>
481 <title><filename>do_bundle_initramfs</filename></title>
482
483 <para>
484 Combines an initial RAM disk (initramfs) image and kernel
485 together to form a single image.
486 The
487 <link linkend='var-CONFIG_INITRAMFS_SOURCE'><filename>CONFIG_INITRAMFS_SOURCE</filename></link>
488 variable has some more information about these types of images.
489 </para>
490 </section>
491
492 <section id='ref-tasks-rootfs'>
493 <title><filename>do_rootfs</filename></title>
494
495 <para>
496 Creates the root filesystem (file and directory structure) for an
497 image.
498 See the
499 "<link linkend='image-generation-dev-environment'>Image Generation</link>"
500 section for more information on how the root filesystem is created.
501 </para>
502 </section>
503
504 <section id='ref-tasks-testimage'>
505 <title><filename>do_testimage</filename></title>
506
507 <para>
508 Boots an image and performs runtime tests within the image.
509 For information on automatically testing images, see the
510 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
511 section in the Yocto Project Development Manual.
512 </para>
513 </section>
514
515 <section id='ref-tasks-testimage_auto'>
516 <title><filename>do_testimage_auto</filename></title>
517
518 <para>
519 Boots an image and performs runtime tests within the image
520 immediately after it has been built.
521 This task is enabled when you set
522 <link linkend='var-TEST_IMAGE'><filename>TEST_IMAGE</filename></link>
523 equal to "1".
524 </para>
525
526 <para>
527 For information on automatically testing images, see the
528 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
529 section in the Yocto Project Development Manual.
530 </para>
531 </section>
532
533 <section id='ref-tasks-vmdkimg'>
534 <title><filename>do_vmdkimg</filename></title>
535
536 <para>
537 Creates a <filename>.vmdk</filename> image for use with
538 <ulink url='http://www.vmware.com/'>VMware</ulink>
539 and compatible virtual machine hosts.
540 </para>
541 </section>
542</section>
543
544<section id='kernel-related-tasks'>
545 <title>Kernel-Related Tasks</title>
546
547 <para>
548 The following tasks are applicable to kernel recipes.
549 Some of these tasks (e.g. the
550 <link linkend='ref-tasks-menuconfig'><filename>do_menuconfig</filename></link>
551 task) are also applicable to recipes that use
552 Linux kernel style configuration such as the BusyBox recipe.
553 </para>
554
555 <section id='ref-tasks-compile_kernelmodules'>
556 <title><filename>do_compile_kernelmodules</filename></title>
557
558 <para>
559 Compiles loadable modules for the Linux kernel.
560 </para>
561 </section>
562
563 <section id='ref-tasks-diffconfig'>
564 <title><filename>do_diffconfig</filename></title>
565
566 <para>
567 Compares the old and new config files after running the
568 <link linkend='ref-tasks-menuconfig'><filename>do_menuconfig</filename></link>
569 task for the kernel.
570 </para>
571 </section>
572
573 <section id='ref-tasks-kernel_checkout'>
574 <title><filename>do_kernel_checkout</filename></title>
575
576 <para>
577 Checks out source/meta branches for a linux-yocto style kernel.
578 </para>
579 </section>
580
581 <section id='ref-tasks-kernel_configcheck'>
582 <title><filename>do_kernel_configcheck</filename></title>
583
584 <para>
585 Validates the kernel configuration for a linux-yocto style kernel.
586 </para>
587 </section>
588
589 <section id='ref-tasks-kernel_configme'>
590 <title><filename>do_kernel_configme</filename></title>
591
592 <para>
593 Assembles the kernel configuration for a linux-yocto style kernel.
594 </para>
595 </section>
596
597 <section id='ref-tasks-kernel_link_vmlinux'>
598 <title><filename>do_kernel_link_vmlinux</filename></title>
599
600 <para>
601 Creates a symbolic link in
602 <filename>arch/$arch/boot</filename> for vmlinux kernel
603 images.
604 </para>
605 </section>
606
607 <section id='ref-tasks-menuconfig'>
608 <title><filename>do_menuconfig</filename></title>
609
610 <para>
611 Runs <filename>make menuconfig</filename> for the kernel.
612 For information on <filename>menuconfig</filename>, see the
613 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-menuconfig'>Using&nbsp;&nbsp;<filename>menuconfig</filename></ulink>"
614 section in the Yocto Project Development Manual.
615 </para>
616 </section>
617
618 <section id='ref-tasks-savedefconfig'>
619 <title><filename>do_savedefconfig</filename></title>
620
621 <para>
622 Creates a minimal Linux kernel configuration file.
623 </para>
624 </section>
625
626 <section id='ref-tasks-sizecheck'>
627 <title><filename>do_sizecheck</filename></title>
628
629 <para>
630 Checks the size of the kernel image against
631 <filename>KERNEL_IMAGE_MAXSIZE</filename> when set.
632 </para>
633 </section>
634
635 <section id='ref-tasks-strip'>
636 <title><filename>do_strip</filename></title>
637
638 <para>
639 Strips unneeded sections out of the Linux kernel image.
640 </para>
641 </section>
642
643 <section id='ref-tasks-uboot_mkimage'>
644 <title><filename>do_uboot_mkimage</filename></title>
645
646 <para>
647 Creates a uImage file from the kernel for the U-Boot bootloader.
648 </para>
649 </section>
650
651 <section id='ref-tasks-validate_branches'>
652 <title><filename>do_validate_branches</filename></title>
653
654 <para>
655 Ensures that the source, metadata (or both) branches are on the
656 locations specified by their
657 <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
658 values for a linux-yocto style kernel.
659 </para>
660 </section>
661</section>
662
663<section id='miscellaneous-tasks'>
664 <title>Miscellaneous Tasks</title>
665
666 <para>
667 The following sections describe miscellaneous tasks.
668 </para>
669
670 <section id='ref-tasks-generate_qt_config_file'>
671 <title><filename>do_generate_qt_config_file</filename></title>
672
673 <para>
674 Writes a <filename>qt.conf</filename> configuration
675 file used for building a Qt-based application.
676 </para>
677 </section>
678
679 <section id='ref-tasks-spdx'>
680 <title><filename>do_spdx</filename></title>
681
682 <para>
683 A build stage that takes the source code and scans it on a remote
684 FOSSOLOGY server in order to produce an SPDX document.
685 This task applies only to the
686 <link linkend='ref-classes-spdx'><filename>spdx</filename></link>
687 class.
688 </para>
689 </section>
690</section>
691
692</chapter>
693<!--
694vim: expandtab tw=80 ts=4
695-->
diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml
new file mode 100644
index 0000000000..576c91f29a
--- /dev/null
+++ b/documentation/ref-manual/ref-variables.xml
@@ -0,0 +1,10284 @@
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-ABIEXTENSION'>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-EFI_PROVIDER'>E</link>
24 <link linkend='var-FEATURE_PACKAGES'>F</link>
25 <link linkend='var-GLIBC_GENERATE_LOCALES'>G</link>
26 <link linkend='var-HOMEPAGE'>H</link>
27 <link linkend='var-ICECC_DISABLED'>I</link>
28<!-- <link linkend='var-glossary-j'>J</link> -->
29 <link linkend='var-KARCH'>K</link>
30 <link linkend='var-LABELS'>L</link>
31 <link linkend='var-MACHINE'>M</link>
32<!-- <link linkend='var-glossary-n'>N</link> -->
33 <link linkend='var-OE_BINCONFIG_EXTRA_MANGLE'>O</link>
34 <link linkend='var-P'>P</link>
35 <link linkend='var-QMAKE_PROFILES'>Q</link>
36 <link linkend='var-RCONFLICTS'>R</link>
37 <link linkend='var-S'>S</link>
38 <link linkend='var-T'>T</link>
39 <link linkend='var-UBOOT_CONFIG'>U</link>
40<!-- <link linkend='var-glossary-v'>V</link> -->
41 <link linkend='var-WARN_QA'>W</link>
42<!-- <link linkend='var-glossary-x'>X</link> -->
43<!-- <link linkend='var-glossary-y'>Y</link> -->
44<!-- <link linkend='var-glossary-z'>Z</link>-->
45 </para>
46
47 <glossdiv id='var-glossary-a'><title>A</title>
48
49 <glossentry id='var-ABIEXTENSION'><glossterm>ABIEXTENSION</glossterm>
50 <glossdef>
51 <para>
52 Extension to the Application Binary Interface (ABI)
53 field of the GNU canonical architecture name
54 (e.g. "eabi").
55 </para>
56
57 <para>
58 ABI extensions are set in the machine include files.
59 For example, the
60 <filename>meta/conf/machine/include/arm/arch-arm.inc</filename>
61 file sets the following extension:
62 <literallayout class='monospaced'>
63 ABIEXTENSION = "eabi"
64 </literallayout>
65 </para>
66 </glossdef>
67 </glossentry>
68
69 <glossentry id='var-ALLOW_EMPTY'><glossterm>ALLOW_EMPTY</glossterm>
70 <glossdef>
71 <para>
72 Specifies if an output package should still be produced if it is empty.
73 By default, BitBake does not produce empty packages.
74 This default behavior can cause issues when there is an
75 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link> or
76 some other hard runtime requirement on the existence of the package.
77 </para>
78
79 <para>
80 Like all package-controlling variables, you must always use them in
81 conjunction with a package name override, as in:
82 <literallayout class='monospaced'>
83 ALLOW_EMPTY_${PN} = "1"
84 ALLOW_EMPTY_${PN}-dev = "1"
85 ALLOW_EMPTY_${PN}-staticdev = "1"
86 </literallayout>
87 </para>
88 </glossdef>
89 </glossentry>
90
91 <glossentry id='var-ALTERNATIVE'><glossterm>ALTERNATIVE</glossterm>
92 <glossdef>
93 <para>
94 Lists commands in a package that need an alternative
95 binary naming scheme.
96 Sometimes the same command is provided in multiple packages.
97 When this occurs, the OpenEmbedded build system needs to
98 use the alternatives system to create a different binary
99 naming scheme so the commands can co-exist.
100 </para>
101
102 <para>
103 To use the variable, list out the package's commands
104 that also exist as part of another package.
105 For example, if the <filename>busybox</filename> package
106 has four commands that also exist as part of another
107 package, you identify them as follows:
108 <literallayout class='monospaced'>
109 ALTERNATIVE_busybox = "sh sed test bracket"
110 </literallayout>
111 For more information on the alternatives system, see the
112 "<link linkend='ref-classes-update-alternatives'><filename>update-alternatives.bbclass</filename></link>"
113 section.
114 </para>
115 </glossdef>
116 </glossentry>
117
118 <glossentry id='var-ALTERNATIVE_LINK_NAME'><glossterm>ALTERNATIVE_LINK_NAME</glossterm>
119 <glossdef>
120 <para>
121 Used by the alternatives system to map duplicated commands
122 to actual locations.
123 For example, if the <filename>bracket</filename> command
124 provided by the <filename>busybox</filename> package is
125 duplicated through another package, you must use the
126 <filename>ALTERNATIVE_LINK_NAME</filename> variable to
127 specify the actual location:
128 <literallayout class='monospaced'>
129 ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/["
130 </literallayout>
131 In this example, the binary for the
132 <filename>bracket</filename> command (i.e.
133 <filename>[</filename>) from the
134 <filename>busybox</filename> package resides in
135 <filename>/usr/bin/</filename>.
136 <note>
137 If <filename>ALTERNATIVE_LINK_NAME</filename> is not
138 defined, it defaults to
139 <filename>${bindir}/<replaceable>name</replaceable></filename>.
140 </note>
141 </para>
142
143 <para>
144 For more information on the alternatives system, see the
145 "<link linkend='ref-classes-update-alternatives'><filename>update-alternatives.bbclass</filename></link>"
146 section.
147 </para>
148 </glossdef>
149 </glossentry>
150
151 <glossentry id='var-ALTERNATIVE_PRIORITY'><glossterm>ALTERNATIVE_PRIORITY</glossterm>
152 <glossdef>
153 <para>
154 Used by the alternatives system to create default
155 priorities for duplicated commands.
156 You can use the variable to create a single default
157 regardless of the command name or package, a default for
158 specific duplicated commands regardless of the package, or
159 a default for specific commands tied to particular packages.
160 Here are the available syntax forms:
161 <literallayout class='monospaced'>
162 ALTERNATIVE_PRIORITY = "<replaceable>priority</replaceable>"
163 ALTERNATIVE_PRIORITY[<replaceable>name</replaceable>] = "<replaceable>priority</replaceable>"
164 ALTERNATIVE_PRIORITY_<replaceable>pkg</replaceable>[<replaceable>name</replaceable>] = "<replaceable>priority</replaceable>"
165 </literallayout>
166 </para>
167
168 <para>
169 For more information on the alternatives system, see the
170 "<link linkend='ref-classes-update-alternatives'><filename>update-alternatives.bbclass</filename></link>"
171 section.
172 </para>
173 </glossdef>
174 </glossentry>
175
176 <glossentry id='var-ALTERNATIVE_TARGET'><glossterm>ALTERNATIVE_TARGET</glossterm>
177 <glossdef>
178 <para>
179 Used by the alternatives system to create default link
180 locations for duplicated commands.
181 You can use the variable to create a single default
182 location for all duplicated commands regardless of the
183 command name or package, a default for
184 specific duplicated commands regardless of the package, or
185 a default for specific commands tied to particular packages.
186 Here are the available syntax forms:
187 <literallayout class='monospaced'>
188 ALTERNATIVE_TARGET = "<replaceable>target</replaceable>"
189 ALTERNATIVE_TARGET[<replaceable>name</replaceable>] = "<replaceable>target</replaceable>"
190 ALTERNATIVE_TARGET_<replaceable>pkg</replaceable>[<replaceable>name</replaceable>] = "<replaceable>target</replaceable>"
191 </literallayout>
192 <note>
193 <para>
194 If <filename>ALTERNATIVE_TARGET</filename> is not
195 defined, it inherits the value from the
196 <link linkend='var-ALTERNATIVE_LINK_NAME'><filename>ALTERNATIVE_LINK_NAME</filename></link>
197 variable.
198 </para>
199
200 <para>
201 If <filename>ALTERNATIVE_LINK_NAME</filename> and
202 <filename>ALTERNATIVE_TARGET</filename> are the
203 same, the target for
204 <filename>ALTERNATIVE_TARGET</filename>
205 has "<filename>.{BPN}</filename>" appended to it.
206 </para>
207
208 <para>
209 Finally, if the file referenced has not been
210 renamed, the alternatives system will rename it to
211 avoid the need to rename alternative files in the
212 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
213 task while
214 retaining support for the command if necessary.
215 </para>
216 </note>
217 </para>
218
219 <para>
220 For more information on the alternatives system, see the
221 "<link linkend='ref-classes-update-alternatives'><filename>update-alternatives.bbclass</filename></link>"
222 section.
223 </para>
224 </glossdef>
225 </glossentry>
226
227 <glossentry id='var-APPEND'><glossterm>APPEND</glossterm>
228 <glossdef>
229 <para>
230 An override list of append strings for each
231 <link linkend='var-LABELS'><filename>LABEL</filename></link>.
232 </para>
233
234 <para>
235 See the
236 <link linkend='ref-classes-grub-efi'><filename>grub-efi</filename></link>
237 class for more information on how this variable is used.
238 </para>
239 </glossdef>
240 </glossentry>
241
242 <glossentry id='var-ASSUME_PROVIDED'><glossterm>ASSUME_PROVIDED</glossterm>
243 <glossdef>
244 <para>
245 Lists recipe names
246 (<link linkend='var-PN'><filename>PN</filename></link>
247 values) BitBake does not attempt to build.
248 Instead, BitBake assumes these recipes have already been
249 built.
250 </para>
251
252 <para>
253 In OpenEmbedded Core, <filename>ASSUME_PROVIDED</filename>
254 mostly specifies native tools that should not be built.
255 An example is <filename>git-native</filename>, which when
256 specified, allows for the Git binary from the host to be
257 used rather than building <filename>git-native</filename>.
258 </para>
259 </glossdef>
260 </glossentry>
261
262 <glossentry id='var-AUTHOR'><glossterm>AUTHOR</glossterm>
263 <glossdef>
264 <para>The email address used to contact the original author
265 or authors in order to send patches and forward bugs.</para>
266 </glossdef>
267 </glossentry>
268
269 <glossentry id='var-AUTO_SYSLINUXMENU'><glossterm>AUTO_SYSLINUXMENU</glossterm>
270 <glossdef>
271 <para>
272 Enables creating an automatic menu.
273 You must set this in your recipe.
274 The
275 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
276 class checks this variable.
277 </para>
278 </glossdef>
279 </glossentry>
280
281 <glossentry id='var-AUTOREV'><glossterm>AUTOREV</glossterm>
282 <glossdef>
283 <para>When <filename><link linkend='var-SRCREV'>SRCREV</link></filename>
284 is set to the value of this variable, it specifies to use the latest
285 source revision in the repository.
286 Here is an example:
287 <literallayout class='monospaced'>
288 SRCREV = "${AUTOREV}"
289 </literallayout>
290 </para>
291 </glossdef>
292 </glossentry>
293
294 <glossentry id='var-AVAILTUNES'><glossterm>AVAILTUNES</glossterm>
295 <glossdef>
296 <para>
297 The list of defined CPU and Application Binary Interface
298 (ABI) tunings (i.e. "tunes") available for use by the
299 OpenEmbedded build system.
300 </para>
301
302 <para>
303 The list simply presents the tunes that are available.
304 Not all tunes may be compatible with a particular
305 machine configuration, or with each other in a
306 <ulink url='&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image'>Multilib</ulink>
307 configuration.
308 </para>
309
310 <para>
311 To add a tune to the list, be sure to append it with
312 spaces using the "+=" BitBake operator.
313 Do not simply replace the list by using the "=" operator.
314 See the
315 "<ulink url='&YOCTO_DOCS_BB_URL;#basic-syntax'>Basic Syntax</ulink>"
316 section in the BitBake User Manual for more information.
317 </para>
318 </glossdef>
319 </glossentry>
320
321
322 </glossdiv>
323
324 <glossdiv id='var-glossary-b'><title>B</title>
325
326 <glossentry id='var-B'><glossterm>B</glossterm>
327 <glossdef>
328 <para>
329 The directory within the
330 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
331 in which the OpenEmbedded build system places generated
332 objects during a recipe's build process.
333 By default, this directory is the same as the <link linkend='var-S'><filename>S</filename></link>
334 directory, which is defined as:
335 <literallayout class='monospaced'>
336 S = "${WORKDIR}/${BP}/"
337 </literallayout>
338 You can separate the (<filename>S</filename>) directory
339 and the directory pointed to by the <filename>B</filename>
340 variable.
341 Most Autotools-based recipes support separating these
342 directories.
343 The build system defaults to using separate directories for
344 <filename>gcc</filename> and some kernel recipes.
345 </para>
346 </glossdef>
347 </glossentry>
348
349 <glossentry id='var-BAD_RECOMMENDATIONS'><glossterm>BAD_RECOMMENDATIONS</glossterm>
350 <glossdef>
351 <para>
352 Lists "recommended-only" packages to not install.
353 Recommended-only packages are packages installed only
354 through the
355 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
356 variable.
357 You can prevent any of these "recommended" packages from
358 being installed by listing them with the
359 <filename>BAD_RECOMMENDATIONS</filename> variable:
360 <literallayout class='monospaced'>
361 BAD_RECOMMENDATIONS = "<replaceable>package_name</replaceable> <replaceable>package_name</replaceable> <replaceable>package_name</replaceable> ..."
362 </literallayout>
363 You can set this variable globally in your
364 <filename>local.conf</filename> file or you can attach it to
365 a specific image recipe by using the recipe name override:
366 <literallayout class='monospaced'>
367 BAD_RECOMMENDATIONS_pn-<replaceable>target_image</replaceable> = "<replaceable>package_name</replaceable>"
368 </literallayout>
369 </para>
370
371 <para>
372 It is important to realize that if you choose to not install
373 packages using this variable and some other packages are
374 dependent on them (i.e. listed in a recipe's
375 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
376 variable), the OpenEmbedded build system ignores your
377 request and will install the packages to avoid dependency
378 errors.
379 </para>
380
381 <para>
382 Support for this variable exists only when using the
383 IPK and RPM packaging backend.
384 Support does not exist for DEB.
385 </para>
386
387 <para>
388 See the
389 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>
390 and the
391 <link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
392 variables for related information.
393 </para>
394 </glossdef>
395 </glossentry>
396
397 <glossentry id='var-BASE_LIB'><glossterm>BASE_LIB</glossterm>
398 <glossdef>
399 <para>
400 The library directory name for the CPU or Application
401 Binary Interface (ABI) tune.
402 The <filename>BASE_LIB</filename> applies only in the
403 Multilib context.
404 See the
405 "<ulink url='&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image'>Combining Multiple Versions of Library Files into One Image</ulink>"
406 section in the Yocto Project Development Manual for
407 information on Multilib.
408 </para>
409
410 <para>
411 The <filename>BASE_LIB</filename> variable is defined in
412 the machine include files in the
413 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
414 If Multilib is not being used, the value defaults to "lib".
415 </para>
416 </glossdef>
417 </glossentry>
418
419 <glossentry id='var-BB_DANGLINGAPPENDS_WARNONLY'><glossterm>BB_DANGLINGAPPENDS_WARNONLY</glossterm>
420 <glossdef>
421 <para>
422 Defines how BitBake handles situations where an append
423 file (<filename>.bbappend</filename>) has no
424 corresponding recipe file (<filename>.bb</filename>).
425 This condition often occurs when layers get out of sync
426 (e.g. <filename>oe-core</filename> bumps a
427 recipe version and the old recipe no longer exists and the
428 other layer has not been updated to the new version
429 of the recipe yet).
430 </para>
431
432 <para>
433 The default fatal behavior is safest because it is
434 the sane reaction given something is out of sync.
435 It is important to realize when your changes are no longer
436 being applied.
437 </para>
438
439 <para>
440 You can change the default behavior by setting this
441 variable to "1", "yes", or "true"
442 in your <filename>local.conf</filename> file, which is
443 located in the
444 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
445 Here is an example:
446 <literallayout class='monospaced'>
447 BB_DANGLINGAPPENDS_WARNONLY = "1"
448 </literallayout>
449 </para>
450 </glossdef>
451 </glossentry>
452
453 <glossentry id='var-BB_DISKMON_DIRS'><glossterm>BB_DISKMON_DIRS</glossterm>
454 <glossdef>
455 <para>
456 Monitors disk space and available inodes during the build
457 and allows you to control the build based on these
458 parameters.
459 </para>
460
461 <para>
462 Disk space monitoring is disabled by default.
463 To enable monitoring, add the <filename>BB_DISKMON_DIRS</filename>
464 variable to your <filename>conf/local.conf</filename> file found in the
465 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
466 Use the following form:
467 <literallayout class='monospaced'>
468 BB_DISKMON_DIRS = "<replaceable>action</replaceable>,<replaceable>dir</replaceable>,<replaceable>threshold</replaceable> [...]"
469
470 where:
471
472 <replaceable>action</replaceable> is:
473 ABORT: Immediately abort the build when
474 a threshold is broken.
475 STOPTASKS: Stop the build after the currently
476 executing tasks have finished when
477 a threshold is broken.
478 WARN: Issue a warning but continue the
479 build when a threshold is broken.
480 Subsequent warnings are issued as
481 defined by the
482 <link linkend='var-BB_DISKMON_WARNINTERVAL'>BB_DISKMON_WARNINTERVAL</link> variable,
483 which must be defined in the
484 conf/local.conf file.
485
486 <replaceable>dir</replaceable> is:
487 Any directory you choose. You can specify one or
488 more directories to monitor by separating the
489 groupings with a space. If two directories are
490 on the same device, only the first directory
491 is monitored.
492
493 <replaceable>threshold</replaceable> is:
494 Either the minimum available disk space,
495 the minimum number of free inodes, or
496 both. You must specify at least one. To
497 omit one or the other, simply omit the value.
498 Specify the threshold using G, M, K for Gbytes,
499 Mbytes, and Kbytes, respectively. If you do
500 not specify G, M, or K, Kbytes is assumed by
501 default. Do not use GB, MB, or KB.
502 </literallayout>
503 </para>
504
505 <para>
506 Here are some examples:
507 <literallayout class='monospaced'>
508 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
509 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
510 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
511 </literallayout>
512 The first example works only if you also provide
513 the <link linkend='var-BB_DISKMON_WARNINTERVAL'><filename>BB_DISKMON_WARNINTERVAL</filename></link> variable
514 in the <filename>conf/local.conf</filename>.
515 This example causes the build system to immediately
516 abort when either the disk space in <filename>${TMPDIR}</filename> drops
517 below 1 Gbyte or the available free inodes drops below
518 100 Kbytes.
519 Because two directories are provided with the variable, the
520 build system also issue a
521 warning when the disk space in the
522 <filename>${SSTATE_DIR}</filename> directory drops
523 below 1 Gbyte or the number of free inodes drops
524 below 100 Kbytes.
525 Subsequent warnings are issued during intervals as
526 defined by the <filename>BB_DISKMON_WARNINTERVAL</filename>
527 variable.
528 </para>
529
530 <para>
531 The second example stops the build after all currently
532 executing tasks complete when the minimum disk space
533 in the <filename>${<link linkend='var-TMPDIR'>TMPDIR</link>}</filename>
534 directory drops below 1 Gbyte.
535 No disk monitoring occurs for the free inodes in this case.
536 </para>
537
538 <para>
539 The final example immediately aborts the build when the
540 number of free inodes in the <filename>${TMPDIR}</filename> directory
541 drops below 100 Kbytes.
542 No disk space monitoring for the directory itself occurs
543 in this case.
544 </para>
545 </glossdef>
546 </glossentry>
547
548 <glossentry id='var-BB_DISKMON_WARNINTERVAL'><glossterm>BB_DISKMON_WARNINTERVAL</glossterm>
549 <glossdef>
550 <para>
551 Defines the disk space and free inode warning intervals.
552 To set these intervals, define the variable in your
553 <filename>conf/local.conf</filename> file in the
554 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
555 </para>
556
557 <para>
558 If you are going to use the
559 <filename>BB_DISKMON_WARNINTERVAL</filename> variable, you must
560 also use the
561 <link linkend='var-BB_DISKMON_DIRS'><filename>BB_DISKMON_DIRS</filename></link> variable
562 and define its action as "WARN".
563 During the build, subsequent warnings are issued each time
564 disk space or number of free inodes further reduces by
565 the respective interval.
566 </para>
567
568 <para>
569 If you do not provide a <filename>BB_DISKMON_WARNINTERVAL</filename>
570 variable and you do use <filename>BB_DISKMON_DIRS</filename> with
571 the "WARN" action, the disk monitoring interval defaults to
572 the following:
573 <literallayout class='monospaced'>
574 BB_DISKMON_WARNINTERVAL = "50M,5K"
575 </literallayout>
576 </para>
577
578 <para>
579 When specifying the variable in your configuration file,
580 use the following form:
581 <literallayout class='monospaced'>
582 BB_DISKMON_WARNINTERVAL = "<replaceable>disk_space_interval</replaceable>,<replaceable>disk_inode_interval</replaceable>"
583
584 where:
585
586 <replaceable>disk_space_interval</replaceable> is:
587 An interval of memory expressed in either
588 G, M, or K for Gbytes, Mbytes, or Kbytes,
589 respectively. You cannot use GB, MB, or KB.
590
591 <replaceable>disk_inode_interval</replaceable> is:
592 An interval of free inodes expressed in either
593 G, M, or K for Gbytes, Mbytes, or Kbytes,
594 respectively. You cannot use GB, MB, or KB.
595 </literallayout>
596 </para>
597
598 <para>
599 Here is an example:
600 <literallayout class='monospaced'>
601 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
602 BB_DISKMON_WARNINTERVAL = "50M,5K"
603 </literallayout>
604 These variables cause the OpenEmbedded build system to
605 issue subsequent warnings each time the available
606 disk space further reduces by 50 Mbytes or the number
607 of free inodes further reduces by 5 Kbytes in the
608 <filename>${SSTATE_DIR}</filename> directory.
609 Subsequent warnings based on the interval occur each time
610 a respective interval is reached beyond the initial warning
611 (i.e. 1 Gbytes and 100 Kbytes).
612 </para>
613 </glossdef>
614 </glossentry>
615
616 <glossentry id='var-BB_GENERATE_MIRROR_TARBALLS'><glossterm>BB_GENERATE_MIRROR_TARBALLS</glossterm>
617 <glossdef>
618 <para>
619 Causes tarballs of the Git repositories, including the
620 Git metadata, to be placed in the
621 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
622 directory.
623 </para>
624
625 <para>
626 For performance reasons, creating and placing tarballs of
627 the Git repositories is not the default action by the
628 OpenEmbedded build system.
629 <literallayout class='monospaced'>
630 BB_GENERATE_MIRROR_TARBALLS = "1"
631 </literallayout>
632 Set this variable in your <filename>local.conf</filename>
633 file in the
634 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
635 </para>
636 </glossdef>
637 </glossentry>
638
639 <glossentry id='var-BB_NUMBER_THREADS'><glossterm>BB_NUMBER_THREADS</glossterm>
640 <glossdef>
641 <para>
642 The maximum number of tasks BitBake should run in parallel
643 at any one time.
644 If your host development system supports multiple cores,
645 a good rule of thumb is to set this variable to twice the
646 number of cores.
647 </para>
648
649 <para>
650 The default value for <filename>BB_NUMBER_THREADS</filename>
651 is equal to the number of cores your build system has.
652 </para>
653 </glossdef>
654 </glossentry>
655
656 <glossentry id='var-BBCLASSEXTEND'><glossterm>BBCLASSEXTEND</glossterm>
657 <glossdef>
658 <para>
659 Allows you to extend a recipe so that it builds variants of the software.
660 Common variants for recipes exist such as "natives" like <filename>quilt-native</filename>,
661 which is a copy of Quilt built to run on the build system;
662 "crosses" such as <filename>gcc-cross</filename>,
663 which is a compiler built to run on the build machine but produces binaries
664 that run on the target <link linkend='var-MACHINE'><filename>MACHINE</filename></link>;
665 "nativesdk", which targets the SDK machine instead of <filename>MACHINE</filename>;
666 and "mulitlibs" in the form "<filename>multilib:</filename><replaceable>multilib_name</replaceable>".
667 </para>
668
669 <para>
670 To build a different variant of the recipe with a minimal amount of code, it usually
671 is as simple as adding the following to your recipe:
672 <literallayout class='monospaced'>
673 BBCLASSEXTEND =+ "native nativesdk"
674 BBCLASSEXTEND =+ "multilib:<replaceable>multilib_name</replaceable>"
675 </literallayout>
676 </para>
677 </glossdef>
678 </glossentry>
679
680 <glossentry id='var-BBFILE_COLLECTIONS'><glossterm>BBFILE_COLLECTIONS</glossterm>
681 <glossdef>
682 <para>Lists the names of configured layers.
683 These names are used to find the other <filename>BBFILE_*</filename>
684 variables.
685 Typically, each layer will append its name to this variable in its
686 <filename>conf/layer.conf</filename> file.
687 </para>
688 </glossdef>
689 </glossentry>
690
691 <glossentry id='var-BBFILE_PATTERN'><glossterm>BBFILE_PATTERN</glossterm>
692 <glossdef>
693 <para>Variable that expands to match files from
694 <link linkend='var-BBFILES'><filename>BBFILES</filename></link>
695 in a particular layer.
696 This variable is used in the <filename>conf/layer.conf</filename> file and must
697 be suffixed with the name of the specific layer (e.g.
698 <filename>BBFILE_PATTERN_emenlow</filename>).</para>
699 </glossdef>
700 </glossentry>
701
702 <glossentry id='var-BBFILE_PRIORITY'><glossterm>BBFILE_PRIORITY</glossterm>
703 <glossdef>
704 <para>Assigns the priority for recipe files in each layer.</para>
705 <para>This variable is useful in situations where the same recipe appears in
706 more than one layer.
707 Setting this variable allows you to prioritize a
708 layer against other layers that contain the same recipe - effectively
709 letting you control the precedence for the multiple layers.
710 The precedence established through this variable stands regardless of a
711 recipe's version
712 (<link linkend='var-PV'><filename>PV</filename></link> variable).
713 For example, a layer that has a recipe with a higher <filename>PV</filename> value but for
714 which the <filename>BBFILE_PRIORITY</filename> is set to have a lower precedence still has a
715 lower precedence.</para>
716 <para>A larger value for the <filename>BBFILE_PRIORITY</filename> variable results in a higher
717 precedence.
718 For example, the value 6 has a higher precedence than the value 5.
719 If not specified, the <filename>BBFILE_PRIORITY</filename> variable is set based on layer
720 dependencies (see the
721 <filename><link linkend='var-LAYERDEPENDS'>LAYERDEPENDS</link></filename> variable for
722 more information.
723 The default priority, if unspecified
724 for a layer with no dependencies, is the lowest defined priority + 1
725 (or 1 if no priorities are defined).</para>
726 <tip>
727 You can use the command <filename>bitbake-layers show-layers</filename> to list
728 all configured layers along with their priorities.
729 </tip>
730 </glossdef>
731 </glossentry>
732
733 <glossentry id='var-BBFILES'><glossterm>BBFILES</glossterm>
734 <glossdef>
735 <para>List of recipe files used by BitBake to build software.</para>
736 </glossdef>
737 </glossentry>
738
739 <glossentry id='var-BBINCLUDELOGS'><glossterm>BBINCLUDELOGS</glossterm>
740 <glossdef>
741 <para>Variable that controls how BitBake displays logs on build failure.</para>
742 </glossdef>
743 </glossentry>
744
745 <glossentry id='var-BBLAYERS'><glossterm>BBLAYERS</glossterm>
746 <glossdef>
747 <para>Lists the layers to enable during the build.
748 This variable is defined in the <filename>bblayers.conf</filename> configuration
749 file in the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
750 Here is an example:
751 <literallayout class='monospaced'>
752 BBLAYERS = " \
753 /home/scottrif/poky/meta \
754 /home/scottrif/poky/meta-yocto \
755 /home/scottrif/poky/meta-yocto-bsp \
756 /home/scottrif/poky/meta-mykernel \
757 "
758
759 BBLAYERS_NON_REMOVABLE ?= " \
760 /home/scottrif/poky/meta \
761 /home/scottrif/poky/meta-yocto \
762 "
763 </literallayout>
764 This example enables four layers, one of which is a custom, user-defined layer
765 named <filename>meta-mykernel</filename>.
766 </para>
767 </glossdef>
768 </glossentry>
769
770 <glossentry id='var-BBLAYERS_NON_REMOVABLE'><glossterm>BBLAYERS_NON_REMOVABLE</glossterm>
771 <glossdef>
772 <para>Lists core layers that cannot be removed from the
773 <filename>bblayers.conf</filename> file during a build
774 using the
775 <ulink url='https://www.yoctoproject.org/tools-resources/projects/hob'>Hob</ulink>.
776 <note>
777 When building an image outside of Hob, this variable
778 is ignored.
779 </note>
780 In order for BitBake to build your image using Hob, your
781 <filename>bblayers.conf</filename> file must include the
782 <filename>meta</filename> and <filename>meta-yocto</filename>
783 core layers.
784 Here is an example that shows these two layers listed in
785 the <filename>BBLAYERS_NON_REMOVABLE</filename> statement:
786 <literallayout class='monospaced'>
787 BBLAYERS = " \
788 /home/scottrif/poky/meta \
789 /home/scottrif/poky/meta-yocto \
790 /home/scottrif/poky/meta-yocto-bsp \
791 /home/scottrif/poky/meta-mykernel \
792 "
793
794 BBLAYERS_NON_REMOVABLE ?= " \
795 /home/scottrif/poky/meta \
796 /home/scottrif/poky/meta-yocto \
797 "
798 </literallayout>
799 </para>
800 </glossdef>
801 </glossentry>
802
803 <glossentry id='var-BBMASK'><glossterm>BBMASK</glossterm>
804 <glossdef>
805 <para>
806 Prevents BitBake from processing recipes and recipe
807 append files.
808 Use the <filename>BBMASK</filename> variable from within the
809 <filename>conf/local.conf</filename> file found
810 in the
811 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
812 </para>
813
814 <para>
815 You can use the <filename>BBMASK</filename> variable
816 to "hide" these <filename>.bb</filename> and
817 <filename>.bbappend</filename> files.
818 BitBake ignores any recipe or recipe append files that
819 match the expression.
820 It is as if BitBake does not see them at all.
821 Consequently, matching files are not parsed or otherwise
822 used by BitBake.</para>
823 <para>
824 The value you provide is passed to Python's regular
825 expression compiler.
826 The expression is compared against the full paths to
827 the files.
828 For complete syntax information, see Python's
829 documentation at
830 <ulink url='http://docs.python.org/release/2.3/lib/re-syntax.html'></ulink>.
831 </para>
832
833 <para>
834 The following example uses a complete regular expression
835 to tell BitBake to ignore all recipe and recipe append
836 files in the <filename>meta-ti/recipes-misc/</filename>
837 directory:
838 <literallayout class='monospaced'>
839 BBMASK = "meta-ti/recipes-misc/"
840 </literallayout>
841 If you want to mask out multiple directories or recipes,
842 use the vertical bar to separate the regular expression
843 fragments.
844 This next example masks out multiple directories and
845 individual recipes:
846 <literallayout class='monospaced'>
847 BBMASK = "meta-ti/recipes-misc/|meta-ti/recipes-ti/packagegroup/"
848 BBMASK .= "|.*meta-oe/recipes-support/"
849 BBMASK .= "|.*openldap"
850 BBMASK .= "|.*opencv"
851 BBMASK .= "|.*lzma"
852 </literallayout>
853 Notice how the vertical bar is used to append the fragments.
854 <note>
855 When specifying a directory name, use the trailing
856 slash character to ensure you match just that directory
857 name.
858 </note>
859 </para>
860 </glossdef>
861 </glossentry>
862
863 <glossentry id='var-BBPATH'><glossterm>BBPATH</glossterm>
864 <glossdef>
865 <para>
866 Used by BitBake to locate
867 <filename>.bbclass</filename> and configuration files.
868 This variable is analogous to the
869 <filename>PATH</filename> variable.
870 <note>
871 If you run BitBake from a directory outside of the
872 <ulink url='&YOCTO_DOCS_DEV_URL;build-directory'>Build Directory</ulink>,
873 you must be sure to set
874 <filename>BBPATH</filename> to point to the
875 Build Directory.
876 Set the variable as you would any environment variable
877 and then run BitBake:
878 <literallayout class='monospaced'>
879 $ BBPATH = "<replaceable>build_directory</replaceable>"
880 $ export BBPATH
881 $ bitbake <replaceable>target</replaceable>
882 </literallayout>
883 </note>
884 </para>
885 </glossdef>
886 </glossentry>
887
888 <glossentry id='var-BBSERVER'><glossterm>BBSERVER</glossterm>
889 <glossdef>
890 <para>
891 Points to the server that runs memory-resident BitBake.
892 This variable is set by the
893 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
894 setup script and should not be hand-edited.
895 The variable is only used when you employ memory-resident
896 BitBake.
897 The setup script exports the value as follows:
898 <literallayout class='monospaced'>
899 export BBSERVER=localhost:$port
900 </literallayout>
901 For more information on how the
902 <filename>BBSERVER</filename> is used, see the
903 <filename>oe-init-build-env-memres</filename> script, which
904 is located in the
905 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
906 </para>
907 </glossdef>
908 </glossentry>
909
910 <glossentry id='var-BINCONFIG'><glossterm>BINCONFIG</glossterm>
911 <glossdef>
912 <para>
913 When inheriting the
914 <link linkend='ref-classes-binconfig-disabled'><filename>binconfig-disabled</filename></link>
915 class, this variable specifies binary configuration
916 scripts to disable in favor of using
917 <filename>pkg-config</filename> to query the information.
918 The <filename>binconfig-disabled</filename> class will
919 modify the specified scripts to return an error so that
920 calls to them can be easily found and replaced.
921 </para>
922
923 <para>
924 To add multiple scripts, separate them by spaces.
925 Here is an example from the <filename>libpng</filename>
926 recipe:
927 <literallayout class='monospaced'>
928 BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
929 </literallayout>
930 </para>
931 </glossdef>
932 </glossentry>
933
934 <glossentry id='var-BINCONFIG_GLOB'><glossterm>BINCONFIG_GLOB</glossterm>
935 <glossdef>
936 <para>
937 When inheriting the
938 <link linkend='ref-classes-binconfig'><filename>binconfig</filename></link>
939 class, this variable specifies a wildcard for
940 configuration scripts that need editing.
941 The scripts are edited to correct any paths that have been
942 set up during compilation so that they are correct for
943 use when installed into the sysroot and called by the
944 build processes of other recipes.
945 </para>
946
947 <para>
948 For more information on how this variable works, see
949 <filename>meta/classes/binconfig.bbclass</filename> in the
950 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
951 You can also find general information on the class in the
952 "<link linkend='ref-classes-binconfig'><filename>binconfig.bbclass</filename></link>"
953 section.
954 </para>
955 </glossdef>
956 </glossentry>
957
958 <glossentry id='var-BP'><glossterm>BP</glossterm>
959 <glossdef>
960 <para>The base recipe name and version but without any special
961 recipe name suffix (i.e. <filename>-native</filename>, <filename>lib64-</filename>,
962 and so forth).
963 <filename>BP</filename> is comprised of the following:
964 <literallayout class="monospaced">
965 ${BPN}-${PV}
966 </literallayout></para>
967 </glossdef>
968 </glossentry>
969
970 <glossentry id='var-BPN'><glossterm>BPN</glossterm>
971 <glossdef>
972 <para>The bare name of the recipe.
973 This variable is a version of the <link linkend='var-PN'><filename>PN</filename></link> variable
974 but removes common suffixes such as "-native" and "-cross" as well
975 as removes common prefixes such as multilib's "lib64-" and "lib32-".
976 The exact list of suffixes removed is specified by the
977 <link linkend='var-SPECIAL_PKGSUFFIX'><filename>SPECIAL_PKGSUFFIX</filename></link> variable.
978 The exact list of prefixes removed is specified by the
979 <link linkend='var-MLPREFIX'><filename>MLPREFIX</filename></link> variable.
980 Prefixes are removed for <filename>multilib</filename>
981 and <filename>nativesdk</filename> cases.</para>
982 </glossdef>
983 </glossentry>
984
985 <glossentry id='var-BUGTRACKER'><glossterm>BUGTRACKER</glossterm>
986 <glossdef>
987 <para>
988 Specifies a URL for an upstream bug tracking website for
989 a recipe.
990 The OpenEmbedded build system does not use this variable.
991 Rather, the variable is a useful pointer in case a bug
992 in the software being built needs to be manually reported.
993 </para>
994 </glossdef>
995 </glossentry>
996
997 <glossentry id='var-BUILD_CFLAGS'><glossterm>BUILD_CFLAGS</glossterm>
998 <glossdef>
999 <para>
1000 Specifies the flags to pass to the C compiler when building
1001 for the build host.
1002 When building in the <filename>-native</filename> context,
1003 <link linkend='var-CFLAGS'><filename>CFLAGS</filename></link>
1004 is set to the value of this variable by default.
1005 </para>
1006 </glossdef>
1007 </glossentry>
1008
1009 <glossentry id='var-BUILD_CPPFLAGS'><glossterm>BUILD_CPPFLAGS</glossterm>
1010 <glossdef>
1011 <para>
1012 Specifies the flags to pass to the C pre-processor
1013 (i.e. to both the C and the C++ compilers) when building
1014 for the build host.
1015 When building in the <filename>native</filename> context,
1016 <link linkend='var-CPPFLAGS'><filename>CPPFLAGS</filename></link>
1017 is set to the value of this variable by default.
1018 </para>
1019 </glossdef>
1020 </glossentry>
1021
1022 <glossentry id='var-BUILD_CXXFLAGS'><glossterm>BUILD_CXXFLAGS</glossterm>
1023 <glossdef>
1024 <para>
1025 Specifies the flags to pass to the C++ compiler when
1026 building for the build host.
1027 When building in the <filename>native</filename> context,
1028 <link linkend='var-CXXFLAGS'><filename>CXXFLAGS</filename></link>
1029 is set to the value of this variable by default.
1030 </para>
1031 </glossdef>
1032 </glossentry>
1033
1034 <glossentry id='var-BUILD_LDFLAGS'><glossterm>BUILD_LDFLAGS</glossterm>
1035 <glossdef>
1036 <para>
1037 Specifies the flags to pass to the linker when building
1038 for the build host.
1039 When building in the <filename>-native</filename> context,
1040 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
1041 is set to the value of this variable by default.
1042 </para>
1043 </glossdef>
1044 </glossentry>
1045
1046 <glossentry id='var-BUILD_OPTIMIZATION'><glossterm>BUILD_OPTIMIZATION</glossterm>
1047 <glossdef>
1048 <para>
1049 Specifies the optimization flags passed to the C compiler
1050 when building for the build host or the SDK.
1051 The flags are passed through the
1052 <link linkend='var-BUILD_CFLAGS'><filename>BUILD_CFLAGS</filename></link>
1053 and
1054 <link linkend='var-BUILDSDK_CFLAGS'><filename>BUILDSDK_CFLAGS</filename></link>
1055 default values.
1056 </para>
1057
1058 <para>
1059 The default value of the
1060 <filename>BUILD_OPTIMIZATION</filename> variable is
1061 "-O2 -pipe".
1062 </para>
1063 </glossdef>
1064 </glossentry>
1065
1066 <glossentry id='var-BUILDDIR'><glossterm>BUILDDIR</glossterm>
1067 <glossdef>
1068 <para>
1069 Points to the location of the
1070 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
1071 You can define this directory indirectly through the
1072 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
1073 and
1074 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
1075 scripts by passing in a Build Directory path when you run
1076 the scripts.
1077 If you run the scripts and do not provide a Build Directory
1078 path, the <filename>BUILDDIR</filename> defaults to
1079 <filename>build</filename> in the current directory.
1080 </para>
1081 </glossdef>
1082 </glossentry>
1083
1084 <glossentry id='var-BUILDHISTORY_COMMIT'><glossterm>BUILDHISTORY_COMMIT</glossterm>
1085 <glossdef>
1086 <para>
1087 When inheriting the
1088 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
1089 class, this variable specifies whether or not to commit the
1090 build history output in a local Git repository.
1091 If set to "1", this local repository will be maintained
1092 automatically by the
1093 <filename>buildhistory</filename>
1094 class and a commit will be created on every
1095 build for changes to each top-level subdirectory of the
1096 build history output (images, packages, and sdk).
1097 If you want to track changes to build history over
1098 time, you should set this value to "1".
1099 </para>
1100
1101 <para>
1102 By default, the <filename>buildhistory</filename> class
1103 does not commit the build history output in a local
1104 Git repository:
1105 <literallayout class='monospaced'>
1106 BUILDHISTORY_COMMIT ?= "0"
1107 </literallayout>
1108 </para>
1109 </glossdef>
1110 </glossentry>
1111
1112 <glossentry id='var-BUILDHISTORY_COMMIT_AUTHOR'><glossterm>BUILDHISTORY_COMMIT_AUTHOR</glossterm>
1113 <glossdef>
1114 <para>
1115 When inheriting the
1116 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
1117 class, this variable specifies the author to use for each
1118 Git commit.
1119 In order for the <filename>BUILDHISTORY_COMMIT_AUTHOR</filename>
1120 variable to work, the
1121 <link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></link>
1122 variable must be set to "1".
1123 </para>
1124
1125 <para>
1126 Git requires that the value you provide for the
1127 <filename>BUILDHISTORY_COMMIT_AUTHOR</filename> variable
1128 takes the form of "name &lt;email@host&gt;".
1129 Providing an email address or host that is not valid does
1130 not produce an error.
1131 </para>
1132
1133 <para>
1134 By default, the <filename>buildhistory</filename> class
1135 sets the variable as follows:
1136 <literallayout class='monospaced'>
1137 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory &lt;buildhistory@${DISTRO}&gt;"
1138 </literallayout>
1139 </para>
1140 </glossdef>
1141 </glossentry>
1142
1143 <glossentry id='var-BUILDHISTORY_DIR'><glossterm>BUILDHISTORY_DIR</glossterm>
1144 <glossdef>
1145 <para>
1146 When inheriting the
1147 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
1148 class, this variable specifies the directory in which
1149 build history information is kept.
1150 For more information on how the variable works, see the
1151 <filename>buildhistory.class</filename>.
1152 </para>
1153
1154 <para>
1155 By default, the <filename>buildhistory</filename> class
1156 sets the directory as follows:
1157 <literallayout class='monospaced'>
1158 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
1159 </literallayout>
1160 </para>
1161 </glossdef>
1162 </glossentry>
1163
1164 <glossentry id='var-BUILDHISTORY_FEATURES'><glossterm>BUILDHISTORY_FEATURES</glossterm>
1165 <glossdef>
1166 <para>
1167 When inheriting the
1168 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
1169 class, this variable specifies the build history features
1170 to be enabled.
1171 For more information on how build history works, see the
1172 "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
1173 section.
1174 </para>
1175
1176 <para>
1177 You can specify three features in the form of a
1178 space-separated list:
1179 <itemizedlist>
1180 <listitem><para><emphasis>image:</emphasis>
1181 Analysis of the contents of images, which
1182 includes the list of installed packages among other
1183 things.
1184 </para></listitem>
1185 <listitem><para><emphasis>package:</emphasis>
1186 Analysis of the contents of individual packages.
1187 </para></listitem>
1188 <listitem><para><emphasis>sdk:</emphasis>
1189 Analysis of the contents of the software
1190 development kit (SDK).
1191 </para></listitem>
1192 </itemizedlist>
1193 </para>
1194
1195 <para>
1196 By default, the <filename>buildhistory</filename> class
1197 enables all three features:
1198 <literallayout class='monospaced'>
1199 BUILDHISTORY_FEATURES ?= "image package sdk"
1200 </literallayout>
1201 </para>
1202 </glossdef>
1203 </glossentry>
1204
1205 <glossentry id='var-BUILDHISTORY_IMAGE_FILES'><glossterm>BUILDHISTORY_IMAGE_FILES</glossterm>
1206 <glossdef>
1207 <para>
1208 When inheriting the
1209 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
1210 class, this variable specifies a list of paths to files
1211 copied from the
1212 image contents into the build history directory under
1213 an "image-files" directory in the directory for
1214 the image, so that you can track the contents of each file.
1215 The default is to copy <filename>/etc/passwd</filename>
1216 and <filename>/etc/group</filename>, which allows you to
1217 monitor for changes in user and group entries.
1218 You can modify the list to include any file.
1219 Specifying an invalid path does not produce an error.
1220 Consequently, you can include files that might
1221 not always be present.
1222 </para>
1223
1224 <para>
1225 By default, the <filename>buildhistory</filename> class
1226 provides paths to the following files:
1227 <literallayout class='monospaced'>
1228 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
1229 </literallayout>
1230 </para>
1231 </glossdef>
1232 </glossentry>
1233
1234 <glossentry id='var-BUILDHISTORY_PUSH_REPO'><glossterm>BUILDHISTORY_PUSH_REPO</glossterm>
1235 <glossdef>
1236 <para>
1237 When inheriting the
1238 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
1239 class, this variable optionally specifies a remote
1240 repository to which build history pushes Git changes.
1241 In order for <filename>BUILDHISTORY_PUSH_REPO</filename>
1242 to work,
1243 <link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></link>
1244 must be set to "1".
1245 </para>
1246
1247 <para>
1248 The repository should correspond to a remote
1249 address that specifies a repository as understood by
1250 Git, or alternatively to a remote name that you have
1251 set up manually using <filename>git remote</filename>
1252 within the local repository.
1253 </para>
1254
1255 <para>
1256 By default, the <filename>buildhistory</filename> class
1257 sets the variable as follows:
1258 <literallayout class='monospaced'>
1259 BUILDHISTORY_PUSH_REPO ?= ""
1260 </literallayout>
1261 </para>
1262 </glossdef>
1263 </glossentry>
1264
1265 <glossentry id='var-BUILDSDK_CFLAGS'><glossterm>BUILDSDK_CFLAGS</glossterm>
1266 <glossdef>
1267 <para>
1268 Specifies the flags to pass to the C compiler when building
1269 for the SDK.
1270 When building in the <filename>nativesdk</filename>
1271 context,
1272 <link linkend='var-CFLAGS'><filename>CFLAGS</filename></link>
1273 is set to the value of this variable by default.
1274 </para>
1275 </glossdef>
1276 </glossentry>
1277
1278 <glossentry id='var-BUILDSDK_CPPFLAGS'><glossterm>BUILDSDK_CPPFLAGS</glossterm>
1279 <glossdef>
1280 <para>
1281 Specifies the flags to pass to the C pre-processor
1282 (i.e. to both the C and the C++ compilers) when building
1283 for the SDK.
1284 When building in the <filename>nativesdk</filename>
1285 context,
1286 <link linkend='var-CPPFLAGS'><filename>CPPFLAGS</filename></link>
1287 is set to the value of this variable by default.
1288 </para>
1289 </glossdef>
1290 </glossentry>
1291
1292 <glossentry id='var-BUILDSDK_CXXFLAGS'><glossterm>BUILDSDK_CXXFLAGS</glossterm>
1293 <glossdef>
1294 <para>
1295 Specifies the flags to pass to the C++ compiler when
1296 building for the SDK.
1297 When building in the <filename>nativesdk</filename>
1298 context,
1299 <link linkend='var-CXXFLAGS'><filename>CXXFLAGS</filename></link>
1300 is set to the value of this variable by default.
1301 </para>
1302 </glossdef>
1303 </glossentry>
1304
1305 <glossentry id='var-BUILDSDK_LDFLAGS'><glossterm>BUILDSDK_LDFLAGS</glossterm>
1306 <glossdef>
1307 <para>
1308 Specifies the flags to pass to the linker when building
1309 for the SDK.
1310 When building in the <filename>nativesdk-</filename>
1311 context,
1312 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
1313 is set to the value of this variable by default.
1314 </para>
1315 </glossdef>
1316 </glossentry>
1317
1318 <glossentry id='var-BUILDSTATS_BASE'><glossterm>BUILDSTATS_BASE</glossterm>
1319 <glossdef>
1320 <para>
1321 Points to the location of the directory that holds build
1322 statistics when you use and enable the
1323 <link linkend='ref-classes-buildstats'><filename>buildstats</filename></link>
1324 class.
1325 The <filename>BUILDSTATS_BASE</filename> directory defaults
1326 to
1327 <filename>${</filename><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link><filename>}/buildstats/</filename>.
1328 </para>
1329 </glossdef>
1330 </glossentry>
1331
1332 <glossentry id='var-BUSYBOX_SPLIT_SUID'><glossterm>BUSYBOX_SPLIT_SUID</glossterm>
1333 <glossdef>
1334 <para>
1335 For the BusyBox recipe, specifies whether to split the
1336 output executable file into two parts: one for features
1337 that require <filename>setuid root</filename>, and one for
1338 the remaining features (i.e. those that do not require
1339 <filename>setuid root</filename>).
1340 </para>
1341
1342 <para>
1343 The <filename>BUSYBOX_SPLIT_SUID</filename> variable
1344 defaults to "1", which results in a single output
1345 executable file.
1346 Set the variable to "0" to split the output file.
1347 </para>
1348 </glossdef>
1349 </glossentry>
1350
1351 </glossdiv>
1352
1353 <glossdiv id='var-glossary-c'><title>C</title>
1354
1355 <glossentry id='var-CFLAGS'><glossterm>CFLAGS</glossterm>
1356 <glossdef>
1357 <para>
1358 Specifies the flags to pass to the C compiler.
1359 This variable is exported to an environment
1360 variable and thus made visible to the software being
1361 built during the compilation step.
1362 </para>
1363
1364 <para>
1365 Default initialization for <filename>CFLAGS</filename>
1366 varies depending on what is being built:
1367 <itemizedlist>
1368 <listitem><para>
1369 <link linkend='var-TARGET_CFLAGS'><filename>TARGET_CFLAGS</filename></link>
1370 when building for the target
1371 </para></listitem>
1372 <listitem><para>
1373 <link linkend='var-BUILD_CFLAGS'><filename>BUILD_CFLAGS</filename></link>
1374 when building for the build host (i.e.
1375 <filename>-native</filename>)
1376 </para></listitem>
1377 <listitem><para>
1378 <link linkend='var-BUILDSDK_CFLAGS'><filename>BUILDSDK_CFLAGS</filename></link>
1379 when building for an SDK (i.e.
1380 <filename>nativesdk-</filename>)
1381 </para></listitem>
1382 </itemizedlist>
1383 </para>
1384 </glossdef>
1385 </glossentry>
1386
1387 <glossentry id='var-CLASSOVERRIDE'><glossterm>CLASSOVERRIDE</glossterm>
1388 <glossdef>
1389 <para>
1390 An internal variable specifying the special class override
1391 that should currently apply (e.g. "class-target",
1392 "class-native", and so forth).
1393 The classes that use this variable set it to
1394 appropriate values.
1395 </para>
1396
1397 <para>
1398 You do not normally directly interact with this variable.
1399 The value for the <filename>CLASSOVERRIDE</filename>
1400 variable goes into
1401 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
1402 and then can be used as an override.
1403 Here is an example where "python-native" is added to
1404 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
1405 only when building for the native case:
1406 <literallayout class='monospaced'>
1407 DEPENDS_append_class-native = " python-native"
1408 </literallayout>
1409 </para>
1410 </glossdef>
1411 </glossentry>
1412
1413 <glossentry id='var-COMBINED_FEATURES'><glossterm>COMBINED_FEATURES</glossterm>
1414 <glossdef>
1415 <para>
1416 Provides a list of hardware features that are enabled in
1417 both
1418 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
1419 and
1420 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
1421 This select list of features contains features that make
1422 sense to be controlled both at the machine and distribution
1423 configuration level.
1424 For example, the "bluetooth" feature requires hardware
1425 support but should also be optional at the distribution
1426 level, in case the hardware supports Bluetooth but you
1427 do not ever intend to use it.
1428 </para>
1429
1430 <para>
1431 For more information, see the
1432 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
1433 and <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
1434 variables.
1435 </para>
1436 </glossdef>
1437 </glossentry>
1438
1439 <glossentry id='var-COMMON_LICENSE_DIR'><glossterm>COMMON_LICENSE_DIR</glossterm>
1440 <glossdef>
1441 <para>
1442 Points to <filename>meta/files/common-licenses</filename>
1443 in the
1444 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
1445 which is where generic license files reside.
1446 </para>
1447 </glossdef>
1448 </glossentry>
1449
1450 <glossentry id='var-COMPATIBLE_HOST'><glossterm>COMPATIBLE_HOST</glossterm>
1451 <glossdef>
1452 <para>A regular expression that resolves to one or more hosts
1453 (when the recipe is native) or one or more targets (when
1454 the recipe is non-native) with which a recipe is compatible.
1455 The regular expression is matched against
1456 <link linkend="var-HOST_SYS"><filename>HOST_SYS</filename></link>.
1457 You can use the variable to stop recipes from being built
1458 for classes of systems with which the recipes are not
1459 compatible.
1460 Stopping these builds is particularly useful with kernels.
1461 The variable also helps to increase parsing speed
1462 since the build system skips parsing recipes not
1463 compatible with the current system.</para>
1464 </glossdef>
1465 </glossentry>
1466
1467 <glossentry id='var-COMPATIBLE_MACHINE'><glossterm>COMPATIBLE_MACHINE</glossterm>
1468 <glossdef>
1469 <para>A regular expression that resolves to one or more
1470 target machines with which a recipe is compatible.
1471 The regular expression is matched against
1472 <link linkend="var-MACHINEOVERRIDES"><filename>MACHINEOVERRIDES</filename></link>.
1473 You can use the variable to stop recipes from being built
1474 for machines with which the recipes are not compatible.
1475 Stopping these builds is particularly useful with kernels.
1476 The variable also helps to increase parsing speed
1477 since the build system skips parsing recipes not
1478 compatible with the current machine.</para>
1479 </glossdef>
1480 </glossentry>
1481
1482 <glossentry id='var-COMPLEMENTARY_GLOB'><glossterm>COMPLEMENTARY_GLOB</glossterm>
1483 <glossdef>
1484 <para>
1485 Defines wildcards to match when installing a list of
1486 complementary packages for all the packages explicitly
1487 (or implicitly) installed in an image.
1488 The resulting list of complementary packages is associated
1489 with an item that can be added to
1490 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
1491 An example usage of this is the "dev-pkgs" item that when
1492 added to <filename>IMAGE_FEATURES</filename> will
1493 install -dev packages (containing headers and other
1494 development files) for every package in the image.
1495 </para>
1496
1497 <para>
1498 To add a new feature item pointing to a wildcard, use a
1499 variable flag to specify the feature item name and
1500 use the value to specify the wildcard.
1501 Here is an example:
1502 <literallayout class='monospaced'>
1503 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
1504 </literallayout>
1505 </para>
1506 </glossdef>
1507 </glossentry>
1508
1509 <glossentry id='var-CONFFILES'><glossterm>CONFFILES</glossterm>
1510 <glossdef>
1511 <para>
1512 Identifies editable or configurable files that are part of a package.
1513 If the Package Management System (PMS) is being used to update
1514 packages on the target system, it is possible that
1515 configuration files you have changed after the original installation
1516 and that you now want to remain unchanged are overwritten.
1517 In other words, editable files might exist in the package that you do not
1518 want reset as part of the package update process.
1519 You can use the <filename>CONFFILES</filename> variable to list the files in the
1520 package that you wish to prevent the PMS from overwriting during this update process.
1521 </para>
1522
1523 <para>
1524 To use the <filename>CONFFILES</filename> variable, provide a package name
1525 override that identifies the resulting package.
1526 Then, provide a space-separated list of files.
1527 Here is an example:
1528 <literallayout class='monospaced'>
1529 CONFFILES_${PN} += "${sysconfdir}/file1 \
1530 ${sysconfdir}/file2 ${sysconfdir}/file3"
1531 </literallayout>
1532 </para>
1533
1534 <para>
1535 A relationship exists between the <filename>CONFFILES</filename> and
1536 <filename><link linkend='var-FILES'>FILES</link></filename> variables.
1537 The files listed within <filename>CONFFILES</filename> must be a subset of
1538 the files listed within <filename>FILES</filename>.
1539 Because the configuration files you provide with <filename>CONFFILES</filename>
1540 are simply being identified so that the PMS will not overwrite them,
1541 it makes sense that
1542 the files must already be included as part of the package through the
1543 <filename>FILES</filename> variable.
1544 </para>
1545
1546 <note>
1547 When specifying paths as part of the <filename>CONFFILES</filename> variable,
1548 it is good practice to use appropriate path variables.
1549 For example, <filename>${sysconfdir}</filename> rather than
1550 <filename>/etc</filename> or <filename>${bindir}</filename> rather
1551 than <filename>/usr/bin</filename>.
1552 You can find a list of these variables at the top of the
1553 <filename>meta/conf/bitbake.conf</filename> file in the
1554 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1555 </note>
1556 </glossdef>
1557 </glossentry>
1558
1559 <glossentry id='var-CONFIG_INITRAMFS_SOURCE'><glossterm>CONFIG_INITRAMFS_SOURCE</glossterm>
1560 <glossdef>
1561 <para>
1562 Identifies the initial RAM disk (initramfs) source files.
1563 The OpenEmbedded build system receives and uses
1564 this kernel Kconfig variable as an environment variable.
1565 By default, the variable is set to null ("").
1566 </para>
1567
1568 <para>
1569 The <filename>CONFIG_INITRAMFS_SOURCE</filename> can be
1570 either a single cpio archive with a
1571 <filename>.cpio</filename> suffix or a
1572 space-separated list of directories and files for building
1573 the initramfs image.
1574 A cpio archive should contain a filesystem archive
1575 to be used as an initramfs image.
1576 Directories should contain a filesystem layout to be
1577 included in the initramfs image.
1578 Files should contain entries according to the format
1579 described by the
1580 <filename>usr/gen_init_cpio</filename> program in the
1581 kernel tree.
1582 </para>
1583
1584 <para>
1585 If you specify multiple directories and files, the
1586 initramfs image will be the aggregate of all of them.
1587 </para>
1588 </glossdef>
1589 </glossentry>
1590
1591 <glossentry id='var-CONFIG_SITE'><glossterm>CONFIG_SITE</glossterm>
1592 <glossdef>
1593 <para>
1594 A list of files that contains <filename>autoconf</filename> test results relevant
1595 to the current build.
1596 This variable is used by the Autotools utilities when running
1597 <filename>configure</filename>.
1598 </para>
1599 </glossdef>
1600 </glossentry>
1601
1602 <glossentry id='var-CONFLICT_DISTRO_FEATURES'><glossterm>CONFLICT_DISTRO_FEATURES</glossterm>
1603 <glossdef>
1604 <para>
1605 When inheriting the
1606 <link linkend='ref-classes-distro_features_check'><filename>distro_features_check</filename></link>
1607 class, this
1608 variable identifies distribution features that would
1609 be in conflict should the recipe
1610 be built.
1611 In other words, if the
1612 <filename>CONFLICT_DISTRO_FEATURES</filename> variable
1613 lists a feature that also appears in
1614 <filename>DISTRO_FEATURES</filename> within the
1615 current configuration, an error occurs and the
1616 build stops.
1617 </para>
1618 </glossdef>
1619 </glossentry>
1620
1621 <glossentry id='var-COPY_LIC_DIRS'><glossterm>COPY_LIC_DIRS</glossterm>
1622 <glossdef>
1623 <para>
1624 If set to "1" along with the
1625 <link linkend='var-COPY_LIC_MANIFEST'><filename>COPY_LIC_MANIFEST</filename></link>
1626 variable, the OpenEmbedded build system copies
1627 into the image the license files, which are located in
1628 <filename>/usr/share/common-licenses</filename>,
1629 for each package.
1630 The license files are placed
1631 in directories within the image itself.
1632 </para>
1633 </glossdef>
1634 </glossentry>
1635
1636 <glossentry id='var-COPY_LIC_MANIFEST'><glossterm>COPY_LIC_MANIFEST</glossterm>
1637 <glossdef>
1638 <para>
1639 If set to "1", the OpenEmbedded build system copies
1640 the license manifest for the image to
1641 <filename>/usr/share/common-licenses/license.manifest</filename>
1642 within the image itself.
1643 </para>
1644 </glossdef>
1645 </glossentry>
1646
1647 <glossentry id='var-CORE_IMAGE_EXTRA_INSTALL'><glossterm>CORE_IMAGE_EXTRA_INSTALL</glossterm>
1648 <glossdef>
1649 <para>
1650 Specifies the list of packages to be added to the image.
1651 You should only set this variable in the
1652 <filename>local.conf</filename> configuration file found
1653 in the
1654 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
1655 </para>
1656
1657 <para>
1658 This variable replaces <filename>POKY_EXTRA_INSTALL</filename>, which is no longer supported.
1659 </para>
1660 </glossdef>
1661 </glossentry>
1662
1663 <glossentry id='var-COREBASE'><glossterm>COREBASE</glossterm>
1664 <glossdef>
1665 <para>
1666 Specifies the parent directory of the OpenEmbedded
1667 Core Metadata layer (i.e. <filename>meta</filename>).
1668 </para>
1669
1670 <para>
1671 It is an important distinction that
1672 <filename>COREBASE</filename> points to the parent of this
1673 layer and not the layer itself.
1674 Consider an example where you have cloned the Poky Git
1675 repository and retained the <filename>poky</filename>
1676 name for your local copy of the repository.
1677 In this case, <filename>COREBASE</filename> points to
1678 the <filename>poky</filename> folder because it is the
1679 parent directory of the <filename>poky/meta</filename>
1680 layer.
1681 </para>
1682 </glossdef>
1683 </glossentry>
1684
1685 <glossentry id='var-CPPFLAGS'><glossterm>CPPFLAGS</glossterm>
1686 <glossdef>
1687 <para>
1688 Specifies the flags to pass to the C pre-processor
1689 (i.e. to both the C and the C++ compilers).
1690 This variable is exported to an environment
1691 variable and thus made visible to the software being
1692 built during the compilation step.
1693 </para>
1694
1695 <para>
1696 Default initialization for <filename>CPPFLAGS</filename>
1697 varies depending on what is being built:
1698 <itemizedlist>
1699 <listitem><para>
1700 <link linkend='var-TARGET_CPPFLAGS'><filename>TARGET_CPPFLAGS</filename></link>
1701 when building for the target
1702 </para></listitem>
1703 <listitem><para>
1704 <link linkend='var-BUILD_CPPFLAGS'><filename>BUILD_CPPFLAGS</filename></link>
1705 when building for the build host (i.e.
1706 <filename>-native</filename>)
1707 </para></listitem>
1708 <listitem><para>
1709 <link linkend='var-BUILDSDK_CPPFLAGS'><filename>BUILDSDK_CPPFLAGS</filename></link>
1710 when building for an SDK (i.e.
1711 <filename>nativesdk-</filename>)
1712 </para></listitem>
1713 </itemizedlist>
1714 </para>
1715 </glossdef>
1716 </glossentry>
1717
1718 <glossentry id='var-CXXFLAGS'><glossterm>CXXFLAGS</glossterm>
1719 <glossdef>
1720 <para>
1721 Specifies the flags to pass to the C++ compiler.
1722 This variable is exported to an environment
1723 variable and thus made visible to the software being
1724 built during the compilation step.
1725 </para>
1726
1727 <para>
1728 Default initialization for <filename>CXXFLAGS</filename>
1729 varies depending on what is being built:
1730 <itemizedlist>
1731 <listitem><para>
1732 <link linkend='var-TARGET_CXXFLAGS'><filename>TARGET_CXXFLAGS</filename></link>
1733 when building for the target
1734 </para></listitem>
1735 <listitem><para>
1736 <link linkend='var-BUILD_CXXFLAGS'><filename>BUILD_CXXFLAGS</filename></link>
1737 when building for the build host (i.e.
1738 <filename>-native</filename>)
1739 </para></listitem>
1740 <listitem><para>
1741 <link linkend='var-BUILDSDK_CXXFLAGS'><filename>BUILDSDK_CXXFLAGS</filename></link>
1742 when building for an SDK (i.e.
1743 <filename>nativesdk</filename>)
1744 </para></listitem>
1745 </itemizedlist>
1746 </para>
1747 </glossdef>
1748 </glossentry>
1749
1750 </glossdiv>
1751
1752 <glossdiv id='var-glossary-d'><title>D</title>
1753
1754 <glossentry id='var-D'><glossterm>D</glossterm>
1755 <glossdef>
1756 <para>
1757 The destination directory.
1758 The location in the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1759 where components are installed by the
1760 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
1761 task.
1762 This location defaults to:
1763 <literallayout class='monospaced'>
1764 ${WORKDIR}/image
1765 </literallayout>
1766 </para>
1767 </glossdef>
1768 </glossentry>
1769
1770 <glossentry id='var-DATETIME'><glossterm>DATETIME</glossterm>
1771 <glossdef>
1772 <para>
1773 The date and time on which the current build started.
1774 The format is suitable for timestamps.
1775 </para>
1776 </glossdef>
1777 </glossentry>
1778
1779 <glossentry id='var-DEBUG_BUILD'><glossterm>DEBUG_BUILD</glossterm>
1780 <glossdef>
1781 <para>
1782 Specifies to build packages with debugging information.
1783 This influences the value of the
1784 <filename><link linkend='var-SELECTED_OPTIMIZATION'>SELECTED_OPTIMIZATION</link></filename>
1785 variable.
1786 </para>
1787 </glossdef>
1788 </glossentry>
1789
1790 <glossentry id='var-DEBUG_OPTIMIZATION'><glossterm>DEBUG_OPTIMIZATION</glossterm>
1791 <glossdef>
1792 <para>
1793 The options to pass in
1794 <filename><link linkend='var-TARGET_CFLAGS'>TARGET_CFLAGS</link></filename>
1795 and <filename><link linkend='var-CFLAGS'>CFLAGS</link></filename> when compiling
1796 a system for debugging.
1797 This variable defaults to "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1798 </para>
1799 </glossdef>
1800 </glossentry>
1801
1802 <glossentry id='var-DEFAULT_PREFERENCE'><glossterm>DEFAULT_PREFERENCE</glossterm>
1803 <glossdef>
1804 <para>
1805 Specifies a weak bias for recipe selection priority.
1806 </para>
1807 <para>
1808 The most common usage of this is variable is to set
1809 it to "-1" within a recipe for a development version of a
1810 piece of software.
1811 Using the variable in this way causes the stable version
1812 of the recipe to build by default in the absence of
1813 <filename><link linkend='var-PREFERRED_VERSION'>PREFERRED_VERSION</link></filename>
1814 being used to build the development version.
1815 </para>
1816 <note>
1817 The bias provided by <filename>DEFAULT_PREFERENCE</filename>
1818 is weak and is overridden by
1819 <filename><link linkend='var-BBFILE_PRIORITY'>BBFILE_PRIORITY</link></filename>
1820 if that variable is different between two layers
1821 that contain different versions of the same recipe.
1822 </note>
1823 </glossdef>
1824 </glossentry>
1825
1826 <glossentry id='var-DEFAULTTUNE'><glossterm>DEFAULTTUNE</glossterm>
1827 <glossdef>
1828 <para>
1829 The default CPU and Application Binary Interface (ABI)
1830 tunings (i.e. the "tune") used by the OpenEmbedded build
1831 system.
1832 The <filename>DEFAULTTUNE</filename> helps define
1833 <link linkend='var-TUNE_FEATURES'><filename>TUNE_FEATURES</filename></link>.
1834 </para>
1835
1836 <para>
1837 The default tune is either implicitly or explicitly set
1838 by the machine
1839 (<link linkend='var-MACHINE'><filename>MACHINE</filename></link>).
1840 However, you can override the setting using available tunes
1841 as defined with
1842 <link linkend='var-AVAILTUNES'><filename>AVAILTUNES</filename></link>.
1843 </para>
1844 </glossdef>
1845 </glossentry>
1846
1847 <glossentry id='var-DEPENDS'><glossterm>DEPENDS</glossterm>
1848 <glossdef>
1849 <para>
1850 Lists a recipe's build-time dependencies
1851 (i.e. other recipe files).
1852 The system ensures that all the dependencies listed
1853 have been built and have their contents in the appropriate
1854 sysroots before the recipe's configure task is executed.
1855 </para>
1856
1857 <para>
1858 Consider this simple example for two recipes named "a" and
1859 "b" that produce similarly named packages.
1860 In this example, the <filename>DEPENDS</filename>
1861 statement appears in the "a" recipe:
1862 <literallayout class='monospaced'>
1863 DEPENDS = "b"
1864 </literallayout>
1865 Here, the dependency is such that the
1866 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
1867 task for recipe "a" depends on the
1868 <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
1869 task of recipe "b".
1870 This means anything that recipe "b" puts into sysroot
1871 is available when recipe "a" is configuring itself.
1872 </para>
1873
1874 <para>
1875 For information on runtime dependencies, see the
1876 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
1877 variable.
1878 </para>
1879 </glossdef>
1880 </glossentry>
1881
1882 <glossentry id='var-DEPLOY_DIR'><glossterm>DEPLOY_DIR</glossterm>
1883 <glossdef>
1884 <para>
1885 Points to the general area that the OpenEmbedded build
1886 system uses to place images, packages, SDKs and other output
1887 files that are ready to be used outside of the build system.
1888 By default, this directory resides within the
1889 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1890 as <filename>${TMPDIR}/deploy</filename>.
1891 </para>
1892
1893 <para>
1894 For more information on the structure of the Build
1895 Directory, see
1896 "<link linkend='structure-build'>The Build Directory - <filename>build/</filename></link>"
1897 section.
1898 For more detail on the contents of the
1899 <filename>deploy</filename> directory, see the
1900 "<link linkend='images-dev-environment'>Images</link>" and
1901 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
1902 sections.
1903 </para>
1904 </glossdef>
1905 </glossentry>
1906
1907 <glossentry id='var-DEPLOY_DIR_IMAGE'><glossterm>DEPLOY_DIR_IMAGE</glossterm>
1908 <glossdef>
1909 <para>
1910 Points to the area that the OpenEmbedded build system uses
1911 to place images and other associated output files that are
1912 ready to be deployed onto the target machine.
1913 The directory is machine-specific as it contains the
1914 <filename>${MACHINE}</filename> name.
1915 By default, this directory resides within the
1916 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1917 as <filename>${DEPLOY_DIR}/images/${MACHINE}/</filename>.
1918 </para>
1919
1920 <para>
1921 For more information on the structure of the Build
1922 Directory, see
1923 "<link linkend='structure-build'>The Build Directory - <filename>build/</filename></link>"
1924 section.
1925 For more detail on the contents of the
1926 <filename>deploy</filename> directory, see the
1927 "<link linkend='images-dev-environment'>Images</link>" and
1928 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
1929 sections.
1930 </para>
1931 </glossdef>
1932 </glossentry>
1933
1934 <glossentry id='var-DEPLOYDIR'><glossterm>DEPLOYDIR</glossterm>
1935 <glossdef>
1936 <para>
1937 When inheriting the
1938 <link linkend='ref-classes-deploy'><filename>deploy</filename></link>
1939 class, the <filename>DEPLOYDIR</filename> points to a
1940 temporary work area for deployed files that is set in the
1941 <filename>deploy</filename> class as follows:
1942 <literallayout class='monospaced'>
1943 DEPLOYDIR = "${WORKDIR}/deploy-${<link linkend='var-PN'><filename>PN</filename></link>}"
1944 </literallayout>
1945 Recipes inheriting the <filename>deploy</filename> class
1946 should copy files to be deployed into
1947 <filename>DEPLOYDIR</filename>, and the class will take
1948 care of copying them into
1949 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
1950 afterwards.
1951 </para>
1952 </glossdef>
1953 </glossentry>
1954
1955 <glossentry id='var-DESCRIPTION'><glossterm>DESCRIPTION</glossterm>
1956 <glossdef>
1957 <para>The package description used by package managers.
1958 If not set, <filename>DESCRIPTION</filename> takes
1959 the value of the
1960 <link linkend='var-SUMMARY'><filename>SUMMARY</filename></link>
1961 variable.
1962 </para>
1963 </glossdef>
1964 </glossentry>
1965
1966 <glossentry id='var-DISK_SIGNATURE'><glossterm>DISK_SIGNATURE</glossterm>
1967 <glossdef>
1968 <para>
1969 A 32-bit MBR disk signature used by
1970 <filename>directdisk</filename> images.
1971 </para>
1972
1973 <para>
1974 By default, the signature is set to an automatically
1975 generated random value that allows the OpenEmbedded
1976 build system to create a boot loader.
1977 You can override the signature in the image recipe
1978 by setting <filename>DISK_SIGNATURE</filename> to an
1979 8-digit hex string.
1980 You might want to override
1981 <filename>DISK_SIGNATURE</filename> if you want the disk
1982 signature to remain constant between image builds.
1983 </para>
1984
1985 <para>
1986 When using Linux 3.8 or later, you can use
1987 <filename>DISK_SIGNATURE</filename> to specify the root
1988 by UUID to allow the kernel to locate the root device
1989 even if the device name changes due to differences in
1990 hardware configuration.
1991 By default, <filename>SYSLINUX_ROOT</filename> is set
1992 as follows:
1993 <literallayout class='monospaced'>
1994 SYSLINUX_ROOT = "root=/dev/sda2"
1995 </literallayout>
1996 However, you can change this to locate the root device
1997 using the disk signature instead:
1998 <literallayout class='monospaced'>
1999 SYSLINUX_ROOT = "root=PARTUUID=${DISK_SIGNATURE}-02"
2000 </literallayout>
2001 </para>
2002
2003 <para>
2004 As previously mentioned, it is possible to set the
2005 <filename>DISK_SIGNATURE</filename> variable in your
2006 <filename>local.conf</filename> file to a fixed
2007 value if you do not want <filename>syslinux.cfg</filename>
2008 changing for each build.
2009 You might find this useful when you want to upgrade the
2010 root filesystem on a device without having to recreate or
2011 modify the master boot record.
2012 </para>
2013 </glossdef>
2014 </glossentry>
2015
2016 <glossentry id='var-DISTRO'><glossterm>DISTRO</glossterm>
2017 <glossdef>
2018 <para>
2019 The short name of the distribution.
2020 This variable corresponds to a distribution
2021 configuration file whose root name is the same as the
2022 variable's argument and whose filename extension is
2023 <filename>.conf</filename>.
2024 For example, the distribution configuration file for the
2025 Poky distribution is named <filename>poky.conf</filename>
2026 and resides in the
2027 <filename>meta-yocto/conf/distro</filename> directory of
2028 the
2029 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
2030 </para>
2031
2032 <para>
2033 Within that <filename>poky.conf</filename> file, the
2034 <filename>DISTRO</filename> variable is set as follows:
2035 <literallayout class='monospaced'>
2036 DISTRO = "poky"
2037 </literallayout>
2038 </para>
2039
2040 <para>
2041 Distribution configuration files are located in a
2042 <filename>conf/distro</filename> directory within the
2043 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
2044 that contains the distribution configuration.
2045 The value for <filename>DISTRO</filename> must not contain
2046 spaces, and is typically all lower-case.
2047 <note>
2048 If the <filename>DISTRO</filename> variable is blank, a set
2049 of default configurations are used, which are specified
2050 within
2051 <filename>meta/conf/distro/defaultsetup.conf</filename>
2052 also in the Source Directory.
2053 </note>
2054 </para>
2055 </glossdef>
2056 </glossentry>
2057
2058 <glossentry id='var-DISTRO_EXTRA_RDEPENDS'><glossterm>DISTRO_EXTRA_RDEPENDS</glossterm>
2059 <glossdef>
2060 <para>
2061 Specifies a list of distro-specific packages to add to all images.
2062 This variable takes affect through
2063 <filename>packagegroup-base</filename> so the
2064 variable only really applies to the more full-featured
2065 images that include <filename>packagegroup-base</filename>.
2066 You can use this variable to keep distro policy out of
2067 generic images.
2068 As with all other distro variables, you set this variable
2069 in the distro <filename>.conf</filename> file.
2070 </para>
2071 </glossdef>
2072 </glossentry>
2073
2074 <glossentry id='var-DISTRO_EXTRA_RRECOMMENDS'><glossterm>DISTRO_EXTRA_RRECOMMENDS</glossterm>
2075 <glossdef>
2076 <para>
2077 Specifies a list of distro-specific packages to add to all images
2078 if the packages exist.
2079 The packages might not exist or be empty (e.g. kernel modules).
2080 The list of packages are automatically installed but you can
2081 remove them.
2082 </para>
2083 </glossdef>
2084 </glossentry>
2085
2086 <glossentry id='var-DISTRO_FEATURES'><glossterm>DISTRO_FEATURES</glossterm>
2087 <glossdef>
2088 <para>
2089 The software support you want in your distribution for
2090 various features.
2091 You define your distribution features in the distribution
2092 configuration file.
2093 </para>
2094
2095 <para>
2096 In most cases, the presence or absence of a feature in
2097 <filename>DISTRO_FEATURES</filename> is translated to the
2098 appropriate option supplied to the configure script
2099 during the
2100 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
2101 task for recipes that optionally support the feature.
2102 For example, specifying "x11" in
2103 <filename>DISTRO_FEATURES</filename>, causes
2104 every piece of software built for the target that can
2105 optionally support X11 to have its X11 support enabled.
2106 </para>
2107
2108 <para>
2109 Two more examples are Bluetooth and NFS support.
2110 For a more complete list of features that ships with the
2111 Yocto Project and that you can provide with this variable,
2112 see the
2113 "<link linkend='ref-features-distro'>Distro Features</link>"
2114 section.
2115 </para>
2116 </glossdef>
2117 </glossentry>
2118
2119 <glossentry id='var-DISTRO_FEATURES_BACKFILL'><glossterm>DISTRO_FEATURES_BACKFILL</glossterm>
2120 <glossdef>
2121 <para>Features to be added to
2122 <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>
2123 if not also present in
2124 <filename><link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'>DISTRO_FEATURES_BACKFILL_CONSIDERED</link></filename>.
2125 </para>
2126
2127 <para>
2128 This variable is set in the <filename>meta/conf/bitbake.conf</filename> file.
2129 It is not intended to be user-configurable.
2130 It is best to just reference the variable to see which distro features are
2131 being backfilled for all distro configurations.
2132 See the <link linkend='ref-features-backfill'>Feature backfilling</link> section for
2133 more information.
2134 </para>
2135 </glossdef>
2136 </glossentry>
2137
2138 <glossentry id='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><glossterm>DISTRO_FEATURES_BACKFILL_CONSIDERED</glossterm>
2139 <glossdef>
2140 <para>Features from
2141 <filename><link linkend='var-DISTRO_FEATURES_BACKFILL'>DISTRO_FEATURES_BACKFILL</link></filename>
2142 that should not be backfilled (i.e. added to
2143 <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>)
2144 during the build.
2145 See the "<link linkend='ref-features-backfill'>Feature Backfilling</link>" section for
2146 more information.
2147 </para>
2148 </glossdef>
2149 </glossentry>
2150
2151 <glossentry id='var-DISTRO_NAME'><glossterm>DISTRO_NAME</glossterm>
2152 <glossdef>
2153 <para>The long name of the distribution.</para>
2154 </glossdef>
2155 </glossentry>
2156
2157 <glossentry id='var-DISTRO_PN_ALIAS'><glossterm>DISTRO_PN_ALIAS</glossterm>
2158 <glossdef>
2159 <para>Alias names used for the recipe in various Linux distributions.</para>
2160 <para>See the
2161 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-configuring-DISTRO_PN_ALIAS'>Handling
2162 a Package Name Alias</ulink>" section in the Yocto Project Development
2163 Manual for more information.</para>
2164 </glossdef>
2165 </glossentry>
2166
2167 <glossentry id='var-DISTRO_VERSION'><glossterm>DISTRO_VERSION</glossterm>
2168 <glossdef>
2169 <para>The version of the distribution.</para>
2170 </glossdef>
2171 </glossentry>
2172
2173 <glossentry id='var-DISTROOVERRIDES'><glossterm>DISTROOVERRIDES</glossterm>
2174 <glossdef>
2175 <para>
2176 This variable lists overrides specific to the current
2177 distribution.
2178 By default, the variable list includes the value of the
2179 <filename><link linkend='var-DISTRO'>DISTRO</link></filename>
2180 variable.
2181 You can extend the variable to apply any variable overrides
2182 you want as part of the distribution and are not
2183 already in <filename>OVERRIDES</filename> through
2184 some other means.
2185 </para>
2186 </glossdef>
2187 </glossentry>
2188
2189 <glossentry id='var-DL_DIR'><glossterm>DL_DIR</glossterm>
2190 <glossdef>
2191 <para>
2192 The central download directory used by the build process to
2193 store downloads.
2194 By default, <filename>DL_DIR</filename> gets files
2195 suitable for mirroring for everything except Git
2196 repositories.
2197 If you want tarballs of Git repositories, use the
2198 <link linkend='var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></link>
2199 variable.
2200 </para>
2201
2202 <para>
2203 You can set this directory by defining the
2204 <filename>DL_DIR</filename> variable in the
2205 <filename>conf/local.conf</filename> file.
2206 This directory is self-maintaining and you should not have
2207 to touch it.
2208 By default, the directory is <filename>downloads</filename>
2209 in the
2210 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
2211 <literallayout class='monospaced'>
2212 #DL_DIR ?= "${TOPDIR}/downloads"
2213 </literallayout>
2214 To specify a different download directory, simply remove
2215 the comment from the line and provide your directory.
2216 </para>
2217
2218 <para>
2219 During a first build, the system downloads many different
2220 source code tarballs from various upstream projects.
2221 Downloading can take a while, particularly if your network
2222 connection is slow.
2223 Tarballs are all stored in the directory defined by
2224 <filename>DL_DIR</filename> and the build system looks there
2225 first to find source tarballs.
2226 <note>
2227 When wiping and rebuilding, you can preserve this
2228 directory to speed up this part of subsequent
2229 builds.
2230 </note>
2231 </para>
2232
2233 <para>
2234 You can safely share this directory between multiple builds
2235 on the same development machine.
2236 For additional information on how the build process gets
2237 source files when working behind a firewall or proxy server,
2238 see this specific question in the
2239 "<link linkend='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>FAQ</link>"
2240 chapter.
2241 </para>
2242 </glossdef>
2243 </glossentry>
2244
2245 <glossentry id='var-DOC_COMPRESS'><glossterm>DOC_COMPRESS</glossterm>
2246 <glossdef>
2247 <para>
2248 When inheriting the
2249 <link linkend='ref-classes-compress_doc'><filename>compress_doc</filename></link>
2250 class, this variable sets the compression policy used when
2251 the OpenEmbedded build system compresses man pages and info
2252 pages.
2253 By default, the compression method used is gz (gzip).
2254 Other policies available are xz and bz2.
2255 </para>
2256
2257 <para>
2258 For information on policies and on how to use this
2259 variable, see the comments in the
2260 <filename>meta/classes/compress_doc.bbclass</filename> file.
2261 </para>
2262 </glossdef>
2263 </glossentry>
2264
2265 </glossdiv>
2266
2267 <glossdiv id='var-glossary-e'><title>E</title>
2268
2269 <glossentry id='var-EFI_PROVIDER'><glossterm>EFI_PROVIDER</glossterm>
2270 <glossdef>
2271 <para>
2272 When building bootable images (i.e. where
2273 <filename>hddimg</filename> or <filename>vmdk</filename>
2274 is in
2275 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>),
2276 The <filename>EFI_PROVIDER</filename> variable specifies
2277 the EFI bootloader to use.
2278 The default is "grub-efi", but "gummiboot" can be used
2279 instead.
2280 </para>
2281
2282 <para>
2283 See the
2284 <link linkend='ref-classes-gummiboot'><filename>gummiboot</filename></link>
2285 class for more information.
2286 </para>
2287 </glossdef>
2288 </glossentry>
2289
2290 <glossentry id='var-ENABLE_BINARY_LOCALE_GENERATION'><glossterm>ENABLE_BINARY_LOCALE_GENERATION</glossterm>
2291 <glossdef>
2292 <para>Variable that controls which locales for
2293 <filename>glibc</filename> are generated during the
2294 build (useful if the target device has 64Mbytes
2295 of RAM or less).</para>
2296 </glossdef>
2297 </glossentry>
2298
2299 <glossentry id='var-ERROR_QA'><glossterm>ERROR_QA</glossterm>
2300 <glossdef>
2301 <para>
2302 Specifies the quality assurance checks whose failures are
2303 reported as errors by the OpenEmbedded build system.
2304 You set this variable in your distribution configuration
2305 file.
2306 For a list of the checks you can control with this variable,
2307 see the
2308 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
2309 section.
2310 </para>
2311 </glossdef>
2312 </glossentry>
2313
2314 <glossentry id='var-ERR_REPORT_DIR'><glossterm>ERR_REPORT_DIR</glossterm>
2315 <glossdef>
2316 <para>
2317 When used with the
2318 <link linkend='ref-classes-report-error'><filename>report-error</filename></link>
2319 class, specifies the path used for storing the debug files
2320 created by the
2321 <ulink url='&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool'>error reporting tool</ulink>,
2322 which allows you to submit build errors you encounter to a
2323 central database.
2324 By default, the value of this variable is
2325 <filename>${</filename><link linkend='var-LOG_DIR'><filename>LOG_DIR</filename></link><filename>}/error-report</filename>.
2326 </para>
2327
2328 <para>
2329 You can set <filename>ERR_REPORT_DIR</filename> to the path
2330 you want the error reporting tool to store the debug files
2331 as follows in your <filename>local.conf</filename> file:
2332 <literallayout class='monospaced'>
2333 ERR_REPORT_DIR = "<replaceable>path</replaceable>"
2334 </literallayout>
2335 </para>
2336 </glossdef>
2337 </glossentry>
2338
2339 <glossentry id='var-EXCLUDE_FROM_WORLD'><glossterm>EXCLUDE_FROM_WORLD</glossterm>
2340 <glossdef>
2341 <para>
2342 Directs BitBake to exclude a recipe from world builds (i.e.
2343 <filename>bitbake world</filename>).
2344 During world builds, BitBake locates, parses and builds all
2345 recipes found in every layer exposed in the
2346 <filename>bblayers.conf</filename> configuration file.
2347 </para>
2348
2349 <para>
2350 To exclude a recipe from a world build using this variable,
2351 set the variable to "1" in the recipe.
2352 </para>
2353
2354 <note>
2355 Recipes added to <filename>EXCLUDE_FROM_WORLD</filename>
2356 may still be built during a world build in order to satisfy
2357 dependencies of other recipes.
2358 Adding a recipe to <filename>EXCLUDE_FROM_WORLD</filename>
2359 only ensures that the recipe is not explicitly added
2360 to the list of build targets in a world build.
2361 </note>
2362 </glossdef>
2363 </glossentry>
2364
2365 <glossentry id='var-EXTENDPE'><glossterm>EXTENDPE</glossterm>
2366 <glossdef>
2367 <para>
2368 Used with file and pathnames to create a prefix for a recipe's
2369 version based on the recipe's
2370 <link linkend='var-PE'><filename>PE</filename></link> value.
2371 If <filename>PE</filename> is set and greater than zero for a recipe,
2372 <filename>EXTENDPE</filename> becomes that value (e.g if
2373 <filename>PE</filename> is equal to "1" then <filename>EXTENDPE</filename>
2374 becomes "1_").
2375 If a recipe's <filename>PE</filename> is not set (the default) or is equal to
2376 zero, <filename>EXTENDPE</filename> becomes "".</para>
2377 <para>See the <link linkend='var-STAMP'><filename>STAMP</filename></link>
2378 variable for an example.
2379 </para>
2380 </glossdef>
2381 </glossentry>
2382
2383 <glossentry id='var-EXTENDPKGV'><glossterm>EXTENDPKGV</glossterm>
2384 <glossdef>
2385 <para>
2386 The full package version specification as it appears on the
2387 final packages produced by a recipe.
2388 The variable's value is normally used to fix a runtime
2389 dependency to the exact same version of another package
2390 in the same recipe:
2391 <literallayout class='monospaced'>
2392 RDEPENDS_${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
2393 </literallayout>
2394 </para>
2395
2396 <para>
2397 The dependency relationships are intended to force the
2398 package manager to upgrade these types of packages in
2399 lock-step.
2400 </para>
2401 </glossdef>
2402 </glossentry>
2403
2404 <glossentry id='var-EXTERNALSRC'><glossterm>EXTERNALSRC</glossterm>
2405 <glossdef>
2406 <para>
2407 When inheriting the
2408 <link linkend='ref-classes-externalsrc'><filename>externalsrc</filename></link>
2409 class, this variable points to the source tree, which is
2410 outside of the OpenEmbedded build system.
2411 When set, this variable sets the
2412 <link linkend='var-S'><filename>S</filename></link>
2413 variable, which is what the OpenEmbedded build system uses
2414 to locate unpacked recipe source code.
2415 </para>
2416
2417 <para>
2418 For more information on
2419 <filename>externalsrc.bbclass</filename>, see the
2420 "<link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>"
2421 section.
2422 You can also find information on how to use this variable
2423 in the
2424 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
2425 section in the Yocto Project Development Manual.
2426 </para>
2427 </glossdef>
2428 </glossentry>
2429
2430 <glossentry id='var-EXTERNALSRC_BUILD'><glossterm>EXTERNALSRC_BUILD</glossterm>
2431 <glossdef>
2432 <para>
2433 When inheriting the
2434 <link linkend='ref-classes-externalsrc'><filename>externalsrc</filename></link>
2435 class, this variable points to the directory in which the
2436 recipe's source code is built, which is outside of the
2437 OpenEmbedded build system.
2438 When set, this variable sets the
2439 <link linkend='var-B'><filename>B</filename></link>
2440 variable, which is what the OpenEmbedded build system uses
2441 to locate the Build Directory.
2442 </para>
2443
2444 <para>
2445 For more information on
2446 <filename>externalsrc.bbclass</filename>, see the
2447 "<link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>"
2448 section.
2449 You can also find information on how to use this variable
2450 in the
2451 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
2452 section in the Yocto Project Development Manual.
2453 </para>
2454 </glossdef>
2455 </glossentry>
2456
2457 <glossentry id='var-EXTRA_IMAGE_FEATURES'><glossterm>EXTRA_IMAGE_FEATURES</glossterm>
2458 <glossdef>
2459 <para>
2460 The list of additional features to include in an image.
2461 Typically, you configure this variable in your
2462 <filename>local.conf</filename> file, which is found in the
2463 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
2464 Although you can use this variable from within a recipe,
2465 best practices dictate that you do not.
2466 <note>
2467 To enable primary features from within the image
2468 recipe, use the
2469 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
2470 variable.
2471 </note>
2472 </para>
2473
2474 <para>
2475 Here are some examples of features you can add:
2476 <literallayout class='monospaced'>
2477"dbg-pkgs" - Adds -dbg packages for all installed packages
2478 including symbol information for debugging and
2479 profiling.
2480
2481"debug-tweaks" - Makes an image suitable for development.
2482 For example, ssh root access has a blank
2483 password. You should remove this feature
2484 before you produce a production image.
2485
2486"dev-pkgs" - Adds -dev packages for all installed packages.
2487 This is useful if you want to develop against
2488 the libraries in the image.
2489
2490"read-only-rootfs" - Creates an image whose root
2491 filesystem is read-only. See the
2492 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>Creating a Read-Only Root Filesystem</ulink>"
2493 section in the Yocto Project
2494 Development Manual for more
2495 information
2496
2497"tools-debug" - Adds debugging tools such as gdb and
2498 strace.
2499
2500"tools-profile" - Adds profiling tools such as oprofile,
2501 exmap, lttng and valgrind (x86 only).
2502
2503"tools-sdk" - Adds development tools such as gcc, make,
2504 pkgconfig and so forth.
2505
2506"tools-testapps" - Adds useful testing tools such as
2507 ts_print, aplay, arecord and so
2508 forth.
2509
2510 </literallayout>
2511 </para>
2512
2513 <para>
2514 For a complete list of image features that ships with the
2515 Yocto Project, see the
2516 "<link linkend="ref-features-image">Image Features</link>"
2517 section.
2518 </para>
2519
2520 <para>
2521 For an example that shows how to customize your image by
2522 using this variable, see the
2523 "<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>"
2524 section in the Yocto Project Development Manual.
2525 </para>
2526 </glossdef>
2527 </glossentry>
2528
2529 <glossentry id='var-EXTRA_IMAGECMD'><glossterm>EXTRA_IMAGECMD</glossterm>
2530 <glossdef>
2531 <para>
2532 Specifies additional options for the image
2533 creation command that has been specified in
2534 <link linkend='var-IMAGE_CMD'><filename>IMAGE_CMD</filename></link>.
2535 When setting this variable, you should
2536 use an override for the associated type.
2537 Here is an example:
2538 <literallayout class='monospaced'>
2539 EXTRA_IMAGECMD_ext3 ?= "-i 4096"
2540 </literallayout>
2541 </para>
2542 </glossdef>
2543 </glossentry>
2544
2545 <glossentry id='var-EXTRA_IMAGEDEPENDS'><glossterm>EXTRA_IMAGEDEPENDS</glossterm>
2546 <glossdef>
2547 <para>A list of recipes to build that do not provide packages
2548 for installing into the root filesystem.
2549 </para>
2550 <para>Sometimes a recipe is required to build the final image but is not
2551 needed in the root filesystem.
2552 You can use the <filename>EXTRA_IMAGEDEPENDS</filename> variable to
2553 list these recipes and thus specify the dependencies.
2554 A typical example is a required bootloader in a machine configuration.
2555 </para>
2556 <note>
2557 To add packages to the root filesystem, see the various
2558 <filename>*<link linkend='var-RDEPENDS'>RDEPENDS</link></filename>
2559 and <filename>*<link linkend='var-RRECOMMENDS'>RRECOMMENDS</link></filename>
2560 variables.
2561 </note>
2562 </glossdef>
2563 </glossentry>
2564
2565 <glossentry id='var-EXTRA_OECMAKE'><glossterm>EXTRA_OECMAKE</glossterm>
2566 <glossdef>
2567 <para>Additional <filename>cmake</filename> options.</para>
2568 </glossdef>
2569 </glossentry>
2570
2571 <glossentry id='var-EXTRA_OECONF'><glossterm>EXTRA_OECONF</glossterm>
2572 <glossdef>
2573 <para>Additional <filename>configure</filename> script options.</para>
2574 </glossdef>
2575 </glossentry>
2576
2577 <glossentry id='var-EXTRA_OEMAKE'><glossterm>EXTRA_OEMAKE</glossterm>
2578 <glossdef>
2579 <para>Additional GNU <filename>make</filename> options.</para>
2580 </glossdef>
2581 </glossentry>
2582
2583 <glossentry id='var-EXTRA_OESCONS'><glossterm>EXTRA_OESCONS</glossterm>
2584 <glossdef>
2585 <para>
2586 When inheriting the
2587 <link linkend='ref-classes-scons'><filename>scons</filename></link>
2588 class, this variable specifies additional configuration
2589 options you want to pass to the
2590 <filename>scons</filename> command line.
2591 </para>
2592 </glossdef>
2593 </glossentry>
2594
2595 <glossentry id='var-EXTRA_QMAKEVARS_POST'><glossterm>EXTRA_QMAKEVARS_POST</glossterm>
2596 <glossdef>
2597 <para>
2598 Configuration variables or options you want to pass to
2599 <filename>qmake</filename>.
2600 Use this variable when the arguments need to be after the
2601 <filename>.pro</filename> file list on the command line.
2602 </para>
2603
2604 <para>
2605 This variable is used with recipes that inherit the
2606 <link linkend='ref-classes-qmake*'><filename>qmake_base</filename></link>
2607 class or other classes that inherit
2608 <filename>qmake_base</filename>.
2609 </para>
2610 </glossdef>
2611 </glossentry>
2612
2613 <glossentry id='var-EXTRA_QMAKEVARS_PRE'><glossterm>EXTRA_QMAKEVARS_PRE</glossterm>
2614 <glossdef>
2615 <para>
2616 Configuration variables or options you want to pass to
2617 <filename>qmake</filename>.
2618 Use this variable when the arguments need to be before the
2619 <filename>.pro</filename> file list on the command line.
2620 </para>
2621
2622 <para>
2623 This variable is used with recipes that inherit the
2624 <link linkend='ref-classes-qmake*'><filename>qmake_base</filename></link>
2625 class or other classes that inherit
2626 <filename>qmake_base</filename>.
2627 </para>
2628 </glossdef>
2629 </glossentry>
2630
2631 <glossentry id='var-EXTRA_USERS_PARAMS'><glossterm>EXTRA_USERS_PARAMS</glossterm>
2632 <glossdef>
2633 <para>
2634 When inheriting the
2635 <link linkend='ref-classes-extrausers'><filename>extrausers</filename></link>
2636 class, this variable provides image level user and group
2637 operations.
2638 This is a more global method of providing user and group
2639 configuration as compared to using the
2640 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
2641 class, which ties user and group configurations to a
2642 specific recipe.
2643 </para>
2644
2645 <para>
2646 The set list of commands you can configure using the
2647 <filename>EXTRA_USERS_PARAMS</filename> is shown in the
2648 <filename>extrausers</filename> class.
2649 These commands map to the normal Unix commands of the same
2650 names:
2651 <literallayout class='monospaced'>
2652 # EXTRA_USERS_PARAMS = "\
2653 # useradd -p '' tester; \
2654 # groupadd developers; \
2655 # userdel nobody; \
2656 # groupdel -g video; \
2657 # groupmod -g 1020 developers; \
2658 # usermod -s /bin/sh tester; \
2659 # "
2660 </literallayout>
2661 </para>
2662 </glossdef>
2663 </glossentry>
2664
2665 </glossdiv>
2666
2667 <glossdiv id='var-glossary-f'><title>F</title>
2668
2669 <glossentry id='var-FEATURE_PACKAGES'><glossterm>FEATURE_PACKAGES</glossterm>
2670 <glossdef>
2671 <para>
2672 Defines one or more packages to include in an image when
2673 a specific item is included in
2674 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
2675 When setting the value, <filename>FEATURE_PACKAGES</filename>
2676 should have the name of the feature item as an override.
2677 Here is an example:
2678 <literallayout class='monospaced'>
2679 FEATURE_PACKAGES_widget = "<replaceable>package1</replaceable> <replaceable>package2</replaceable>"
2680 </literallayout>
2681 In this example, if "widget" were added to
2682 <filename>IMAGE_FEATURES</filename>, <replaceable>package1</replaceable> and
2683 <replaceable>package2</replaceable> would be included in the image.
2684 <note>
2685 Packages installed by features defined through
2686 <filename>FEATURE_PACKAGES</filename> are often package
2687 groups.
2688 While similarly named, you should not confuse the
2689 <filename>FEATURE_PACKAGES</filename> variable with
2690 package groups, which are discussed elsewhere in the
2691 documentation.
2692 </note>
2693 </para>
2694 </glossdef>
2695 </glossentry>
2696
2697 <glossentry id='var-FEED_DEPLOYDIR_BASE_URI'><glossterm>FEED_DEPLOYDIR_BASE_URI</glossterm>
2698 <glossdef>
2699 <para>
2700 Points to the base URL of the server and location within
2701 the document-root that provides the metadata and
2702 packages required by OPKG to support runtime package
2703 management of IPK packages.
2704 You set this variable in your
2705 <filename>local.conf</filename> file.
2706 </para>
2707
2708 <para>
2709 Consider the following example:
2710 <literallayout class='monospaced'>
2711 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
2712 </literallayout>
2713 This example assumes you are serving your packages over
2714 HTTP and your databases are located in a directory
2715 named <filename>BOARD-dir</filename>, which is underneath
2716 your HTTP server's document-root.
2717 In this case, the OpenEmbedded build system generates a set
2718 of configuration files for you in your target that work
2719 with the feed.
2720 </para>
2721 </glossdef>
2722 </glossentry>
2723
2724 <glossentry id='var-FILES'><glossterm>FILES</glossterm>
2725 <glossdef>
2726 <para>
2727 The list of directories or files that are placed in packages.
2728 </para>
2729
2730 <para>
2731 To use the <filename>FILES</filename> variable, provide a
2732 package name override that identifies the resulting package.
2733 Then, provide a space-separated list of files or paths
2734 that identify the files you want included as part of the
2735 resulting package.
2736 Here is an example:
2737 <literallayout class='monospaced'>
2738 FILES_${PN} += "${bindir}/mydir1/ ${bindir}/mydir2/myfile"
2739 </literallayout>
2740 </para>
2741
2742 <note>
2743 When specifying paths as part of the
2744 <filename>FILES</filename> variable, it is good practice
2745 to use appropriate path variables.
2746 For example, use <filename>${sysconfdir}</filename> rather
2747 than <filename>/etc</filename>, or
2748 <filename>${bindir}</filename> rather than
2749 <filename>/usr/bin</filename>.
2750 You can find a list of these variables at the top of the
2751 <filename>meta/conf/bitbake.conf</filename> file in the
2752 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
2753 </note>
2754
2755 <para>
2756 If some of the files you provide with the
2757 <filename>FILES</filename> variable are editable and you
2758 know they should not be overwritten during the package
2759 update process by the Package Management System (PMS), you
2760 can identify these files so that the PMS will not
2761 overwrite them.
2762 See the
2763 <link linkend='var-CONFFILES'><filename>CONFFILES</filename></link>
2764 variable for information on how to identify these files to
2765 the PMS.
2766 </para>
2767
2768 </glossdef>
2769 </glossentry>
2770
2771 <glossentry id='var-FILESEXTRAPATHS'><glossterm>FILESEXTRAPATHS</glossterm>
2772 <glossdef>
2773 <para>
2774 Extends the search path the OpenEmbedded build system uses
2775 when looking for files and patches as it processes recipes
2776 and append files.
2777 The default directories BitBake uses when it processes
2778 recipes are initially defined by the
2779 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
2780 variable.
2781 You can extend <filename>FILESPATH</filename> variable
2782 by using <filename>FILESEXTRAPATHS</filename>.
2783 </para>
2784
2785 <para>
2786 Best practices dictate that you accomplish this by using
2787 <filename>FILESEXTRAPATHS</filename> from within a
2788 <filename>.bbappend</filename> file and that you prepend
2789 paths as follows:
2790 <literallayout class='monospaced'>
2791 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2792 </literallayout>
2793 In the above example, the build system first looks for files
2794 in a directory that has the same name as the corresponding
2795 append file.
2796 <note>
2797 <para>When extending <filename>FILESEXTRAPATHS</filename>,
2798 be sure to use the immediate expansion
2799 (<filename>:=</filename>) operator.
2800 Immediate expansion makes sure that BitBake evaluates
2801 <link linkend='var-THISDIR'><filename>THISDIR</filename></link>
2802 at the time the directive is encountered rather than at
2803 some later time when expansion might result in a
2804 directory that does not contain the files you need.
2805 </para>
2806 <para>Also, include the trailing separating colon
2807 character if you are prepending.
2808 The trailing colon character is necessary because you
2809 are directing BitBake to extend the path by prepending
2810 directories to the search path.</para>
2811 </note>
2812 Here is another common use:
2813 <literallayout class='monospaced'>
2814 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
2815 </literallayout>
2816 In this example, the build system extends the
2817 <filename>FILESPATH</filename> variable to include a
2818 directory named <filename>files</filename> that is in the
2819 same directory as the corresponding append file.
2820 </para>
2821
2822 <para>
2823 Here is a final example that specifically adds three paths:
2824 <literallayout class='monospaced'>
2825 FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:"
2826 </literallayout>
2827 </para>
2828
2829 <para>
2830 By prepending paths in <filename>.bbappend</filename>
2831 files, you allow multiple append files that reside in
2832 different layers but are used for the same recipe to
2833 correctly extend the path.
2834 </para>
2835 </glossdef>
2836 </glossentry>
2837
2838 <glossentry id='var-FILESOVERRIDES'><glossterm>FILESOVERRIDES</glossterm>
2839 <glossdef>
2840 <para>
2841 A subset of <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
2842 used by the OpenEmbedded build system for creating
2843 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>.
2844 You can find more information on how overrides are handled
2845 in the
2846 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake Manual</ulink>.
2847 </para>
2848
2849 <para>
2850 By default, the <filename>FILESOVERRIDES</filename>
2851 variable is defined as:
2852 <literallayout class='monospaced'>
2853 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
2854 </literallayout>
2855
2856 <note>
2857 Do not hand-edit the <filename>FILESOVERRIDES</filename>
2858 variable.
2859 The values match up with expected overrides and are
2860 used in an expected manner by the build system.
2861 </note>
2862 </para>
2863 </glossdef>
2864 </glossentry>
2865
2866 <glossentry id='var-FILESPATH'><glossterm>FILESPATH</glossterm>
2867 <glossdef>
2868 <para>
2869 The default set of directories the OpenEmbedded build system
2870 uses when searching for patches and files.
2871 During the build process, BitBake searches each directory in
2872 <filename>FILESPATH</filename> in the specified order when
2873 looking for files and patches specified by each
2874 <filename>file://</filename> URI in a recipe.
2875 </para>
2876
2877 <para>
2878 The default value for the <filename>FILESPATH</filename>
2879 variable is defined in the <filename>base.bbclass</filename>
2880 class found in <filename>meta/classes</filename> in the
2881 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
2882 <literallayout class='monospaced'>
2883 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
2884 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
2885 </literallayout>
2886 <note>
2887 Do not hand-edit the <filename>FILESPATH</filename>
2888 variable.
2889 If you want the build system to look in directories
2890 other than the defaults, extend the
2891 <filename>FILESPATH</filename> variable by using the
2892 <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
2893 variable.
2894 </note>
2895 Be aware that the default <filename>FILESPATH</filename>
2896 directories do not map to directories in custom layers
2897 where append files (<filename>.bbappend</filename>)
2898 are used.
2899 If you want the build system to find patches or files
2900 that reside with your append files, you need to extend
2901 the <filename>FILESPATH</filename> variable by using
2902 the
2903 <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
2904 variable.
2905 </para>
2906 </glossdef>
2907 </glossentry>
2908
2909 <glossentry id='var-FILESYSTEM_PERMS_TABLES'><glossterm>FILESYSTEM_PERMS_TABLES</glossterm>
2910 <glossdef>
2911 <para>Allows you to define your own file permissions settings table as part of
2912 your configuration for the packaging process.
2913 For example, suppose you need a consistent set of custom permissions for
2914 a set of groups and users across an entire work project.
2915 It is best to do this in the packages themselves but this is not always
2916 possible.
2917 </para>
2918 <para>
2919 By default, the OpenEmbedded build system uses the <filename>fs-perms.txt</filename>, which
2920 is located in the <filename>meta/files</filename> folder in the
2921 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
2922 If you create your own file permissions setting table, you should place it in your
2923 layer or the distro's layer.
2924 </para>
2925 <para>
2926 You define the <filename>FILESYSTEM_PERMS_TABLES</filename> variable in the
2927 <filename>conf/local.conf</filename> file, which is found in the
2928 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>, to
2929 point to your custom <filename>fs-perms.txt</filename>.
2930 You can specify more than a single file permissions setting table.
2931 The paths you specify to these files must be defined within the
2932 <link linkend='var-BBPATH'><filename>BBPATH</filename></link> variable.
2933 </para>
2934 <para>
2935 For guidance on how to create your own file permissions settings table file,
2936 examine the existing <filename>fs-perms.txt</filename>.
2937 </para>
2938 </glossdef>
2939 </glossentry>
2940
2941 <glossentry id='var-FONT_PACKAGES'><glossterm>FONT_PACKAGES</glossterm>
2942 <glossdef>
2943 <para>
2944 When inheriting the
2945 <link linkend='ref-classes-fontcache'><filename>fontcache</filename></link>
2946 class, this variable identifies packages containing font
2947 files that need to be cached by Fontconfig.
2948 By default, the <filename>fontcache</filename> class assumes
2949 that fonts are in the recipe's main package
2950 (i.e. <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>).
2951 Use this variable if fonts you need are in a package
2952 other than that main package.
2953 </para>
2954 </glossdef>
2955 </glossentry>
2956
2957 <glossentry id='var-FULL_OPTIMIZATION'><glossterm>FULL_OPTIMIZATION</glossterm>
2958 <glossdef>
2959 <para>
2960 The options to pass in
2961 <filename><link linkend='var-TARGET_CFLAGS'>TARGET_CFLAGS</link></filename>
2962 and <filename><link linkend='var-CFLAGS'>CFLAGS</link></filename>
2963 when compiling an optimized system.
2964 This variable defaults to
2965 "-O2 -pipe ${DEBUG_FLAGS}".
2966 </para>
2967 </glossdef>
2968 </glossentry>
2969 </glossdiv>
2970
2971 <glossdiv id='var-glossary-g'><title>G</title>
2972
2973 <glossentry id='var-GLIBC_GENERATE_LOCALES'><glossterm>GLIBC_GENERATE_LOCALES</glossterm>
2974 <glossdef>
2975 <para>
2976 Specifies the list of GLIBC locales to generate should you
2977 not wish generate all LIBC locals, which can be time
2978 consuming.
2979 <note>
2980 If you specifically remove the locale
2981 <filename>en_US.UTF-8</filename>, you must set
2982 <link linkend='var-IMAGE_LINGUAS'><filename>IMAGE_LINGUAS</filename></link>
2983 appropriately.
2984 </note>
2985 You can set <filename>GLIBC_GENERATE_LOCALES</filename>
2986 in your <filename>local.conf</filename> file.
2987 By default, all locales are generated.
2988 <literallayout class='monospaced'>
2989 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
2990 </literallayout>
2991 </para>
2992 </glossdef>
2993 </glossentry>
2994
2995 <glossentry id='var-GROUPADD_PARAM'><glossterm>GROUPADD_PARAM</glossterm>
2996 <glossdef>
2997 <para>
2998 When inheriting the
2999 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
3000 class, this variable
3001 specifies for a package what parameters should be passed
3002 to the <filename>groupadd</filename> command
3003 if you wish to add a group to the system when the package
3004 is installed.
3005 </para>
3006
3007 <para>
3008 Here is an example from the <filename>dbus</filename>
3009 recipe:
3010 <literallayout class='monospaced'>
3011 GROUPADD_PARAM_${PN} = "-r netdev"
3012 </literallayout>
3013 For information on the standard Linux shell command
3014 <filename>groupadd</filename>, see
3015 <ulink url='http://linux.die.net/man/8/groupadd'></ulink>.
3016 </para>
3017 </glossdef>
3018 </glossentry>
3019
3020 <glossentry id='var-GROUPMEMS_PARAM'><glossterm>GROUPMEMS_PARAM</glossterm>
3021 <glossdef>
3022 <para>
3023 When inheriting the
3024 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
3025 class, this variable
3026 specifies for a package what parameters should be passed
3027 to the <filename>groupmems</filename> command
3028 if you wish to modify the members of a group when the
3029 package is installed.
3030 </para>
3031
3032 <para>
3033 For information on the standard Linux shell command
3034 <filename>groupmems</filename>, see
3035 <ulink url='http://linux.die.net/man/8/groupmems'></ulink>.
3036 </para>
3037 </glossdef>
3038 </glossentry>
3039
3040 <glossentry id='var-GRUB_GFXSERIAL'><glossterm>GRUB_GFXSERIAL</glossterm>
3041 <glossdef>
3042 <para>
3043 Configures the GNU GRand Unified Bootloader (GRUB) to have
3044 graphics and serial in the boot menu.
3045 Set this variable to "1" in your
3046 <filename>local.conf</filename> or distribution
3047 configuration file to enable graphics and serial
3048 in the menu.
3049 </para>
3050
3051 <para>
3052 See the
3053 <link linkend='ref-classes-grub-efi'><filename>grub-efi</filename></link>
3054 class for more information on how this variable is used.
3055 </para>
3056 </glossdef>
3057 </glossentry>
3058
3059 <glossentry id='var-GRUB_OPTS'><glossterm>GRUB_OPTS</glossterm>
3060 <glossdef>
3061 <para>
3062 Additional options to add to the GNU GRand Unified
3063 Bootloader (GRUB) configuration.
3064 Use a semi-colon character (<filename>;</filename>) to
3065 separate multiple options.
3066 </para>
3067
3068 <para>
3069 The <filename>GRUB_OPTS</filename> variable is optional.
3070 See the
3071 <link linkend='ref-classes-grub-efi'><filename>grub-efi</filename></link>
3072 class for more information on how this variable is used.
3073 </para>
3074 </glossdef>
3075 </glossentry>
3076
3077 <glossentry id='var-GRUB_TIMEOUT'><glossterm>GRUB_TIMEOUT</glossterm>
3078 <glossdef>
3079 <para>
3080 Specifies the timeout before executing the default
3081 <filename>LABEL</filename> in the GNU GRand Unified
3082 Bootloader (GRUB).
3083 </para>
3084
3085 <para>
3086 The <filename>GRUB_TIMEOUT</filename> variable is optional.
3087 See the
3088 <link linkend='ref-classes-grub-efi'><filename>grub-efi</filename></link>
3089 class for more information on how this variable is used.
3090 </para>
3091 </glossdef>
3092 </glossentry>
3093
3094 <glossentry id='var-GTKIMMODULES_PACKAGES'><glossterm>GTKIMMODULES_PACKAGES</glossterm>
3095 <glossdef>
3096 <para>
3097 When inheriting the
3098 <link linkend='ref-classes-gtk-immodules-cache'><filename>gtk-immodules-cache</filename></link>
3099 class, this variable specifies the packages that contain the
3100 GTK+ input method modules being installed when the modules
3101 are in packages other than the main package.
3102 </para>
3103 </glossdef>
3104 </glossentry>
3105
3106 <glossentry id='var-GUMMIBOOT_CFG'><glossterm>GUMMIBOOT_CFG</glossterm>
3107 <glossdef>
3108 <para>
3109 When
3110 <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link>
3111 is set to "gummiboot", the
3112 <filename>GUMMIBOOT_CFG</filename> variable specifies the
3113 configuration file that should be used.
3114 By default, the
3115 <link linkend='ref-classes-gummiboot'><filename>gummiboot</filename></link>
3116 class sets the <filename>GUMMIBOOT_CFG</filename> as
3117 follows:
3118 <literallayout class='monospaced'>
3119 GUMMIBOOT_CFG ?= "${<link linkend='var-S'>S</link>}/loader.conf"
3120 </literallayout>
3121 </para>
3122
3123 <para>
3124 For information on Gummiboot, see the
3125 <ulink url='http://freedesktop.org/wiki/Software/gummiboot/'>Gummiboot documentation</ulink>.
3126 </para>
3127 </glossdef>
3128 </glossentry>
3129
3130 <glossentry id='var-GUMMIBOOT_ENTRIES'><glossterm>GUMMIBOOT_ENTRIES</glossterm>
3131 <glossdef>
3132 <para>
3133 When
3134 <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link>
3135 is set to "gummiboot", the
3136 <filename>GUMMIBOOT_ENTRIES</filename> variable specifies
3137 a list of entry files
3138 (<filename>*.conf</filename>) to be installed
3139 containing one boot entry per file.
3140 By default, the
3141 <link linkend='ref-classes-gummiboot'><filename>gummiboot</filename></link>
3142 class sets the <filename>GUMMIBOOT_ENTRIES</filename> as
3143 follows:
3144 <literallayout class='monospaced'>
3145 GUMMIBOOT_ENTRIES ?= ""
3146 </literallayout>
3147 </para>
3148
3149 <para>
3150 For information on Gummiboot, see the
3151 <ulink url='http://freedesktop.org/wiki/Software/gummiboot/'>Gummiboot documentation</ulink>.
3152 </para>
3153 </glossdef>
3154 </glossentry>
3155
3156 <glossentry id='var-GUMMIBOOT_TIMEOUT'><glossterm>GUMMIBOOT_TIMEOUT</glossterm>
3157 <glossdef>
3158 <para>
3159 When
3160 <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link>
3161 is set to "gummiboot", the
3162 <filename>GUMMIBOOT_TIMEOUT</filename> variable specifies
3163 the boot menu timeout in seconds.
3164 By default, the
3165 <link linkend='ref-classes-gummiboot'><filename>gummiboot</filename></link>
3166 class sets the <filename>GUMMIBOOT_TIMEOUT</filename> as
3167 follows:
3168 <literallayout class='monospaced'>
3169 GUMMIBOOT_TIMEOUT ?= "10"
3170 </literallayout>
3171 </para>
3172
3173 <para>
3174 For information on Gummiboot, see the
3175 <ulink url='http://freedesktop.org/wiki/Software/gummiboot/'>Gummiboot documentation</ulink>.
3176 </para>
3177 </glossdef>
3178 </glossentry>
3179
3180 </glossdiv>
3181
3182 <glossdiv id='var-glossary-h'><title>H</title>
3183
3184 <glossentry id='var-HOMEPAGE'><glossterm>HOMEPAGE</glossterm>
3185 <glossdef>
3186 <para>Website where more information about the software the recipe is building
3187 can be found.</para>
3188 </glossdef>
3189 </glossentry>
3190
3191 <glossentry id='var-HOST_CC_ARCH'><glossterm>HOST_CC_ARCH</glossterm>
3192 <glossdef>
3193 <para>
3194 Specifies architecture-specific compiler flags that are
3195 passed to the C compiler.
3196 </para>
3197
3198 <para>
3199 Default initialization for <filename>HOST_CC_ARCH</filename>
3200 varies depending on what is being built:
3201 <itemizedlist>
3202 <listitem><para>
3203 <link linkend='var-TARGET_CC_ARCH'><filename>TARGET_CC_ARCH</filename></link>
3204 when building for the target
3205 </para></listitem>
3206 <listitem><para>
3207 <filename>BUILD_CC_ARCH</filename>
3208 when building for the build host (i.e.
3209 <filename>native</filename>)
3210 </para></listitem>
3211 <listitem><para>
3212 <filename>BUILDSDK_CC_ARCH</filename>
3213 when building for an SDK (i.e.
3214 <filename>nativesdk</filename>)
3215 </para></listitem>
3216 </itemizedlist>
3217 </para>
3218 </glossdef>
3219 </glossentry>
3220
3221 <glossentry id='var-HOST_SYS'><glossterm>HOST_SYS</glossterm>
3222 <glossdef>
3223 <para>
3224 Specifies the system, including the architecture and the
3225 operating system, for with the build is occurring
3226 in the context of the current
3227 recipe.
3228 The OpenEmbedded build system automatically sets this
3229 variable.
3230 You do not need to set the variable yourself.
3231 </para>
3232
3233 <para>
3234 Here are two examples:
3235 <itemizedlist>
3236 <listitem><para>Given a native recipe on a 32-bit
3237 x86 machine running Linux, the value is
3238 "i686-linux".
3239 </para></listitem>
3240 <listitem><para>Given a recipe being built for a
3241 little-endian MIPS target running Linux,
3242 the value might be "mipsel-linux".
3243 </para></listitem>
3244 </itemizedlist>
3245 </para>
3246 </glossdef>
3247 </glossentry>
3248
3249 </glossdiv>
3250
3251 <glossdiv id='var-glossary-i'><title>I</title>
3252
3253 <glossentry id='var-ICECC_DISABLED'><glossterm>ICECC_DISABLED</glossterm>
3254 <glossdef>
3255 <para>
3256 Disables or enables the <filename>icecc</filename>
3257 (Icecream) function.
3258 For more information on this function and best practices
3259 for using this variable, see the
3260 "<link linkend='ref-classes-icecc'><filename>icecc.bbclass</filename></link>"
3261 section.
3262 </para>
3263
3264 <para>
3265 Setting this variable to "1" in your
3266 <filename>local.conf</filename> disables the function:
3267 <literallayout class='monospaced'>
3268 ICECC_DISABLED ??= "1"
3269 </literallayout>
3270 To enable the function, set the variable as follows:
3271 <literallayout class='monospaced'>
3272 ICECC_DISABLED = ""
3273 </literallayout>
3274 </para>
3275 </glossdef>
3276 </glossentry>
3277
3278 <glossentry id='var-ICECC_ENV_EXEC'><glossterm>ICECC_ENV_EXEC</glossterm>
3279 <glossdef>
3280 <para>
3281 Points to the <filename>icecc-create-env</filename> script
3282 that you provide.
3283 This variable is used by the
3284 <link linkend='ref-classes-icecc'><filename>icecc</filename></link>
3285 class.
3286 You set this variable in your
3287 <filename>local.conf</filename> file.
3288 </para>
3289
3290 <para>
3291 If you do not point to a script that you provide, the
3292 OpenEmbedded build system uses the default script provided
3293 by the <filename>icecc-create-env.bb</filename> recipe,
3294 which is a modified version and not the one that comes with
3295 <filename>icecc</filename>.
3296 </para>
3297 </glossdef>
3298 </glossentry>
3299
3300 <glossentry id='var-ICECC_PARALLEL_MAKE'><glossterm>ICECC_PARALLEL_MAKE</glossterm>
3301 <glossdef>
3302 <para>
3303 Extra options passed to the <filename>make</filename>
3304 command during the
3305 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
3306 task that specify parallel compilation.
3307 This variable usually takes the form of
3308 <filename>-j 4</filename>, where the number
3309 represents the maximum number of parallel threads
3310 <filename>make</filename> can run.
3311 <note>
3312 The options passed affect builds on all enabled
3313 machines on the network, which are machines running the
3314 <filename>iceccd</filename> daemon.
3315 </note>
3316 </para>
3317
3318 <para>
3319 If your enabled machines support multiple cores,
3320 coming up with the maximum number of parallel threads
3321 that gives you the best performance could take some
3322 experimentation since machine speed, network lag,
3323 available memory, and existing machine loads can all
3324 affect build time.
3325 Consequently, unlike the
3326 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
3327 variable, there is no rule-of-thumb for setting
3328 <filename>ICECC_PARALLEL_MAKE</filename> to achieve
3329 optimal performance.
3330 </para>
3331
3332 <para>
3333 If you do not set <filename>ICECC_PARALLEL_MAKE</filename>,
3334 the build system does not use it (i.e. the system does
3335 not detect and assign the number of cores as is done with
3336 <filename>PARALLEL_MAKE</filename>).
3337 </para>
3338 </glossdef>
3339 </glossentry>
3340
3341 <glossentry id='var-ICECC_PATH'><glossterm>ICECC_PATH</glossterm>
3342 <glossdef>
3343 <para>
3344 The location of the <filename>icecc</filename> binary.
3345 You can set this variable in your
3346 <filename>local.conf</filename> file.
3347 If your <filename>local.conf</filename> file does not define
3348 this variable, the
3349 <link linkend='ref-classes-icecc'><filename>icecc</filename></link>
3350 class attempts to define it by locating
3351 <filename>icecc</filename> using <filename>which</filename>.
3352 </para>
3353 </glossdef>
3354 </glossentry>
3355
3356 <glossentry id='var-ICECC_USER_CLASS_BL'><glossterm>ICECC_USER_CLASS_BL</glossterm>
3357 <glossdef>
3358 <para>
3359 Identifies user classes that you do not want the
3360 Icecream distributed compile support to consider.
3361 This variable is used by the
3362 <link linkend='ref-classes-icecc'><filename>icecc</filename></link>
3363 class.
3364 You set this variable in your
3365 <filename>local.conf</filename> file.
3366 </para>
3367
3368 <para>
3369 When you list classes using this variable, you are
3370 "blacklisting" them from distributed compilation across
3371 remote hosts.
3372 Any classes you list will be distributed and compiled
3373 locally.
3374 </para>
3375 </glossdef>
3376 </glossentry>
3377
3378 <glossentry id='var-ICECC_USER_PACKAGE_BL'><glossterm>ICECC_USER_PACKAGE_BL</glossterm>
3379 <glossdef>
3380 <para>
3381 Identifies user recipes that you do not want the
3382 Icecream distributed compile support to consider.
3383 This variable is used by the
3384 <link linkend='ref-classes-icecc'><filename>icecc</filename></link>
3385 class.
3386 You set this variable in your
3387 <filename>local.conf</filename> file.
3388 </para>
3389
3390 <para>
3391 When you list packages using this variable, you are
3392 "blacklisting" them from distributed compilation across
3393 remote hosts.
3394 Any packages you list will be distributed and compiled
3395 locally.
3396 </para>
3397 </glossdef>
3398 </glossentry>
3399
3400 <glossentry id='var-ICECC_USER_PACKAGE_WL'><glossterm>ICECC_USER_PACKAGE_WL</glossterm>
3401 <glossdef>
3402 <para>
3403 Identifies user recipes that use an empty
3404 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
3405 variable that you want to force remote distributed
3406 compilation on using the Icecream distributed compile
3407 support.
3408 This variable is used by the
3409 <link linkend='ref-classes-icecc'><filename>icecc</filename></link>
3410 class.
3411 You set this variable in your
3412 <filename>local.conf</filename> file.
3413 </para>
3414 </glossdef>
3415 </glossentry>
3416
3417 <glossentry id='var-IMAGE_BASENAME'><glossterm>IMAGE_BASENAME</glossterm>
3418 <glossdef>
3419 <para>
3420 The base name of image output files.
3421 This variable defaults to the recipe name
3422 (<filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>).
3423 </para>
3424 </glossdef>
3425 </glossentry>
3426
3427 <glossentry id='var-IMAGE_BOOT_FILES'><glossterm>IMAGE_BOOT_FILES</glossterm>
3428 <glossdef>
3429 <para>
3430 A space-separated list of files installed into the
3431 boot partition when preparing an image.
3432 By default, the files are installed under the same name as
3433 the source files.
3434 To change the installed name, separate it from the
3435 original name with a semi-colon (;).
3436 Source files need to be located in
3437 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>.
3438 Here are two examples:
3439
3440 <literallayout class="monospaced">
3441 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
3442 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
3443 </literallayout></para>
3444 </glossdef>
3445 </glossentry>
3446
3447 <glossentry id='var-IMAGE_CLASSES'><glossterm>IMAGE_CLASSES</glossterm>
3448 <glossdef>
3449 <para>
3450 A list of classes that all images should inherit.
3451 You typically use this variable to specify the list of
3452 classes that register the different types of images
3453 the OpenEmbedded build system creates.
3454 </para>
3455
3456 <para>
3457 The default value for <filename>IMAGE_CLASSES</filename> is
3458 <filename>image_types</filename>.
3459 You can set this variable in your
3460 <filename>local.conf</filename> or in a distribution
3461 configuration file.
3462 </para>
3463
3464 <para>
3465 For more information, see
3466 <filename>meta/classes/image_types.bbclass</filename> in the
3467 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
3468 </para>
3469 </glossdef>
3470 </glossentry>
3471
3472 <glossentry id='var-IMAGE_CMD'><glossterm>IMAGE_CMD</glossterm>
3473 <glossdef>
3474 <para>
3475 Specifies the command to create the image file for a
3476 specific image type, which corresponds to the value set
3477 set in
3478 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>,
3479 (e.g. <filename>ext3</filename>,
3480 <filename>btrfs</filename>, and so forth).
3481 When setting this variable, you should use
3482 an override for the associated type.
3483 Here is an example:
3484 <literallayout class='monospaced'>
3485 IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} \
3486 --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
3487 ${EXTRA_IMAGECMD}"
3488 </literallayout>
3489 You typically do not need to set this variable unless
3490 you are adding support for a new image type.
3491 For more examples on how to set this variable, see the
3492 <link linkend='ref-classes-image_types'><filename>image_types</filename></link>
3493 class file, which is
3494 <filename>meta/classes/image_types.bbclass</filename>.
3495 </para>
3496 </glossdef>
3497 </glossentry>
3498
3499 <glossentry id='var-IMAGE_DEVICE_TABLES'><glossterm>IMAGE_DEVICE_TABLES</glossterm>
3500 <glossdef>
3501 <para>
3502 Specifies one or more files that contain custom device
3503 tables that are passed to the
3504 <filename>makedevs</filename> command as part of creating
3505 an image.
3506 These files list basic device nodes that should be
3507 created under <filename>/dev</filename> within the image.
3508 If <filename>IMAGE_DEVICE_TABLES</filename> is not set,
3509 <filename>files/device_table-minimal.txt</filename> is
3510 used, which is located by
3511 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>.
3512 For details on how you should write device table files,
3513 see <filename>meta/files/device_table-minimal.txt</filename>
3514 as an example.
3515 </para>
3516 </glossdef>
3517 </glossentry>
3518
3519 <glossentry id='var-IMAGE_FEATURES'><glossterm>IMAGE_FEATURES</glossterm>
3520 <glossdef>
3521 <para>
3522 The primary list of features to include in an image.
3523 Typically, you configure this variable in an image recipe.
3524 Although you can use this variable from your
3525 <filename>local.conf</filename> file, which is found in the
3526 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
3527 best practices dictate that you do not.
3528 <note>
3529 To enable extra features from outside the image recipe,
3530 use the
3531 <filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename> variable.
3532 </note>
3533 For a list of image features that ships with the Yocto
3534 Project, see the
3535 "<link linkend="ref-features-image">Image Features</link>"
3536 section.
3537 </para>
3538
3539 <para>
3540 For an example that shows how to customize your image by
3541 using this variable, see the
3542 "<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>"
3543 section in the Yocto Project Development Manual.
3544 </para>
3545 </glossdef>
3546 </glossentry>
3547
3548 <glossentry id='var-IMAGE_FSTYPES'><glossterm>IMAGE_FSTYPES</glossterm>
3549 <glossdef>
3550 <para>
3551 Specifies the formats the OpenEmbedded build system uses
3552 during the build when creating the root filesystem.
3553 For example, setting <filename>IMAGE_FSTYPES</filename>
3554 as follows causes the build system to create root
3555 filesystems using two formats: <filename>.ext3</filename>
3556 and <filename>.tar.bz2</filename>:
3557 <literallayout class='monospaced'>
3558 IMAGE_FSTYPES = "ext3 tar.bz2"
3559 </literallayout>
3560 For the complete list of supported image formats from which
3561 you can choose, see
3562 <link linkend='var-IMAGE_TYPES'><filename>IMAGE_TYPES</filename></link>.
3563 </para>
3564
3565 <note>
3566 If you add "live" to <filename>IMAGE_FSTYPES</filename>
3567 inside an image recipe, be sure that you do so prior to the
3568 "inherit image" line of the recipe or the live image will
3569 not build.
3570 </note>
3571
3572 <note>
3573 Due to the way this variable is processed, it is not
3574 possible to update its contents using
3575 <filename>_append</filename> or
3576 <filename>_prepend</filename>. To add one or more
3577 additional options to this variable the
3578 <filename>+=</filename> operator must be used.
3579 </note>
3580 </glossdef>
3581 </glossentry>
3582
3583 <glossentry id='var-IMAGE_INSTALL'><glossterm>IMAGE_INSTALL</glossterm>
3584 <glossdef>
3585 <para>
3586 Specifies the packages to install into an image.
3587 The <filename>IMAGE_INSTALL</filename> variable is a
3588 mechanism for an image recipe and you should use it
3589 with care to avoid ordering issues.
3590 <note>
3591 When working with an
3592 <link linkend='images-core-image-minimal-initramfs'><filename>core-image-minimal-initramfs</filename></link>
3593 image, do not use the <filename>IMAGE_INSTALL</filename>
3594 variable to specify packages for installation.
3595 Instead, use the
3596 <link linkend='var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></link>
3597 variable, which allows the initial RAM disk (initramfs)
3598 recipe to use a fixed set of packages and not be
3599 affected by <filename>IMAGE_INSTALL</filename>.
3600 </note>
3601 </para>
3602
3603 <para>
3604 Image recipes set <filename>IMAGE_INSTALL</filename>
3605 to specify the packages to install into an image through
3606 <filename>image.bbclass</filename>.
3607 Additionally, "helper" classes exist, such as
3608 <filename>core-image.bbclass</filename>, that can take
3609 <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>
3610 lists and turn these into auto-generated entries in
3611 <filename>IMAGE_INSTALL</filename> in addition to its
3612 default contents.
3613 </para>
3614
3615 <para>
3616 Using <filename>IMAGE_INSTALL</filename> with the
3617 <filename>+=</filename> operator from the
3618 <filename>/conf/local.conf</filename> file or from within
3619 an image recipe is not recommended as it can cause ordering
3620 issues.
3621 Since <filename>core-image.bbclass</filename> sets
3622 <filename>IMAGE_INSTALL</filename> to a default value using
3623 the <filename>?=</filename> operator, using a
3624 <filename>+=</filename> operation against
3625 <filename>IMAGE_INSTALL</filename> will result in
3626 unexpected behavior when used in
3627 <filename>conf/local.conf</filename>.
3628 Furthermore, the same operation from within an image
3629 recipe may or may not succeed depending on the specific
3630 situation.
3631 In both these cases, the behavior is contrary to how most
3632 users expect the <filename>+=</filename> operator to work.
3633 </para>
3634
3635 <para>
3636 When you use this variable, it is best to use it as follows:
3637 <literallayout class='monospaced'>
3638 IMAGE_INSTALL_append = " <replaceable>package-name</replaceable>"
3639 </literallayout>
3640 Be sure to include the space between the quotation character
3641 and the start of the package name or names.
3642 </para>
3643 </glossdef>
3644 </glossentry>
3645
3646 <glossentry id='var-IMAGE_LINGUAS'><glossterm>IMAGE_LINGUAS</glossterm>
3647 <glossdef>
3648 <para>
3649 Specifies the list of locales to install into the image
3650 during the root filesystem construction process.
3651 The OpenEmbedded build system automatically splits locale
3652 files, which are used for localization, into separate
3653 packages.
3654 Setting the <filename>IMAGE_LINGUAS</filename> variable
3655 ensures that any locale packages that correspond to packages
3656 already selected for installation into the image are also
3657 installed.
3658 Here is an example:
3659 <literallayout class='monospaced'>
3660 IMAGE_LINGUAS = "pt-br de-de"
3661 </literallayout>
3662 In this example, the build system ensures any Brazilian
3663 Portuguese and German locale files that correspond to
3664 packages in the image are installed (i.e.
3665 <filename>*-locale-pt-br</filename>
3666 and <filename>*-locale-de-de</filename> as well as
3667 <filename>*-locale-pt</filename>
3668 and <filename>*-locale-de</filename>, since some software
3669 packages only provide locale files by language and not by
3670 country-specific language).
3671 </para>
3672
3673 <para>
3674 See the
3675 <link linkend='var-GLIBC_GENERATE_LOCALES'><filename>GLIBC_GENERATE_LOCALES</filename></link>
3676 variable for information on generating GLIBC locales.
3677 </para>
3678 </glossdef>
3679 </glossentry>
3680
3681 <glossentry id='var-IMAGE_MANIFEST'><glossterm>IMAGE_MANIFEST</glossterm>
3682 <glossdef>
3683 <para>
3684 The manifest file for the image.
3685 This file lists all the installed packages that make up
3686 the image.
3687 The file contains package information on a line-per-package
3688 basis as follows:
3689 <literallayout class='monospaced'>
3690 <replaceable>packagename</replaceable> <replaceable>packagearch</replaceable> <replaceable>version</replaceable>
3691 </literallayout>
3692 </para>
3693
3694 <para>
3695 The
3696 <link linkend='ref-classes-image'><filename>image</filename></link>
3697 class defines the manifest file as follows:
3698 <literallayout class='monospaced'>
3699 IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest"
3700 </literallayout>
3701 The location is derived using the
3702 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
3703 and
3704 <link linkend='var-IMAGE_NAME'><filename>IMAGE_NAME</filename></link>
3705 variables.
3706 You can find information on how the image
3707 is created in the
3708 "<link linkend='image-generation-dev-environment'>Image Generation</link>"
3709 section.
3710 </para>
3711 </glossdef>
3712 </glossentry>
3713
3714 <glossentry id='var-IMAGE_NAME'><glossterm>IMAGE_NAME</glossterm>
3715 <glossdef>
3716 <para>
3717 The name of the output image files minus the extension.
3718 This variable is derived using the
3719 <link linkend='var-IMAGE_BASENAME'><filename>IMAGE_BASENAME</filename></link>,
3720 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
3721 and
3722 <link linkend='var-DATETIME'><filename>DATETIME</filename></link>
3723 variables:
3724 <literallayout class='monospaced'>
3725 IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
3726 </literallayout>
3727 </para>
3728 </glossdef>
3729 </glossentry>
3730
3731 <glossentry id='var-IMAGE_OVERHEAD_FACTOR'><glossterm>IMAGE_OVERHEAD_FACTOR</glossterm>
3732 <glossdef>
3733 <para>
3734 Defines a multiplier that the build system applies to the initial image
3735 size for cases when the multiplier times the returned disk usage value
3736 for the image is greater than the sum of
3737 <filename><link linkend='var-IMAGE_ROOTFS_SIZE'>IMAGE_ROOTFS_SIZE</link></filename>
3738 and
3739 <filename><link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'>IMAGE_ROOTFS_EXTRA_SPACE</link></filename>.
3740 The result of the multiplier applied to the initial image size creates
3741 free disk space in the image as overhead.
3742 By default, the build process uses a multiplier of 1.3 for this variable.
3743 This default value results in 30% free disk space added to the image when this
3744 method is used to determine the final generated image size.
3745 You should be aware that post install scripts and the package management
3746 system uses disk space inside this overhead area.
3747 Consequently, the multiplier does not produce an image with
3748 all the theoretical free disk space.
3749 See <filename><link linkend='var-IMAGE_ROOTFS_SIZE'>IMAGE_ROOTFS_SIZE</link></filename>
3750 for information on how the build system determines the overall image size.
3751 </para>
3752
3753 <para>
3754 The default 30% free disk space typically gives the image enough room to boot
3755 and allows for basic post installs while still leaving a small amount of
3756 free disk space.
3757 If 30% free space is inadequate, you can increase the default value.
3758 For example, the following setting gives you 50% free space added to the image:
3759 <literallayout class='monospaced'>
3760 IMAGE_OVERHEAD_FACTOR = "1.5"
3761 </literallayout>
3762 </para>
3763
3764 <para>
3765 Alternatively, you can ensure a specific amount of free disk space is added
3766 to the image by using the
3767 <filename><link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'>IMAGE_ROOTFS_EXTRA_SPACE</link></filename>
3768 variable.
3769 </para>
3770 </glossdef>
3771 </glossentry>
3772
3773 <glossentry id='var-IMAGE_PKGTYPE'><glossterm>IMAGE_PKGTYPE</glossterm>
3774 <glossdef>
3775 <para>
3776 Defines the package type (DEB, RPM, IPK, or TAR) used
3777 by the OpenEmbedded build system.
3778 The variable is defined appropriately by the
3779 <link linkend='ref-classes-package_deb'><filename>package_deb</filename></link>,
3780 <link linkend='ref-classes-package_rpm'><filename>package_rpm</filename></link>,
3781 <link linkend='ref-classes-package_ipk'><filename>package_ipk</filename></link>,
3782 or
3783 <link linkend='ref-classes-package_tar'><filename>package_tar</filename></link>
3784 class.
3785 </para>
3786
3787 <para>
3788 The
3789 <link linkend='ref-classes-populate-sdk-*'><filename>package_sdk_base</filename></link>
3790 and
3791 <link linkend='ref-classes-image'><filename>image</filename></link>
3792 classes use the <filename>IMAGE_PKGTYPE</filename> for
3793 packaging up images and SDKs.
3794 </para>
3795
3796 <para>
3797 You should not set the <filename>IMAGE_PKGTYPE</filename>
3798 manually.
3799 Rather, the variable is set indirectly through the
3800 appropriate
3801 <link linkend='ref-classes-package'><filename>package_*</filename></link>
3802 class using the
3803 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
3804 variable.
3805 The OpenEmbedded build system uses the first package type
3806 (e.g. DEB, RPM, or IPK) that appears with the variable
3807 <note>
3808 Files using the <filename>.tar</filename> format are
3809 never used as a substitute packaging format for DEB,
3810 RPM, and IPK formatted files for your image or SDK.
3811 </note>
3812 </para>
3813 </glossdef>
3814 </glossentry>
3815
3816 <glossentry id='var-IMAGE_POSTPROCESS_COMMAND'><glossterm>IMAGE_POSTPROCESS_COMMAND</glossterm>
3817 <glossdef>
3818 <para>
3819 Added by classes to run post processing commands once the
3820 OpenEmbedded build system has created the image.
3821 You can specify shell commands separated by semicolons:
3822 <literallayout class='monospaced'>
3823 IMAGE_POSTPROCESS_COMMAND += "<replaceable>shell_command</replaceable>; ... "
3824 </literallayout>
3825 If you need to pass the path to the root filesystem within
3826 the command, you can use
3827 <filename>${IMAGE_ROOTFS}</filename>, which points to
3828 the root filesystem image.
3829 </para>
3830 </glossdef>
3831 </glossentry>
3832
3833 <glossentry id='var-IMAGE_ROOTFS'><glossterm>IMAGE_ROOTFS</glossterm>
3834 <glossdef>
3835 <para>
3836 The location of the root filesystem while it is under
3837 construction (i.e. during the
3838 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
3839 task).
3840 This variable is not configurable.
3841 Do not change it.
3842 </para>
3843 </glossdef>
3844 </glossentry>
3845
3846 <glossentry id='var-IMAGE_ROOTFS_ALIGNMENT'><glossterm>IMAGE_ROOTFS_ALIGNMENT</glossterm>
3847 <glossdef>
3848 <para>
3849 Specifies the alignment for the output image file in
3850 Kbytes.
3851 If the size of the image is not a multiple of
3852 this value, then the size is rounded up to the nearest
3853 multiple of the value.
3854 The default value is "1".
3855 See
3856 <link linkend='var-IMAGE_ROOTFS_SIZE'><filename>IMAGE_ROOTFS_SIZE</filename></link>
3857 for additional information.
3858 </para>
3859 </glossdef>
3860 </glossentry>
3861
3862 <glossentry id='var-IMAGE_ROOTFS_EXTRA_SPACE'><glossterm>IMAGE_ROOTFS_EXTRA_SPACE</glossterm>
3863 <glossdef>
3864 <para>
3865 Defines additional free disk space created in the image in Kbytes.
3866 By default, this variable is set to "0".
3867 This free disk space is added to the image after the build system determines
3868 the image size as described in
3869 <filename><link linkend='var-IMAGE_ROOTFS_SIZE'>IMAGE_ROOTFS_SIZE</link></filename>.
3870 </para>
3871
3872 <para>
3873 This variable is particularly useful when you want to ensure that a
3874 specific amount of free disk space is available on a device after an image
3875 is installed and running.
3876 For example, to be sure 5 Gbytes of free disk space is available, set the
3877 variable as follows:
3878 <literallayout class='monospaced'>
3879 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
3880 </literallayout>
3881 </para>
3882
3883 <para>
3884 For example, the Yocto Project Build Appliance specifically requests 40 Gbytes
3885 of extra space with the line:
3886 <literallayout class='monospaced'>
3887 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
3888 </literallayout>
3889 </para>
3890 </glossdef>
3891 </glossentry>
3892
3893 <glossentry id='var-IMAGE_ROOTFS_SIZE'><glossterm>IMAGE_ROOTFS_SIZE</glossterm>
3894 <glossdef>
3895 <para>
3896 Defines the size in Kbytes for the generated image.
3897 The OpenEmbedded build system determines the final size for the generated
3898 image using an algorithm that takes into account the initial disk space used
3899 for the generated image, a requested size for the image, and requested
3900 additional free disk space to be added to the image.
3901 Programatically, the build system determines the final size of the
3902 generated image as follows:
3903 <literallayout class='monospaced'>
3904 if (image-du * overhead) &lt; rootfs-size:
3905 internal-rootfs-size = rootfs-size + xspace
3906 else:
3907 internal-rootfs-size = (image-du * overhead) + xspace
3908
3909 where:
3910
3911 image-du = Returned value of the du command on
3912 the image.
3913
3914 overhead = IMAGE_OVERHEAD_FACTOR
3915
3916 rootfs-size = IMAGE_ROOTFS_SIZE
3917
3918 internal-rootfs-size = Initial root filesystem
3919 size before any modifications.
3920
3921 xspace = IMAGE_ROOTFS_EXTRA_SPACE
3922 </literallayout>
3923 See the <link linkend='var-IMAGE_OVERHEAD_FACTOR'><filename>IMAGE_OVERHEAD_FACTOR</filename></link>
3924 and <link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'><filename>IMAGE_ROOTFS_EXTRA_SPACE</filename></link>
3925 variables for related information.
3926<!-- In the above example, <filename>overhead</filename> is defined by the
3927 <filename><link linkend='var-IMAGE_OVERHEAD_FACTOR'>IMAGE_OVERHEAD_FACTOR</link></filename>
3928 variable, <filename>xspace</filename> is defined by the
3929 <filename><link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'>IMAGE_ROOTFS_EXTRA_SPACE</link></filename>
3930 variable, and <filename>du</filename> is the results of the disk usage command
3931 on the initially generated image. -->
3932 </para>
3933 </glossdef>
3934 </glossentry>
3935
3936 <glossentry id='var-IMAGE_TYPEDEP'><glossterm>IMAGE_TYPEDEP</glossterm>
3937 <glossdef>
3938 <para>
3939 Specifies a dependency from one image type on another.
3940 Here is an example from the
3941 <link linkend='ref-classes-image-live'><filename>image-live</filename></link>
3942 class:
3943 <literallayout class='monospaced'>
3944 IMAGE_TYPEDEP_live = "ext3"
3945 </literallayout>
3946 In the previous example, the variable ensures that when
3947 "live" is listed with the
3948 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
3949 variable, the OpenEmbedded build system produces an
3950 <filename>ext3</filename> image first since one of the
3951 components of the live
3952 image is an <filename>ext3</filename>
3953 formatted partition containing the root
3954 filesystem.
3955 </para>
3956 </glossdef>
3957 </glossentry>
3958
3959 <glossentry id='var-IMAGE_TYPES'><glossterm>IMAGE_TYPES</glossterm>
3960 <glossdef>
3961 <para>
3962 Specifies the complete list of supported image types
3963 by default:
3964 <literallayout class='monospaced'>
3965 jffs2
3966 jffs2.sum
3967 cramfs
3968 ext2
3969 ext2.gz
3970 ext2.bz2
3971 ext3
3972 ext3.gz
3973 ext2.lzma
3974 btrfs
3975 live
3976 squashfs
3977 squashfs-xz
3978 ubi
3979 ubifs
3980 tar
3981 tar.gz
3982 tar.bz2
3983 tar.xz
3984 cpio
3985 cpio.gz
3986 cpio.xz
3987 cpio.lzma
3988 vmdk
3989 elf
3990 </literallayout>
3991 For more information about these types of images, see
3992 <filename>meta/classes/image_types*.bbclass</filename>
3993 in the
3994 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
3995 </para>
3996 </glossdef>
3997 </glossentry>
3998
3999 <glossentry id='var-INC_PR'><glossterm>INC_PR</glossterm>
4000 <glossdef>
4001 <para>Helps define the recipe revision for recipes that share
4002 a common <filename>include</filename> file.
4003 You can think of this variable as part of the recipe revision
4004 as set from within an include file.</para>
4005 <para>Suppose, for example, you have a set of recipes that
4006 are used across several projects.
4007 And, within each of those recipes the revision
4008 (its <link linkend='var-PR'><filename>PR</filename></link>
4009 value) is set accordingly.
4010 In this case, when the revision of those recipes changes,
4011 the burden is on you to find all those recipes and
4012 be sure that they get changed to reflect the updated
4013 version of the recipe.
4014 In this scenario, it can get complicated when recipes
4015 that are used in many places and provide common functionality
4016 are upgraded to a new revision.</para>
4017 <para>A more efficient way of dealing with this situation is
4018 to set the <filename>INC_PR</filename> variable inside
4019 the <filename>include</filename> files that the recipes
4020 share and then expand the <filename>INC_PR</filename>
4021 variable within the recipes to help
4022 define the recipe revision.
4023 </para>
4024 <para>
4025 The following provides an example that shows how to use
4026 the <filename>INC_PR</filename> variable
4027 given a common <filename>include</filename> file that
4028 defines the variable.
4029 Once the variable is defined in the
4030 <filename>include</filename> file, you can use the
4031 variable to set the <filename>PR</filename> values in
4032 each recipe.
4033 You will notice that when you set a recipe's
4034 <filename>PR</filename> you can provide more granular
4035 revisioning by appending values to the
4036 <filename>INC_PR</filename> variable:
4037 <literallayout class='monospaced'>
4038recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
4039recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
4040recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
4041recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
4042 </literallayout>
4043 The first line of the example establishes the baseline
4044 revision to be used for all recipes that use the
4045 <filename>include</filename> file.
4046 The remaining lines in the example are from individual
4047 recipes and show how the <filename>PR</filename> value
4048 is set.</para>
4049 </glossdef>
4050 </glossentry>
4051
4052 <glossentry id='var-INCOMPATIBLE_LICENSE'><glossterm>INCOMPATIBLE_LICENSE</glossterm>
4053 <glossdef>
4054 <para>
4055 Specifies a space-separated list of license names
4056 (as they would appear in
4057 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>)
4058 that should be excluded from the build.
4059 Recipes that provide no alternatives to listed incompatible
4060 licenses are not built.
4061 Packages that are individually licensed with the specified
4062 incompatible licenses will be deleted.
4063 </para>
4064
4065 <note>
4066 This functionality is only regularly tested using
4067 the following setting:
4068 <literallayout class='monospaced'>
4069 INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
4070 </literallayout>
4071 Although you can use other settings, you might be required
4072 to remove dependencies on or provide alternatives to
4073 components that are required to produce a functional system
4074 image.
4075 </note>
4076 </glossdef>
4077 </glossentry>
4078
4079 <glossentry id='var-INHIBIT_DEFAULT_DEPS'><glossterm>INHIBIT_DEFAULT_DEPS</glossterm>
4080 <glossdef>
4081 <para>
4082 Prevents the default dependencies, namely the C compiler
4083 and standard C library (libc), from being added to
4084 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>.
4085 This variable is usually used within recipes that do not
4086 require any compilation using the C compiler.
4087 </para>
4088
4089 <para>
4090 Set the variable to "1" to prevent the default dependencies
4091 from being added.
4092 </para>
4093 </glossdef>
4094 </glossentry>
4095
4096 <glossentry id='var-INHIBIT_PACKAGE_DEBUG_SPLIT'><glossterm>INHIBIT_PACKAGE_DEBUG_SPLIT</glossterm>
4097 <glossdef>
4098
4099 <para>
4100 Prevents the OpenEmbedded build system from splitting
4101 out debug information during packaging.
4102 By default, the build system splits out debugging
4103 information during the
4104 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
4105 task.
4106 For more information on how debug information is split out,
4107 see the
4108 <link linkend='var-PACKAGE_DEBUG_SPLIT_STYLE'><filename>PACKAGE_DEBUG_SPLIT_STYLE</filename></link>
4109 variable.
4110 </para>
4111
4112 <para>
4113 To prevent the build system from splitting out
4114 debug information during packaging, set the
4115 <filename>INHIBIT_PACKAGE_DEBUG_SPLIT</filename> variable
4116 as follows:
4117 <literallayout class='monospaced'>
4118 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
4119 </literallayout>
4120 </para>
4121 </glossdef>
4122 </glossentry>
4123
4124 <glossentry id='var-INHIBIT_PACKAGE_STRIP'><glossterm>INHIBIT_PACKAGE_STRIP</glossterm>
4125 <glossdef>
4126 <para>
4127 If set to "1", causes the build to not strip binaries in resulting packages.
4128 </para>
4129 </glossdef>
4130 </glossentry>
4131
4132 <glossentry id='var-INHERIT'><glossterm>INHERIT</glossterm>
4133 <glossdef>
4134 <para>
4135 Causes the named class to be inherited at
4136 this point during parsing.
4137 The variable is only valid in configuration files.
4138 </para>
4139 </glossdef>
4140 </glossentry>
4141
4142 <glossentry id='var-INHERIT_DISTRO'><glossterm>INHERIT_DISTRO</glossterm>
4143 <glossdef>
4144 <para>
4145 Lists classes that will be inherited at the
4146 distribution level.
4147 It is unlikely that you want to edit this variable.
4148 </para>
4149
4150 <para>
4151 The default value of the variable is set as follows in the
4152 <filename>meta/conf/distro/defaultsetup.conf</filename>
4153 file:
4154 <literallayout class='monospaced'>
4155 INHERIT_DISTRO ?= "debian devshell sstate license"
4156 </literallayout>
4157 </para>
4158 </glossdef>
4159 </glossentry>
4160
4161 <glossentry id='var-INITRAMFS_FSTYPES'><glossterm>INITRAMFS_FSTYPES</glossterm>
4162 <glossdef>
4163 <para>
4164 Defines the format for the output image of an initial
4165 RAM disk (initramfs), which is used during boot.
4166 Supported formats are the same as those supported by the
4167 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
4168 variable.
4169 </para>
4170 </glossdef>
4171 </glossentry>
4172
4173 <glossentry id='var-INITRAMFS_IMAGE'><glossterm>INITRAMFS_IMAGE</glossterm>
4174 <glossdef>
4175 <para>
4176 Causes the OpenEmbedded build system to build an additional
4177 recipe as a dependency to your root filesystem recipe
4178 (e.g. <filename>core-image-sato</filename>).
4179 The additional recipe is used to create an initial RAM disk
4180 (initramfs) that might be needed during the initial boot of
4181 the target system to accomplish such things as loading
4182 kernel modules prior to mounting the root file system.
4183 </para>
4184
4185 <para>
4186 When you set the variable, specify the name of the
4187 initramfs you want created.
4188 The following example, which is set in the
4189 <filename>local.conf</filename> configuration file, causes
4190 a separate recipe to be created that results in an
4191 initramfs image named
4192 <filename>core-image-sato-initramfs.bb</filename> to be
4193 created:
4194 <literallayout class='monospaced'>
4195 INITRAMFS_IMAGE = "core-image-minimal-initramfs"
4196 </literallayout>
4197 By default, the
4198 <link linkend='ref-classes-kernel'><filename>kernel</filename></link>
4199 class sets this variable to a null string as follows:
4200 <literallayout class='monospaced'>
4201 INITRAMFS_IMAGE = ""
4202 </literallayout>
4203 </para>
4204
4205 <para>
4206 See the
4207 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-yocto/conf/local.conf.sample.extended'><filename>local.conf.sample.extended</filename></ulink>
4208 file for additional information.
4209 You can also reference the
4210 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/kernel.bbclass'><filename>kernel.bbclass</filename></ulink>
4211 file to see how the variable is used.
4212 </para>
4213 </glossdef>
4214 </glossentry>
4215
4216 <glossentry id='var-INITRAMFS_IMAGE_BUNDLE'><glossterm>INITRAMFS_IMAGE_BUNDLE</glossterm>
4217 <glossdef>
4218 <para>
4219 Controls whether or not the image recipe specified by
4220 <link linkend='var-INITRAMFS_IMAGE'><filename>INITRAMFS_IMAGE</filename></link>
4221 is run through an extra pass during kernel compilation
4222 in order to build a single binary that contains both the
4223 kernel image and the initial RAM disk (initramfs).
4224 Using an extra compilation pass ensures that when a kernel
4225 attempts to use an initramfs, it does not encounter
4226 circular dependencies should the initramfs include kernel
4227 modules.
4228 </para>
4229
4230 <para>
4231 The combined binary is deposited into the
4232 <filename>tmp/deploy</filename> directory, which is part
4233 of the
4234 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
4235 </para>
4236
4237 <para>
4238 Setting the variable to "1" in a configuration file causes
4239 the OpenEmbedded build system to make the extra pass during
4240 kernel compilation:
4241 <literallayout class='monospaced'>
4242 INITRAMFS_IMAGE_BUNDLE = "1"
4243 </literallayout>
4244 By default, the
4245 <link linkend='ref-classes-kernel'><filename>kernel</filename></link>
4246 class sets this variable to a null string as follows:
4247 <literallayout class='monospaced'>
4248 INITRAMFS_IMAGE_BUNDLE = ""
4249 </literallayout>
4250 <note>
4251 You must set the
4252 <filename>INITRAMFS_IMAGE_BUNDLE</filename> variable in
4253 a configuration file.
4254 You cannot set the variable in a recipe file.
4255 </note>
4256 See the
4257 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-yocto/conf/local.conf.sample.extended'><filename>local.conf.sample.extended</filename></ulink>
4258 file for additional information.
4259 </para>
4260 </glossdef>
4261 </glossentry>
4262
4263 <glossentry id='var-INITRD'><glossterm>INITRD</glossterm>
4264 <glossdef>
4265 <para>
4266 Indicates list of filesystem images to concatenate and use
4267 as an initial RAM disk (<filename>initrd</filename>).
4268 </para>
4269
4270 <para>
4271 The <filename>INITRD</filename> variable is an optional
4272 variable used with the
4273 <link linkend='ref-classes-bootimg'><filename>bootimg</filename></link>
4274 class.
4275 </para>
4276 </glossdef>
4277 </glossentry>
4278
4279 <glossentry id='var-INITRD_IMAGE'><glossterm>INITRD_IMAGE</glossterm>
4280 <glossdef>
4281 <para>
4282 When building a "live" bootable image (i.e. when
4283 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
4284 contains "live"), <filename>INITRD_IMAGE</filename>
4285 specifies the image recipe that should be built
4286 to provide the initial RAM disk image.
4287 The default value is "core-image-minimal-initramfs".
4288 </para>
4289
4290 <para>
4291 See the
4292 <link linkend='ref-classes-image-live'><filename>image-live</filename></link>
4293 class for more information.
4294 </para>
4295 </glossdef>
4296 </glossentry>
4297
4298 <glossentry id='var-INITSCRIPT_NAME'><glossterm>INITSCRIPT_NAME</glossterm>
4299 <glossdef>
4300 <para>
4301 The filename of the initialization script as installed to
4302 <filename>${sysconfdir}/init.d</filename>.
4303 </para>
4304 <para>
4305 This variable is used in recipes when using <filename>update-rc.d.bbclass</filename>.
4306 The variable is mandatory.
4307 </para>
4308 </glossdef>
4309 </glossentry>
4310
4311 <glossentry id='var-INITSCRIPT_PACKAGES'><glossterm>INITSCRIPT_PACKAGES</glossterm>
4312 <glossdef>
4313 <para>
4314 A list of the packages that contain initscripts.
4315 If multiple packages are specified, you need to append the package name
4316 to the other <filename>INITSCRIPT_*</filename> as an override.</para>
4317 <para>
4318 This variable is used in recipes when using <filename>update-rc.d.bbclass</filename>.
4319 The variable is optional and defaults to the
4320 <link linkend='var-PN'><filename>PN</filename></link> variable.
4321 </para>
4322 </glossdef>
4323 </glossentry>
4324
4325 <glossentry id='var-INITSCRIPT_PARAMS'><glossterm>INITSCRIPT_PARAMS</glossterm>
4326 <glossdef>
4327 <para>
4328 Specifies the options to pass to <filename>update-rc.d</filename>.
4329 Here is an example:
4330 <literallayout class='monospaced'>
4331 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
4332 </literallayout>
4333 In this example, the script has a runlevel of 99,
4334 starts the script in initlevels 2 and 5, and
4335 stops the script in levels 0, 1 and 6.
4336 </para>
4337 <para>
4338 The variable's default value is "defaults", which is
4339 set in the
4340 <link linkend='ref-classes-update-rc.d'><filename>update-rc.d</filename></link>
4341 class.
4342 </para>
4343 <para>
4344 The value in
4345 <filename>INITSCRIPT_PARAMS</filename> is passed through
4346 to the <filename>update-rc.d</filename> command.
4347 For more information on valid parameters, please see the
4348 <filename>update-rc.d</filename> manual page at
4349 <ulink url='http://www.tin.org/bin/man.cgi?section=8&amp;topic=update-rc.d'></ulink>.
4350 </para>
4351 </glossdef>
4352 </glossentry>
4353
4354 <glossentry id='var-INSANE_SKIP'><glossterm>INSANE_SKIP</glossterm>
4355 <glossdef>
4356 <para>
4357 Specifies the QA checks to skip for a specific package
4358 within a recipe.
4359 For example, to skip the check for symbolic link
4360 <filename>.so</filename> files in the main package of a
4361 recipe, add the following to the recipe.
4362 The package name override must be used, which in this
4363 example is <filename>${PN}</filename>:
4364 <literallayout class='monospaced'>
4365 INSANE_SKIP_${PN} += "dev-so"
4366 </literallayout>
4367 </para>
4368 <para>
4369 See the "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
4370 section for a list of the valid QA checks you can
4371 specify using this variable.
4372 </para>
4373 </glossdef>
4374 </glossentry>
4375
4376 <glossentry id='var-IPK_FEED_URIS'><glossterm>IPK_FEED_URIS</glossterm>
4377 <glossdef>
4378 <para>
4379 When the IPK backend is in use and package management
4380 is enabled on the target, you can use this variable to
4381 set up <filename>opkg</filename> in the target image
4382 to point to package feeds on a nominated server.
4383 Once the feed is established, you can perform
4384 installations or upgrades using the package manager
4385 at runtime.
4386 </para>
4387 </glossdef>
4388 </glossentry>
4389
4390<!--
4391 <glossentry id='var-INTERCEPT_DIR'><glossterm>INTERCEPT_DIR</glossterm>
4392 <glossdef>
4393 <para>
4394 An environment variable that defines the directory where
4395 post installation hooks are installed for the
4396 post install environment.
4397 This variable is fixed as follows:
4398 <literallayout class='monospaced'>
4399 ${WORKDIR}/intercept_scripts
4400 </literallayout>
4401 </para>
4402
4403 <para>
4404 After installation of a target's root filesystem,
4405 post installation scripts, which are essentially bash scripts,
4406 are all executed just a single time.
4407 Limiting execution of these scripts minimizes installation
4408 time that would be lengthened due to certain packages
4409 triggering redundant operations.
4410 For example, consider the installation of font packages
4411 as a common example.
4412 Without limiting the execution of post installation scripts,
4413 all font directories would be rescanned to create the
4414 cache after each individual font package was installed.
4415 </para>
4416
4417 <para>
4418 Do not edit the <filename>INTERCEPT_DIR</filename>
4419 variable.
4420 </para>
4421 </glossdef>
4422 </glossentry>
4423-->
4424
4425 </glossdiv>
4426
4427<!-- <glossdiv id='var-glossary-j'><title>J</title>-->
4428<!-- </glossdiv>-->
4429
4430 <glossdiv id='var-glossary-k'><title>K</title>
4431
4432 <glossentry id='var-KARCH'><glossterm>KARCH</glossterm>
4433 <glossdef>
4434 <para>
4435 Defines the kernel architecture used when assembling
4436 the configuration.
4437 Architectures supported for this release are:
4438 <literallayout class='monospaced'>
4439 powerpc
4440 i386
4441 x86_64
4442 arm
4443 qemu
4444 mips
4445 </literallayout>
4446 </para>
4447
4448 <para>
4449 You define the <filename>KARCH</filename> variable in the
4450 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#bsp-descriptions'>BSP Descriptions</ulink>.
4451 </para>
4452 </glossdef>
4453 </glossentry>
4454
4455 <glossentry id='var-KBRANCH'><glossterm>KBRANCH</glossterm>
4456 <glossdef>
4457 <para>
4458 A regular expression used by the build process to explicitly
4459 identify the kernel branch that is validated, patched
4460 and configured during a build.
4461 The <filename>KBRANCH</filename> variable is optional.
4462 You can use it to trigger checks to ensure the exact kernel
4463 branch you want is being used by the build process.
4464 </para>
4465
4466 <para>
4467 Values for this variable are set in the kernel's recipe
4468 file and the kernel's append file.
4469 For example, if you are using the Yocto Project kernel that
4470 is based on the Linux 3.10 kernel, the kernel recipe file
4471 is the
4472 <filename>meta/recipes-kernel/linux/linux-yocto_3.10.bb</filename>
4473 file.
4474 Following is the default value for <filename>KBRANCH</filename>
4475 and the default override for the architectures the Yocto
4476 Project supports:
4477 <literallayout class='monospaced'>
4478 KBRANCH_DEFAULT = "standard/base"
4479 KBRANCH = "${KBRANCH_DEFAULT}"
4480 </literallayout>
4481 This branch exists in the <filename>linux-yocto-3.10</filename>
4482 kernel Git repository
4483 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/linux-yocto-3.10/refs/heads'></ulink>.
4484 </para>
4485
4486 <para>
4487 This variable is also used from the kernel's append file
4488 to identify the kernel branch specific to a particular
4489 machine or target hardware.
4490 The kernel's append file is located in the BSP layer for
4491 a given machine.
4492 For example, the kernel append file for the Crown Bay BSP is in the
4493 <filename>meta-intel</filename> Git repository and is named
4494 <filename>meta-crownbay/recipes-kernel/linux/linux-yocto_3.10.bbappend</filename>.
4495 Here are the related statements from the append file:
4496 <literallayout class='monospaced'>
4497 COMPATIBLE_MACHINE_crownbay = "crownbay"
4498 KMACHINE_crownbay = "crownbay"
4499 KBRANCH_crownbay = "standard/crownbay"
4500 KERNEL_FEATURES_append_crownbay = " features/drm-emgd/drm-emgd-1.18 cfg/vesafb"
4501
4502 COMPATIBLE_MACHINE_crownbay-noemgd = "crownbay-noemgd"
4503 KMACHINE_crownbay-noemgd = "crownbay"
4504 KBRANCH_crownbay-noemgd = "standard/crownbay"
4505 KERNEL_FEATURES_append_crownbay-noemgd = " cfg/vesafb"
4506 </literallayout>
4507 The <filename>KBRANCH_*</filename> statements identify
4508 the kernel branch to use when building for the Crown
4509 Bay BSP.
4510 In this case there are two identical statements: one
4511 for each type of Crown Bay machine.
4512 </para>
4513 </glossdef>
4514 </glossentry>
4515
4516 <glossentry id='var-KBRANCH_DEFAULT'><glossterm>KBRANCH_DEFAULT</glossterm>
4517 <glossdef>
4518 <para>
4519 Defines the Linux kernel source repository's default
4520 branch used to build the Linux kernel.
4521 The <filename>KBRANCH_DEFAULT</filename> value is
4522 the default value for
4523 <link linkend='var-KBRANCH'><filename>KBRANCH</filename></link>.
4524 Unless you specify otherwise,
4525 <filename>KBRANCH_DEFAULT</filename> initializes to
4526 "master".
4527 </para>
4528 </glossdef>
4529 </glossentry>
4530
4531 <glossentry id='var-KERNEL_EXTRA_ARGS'><glossterm>KERNEL_EXTRA_ARGS</glossterm>
4532 <glossdef>
4533 <para>
4534 Specifies additional <filename>make</filename>
4535 command-line arguments the OpenEmbedded build system
4536 passes on when compiling the kernel.
4537 </para>
4538 </glossdef>
4539 </glossentry>
4540
4541 <glossentry id='var-KERNEL_FEATURES'><glossterm>KERNEL_FEATURES</glossterm>
4542 <glossdef>
4543 <para>Includes additional metadata from the Yocto Project kernel Git repository.
4544 In the OpenEmbedded build system, the default Board Support Packages (BSPs)
4545 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
4546 is provided through
4547 the <link linkend='var-KMACHINE'><filename>KMACHINE</filename></link>
4548 and <link linkend='var-KBRANCH'><filename>KBRANCH</filename></link> variables.
4549 You can use the <filename>KERNEL_FEATURES</filename> variable to further
4550 add metadata for all BSPs.</para>
4551 <para>The metadata you add through this variable includes config fragments and
4552 features descriptions,
4553 which usually includes patches as well as config fragments.
4554 You typically override the <filename>KERNEL_FEATURES</filename> variable
4555 for a specific machine.
4556 In this way, you can provide validated, but optional, sets of kernel
4557 configurations and features.</para>
4558 <para>For example, the following adds <filename>netfilter</filename> to all
4559 the Yocto Project kernels and adds sound support to the <filename>qemux86</filename>
4560 machine:
4561 <literallayout class='monospaced'>
4562 # Add netfilter to all linux-yocto kernels
4563 KERNEL_FEATURES="features/netfilter"
4564
4565 # Add sound support to the qemux86 machine
4566 KERNEL_FEATURES_append_qemux86=" cfg/sound"
4567 </literallayout></para>
4568 </glossdef>
4569 </glossentry>
4570
4571 <glossentry id='var-KERNEL_IMAGE_BASE_NAME'><glossterm>KERNEL_IMAGE_BASE_NAME</glossterm>
4572 <glossdef>
4573 <para>
4574 The base name of the kernel image.
4575 This variable is set in the
4576 <link linkend='ref-classes-kernel'>kernel</link> class
4577 as follows:
4578 <literallayout class='monospaced'>
4579 KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
4580 </literallayout>
4581 See the
4582 <link linkend='var-KERNEL_IMAGETYPE'><filename>KERNEL_IMAGETYPE</filename></link>,
4583 <link linkend='var-PKGE'><filename>PKGE</filename></link>,
4584 <link linkend='var-PKGV'><filename>PKGV</filename></link>,
4585 <link linkend='var-PKGR'><filename>PKGR</filename></link>,
4586 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
4587 and
4588 <link linkend='var-DATETIME'><filename>DATETIME</filename></link>
4589 variables for additional information.
4590 </para>
4591 </glossdef>
4592 </glossentry>
4593
4594 <glossentry id='var-KERNEL_IMAGETYPE'><glossterm>KERNEL_IMAGETYPE</glossterm>
4595 <glossdef>
4596 <para>The type of kernel to build for a device, usually set by the
4597 machine configuration files and defaults to "zImage".
4598 This variable is used
4599 when building the kernel and is passed to <filename>make</filename> as the target to
4600 build.</para>
4601 </glossdef>
4602 </glossentry>
4603
4604 <glossentry id='var-KERNEL_MODULE_AUTOLOAD'><glossterm>KERNEL_MODULE_AUTOLOAD</glossterm>
4605 <glossdef>
4606 <para>
4607 Lists kernel modules that need to be auto-loaded during
4608 boot.
4609 <note>
4610 This variable replaces the deprecated
4611 <link linkend='var-module_autoload'><filename>module_autoload</filename></link>
4612 variable.
4613 </note>
4614 </para>
4615
4616 <para>
4617 You can use the <filename>KERNEL_MODULE_AUTOLOAD</filename>
4618 variable anywhere that it can be
4619 recognized by the kernel recipe or by an out-of-tree kernel
4620 module recipe (e.g. a machine configuration file, a
4621 distribution configuration file, an append file for the
4622 recipe, or the recipe itself).
4623 </para>
4624
4625 <para>
4626 Specify it as follows:
4627 <literallayout class='monospaced'>
4628 KERNEL_MODULE_AUTOLOAD += "<replaceable>module_name1</replaceable> <replaceable>module_name2</replaceable> <replaceable>module_name3</replaceable>"
4629 </literallayout>
4630 </para>
4631
4632 <para>
4633 Including <filename>KERNEL_MODULE_AUTOLOAD</filename> causes
4634 the OpenEmbedded build system to populate the
4635 <filename>/etc/modules-load.d/modname.conf</filename>
4636 file with the list of modules to be auto-loaded on boot.
4637 The modules appear one-per-line in the file.
4638 Here is an example of the most common use case:
4639 <literallayout class='monospaced'>
4640 KERNEL_MODULE_AUTOLOAD += "<replaceable>module_name</replaceable>"
4641 </literallayout>
4642 </para>
4643
4644 <para>
4645 For information on how to populate the
4646 <filename>modname.conf</filename> file with
4647 <filename>modprobe.d</filename> syntax lines, see the
4648 <link linkend='var-KERNEL_MODULE_PROBECONF'><filename>KERNEL_MODULE_PROBECONF</filename></link>
4649 variable.
4650 </para>
4651 </glossdef>
4652 </glossentry>
4653
4654 <glossentry id='var-KERNEL_MODULE_PROBECONF'><glossterm>KERNEL_MODULE_PROBECONF</glossterm>
4655 <glossdef>
4656 <para>
4657 Provides a list of modules for which the OpenEmbedded
4658 build system expects to find
4659 <filename>module_conf_</filename><replaceable>modname</replaceable>
4660 values that specify configuration for each of the modules.
4661 For information on how to provide those module
4662 configurations, see the
4663 <link linkend='var-module_conf'><filename>module_conf_*</filename></link>
4664 variable.
4665 </para>
4666 </glossdef>
4667 </glossentry>
4668
4669 <glossentry id='var-KERNEL_PATH'><glossterm>KERNEL_PATH</glossterm>
4670 <glossdef>
4671 <para>
4672 The location of the kernel sources.
4673 This variable is set to the value of the
4674 <link linkend='var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></link>
4675 within the
4676 <link linkend='ref-classes-module'><filename>module</filename></link>
4677 class.
4678 For information on how this variable is used, see the
4679 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
4680 section.
4681 </para>
4682
4683 <para>
4684 To help maximize compatibility with out-of-tree drivers
4685 used to build modules, the OpenEmbedded build system also
4686 recognizes and uses the
4687 <link linkend='var-KERNEL_SRC'><filename>KERNEL_SRC</filename></link>
4688 variable, which is identical to the
4689 <filename>KERNEL_PATH</filename> variable.
4690 Both variables are common variables used by external
4691 Makefiles to point to the kernel source directory.
4692 </para>
4693 </glossdef>
4694 </glossentry>
4695
4696 <glossentry id='var-KERNEL_SRC'><glossterm>KERNEL_SRC</glossterm>
4697 <glossdef>
4698 <para>
4699 The location of the kernel sources.
4700 This variable is set to the value of the
4701 <link linkend='var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></link>
4702 within the
4703 <link linkend='ref-classes-module'><filename>module</filename></link>
4704 class.
4705 For information on how this variable is used, see the
4706 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
4707 section.
4708 </para>
4709
4710 <para>
4711 To help maximize compatibility with out-of-tree drivers
4712 used to build modules, the OpenEmbedded build system also
4713 recognizes and uses the
4714 <link linkend='var-KERNEL_PATH'><filename>KERNEL_PATH</filename></link>
4715 variable, which is identical to the
4716 <filename>KERNEL_SRC</filename> variable.
4717 Both variables are common variables used by external
4718 Makefiles to point to the kernel source directory.
4719 </para>
4720 </glossdef>
4721 </glossentry>
4722
4723 <glossentry id='var-KFEATURE_DESCRIPTION'><glossterm>KFEATURE_DESCRIPTION</glossterm>
4724 <glossdef>
4725 <para>
4726 Provides a short description of a configuration fragment.
4727 You use this variable in the <filename>.scc</filename>
4728 file that describes a configuration fragment file.
4729 Here is the variable used in a file named
4730 <filename>smp.scc</filename> to describe SMP being
4731 enabled:
4732 <literallayout class='monospaced'>
4733 define KFEATURE_DESCRIPTION "Enable SMP"
4734 </literallayout>
4735 </para>
4736 </glossdef>
4737 </glossentry>
4738
4739 <glossentry id='var-KMACHINE'><glossterm>KMACHINE</glossterm>
4740 <glossdef>
4741 <para>
4742 The machine as known by the kernel.
4743 Sometimes the machine name used by the kernel does not match the machine name
4744 used by the OpenEmbedded build system.
4745 For example, the machine name that the OpenEmbedded build system understands as
4746 <filename>qemuarm</filename> goes by a different name in the Linux Yocto kernel.
4747 The kernel understands that machine as <filename>arm_versatile926ejs</filename>.
4748 For cases like these, the <filename>KMACHINE</filename> variable maps the
4749 kernel machine name to the OpenEmbedded build system machine name.
4750 </para>
4751
4752 <para>
4753 Kernel machine names are initially defined in the
4754 Yocto Linux Kernel's <filename>meta</filename> branch.
4755 From the <filename>meta</filename> branch, look in
4756 the <filename>meta/cfg/kernel-cache/bsp/&lt;bsp_name&gt;/&lt;bsp-name&gt;-&lt;kernel-type&gt;.scc</filename> file.
4757 For example, from the <filename>meta</filename> branch in the
4758 <filename>linux-yocto-3.0</filename> kernel, the
4759 <filename>meta/cfg/kernel-cache/bsp/cedartrail/cedartrail-standard.scc</filename> file
4760 has the following:
4761 <literallayout class='monospaced'>
4762 define KMACHINE cedartrail
4763 define KTYPE standard
4764 define KARCH i386
4765
4766 include ktypes/standard
4767 branch cedartrail
4768
4769 include cedartrail.scc
4770 </literallayout>
4771 You can see that the kernel understands the machine name for
4772 the Cedar Trail Board Support Package (BSP) as
4773 <filename>cedartrail</filename>.
4774 </para>
4775
4776 <para>
4777 If you look in the Cedar Trail BSP layer in the
4778 <filename>meta-intel</filename>
4779 <ulink url='&YOCTO_DOCS_DEV_URL;#source-repositories'>Source Repositories</ulink>
4780 at <filename>meta-cedartrail/recipes-kernel/linux/linux-yocto_3.0.bbappend</filename>,
4781 you will find the following statements among others:
4782 <literallayout class='monospaced'>
4783 COMPATIBLE_MACHINE_cedartrail = "cedartrail"
4784 KMACHINE_cedartrail = "cedartrail"
4785 KBRANCH_cedartrail = "yocto/standard/cedartrail"
4786 KERNEL_FEATURES_append_cedartrail += "bsp/cedartrail/cedartrail-pvr-merge.scc"
4787 KERNEL_FEATURES_append_cedartrail += "cfg/efi-ext.scc"
4788
4789 COMPATIBLE_MACHINE_cedartrail-nopvr = "cedartrail"
4790 KMACHINE_cedartrail-nopvr = "cedartrail"
4791 KBRANCH_cedartrail-nopvr = "yocto/standard/cedartrail"
4792 KERNEL_FEATURES_append_cedartrail-nopvr += " cfg/smp.scc"
4793 </literallayout>
4794 The <filename>KMACHINE</filename> statements in the kernel's append file make sure that
4795 the OpenEmbedded build system and the Yocto Linux kernel understand the same machine
4796 names.
4797 </para>
4798
4799 <para>
4800 This append file uses two <filename>KMACHINE</filename> statements.
4801 The first is not really necessary but does ensure that the machine known to the
4802 OpenEmbedded build system as <filename>cedartrail</filename> maps to the machine
4803 in the kernel also known as <filename>cedartrail</filename>:
4804 <literallayout class='monospaced'>
4805 KMACHINE_cedartrail = "cedartrail"
4806 </literallayout>
4807 </para>
4808
4809 <para>
4810 The second statement is a good example of why the <filename>KMACHINE</filename> variable
4811 is needed.
4812 In this example, the OpenEmbedded build system uses the <filename>cedartrail-nopvr</filename>
4813 machine name to refer to the Cedar Trail BSP that does not support the proprietary
4814 PowerVR driver.
4815 The kernel, however, uses the machine name <filename>cedartrail</filename>.
4816 Thus, the append file must map the <filename>cedartrail-nopvr</filename> machine name to
4817 the kernel's <filename>cedartrail</filename> name:
4818 <literallayout class='monospaced'>
4819 KMACHINE_cedartrail-nopvr = "cedartrail"
4820 </literallayout>
4821 </para>
4822
4823 <para>
4824 BSPs that ship with the Yocto Project release provide all mappings between the Yocto
4825 Project kernel machine names and the OpenEmbedded machine names.
4826 Be sure to use the <filename>KMACHINE</filename> if you create a BSP and the machine
4827 name you use is different than that used in the kernel.
4828 </para>
4829 </glossdef>
4830 </glossentry>
4831
4832 <glossentry id='var-KTYPE'><glossterm>KTYPE</glossterm>
4833 <glossdef>
4834 <para>
4835 Defines the kernel type to be used in assembling the
4836 configuration.
4837 The linux-yocto recipes define "standard", "tiny",
4838 and "preempt-rt" kernel types.
4839 See the
4840 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#kernel-types'>Kernel Types</ulink>"
4841 section in the Yocto Project Linux Kernel Development
4842 Manual for more information on kernel types.
4843 </para>
4844
4845 <para>
4846 You define the <filename>KTYPE</filename> variable in the
4847 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#bsp-descriptions'>BSP Descriptions</ulink>.
4848 The value you use must match the value used for the
4849 <link linkend='var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></link>
4850 value used by the kernel recipe.
4851 </para>
4852 </glossdef>
4853 </glossentry>
4854 </glossdiv>
4855
4856 <glossdiv id='var-glossary-l'><title>L</title>
4857
4858 <glossentry id='var-LABELS'><glossterm>LABELS</glossterm>
4859 <glossdef>
4860 <para>
4861 Provides a list of targets for automatic configuration.
4862 </para>
4863
4864 <para>
4865 See the
4866 <link linkend='ref-classes-grub-efi'><filename>grub-efi</filename></link>
4867 class for more information on how this variable is used.
4868 </para>
4869 </glossdef>
4870 </glossentry>
4871
4872 <glossentry id='var-LAYERDEPENDS'><glossterm>LAYERDEPENDS</glossterm>
4873 <glossdef>
4874 <para>Lists the layers that this recipe depends upon, separated by spaces.
4875 Optionally, you can specify a specific layer version for a dependency
4876 by adding it to the end of the layer name with a colon, (e.g. "anotherlayer:3"
4877 to be compared against
4878 <link linkend='var-LAYERVERSION'><filename>LAYERVERSION</filename></link><filename>_anotherlayer</filename>
4879 in this case).
4880 An error will be produced if any dependency is missing or
4881 the version numbers do not match exactly (if specified).
4882 This variable is used in the <filename>conf/layer.conf</filename> file
4883 and must be suffixed with the name of the specific layer (e.g.
4884 <filename>LAYERDEPENDS_mylayer</filename>).</para>
4885 </glossdef>
4886 </glossentry>
4887
4888 <glossentry id='var-LAYERDIR'><glossterm>LAYERDIR</glossterm>
4889 <glossdef>
4890 <para>When used inside the <filename>layer.conf</filename> configuration
4891 file, this variable provides the path of the current layer.
4892 This variable is not available outside of <filename>layer.conf</filename>
4893 and references are expanded immediately when parsing of the file completes.</para>
4894 </glossdef>
4895 </glossentry>
4896
4897 <glossentry id='var-LAYERVERSION'><glossterm>LAYERVERSION</glossterm>
4898 <glossdef>
4899 <para>Optionally specifies the version of a layer as a single number.
4900 You can use this within
4901 <link linkend='var-LAYERDEPENDS'><filename>LAYERDEPENDS</filename></link>
4902 for another layer in order to depend on a specific version
4903 of the layer.
4904 This variable is used in the <filename>conf/layer.conf</filename> file
4905 and must be suffixed with the name of the specific layer (e.g.
4906 <filename>LAYERVERSION_mylayer</filename>).</para>
4907 </glossdef>
4908 </glossentry>
4909
4910 <glossentry id='var-LDFLAGS'><glossterm>LDFLAGS</glossterm>
4911 <glossdef>
4912 <para>
4913 Specifies the flags to pass to the linker.
4914 This variable is exported to an environment
4915 variable and thus made visible to the software being
4916 built during the compilation step.
4917 </para>
4918
4919 <para>
4920 Default initialization for <filename>LDFLAGS</filename>
4921 varies depending on what is being built:
4922 <itemizedlist>
4923 <listitem><para>
4924 <link linkend='var-TARGET_LDFLAGS'><filename>TARGET_LDFLAGS</filename></link>
4925 when building for the target
4926 </para></listitem>
4927 <listitem><para>
4928 <link linkend='var-BUILD_LDFLAGS'><filename>BUILD_LDFLAGS</filename></link>
4929 when building for the build host (i.e.
4930 <filename>-native</filename>)
4931 </para></listitem>
4932 <listitem><para>
4933 <link linkend='var-BUILDSDK_LDFLAGS'><filename>BUILDSDK_LDFLAGS</filename></link>
4934 when building for an SDK (i.e.
4935 <filename>nativesdk-</filename>)
4936 </para></listitem>
4937 </itemizedlist>
4938 </para>
4939 </glossdef>
4940 </glossentry>
4941
4942 <glossentry id='var-LEAD_SONAME'><glossterm>LEAD_SONAME</glossterm>
4943 <glossdef>
4944 <para>
4945 Specifies the lead (or primary) compiled library file
4946 (<filename>.so</filename>) that the
4947 <link linkend='ref-classes-debian'><filename>debian</filename></link>
4948 class applies its naming policy to given a recipe that
4949 packages multiple libraries.
4950 </para>
4951
4952 <para>
4953 This variable works in conjunction with the
4954 <filename>debian</filename> class.
4955 </para>
4956 </glossdef>
4957 </glossentry>
4958
4959 <glossentry id='var-LIC_FILES_CHKSUM'><glossterm>LIC_FILES_CHKSUM</glossterm>
4960 <glossdef>
4961 <para>Checksums of the license text in the recipe source code.</para>
4962 <para>This variable tracks changes in license text of the source
4963 code files.
4964 If the license text is changed, it will trigger a build
4965 failure, which gives the developer an opportunity to review any
4966 license change.</para>
4967 <para>
4968 This variable must be defined for all recipes (unless
4969 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
4970 is set to "CLOSED").</para>
4971 <para>For more information, see the
4972 "<link linkend='usingpoky-configuring-LIC_FILES_CHKSUM'>
4973 Tracking License Changes</link>" section.</para>
4974 </glossdef>
4975 </glossentry>
4976
4977 <glossentry id='var-LICENSE'><glossterm>LICENSE</glossterm>
4978 <glossdef>
4979 <para>
4980 The list of source licenses for the recipe.
4981 Follow these rules:
4982 <itemizedlist>
4983 <listitem><para>Do not use spaces within individual
4984 license names.</para></listitem>
4985 <listitem><para>Separate license names using
4986 | (pipe) when there is a choice between licenses.
4987 </para></listitem>
4988 <listitem><para>Separate license names using
4989 &amp; (ampersand) when multiple licenses exist
4990 that cover different parts of the source.
4991 </para></listitem>
4992 <listitem><para>You can use spaces between license
4993 names.</para></listitem>
4994 <listitem><para>For standard licenses, use the names
4995 of the files in
4996 <filename>meta/files/common-licenses/</filename>
4997 or the
4998 <link linkend='var-SPDXLICENSEMAP'><filename>SPDXLICENSEMAP</filename></link>
4999 flag names defined in
5000 <filename>meta/conf/licenses.conf</filename>.
5001 </para></listitem>
5002 </itemizedlist>
5003 </para>
5004
5005 <para>
5006 Here are some examples:
5007 <literallayout class='monospaced'>
5008 LICENSE = "LGPLv2.1 | GPLv3"
5009 LICENSE = "MPL-1 &amp; LGPLv2.1"
5010 LICENSE = "GPLv2+"
5011 </literallayout>
5012 The first example is from the recipes for Qt, which the user
5013 may choose to distribute under either the LGPL version
5014 2.1 or GPL version 3.
5015 The second example is from Cairo where two licenses cover
5016 different parts of the source code.
5017 The final example is from <filename>sysstat</filename>,
5018 which presents a single license.
5019 </para>
5020
5021 <para>
5022 You can also specify licenses on a per-package basis to
5023 handle situations where components of the output have
5024 different licenses.
5025 For example, a piece of software whose code is
5026 licensed under GPLv2 but has accompanying documentation
5027 licensed under the GNU Free Documentation License 1.2 could
5028 be specified as follows:
5029 <literallayout class='monospaced'>
5030 LICENSE = "GFDL-1.2 &amp; GPLv2"
5031 LICENSE_${PN} = "GPLv2"
5032 LICENSE_${PN}-doc = "GFDL-1.2"
5033 </literallayout>
5034 </para>
5035 </glossdef>
5036 </glossentry>
5037
5038 <glossentry id='var-LICENSE_FLAGS'><glossterm>LICENSE_FLAGS</glossterm>
5039 <glossdef>
5040 <para>
5041 Specifies additional flags for a recipe you must
5042 whitelist through
5043 <link linkend='var-LICENSE_FLAGS_WHITELIST'><filename>LICENSE_FLAGS_WHITELIST</filename></link>
5044 in order to allow the recipe to be built.
5045 When providing multiple flags, separate them with
5046 spaces.
5047 </para>
5048
5049 <para>
5050 This value is independent of
5051 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
5052 and is typically used to mark recipes that might
5053 require additional licenses in order to be used in a
5054 commercial product.
5055 For more information, see the
5056 "<link linkend='enabling-commercially-licensed-recipes'>Enabling Commercially Licensed Recipes</link>"
5057 section.
5058 </para>
5059 </glossdef>
5060 </glossentry>
5061
5062 <glossentry id='var-LICENSE_FLAGS_WHITELIST'><glossterm>LICENSE_FLAGS_WHITELIST</glossterm>
5063 <glossdef>
5064 <para>
5065 Lists license flags that when specified in
5066 <link linkend='var-LICENSE_FLAGS'><filename>LICENSE_FLAGS</filename></link>
5067 within a recipe should not prevent that recipe from being
5068 built.
5069 This practice is otherwise known as "whitelisting"
5070 license flags.
5071 For more information, see the
5072 <link linkend='enabling-commercially-licensed-recipes'>Enabling Commercially Licensed Recipes</link>"
5073 section.
5074 </para>
5075 </glossdef>
5076 </glossentry>
5077
5078 <glossentry id='var-LICENSE_PATH'><glossterm>LICENSE_PATH</glossterm>
5079 <glossdef>
5080 <para>Path to additional licenses used during the build.
5081 By default, the OpenEmbedded build system uses <filename>COMMON_LICENSE_DIR</filename>
5082 to define the directory that holds common license text used during the build.
5083 The <filename>LICENSE_PATH</filename> variable allows you to extend that
5084 location to other areas that have additional licenses:
5085 <literallayout class='monospaced'>
5086 LICENSE_PATH += "<replaceable>path-to-additional-common-licenses</replaceable>"
5087 </literallayout></para>
5088 </glossdef>
5089 </glossentry>
5090
5091 <glossentry id='var-LINUX_KERNEL_TYPE'><glossterm>LINUX_KERNEL_TYPE</glossterm>
5092 <glossdef>
5093 <para>
5094 Defines the kernel type to be used in assembling the
5095 configuration.
5096 The linux-yocto recipes define "standard", "tiny", and
5097 "preempt-rt" kernel types.
5098 See the
5099 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#kernel-types'>Kernel Types</ulink>"
5100 section in the Yocto Project Linux Kernel Development
5101 Manual for more information on kernel types.
5102 </para>
5103
5104 <para>
5105 If you do not specify a
5106 <filename>LINUX_KERNEL_TYPE</filename>, it defaults to
5107 "standard".
5108 Together with
5109 <link linkend='var-KMACHINE'><filename>KMACHINE</filename></link>,
5110 the <filename>LINUX_KERNEL_TYPE</filename> variable
5111 defines the search
5112 arguments used by the kernel tools to find the appropriate
5113 description within the kernel
5114 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
5115 with which to build out the sources and configuration.
5116 </para>
5117 </glossdef>
5118 </glossentry>
5119
5120 <glossentry id='var-LINUX_VERSION'><glossterm>LINUX_VERSION</glossterm>
5121 <glossdef>
5122 <para>The Linux version from <filename>kernel.org</filename>
5123 on which the Linux kernel image being built using the
5124 OpenEmbedded build system is based.
5125 You define this variable in the kernel recipe.
5126 For example, the <filename>linux-yocto-3.4.bb</filename>
5127 kernel recipe found in
5128 <filename>meta/recipes-kernel/linux</filename>
5129 defines the variables as follows:
5130 <literallayout class='monospaced'>
5131 LINUX_VERSION ?= "3.4.24"
5132 </literallayout>
5133 The <filename>LINUX_VERSION</filename> variable is used to
5134 define <link linkend='var-PV'><filename>PV</filename></link>
5135 for the recipe:
5136 <literallayout class='monospaced'>
5137 PV = "${LINUX_VERSION}+git${SRCPV}"
5138 </literallayout></para>
5139 </glossdef>
5140 </glossentry>
5141
5142 <glossentry id='var-LINUX_VERSION_EXTENSION'><glossterm>LINUX_VERSION_EXTENSION</glossterm>
5143 <glossdef>
5144 <para>A string extension compiled into the version
5145 string of the Linux kernel built with the OpenEmbedded
5146 build system.
5147 You define this variable in the kernel recipe.
5148 For example, the linux-yocto kernel recipes all define
5149 the variable as follows:
5150 <literallayout class='monospaced'>
5151 LINUX_VERSION_EXTENSION ?= "-yocto-${<link linkend='var-LINUX_KERNEL_TYPE'>LINUX_KERNEL_TYPE</link>}"
5152 </literallayout>
5153 Defining this variable essentially sets the
5154 Linux kernel configuration item
5155 <filename>CONFIG_LOCALVERSION</filename>, which is visible
5156 through the <filename>uname</filename> command.
5157 Here is an example that shows the extension assuming it
5158 was set as previously shown:
5159 <literallayout class='monospaced'>
5160 $ uname -r
5161 3.7.0-rc8-custom
5162 </literallayout>
5163 </para>
5164 </glossdef>
5165 </glossentry>
5166
5167 <glossentry id='var-LOG_DIR'><glossterm>LOG_DIR</glossterm>
5168 <glossdef>
5169 <para>
5170 Specifies the directory to which the OpenEmbedded build
5171 system writes overall log files.
5172 The default directory is <filename>${TMPDIR}/log</filename>.
5173 </para>
5174 <para>
5175 For the directory containing logs specific to each task,
5176 see the <link linkend='var-T'><filename>T</filename></link>
5177 variable.
5178 </para>
5179 </glossdef>
5180 </glossentry>
5181
5182 </glossdiv>
5183
5184 <glossdiv id='var-glossary-m'><title>M</title>
5185
5186 <glossentry id='var-MACHINE'><glossterm>MACHINE</glossterm>
5187 <glossdef>
5188 <para>
5189 Specifies the target device for which the image is built.
5190 You define <filename>MACHINE</filename> in the
5191 <filename>local.conf</filename> file found in the
5192 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
5193 By default, <filename>MACHINE</filename> is set to
5194 "qemux86", which is an x86-based architecture machine to
5195 be emulated using QEMU:
5196 <literallayout class='monospaced'>
5197 MACHINE ?= "qemux86"
5198 </literallayout>
5199 The variable corresponds to a machine configuration file of the
5200 same name, through which machine-specific configurations are set.
5201 Thus, when <filename>MACHINE</filename> is set to "qemux86" there
5202 exists the corresponding <filename>qemux86.conf</filename> machine
5203 configuration file, which can be found in the
5204 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
5205 in <filename>meta/conf/machine</filename>.
5206 </para>
5207
5208 <para>
5209 The list of machines supported by the Yocto Project as
5210 shipped include the following:
5211 <literallayout class='monospaced'>
5212 MACHINE ?= "qemuarm"
5213 MACHINE ?= "qemumips"
5214 MACHINE ?= "qemuppc"
5215 MACHINE ?= "qemux86"
5216 MACHINE ?= "qemux86-64"
5217 MACHINE ?= "genericx86"
5218 MACHINE ?= "genericx86-64"
5219 MACHINE ?= "beaglebone"
5220 MACHINE ?= "mpc8315e-rdb"
5221 MACHINE ?= "edgerouter"
5222 </literallayout>
5223 The last five are Yocto Project reference hardware boards, which
5224 are provided in the <filename>meta-yocto-bsp</filename> layer.
5225 <note>Adding additional Board Support Package (BSP) layers
5226 to your configuration adds new possible settings for
5227 <filename>MACHINE</filename>.
5228 </note>
5229 </para>
5230 </glossdef>
5231 </glossentry>
5232
5233 <glossentry id='var-MACHINE_ARCH'><glossterm>MACHINE_ARCH</glossterm>
5234 <glossdef>
5235 <para>
5236 Specifies the name of the machine-specific architecture.
5237 This variable is set automatically from
5238 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
5239 or
5240 <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link>.
5241 You should not hand-edit the
5242 <filename>MACHINE_ARCH</filename> variable.
5243 </para>
5244 </glossdef>
5245 </glossentry>
5246
5247 <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</glossterm>
5248 <glossdef>
5249 <para>
5250 A list of required machine-specific packages to install as part of
5251 the image being built.
5252 The build process depends on these packages being present.
5253 Furthermore, because this is a "machine essential" variable, the list of
5254 packages are essential for the machine to boot.
5255 The impact of this variable affects images based on
5256 <filename>packagegroup-core-boot</filename>,
5257 including the <filename>core-image-minimal</filename> image.
5258 </para>
5259 <para>
5260 This variable is similar to the
5261 <filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</link></filename>
5262 variable with the exception that the image being built has a build
5263 dependency on the variable's list of packages.
5264 In other words, the image will not build if a file in this list is not found.
5265 </para>
5266 <para>
5267 As an example, suppose the machine for which you are building requires
5268 <filename>example-init</filename> to be run during boot to initialize the hardware.
5269 In this case, you would use the following in the machine's
5270 <filename>.conf</filename> configuration file:
5271 <literallayout class='monospaced'>
5272 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
5273 </literallayout>
5274 </para>
5275 </glossdef>
5276 </glossentry>
5277
5278 <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</glossterm>
5279 <glossdef>
5280 <para>
5281 A list of recommended machine-specific packages to install as part of
5282 the image being built.
5283 The build process does not depend on these packages being present.
5284 However, because this is a "machine essential" variable, the list of
5285 packages are essential for the machine to boot.
5286 The impact of this variable affects images based on
5287 <filename>packagegroup-core-boot</filename>,
5288 including the <filename>core-image-minimal</filename> image.
5289 </para>
5290 <para>
5291 This variable is similar to the
5292 <filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</link></filename>
5293 variable with the exception that the image being built does not have a build
5294 dependency on the variable's list of packages.
5295 In other words, the image will still build if a package in this list is not found.
5296 Typically, this variable is used to handle essential kernel modules, whose
5297 functionality may be selected to be built into the kernel rather than as a module,
5298 in which case a package will not be produced.
5299 </para>
5300 <para>
5301 Consider an example where you have a custom kernel where a specific touchscreen
5302 driver is required for the machine to be usable.
5303 However, the driver can be built as a module or
5304 into the kernel depending on the kernel configuration.
5305 If the driver is built as a module, you want it to be installed.
5306 But, when the driver is built into the kernel, you still want the
5307 build to succeed.
5308 This variable sets up a "recommends" relationship so that in the latter case,
5309 the build will not fail due to the missing package.
5310 To accomplish this, assuming the package for the module was called
5311 <filename>kernel-module-ab123</filename>, you would use the
5312 following in the machine's <filename>.conf</filename> configuration
5313 file:
5314 <literallayout class='monospaced'>
5315 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
5316 </literallayout>
5317 </para>
5318 <para>
5319 Some examples of these machine essentials are flash, screen, keyboard, mouse,
5320 or touchscreen drivers (depending on the machine).
5321 </para>
5322 </glossdef>
5323 </glossentry>
5324
5325 <glossentry id='var-MACHINE_EXTRA_RDEPENDS'><glossterm>MACHINE_EXTRA_RDEPENDS</glossterm>
5326 <glossdef>
5327 <para>
5328 A list of machine-specific packages to install as part of the
5329 image being built that are not essential for the machine to boot.
5330 However, the build process for more fully-featured images
5331 depends on the packages being present.
5332 </para>
5333 <para>
5334 This variable affects all images based on
5335 <filename>packagegroup-base</filename>, which does not include the
5336 <filename>core-image-minimal</filename> or <filename>core-image-full-cmdline</filename>
5337 images.
5338 </para>
5339 <para>
5340 The variable is similar to the
5341 <filename><link linkend='var-MACHINE_EXTRA_RRECOMMENDS'>MACHINE_EXTRA_RRECOMMENDS</link></filename>
5342 variable with the exception that the image being built has a build
5343 dependency on the variable's list of packages.
5344 In other words, the image will not build if a file in this list is not found.
5345 </para>
5346 <para>
5347 An example is a machine that has WiFi capability but is not
5348 essential for the machine to boot the image.
5349 However, if you are building a more fully-featured image, you want to enable
5350 the WiFi.
5351 The package containing the firmware for the WiFi hardware is always
5352 expected to exist, so it is acceptable for the build process to depend upon
5353 finding the package.
5354 In this case, assuming the package for the firmware was called
5355 <filename>wifidriver-firmware</filename>, you would use the following in the
5356 <filename>.conf</filename> file for the machine:
5357 <literallayout class='monospaced'>
5358 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
5359 </literallayout>
5360 </para>
5361 </glossdef>
5362 </glossentry>
5363
5364 <glossentry id='var-MACHINE_EXTRA_RRECOMMENDS'><glossterm>MACHINE_EXTRA_RRECOMMENDS</glossterm>
5365 <glossdef>
5366 <para>
5367 A list of machine-specific packages to install as part of the
5368 image being built that are not essential for booting the machine.
5369 The image being built has no build dependency on this list of packages.
5370 </para>
5371 <para>
5372 This variable affects only images based on
5373 <filename>packagegroup-base</filename>, which does not include the
5374 <filename>core-image-minimal</filename> or <filename>core-image-full-cmdline</filename>
5375 images.
5376 </para>
5377 <para>
5378 This variable is similar to the
5379 <filename><link linkend='var-MACHINE_EXTRA_RDEPENDS'>MACHINE_EXTRA_RDEPENDS</link></filename>
5380 variable with the exception that the image being built does not have a build
5381 dependency on the variable's list of packages.
5382 In other words, the image will build if a file in this list is not found.
5383 </para>
5384 <para>
5385 An example is a machine that has WiFi capability but is not essential
5386 For the machine to boot the image.
5387 However, if you are building a more fully-featured image, you want to enable
5388 WiFi.
5389 In this case, the package containing the WiFi kernel module will not be produced
5390 if the WiFi driver is built into the kernel, in which case you still want the
5391 build to succeed instead of failing as a result of the package not being found.
5392 To accomplish this, assuming the package for the module was called
5393 <filename>kernel-module-examplewifi</filename>, you would use the
5394 following in the <filename>.conf</filename> file for the machine:
5395 <literallayout class='monospaced'>
5396 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
5397 </literallayout>
5398 </para>
5399 </glossdef>
5400 </glossentry>
5401
5402 <glossentry id='var-MACHINE_FEATURES'><glossterm>MACHINE_FEATURES</glossterm>
5403 <glossdef>
5404 <para>
5405 Specifies the list of hardware features the
5406 <link linkend='var-MACHINE'><filename>MACHINE</filename></link> is capable
5407 of supporting.
5408 For related information on enabling features, see the
5409 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>,
5410 <link linkend='var-COMBINED_FEATURES'><filename>COMBINED_FEATURES</filename></link>,
5411 and
5412 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
5413 variables.
5414 </para>
5415
5416 <para>
5417 For a list of hardware features supported by the Yocto
5418 Project as shipped, see the
5419 "<link linkend='ref-features-machine'>Machine Features</link>"
5420 section.
5421 </para>
5422 </glossdef>
5423 </glossentry>
5424
5425 <glossentry id='var-MACHINE_FEATURES_BACKFILL'><glossterm>MACHINE_FEATURES_BACKFILL</glossterm>
5426 <glossdef>
5427 <para>Features to be added to
5428 <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>
5429 if not also present in
5430 <filename><link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'>MACHINE_FEATURES_BACKFILL_CONSIDERED</link></filename>.
5431 </para>
5432
5433 <para>
5434 This variable is set in the <filename>meta/conf/bitbake.conf</filename> file.
5435 It is not intended to be user-configurable.
5436 It is best to just reference the variable to see which machine features are
5437 being backfilled for all machine configurations.
5438 See the "<link linkend='ref-features-backfill'>Feature backfilling</link>" section for
5439 more information.
5440 </para>
5441 </glossdef>
5442 </glossentry>
5443
5444 <glossentry id='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><glossterm>MACHINE_FEATURES_BACKFILL_CONSIDERED</glossterm>
5445 <glossdef>
5446 <para>Features from
5447 <filename><link linkend='var-MACHINE_FEATURES_BACKFILL'>MACHINE_FEATURES_BACKFILL</link></filename>
5448 that should not be backfilled (i.e. added to
5449 <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>)
5450 during the build.
5451 See the "<link linkend='ref-features-backfill'>Feature backfilling</link>" section for
5452 more information.
5453 </para>
5454 </glossdef>
5455 </glossentry>
5456
5457 <glossentry id='var-MACHINEOVERRIDES'><glossterm>MACHINEOVERRIDES</glossterm>
5458 <glossdef>
5459 <para>
5460 Lists overrides specific to the current machine.
5461 By default, this list includes the value
5462 of <filename><link linkend='var-MACHINE'>MACHINE</link></filename>.
5463 You can extend the list to apply variable overrides for
5464 classes of machines.
5465 For example, all QEMU emulated machines (e.g. qemuarm,
5466 qemux86, and so forth) include a common file named
5467 <filename>meta/conf/machine/include/qemu.inc</filename>
5468 that prepends <filename>MACHINEOVERRIDES</filename> with
5469 the following variable override:
5470 <literallayout class='monospaced'>
5471 MACHINEOVERRIDES =. "qemuall:"
5472 </literallayout>
5473 Applying an override like <filename>qemuall</filename>
5474 affects all QEMU emulated machines elsewhere.
5475 Here is an example from the
5476 <filename>connman-conf</filename> recipe:
5477 <literallayout class='monospaced'>
5478 SRC_URI_append_qemuall = "file://wired.config \
5479 file://wired-setup \
5480 "
5481 </literallayout>
5482 </para>
5483 </glossdef>
5484 </glossentry>
5485
5486 <glossentry id='var-MAINTAINER'><glossterm>MAINTAINER</glossterm>
5487 <glossdef>
5488 <para>The email address of the distribution maintainer.</para>
5489 </glossdef>
5490 </glossentry>
5491
5492 <glossentry id='var-MIRRORS'><glossterm>MIRRORS</glossterm>
5493 <glossdef>
5494 <para>
5495 Specifies additional paths from which the OpenEmbedded
5496 build system gets source code.
5497 When the build system searches for source code, it first
5498 tries the local download directory.
5499 If that location fails, the build system tries locations
5500 defined by
5501 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>,
5502 the upstream source, and then locations specified by
5503 <filename>MIRRORS</filename> in that order.
5504 </para>
5505
5506 <para>
5507 Assuming your distribution
5508 (<link linkend='var-DISTRO'><filename>DISTRO</filename></link>)
5509 is "poky", the default value for
5510 <filename>MIRRORS</filename> is defined in the
5511 <filename>conf/distro/poky.conf</filename> file in the
5512 <filename>meta-yocto</filename> Git repository.
5513 </para>
5514 </glossdef>
5515 </glossentry>
5516
5517 <glossentry id='var-MLPREFIX'><glossterm>MLPREFIX</glossterm>
5518 <glossdef>
5519 <para>
5520 Specifies a prefix has been added to
5521 <link linkend='var-PN'><filename>PN</filename></link> to create a special version
5522 of a recipe or package, such as a Multilib version.
5523 The variable is used in places where the prefix needs to be
5524 added to or removed from a the name (e.g. the
5525 <link linkend='var-BPN'><filename>BPN</filename></link> variable).
5526 <filename>MLPREFIX</filename> gets set when a prefix has been
5527 added to <filename>PN</filename>.
5528 </para>
5529 </glossdef>
5530 </glossentry>
5531
5532 <glossentry id='var-module_autoload'><glossterm>module_autoload</glossterm>
5533 <glossdef>
5534 <para>
5535 This variable has been replaced by the
5536 <filename>KERNEL_MODULE_AUTOLOAD</filename> variable.
5537 You should replace all occurrences of
5538 <filename>module_autoload</filename> with additions to
5539 <filename>KERNEL_MODULE_AUTOLOAD</filename>, for example:
5540 <literallayout class='monospaced'>
5541 module_autoload_rfcomm = "rfcomm"
5542 </literallayout>
5543 should now be replaced with:
5544 <literallayout class='monospaced'>
5545 KERNEL_MODULE_AUTOLOAD += "rfcomm"
5546 </literallayout>
5547 See the
5548 <link linkend='var-KERNEL_MODULE_AUTOLOAD'><filename>KERNEL_MODULE_AUTOLOAD</filename></link>
5549 variable for more information.
5550 </para>
5551 </glossdef>
5552 </glossentry>
5553
5554 <glossentry id='var-module_conf'><glossterm>module_conf</glossterm>
5555 <glossdef>
5556 <para>
5557 Specifies
5558 <ulink url='http://linux.die.net/man/5/modprobe.d'><filename>modprobe.d</filename></ulink>
5559 syntax lines for inclusion in the
5560 <filename>/etc/modprobe.d/modname.conf</filename> file.
5561 </para>
5562
5563 <para>
5564 You can use this variable anywhere that it can be
5565 recognized by the kernel recipe or out-of-tree kernel
5566 module recipe (e.g. a machine configuration file, a
5567 distribution configuration file, an append file for the
5568 recipe, or the recipe itself).
5569 If you use this variable, you must also be sure to list
5570 the module name in the
5571 <link linkend='var-KERNEL_MODULE_AUTOLOAD'><filename>KERNEL_MODULE_AUTOLOAD</filename></link>
5572 variable.
5573 </para>
5574
5575 <para>
5576 Here is the general syntax:
5577 <literallayout class='monospaced'>
5578 module_conf_<replaceable>module_name</replaceable> = "<replaceable>modprobe.d-syntax</replaceable>"
5579 </literallayout>
5580 You must use the kernel module name override.
5581 </para>
5582
5583 <para>
5584 Run <filename>man modprobe.d</filename> in the shell to
5585 find out more information on the exact syntax
5586 you want to provide with <filename>module_conf</filename>.
5587 </para>
5588
5589 <para>
5590 Including <filename>module_conf</filename> causes the
5591 OpenEmbedded build system to populate the
5592 <filename>/etc/modprobe.d/modname.conf</filename>
5593 file with <filename>modprobe.d</filename> syntax lines.
5594 Here is an example that adds the options
5595 <filename>arg1</filename> and <filename>arg2</filename>
5596 to a module named <filename>mymodule</filename>:
5597 <literallayout class='monospaced'>
5598 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
5599 </literallayout>
5600 </para>
5601
5602 <para>
5603 For information on how to specify kernel modules to
5604 auto-load on boot, see the
5605 <link linkend='var-KERNEL_MODULE_AUTOLOAD'><filename>KERNEL_MODULE_AUTOLOAD</filename></link>
5606 variable.
5607 </para>
5608 </glossdef>
5609 </glossentry>
5610
5611 <glossentry id='var-MODULE_IMAGE_BASE_NAME'><glossterm>MODULE_IMAGE_BASE_NAME</glossterm>
5612 <glossdef>
5613 <para>
5614 The base name of the kernel modules tarball.
5615 This variable is set in the
5616 <link linkend='ref-classes-kernel'>kernel</link> class
5617 as follows:
5618 <literallayout class='monospaced'>
5619 MODULE_IMAGE_BASE_NAME ?= "modules-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
5620 </literallayout>
5621 See the
5622 <link linkend='var-PKGE'><filename>PKGE</filename></link>,
5623 <link linkend='var-PKGV'><filename>PKGV</filename></link>,
5624 <link linkend='var-PKGR'><filename>PKGR</filename></link>,
5625 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
5626 and
5627 <link linkend='var-DATETIME'><filename>DATETIME</filename></link>
5628 variables for additional information.
5629 </para>
5630 </glossdef>
5631 </glossentry>
5632
5633 <glossentry id='var-MODULE_TARBALL_DEPLOY'><glossterm>MODULE_TARBALL_DEPLOY</glossterm>
5634 <glossdef>
5635 <para>
5636 Controls creation of the <filename>modules-*.tgz</filename>
5637 file.
5638 Set this variable to "0" to disable creation of this
5639 file, which contains all of the kernel modules resulting
5640 from a kernel build.
5641 </para>
5642 </glossdef>
5643 </glossentry>
5644
5645 <glossentry id='var-MULTIMACH_TARGET_SYS'><glossterm>MULTIMACH_TARGET_SYS</glossterm>
5646 <glossdef>
5647 <para>
5648 Separates files for different machines such that you can build
5649 for multiple target machines using the same output directories.
5650 See the <link linkend='var-STAMP'><filename>STAMP</filename></link> variable
5651 for an example.
5652 </para>
5653 </glossdef>
5654 </glossentry>
5655
5656 </glossdiv>
5657
5658 <glossdiv id='var-glossary-n'><title>N</title>
5659
5660 <glossentry id='var-NATIVELSBSTRING'><glossterm>NATIVELSBSTRING</glossterm>
5661 <glossdef>
5662 <para>
5663 A string identifying the host distribution.
5664 Strings consist of the host distributor ID
5665 followed by the release, as reported by the
5666 <filename>lsb_release</filename> tool
5667 or as read from <filename>/etc/lsb-release</filename>.
5668 For example, when running a build on Ubuntu 12.10, the value
5669 is "Ubuntu-12.10".
5670 If this information is unable to be determined, the value
5671 resolves to "Unknown".
5672 </para>
5673 <para>
5674 This variable is used by default to isolate native shared
5675 state packages for different distributions (e.g. to avoid
5676 problems with <filename>glibc</filename> version
5677 incompatibilities).
5678 Additionally, the variable is checked against
5679 <link linkend='var-SANITY_TESTED_DISTROS'><filename>SANITY_TESTED_DISTROS</filename></link>
5680 if that variable is set.
5681 </para>
5682 </glossdef>
5683 </glossentry>
5684
5685 <glossentry id='var-NO_RECOMMENDATIONS'><glossterm>NO_RECOMMENDATIONS</glossterm>
5686 <glossdef>
5687 <para>
5688 Prevents installation of all "recommended-only" packages.
5689 Recommended-only packages are packages installed only
5690 through the
5691 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
5692 variable).
5693 Setting the <filename>NO_RECOMMENDATIONS</filename> variable
5694 to "1" turns this feature on:
5695 <literallayout class='monospaced'>
5696 NO_RECOMMENDATIONS = "1"
5697 </literallayout>
5698 You can set this variable globally in your
5699 <filename>local.conf</filename> file or you can attach it to
5700 a specific image recipe by using the recipe name override:
5701 <literallayout class='monospaced'>
5702 NO_RECOMMENDATIONS_pn-<replaceable>target_image</replaceable> = "<replaceable>package_name</replaceable>"
5703 </literallayout>
5704 </para>
5705
5706 <para>
5707 It is important to realize that if you choose to not install
5708 packages using this variable and some other packages are
5709 dependent on them (i.e. listed in a recipe's
5710 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
5711 variable), the OpenEmbedded build system ignores your
5712 request and will install the packages to avoid dependency
5713 errors.
5714 <note>
5715 Some recommended packages might be required for certain
5716 system functionality, such as kernel modules.
5717 It is up to you to add packages with the
5718 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>
5719 variable.
5720 </note>
5721 </para>
5722
5723 <para>
5724 Support for this variable exists only when using the
5725 IPK and RPM packaging backend.
5726 Support does not exist for DEB.
5727 </para>
5728
5729 <para>
5730 See the
5731 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
5732 and the
5733 <link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
5734 variables for related information.
5735 </para>
5736 </glossdef>
5737 </glossentry>
5738
5739 <glossentry id='var-NOHDD'><glossterm>NOHDD</glossterm>
5740 <glossdef>
5741 <para>
5742 Causes the OpenEmbedded build system to skip building the
5743 <filename>.hddimg</filename> image.
5744 The <filename>NOHDD</filename> variable is used with the
5745 <link linkend='ref-classes-bootimg'><filename>bootimg</filename></link>
5746 class.
5747 Set the variable to "1" to prevent the
5748 <filename>.hddimg</filename> image from being built.
5749 </para>
5750 </glossdef>
5751 </glossentry>
5752
5753 <glossentry id='var-NOISO'><glossterm>NOISO</glossterm>
5754 <glossdef>
5755 <para>
5756 Causes the OpenEmbedded build system to skip building the
5757 ISO image.
5758 The <filename>NOISO</filename> variable is used with the
5759 <link linkend='ref-classes-bootimg'><filename>bootimg</filename></link>
5760 class.
5761 Set the variable to "1" to prevent the ISO image from
5762 being built.
5763 To enable building an ISO image, set the variable to "0".
5764 </para>
5765 </glossdef>
5766 </glossentry>
5767
5768 </glossdiv>
5769
5770 <glossdiv id='var-glossary-o'><title>O</title>
5771
5772 <glossentry id='var-OE_BINCONFIG_EXTRA_MANGLE'><glossterm>OE_BINCONFIG_EXTRA_MANGLE</glossterm>
5773 <glossdef>
5774 <para>
5775 When inheriting the
5776 <link linkend='ref-classes-binconfig'><filename>binconfig</filename></link>
5777 class, this variable
5778 specifies additional arguments passed to the "sed" command.
5779 The sed command alters any paths in configuration scripts
5780 that have been set up during compilation.
5781 Inheriting this class results in all paths in these scripts
5782 being changed to point into the
5783 <filename>sysroots/</filename> directory so that all builds
5784 that use the script will use the correct directories
5785 for the cross compiling layout.
5786 </para>
5787
5788 <para>
5789 See the <filename>meta/classes/binconfig.bbclass</filename>
5790 in the
5791 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
5792 for details on how this class applies these additional
5793 sed command arguments.
5794 For general information on the
5795 <filename>binconfig.bbclass</filename> class, see the
5796 "<link linkend='ref-classes-binconfig'>Binary Configuration Scripts - <filename>binconfig.bbclass</filename></link>"
5797 section.
5798 </para>
5799 </glossdef>
5800 </glossentry>
5801
5802 <glossentry id='var-OE_IMPORTS'><glossterm>OE_IMPORTS</glossterm>
5803 <glossdef>
5804 <para>
5805 An internal variable used to tell the OpenEmbedded build
5806 system what Python modules to import for every Python
5807 function run by the system.
5808 </para>
5809
5810 <note>
5811 Do not set this variable.
5812 It is for internal use only.
5813 </note>
5814 </glossdef>
5815 </glossentry>
5816
5817 <glossentry id='var-OE_TERMINAL'><glossterm>OE_TERMINAL</glossterm>
5818 <glossdef>
5819 <para>
5820 Controls how the OpenEmbedded build system spawns
5821 interactive terminals on the host development system
5822 (e.g. using the BitBake command with the
5823 <filename>-c devshell</filename> command-line option).
5824 For more information, see the
5825 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section
5826 in the Yocto Project Development Manual.
5827 </para>
5828
5829 <para>
5830 You can use the following values for the
5831 <filename>OE_TERMINAL</filename> variable:
5832 <literallayout class='monospaced'>
5833 auto
5834 gnome
5835 xfce
5836 rxvt
5837 screen
5838 konsole
5839 none
5840 </literallayout>
5841 <note>Konsole support only works for KDE 3.x.
5842 Also, "auto" is the default behavior for
5843 <filename>OE_TERMINAL</filename></note>
5844 </para>
5845 </glossdef>
5846 </glossentry>
5847
5848 <glossentry id='var-OEROOT'><glossterm>OEROOT</glossterm>
5849 <glossdef>
5850 <para>
5851 The directory from which the top-level build environment
5852 setup script is sourced.
5853 The Yocto Project makes two top-level build environment
5854 setup scripts available:
5855 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
5856 and
5857 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>.
5858 When you run one of these scripts, the
5859 <filename>OEROOT</filename> variable resolves to the
5860 directory that contains the script.
5861 </para>
5862
5863 <para>
5864 For additional information on how this variable is used,
5865 see the initialization scripts.
5866 </para>
5867 </glossdef>
5868 </glossentry>
5869
5870 <glossentry id='var-OLDEST_KERNEL'><glossterm>OLDEST_KERNEL</glossterm>
5871 <glossdef>
5872 <para>
5873 Declares the oldest version of the Linux kernel that the
5874 produced binaries must support.
5875 This variable is passed into the build of the Embedded
5876 GNU C Library (<filename>glibc</filename>).
5877 </para>
5878
5879 <para>
5880 The default for this variable comes from the
5881 <filename>meta/conf/bitbake.conf</filename> configuration
5882 file.
5883 You can override this default by setting the variable
5884 in a custom distribution configuration file.
5885 </para>
5886 </glossdef>
5887 </glossentry>
5888
5889 <glossentry id='var-OVERRIDES'><glossterm>OVERRIDES</glossterm>
5890 <glossdef>
5891 <para>
5892 BitBake uses <filename>OVERRIDES</filename> to control
5893 what variables are overridden after BitBake parses
5894 recipes and configuration files.
5895 You can find more information on how overrides are handled
5896 in the
5897 "<ulink url='&YOCTO_DOCS_BB_URL;#conditional-syntax-overrides'>Conditional Syntax (Overrides)</ulink>"
5898 section of the BitBake User Manual.
5899 </para>
5900 </glossdef>
5901 </glossentry>
5902 </glossdiv>
5903
5904 <glossdiv id='var-glossary-p'><title>P</title>
5905
5906 <glossentry id='var-P'><glossterm>P</glossterm>
5907 <glossdef>
5908 <para>The recipe name and version.
5909 <filename>P</filename> is comprised of the following:
5910 <literallayout class='monospaced'>
5911 ${PN}-${PV}
5912 </literallayout></para>
5913 </glossdef>
5914 </glossentry>
5915
5916 <glossentry id='var-PACKAGE_ARCH'><glossterm>PACKAGE_ARCH</glossterm>
5917 <glossdef>
5918 <para>
5919 The architecture of the resulting package or packages.
5920 </para>
5921
5922 <para>
5923 By default, the value of this variable is set to
5924 <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link>
5925 when building for the target,
5926 <filename>BUILD_ARCH</filename> when building for the
5927 build host and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building
5928 for the SDK.
5929 However, if your recipe's output packages are built
5930 specific to the target machine rather than general for
5931 the architecture of the machine, you should set
5932 <filename>PACKAGE_ARCH</filename> to the value of
5933 <link linkend='var-MACHINE_ARCH'><filename>MACHINE_ARCH</filename></link>
5934 in the recipe as follows:
5935 <literallayout class='monospaced'>
5936 PACKAGE_ARCH = "${MACHINE_ARCH}"
5937 </literallayout>
5938 </para>
5939 </glossdef>
5940 </glossentry>
5941
5942 <glossentry id='var-PACKAGE_ARCHS'><glossterm>PACKAGE_ARCHS</glossterm>
5943 <glossdef>
5944 <para>
5945 Specifies a list of architectures compatible with
5946 the target machine.
5947 This variable is set automatically and should not
5948 normally be hand-edited.
5949 Entries are separated using spaces and listed in order
5950 of priority.
5951 The default value for
5952 <filename>PACKAGE_ARCHS</filename> is "all any noarch
5953 ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
5954 </para>
5955 </glossdef>
5956 </glossentry>
5957
5958
5959
5960 <glossentry id='var-PACKAGE_BEFORE_PN'><glossterm>PACKAGE_BEFORE_PN</glossterm>
5961 <glossdef>
5962 <para>Enables easily adding packages to
5963 <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
5964 before <filename>${<link linkend='var-PN'>PN</link>}</filename>
5965 so that those added packages can pick up files that would normally be
5966 included in the default package.</para>
5967 </glossdef>
5968 </glossentry>
5969
5970 <glossentry id='var-PACKAGE_CLASSES'><glossterm>PACKAGE_CLASSES</glossterm>
5971 <glossdef>
5972 <para>
5973 This variable, which is set in the
5974 <filename>local.conf</filename> configuration file found in
5975 the <filename>conf</filename> folder of the
5976 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
5977 specifies the package manager the OpenEmbedded build system
5978 uses when packaging data.
5979 </para>
5980
5981 <para>
5982 You can provide one or more of the following arguments for
5983 the variable:
5984 <literallayout class='monospaced'>
5985 PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk package_tar"
5986 </literallayout>
5987 The build system uses only the first argument in the list
5988 as the package manager when creating your image or SDK.
5989 However, packages will be created using any additional
5990 packaging classes you specify.
5991 For example, if you use the following in your
5992 <filename>local.conf</filename> file:
5993 <literallayout class='monospaced'>
5994 PACKAGE_CLASSES ?= "package_ipk package_tar"
5995 </literallayout>
5996 The OpenEmbedded build system uses the IPK package manager
5997 to create your image or SDK as well as generating
5998 TAR packages.
5999 </para>
6000
6001 <para>
6002 You cannot specify the
6003 <link linkend='ref-classes-package_tar'><filename>package_tar</filename></link>
6004 class first in the list.
6005 Files using the <filename>.tar</filename> format cannot
6006 be used as a substitute packaging format
6007 for DEB, RPM, and IPK formatted files for your image or SDK.
6008 </para>
6009
6010 <para>
6011 For information on packaging and build performance effects
6012 as a result of the package manager in use, see the
6013 "<link linkend='ref-classes-package'><filename>package.bbclass</filename></link>"
6014 section.
6015 </para>
6016 </glossdef>
6017 </glossentry>
6018
6019 <glossentry id='var-PACKAGE_DEBUG_SPLIT_STYLE'><glossterm>PACKAGE_DEBUG_SPLIT_STYLE</glossterm>
6020 <glossdef>
6021
6022 <para>
6023 Determines how to split up the binary and debug information
6024 when creating <filename>*-dbg</filename> packages to be
6025 used with the GNU Project Debugger (GDB).
6026 </para>
6027
6028 <para>
6029 With the
6030 <filename>PACKAGE_DEBUG_SPLIT_STYLE</filename> variable,
6031 you can control where debug information, which can include
6032 or exclude source files, is stored:
6033 <itemizedlist>
6034 <listitem><para>
6035 ".debug": Debug symbol files are placed next
6036 to the binary in a <filename>.debug</filename>
6037 directory on the target.
6038 For example, if a binary is installed into
6039 <filename>/bin</filename>, the corresponding debug
6040 symbol files are installed in
6041 <filename>/bin/.debug</filename>.
6042 Source files are placed in
6043 <filename>/usr/src/debug</filename>.
6044 This is the default behavior.
6045 </para></listitem>
6046 <listitem><para>
6047 "debug-file-directory": Debug symbol files are
6048 placed under <filename>/usr/lib/debug</filename>
6049 on the target, and separated by the path from where
6050 the binary is installed.
6051 For example, if a binary is installed in
6052 <filename>/bin</filename>, the corresponding debug
6053 symbols are installed in
6054 <filename>/usr/lib/debug/bin</filename>.
6055 Source files are placed in
6056 <filename>/usr/src/debug</filename>.
6057 </para></listitem>
6058 <listitem><para>
6059 "debug-without-src": The same behavior as
6060 ".debug" previously described with the exception
6061 that no source files are installed.
6062 </para></listitem>.
6063 </itemizedlist>
6064 </para>
6065
6066 <para>
6067 You can find out more about debugging using GDB by reading
6068 the
6069 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
6070 section in the Yocto Project Development Manual.
6071 </para>
6072 </glossdef>
6073 </glossentry>
6074
6075 <glossentry id='var-PACKAGE_EXCLUDE'><glossterm>PACKAGE_EXCLUDE</glossterm>
6076 <glossdef>
6077 <para>
6078 Lists packages that should not be installed into an image.
6079 For example:
6080 <literallayout class='monospaced'>
6081 PACKAGE_EXCLUDE = "<replaceable>package_name</replaceable> <replaceable>package_name</replaceable> <replaceable>package_name</replaceable> ..."
6082 </literallayout>
6083 You can set this variable globally in your
6084 <filename>local.conf</filename> file or you can attach it to
6085 a specific image recipe by using the recipe name override:
6086 <literallayout class='monospaced'>
6087 PACKAGE_EXCLUDE_pn-<replaceable>target_image</replaceable> = "<replaceable>package_name</replaceable>"
6088 </literallayout>
6089 </para>
6090
6091 <para>
6092 If you choose to not install
6093 a package using this variable and some other package is
6094 dependent on it (i.e. listed in a recipe's
6095 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
6096 variable), the OpenEmbedded build system generates a fatal
6097 installation error.
6098 Because the build system halts the process with a fatal
6099 error, you can use the variable with an iterative
6100 development process to remove specific components from a
6101 system.
6102 </para>
6103
6104 <para>
6105 Support for this variable exists only when using the
6106 IPK and RPM packaging backend.
6107 Support does not exist for DEB.
6108 </para>
6109
6110 <para>
6111 See the
6112 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>
6113 and the
6114 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
6115 variables for related information.
6116 </para>
6117 </glossdef>
6118 </glossentry>
6119
6120 <glossentry id='var-PACKAGE_EXTRA_ARCHS'><glossterm>PACKAGE_EXTRA_ARCHS</glossterm>
6121 <glossdef>
6122 <para>Specifies the list of architectures compatible with the device CPU.
6123 This variable is useful when you build for several different devices that use
6124 miscellaneous processors such as XScale and ARM926-EJS).</para>
6125 </glossdef>
6126 </glossentry>
6127
6128 <glossentry id='var-PACKAGE_GROUP'><glossterm>PACKAGE_GROUP</glossterm>
6129 <glossdef>
6130
6131 <para>
6132 The <filename>PACKAGE_GROUP</filename> variable has been
6133 renamed to
6134 <link linkend='var-FEATURE_PACKAGES'><filename>FEATURE_PACKAGES</filename></link>.
6135 See the variable description for
6136 <filename>FEATURE_PACKAGES</filename> for information.
6137 </para>
6138
6139 <para>
6140 If if you use the <filename>PACKAGE_GROUP</filename>
6141 variable, the OpenEmbedded build system issues a warning
6142 message.
6143 </para>
6144 </glossdef>
6145 </glossentry>
6146
6147 <glossentry id='var-PACKAGE_INSTALL'><glossterm>PACKAGE_INSTALL</glossterm>
6148 <glossdef>
6149 <para>
6150 The final list of packages passed to the package manager
6151 for installation into the image.
6152 </para>
6153
6154 <para>
6155 Because the package manager controls actual installation
6156 of all packages, the list of packages passed using
6157 <filename>PACKAGE_INSTALL</filename> is not the final list
6158 of packages that are actually installed.
6159 This variable is internal to the image construction
6160 code.
6161 Consequently, in general, you should use the
6162 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>
6163 variable to specify packages for installation.
6164 The exception to this is when working with
6165 the
6166 <link linkend='images-core-image-minimal-initramfs'><filename>core-image-minimal-initramfs</filename></link>
6167 image.
6168 When working with an initial RAM disk (initramfs)
6169 image, use the <filename>PACKAGE_INSTALL</filename>
6170 variable.
6171 </para>
6172 </glossdef>
6173 </glossentry>
6174
6175 <glossentry id='var-PACKAGE_PREPROCESS_FUNCS'><glossterm>PACKAGE_PREPROCESS_FUNCS</glossterm>
6176 <glossdef>
6177 <para>
6178 Specifies a list of functions run to pre-process the
6179 <link linkend='var-PKGD'><filename>PKGD</filename></link>
6180 directory prior to splitting the files out to individual
6181 packages.
6182 </para>
6183 </glossdef>
6184 </glossentry>
6185
6186 <glossentry id='var-PACKAGECONFIG'><glossterm>PACKAGECONFIG</glossterm>
6187 <glossdef>
6188 <para>
6189 This variable provides a means of enabling or disabling
6190 features of a recipe on a per-recipe basis.
6191 <filename>PACKAGECONFIG</filename> blocks are defined
6192 in recipes when you specify features and then arguments
6193 that define feature behaviors.
6194 Here is the basic block structure:
6195 <literallayout class='monospaced'>
6196 PACKAGECONFIG ??= "f1 f2 f3 ..."
6197 PACKAGECONFIG[f1] = "--with-f1,--without-f1,build-deps-f1,rt-deps-f1"
6198 PACKAGECONFIG[f2] = "--with-f2,--without-f2,build-deps-f2,rt-deps-f2"
6199 PACKAGECONFIG[f3] = "--with-f3,--without-f3,build-deps-f3,rt-deps-f3"
6200 </literallayout>
6201 The <filename>PACKAGECONFIG</filename>
6202 variable itself specifies a space-separated list of the
6203 features to enable.
6204 Following the features, you can determine the behavior of
6205 each feature by providing up to four order-dependent
6206 arguments, which are separated by commas.
6207 You can omit any argument you like but must retain the
6208 separating commas.
6209 The order is important and specifies the following:
6210 <orderedlist>
6211 <listitem><para>Extra arguments
6212 that should be added to the configure script
6213 argument list
6214 (<link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>)
6215 if the feature is enabled.</para></listitem>
6216 <listitem><para>Extra arguments
6217 that should be added to <filename>EXTRA_OECONF</filename>
6218 if the feature is disabled.
6219 </para></listitem>
6220 <listitem><para>Additional build dependencies
6221 (<link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>)
6222 that should be added if the feature is enabled.
6223 </para></listitem>
6224 <listitem><para>Additional runtime dependencies
6225 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
6226 that should be added if the feature is enabled.
6227 </para></listitem>
6228 </orderedlist>
6229 </para>
6230
6231 <para>
6232 Consider the following
6233 <filename>PACKAGECONFIG</filename> block taken from the
6234 <filename>librsvg</filename> recipe.
6235 In this example the feature is <filename>croco</filename>,
6236 which has three arguments that determine the feature's
6237 behavior.
6238 <literallayout class='monospaced'>
6239 PACKAGECONFIG ??= "croco"
6240 PACKAGECONFIG[croco] = "--with-croco,--without-croco,libcroco"
6241 </literallayout>
6242 The <filename>--with-croco</filename> and
6243 <filename>libcroco</filename> arguments apply only if
6244 the feature is enabled.
6245 In this case, <filename>--with-croco</filename> is
6246 added to the configure script argument list and
6247 <filename>libcroco</filename> is added to
6248 <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename>.
6249 On the other hand, if the feature is disabled say through
6250 a <filename>.bbappend</filename> file in another layer, then
6251 the second argument <filename>--without-croco</filename> is
6252 added to the configure script rather than
6253 <filename>--with-croco</filename>.
6254 </para>
6255
6256 <para>
6257 The basic <filename>PACKAGECONFIG</filename> structure
6258 previously described holds true regardless of whether you
6259 are creating a block or changing a block.
6260 When creating a block, use the structure inside your
6261 recipe.
6262 </para>
6263
6264 <para>
6265 If you want to change an existing
6266 <filename>PACKAGECONFIG</filename> block, you can do so
6267 one of two ways:
6268 <itemizedlist>
6269 <listitem><para><emphasis>Append file:</emphasis>
6270 Create an append file named
6271 <replaceable>recipename</replaceable><filename>.bbappend</filename>
6272 in your layer and override the value of
6273 <filename>PACKAGECONFIG</filename>.
6274 You can either completely override the variable:
6275 <literallayout class='monospaced'>
6276 PACKAGECONFIG="f4 f5"
6277 </literallayout>
6278 Or, you can just append the variable:
6279 <literallayout class='monospaced'>
6280 PACKAGECONFIG_append = " f4"
6281 </literallayout></para></listitem>
6282 <listitem><para><emphasis>Configuration file:</emphasis>
6283 This method is identical to changing the block
6284 through an append file except you edit your
6285 <filename>local.conf</filename> or
6286 <filename><replaceable>mydistro</replaceable>.conf</filename> file.
6287 As with append files previously described,
6288 you can either completely override the variable:
6289 <literallayout class='monospaced'>
6290 PACKAGECONFIG_pn-<replaceable>recipename</replaceable>="f4 f5"
6291 </literallayout>
6292 Or, you can just amend the variable:
6293 <literallayout class='monospaced'>
6294 PACKAGECONFIG_append_pn-<replaceable>recipename</replaceable> = " f4"
6295 </literallayout></para></listitem>
6296 </itemizedlist>
6297 </para>
6298 </glossdef>
6299 </glossentry>
6300
6301 <glossentry id='var-PACKAGES'><glossterm>PACKAGES</glossterm>
6302 <glossdef>
6303 <para>The list of packages to be created from the recipe.
6304 The default value is the following:
6305 <literallayout class='monospaced'>
6306 ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
6307 </literallayout></para>
6308 </glossdef>
6309 </glossentry>
6310
6311 <glossentry id='var-PACKAGESPLITFUNCS'><glossterm>PACKAGESPLITFUNCS</glossterm>
6312 <glossdef>
6313 <para>
6314 Specifies a list of functions run to perform additional
6315 splitting of files into individual packages.
6316 Recipes can either prepend to this variable or prepend
6317 to the <filename>populate_packages</filename> function
6318 in order to perform additional package splitting.
6319 In either case, the function should set
6320 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>,
6321 <link linkend='var-FILES'><filename>FILES</filename></link>,
6322 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
6323 and other packaging variables appropriately in order to
6324 perform the desired splitting.
6325 </para>
6326 </glossdef>
6327 </glossentry>
6328
6329 <glossentry id='var-PACKAGES_DYNAMIC'><glossterm>PACKAGES_DYNAMIC</glossterm>
6330 <glossdef>
6331 <para>
6332 A promise that your recipe satisfies runtime dependencies
6333 for optional modules that are found in other recipes.
6334 <filename>PACKAGES_DYNAMIC</filename>
6335 does not actually satisfy the dependencies, it only states that
6336 they should be satisfied.
6337 For example, if a hard, runtime dependency
6338 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
6339 of another package is satisfied
6340 at build time through the <filename>PACKAGES_DYNAMIC</filename>
6341 variable, but a package with the module name is never actually
6342 produced, then the other package will be broken.
6343 Thus, if you attempt to include that package in an image,
6344 you will get a dependency failure from the packaging system
6345 during the
6346 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
6347 task.
6348 </para>
6349 <para>
6350 Typically, if there is a chance that such a situation can
6351 occur and the package that is not created is valid
6352 without the dependency being satisfied, then you should use
6353 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
6354 (a soft runtime dependency) instead of
6355 <filename>RDEPENDS</filename>.
6356 </para>
6357
6358 <para>
6359 For an example of how to use the <filename>PACKAGES_DYNAMIC</filename>
6360 variable when you are splitting packages, see the
6361 "<ulink url='&YOCTO_DOCS_DEV_URL;#handling-optional-module-packaging'>Handling Optional Module Packaging</ulink>" section
6362 in the Yocto Project Development Manual.
6363 </para>
6364 </glossdef>
6365 </glossentry>
6366
6367 <glossentry id='var-PARALLEL_MAKE'><glossterm>PARALLEL_MAKE</glossterm>
6368 <glossdef>
6369 <para>
6370 Extra options passed to the <filename>make</filename>
6371 command during the
6372 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
6373 task in order to specify parallel compilation on the local
6374 build host.
6375 This variable is usually in the form "-j &lt;x&gt;",
6376 where x represents the maximum number of parallel threads
6377 <filename>make</filename> can run.
6378 </para>
6379
6380 <para>
6381 If your development host supports multiple cores, a good
6382 rule of thumb is to set this variable to twice the number
6383 of cores on the host.
6384 If you do not set <filename>PARALLEL_MAKE</filename>, it
6385 defaults to the number of cores your build system has.
6386 <note>
6387 Individual recipes might clear out this variable if
6388 the software being built has problems running its
6389 <filename>make</filename> process in parallel.
6390 </note>
6391 </para>
6392 </glossdef>
6393 </glossentry>
6394
6395 <glossentry id='var-PARALLEL_MAKEINST'><glossterm>PARALLEL_MAKEINST</glossterm>
6396 <glossdef>
6397 <para>
6398 Extra options passed to the
6399 <filename>make install</filename> command during the
6400 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
6401 task in order to specify parallel installation.
6402 This variable defaults to the value of
6403 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>.
6404 <note>
6405 Individual recipes might clear out this variable if
6406 the software being built has problems running its
6407 <filename>make install</filename> process in parallel.
6408 </note>
6409 </para>
6410 </glossdef>
6411 </glossentry>
6412
6413 <glossentry id='var-PATCHRESOLVE'><glossterm>PATCHRESOLVE</glossterm>
6414 <glossdef>
6415 <para>
6416 Determines the action to take when a patch fails.
6417 You can set this variable to one of two values: "noop" and
6418 "user".
6419 </para>
6420
6421 <para>
6422 The default value of "noop" causes the build to simply fail
6423 when the OpenEmbedded build system cannot successfully
6424 apply a patch.
6425 Setting the value to "user" causes the build system to
6426 launch a shell and places you in the right location so that
6427 you can manually resolve the conflicts.
6428 </para>
6429
6430 <para>
6431 Set this variable in your
6432 <filename>local.conf</filename> file.
6433 </para>
6434 </glossdef>
6435 </glossentry>
6436
6437 <glossentry id='var-PATCHTOOL'><glossterm>PATCHTOOL</glossterm>
6438 <glossdef>
6439 <para>
6440 Specifies the utility used to apply patches for a recipe
6441 during the
6442 <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>
6443 task.
6444 You can specify one of three utilities: "patch", "quilt", or
6445 "git".
6446 The default utility used is "quilt" except for the
6447 quilt-native recipe itself.
6448 Because the quilt tool is not available at the
6449 time quilt-native is being patched, it uses "patch".
6450 </para>
6451
6452 <para>
6453 If you wish to use an alternative patching tool, set the
6454 variable in the recipe using one of the following:
6455 <literallayout class='monospaced'>
6456 PATCHTOOL = "patch"
6457 PATCHTOOL = "quilt"
6458 PATCHTOOL = "git"
6459 </literallayout>
6460 </para>
6461 </glossdef>
6462 </glossentry>
6463
6464 <glossentry id='var-PE'><glossterm>PE</glossterm>
6465 <glossdef>
6466 <para>
6467 The epoch of the recipe.
6468 By default, this variable is unset.
6469 The variable is used to make upgrades possible when the
6470 versioning scheme changes in some backwards incompatible
6471 way.
6472 </para>
6473 </glossdef>
6474 </glossentry>
6475
6476 <glossentry id='var-PF'><glossterm>PF</glossterm>
6477 <glossdef>
6478 <para>Specifies the recipe or package name and includes all version and revision
6479 numbers (i.e. <filename>glibc-2.13-r20+svnr15508/</filename> and
6480 <filename>bash-4.2-r1/</filename>).
6481 This variable is comprised of the following:
6482 <literallayout class='monospaced'>
6483 ${<link linkend='var-PN'>PN</link>}-${<link linkend='var-EXTENDPE'>EXTENDPE</link>}${<link linkend='var-PV'>PV</link>}-${<link linkend='var-PR'>PR</link>}
6484 </literallayout></para>
6485 </glossdef>
6486 </glossentry>
6487
6488 <glossentry id='var-PIXBUF_PACKAGES'><glossterm>PIXBUF_PACKAGES</glossterm>
6489 <glossdef>
6490 <para>
6491 When inheriting the
6492 <link linkend='ref-classes-pixbufcache'><filename>pixbufcache</filename></link>
6493 class, this variable identifies packages that contain
6494 the pixbuf loaders used with
6495 <filename>gdk-pixbuf</filename>.
6496 By default, the <filename>pixbufcache</filename> class
6497 assumes that the loaders are in the recipe's main package
6498 (i.e. <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>).
6499 Use this variable if the loaders you need are in a package
6500 other than that main package.
6501 </para>
6502 </glossdef>
6503 </glossentry>
6504
6505 <glossentry id='var-PKG'><glossterm>PKG</glossterm>
6506 <glossdef>
6507 <para>
6508 The name of the resulting package created by the
6509 OpenEmbedded build system.
6510 <note>
6511 When using the <filename>PKG</filename> variable, you
6512 must use a package name override.
6513 </note>
6514 For example, when the
6515 <link linkend='ref-classes-debian'><filename>debian</filename></link>
6516 class renames the output package, it does so by setting
6517 <filename>PKG_<replaceable>packagename</replaceable></filename>.
6518 </para>
6519 </glossdef>
6520 </glossentry>
6521
6522 <glossentry id='var-PKGD'><glossterm>PKGD</glossterm>
6523 <glossdef>
6524 <para>
6525 Points to the destination directory for files to be
6526 packaged before they are split into individual packages.
6527 This directory defaults to the following:
6528 <literallayout class='monospaced'>
6529 ${WORKDIR}/package
6530 </literallayout>
6531 Do not change this default.
6532 </para>
6533 </glossdef>
6534 </glossentry>
6535
6536 <glossentry id='var-PKGDATA_DIR'><glossterm>PKGDATA_DIR</glossterm>
6537 <glossdef>
6538 <para>
6539 Points to a shared, global-state directory that holds data
6540 generated during the packaging process.
6541 During the packaging process, the
6542 <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
6543 task packages data for each recipe and installs it into
6544 this temporary, shared area.
6545 This directory defaults to the following:
6546 <literallayout class='monospaced'>
6547 ${STAGING_DIR_HOST}/pkgdata
6548 </literallayout>
6549 Do not change this default.
6550 </para>
6551 </glossdef>
6552 </glossentry>
6553
6554 <glossentry id='var-PKGDEST'><glossterm>PKGDEST</glossterm>
6555 <glossdef>
6556 <para>
6557 Points to the parent directory for files to be packaged
6558 after they have been split into individual packages.
6559 This directory defaults to the following:
6560 <literallayout class='monospaced'>
6561 ${WORKDIR}/packages-split
6562 </literallayout>
6563 Under this directory, the build system creates
6564 directories for each package specified in
6565 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>.
6566 Do not change this default.
6567 </para>
6568 </glossdef>
6569 </glossentry>
6570
6571 <glossentry id='var-PKGDESTWORK'><glossterm>PKGDESTWORK</glossterm>
6572 <glossdef>
6573 <para>
6574 Points to a temporary work area used by the
6575 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
6576 task to write output from the
6577 <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
6578 task.
6579 The <filename>PKGDESTWORK</filename> location defaults to
6580 the following:
6581 <literallayout class='monospaced'>
6582 ${WORKDIR}/pkgdata
6583 </literallayout>
6584 The <filename>do_packagedata</filename> task then packages
6585 the data in the temporary work area and installs it into a
6586 shared directory pointed to by
6587 <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>.
6588 </para>
6589
6590 <para>
6591 Do not change this default.
6592 </para>
6593 </glossdef>
6594 </glossentry>
6595
6596 <glossentry id='var-PKGE'><glossterm>PKGE</glossterm>
6597 <glossdef>
6598 <para>
6599 The epoch of the output package built by the
6600 OpenEmbedded build system.
6601 By default, <filename>PKGE</filename> is set to
6602 <link linkend='var-PE'><filename>PE</filename></link>.
6603 </para>
6604 </glossdef>
6605 </glossentry>
6606
6607 <glossentry id='var-PKGR'><glossterm>PKGR</glossterm>
6608 <glossdef>
6609 <para>
6610 The revision of the output package built by the
6611 OpenEmbedded build system.
6612 By default, <filename>PKGR</filename> is set to
6613 <link linkend='var-PR'><filename>PR</filename></link>.
6614 </para>
6615 </glossdef>
6616 </glossentry>
6617
6618 <glossentry id='var-PKGV'><glossterm>PKGV</glossterm>
6619 <glossdef>
6620 <para>
6621 The version of the output package built by the
6622 OpenEmbedded build system.
6623 By default, <filename>PKGV</filename> is set to
6624 <link linkend='var-PV'><filename>PV</filename></link>.
6625 </para>
6626 </glossdef>
6627 </glossentry>
6628
6629 <glossentry id='var-PN'><glossterm>PN</glossterm>
6630 <glossdef>
6631 <para>This variable can have two separate functions depending on the context: a recipe
6632 name or a resulting package name.</para>
6633 <para><filename>PN</filename> refers to a recipe name in the context of a file used
6634 by the OpenEmbedded build system as input to create a package.
6635 The name is normally extracted from the recipe file name.
6636 For example, if the recipe is named
6637 <filename>expat_2.0.1.bb</filename>, then the default value of <filename>PN</filename>
6638 will be "expat".</para>
6639 <para>
6640 The variable refers to a package name in the context of a file created or produced by the
6641 OpenEmbedded build system.</para>
6642 <para>If applicable, the <filename>PN</filename> variable also contains any special
6643 suffix or prefix.
6644 For example, using <filename>bash</filename> to build packages for the native
6645 machine, <filename>PN</filename> is <filename>bash-native</filename>.
6646 Using <filename>bash</filename> to build packages for the target and for Multilib,
6647 <filename>PN</filename> would be <filename>bash</filename> and
6648 <filename>lib64-bash</filename>, respectively.
6649 </para>
6650 </glossdef>
6651 </glossentry>
6652
6653 <glossentry id='var-PNBLACKLIST'><glossterm>PNBLACKLIST</glossterm>
6654 <glossdef>
6655 <para>
6656 Lists recipes you do not want the OpenEmbedded build system
6657 to build.
6658 This variable works in conjunction with the
6659 <link linkend='ref-classes-blacklist'><filename>blacklist</filename></link>
6660 class, which the recipe must inherit globally.
6661 </para>
6662
6663 <para>
6664 To prevent a recipe from being built, inherit the class
6665 globally and use the variable in your
6666 <filename>local.conf</filename> file.
6667 Here is an example that prevents
6668 <filename>myrecipe</filename> from being built:
6669 <literallayout class='monospaced'>
6670 INHERIT += "blacklist"
6671 PNBLACKLIST[myrecipe] = "Not supported by our organization."
6672 </literallayout>
6673 </para>
6674 </glossdef>
6675 </glossentry>
6676
6677 <glossentry id='var-PR'><glossterm>PR</glossterm>
6678 <glossdef>
6679 <para>
6680 The revision of the recipe.
6681 The default value for this variable is "r0".
6682 </para>
6683 </glossdef>
6684 </glossentry>
6685
6686 <glossentry id='var-PREFERRED_PROVIDER'><glossterm>PREFERRED_PROVIDER</glossterm>
6687 <glossdef>
6688 <para>
6689 If multiple recipes provide an item, this variable
6690 determines which recipe should be given preference.
6691 You should always suffix the variable with the name of the
6692 provided item, and you should set it to the
6693 <link linkend='var-PN'><filename>PN</filename></link>
6694 of the recipe to which you want to give precedence.
6695 Some examples:
6696 <literallayout class='monospaced'>
6697 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
6698 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
6699 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
6700 </literallayout>
6701 </para>
6702 </glossdef>
6703 </glossentry>
6704
6705 <glossentry id='var-PREFERRED_VERSION'><glossterm>PREFERRED_VERSION</glossterm>
6706 <glossdef>
6707 <para>
6708 If there are multiple versions of recipes available, this
6709 variable determines which recipe should be given preference.
6710 You must always suffix the variable with the
6711 <link linkend='var-PN'><filename>PN</filename></link>
6712 you want to select, and you should set the
6713 <link linkend='var-PV'><filename>PV</filename></link>
6714 accordingly for precedence.
6715 You can use the "<filename>%</filename>" character as a
6716 wildcard to match any number of characters, which can be
6717 useful when specifying versions that contain long revision
6718 numbers that could potentially change.
6719 Here are two examples:
6720 <literallayout class='monospaced'>
6721 PREFERRED_VERSION_python = "2.7.3"
6722 PREFERRED_VERSION_linux-yocto = "3.10%"
6723 </literallayout>
6724 </para>
6725 </glossdef>
6726 </glossentry>
6727
6728 <glossentry id='var-PREMIRRORS'><glossterm>PREMIRRORS</glossterm>
6729 <glossdef>
6730 <para>
6731 Specifies additional paths from which the OpenEmbedded
6732 build system gets source code.
6733 When the build system searches for source code, it first
6734 tries the local download directory.
6735 If that location fails, the build system tries locations
6736 defined by <filename>PREMIRRORS</filename>, the upstream
6737 source, and then locations specified by
6738 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
6739 in that order.
6740 </para>
6741
6742 <para>
6743 Assuming your distribution
6744 (<link linkend='var-DISTRO'><filename>DISTRO</filename></link>)
6745 is "poky", the default value for
6746 <filename>PREMIRRORS</filename> is defined in the
6747 <filename>conf/distro/poky.conf</filename> file in the
6748 <filename>meta-yocto</filename> Git repository.
6749 </para>
6750
6751 <para>
6752 Typically, you could add a specific server for the
6753 build system to attempt before any others by adding
6754 something like the following to the
6755 <filename>local.conf</filename> configuration file in the
6756 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
6757 <literallayout class='monospaced'>
6758 PREMIRRORS_prepend = "\
6759 git://.*/.* http://www.yoctoproject.org/sources/ \n \
6760 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
6761 http://.*/.* http://www.yoctoproject.org/sources/ \n \
6762 https://.*/.* http://www.yoctoproject.org/sources/ \n"
6763 </literallayout>
6764 These changes cause the build system to intercept
6765 Git, FTP, HTTP, and HTTPS requests and direct them to
6766 the <filename>http://</filename> sources mirror.
6767 You can use <filename>file://</filename> URLs to point
6768 to local directories or network shares as well.
6769 </para>
6770 </glossdef>
6771 </glossentry>
6772
6773 <glossentry id='var-PRINC'><glossterm>PRINC</glossterm>
6774 <glossdef>
6775
6776 <para>
6777 The <filename>PRINC</filename> variable has been deprecated
6778 and triggers a warning if detected during a build.
6779 For
6780 <link linkend='var-PR'><filename>PR</filename></link>
6781 increments on changes, use the PR service instead.
6782 You can find out more about this service in the
6783 "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>Working With a PR Service</ulink>"
6784 section in the Yocto Project Development Manual.
6785 </para>
6786<!--
6787
6788 <para>
6789 Causes the
6790 <link linkend='var-PR'><filename>PR</filename></link>
6791 variable of <filename>.bbappend</filename> files to
6792 dynamically increment.
6793 This increment minimizes the impact of layer ordering.
6794 </para>
6795
6796 <para>
6797 In order to ensure multiple <filename>.bbappend</filename>
6798 files can co-exist,
6799 <filename>PRINC</filename> should be self-referencing.
6800 This variable defaults to 0.
6801 </para>
6802
6803 <para>
6804 Following is an example that increments
6805 <filename>PR</filename> by two:
6806 <literallayout class='monospaced'>
6807 PRINC := "${@int(PRINC) + 2}"
6808 </literallayout>
6809 It is advisable not to use strings such as ".= '.1'" with the variable because
6810 this usage is very sensitive to layer ordering.
6811 You should avoid explicit assignments as they cannot
6812 adequately represent multiple
6813 <filename>.bbappend</filename> files.
6814 </para>
6815-->
6816 </glossdef>
6817 </glossentry>
6818
6819 <glossentry id='var-PRIVATE_LIBS'><glossterm>PRIVATE_LIBS</glossterm>
6820 <glossdef>
6821 <para>
6822 Specifies libraries installed within a recipe that
6823 should be ignored by the OpenEmbedded build system's
6824 shared library resolver.
6825 This variable is typically used when software being
6826 built by a recipe has its own private versions of a
6827 library normally provided by another recipe.
6828 In this case, you would not want the package containing
6829 the private libraries to be set as a dependency on other
6830 unrelated packages that should instead depend on the
6831 package providing the standard version of the library.
6832 </para>
6833
6834 <para>
6835 Libraries specified in this variable should be specified
6836 by their file name.
6837 For example, from the Firefox recipe in meta-browser:
6838 <literallayout class='monospaced'>
6839 PRIVATE_LIBS = "libmozjs.so \
6840 libxpcom.so \
6841 libnspr4.so \
6842 libxul.so \
6843 libmozalloc.so \
6844 libplc4.so \
6845 libplds4.so"
6846 </literallayout>
6847 </para>
6848 </glossdef>
6849 </glossentry>
6850
6851 <glossentry id='var-PROVIDES'><glossterm>PROVIDES</glossterm>
6852 <glossdef>
6853 <para>
6854 A list of aliases by which a particular recipe can be
6855 known.
6856 By default, a recipe's own
6857 <filename><link linkend='var-PN'>PN</link></filename>
6858 is implicitly already in its <filename>PROVIDES</filename>
6859 list.
6860 If a recipe uses <filename>PROVIDES</filename>, the
6861 additional aliases are synonyms for the recipe and can
6862 be useful satisfying dependencies of other recipes during
6863 the build as specified by
6864 <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename>.
6865 </para>
6866
6867 <para>
6868 Consider the following example
6869 <filename>PROVIDES</filename> statement from a recipe
6870 file <filename>libav_0.8.11.bb</filename>:
6871 <literallayout class='monospaced'>
6872 PROVIDES += "libpostproc"
6873 </literallayout>
6874 The <filename>PROVIDES</filename> statement results in
6875 the "libav" recipe also being known as "libpostproc".
6876 </para>
6877 </glossdef>
6878 </glossentry>
6879
6880 <glossentry id='var-PRSERV_HOST'><glossterm>PRSERV_HOST</glossterm>
6881 <glossdef>
6882 <para>
6883 The network based
6884 <link linkend='var-PR'><filename>PR</filename></link>
6885 service host and port.
6886 </para>
6887
6888 <para>
6889 The <filename>conf/local.conf.sample.extended</filename>
6890 configuration file in the
6891 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
6892 shows how the <filename>PRSERV_HOST</filename> variable is
6893 set:
6894 <literallayout class='monospaced'>
6895 PRSERV_HOST = "localhost:0"
6896 </literallayout>
6897 You must set the variable if you want to automatically
6898 start a local
6899 <ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>PR service</ulink>.
6900 You can set <filename>PRSERV_HOST</filename> to other
6901 values to use a remote PR service.
6902 </para>
6903 </glossdef>
6904 </glossentry>
6905
6906 <glossentry id='var-PTEST_ENABLED'><glossterm>PTEST_ENABLED</glossterm>
6907 <glossdef>
6908 <para>
6909 Specifies whether or not
6910 <ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Package Test</ulink>
6911 (ptest) functionality is enabled when building a recipe.
6912 You should not set this variable directly.
6913 Enabling and disabling building Package Tests
6914 at build time should be done by adding "ptest" to (or
6915 removing it from)
6916 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
6917 </para>
6918 </glossdef>
6919 </glossentry>
6920
6921 <glossentry id='var-PV'><glossterm>PV</glossterm>
6922 <glossdef>
6923 <para>
6924 The version of the recipe.
6925 The version is normally extracted from the recipe filename.
6926 For example, if the recipe is named
6927 <filename>expat_2.0.1.bb</filename>, then the default value of <filename>PV</filename>
6928 will be "2.0.1".
6929 <filename>PV</filename> is generally not overridden within
6930 a recipe unless it is building an unstable (i.e. development) version from a source code repository
6931 (e.g. Git or Subversion).
6932 </para>
6933 </glossdef>
6934 </glossentry>
6935
6936 <glossentry id='var-PYTHON_ABI'><glossterm>PYTHON_ABI</glossterm>
6937 <glossdef>
6938 <para>
6939 When used by recipes that inherit the
6940 <link linkend='ref-classes-distutils3'><filename>distutils3</filename></link>,
6941 <link linkend='ref-classes-setuptools3'><filename>setuptools3</filename></link>,
6942 <link linkend='ref-classes-distutils'><filename>distutils</filename></link>,
6943 or
6944 <link linkend='ref-classes-setuptools'><filename>setuptools</filename></link>
6945 classes, denotes the Application Binary Interface (ABI)
6946 currently in use for Python.
6947 By default, the ABI is "m".
6948 You do not have to set this variable as the OpenEmbedded
6949 build system sets it for you.
6950 </para>
6951
6952 <para>
6953 The OpenEmbedded build system uses the ABI to construct
6954 directory names used when installing the Python headers
6955 and libraries in sysroot
6956 (e.g. <filename>.../python3.3m/...</filename>).
6957 </para>
6958
6959 <para>
6960 Recipes that inherit the
6961 <link linkend='ref-classes-distutils'><filename>distutils</filename></link>
6962 class during cross-builds also use this variable to
6963 locate the headers and libraries of the appropriate Python
6964 that the extension is targeting.
6965 </para>
6966 </glossdef>
6967 </glossentry>
6968
6969 <glossentry id='var-PYTHON_PN'><glossterm>PYTHON_PN</glossterm>
6970 <glossdef>
6971 <para>
6972 When used by recipes that inherit the
6973 <link linkend='ref-classes-distutils3'><filename>distutils3</filename></link>,
6974 <link linkend='ref-classes-setuptools3'><filename>setuptools3</filename></link>,
6975 <link linkend='ref-classes-distutils'><filename>distutils</filename></link>,
6976 or
6977 <link linkend='ref-classes-setuptools'><filename>setuptools</filename></link>
6978 classes, specifies the major Python version being built.
6979 For Python 2.x, <filename>PYTHON_PN</filename> would
6980 be "python2". For Python 3.x, the variable would be
6981 "python3".
6982 You do not have to set this variable as the
6983 OpenEmbedded build system automatically sets it for you.
6984 </para>
6985
6986 <para>
6987 The variable allows recipes to use common infrastructure
6988 such as the following:
6989 <literallayout class='monospaced'>
6990 DEPENDS += "${PYTHON_PN}-native"
6991 </literallayout>
6992 In the previous example, the version of the dependency
6993 is <filename>PYTHON_PN</filename>.
6994 </para>
6995 </glossdef>
6996 </glossentry>
6997
6998 </glossdiv>
6999
7000 <glossdiv id='var-glossary-q'><title>Q</title>
7001
7002 <glossentry id='var-QMAKE_PROFILES'><glossterm>QMAKE_PROFILES</glossterm>
7003 <glossdef>
7004 <para>
7005 Specifies your own subset of <filename>.pro</filename>
7006 files to be built for use with
7007 <filename>qmake</filename>.
7008 If you do not set this variable, all
7009 <filename>.pro</filename> files in the directory pointed to
7010 by <link linkend='var-S'><filename>S</filename></link>
7011 will be built by default.
7012 </para>
7013
7014 <para>
7015 This variable is used with recipes that inherit the
7016 <link linkend='ref-classes-qmake*'><filename>qmake_base</filename></link>
7017 class or other classes that inherit
7018 <filename>qmake_base</filename>.
7019 </para>
7020 </glossdef>
7021 </glossentry>
7022
7023 </glossdiv>
7024
7025 <glossdiv id='var-glossary-r'><title>R</title>
7026
7027 <glossentry id='var-RCONFLICTS'><glossterm>RCONFLICTS</glossterm>
7028 <glossdef>
7029 <para>
7030 The list of packages that conflict with packages.
7031 Note that packages will not be installed if conflicting
7032 packages are not first removed.
7033 </para>
7034
7035 <para>
7036 Like all package-controlling variables, you must always use
7037 them in conjunction with a package name override.
7038 Here is an example:
7039 <literallayout class='monospaced'>
7040 RCONFLICTS_${PN} = "<replaceable>another-conflicting-package-name</replaceable>"
7041 </literallayout>
7042 </para>
7043
7044 <para>
7045 BitBake, which the OpenEmbedded build system uses, supports
7046 specifying versioned dependencies.
7047 Although the syntax varies depending on the packaging
7048 format, BitBake hides these differences from you.
7049 Here is the general syntax to specify versions with
7050 the <filename>RCONFLICTS</filename> variable:
7051 <literallayout class='monospaced'>
7052 RCONFLICTS_${PN} = "<replaceable>package</replaceable> (<replaceable>operator</replaceable> <replaceable>version</replaceable>)"
7053 </literallayout>
7054 For <filename>operator</filename>, you can specify the
7055 following:
7056 <literallayout class='monospaced'>
7057 =
7058 &lt;
7059 &gt;
7060 &lt;=
7061 &gt;=
7062 </literallayout>
7063 For example, the following sets up a dependency on version
7064 1.2 or greater of the package <filename>foo</filename>:
7065 <literallayout class='monospaced'>
7066 RCONFLICTS_${PN} = "foo (>= 1.2)"
7067 </literallayout>
7068 </para>
7069 </glossdef>
7070 </glossentry>
7071
7072 <glossentry id='var-RDEPENDS'><glossterm>RDEPENDS</glossterm>
7073 <glossdef>
7074 <para>
7075 Lists a package's runtime dependencies (i.e. other packages)
7076 that must be installed in order for the built package to run
7077 correctly.
7078 If a package in this list cannot be found during the build,
7079 you will get a build error.
7080 </para>
7081
7082 <para>
7083 When you use the <filename>RDEPENDS</filename> variable
7084 in a recipe, you are essentially stating that the recipe's
7085 <link linkend='ref-tasks-build'><filename>do_build</filename></link>
7086 task depends on the existence of a specific package.
7087 Consider this simple example for two recipes named "a" and
7088 "b" that produce similarly named IPK packages.
7089 In this example, the <filename>RDEPENDS</filename>
7090 statement appears in the "a" recipe:
7091 <literallayout class='monospaced'>
7092 RDEPENDS_${PN} = "b"
7093 </literallayout>
7094 Here, the dependency is such that the
7095 <filename>do_build</filename> task for recipe "a" depends
7096 on the
7097 <link linkend='ref-tasks-package_write_ipk'><filename>do_package_write_ipk</filename></link>
7098 task of recipe "b".
7099 This means the package file for "b" must be available when
7100 the output for recipe "a" has been completely built.
7101 More importantly, package "a" will be marked as depending
7102 on package "b" in a manner that is understood by the
7103 package manager.
7104 </para>
7105
7106 <para>
7107 The names of the packages you list within
7108 <filename>RDEPENDS</filename> must be the names of other
7109 packages - they cannot be recipe names.
7110 Although package names and recipe names usually match,
7111 the important point here is that you are
7112 providing package names within the
7113 <filename>RDEPENDS</filename> variable.
7114 For an example of the default list of packages created from
7115 a recipe, see the
7116 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
7117 variable.
7118 </para>
7119
7120 <para>
7121 Because the <filename>RDEPENDS</filename> variable applies
7122 to packages being built, you should always use the variable
7123 in a form with an attached package name.
7124 For example, suppose you are building a development package
7125 that depends on the <filename>perl</filename> package.
7126 In this case, you would use the following
7127 <filename>RDEPENDS</filename> statement:
7128 <literallayout class='monospaced'>
7129 RDEPENDS_${PN}-dev += "perl"
7130 </literallayout>
7131 In the example, the development package depends on
7132 the <filename>perl</filename> package.
7133 Thus, the <filename>RDEPENDS</filename> variable has the
7134 <filename>${PN}-dev</filename> package name as part of the
7135 variable.
7136 </para>
7137
7138 <para>
7139 The package name you attach to the
7140 <filename>RDEPENDS</filename> variable must appear
7141 as it would in the <filename>PACKAGES</filename>
7142 namespace before any renaming of the output package by
7143 classes like
7144 <link linkend='ref-classes-debian'><filename>debian</filename></link>.
7145 </para>
7146
7147 <para>
7148 In many cases you do not need to explicitly add
7149 runtime dependencies using
7150 <filename>RDEPENDS</filename> since some automatic
7151 handling occurs:
7152 <itemizedlist>
7153 <listitem><para><emphasis><filename>shlibdeps</filename></emphasis>: If
7154 a runtime package contains a shared library
7155 (<filename>.so</filename>), the build
7156 processes the library in order to determine other
7157 libraries to which it is dynamically linked.
7158 The build process adds these libraries to
7159 <filename>RDEPENDS</filename> when creating the runtime
7160 package.</para></listitem>
7161 <listitem><para><emphasis><filename>pcdeps</filename></emphasis>: If
7162 the package ships a <filename>pkg-config</filename>
7163 information file, the build process uses this file
7164 to add items to the <filename>RDEPENDS</filename>
7165 variable to create the runtime packages.
7166 </para></listitem>
7167 </itemizedlist>
7168 </para>
7169
7170 <para>
7171 BitBake, which the OpenEmbedded build system uses, supports
7172 specifying versioned dependencies.
7173 Although the syntax varies depending on the packaging
7174 format, BitBake hides these differences from you.
7175 Here is the general syntax to specify versions with
7176 the <filename>RDEPENDS</filename> variable:
7177 <literallayout class='monospaced'>
7178 RDEPENDS_${PN} = "<replaceable>package</replaceable> (<replaceable>operator</replaceable> <replaceable>version</replaceable>)"
7179 </literallayout>
7180 For <filename>operator</filename>, you can specify the
7181 following:
7182 <literallayout class='monospaced'>
7183 =
7184 &lt;
7185 &gt;
7186 &lt;=
7187 &gt;=
7188 </literallayout>
7189 For example, the following sets up a dependency on version
7190 1.2 or greater of the package <filename>foo</filename>:
7191 <literallayout class='monospaced'>
7192 RDEPENDS_${PN} = "foo (>= 1.2)"
7193 </literallayout>
7194 </para>
7195
7196 <para>
7197 For information on build-time dependencies, see the
7198 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
7199 variable.
7200 </para>
7201 </glossdef>
7202 </glossentry>
7203
7204 <glossentry id='var-REQUIRED_DISTRO_FEATURES'><glossterm>REQUIRED_DISTRO_FEATURES</glossterm>
7205 <glossdef>
7206 <para>
7207 When inheriting the
7208 <link linkend='ref-classes-distro_features_check'><filename>distro_features_check</filename></link>
7209 class, this
7210 variable identifies distribution features that must
7211 exist in the current configuration in order for the
7212 OpenEmbedded build system to build the recipe.
7213 In other words, if the
7214 <filename>REQUIRED_DISTRO_FEATURES</filename> variable
7215 lists a feature that does not appear in
7216 <filename>DISTRO_FEATURES</filename> within the
7217 current configuration, an error occurs and the
7218 build stops.
7219 </para>
7220 </glossdef>
7221 </glossentry>
7222
7223 <glossentry id='var-RM_OLD_IMAGE'><glossterm>RM_OLD_IMAGE</glossterm>
7224 <glossdef>
7225 <para>
7226 Reclaims disk space by removing previously built
7227 versions of the same image from the
7228 <filename>images</filename> directory pointed to by the
7229 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>
7230 variable.
7231 </para>
7232
7233 <para>
7234 Set this variable to "1" in your
7235 <filename>local.conf</filename> file to remove these
7236 images.
7237 </para>
7238 </glossdef>
7239 </glossentry>
7240
7241 <glossentry id='var-RM_WORK_EXCLUDE'><glossterm>RM_WORK_EXCLUDE</glossterm>
7242 <glossdef>
7243 <para>
7244 With <filename>rm_work</filename> enabled, this
7245 variable specifies a list of recipes whose work directories
7246 should not be removed.
7247 See the "<link linkend='ref-classes-rm-work'><filename>rm_work.bbclass</filename></link>"
7248 section for more details.
7249 </para>
7250 </glossdef>
7251 </glossentry>
7252
7253 <glossentry id='var-ROOT_HOME'><glossterm>ROOT_HOME</glossterm>
7254 <glossdef>
7255 <para>
7256 Defines the root home directory.
7257 By default, this directory is set as follows in the
7258 BitBake configuration file:
7259 <literallayout class='monospaced'>
7260 ROOT_HOME ??= "/home/root"
7261 </literallayout>
7262 <note>
7263 This default value is likely used because some
7264 embedded solutions prefer to have a read-only root
7265 filesystem and prefer to keep writeable data in one
7266 place.
7267 </note>
7268 </para>
7269
7270 <para>
7271 You can override the default by setting the variable
7272 in any layer or in the <filename>local.conf</filename> file.
7273 Because the default is set using a "weak" assignment
7274 (i.e. "??="), you can use either of the following forms
7275 to define your override:
7276 <literallayout class='monospaced'>
7277 ROOT_HOME = "/root"
7278 ROOT_HOME ?= "/root"
7279 </literallayout>
7280 These override examples use <filename>/root</filename>,
7281 which is probably the most commonly used override.
7282 </para>
7283 </glossdef>
7284 </glossentry>
7285
7286 <glossentry id='var-ROOTFS'><glossterm>ROOTFS</glossterm>
7287 <glossdef>
7288 <para>
7289 Indicates a filesystem image to include as the root
7290 filesystem.
7291 </para>
7292
7293 <para>
7294 The <filename>ROOTFS</filename> variable is an optional
7295 variable used with the
7296 <link linkend='ref-classes-bootimg'><filename>bootimg</filename></link>
7297 class.
7298 </para>
7299 </glossdef>
7300 </glossentry>
7301
7302 <glossentry id='var-ROOTFS_POSTPROCESS_COMMAND'><glossterm>ROOTFS_POSTPROCESS_COMMAND</glossterm>
7303 <glossdef>
7304 <para>
7305 Added by classes to run post processing commands once the
7306 OpenEmbedded build system has created the root filesystem.
7307 You can specify shell commands separated by semicolons:
7308 <literallayout class='monospaced'>
7309 ROOTFS_POSTPROCESS_COMMAND += "<replaceable>shell_command</replaceable>; ... "
7310 </literallayout>
7311 If you need to pass the path to the root filesystem within
7312 the command, you can use
7313 <filename>${IMAGE_ROOTFS}</filename>, which points to
7314 the root filesystem image.
7315 See the
7316 <link linkend='var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></link>
7317 variable for more information.
7318 </para>
7319 </glossdef>
7320 </glossentry>
7321
7322 <glossentry id='var-RPROVIDES'><glossterm>RPROVIDES</glossterm>
7323 <glossdef>
7324 <para>
7325 A list of package name aliases that a package also provides.
7326 These aliases are useful for satisfying runtime dependencies
7327 of other packages both during the build and on the target
7328 (as specified by
7329 <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename>).
7330 <note>
7331 A package's own name is implicitly already in its
7332 <filename>RPROVIDES</filename> list.
7333 </note>
7334 </para>
7335 <para>
7336 As with all package-controlling variables, you must always
7337 use the variable in conjunction with a package name override.
7338 Here is an example:
7339 <literallayout class='monospaced'>
7340 RPROVIDES_${PN} = "widget-abi-2"
7341 </literallayout>
7342 </para>
7343 </glossdef>
7344 </glossentry>
7345
7346 <glossentry id='var-RRECOMMENDS'><glossterm>RRECOMMENDS</glossterm>
7347 <glossdef>
7348 <para>
7349 A list of packages that extends the usability of a package
7350 being built.
7351 The package being built does not depend on this list of
7352 packages in order to successfully build, but rather
7353 uses them for extended usability.
7354 To specify runtime dependencies for packages, see the
7355 <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename>
7356 variable.
7357 </para>
7358
7359 <para>
7360 The package manager will automatically install the
7361 <filename>RRECOMMENDS</filename> list of packages when
7362 installing the built package.
7363 However, you can prevent listed packages from being
7364 installed by using the
7365 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>,
7366 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>,
7367 and
7368 <link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
7369 variables.
7370 </para>
7371
7372 <para>
7373 Packages specified in
7374 <filename>RRECOMMENDS</filename> need not actually be
7375 produced.
7376 However, a recipe must exist that provides each package,
7377 either through the
7378 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
7379 or
7380 <link linkend='var-PACKAGES_DYNAMIC'><filename>PACKAGES_DYNAMIC</filename></link>
7381 variables or the
7382 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>
7383 variable, or an error will occur during the build.
7384 If such a recipe does exist and the package is not produced,
7385 the build continues without error.
7386 </para>
7387
7388 <para>
7389 Because the <filename>RRECOMMENDS</filename> variable
7390 applies to packages being built, you should always attach
7391 an override to the variable to specify the particular
7392 package whose usability is being extended.
7393 For example, suppose you are building a development package
7394 that is extended to support wireless functionality.
7395 In this case, you would use the following:
7396 <literallayout class='monospaced'>
7397 RRECOMMENDS_${PN}-dev += "<replaceable>wireless_package_name</replaceable>"
7398 </literallayout>
7399 In the example, the package name
7400 (<filename>${<link linkend='var-PN'>PN</link>}-dev</filename>)
7401 must appear as it would in the
7402 <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
7403 namespace before any renaming of the output package by
7404 classes such as <filename>debian.bbclass</filename>.
7405 </para>
7406
7407 <para>
7408 BitBake, which the OpenEmbedded build system uses, supports
7409 specifying versioned recommends.
7410 Although the syntax varies depending on the packaging
7411 format, BitBake hides these differences from you.
7412 Here is the general syntax to specify versions with
7413 the <filename>RRECOMMENDS</filename> variable:
7414 <literallayout class='monospaced'>
7415 RRECOMMENDS_${PN} = "<replaceable>package</replaceable> (<replaceable>operator</replaceable> <replaceable>version</replaceable>)"
7416 </literallayout>
7417 For <filename>operator</filename>, you can specify the
7418 following:
7419 <literallayout class='monospaced'>
7420 =
7421 &lt;
7422 &gt;
7423 &lt;=
7424 &gt;=
7425 </literallayout>
7426 For example, the following sets up a recommend on version
7427 1.2 or greater of the package <filename>foo</filename>:
7428 <literallayout class='monospaced'>
7429 RRECOMMENDS_${PN} = "foo (>= 1.2)"
7430 </literallayout>
7431 </para>
7432 </glossdef>
7433 </glossentry>
7434
7435 <glossentry id='var-RREPLACES'><glossterm>RREPLACES</glossterm>
7436 <glossdef>
7437 <para>
7438 A list of packages replaced by a package.
7439 The package manager uses this variable to determine which
7440 package should be installed to replace other package(s)
7441 during an upgrade.
7442 In order to also have the other package(s) removed at the
7443 same time, you must add the name of the other
7444 package to the
7445 <filename><link linkend='var-RCONFLICTS'>RCONFLICTS</link></filename> variable.
7446 </para>
7447 <para>
7448 As with all package-controlling variables, you must use
7449 this variable in conjunction with a package name
7450 override.
7451 Here is an example:
7452 <literallayout class='monospaced'>
7453 RREPLACES_${PN} = "<replaceable>other-package-being-replaced</replaceable>"
7454 </literallayout>
7455 </para>
7456
7457 <para>
7458 BitBake, which the OpenEmbedded build system uses, supports
7459 specifying versioned replacements.
7460 Although the syntax varies depending on the packaging
7461 format, BitBake hides these differences from you.
7462 Here is the general syntax to specify versions with
7463 the <filename>RREPLACES</filename> variable:
7464 <literallayout class='monospaced'>
7465 RREPLACES_${PN} = "<replaceable>package</replaceable> (<replaceable>operator</replaceable> <replaceable>version</replaceable>)"
7466 </literallayout>
7467 For <filename>operator</filename>, you can specify the
7468 following:
7469 <literallayout class='monospaced'>
7470 =
7471 &lt;
7472 &gt;
7473 &lt;=
7474 &gt;=
7475 </literallayout>
7476 For example, the following sets up a replacement using
7477 version 1.2 or greater of the package
7478 <filename>foo</filename>:
7479 <literallayout class='monospaced'>
7480 RREPLACES_${PN} = "foo (>= 1.2)"
7481 </literallayout>
7482 </para>
7483 </glossdef>
7484 </glossentry>
7485
7486 <glossentry id='var-RSUGGESTS'><glossterm>RSUGGESTS</glossterm>
7487 <glossdef>
7488 <para>
7489 A list of additional packages that you can suggest for
7490 installation by the package manager at the time a package
7491 is installed.
7492 Not all package managers support this functionality.
7493 </para>
7494 <para>
7495 As with all package-controlling variables, you must always
7496 use this variable in conjunction with a package name
7497 override.
7498 Here is an example:
7499 <literallayout class='monospaced'>
7500 RSUGGESTS_${PN} = "<replaceable>useful-package</replaceable> <replaceable>another-package</replaceable>"
7501 </literallayout>
7502 </para>
7503 </glossdef>
7504 </glossentry>
7505
7506 </glossdiv>
7507
7508 <glossdiv id='var-glossary-s'><title>S</title>
7509
7510 <glossentry id='var-S'><glossterm>S</glossterm>
7511 <glossdef>
7512 <para>
7513 The location in the
7514 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
7515 where unpacked recipe source code resides.
7516 This location is within the work directory
7517 (<filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>),
7518 which is not static.
7519 The unpacked source location depends on the recipe name
7520 (<filename><link linkend='var-PN'>PN</link></filename>) and
7521 recipe version
7522 (<filename><link linkend='var-PV'>PV</link></filename>) as
7523 follows:
7524 <literallayout class='monospaced'>
7525 ${WORKDIR}/${PN}-${PV}
7526 </literallayout>
7527 As an example, assume a
7528 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
7529 top-level folder named <filename>poky</filename> and a
7530 default Build Directory at <filename>poky/build</filename>.
7531 In this case, the work directory the build system uses
7532 to keep the unpacked recipe for <filename>db</filename>
7533 is the following:
7534 <literallayout class='monospaced'>
7535 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
7536 </literallayout>
7537 </para>
7538 </glossdef>
7539 </glossentry>
7540
7541 <glossentry id='var-SANITY_REQUIRED_UTILITIES'><glossterm>SANITY_REQUIRED_UTILITIES</glossterm>
7542 <glossdef>
7543 <para>
7544 Specifies a list of command-line utilities that should be
7545 checked for during the initial sanity checking process when
7546 running BitBake.
7547 If any of the utilities are not installed on the build host,
7548 then BitBake immediately exits with an error.
7549 </para>
7550 </glossdef>
7551 </glossentry>
7552
7553 <glossentry id='var-SANITY_TESTED_DISTROS'><glossterm>SANITY_TESTED_DISTROS</glossterm>
7554 <glossdef>
7555 <para>
7556 A list of the host distribution identifiers that the
7557 build system has been tested against.
7558 Identifiers consist of the host distributor ID
7559 followed by the release,
7560 as reported by the <filename>lsb_release</filename> tool
7561 or as read from <filename>/etc/lsb-release</filename>.
7562 Separate the list items with explicit newline
7563 characters (<filename>\n</filename>).
7564 If <filename>SANITY_TESTED_DISTROS</filename> is not empty
7565 and the current value of
7566 <link linkend='var-NATIVELSBSTRING'><filename>NATIVELSBSTRING</filename></link>
7567 does not appear in the list, then the build system reports
7568 a warning that indicates the current host distribution has
7569 not been tested as a build host.
7570 </para>
7571 </glossdef>
7572 </glossentry>
7573
7574 <glossentry id='var-SDK_ARCH'><glossterm>SDK_ARCH</glossterm>
7575 <glossdef>
7576 <para>
7577 The target architecture for the SDK.
7578 Typically, you do not directly set this variable.
7579 Instead, use
7580 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>.
7581 </para>
7582 </glossdef>
7583 </glossentry>
7584
7585 <glossentry id='var-SDK_DEPLOY'><glossterm>SDK_DEPLOY</glossterm>
7586 <glossdef>
7587 <para>
7588 The directory set up and used by the
7589 <link linkend='ref-classes-populate-sdk'><filename>populate_sdk_base</filename></link>
7590 to which the SDK is deployed.
7591 The <filename>populate_sdk_base</filename> class defines
7592 <filename>SDK_DEPLOY</filename> as follows:
7593 <literallayout class='monospaced'>
7594 SDK_DEPLOY = "${<link linkend='var-TMPDIR'>TMPDIR</link>}/deploy/sdk"
7595 </literallayout>
7596 </para>
7597 </glossdef>
7598 </glossentry>
7599
7600 <glossentry id='var-SDK_DIR'><glossterm>SDK_DIR</glossterm>
7601 <glossdef>
7602 <para>
7603 The parent directory used by the OpenEmbedded build system
7604 when creating SDK output.
7605 The
7606 <link linkend='ref-classes-populate-sdk-*'><filename>populate_sdk_base</filename></link>
7607 class defines the variable as follows:
7608 <literallayout class='monospaced'>
7609 SDK_DIR = "${<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>}/sdk"
7610 </literallayout>
7611 <note>
7612 The <filename>SDK_DIR</filename> directory is a
7613 temporary directory as it is part of
7614 <filename>WORKDIR</filename>.
7615 The final output directory is
7616 <link linkend='var-SDK_DEPLOY'><filename>SDK_DEPLOY</filename></link>.
7617 </note>
7618 </para>
7619 </glossdef>
7620 </glossentry>
7621
7622 <glossentry id='var-SDK_NAME'><glossterm>SDK_NAME</glossterm>
7623 <glossdef>
7624 <para>
7625 The base name for SDK output files.
7626 The name is derived from the
7627 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>,
7628 <link linkend='var-TCLIBC'><filename>TCLIBC</filename></link>,
7629 <link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link>,
7630 <link linkend='var-IMAGE_BASENAME'><filename>IMAGE_BASENAME</filename></link>,
7631 and
7632 <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link>
7633 variables:
7634 <literallayout class='monospaced'>
7635 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
7636 </literallayout>
7637 </para>
7638 </glossdef>
7639 </glossentry>
7640
7641 <glossentry id='var-SDK_OUTPUT'><glossterm>SDK_OUTPUT</glossterm>
7642 <glossdef>
7643 <para>
7644 The location used by the OpenEmbedded build system when
7645 creating SDK output.
7646 The
7647 <link linkend='ref-classes-populate-sdk-*'><filename>populate_sdk_base</filename></link>
7648 class defines the variable as follows:
7649 <literallayout class='monospaced'>
7650 SDK_OUTPUT = "${<link linkend='var-SDK_DIR'>SDK_DIR</link>}/image"
7651 </literallayout>
7652 <note>
7653 The <filename>SDK_OUTPUT</filename> directory is a
7654 temporary directory as it is part of
7655 <filename>WORKDIR</filename> by way of
7656 <filename>SDK_DIR</filename>.
7657 The final output directory is
7658 <link linkend='var-SDK_DEPLOY'><filename>SDK_DEPLOY</filename></link>.
7659 </note>
7660
7661 </para>
7662 </glossdef>
7663 </glossentry>
7664
7665 <glossentry id='var-SDK_PACKAGE_ARCHS'><glossterm>SDK_PACKAGE_ARCHS</glossterm>
7666 <glossdef>
7667 <para>
7668 Specifies a list of architectures compatible with
7669 the SDK machine.
7670 This variable is set automatically and should not
7671 normally be hand-edited.
7672 Entries are separated using spaces and listed in order
7673 of priority.
7674 The default value for
7675 <filename>SDK_PACKAGE_ARCHS</filename> is "all any noarch
7676 ${SDK_ARCH}-${SDKPKGSUFFIX}".
7677 </para>
7678 </glossdef>
7679 </glossentry>
7680
7681 <glossentry id='var-SDKIMAGE_FEATURES'><glossterm>SDKIMAGE_FEATURES</glossterm>
7682 <glossdef>
7683 <para>Equivalent to
7684 <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>.
7685 However, this variable applies to the SDK generated from an
7686 image using the following command:
7687 <literallayout class='monospaced'>
7688 $ bitbake -c populate_sdk <replaceable>imagename</replaceable>
7689 </literallayout>
7690 </para>
7691 </glossdef>
7692 </glossentry>
7693
7694 <glossentry id='var-SDKMACHINE'><glossterm>SDKMACHINE</glossterm>
7695 <glossdef>
7696 <para>
7697 The machine for which the Application Development Toolkit
7698 (ADT) or SDK is built.
7699 In other words, the SDK or ADT is built such that it
7700 runs on the target you specify with the
7701 <filename>SDKMACHINE</filename> value.
7702 The value points to a corresponding
7703 <filename>.conf</filename> file under
7704 <filename>conf/machine-sdk/</filename>.
7705 </para>
7706
7707 <para>
7708 You can use "i686" and "x86_64" as possible values
7709 for this variable. The variable defaults to "i686"
7710 and is set in the local.conf file in the Build Directory.
7711 <literallayout class='monospaced'>
7712 SDKMACHINE ?= "i686"
7713 </literallayout>
7714 <note>
7715 You cannot set the <filename>SDKMACHINE</filename>
7716 variable in your distribution configuration file.
7717 If you do, the configuration will not take affect.
7718 </note>
7719 </para>
7720 </glossdef>
7721 </glossentry>
7722
7723 <glossentry id='var-SDKPATH'><glossterm>SDKPATH</glossterm>
7724 <glossdef>
7725 <para>
7726 Defines the path offered to the user for installation
7727 of the SDK that is generated by the OpenEmbedded build
7728 system.
7729 The path appears as the default location for installing
7730 the SDK when you run the SDK's installation script.
7731 You can override the offered path when you run the
7732 script.
7733 </para>
7734 </glossdef>
7735 </glossentry>
7736
7737 <glossentry id='var-SECTION'><glossterm>SECTION</glossterm>
7738 <glossdef>
7739 <para>The section in which packages should be categorized.
7740 Package management utilities can make use of this variable.</para>
7741 </glossdef>
7742 </glossentry>
7743
7744 <glossentry id='var-SELECTED_OPTIMIZATION'><glossterm>SELECTED_OPTIMIZATION</glossterm>
7745 <glossdef>
7746 <para>
7747 Specifies the optimization flags passed to the C compiler
7748 when building for the target.
7749 The flags are passed through the default value of the
7750 <link linkend='var-TARGET_CFLAGS'><filename>TARGET_CFLAGS</filename></link>
7751 variable.
7752 </para>
7753
7754 <para>
7755 The <filename>SELECTED_OPTIMIZATION</filename> variable
7756 takes the value of
7757 <filename><link linkend='var-FULL_OPTIMIZATION'>FULL_OPTIMIZATION</link></filename>
7758 unless <filename><link linkend='var-DEBUG_BUILD'>DEBUG_BUILD</link></filename> = "1".
7759 If that is the case, the value of
7760 <filename><link linkend='var-DEBUG_OPTIMIZATION'>DEBUG_OPTIMIZATION</link></filename> is used.
7761 </para>
7762 </glossdef>
7763 </glossentry>
7764
7765 <glossentry id='var-SERIAL_CONSOLE'><glossterm>SERIAL_CONSOLE</glossterm>
7766 <glossdef>
7767 <para>
7768 Defines a serial console (TTY) to enable using getty.
7769 Provide a value that specifies the baud rate followed by
7770 the TTY device name separated by a space.
7771 You cannot specify more than one TTY device:
7772 <literallayout class='monospaced'>
7773 SERIAL_CONSOLE = "115200 ttyS0"
7774 </literallayout>
7775 <note>
7776 The <filename>SERIAL_CONSOLE</filename> variable
7777 is deprecated.
7778 Please use the
7779 <link linkend='var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></link>
7780 variable.
7781 </note>
7782 </para>
7783 </glossdef>
7784 </glossentry>
7785
7786 <glossentry id='var-SERIAL_CONSOLES'><glossterm>SERIAL_CONSOLES</glossterm>
7787 <glossdef>
7788 <para>
7789 Defines the serial consoles (TTYs) to enable using getty.
7790 Provide a value that specifies the baud rate followed by
7791 the TTY device name separated by a semicolon.
7792 Use spaces to separate multiple devices:
7793 <literallayout class='monospaced'>
7794 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
7795 </literallayout>
7796 </para>
7797 </glossdef>
7798 </glossentry>
7799
7800 <glossentry id='var-SERIAL_CONSOLES_CHECK'><glossterm>SERIAL_CONSOLES_CHECK</glossterm>
7801 <glossdef>
7802 <para>
7803 Similar to
7804 <link linkend='var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></link>
7805 except the device is checked for existence before attempting
7806 to enable it.
7807 This variable is currently only supported with SysVinit
7808 (i.e. not with systemd).
7809 </para>
7810 </glossdef>
7811 </glossentry>
7812
7813 <glossentry id='var-SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS'><glossterm>SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS</glossterm>
7814 <glossdef>
7815 <para>
7816 A list of recipe dependencies that should not be used to
7817 determine signatures of tasks from one recipe when they
7818 depend on tasks from another recipe.
7819 For example:
7820 <literallayout class='monospaced'>
7821 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
7822 </literallayout>
7823 In this example, <filename>intone</filename> depends on
7824 <filename>mplayer2</filename>.
7825 </para>
7826
7827 <para>
7828 Use of this variable is one mechanism to remove dependencies
7829 that affect task signatures and thus force rebuilds when a
7830 recipe changes.
7831 <note><title>Caution</title>
7832 If you add an inappropriate dependency for a recipe
7833 relationship, the software might break during
7834 runtime if the interface of the second recipe was
7835 changed after the first recipe had been built.
7836 </note>
7837 </para>
7838 </glossdef>
7839 </glossentry>
7840
7841 <glossentry id='var-SIGGEN_EXCLUDERECIPES_ABISAFE'><glossterm>SIGGEN_EXCLUDERECIPES_ABISAFE</glossterm>
7842 <glossdef>
7843 <para>
7844 A list of recipes that are completely stable and will
7845 never change.
7846 The ABI for the recipes in the list are presented by
7847 output from the tasks run to build the recipe.
7848 Use of this variable is one way to remove dependencies from
7849 one recipe on another that affect task signatures and
7850 thus force rebuilds when the recipe changes.
7851 <note><title>Caution</title>
7852 If you add an inappropriate variable to this list,
7853 the software might break at runtime if the
7854 interface of the recipe was changed after the other
7855 had been built.
7856 </note>
7857 </para>
7858 </glossdef>
7859 </glossentry>
7860
7861 <glossentry id='var-SITEINFO_BITS'><glossterm>SITEINFO_BITS</glossterm>
7862 <glossdef>
7863 <para>
7864 Specifies the number of bits for the target system CPU.
7865 The value should be either "32" or "64".
7866 </para>
7867 </glossdef>
7868 </glossentry>
7869
7870 <glossentry id='var-SITEINFO_ENDIANNESS'><glossterm>SITEINFO_ENDIANNESS</glossterm>
7871 <glossdef>
7872 <para>
7873 Specifies the endian byte order of the target system.
7874 The value should be either "le" for little-endian or "be" for big-endian.
7875 </para>
7876 </glossdef>
7877 </glossentry>
7878
7879 <glossentry id='var-SOC_FAMILY'><glossterm>SOC_FAMILY</glossterm>
7880 <glossdef>
7881 <para>
7882 Groups together machines based upon the same family
7883 of SOC (System On Chip).
7884 You typically set this variable in a common
7885 <filename>.inc</filename> file that you include in the
7886 configuration files of all the machines.
7887 <note>
7888 You must include
7889 <filename>conf/machine/include/soc-family.inc</filename>
7890 for this variable to appear in
7891 <link linkend='var-MACHINEOVERRIDES'><filename>MACHINEOVERRIDES</filename></link>.
7892 </note>
7893 </para>
7894 </glossdef>
7895 </glossentry>
7896
7897 <glossentry id='var-SOLIBS'><glossterm>SOLIBS</glossterm>
7898 <glossdef>
7899 <para>
7900 Defines the suffix for shared libraries used on the
7901 target platform.
7902 By default, this suffix is ".so.*" for all Linux-based
7903 systems and is defined in the
7904 <filename>meta/conf/bitbake.conf</filename> configuration
7905 file.
7906 </para>
7907
7908 <para>
7909 You will see this variable referenced in the default values
7910 of <filename>FILES_${PN}</filename>.
7911 </para>
7912 </glossdef>
7913 </glossentry>
7914
7915 <glossentry id='var-SOLIBSDEV'><glossterm>SOLIBSDEV</glossterm>
7916 <glossdef>
7917 <para>
7918 Defines the suffix for the development symbolic link
7919 (symlink) for shared libraries on the target platform.
7920 By default, this suffix is ".so" for Linux-based
7921 systems and is defined in the
7922 <filename>meta/conf/bitbake.conf</filename> configuration
7923 file.
7924 </para>
7925
7926 <para>
7927 You will see this variable referenced in the default values
7928 of <filename>FILES_${PN}-dev</filename>.
7929 </para>
7930 </glossdef>
7931 </glossentry>
7932
7933 <glossentry id='var-SOURCE_MIRROR_URL'><glossterm>SOURCE_MIRROR_URL</glossterm>
7934 <glossdef>
7935 <para>
7936 Defines your own
7937 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
7938 from which to first fetch source before attempting to fetch
7939 from the upstream specified in
7940 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>.
7941 </para>
7942
7943 <para>
7944 To use this variable, you must globally inherit the
7945 <link linkend='ref-classes-own-mirrors'><filename>own-mirrors</filename></link>
7946 class and then provide the URL to your mirrors.
7947 Here is an example:
7948 <literallayout class='monospaced'>
7949 INHERIT += "own-mirrors"
7950 SOURCE_MIRROR_URL = "http://example.com/my-source-mirror"
7951 </literallayout>
7952 <note>
7953 You can specify only a single URL in
7954 <filename>SOURCE_MIRROR_URL</filename>.
7955 </note>
7956 </para>
7957 </glossdef>
7958 </glossentry>
7959
7960 <glossentry id='var-SPDXLICENSEMAP'><glossterm>SPDXLICENSEMAP</glossterm>
7961 <glossdef>
7962 <para>
7963 Maps commonly used license names to their SPDX counterparts
7964 found in <filename>meta/files/common-licenses/</filename>.
7965 For the default <filename>SPDXLICENSEMAP</filename>
7966 mappings, see the
7967 <filename>meta/conf/licenses.conf</filename> file.
7968 </para>
7969
7970 <para>
7971 For additional information, see the
7972 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
7973 variable.
7974 </para>
7975 </glossdef>
7976 </glossentry>
7977
7978 <glossentry id='var-SPECIAL_PKGSUFFIX'><glossterm>SPECIAL_PKGSUFFIX</glossterm>
7979 <glossdef>
7980 <para>
7981 A list of prefixes for <link linkend='var-PN'><filename>PN</filename></link> used by the
7982 OpenEmbedded build system to create variants of recipes or packages.
7983 The list specifies the prefixes to strip off during certain circumstances
7984 such as the generation of the <link linkend='var-BPN'><filename>BPN</filename></link> variable.
7985 </para>
7986 </glossdef>
7987 </glossentry>
7988
7989 <glossentry id='var-SRC_URI'><glossterm>SRC_URI</glossterm>
7990 <glossdef>
7991 <para>The list of source files - local or remote.
7992 This variable tells the OpenEmbedded build system which bits
7993 to pull in for the build and how to pull them in.
7994 For example, if the recipe or append file only needs to
7995 fetch a tarball from the Internet, the recipe or
7996 append file uses a single <filename>SRC_URI</filename>
7997 entry.
7998 On the other hand, if the recipe or append file needs to
7999 fetch a tarball, apply two patches, and include a custom
8000 file, the recipe or append file would include four
8001 instances of the variable.</para>
8002 <para>The following list explains the available URI protocols:
8003 <itemizedlist>
8004 <listitem><para><emphasis><filename>file://</filename> -</emphasis>
8005 Fetches files, which are usually files shipped with
8006 the
8007 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>,
8008 from the local machine.
8009 The path is relative to the
8010 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
8011 variable.
8012 Thus, the build system searches, in order, from the
8013 following directories, which are assumed to be a
8014 subdirectories of the directory in which the
8015 recipe file (<filename>.bb</filename>) or
8016 append file (<filename>.bbappend</filename>)
8017 resides:
8018 <itemizedlist>
8019 <listitem><para><emphasis><filename>${BPN}</filename> -</emphasis>
8020 The base recipe name without any special
8021 suffix or version numbers.
8022 </para></listitem>
8023 <listitem><para><emphasis><filename>${BP}</filename> -</emphasis>
8024 <filename>${<link linkend='var-BPN'>BPN</link>}-${PV}</filename>.
8025 The base recipe name and version but without
8026 any special package name suffix.
8027 </para></listitem>
8028 <listitem><para><emphasis>files -</emphasis>
8029 Files within a directory, which is named
8030 <filename>files</filename> and is also
8031 alongside the recipe or append file.
8032 </para></listitem>
8033 </itemizedlist>
8034 <note>
8035 If you want the build system to pick up files
8036 specified through a
8037 <filename>SRC_URI</filename>
8038 statement from your append file, you need to be
8039 sure to extend the
8040 <filename>FILESPATH</filename>
8041 variable by also using the
8042 <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
8043 variable from within your append file.
8044 </note>
8045 </para></listitem>
8046 <listitem><para><emphasis><filename>bzr://</filename> -</emphasis> Fetches files from a
8047 Bazaar revision control repository.</para></listitem>
8048 <listitem><para><emphasis><filename>git://</filename> -</emphasis> Fetches files from a
8049 Git revision control repository.</para></listitem>
8050 <listitem><para><emphasis><filename>osc://</filename> -</emphasis> Fetches files from
8051 an OSC (OpenSUSE Build service) revision control repository.</para></listitem>
8052 <listitem><para><emphasis><filename>repo://</filename> -</emphasis> Fetches files from
8053 a repo (Git) repository.</para></listitem>
8054 <listitem><para><emphasis><filename>ccrc://</filename> -</emphasis>
8055 Fetches files from a ClearCase repository.
8056 </para></listitem>
8057 <listitem><para><emphasis><filename>http://</filename> -</emphasis> Fetches files from
8058 the Internet using <filename>http</filename>.</para></listitem>
8059 <listitem><para><emphasis><filename>https://</filename> -</emphasis> Fetches files
8060 from the Internet using <filename>https</filename>.</para></listitem>
8061 <listitem><para><emphasis><filename>ftp://</filename> -</emphasis> Fetches files
8062 from the Internet using <filename>ftp</filename>.</para></listitem>
8063 <listitem><para><emphasis><filename>cvs://</filename> -</emphasis> Fetches files from
8064 a CVS revision control repository.</para></listitem>
8065 <listitem><para><emphasis><filename>hg://</filename> -</emphasis> Fetches files from
8066 a Mercurial (<filename>hg</filename>) revision control repository.</para></listitem>
8067 <listitem><para><emphasis><filename>p4://</filename> -</emphasis> Fetches files from
8068 a Perforce (<filename>p4</filename>) revision control repository.</para></listitem>
8069 <listitem><para><emphasis><filename>ssh://</filename> -</emphasis> Fetches files from
8070 a secure shell.</para></listitem>
8071 <listitem><para><emphasis><filename>svn://</filename> -</emphasis> Fetches files from
8072 a Subversion (<filename>svn</filename>) revision control repository.</para></listitem>
8073 </itemizedlist>
8074 </para>
8075 <para>Standard and recipe-specific options for <filename>SRC_URI</filename> exist.
8076 Here are standard options:
8077 <itemizedlist>
8078 <listitem><para><emphasis><filename>apply</filename> -</emphasis> Whether to apply
8079 the patch or not.
8080 The default action is to apply the patch.</para></listitem>
8081 <listitem><para><emphasis><filename>striplevel</filename> -</emphasis> Which
8082 striplevel to use when applying the patch.
8083 The default level is 1.</para></listitem>
8084 <listitem><para><emphasis><filename>patchdir</filename> -</emphasis> Specifies
8085 the directory in which the patch should be applied.
8086 The default is <filename>${</filename><link linkend='var-S'><filename>S</filename></link><filename>}</filename>.
8087 </para></listitem>
8088 </itemizedlist>
8089 </para>
8090 <para>Here are options specific to recipes building code from a revision control system:
8091 <itemizedlist>
8092 <listitem><para><emphasis><filename>mindate</filename> -</emphasis>
8093 Apply the patch only if
8094 <link linkend='var-SRCDATE'><filename>SRCDATE</filename></link>
8095 is equal to or greater than <filename>mindate</filename>.
8096 </para></listitem>
8097 <listitem><para><emphasis><filename>maxdate</filename> -</emphasis>
8098 Apply the patch only if <filename>SRCDATE</filename>
8099 is not later than <filename>mindate</filename>.
8100 </para></listitem>
8101 <listitem><para><emphasis><filename>minrev</filename> -</emphasis>
8102 Apply the patch only if <filename>SRCREV</filename>
8103 is equal to or greater than <filename>minrev</filename>.
8104 </para></listitem>
8105 <listitem><para><emphasis><filename>maxrev</filename> -</emphasis>
8106 Apply the patch only if <filename>SRCREV</filename>
8107 is not later than <filename>maxrev</filename>.
8108 </para></listitem>
8109 <listitem><para><emphasis><filename>rev</filename> -</emphasis>
8110 Apply the patch only if <filename>SRCREV</filename>
8111 is equal to <filename>rev</filename>.
8112 </para></listitem>
8113 <listitem><para><emphasis><filename>notrev</filename> -</emphasis>
8114 Apply the patch only if <filename>SRCREV</filename>
8115 is not equal to <filename>rev</filename>.
8116 </para></listitem>
8117 </itemizedlist>
8118 </para>
8119 <para>Here are some additional options worth mentioning:
8120 <itemizedlist>
8121 <listitem><para><emphasis><filename>unpack</filename> -</emphasis> Controls
8122 whether or not to unpack the file if it is an archive.
8123 The default action is to unpack the file.</para></listitem>
8124 <listitem><para><emphasis><filename>subdir</filename> -</emphasis> Places the file
8125 (or extracts its contents) into the specified
8126 subdirectory of <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
8127 This option is useful for unusual tarballs or other archives that
8128 do not have their files already in a subdirectory within the archive.
8129 </para></listitem>
8130 <listitem><para><emphasis><filename>name</filename> -</emphasis> Specifies a
8131 name to be used for association with <filename>SRC_URI</filename> checksums
8132 when you have more than one file specified in <filename>SRC_URI</filename>.
8133 </para></listitem>
8134 <listitem><para><emphasis><filename>downloadfilename</filename> -</emphasis> Specifies
8135 the filename used when storing the downloaded file.</para></listitem>
8136 </itemizedlist>
8137 </para>
8138 </glossdef>
8139 </glossentry>
8140
8141 <glossentry id='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'><glossterm>SRC_URI_OVERRIDES_PACKAGE_ARCH</glossterm>
8142 <glossdef>
8143 <para>
8144 By default, the OpenEmbedded build system automatically detects whether
8145 <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>
8146 contains files that are machine-specific.
8147 If so, the build system automatically changes
8148 <filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>.
8149 Setting this variable to "0" disables this behavior.
8150 </para>
8151 </glossdef>
8152 </glossentry>
8153
8154 <glossentry id='var-SRCDATE'><glossterm>SRCDATE</glossterm>
8155 <glossdef>
8156 <para>
8157 The date of the source code used to build the package.
8158 This variable applies only if the source was fetched from a Source Code Manager (SCM).
8159 </para>
8160 </glossdef>
8161 </glossentry>
8162
8163 <glossentry id='var-SRCPV'><glossterm>SRCPV</glossterm>
8164 <glossdef>
8165 <para>
8166 Returns the version string of the current package.
8167 This string is used to help define the value of
8168 <link linkend='var-PV'><filename>PV</filename></link>.
8169 </para>
8170
8171 <para>
8172 The <filename>SRCPV</filename> variable is defined in the
8173 <filename>meta/conf/bitbake.conf</filename> configuration
8174 file in the
8175 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
8176 as follows:
8177 <literallayout class='monospaced'>
8178 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
8179 </literallayout>
8180 </para>
8181
8182 <para>
8183 Recipes that need to define <filename>PV</filename> do so
8184 with the help of the <filename>SRCPV</filename>.
8185 For example, the <filename>ofono</filename> recipe
8186 (<filename>ofono_git.bb</filename>) located in
8187 <filename>meta/recipes-connectivity</filename> in the
8188 Source Directory defines <filename>PV</filename> as
8189 follows:
8190 <literallayout class='monospaced'>
8191 PV = "0.12-git${SRCPV}"
8192 </literallayout>
8193 </para>
8194 </glossdef>
8195 </glossentry>
8196
8197 <glossentry id='var-SRCREV'><glossterm>SRCREV</glossterm>
8198 <glossdef>
8199 <para>
8200 The revision of the source code used to build the package.
8201 This variable applies to Subversion, Git, Mercurial and Bazaar
8202 only.
8203 Note that if you wish to build a fixed revision and you wish
8204 to avoid performing a query on the remote repository every time
8205 BitBake parses your recipe, you should specify a <filename>SRCREV</filename> that is a
8206 full revision identifier and not just a tag.
8207 </para>
8208 </glossdef>
8209 </glossentry>
8210
8211 <glossentry id='var-SSTATE_DIR'><glossterm>SSTATE_DIR</glossterm>
8212 <glossdef>
8213 <para>The directory for the shared state cache.</para>
8214 </glossdef>
8215 </glossentry>
8216
8217 <glossentry id='var-SSTATE_MIRROR_ALLOW_NETWORK'><glossterm>SSTATE_MIRROR_ALLOW_NETWORK</glossterm>
8218 <glossdef>
8219 <para>
8220 If set to "1", allows fetches from
8221 mirrors that are specified in
8222 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
8223 to work even when fetching from the network has been
8224 disabled by setting <filename>BB_NO_NETWORK</filename>
8225 to "1".
8226 Using the
8227 <filename>SSTATE_MIRROR_ALLOW_NETWORK</filename>
8228 variable is useful if you have set
8229 <filename>SSTATE_MIRRORS</filename> to point to an
8230 internal server for your shared state cache, but
8231 you want to disable any other fetching from the network.
8232 </para>
8233 </glossdef>
8234 </glossentry>
8235
8236 <glossentry id='var-SSTATE_MIRRORS'><glossterm>SSTATE_MIRRORS</glossterm>
8237 <glossdef>
8238 <para>
8239 Configures the OpenEmbedded build system to search other
8240 mirror locations for prebuilt cache data objects before
8241 building out the data.
8242 This variable works like fetcher
8243 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
8244 and <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
8245 and points to the cache locations to check for the shared
8246 objects.
8247 </para>
8248
8249 <para>
8250 You can specify a filesystem directory or a remote URL such
8251 as HTTP or FTP.
8252 The locations you specify need to contain the shared state
8253 cache (sstate-cache) results from previous builds.
8254 The sstate-cache you point to can also be from builds on
8255 other machines.
8256 </para>
8257
8258 <para>
8259 If a mirror uses the same structure as
8260 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>,
8261 you need to add
8262 "PATH" at the end as shown in the examples below.
8263 The build system substitutes the correct path within the
8264 directory structure.
8265 <literallayout class='monospaced'>
8266 SSTATE_MIRRORS ?= "\
8267 file://.* http://<replaceable>someserver</replaceable>.tld/share/sstate/PATH \n \
8268 file://.* file:///<replaceable>some-local-dir</replaceable>/sstate/PATH"
8269 </literallayout>
8270 </para>
8271 </glossdef>
8272 </glossentry>
8273
8274 <glossentry id='var-STAGING_BASE_LIBDIR_NATIVE'><glossterm>STAGING_BASE_LIBDIR_NATIVE</glossterm>
8275 <glossdef>
8276 <para>
8277 Specifies the path to the <filename>/lib</filename>
8278 subdirectory of the sysroot directory for the
8279 build host.
8280 </para>
8281 </glossdef>
8282 </glossentry>
8283
8284 <glossentry id='var-STAGING_BASELIBDIR'><glossterm>STAGING_BASELIBDIR</glossterm>
8285 <glossdef>
8286 <para>
8287 Specifies the path to the <filename>/lib</filename>
8288 subdirectory of the sysroot directory for the target
8289 for which the current recipe is being built
8290 (<link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>).
8291 </para>
8292 </glossdef>
8293 </glossentry>
8294
8295 <glossentry id='var-STAGING_BINDIR'><glossterm>STAGING_BINDIR</glossterm>
8296 <glossdef>
8297 <para>
8298 Specifies the path to the
8299 <filename>/usr/bin</filename> subdirectory of the
8300 sysroot directory for the target for which the current
8301 recipe is being built
8302 (<link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>).
8303 </para>
8304 </glossdef>
8305 </glossentry>
8306
8307 <glossentry id='var-STAGING_BINDIR_CROSS'><glossterm>STAGING_BINDIR_CROSS</glossterm>
8308 <glossdef>
8309 <para>
8310 Specifies the path to the directory containing binary
8311 configuration scripts.
8312 These scripts provide configuration information for
8313 other software that wants to make use of libraries or
8314 include files provided by the software associated with
8315 the script.
8316 <note>
8317 This style of build configuration has been largely
8318 replaced by <filename>pkg-config</filename>.
8319 Consequently, if <filename>pkg-config</filename>
8320 is supported by the library to which you are linking,
8321 it is recommended you use
8322 <filename>pkg-config</filename> instead of a
8323 provided configuration script.
8324 </note>
8325 </para>
8326 </glossdef>
8327 </glossentry>
8328
8329 <glossentry id='var-STAGING_BINDIR_NATIVE'><glossterm>STAGING_BINDIR_NATIVE</glossterm>
8330 <glossdef>
8331 <para>
8332 Specifies the path to the
8333 <filename>/usr/bin</filename> subdirectory of the
8334 sysroot directory for the build host.
8335 </para>
8336 </glossdef>
8337 </glossentry>
8338
8339 <glossentry id='var-STAGING_DATADIR'><glossterm>STAGING_DATADIR</glossterm>
8340 <glossdef>
8341 <para>
8342 Specifies the path to the <filename>/usr/share</filename>
8343 subdirectory of the sysroot directory for the target
8344 for which the current recipe is being built
8345 (<link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>).
8346 </para>
8347 </glossdef>
8348 </glossentry>
8349
8350 <glossentry id='var-STAGING_DIR'><glossterm>STAGING_DIR</glossterm>
8351 <glossdef>
8352 <para>
8353 Specifies the path to the top-level sysroots directory
8354 (i.e.
8355 <filename>${</filename><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link><filename>}/sysroots</filename>).
8356 <note>
8357 Recipes should never write files directly under
8358 this directory because the OpenEmbedded build system
8359 manages the directory automatically.
8360 Instead, files should be installed to
8361 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>
8362 within your recipe's
8363 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
8364 task and then the OpenEmbedded build system will
8365 stage a subset of those files into the sysroot.
8366 </note>
8367 </para>
8368 </glossdef>
8369 </glossentry>
8370
8371 <glossentry id='var-STAGING_DIR_HOST'><glossterm>STAGING_DIR_HOST</glossterm>
8372 <glossdef>
8373 <para>
8374 Specifies the path to the primary sysroot directory for
8375 which the target is being built.
8376 Depending on the type of recipe and the build target, the
8377 recipe's value is as follows:
8378 <itemizedlist>
8379 <listitem><para>For recipes building for the target
8380 machine, the value is "${STAGING_DIR}/${MACHINE}".
8381 </para></listitem>
8382 <listitem><para>For <filename>native</filename>
8383 recipes building
8384 for the build host, the value is empty given the
8385 assumption that when building for the build host,
8386 the build host's own directories should be used.
8387 </para></listitem>
8388 <listitem><para>For <filename>nativesdk</filename>
8389 recipes that Build for the SDK, the value is
8390 "${STAGING_DIR}/${MULTIMACH_HOST_SYS}".
8391 </para></listitem>
8392 </itemizedlist>
8393 </para>
8394 </glossdef>
8395 </glossentry>
8396
8397 <glossentry id='var-STAGING_DATADIR_NATIVE'><glossterm>STAGING_DATADIR_NATIVE</glossterm>
8398 <glossdef>
8399 <para>
8400 Specifies the path to the <filename>/usr/share</filename>
8401 subdirectory of the sysroot directory for the build host.
8402 </para>
8403 </glossdef>
8404 </glossentry>
8405
8406
8407
8408 <glossentry id='var-STAGING_DIR_NATIVE'><glossterm>STAGING_DIR_NATIVE</glossterm>
8409 <glossdef>
8410 <para>
8411 Specifies the path to the sysroot directory for the
8412 build host.
8413 </para>
8414 </glossdef>
8415 </glossentry>
8416
8417 <glossentry id='var-STAGING_DIR_TARGET'><glossterm>STAGING_DIR_TARGET</glossterm>
8418 <glossdef>
8419 <para>
8420 Specifies the path to the sysroot directory for the
8421 target for which the current recipe is being built.
8422 In most cases, this path is the
8423 <link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>.
8424 </para>
8425
8426 <para>
8427 Some recipes build binaries that can run on the target
8428 system but those binaries in turn generate code for
8429 another different system (e.g. cross-canadian recipes).
8430 Using terminology from GNU, the primary system is referred
8431 to as the "HOST" and the secondary, or different, system is
8432 referred to as the "TARGET".
8433 Thus, the binaries run on the "HOST" system and
8434 and generate binaries for the "TARGET" system.
8435 <filename>STAGING_DIR_TARGET</filename> points to the
8436 sysroot used for the "TARGET" system.
8437 </para>
8438 </glossdef>
8439 </glossentry>
8440
8441 <glossentry id='var-STAGING_ETCDIR_NATIVE'><glossterm>STAGING_ETCDIR_NATIVE</glossterm>
8442 <glossdef>
8443 <para>
8444 Specifies the path to the <filename>/etc</filename>
8445 subdirectory of the sysroot directory for the
8446 build host.
8447 </para>
8448 </glossdef>
8449 </glossentry>
8450
8451 <glossentry id='var-STAGING_EXECPREFIXDIR'><glossterm>STAGING_EXECPREFIXDIR</glossterm>
8452 <glossdef>
8453 <para>
8454 Specifies the path to the <filename>/usr</filename>
8455 subdirectory of the sysroot directory for the target
8456 for which the current recipe is being built
8457 (<link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>).
8458 </para>
8459 </glossdef>
8460 </glossentry>
8461
8462 <glossentry id='var-STAGING_INCDIR'><glossterm>STAGING_INCDIR</glossterm>
8463 <glossdef>
8464 <para>
8465 Specifies the path to the
8466 <filename>/usr/include</filename> subdirectory of the
8467 sysroot directory for the target for which the current
8468 recipe being built
8469 (<link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>).
8470 </para>
8471 </glossdef>
8472 </glossentry>
8473
8474 <glossentry id='var-STAGING_INCDIR_NATIVE'><glossterm>STAGING_INCDIR_NATIVE</glossterm>
8475 <glossdef>
8476 <para>
8477 Specifies the path to the <filename>/usr/include</filename>
8478 subdirectory of the sysroot directory for the build host.
8479 </para>
8480 </glossdef>
8481 </glossentry>
8482
8483 <glossentry id='var-STAGING_LIBDIR'><glossterm>STAGING_LIBDIR</glossterm>
8484 <glossdef>
8485 <para>
8486 Specifies the path to the <filename>/usr/lib</filename>
8487 subdirectory of the sysroot directory for the target for
8488 which the current recipe is being built
8489 (<link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>).
8490 </para>
8491 </glossdef>
8492 </glossentry>
8493
8494 <glossentry id='var-STAGING_LIBDIR_NATIVE'><glossterm>STAGING_LIBDIR_NATIVE</glossterm>
8495 <glossdef>
8496 <para>
8497 Specifies the path to the <filename>/usr/lib</filename>
8498 subdirectory of the sysroot directory for the build host.
8499 </para>
8500 </glossdef>
8501 </glossentry>
8502
8503 <glossentry id='var-STAGING_KERNEL_DIR'><glossterm>STAGING_KERNEL_DIR</glossterm>
8504 <glossdef>
8505 <para>
8506 The directory with kernel headers that are required to build out-of-tree
8507 modules.
8508 </para>
8509 </glossdef>
8510 </glossentry>
8511
8512 <glossentry id='var-STAMP'><glossterm>STAMP</glossterm>
8513 <glossdef>
8514 <para>
8515 Specifies the base path used to create recipe stamp files.
8516 The path to an actual stamp file is constructed by evaluating this
8517 string and then appending additional information.
8518 Currently, the default assignment for <filename>STAMP</filename>
8519 as set in the <filename>meta/conf/bitbake.conf</filename> file
8520 is:
8521 <literallayout class='monospaced'>
8522 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
8523 </literallayout>
8524 See <link linkend='var-STAMPS_DIR'><filename>STAMPS_DIR</filename></link>,
8525 <link linkend='var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></link>,
8526 <link linkend='var-PN'><filename>PN</filename></link>,
8527 <link linkend='var-EXTENDPE'><filename>EXTENDPE</filename></link>,
8528 <link linkend='var-PV'><filename>PV</filename></link>, and
8529 <link linkend='var-PR'><filename>PR</filename></link> for related variable
8530 information.
8531 </para>
8532 </glossdef>
8533 </glossentry>
8534
8535 <glossentry id='var-STAMPS_DIR'><glossterm>STAMPS_DIR</glossterm>
8536 <glossdef>
8537 <para>
8538 Specifies the base directory in which the OpenEmbedded
8539 build system places stamps.
8540 The default directory is
8541 <filename>${TMPDIR}/stamps</filename>.
8542 </para>
8543 </glossdef>
8544 </glossentry>
8545
8546 <glossentry id='var-SUMMARY'><glossterm>SUMMARY</glossterm>
8547 <glossdef>
8548 <para>The short (72 characters or less) summary of the binary package for packaging
8549 systems such as <filename>opkg</filename>, <filename>rpm</filename> or
8550 <filename>dpkg</filename>.
8551 By default, <filename>SUMMARY</filename> is used to define
8552 the <link linkend='var-DESCRIPTION'><filename>DESCRIPTION</filename></link>
8553 variable if <filename>DESCRIPTION</filename> is not set
8554 in the recipe.
8555 </para>
8556 </glossdef>
8557 </glossentry>
8558
8559 <glossentry id='var-SYSLINUX_DEFAULT_CONSOLE'><glossterm>SYSLINUX_DEFAULT_CONSOLE</glossterm>
8560 <glossdef>
8561 <para>
8562 Specifies the kernel boot default console.
8563 If you want to use a console other than the default,
8564 set this variable in your recipe as follows where "X" is
8565 the console number you want to use:
8566 <literallayout class='monospaced'>
8567 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
8568 </literallayout>
8569 </para>
8570
8571 <para>
8572 The
8573 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
8574 class initially sets this variable to null but then checks
8575 for a value later.
8576 </para>
8577 </glossdef>
8578 </glossentry>
8579
8580 <glossentry id='var-SYSLINUX_OPTS'><glossterm>SYSLINUX_OPTS</glossterm>
8581 <glossdef>
8582 <para>
8583 Lists additional options to add to the syslinux file.
8584 You need to set this variable in your recipe.
8585 If you want to list multiple options, separate the options
8586 with a semicolon character (<filename>;</filename>).
8587 </para>
8588
8589 <para>
8590 The
8591 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
8592 class uses this variable to create a set of options.
8593 </para>
8594 </glossdef>
8595 </glossentry>
8596
8597 <glossentry id='var-SYSLINUX_SERIAL'><glossterm>SYSLINUX_SERIAL</glossterm>
8598 <glossdef>
8599 <para>
8600 Specifies the alternate serial port or turns it off.
8601 To turn off serial, set this variable to an empty string
8602 in your recipe.
8603 The variable's default value is set in the
8604 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
8605 as follows:
8606 <literallayout class='monospaced'>
8607 SYSLINUX_SERIAL ?= "0 115200"
8608 </literallayout>
8609 The class checks for and uses the variable as needed. </para>
8610 </glossdef>
8611 </glossentry>
8612
8613 <glossentry id='var-SYSLINUX_SPLASH'><glossterm>SYSLINUX_SPLASH</glossterm>
8614 <glossdef>
8615 <para>
8616 An <filename>.LSS</filename> file used as the background
8617 for the VGA boot menu when you are using the boot menu.
8618 You need to set this variable in your recipe.
8619 </para>
8620
8621 <para>
8622 The
8623 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
8624 class checks for this variable and if found, the
8625 OpenEmbedded build system installs the splash screen.
8626 </para>
8627 </glossdef>
8628 </glossentry>
8629
8630 <glossentry id='var-SYSLINUX_SERIAL_TTY'><glossterm>SYSLINUX_SERIAL_TTY</glossterm>
8631 <glossdef>
8632 <para>
8633 Specifies the alternate console=tty... kernel boot argument.
8634 The variable's default value is set in the
8635 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
8636 as follows:
8637 <literallayout class='monospaced'>
8638 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
8639 </literallayout>
8640 The class checks for and uses the variable as needed.
8641 </para>
8642 </glossdef>
8643 </glossentry>
8644
8645 <glossentry id='var-SYSROOT_PREPROCESS_FUNCS'><glossterm>SYSROOT_PREPROCESS_FUNCS</glossterm>
8646 <glossdef>
8647 <para>
8648 A list of functions to execute after files are staged into
8649 the sysroot.
8650 These functions are usually used to apply additional
8651 processing on the staged files, or to stage additional
8652 files.
8653 </para>
8654 </glossdef>
8655 </glossentry>
8656
8657 <glossentry id='var-SYSTEMD_AUTO_ENABLE'><glossterm>SYSTEMD_AUTO_ENABLE</glossterm>
8658 <glossdef>
8659 <para>
8660 When inheriting the
8661 <link linkend='ref-classes-systemd'><filename>systemd</filename></link>
8662 class, this variable specifies whether the service you have
8663 specified in
8664 <link linkend='var-SYSTEMD_SERVICE'><filename>SYSTEMD_SERVICE</filename></link>
8665 should be started automatically or not.
8666 By default, the service is enabled to automatically start
8667 at boot time.
8668 The default setting is in the
8669 <link linkend='ref-classes-systemd'><filename>systemd</filename></link>
8670 class as follows:
8671 <literallayout class='monospaced'>
8672 SYSTEMD_AUTO_ENABLE ??= "enable"
8673 </literallayout>
8674 You can disable the service by setting the variable to
8675 "disable".
8676 </para>
8677 </glossdef>
8678 </glossentry>
8679
8680 <glossentry id='var-SYSTEMD_PACKAGES'><glossterm>SYSTEMD_PACKAGES</glossterm>
8681 <glossdef>
8682 <para>
8683 When inheriting the
8684 <link linkend='ref-classes-systemd'><filename>systemd</filename></link>
8685 class, this variable locates the systemd unit files when
8686 they are not found in the main recipe's package.
8687 By default, the
8688 <filename>SYSTEMD_PACKAGES</filename> variable is set
8689 such that the systemd unit files are assumed to reside in
8690 the recipes main package:
8691 <literallayout class='monospaced'>
8692 SYSTEMD_PACKAGES ?= "${PN}"
8693 </literallayout>
8694 If these unit files are not in this recipe's main
8695 package, you need to use
8696 <filename>SYSTEMD_PACKAGES</filename> to list the package
8697 or packages in which the build system can find the systemd
8698 unit files.
8699 </para>
8700 </glossdef>
8701 </glossentry>
8702
8703 <glossentry id='var-SYSTEMD_SERVICE'><glossterm>SYSTEMD_SERVICE</glossterm>
8704 <glossdef>
8705 <para>
8706 When inheriting the
8707 <link linkend='ref-classes-systemd'><filename>systemd</filename></link>
8708 class, this variable specifies the systemd service name for
8709 a package.
8710 </para>
8711
8712 <para>
8713 When you specify this file in your recipe, use a package
8714 name override to indicate the package to which the value
8715 applies.
8716 Here is an example from the connman recipe:
8717 <literallayout class='monospaced'>
8718 SYSTEMD_SERVICE_${PN} = "connman.service"
8719 </literallayout>
8720 </para>
8721 </glossdef>
8722 </glossentry>
8723
8724 <glossentry id='var-SYSVINIT_ENABLED_GETTYS'><glossterm>SYSVINIT_ENABLED_GETTYS</glossterm>
8725 <glossdef>
8726 <para>
8727 When using
8728 <ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-enabling-system-services'>SysVinit</ulink>,
8729 specifies a space-separated list of the virtual terminals
8730 that should be running a
8731 <ulink url='http://en.wikipedia.org/wiki/Getty_%28Unix%29'>getty</ulink>
8732 (allowing login), assuming
8733 <link linkend='var-USE_VT'><filename>USE_VT</filename></link>
8734 is not set to "0".
8735 </para>
8736
8737 <para>
8738 The default value for
8739 <filename>SYSVINIT_ENABLED_GETTYS</filename> is "1"
8740 (i.e. only run a getty on the first virtual terminal).
8741 </para>
8742 </glossdef>
8743 </glossentry>
8744
8745 </glossdiv>
8746
8747 <glossdiv id='var-glossary-t'><title>T</title>
8748
8749 <glossentry id='var-T'><glossterm>T</glossterm>
8750 <glossdef>
8751 <para>This variable points to a directory were BitBake places
8752 temporary files, which consist mostly of task logs and
8753 scripts, when building a particular recipe.
8754 The variable is typically set as follows:
8755 <literallayout class='monospaced'>
8756 T = "${WORKDIR}/temp"
8757 </literallayout>
8758 The <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
8759 is the directory into which BitBake unpacks and builds the
8760 recipe.
8761 The default <filename>bitbake.conf</filename> file sets this variable.</para>
8762 <para>The <filename>T</filename> variable is not to be confused with
8763 the <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link> variable,
8764 which points to the root of the directory tree where BitBake
8765 places the output of an entire build.
8766 </para>
8767 </glossdef>
8768 </glossentry>
8769
8770 <glossentry id='var-TARGET_ARCH'><glossterm>TARGET_ARCH</glossterm>
8771 <glossdef>
8772 <para>
8773 The target machine's architecture.
8774 The OpenEmbedded build system supports many
8775 architectures.
8776 Here is an example list of architectures supported.
8777 This list is by no means complete as the architecture
8778 is configurable:
8779 <literallayout class='monospaced'>
8780 arm
8781 i586
8782 x86_64
8783 powerpc
8784 powerpc64
8785 mips
8786 mipsel
8787 </literallayout>
8788 For additional information on machine architectures, see
8789 the
8790 <link linkend='var-TUNE_ARCH'><filename>TUNE_ARCH</filename></link>
8791 variable.
8792 </para>
8793 </glossdef>
8794 </glossentry>
8795
8796 <glossentry id='var-TARGET_AS_ARCH'><glossterm>TARGET_AS_ARCH</glossterm>
8797 <glossdef>
8798 <para>
8799 Specifies architecture-specific assembler flags for the
8800 target system.
8801 <filename>TARGET_AS_ARCH</filename> is initialized from
8802 <link linkend='var-TUNE_ASARGS'><filename>TUNE_ASARGS</filename></link>
8803 by default in the BitBake configuration file
8804 (<filename>meta/conf/bitbake.conf</filename>):
8805 <literallayout class='monospaced'>
8806 TARGET_AS_ARCH = "${TUNE_ASARGS}"
8807 </literallayout>
8808 </para>
8809 </glossdef>
8810 </glossentry>
8811
8812 <glossentry id='var-TARGET_CC_ARCH'><glossterm>TARGET_CC_ARCH</glossterm>
8813 <glossdef>
8814 <para>
8815 Specifies architecture-specific C compiler flags for the
8816 target system.
8817 <filename>TARGET_CC_ARCH</filename> is initialized from
8818 <link linkend='var-TUNE_CCARGS'><filename>TUNE_CCARGS</filename></link>
8819 by default.
8820 <note>
8821 It is a common workaround to append
8822 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
8823 to <filename>TARGET_CC_ARCH</filename>
8824 in recipes that build software for the target that
8825 would not otherwise respect the exported
8826 <filename>LDFLAGS</filename> variable.
8827 </note>
8828 </para>
8829 </glossdef>
8830 </glossentry>
8831
8832 <glossentry id='var-TARGET_CC_KERNEL_ARCH'><glossterm>TARGET_CC_KERNEL_ARCH</glossterm>
8833 <glossdef>
8834 <para>
8835 This is a specific kernel compiler flag for a CPU or
8836 Application Binary Interface (ABI) tune.
8837 The flag is used rarely and only for cases where a
8838 userspace
8839 <link linkend='var-TUNE_CCARGS'><filename>TUNE_CCARGS</filename></link>
8840 is not compatible with the kernel compilation.
8841 The <filename>TARGET_CC_KERNEL_ARCH</filename> variable
8842 allows the kernel (and associated modules) to use a
8843 different configuration.
8844 See the
8845 <filename>meta/conf/machine/include/arm/feature-arm-thumb.inc</filename>
8846 file in the
8847 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
8848 for an example.
8849 </para>
8850 </glossdef>
8851 </glossentry>
8852
8853 <glossentry id='var-TARGET_CFLAGS'><glossterm>TARGET_CFLAGS</glossterm>
8854 <glossdef>
8855 <para>
8856 Specifies the flags to pass to the C compiler when building
8857 for the target.
8858 When building in the target context,
8859 <link linkend='var-CFLAGS'><filename>CFLAGS</filename></link>
8860 is set to the value of this variable by default.
8861 </para>
8862
8863 <para>
8864 Additionally, the SDK's environment setup script sets
8865 the
8866 <link linkend='var-CFLAGS'><filename>CFLAGS</filename></link>
8867 variable in the environment to the
8868 <filename>TARGET_CFLAGS</filename> value so that
8869 executables built using the SDK also have the flags
8870 applied.
8871 </para>
8872 </glossdef>
8873 </glossentry>
8874
8875 <glossentry id='var-TARGET_CPPFLAGS'><glossterm>TARGET_CPPFLAGS</glossterm>
8876 <glossdef>
8877 <para>
8878 Specifies the flags to pass to the C pre-processor
8879 (i.e. to both the C and the C++ compilers) when building
8880 for the target.
8881 When building in the target context,
8882 <link linkend='var-CPPFLAGS'><filename>CPPFLAGS</filename></link>
8883 is set to the value of this variable by default.
8884 </para>
8885
8886 <para>
8887 Additionally, the SDK's environment setup script sets
8888 the
8889 <link linkend='var-CPPFLAGS'><filename>CPPFLAGS</filename></link>
8890 variable in the environment to the
8891 <filename>TARGET_CPPFLAGS</filename> value so that
8892 executables built using the SDK also have the flags
8893 applied.
8894 </para>
8895 </glossdef>
8896 </glossentry>
8897
8898 <glossentry id='var-TARGET_CXXFLAGS'><glossterm>TARGET_CXXFLAGS</glossterm>
8899 <glossdef>
8900 <para>
8901 Specifies the flags to pass to the C++ compiler when
8902 building for the target.
8903 When building in the target context,
8904 <link linkend='var-CXXFLAGS'><filename>CXXFLAGS</filename></link>
8905 is set to the value of this variable by default.
8906 </para>
8907
8908 <para>
8909 Additionally, the SDK's environment setup script sets
8910 the
8911 <link linkend='var-CXXFLAGS'><filename>CXXFLAGS</filename></link>
8912 variable in the environment to the
8913 <filename>TARGET_CXXFLAGS</filename> value so that
8914 executables built using the SDK also have the flags
8915 applied.
8916 </para>
8917 </glossdef>
8918 </glossentry>
8919
8920 <glossentry id='var-TARGET_FPU'><glossterm>TARGET_FPU</glossterm>
8921 <glossdef>
8922 <para>Specifies the method for handling FPU code.
8923 For FPU-less targets, which include most ARM CPUs, the variable must be
8924 set to "soft".
8925 If not, the kernel emulation gets used, which results in a performance penalty.</para>
8926 </glossdef>
8927 </glossentry>
8928
8929 <glossentry id='var-TARGET_LD_ARCH'><glossterm>TARGET_LD_ARCH</glossterm>
8930 <glossdef>
8931 <para>
8932 Specifies architecture-specific linker flags for the
8933 target system.
8934 <filename>TARGET_LD_ARCH</filename> is initialized from
8935 <link linkend='var-TUNE_LDARGS'><filename>TUNE_LDARGS</filename></link>
8936 by default in the BitBake configuration file
8937 (<filename>meta/conf/bitbake.conf</filename>):
8938 <literallayout class='monospaced'>
8939 TARGET_LD_ARCH = "${TUNE_LDARGS}"
8940 </literallayout>
8941 </para>
8942 </glossdef>
8943 </glossentry>
8944
8945 <glossentry id='var-TARGET_LDFLAGS'><glossterm>TARGET_LDFLAGS</glossterm>
8946 <glossdef>
8947 <para>
8948 Specifies the flags to pass to the linker when building
8949 for the target.
8950 When building in the target context,
8951 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
8952 is set to the value of this variable by default.
8953 </para>
8954
8955 <para>
8956 Additionally, the SDK's environment setup script sets
8957 the
8958 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
8959 variable in the environment to the
8960 <filename>TARGET_LDFLAGS</filename> value so that
8961 executables built using the SDK also have the flags
8962 applied.
8963 </para>
8964 </glossdef>
8965 </glossentry>
8966
8967 <glossentry id='var-TARGET_OS'><glossterm>TARGET_OS</glossterm>
8968 <glossdef>
8969 <para>Specifies the target's operating system.
8970 The variable can be set to "linux" for <filename>glibc</filename>-based systems and
8971 to "linux-uclibc" for <filename>uclibc</filename>.
8972 For ARM/EABI targets, there are also "linux-gnueabi" and
8973 "linux-uclibc-gnueabi" values possible.</para>
8974 </glossdef>
8975 </glossentry>
8976
8977 <glossentry id='var-TCLIBC'><glossterm>TCLIBC</glossterm>
8978 <glossdef>
8979 <para>
8980 Specifies the GNU standard C library (<filename>libc</filename>)
8981 variant to use during the build process.
8982 This variable replaces <filename>POKYLIBC</filename>, which is no longer
8983 supported.
8984 </para>
8985 <para>
8986 You can select "glibc" or "uclibc".
8987 </para>
8988 </glossdef>
8989 </glossentry>
8990
8991 <glossentry id='var-TCMODE'><glossterm>TCMODE</glossterm>
8992 <glossdef>
8993 <para>
8994 Specifies the toolchain selector.
8995 <filename>TCMODE</filename> controls the characteristics
8996 of the generated packages and images by telling the
8997 OpenEmbedded build system which toolchain profile to use.
8998 By default, the OpenEmbedded build system builds its own
8999 internal toolchain.
9000 The variable's default value is "default", which uses
9001 that internal toolchain.
9002 <note>
9003 If <filename>TCMODE</filename> is set to a value
9004 other than "default", then it is your responsibility
9005 to ensure that the toolchain is compatible with the
9006 default toolchain.
9007 Using older or newer versions of these components
9008 might cause build problems.
9009 See the
9010 <ulink url='&YOCTO_RELEASE_NOTES;'>Release Notes</ulink>
9011 for the specific components with which the toolchain
9012 must be compatible.
9013 </note>
9014 </para>
9015
9016 <para>
9017 With additional layers, it is possible to use a pre-compiled
9018 external toolchain.
9019 One example is the Sourcery G++ Toolchain.
9020 The support for this toolchain resides in the separate
9021 <filename>meta-sourcery</filename> layer at
9022 <ulink url='http://github.com/MentorEmbedded/meta-sourcery/'></ulink>.
9023 You can use <filename>meta-sourcery</filename> as a
9024 template for adding support for other external toolchains.
9025 </para>
9026
9027 <para>
9028 The <filename>TCMODE</filename> variable points the build
9029 system to a file in
9030 <filename>conf/distro/include/tcmode-${TCMODE}.inc</filename>.
9031 Thus, for <filename>meta-sourcery</filename>,
9032 which has <filename>conf/distro/include/tcmode-external-sourcery.inc</filename>,
9033 you would set the variable as follows:
9034 <literallayout class='monospaced'>
9035 TCMODE ?= "external-sourcery"
9036 </literallayout>
9037 </para>
9038
9039 <para>
9040 The variable is similar to
9041 <link linkend='var-TCLIBC'><filename>TCLIBC</filename></link>,
9042 which controls the variant of the GNU standard C library
9043 (<filename>libc</filename>) used during the build process:
9044 <filename>glibc</filename> or <filename>uclibc</filename>.
9045 </para>
9046 </glossdef>
9047 </glossentry>
9048
9049 <glossentry id='var-TEST_EXPORT_DIR'><glossterm>TEST_EXPORT_DIR</glossterm>
9050 <glossdef>
9051 <para>
9052 The location the OpenEmbedded build system uses to export
9053 tests when the
9054 <link linkend='var-TEST_EXPORT_ONLY'><filename>TEST_EXPORT_ONLY</filename></link>
9055 variable is set to "1".
9056 </para>
9057
9058 <para>
9059 The <filename>TEST_EXPORT_DIR</filename> variable defaults
9060 to <filename>"${TMPDIR}/testimage/${PN}"</filename>.
9061 </para>
9062 </glossdef>
9063 </glossentry>
9064
9065 <glossentry id='var-TEST_EXPORT_ONLY'><glossterm>TEST_EXPORT_ONLY</glossterm>
9066 <glossdef>
9067 <para>
9068 Specifies to export the tests only.
9069 Set this variable to "1" if you do not want to run the
9070 tests but you want them to be exported in a manner that
9071 you to run them outside of the build system.
9072 </para>
9073 </glossdef>
9074 </glossentry>
9075
9076 <glossentry id='var-TEST_IMAGE'><glossterm>TEST_IMAGE</glossterm>
9077 <glossdef>
9078 <para>
9079 Automatically runs the series of automated tests for
9080 images when an image is successfully built.
9081 </para>
9082
9083 <para>
9084 These tests are written in Python making use of the
9085 <filename>unittest</filename> module, and the majority of
9086 them run commands on the target system over
9087 <filename>ssh</filename>.
9088 You can set this variable to "1" in your
9089 <filename>local.conf</filename> file in the
9090 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
9091 to have the OpenEmbedded build system automatically run
9092 these tests after an image successfully builds:
9093 <literallayout class='monospaced'>
9094 TEST_IMAGE = "1"
9095 </literallayout>
9096 For more information on enabling, running, and writing
9097 these tests, see the
9098 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
9099 section in the Yocto Project Development Manual and the
9100 "<link linkend='ref-classes-testimage'><filename>testimage.bbclass</filename></link>"
9101 section.
9102 </para>
9103 </glossdef>
9104 </glossentry>
9105
9106 <glossentry id='var-TEST_LOG_DIR'><glossterm>TEST_LOG_DIR</glossterm>
9107 <glossdef>
9108 <para>
9109 Holds the SSH log and the boot log for QEMU machines.
9110 The <filename>TEST_LOG_DIR</filename> variable defaults
9111 to <filename>"${WORKDIR}/testimage"</filename>.
9112 <note>
9113 Actual test results reside in the task log
9114 (<filename>log.do_testimage</filename>), which is in
9115 the <filename>${WORKDIR}/temp/</filename> directory.
9116 </note>
9117 </para>
9118 </glossdef>
9119 </glossentry>
9120
9121 <glossentry id='var-TEST_POWERCONTROL_CMD'><glossterm>TEST_POWERCONTROL_CMD</glossterm>
9122 <glossdef>
9123 <para>
9124 For automated hardware testing, specifies the command to
9125 use to control the power of the target machine under test.
9126 Typically, this command would point to a script that
9127 performs the appropriate action (e.g. interacting
9128 with a web-enabled power strip).
9129 The specified command should expect to receive as the last
9130 argument "off", "on" or "cycle" specifying to power off,
9131 on, or cycle (power off and then power on) the device,
9132 respectively.
9133 </para>
9134 </glossdef>
9135 </glossentry>
9136
9137 <glossentry id='var-TEST_POWERCONTROL_EXTRA_ARGS'><glossterm>TEST_POWERCONTROL_EXTRA_ARGS</glossterm>
9138 <glossdef>
9139 <para>
9140 For automated hardware testing, specifies additional
9141 arguments to pass through to the command specified in
9142 <link linkend='var-TEST_POWERCONTROL_CMD'><filename>TEST_POWERCONTROL_CMD</filename></link>.
9143 Setting <filename>TEST_POWERCONTROL_EXTRA_ARGS</filename>
9144 is optional.
9145 You can use it if you wish, for example, to separate the
9146 machine-specific and non-machine-specific parts of the
9147 arguments.
9148 </para>
9149 </glossdef>
9150 </glossentry>
9151
9152 <glossentry id='var-TEST_QEMUBOOT_TIMEOUT'><glossterm>TEST_QEMUBOOT_TIMEOUT</glossterm>
9153 <glossdef>
9154 <para>
9155 The time in seconds allowed for an image to boot before
9156 automated runtime tests begin to run against an
9157 image.
9158 The default timeout period to allow the boot process to
9159 reach the login prompt is 500 seconds.
9160 You can specify a different value in the
9161 <filename>local.conf</filename> file.
9162 </para>
9163
9164 <para>
9165 For more information on testing images, see the
9166 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
9167 section in the Yocto Project Development Manual.
9168 </para>
9169 </glossdef>
9170 </glossentry>
9171
9172 <glossentry id='var-TEST_SERIALCONTROL_CMD'><glossterm>TEST_SERIALCONTROL_CMD</glossterm>
9173 <glossdef>
9174 <para>
9175 For automated hardware testing, specifies the command
9176 to use to connect to the serial console of the target
9177 machine under test.
9178 This command simply needs to connect to the serial console
9179 and forward that connection to standard input and output
9180 as any normal terminal program does.
9181 </para>
9182
9183 <para>
9184 For example, to use the Picocom terminal program on
9185 serial device <filename>/dev/ttyUSB0</filename> at
9186 115200bps, you would set the variable as follows:
9187 <literallayout class='monospaced'>
9188 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
9189 </literallayout>
9190 </para>
9191 </glossdef>
9192 </glossentry>
9193
9194 <glossentry id='var-TEST_SERIALCONTROL_EXTRA_ARGS'><glossterm>TEST_SERIALCONTROL_EXTRA_ARGS</glossterm>
9195 <glossdef>
9196 <para>
9197 For automated hardware testing, specifies additional
9198 arguments to pass through to the command specified in
9199 <link linkend='var-TEST_SERIALCONTROL_CMD'><filename>TEST_SERIALCONTROL_CMD</filename></link>.
9200 Setting <filename>TEST_SERIALCONTROL_EXTRA_ARGS</filename>
9201 is optional.
9202 You can use it if you wish, for example, to separate the
9203 machine-specific and non-machine-specific parts of the
9204 command.
9205 </para>
9206 </glossdef>
9207 </glossentry>
9208
9209 <glossentry id='var-TEST_SERVER_IP'><glossterm>TEST_SERVER_IP</glossterm>
9210 <glossdef>
9211 <para>
9212 The IP address of the build machine (host machine).
9213 This IP address is usually automatically detected.
9214 However, if detection fails, this variable needs to be set
9215 to the IP address of the build machine (i.e. where
9216 the build is taking place).
9217 <note>
9218 The <filename>TEST_SERVER_IP</filename> variable
9219 is only used for a small number of tests such as
9220 the "smart" test suite, which needs to download
9221 packages from <filename>DEPLOY_DIR/rpm</filename>.
9222 </note>
9223 </para>
9224 </glossdef>
9225 </glossentry>
9226
9227 <glossentry id='var-TEST_TARGET'><glossterm>TEST_TARGET</glossterm>
9228 <glossdef>
9229 <para>
9230 Specifies the target controller to use when running tests
9231 against a test image.
9232 The default controller to use is "qemu":
9233 <literallayout class='monospaced'>
9234 TEST_TARGET = "qemu"
9235 </literallayout>
9236 A target controller is a class that defines how an
9237 image gets deployed on a target and how a target is started.
9238 A layer can extend the controllers by adding a module
9239 in the layer's <filename>/lib/oeqa/controllers</filename>
9240 directory and by inheriting the
9241 <filename>BaseTarget</filename> class, which is an abstract
9242 class that cannot be used as a value of
9243 <filename>TEST_TARGET</filename>.
9244 </para>
9245
9246 <para>
9247 You can provide the following arguments with
9248 <filename>TEST_TARGET</filename>:
9249 <itemizedlist>
9250 <listitem><para><emphasis>"qemu" and "QemuTarget":</emphasis>
9251 Boots a QEMU image and runs the tests.
9252 See the
9253 "<ulink url='&YOCTO_DOCS_DEV_URL;#qemu-image-enabling-tests'>Enabling Runtime Tests on QEMU</ulink>"
9254 section in the Yocto Project Development Manual for
9255 more information.
9256 </para></listitem>
9257 <listitem><para><emphasis>"simpleremote" and "SimpleRemoteTarget":</emphasis>
9258 Runs the tests on target hardware that is already
9259 up and running.
9260 The hardware can be on the network or it can be
9261 a device running an image on QEMU.
9262 You must also set
9263 <link linkend='var-TEST_TARGET_IP'><filename>TEST_TARGET_IP</filename></link>
9264 when you use "simpleremote" or "SimpleRemoteTarget".
9265 <note>
9266 This argument is defined in
9267 <filename>meta/lib/oeqa/targetcontrol.py</filename>.
9268 The small caps names are kept for compatibility
9269 reasons.
9270 </note>
9271 </para></listitem>
9272 <listitem><para><emphasis>"GummibootTarget":</emphasis>
9273 Automatically deploys and runs tests on an
9274 EFI-enabled machine that has a master image
9275 installed.
9276 <note>
9277 This argument is defined in
9278 <filename>meta/lib/oeqa/controllers/masterimage.py</filename>.
9279 </note>
9280 </para></listitem>
9281 </itemizedlist>
9282 </para>
9283
9284 <para>
9285 For information on running tests on hardware, see the
9286 "<ulink url='&YOCTO_DOCS_DEV_URL;#hardware-image-enabling-tests'>Enabling Runtime Tests on Hardware</ulink>"
9287 section in the Yocto Project Development Manual.
9288 </para>
9289 </glossdef>
9290 </glossentry>
9291
9292 <glossentry id='var-TEST_TARGET_IP'><glossterm>TEST_TARGET_IP</glossterm>
9293 <glossdef>
9294 <para>
9295 The IP address of your hardware under test.
9296 The <filename>TEST_TARGET_IP</filename> variable has no
9297 effect when
9298 <link linkend='var-TEST_TARGET'><filename>TEST_TARGET</filename></link>
9299 is set to "qemu".
9300 </para>
9301
9302 <para>
9303 When you specify the IP address, you can also include a
9304 port.
9305 Here is an example:
9306 <literallayout class='monospaced'>
9307 TEST_TARGET_IP = "192.168.1.4:2201"
9308 </literallayout>
9309 Specifying a port is useful when SSH is started on a
9310 non-standard port or in cases when your hardware under test
9311 is behind a firewall or network that is not directly
9312 accessible from your host and you need to do port address
9313 translation.
9314 </para>
9315 </glossdef>
9316 </glossentry>
9317
9318 <glossentry id='var-TEST_SUITES'><glossterm>TEST_SUITES</glossterm>
9319 <glossdef>
9320 <para>
9321 An ordered list of tests (modules) to run against
9322 an image when performing automated runtime testing.
9323 </para>
9324
9325 <para>
9326 The OpenEmbedded build system provides a core set of tests
9327 that can be used against images.
9328 <note>
9329 Currently, there is only support for running these tests
9330 under QEMU.
9331 </note>
9332 Tests include <filename>ping</filename>,
9333 <filename>ssh</filename>, <filename>df</filename> among
9334 others.
9335 You can add your own tests to the list of tests by
9336 appending <filename>TEST_SUITES</filename> as follows:
9337 <literallayout class='monospaced'>
9338 TEST_SUITES_append = " <replaceable>mytest</replaceable>"
9339 </literallayout>
9340 Alternatively, you can provide the "auto" option to
9341 have all applicable tests run against the image.
9342 <literallayout class='monospaced'>
9343 TEST_SUITES_append = " auto"
9344 </literallayout>
9345 Using this option causes the build system to automatically
9346 run tests that are applicable to the image.
9347 Tests that are not applicable are skipped.
9348 </para>
9349
9350 <para>
9351 The order in which tests are run is important.
9352 Tests that depend on another test must appear later in the
9353 list than the test on which they depend.
9354 For example, if you append the list of tests with two
9355 tests (<filename>test_A</filename> and
9356 <filename>test_B</filename>) where
9357 <filename>test_B</filename> is dependent on
9358 <filename>test_A</filename>, then you must order the tests
9359 as follows:
9360 <literallayout class='monospaced'>
9361 TEST_SUITES = " test_A test_B"
9362 </literallayout>
9363 </para>
9364
9365 <para>
9366 For more information on testing images, see the
9367 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
9368 section in the Yocto Project Development Manual.
9369 </para>
9370 </glossdef>
9371 </glossentry>
9372
9373 <glossentry id='var-THISDIR'><glossterm>THISDIR</glossterm>
9374 <glossdef>
9375 <para>
9376 The directory in which the file BitBake is currently
9377 parsing is located.
9378 Do not manually set this variable.
9379 </para>
9380 </glossdef>
9381 </glossentry>
9382
9383 <glossentry id='var-TMPDIR'><glossterm>TMPDIR</glossterm>
9384 <glossdef>
9385 <para>
9386 This variable is the base directory the OpenEmbedded
9387 build system uses for all build output and intermediate
9388 files (other than the shared state cache).
9389 By default, the <filename>TMPDIR</filename> variable points
9390 to <filename>tmp</filename> within the
9391 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
9392 </para>
9393
9394 <para>
9395 If you want to establish this directory in a location other
9396 than the default, you can uncomment and edit the following
9397 statement in the
9398 <filename>conf/local.conf</filename> file in the
9399 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
9400 <literallayout class='monospaced'>
9401 #TMPDIR = "${TOPDIR}/tmp"
9402 </literallayout>
9403 An example use for this scenario is to set
9404 <filename>TMPDIR</filename> to a local disk, which does
9405 not use NFS, while having the Build Directory use NFS.
9406 </para>
9407
9408 <para>
9409 The filesystem used by <filename>TMPDIR</filename> must
9410 have standard filesystem semantics (i.e. mixed-case files
9411 are unique, POSIX file locking, and persistent inodes).
9412 Due to various issues with NFS and bugs in some
9413 implementations, NFS does not meet this minimum
9414 requirement.
9415 Consequently, <filename>TMPDIR</filename> cannot be on
9416 NFS.
9417 </para>
9418 </glossdef>
9419 </glossentry>
9420
9421 <glossentry id='var-TOOLCHAIN_HOST_TASK'><glossterm>TOOLCHAIN_HOST_TASK</glossterm>
9422 <glossdef>
9423 <para>
9424 This variable lists packages the OpenEmbedded build system
9425 uses when building an SDK, which contains a
9426 cross-development environment.
9427 The packages specified by this variable are part of the
9428 toolchain set that runs on the
9429 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
9430 and each package should usually have the prefix
9431 "nativesdk-".
9432 When building an SDK using
9433 <filename>bitbake -c populate_sdk &lt;imagename&gt;</filename>,
9434 a default list of packages is set in this variable, but
9435 you can add additional packages to the list.
9436 </para>
9437
9438 <para>
9439 For background information on cross-development toolchains
9440 in the Yocto Project development environment, see the
9441 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
9442 section.
9443 For information on setting up a cross-development
9444 environment, see the
9445 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
9446 section in the Yocto Project Application Developer's Guide.
9447 </para>
9448 </glossdef>
9449 </glossentry>
9450
9451 <glossentry id='var-TOOLCHAIN_TARGET_TASK'><glossterm>TOOLCHAIN_TARGET_TASK</glossterm>
9452 <glossdef>
9453 <para>
9454 This variable lists packages the OpenEmbedded build system
9455 uses when it creates the target part of an SDK
9456 (i.e. the part built for the target hardware), which
9457 includes libraries and headers.
9458 </para>
9459
9460 <para>
9461 For background information on cross-development toolchains
9462 in the Yocto Project development environment, see the
9463 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
9464 section.
9465 For information on setting up a cross-development
9466 environment, see the
9467 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
9468 section in the Yocto Project Application Developer's Guide.
9469 </para>
9470 </glossdef>
9471 </glossentry>
9472
9473 <glossentry id='var-TOPDIR'><glossterm>TOPDIR</glossterm>
9474 <glossdef>
9475 <para>
9476 The top-level
9477 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
9478 BitBake automatically sets this variable when you
9479 initialize your build environment using either
9480 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
9481 or
9482 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>.
9483 </para>
9484 </glossdef>
9485 </glossentry>
9486
9487 <glossentry id='var-TRANSLATED_TARGET_ARCH'><glossterm>TRANSLATED_TARGET_ARCH</glossterm>
9488 <glossdef>
9489 <para>
9490 A sanitized version of
9491 <link linkend='var-TARGET_ARCH'><filename>TARGET_ARCH</filename></link>.
9492 This variable is used where the architecture is needed in
9493 a value where underscores are not allowed, for example
9494 within package filenames.
9495 In this case, dash characters replace any underscore
9496 characters used in TARGET_ARCH.
9497 </para>
9498
9499 <para>
9500 Do not edit this variable.
9501 </para>
9502 </glossdef>
9503 </glossentry>
9504
9505 <glossentry id='var-TUNE_ARCH'><glossterm>TUNE_ARCH</glossterm>
9506 <glossdef>
9507 <para>
9508 The GNU canonical architecture for a specific architecture
9509 (i.e. <filename>arm</filename>,
9510 <filename>armeb</filename>,
9511 <filename>mips</filename>,
9512 <filename>mips64</filename>, and so forth).
9513 BitBake uses this value to setup configuration.
9514 </para>
9515
9516 <para>
9517 <filename>TUNE_ARCH</filename> definitions are specific to
9518 a given architecture.
9519 The definitions can be a single static definition, or
9520 can be dynamically adjusted.
9521 You can see details for a given CPU family by looking at
9522 the architecture's <filename>README</filename> file.
9523 For example, the
9524 <filename>meta/conf/machine/include/mips/README</filename>
9525 file in the
9526 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
9527 provides information for <filename>TUNE_ARCH</filename>
9528 specific to the <filename>mips</filename> architecture.
9529 </para>
9530
9531 <para>
9532 <filename>TUNE_ARCH</filename> is tied closely to
9533 <link linkend='var-TARGET_ARCH'><filename>TARGET_ARCH</filename></link>,
9534 which defines the target machine's architecture.
9535 The BitBake configuration file
9536 (<filename>meta/conf/bitbake.conf</filename>) sets
9537 <filename>TARGET_ARCH</filename> as follows:
9538 <literallayout class='monospaced'>
9539 TARGET_ARCH = "${TUNE_ARCH}"
9540 </literallayout>
9541 </para>
9542
9543 <para>
9544 The following list, which is by no means complete since
9545 architectures are configurable, shows supported machine
9546 architectures:
9547 <literallayout class='monospaced'>
9548 arm
9549 i586
9550 x86_64
9551 powerpc
9552 powerpc64
9553 mips
9554 mipsel
9555 </literallayout>
9556 </para>
9557 </glossdef>
9558 </glossentry>
9559
9560 <glossentry id='var-TUNE_ASARGS'><glossterm>TUNE_ASARGS</glossterm>
9561 <glossdef>
9562 <para>
9563 Specifies architecture-specific assembler flags for
9564 the target system.
9565 The set of flags is based on the selected tune features.
9566 <filename>TUNE_ASARGS</filename> is set using
9567 the tune include files, which are typically under
9568 <filename>meta/conf/machine/include/</filename> and are
9569 influenced through <filename>TUNE_FEATURES</filename>.
9570 For example, the
9571 <filename>meta/conf/machine/include/x86/arch-x86.inc</filename>
9572 file defines the flags for the x86 architecture as follows:
9573 <literallayout class='monospaced'>
9574 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
9575 </literallayout>
9576 <note>
9577 Board Support Packages (BSPs) can supply their own
9578 set of flags.
9579 </note>
9580 </para>
9581 </glossdef>
9582 </glossentry>
9583
9584 <glossentry id='var-TUNE_CCARGS'><glossterm>TUNE_CCARGS</glossterm>
9585 <glossdef>
9586 <para>
9587 Specifies architecture-specific C compiler flags for
9588 the target system.
9589 The set of flags is based on the selected tune features.
9590 <filename>TUNE_CCARGS</filename> is set using
9591 the tune include files, which are typically under
9592 <filename>meta/conf/machine/include/</filename> and are
9593 influenced through <filename>TUNE_FEATURES</filename>.
9594 <note>
9595 Board Support Packages (BSPs) can supply their own
9596 set of flags.
9597 </note>
9598 </para>
9599 </glossdef>
9600 </glossentry>
9601
9602 <glossentry id='var-TUNE_LDARGS'><glossterm>TUNE_LDARGS</glossterm>
9603 <glossdef>
9604 <para>
9605 Specifies architecture-specific linker flags for
9606 the target system.
9607 The set of flags is based on the selected tune features.
9608 <filename>TUNE_LDARGS</filename> is set using
9609 the tune include files, which are typically under
9610 <filename>meta/conf/machine/include/</filename> and are
9611 influenced through <filename>TUNE_FEATURES</filename>.
9612 For example, the
9613 <filename>meta/conf/machine/include/x86/arch-x86.inc</filename>
9614 file defines the flags for the x86 architecture as follows:
9615 <literallayout class='monospaced'>
9616 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
9617 </literallayout>
9618 <note>
9619 Board Support Packages (BSPs) can supply their own
9620 set of flags.
9621 </note>
9622 </para>
9623 </glossdef>
9624 </glossentry>
9625
9626 <glossentry id='var-TUNE_FEATURES'><glossterm>TUNE_FEATURES</glossterm>
9627 <glossdef>
9628 <para>
9629 Features used to "tune" a compiler for optimal use
9630 given a specific processor.
9631 The features are defined within the tune files and allow
9632 arguments (i.e. <filename>TUNE_*ARGS</filename>) to be
9633 dynamically generated based on the features.
9634 </para>
9635
9636 <para>
9637 The OpenEmbedded build system verifies the features
9638 to be sure they are not conflicting and that they are
9639 supported.
9640 </para>
9641
9642 <para>
9643 The BitBake configuration file
9644 (<filename>meta/conf/bitbake.conf</filename>) defines
9645 <filename>TUNE_FEATURES</filename> as follows:
9646 <literallayout class='monospaced'>
9647 TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
9648 </literallayout>
9649 See the
9650 <link linkend='var-DEFAULTTUNE'><filename>DEFAULTTUNE</filename></link>
9651 variable for more information.
9652 </para>
9653 </glossdef>
9654 </glossentry>
9655
9656 <glossentry id='var-TUNE_PKGARCH'><glossterm>TUNE_PKGARCH</glossterm>
9657 <glossdef>
9658 <para>
9659 The package architecture understood by the packaging
9660 system to define the architecture, ABI, and tuning of
9661 output packages.
9662 </para>
9663 </glossdef>
9664 </glossentry>
9665
9666 <glossentry id='var-TUNE_PKGARCH_tune'><glossterm>TUNE_PKGARCH_tune</glossterm>
9667 <glossdef>
9668 <para>
9669 The CPU or Application Binary Interface (ABI) specific
9670 tuning of the
9671 <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link>.
9672 </para>
9673
9674 <para>
9675 These tune-specific package architectures are defined in
9676 the machine include files.
9677 Here is an example of the "core2-32" tuning as used
9678 in the
9679 <filename>meta/conf/machine/include/tune-core2.inc</filename>
9680 file:
9681 <literallayout class='monospaced'>
9682 TUNE_PKGARCH_tune-core2-32 = "core2-32"
9683 </literallayout>
9684 </para>
9685 </glossdef>
9686 </glossentry>
9687
9688 <glossentry id='var-TUNEABI'><glossterm>TUNEABI</glossterm>
9689 <glossdef>
9690 <para>
9691 An underlying Application Binary Interface (ABI) used by
9692 a particular tuning in a given toolchain layer.
9693 Providers that use prebuilt libraries can use the
9694 <filename>TUNEABI</filename>,
9695 <link linkend='var-TUNEABI_OVERRIDE'><filename>TUNEABI_OVERRIDE</filename></link>,
9696 and
9697 <link linkend='var-TUNEABI_WHITELIST'><filename>TUNEABI_WHITELIST</filename></link>
9698 variables to check compatibility of tunings against their
9699 selection of libraries.
9700 </para>
9701
9702 <para>
9703 If <filename>TUNEABI</filename> is undefined, then every
9704 tuning is allowed.
9705 See the
9706 <link linkend='ref-classes-sanity'><filename>sanity</filename></link>
9707 class to see how the variable is used.
9708 </para>
9709 </glossdef>
9710 </glossentry>
9711
9712 <glossentry id='var-TUNEABI_OVERRIDE'><glossterm>TUNEABI_OVERRIDE</glossterm>
9713 <glossdef>
9714 <para>
9715 If set, the OpenEmbedded system ignores the
9716 <link linkend='var-TUNEABI_WHITELIST'><filename>TUNEABI_WHITELIST</filename></link>
9717 variable.
9718 Providers that use prebuilt libraries can use the
9719 <filename>TUNEABI_OVERRIDE</filename>,
9720 <filename>TUNEABI_WHITELIST</filename>,
9721 and
9722 <link linkend='var-TUNEABI'><filename>TUNEABI</filename></link>
9723 variables to check compatibility of a tuning against their
9724 selection of libraries.
9725 </para>
9726
9727 <para>
9728 See the
9729 <link linkend='ref-classes-sanity'><filename>sanity</filename></link>
9730 class to see how the variable is used.
9731 </para>
9732 </glossdef>
9733 </glossentry>
9734
9735 <glossentry id='var-TUNEABI_WHITELIST'><glossterm>TUNEABI_WHITELIST</glossterm>
9736 <glossdef>
9737 <para>
9738 A whitelist of permissible
9739 <link linkend='var-TUNEABI'><filename>TUNEABI</filename></link>
9740 values.
9741 If <filename>TUNEABI_WHITELIST</filename> is not set,
9742 all tunes are allowed.
9743 Providers that use prebuilt libraries can use the
9744 <filename>TUNEABI_WHITELIST</filename>,
9745 <link linkend='var-TUNEABI_OVERRIDE'><filename>TUNEABI_OVERRIDE</filename></link>,
9746 and <filename>TUNEABI</filename> variables to check
9747 compatibility of a tuning against their selection of
9748 libraries.
9749 </para>
9750
9751 <para>
9752 See the
9753 <link linkend='ref-classes-sanity'><filename>sanity</filename></link>
9754 class to see how the variable is used.
9755 </para>
9756 </glossdef>
9757 </glossentry>
9758
9759 <glossentry id='var-TUNECONFLICT'><glossterm>TUNECONFLICT[<replaceable>feature</replaceable>]</glossterm>
9760 <glossdef>
9761 <para>
9762 Specifies CPU or Application Binary Interface (ABI)
9763 tuning features that conflict with <replaceable>feature</replaceable>.
9764 </para>
9765
9766 <para>
9767 Known tuning conflicts are specified in the machine include
9768 files in the
9769 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
9770 Here is an example from the
9771 <filename>meta/conf/machine/include/mips/arch-mips.inc</filename>
9772 include file that lists the "o32" and "n64" features as
9773 conflicting with the "n32" feature:
9774 <literallayout class='monospaced'>
9775 TUNECONFLICTS[n32] = "o32 n64"
9776 </literallayout>
9777 </para>
9778 </glossdef>
9779 </glossentry>
9780
9781 <glossentry id='var-TUNEVALID'><glossterm>TUNEVALID[<replaceable>feature</replaceable>]</glossterm>
9782 <glossdef>
9783 <para>
9784 Specifies a valid CPU or Application Binary Interface (ABI)
9785 tuning feature.
9786 The specified feature is stored as a flag.
9787 Valid features are specified in the machine include files
9788 (e.g. <filename>meta/conf/machine/include/arm/arch-arm.inc</filename>).
9789 Here is an example from that file:
9790 <literallayout class='monospaced'>
9791 TUNEVALID[bigendian] = "Enable big-endian mode."
9792 </literallayout>
9793 See the machine include files in the
9794 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
9795 for these features.
9796 </para>
9797 </glossdef>
9798 </glossentry>
9799
9800 </glossdiv>
9801
9802 <glossdiv id='var-glossary-u'><title>U</title>
9803
9804 <glossentry id='var-UBOOT_CONFIG'><glossterm>UBOOT_CONFIG</glossterm>
9805 <glossdef>
9806 <para>
9807 Configures the
9808 <link linkend='var-UBOOT_MACHINE'><filename>UBOOT_MACHINE</filename></link>
9809 and can also define
9810 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
9811 for individual cases.
9812 </para>
9813
9814 <para>
9815 Following is an example from the
9816 <filename>meta-fsl-arm</filename> layer.
9817 <literallayout class='monospaced'>
9818 UBOOT_CONFIG ??= "sd"
9819 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
9820 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
9821 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
9822 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
9823 </literallayout>
9824 In this example, "sd" is selected as the configuration
9825 of the possible four for the
9826 <filename>UBOOT_MACHINE</filename>.
9827 The "sd" configuration defines "mx6qsabreauto_config"
9828 as the value for <filename>UBOOT_MACHINE</filename>, while
9829 the "sdcard" specifies the
9830 <filename>IMAGE_FSTYPES</filename> to use for the U-boot
9831 image.
9832 </para>
9833
9834 <para>
9835 For more information on how the
9836 <filename>UBOOT_CONFIG</filename> is handled, see the
9837 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/uboot-config.bbclass'><filename>uboot-config</filename></ulink>
9838 class.
9839 </para>
9840 </glossdef>
9841 </glossentry>
9842
9843 <glossentry id='var-UBOOT_ENTRYPOINT'><glossterm>UBOOT_ENTRYPOINT</glossterm>
9844 <glossdef>
9845 <para>
9846 Specifies the entry point for the U-Boot image.
9847 During U-Boot image creation, the
9848 <filename>UBOOT_ENTRYPOINT</filename> variable is passed
9849 as a command-line parameter to the
9850 <filename>uboot-mkimage</filename> utility.
9851 </para>
9852 </glossdef>
9853 </glossentry>
9854
9855 <glossentry id='var-UBOOT_LOADADDRESS'><glossterm>UBOOT_LOADADDRESS</glossterm>
9856 <glossdef>
9857 <para>
9858 Specifies the load address for the U-Boot image.
9859 During U-Boot image creation, the
9860 <filename>UBOOT_LOADADDRESS</filename> variable is passed
9861 as a command-line parameter to the
9862 <filename>uboot-mkimage</filename> utility.
9863 </para>
9864 </glossdef>
9865 </glossentry>
9866
9867 <glossentry id='var-UBOOT_LOCALVERSION'><glossterm>UBOOT_LOCALVERSION</glossterm>
9868 <glossdef>
9869 <para>
9870 Appends a string to the name of the local version of the
9871 U-Boot image.
9872 For example, assuming the version of the U-Boot image
9873 built was "2013.10, the full version string reported by
9874 U-Boot would be "2013.10-yocto" given the following
9875 statement:
9876 <literallayout class='monospaced'>
9877 UBOOT_LOCALVERSION = "-yocto"
9878 </literallayout>
9879 </para>
9880 </glossdef>
9881 </glossentry>
9882
9883 <glossentry id='var-UBOOT_MACHINE'><glossterm>UBOOT_MACHINE</glossterm>
9884 <glossdef>
9885 <para>
9886 Specifies the value passed on the
9887 <filename>make</filename> command line when building
9888 a U-Boot image.
9889 The value indicates the target platform configuration.
9890 You typically set this variable from the machine
9891 configuration file (i.e.
9892 <filename>conf/machine/<replaceable>machine_name</replaceable>.conf</filename>).
9893 </para>
9894
9895 <para>
9896 Please see the "Selection of Processor Architecture and
9897 Board Type" section in the U-Boot README for valid values
9898 for this variable.
9899 </para>
9900 </glossdef>
9901 </glossentry>
9902
9903 <glossentry id='var-UBOOT_MAKE_TARGET'><glossterm>UBOOT_MAKE_TARGET</glossterm>
9904 <glossdef>
9905 <para>
9906 Specifies the target called in the
9907 <filename>Makefile</filename>.
9908 The default target is "all".
9909 </para>
9910 </glossdef>
9911 </glossentry>
9912
9913 <glossentry id='var-UBOOT_SUFFIX'><glossterm>UBOOT_SUFFIX</glossterm>
9914 <glossdef>
9915 <para>
9916 Points to the generated U-Boot extension.
9917 For example, <filename>u-boot.sb</filename> has a
9918 <filename>.sb</filename> extension.
9919 </para>
9920
9921 <para>
9922 The default U-Boot extension is
9923 <filename>.bin</filename>
9924 </para>
9925 </glossdef>
9926 </glossentry>
9927
9928 <glossentry id='var-UBOOT_TARGET'><glossterm>UBOOT_TARGET</glossterm>
9929 <glossdef>
9930 <para>
9931 Specifies the target used for building U-Boot.
9932 The target is passed directly as part of the "make" command
9933 (e.g. SPL and AIS).
9934 If you do not specifically set this variable, the
9935 OpenEmbedded build process passes and uses "all" for the
9936 target during the U-Boot building process.
9937 </para>
9938 </glossdef>
9939 </glossentry>
9940
9941 <glossentry id='var-USE_VT'><glossterm>USE_VT</glossterm>
9942 <glossdef>
9943 <para>
9944 When using
9945 <ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-enabling-system-services'>SysVinit</ulink>,
9946 determines whether or not to run a
9947 <ulink url='http://en.wikipedia.org/wiki/Getty_%28Unix%29'>getty</ulink>
9948 on any virtual terminals in order to enable logging in
9949 through those terminals.
9950 </para>
9951
9952 <para>
9953 The default value used for <filename>USE_VT</filename>
9954 is "1" when no default value is specifically set.
9955 Typically, you would set <filename>USE_VT</filename>
9956 to "0" in the machine configuration file for machines
9957 that do not have a graphical display attached and
9958 therefore do not need virtual terminal functionality.
9959 </para>
9960 </glossdef>
9961 </glossentry>
9962
9963 <glossentry id='var-USER_CLASSES'><glossterm>USER_CLASSES</glossterm>
9964 <glossdef>
9965 <para>
9966 A list of classes to globally inherit.
9967 These classes are used by the OpenEmbedded build system
9968 to enable extra features (e.g.
9969 <filename>buildstats</filename>,
9970 <filename>image-mklibs</filename>, and so forth).
9971 </para>
9972
9973 <para>
9974 The default list is set in your
9975 <filename>local.conf</filename> file:
9976 <literallayout class='monospaced'>
9977 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
9978 </literallayout>
9979 For more information, see
9980 <filename>meta-yocto/conf/local.conf.sample</filename> in
9981 the
9982 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
9983 </para>
9984 </glossdef>
9985 </glossentry>
9986
9987 <glossentry id='var-USERADD_ERROR_DYNAMIC'><glossterm>USERADD_ERROR_DYNAMIC</glossterm>
9988 <glossdef>
9989 <para>
9990 Forces the OpenEmbedded build system to produce an error
9991 if the user identification (<filename>uid</filename>) and
9992 group identification (<filename>gid</filename>) values
9993 are not defined in <filename>files/passwd</filename>
9994 and <filename>files/group</filename> files.
9995 </para>
9996
9997 <para>
9998 The default behavior for the build system is to dynamically
9999 apply <filename>uid</filename> and
10000 <filename>gid</filename> values.
10001 Consequently, the <filename>USERADD_ERROR_DYNAMIC</filename>
10002 variable is by default not set.
10003 If you plan on using statically assigned
10004 <filename>gid</filename> and <filename>uid</filename>
10005 values, you should set
10006 the <filename>USERADD_ERROR_DYNAMIC</filename> variable in
10007 your <filename>local.conf</filename> file as
10008 follows:
10009 <literallayout class='monospaced'>
10010 USERADD_ERROR_DYNAMIC = "1"
10011 </literallayout>
10012 Overriding the default behavior implies you are going to
10013 also take steps to set static <filename>uid</filename> and
10014 <filename>gid</filename> values through use of the
10015 <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>,
10016 <link linkend='var-USERADD_UID_TABLES'><filename>USERADD_UID_TABLES</filename></link>,
10017 and
10018 <link linkend='var-USERADD_GID_TABLES'><filename>USERADD_GID_TABLES</filename></link>
10019 variables.
10020 </para>
10021 </glossdef>
10022 </glossentry>
10023
10024 <glossentry id='var-USERADD_GID_TABLES'><glossterm>USERADD_GID_TABLES</glossterm>
10025 <glossdef>
10026 <para>
10027 Specifies a password file to use for obtaining static
10028 group identification (<filename>gid</filename>) values
10029 when the OpenEmbedded build system adds a group to the
10030 system during package installation.
10031 </para>
10032
10033 <para>
10034 When applying static group identification
10035 (<filename>gid</filename>) values, the OpenEmbedded build
10036 system looks in
10037 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
10038 for a <filename>files/group</filename> file and then applies
10039 those <filename>uid</filename> values.
10040 Set the variable as follows in your
10041 <filename>local.conf</filename> file:
10042 <literallayout class='monospaced'>
10043 USERADD_GID_TABLES = "files/group"
10044 </literallayout>
10045 </para>
10046
10047 <note>
10048 Setting the
10049 <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>
10050 variable to "useradd-staticids" causes the build system
10051 to use static <filename>gid</filename> values.
10052 </note>
10053 </glossdef>
10054 </glossentry>
10055
10056 <glossentry id='var-USERADD_UID_TABLES'><glossterm>USERADD_UID_TABLES</glossterm>
10057 <glossdef>
10058 <para>
10059 Specifies a password file to use for obtaining static
10060 user identification (<filename>uid</filename>) values
10061 when the OpenEmbedded build system adds a user to the
10062 system during package installation.
10063 </para>
10064
10065 <para>
10066 When applying static user identification
10067 (<filename>uid</filename>) values, the OpenEmbedded build
10068 system looks in
10069 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
10070 for a <filename>files/passwd</filename> file and then applies
10071 those <filename>uid</filename> values.
10072 Set the variable as follows in your
10073 <filename>local.conf</filename> file:
10074 <literallayout class='monospaced'>
10075 USERADD_UID_TABLES = "files/passwd"
10076 </literallayout>
10077 </para>
10078
10079 <note>
10080 Setting the
10081 <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>
10082 variable to "useradd-staticids" causes the build system
10083 to use static <filename>uid</filename> values.
10084 </note>
10085 </glossdef>
10086 </glossentry>
10087
10088 <glossentry id='var-USERADD_PACKAGES'><glossterm>USERADD_PACKAGES</glossterm>
10089 <glossdef>
10090 <para>
10091 When inheriting the
10092 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
10093 class, this variable
10094 specifies the individual packages within the recipe that
10095 require users and/or groups to be added.
10096 </para>
10097
10098 <para>
10099 You must set this variable if the recipe inherits the
10100 class.
10101 For example, the following enables adding a user for the
10102 main package in a recipe:
10103 <literallayout class='monospaced'>
10104 USERADD_PACKAGES = "${PN}"
10105 </literallayout>
10106 <note>
10107 If follows that if you are going to use the
10108 <filename>USERADD_PACKAGES</filename> variable,
10109 you need to set one or more of the
10110 <link linkend='var-USERADD_PARAM'><filename>USERADD_PARAM</filename></link>,
10111 <link linkend='var-GROUPADD_PARAM'><filename>GROUPADD_PARAM</filename></link>,
10112 or
10113 <link linkend='var-GROUPMEMS_PARAM'><filename>GROUPMEMS_PARAM</filename></link>
10114 variables.
10115 </note>
10116 </para>
10117
10118 </glossdef>
10119 </glossentry>
10120
10121 <glossentry id='var-USERADD_PARAM'><glossterm>USERADD_PARAM</glossterm>
10122 <glossdef>
10123 <para>
10124 When inheriting the
10125 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
10126 class, this variable
10127 specifies for a package what parameters should be passed
10128 to the <filename>useradd</filename> command
10129 if you wish to add a user to the system when the package
10130 is installed.
10131 </para>
10132
10133 <para>
10134 Here is an example from the <filename>dbus</filename>
10135 recipe:
10136 <literallayout class='monospaced'>
10137 USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
10138 --no-create-home --shell /bin/false \
10139 --user-group messagebus"
10140 </literallayout>
10141 For information on the standard Linux shell command
10142 <filename>useradd</filename>, see
10143 <ulink url='http://linux.die.net/man/8/useradd'></ulink>.
10144 </para>
10145 </glossdef>
10146 </glossentry>
10147
10148 <glossentry id='var-USERADDEXTENSION'><glossterm>USERADDEXTENSION</glossterm>
10149 <glossdef>
10150 <para>
10151 When set to "useradd-staticids", causes the
10152 OpenEmbedded build system to base all user and group
10153 additions on a static
10154 <filename>passwd</filename> and
10155 <filename>group</filename> files found in
10156 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>.
10157 </para>
10158
10159 <para>
10160 To use static user identification (<filename>uid</filename>)
10161 and group identification (<filename>gid</filename>)
10162 values, set the variable
10163 as follows in your <filename>local.conf</filename> file:
10164 <literallayout class='monospaced'>
10165 USERADDEXTENSION = "useradd-staticids"
10166 </literallayout>
10167 <note>
10168 Setting this variable to use static
10169 <filename>uid</filename> and <filename>gid</filename>
10170 values causes the OpenEmbedded build system to employ
10171 the
10172 <link linkend='ref-classes-useradd-staticids'><filename>useradd-staticids</filename></link>
10173 class.
10174 </note>
10175 </para>
10176
10177 <para>
10178 If you use static <filename>uid</filename> and
10179 <filename>gid</filename> information, you must also
10180 specify the <filename>files/passwd</filename> and
10181 <filename>files/group</filename> files by setting the
10182 <link linkend='var-USERADD_UID_TABLES'><filename>USERADD_UID_TABLES</filename></link>
10183 and
10184 <link linkend='var-USERADD_GID_TABLES'><filename>USERADD_GID_TABLES</filename></link>
10185 variables.
10186 Additionally, you should also set the
10187 <link linkend='var-USERADD_ERROR_DYNAMIC'><filename>USERADD_ERROR_DYNAMIC</filename></link>
10188 variable.
10189 </para>
10190 </glossdef>
10191 </glossentry>
10192
10193 </glossdiv>
10194
10195<!-- <glossdiv id='var-glossary-v'><title>V</title>-->
10196<!-- </glossdiv>-->
10197
10198 <glossdiv id='var-glossary-w'><title>W</title>
10199
10200 <glossentry id='var-WARN_QA'><glossterm>WARN_QA</glossterm>
10201 <glossdef>
10202 <para>
10203 Specifies the quality assurance checks whose failures are
10204 reported as warnings by the OpenEmbedded build system.
10205 You set this variable in your distribution configuration
10206 file.
10207 For a list of the checks you can control with this variable,
10208 see the
10209 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
10210 section.
10211 </para>
10212 </glossdef>
10213 </glossentry>
10214
10215 <glossentry id='var-WORKDIR'><glossterm>WORKDIR</glossterm>
10216 <glossdef>
10217 <para>
10218 The pathname of the work directory in which the OpenEmbedded
10219 build system builds a recipe.
10220 This directory is located within the
10221 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
10222 directory structure and is specific to the recipe being
10223 built and the system for which it is being built.
10224 </para>
10225
10226 <para>
10227 The <filename>WORKDIR</filename> directory is defined as
10228 follows:
10229 <literallayout class='monospaced'>
10230 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
10231 </literallayout>
10232 The actual directory depends on several things:
10233 <itemizedlist>
10234 <listitem><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>:
10235 The top-level build output directory</listitem>
10236 <listitem><link linkend='var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></link>:
10237 The target system identifier</listitem>
10238 <listitem><link linkend='var-PN'><filename>PN</filename></link>:
10239 The recipe name</listitem>
10240 <listitem><link linkend='var-EXTENDPE'><filename>EXTENDPE</filename></link>:
10241 The epoch - (if
10242 <link linkend='var-PE'><filename>PE</filename></link>
10243 is not specified, which is usually the case for most
10244 recipes, then <filename>EXTENDPE</filename> is blank)</listitem>
10245 <listitem><link linkend='var-PV'><filename>PV</filename></link>:
10246 The recipe version</listitem>
10247 <listitem><link linkend='var-PR'><filename>PR</filename></link>:
10248 The recipe revision</listitem>
10249 </itemizedlist>
10250 </para>
10251
10252 <para>
10253 As an example, assume a Source Directory top-level folder
10254 name <filename>poky</filename>, a default Build Directory at
10255 <filename>poky/build</filename>, and a
10256 <filename>qemux86-poky-linux</filename> machine target
10257 system.
10258 Furthermore, suppose your recipe is named
10259 <filename>foo_1.3.0-r0.bb</filename>.
10260 In this case, the work directory the build system uses to
10261 build the package would be as follows:
10262 <literallayout class='monospaced'>
10263 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
10264 </literallayout>
10265 </para>
10266 </glossdef>
10267 </glossentry>
10268
10269 </glossdiv>
10270
10271<!-- <glossdiv id='var-glossary-x'><title>X</title>-->
10272<!-- </glossdiv>-->
10273
10274<!-- <glossdiv id='var-glossary-y'><title>Y</title>-->
10275<!-- </glossdiv>-->
10276
10277<!-- <glossdiv id='var-glossary-z'><title>Z</title>-->
10278<!-- </glossdiv>-->
10279
10280</glossary>
10281</chapter>
10282<!--
10283vim: expandtab tw=80 ts=4
10284-->
diff --git a/documentation/ref-manual/ref-varlocality.xml b/documentation/ref-manual/ref-varlocality.xml
new file mode 100644
index 0000000000..d3f873298d
--- /dev/null
+++ b/documentation/ref-manual/ref-varlocality.xml
@@ -0,0 +1,196 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='ref-varlocality'>
6 <title>Variable Context</title>
7
8 <para>
9 While you can use most variables in almost any context such as
10 <filename>.conf</filename>, <filename>.bbclass</filename>,
11 <filename>.inc</filename>, and <filename>.bb</filename> files,
12 some variables are often associated with a particular locality or context.
13 This chapter describes some common associations.
14 </para>
15
16 <section id='ref-varlocality-configuration'>
17 <title>Configuration</title>
18
19 <para>
20 The following subsections provide lists of variables whose context is
21 configuration: distribution, machine, and local.
22 </para>
23
24 <section id='ref-varlocality-config-distro'>
25 <title>Distribution (Distro)</title>
26
27 <para>
28 This section lists variables whose configuration context is the
29 distribution, or distro.
30 <itemizedlist>
31 <listitem><para><filename><link linkend='var-DISTRO'>DISTRO</link></filename></para></listitem>
32 <listitem><para><filename><link linkend='var-DISTRO_NAME'>DISTRO_NAME</link></filename>
33 </para></listitem>
34 <listitem><para><filename><link linkend='var-DISTRO_VERSION'>DISTRO_VERSION</link>
35 </filename></para></listitem>
36 <listitem><para><filename><link linkend='var-MAINTAINER'>MAINTAINER</link></filename>
37 </para></listitem>
38 <listitem><para><filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link>
39 </filename></para></listitem>
40 <listitem><para><filename><link linkend='var-TARGET_OS'>TARGET_OS</link></filename>
41 </para></listitem>
42 <listitem><para><filename><link linkend='var-TARGET_FPU'>TARGET_FPU</link></filename>
43 </para></listitem>
44 <listitem><para><filename><link linkend='var-TCMODE'>TCMODE</link></filename>
45 </para></listitem>
46 <listitem><para><filename><link linkend='var-TCLIBC'>TCLIBC</link></filename>
47 </para></listitem>
48 </itemizedlist>
49 </para>
50 </section>
51
52 <section id='ref-varlocality-config-machine'>
53 <title>Machine</title>
54
55 <para>
56 This section lists variables whose configuration context is the
57 machine.
58 <itemizedlist>
59 <listitem><para><filename><link linkend='var-TARGET_ARCH'>TARGET_ARCH</link></filename>
60 </para></listitem>
61 <listitem><para><filename><link linkend='var-SERIAL_CONSOLES'>SERIAL_CONSOLES</link>
62 </filename></para></listitem>
63 <listitem><para><filename><link linkend='var-PACKAGE_EXTRA_ARCHS'>PACKAGE_EXTRA_ARCHS</link>
64 </filename></para></listitem>
65 <listitem><para><filename><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link>
66 </filename></para></listitem>
67 <listitem><para><filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link>
68 </filename></para></listitem>
69 <listitem><para><filename><link linkend='var-MACHINE_EXTRA_RDEPENDS'>MACHINE_EXTRA_RDEPENDS
70 </link></filename></para></listitem>
71 <listitem><para><filename><link linkend='var-MACHINE_EXTRA_RRECOMMENDS'>MACHINE_EXTRA_RRECOMMENDS
72 </link></filename></para></listitem>
73 <listitem><para><filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'>MACHINE_ESSENTIAL_EXTRA_RDEPENDS
74 </link></filename></para></listitem>
75 <listitem><para><filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'>
76 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</link></filename></para></listitem>
77 </itemizedlist>
78 </para>
79 </section>
80
81 <section id='ref-varlocality-config-local'>
82 <title>Local</title>
83
84 <para>
85 This section lists variables whose configuration context is the
86 local configuration through the <filename>local.conf</filename>
87 file.
88 <itemizedlist>
89 <listitem><para><filename><link linkend='var-DISTRO'>DISTRO</link></filename>
90 </para></listitem>
91 <listitem><para><filename><link linkend='var-MACHINE'>MACHINE</link></filename>
92 </para></listitem>
93 <listitem><para><filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>
94 </para></listitem>
95 <listitem><para><filename><link linkend='var-BBFILES'>BBFILES</link></filename>
96 </para></listitem>
97 <listitem><para><filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES
98 </link></filename></para></listitem>
99 <listitem><para><filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link>
100 </filename></para></listitem>
101 <listitem><para><filename><link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link>
102 </filename></para></listitem>
103 <listitem><para><filename><link linkend='var-BBINCLUDELOGS'>BBINCLUDELOGS</link>
104 </filename></para></listitem>
105 <listitem><para><filename><link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>
106 ENABLE_BINARY_LOCALE_GENERATION</link></filename></para></listitem>
107 </itemizedlist>
108 </para>
109 </section>
110 </section>
111
112 <section id='ref-varlocality-recipes'>
113 <title>Recipes</title>
114
115 <para>
116 The following subsections provide lists of variables whose context is
117 recipes: required, dependencies, path, and extra build information.
118 </para>
119
120 <section id='ref-varlocality-recipe-required'>
121 <title>Required</title>
122
123 <para>
124 This section lists variables that are required for recipes.
125 <itemizedlist>
126 <listitem><para><filename><link linkend='var-LICENSE'>LICENSE</link>
127 </filename></para></listitem>
128 <listitem><para><filename><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link>
129 </filename></para></listitem>
130 <listitem><para><filename><link linkend='var-SRC_URI'>SRC_URI</link></filename> - used
131 in recipes that fetch local or remote files.
132 </para></listitem>
133 </itemizedlist>
134 </para>
135 </section>
136
137 <section id='ref-varlocality-recipe-dependencies'>
138 <title>Dependencies</title>
139
140 <para>
141 This section lists variables that define recipe dependencies.
142 <itemizedlist>
143 <listitem><para><filename><link linkend='var-DEPENDS'>DEPENDS</link>
144 </filename></para></listitem>
145 <listitem><para><filename><link linkend='var-RDEPENDS'>RDEPENDS</link>
146 </filename></para></listitem>
147 <listitem><para><filename><link linkend='var-RRECOMMENDS'>RRECOMMENDS</link>
148 </filename></para></listitem>
149 <listitem><para><filename><link linkend='var-RCONFLICTS'>RCONFLICTS</link>
150 </filename></para></listitem>
151 <listitem><para><filename><link linkend='var-RREPLACES'>RREPLACES</link>
152 </filename></para></listitem>
153 </itemizedlist>
154 </para>
155 </section>
156
157 <section id='ref-varlocality-recipe-paths'>
158 <title>Paths</title>
159
160 <para>
161 This section lists variables that define recipe paths.
162 <itemizedlist>
163 <listitem><para><filename><link linkend='var-WORKDIR'>WORKDIR</link>
164 </filename></para></listitem>
165 <listitem><para><filename><link linkend='var-S'>S</link>
166 </filename></para></listitem>
167 <listitem><para><filename><link linkend='var-FILES'>FILES</link>
168 </filename></para></listitem>
169 </itemizedlist>
170 </para>
171 </section>
172
173 <section id='ref-varlocality-recipe-build'>
174 <title>Extra Build Information</title>
175
176 <para>
177 This section lists variables that define extra build information for recipes.
178 <itemizedlist>
179 <listitem><para><filename><link linkend='var-EXTRA_OECMAKE'>EXTRA_OECMAKE</link>
180 </filename></para></listitem>
181 <listitem><para><filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link>
182 </filename></para></listitem>
183 <listitem><para><filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link>
184 </filename></para></listitem>
185 <listitem><para><filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
186 </para></listitem>
187 <listitem><para><filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE
188 </link></filename></para></listitem>
189 </itemizedlist>
190 </para>
191 </section>
192 </section>
193</chapter>
194<!--
195vim: expandtab tw=80 ts=4 spell spelllang=en_gb
196-->
diff --git a/documentation/ref-manual/resources.xml b/documentation/ref-manual/resources.xml
new file mode 100644
index 0000000000..17b8e97145
--- /dev/null
+++ b/documentation/ref-manual/resources.xml
@@ -0,0 +1,130 @@
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 For more Yocto Project-related mailing lists, see the Yocto Project community mailing lists page
58 <ulink url='&YOCTO_HOME_URL;/tools-resources/community/mailing-lists'>here</ulink>.
59</section>
60
61<section id='resources-irc'>
62 <title>Internet Relay Chat (IRC)</title>
63
64 <para>
65 Two IRC channels on freenode are available for the Yocto Project and Poky discussions:
66 <itemizedlist>
67 <listitem><para><filename>#yocto</filename></para></listitem>
68 <listitem><para><filename>#poky</filename></para></listitem>
69 </itemizedlist>
70 </para>
71</section>
72
73<section id='resources-links'>
74 <title>Links</title>
75
76 <para>
77 Here is a list of resources you will find helpful:
78 <itemizedlist>
79 <listitem><para><emphasis>
80 <ulink url='&YOCTO_HOME_URL;'>The Yocto Project website</ulink>:
81 </emphasis> The home site for the Yocto
82 Project.</para></listitem>
83 <listitem><para><emphasis>
84 <ulink url='http://www.intel.com/'>Intel Corporation</ulink>:</emphasis>
85 The company that acquired OpenedHand in 2008 and began
86 development on the Yocto Project.</para></listitem>
87 <listitem><para><emphasis>
88 <ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>:</emphasis>
89 The upstream, generic, embedded distribution used as the basis
90 for the build system in the Yocto Project.
91 Poky derives from and contributes back to the OpenEmbedded
92 project.</para></listitem>
93 <listitem><para><emphasis>
94 <ulink url='http://www.openembedded.org/wiki/BitBake'>
95 BitBake</ulink>:</emphasis> The tool used to process metadata.</para></listitem>
96 <listitem><para><emphasis>
97 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>:</emphasis>
98 A comprehensive guide to the BitBake tool.
99 In the
100 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
101 you can find the BitBake User Manual in the
102 <filename>bitbake/doc/bitbake-user-manual</filename> directory.
103 </para></listitem>
104 <listitem><para><emphasis>
105 <ulink url='http://wiki.qemu.org/Index.html'>QEMU</ulink>:
106 </emphasis> An open source machine emulator and virtualizer.
107 </para></listitem>
108 </itemizedlist>
109 </para>
110</section>
111
112<section id='resources-contributions'>
113 <title>Contributions</title>
114
115 <para>
116 The Yocto Project gladly accepts contributions.
117 You can submit changes to the project either by creating and sending
118 pull requests,
119 or by submitting patches through email.
120 For information on how to do both as well as information on how
121 to identify the maintainer for each area of code, see the
122 "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>How to Submit a Change</ulink>"
123 section in the Yocto Project Development Manual.
124 </para>
125</section>
126
127</chapter>
128<!--
129vim: expandtab tw=80 ts=4
130-->
diff --git a/documentation/ref-manual/technical-details.xml b/documentation/ref-manual/technical-details.xml
new file mode 100644
index 0000000000..2df36521c2
--- /dev/null
+++ b/documentation/ref-manual/technical-details.xml
@@ -0,0 +1,1421 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='technical-details'>
6<title>Technical Details</title>
7
8 <para>
9 This chapter provides technical details for various parts of the
10 Yocto Project.
11 Currently, topics include Yocto Project components,
12 cross-toolchain generation, shared state (sstate) cache,
13 x32, Wayland support, and Licenses.
14 </para>
15
16<section id='usingpoky-components'>
17 <title>Yocto Project Components</title>
18
19 <para>
20 The
21 <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
22 task executor together with various types of configuration files form
23 the OpenEmbedded Core.
24 This section overviews these components by describing their use and
25 how they interact.
26 </para>
27
28 <para>
29 BitBake handles the parsing and execution of the data files.
30 The data itself is of various types:
31 <itemizedlist>
32 <listitem><para><emphasis>Recipes:</emphasis> Provides details
33 about particular pieces of software.
34 </para></listitem>
35 <listitem><para><emphasis>Class Data:</emphasis> Abstracts
36 common build information (e.g. how to build a Linux kernel).
37 </para></listitem>
38 <listitem><para><emphasis>Configuration Data:</emphasis> Defines
39 machine-specific settings, policy decisions, and so forth.
40 Configuration data acts as the glue to bind everything
41 together.
42 </para></listitem>
43 </itemizedlist>
44 </para>
45
46 <para>
47 BitBake knows how to combine multiple data sources together and refers
48 to each data source as a layer.
49 For information on layers, see the
50 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and
51 Creating Layers</ulink>" section of the Yocto Project Development Manual.
52 </para>
53
54 <para>
55 Following are some brief details on these core components.
56 For additional information on how these components interact during
57 a build, see the
58 "<link linkend='closer-look'>A Closer Look at the Yocto Project Development Environment</link>"
59 Chapter.
60 </para>
61
62 <section id='usingpoky-components-bitbake'>
63 <title>BitBake</title>
64
65 <para>
66 BitBake is the tool at the heart of the OpenEmbedded build system
67 and is responsible for parsing the
68 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>,
69 generating a list of tasks from it, and then executing those tasks.
70 </para>
71
72 <para>
73 This section briefly introduces BitBake.
74 If you want more information on BitBake, see the
75 <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>.
76 </para>
77
78 <para>
79 To see a list of the options BitBake supports, use either of
80 the following commands:
81 <literallayout class='monospaced'>
82 $ bitbake -h
83 $ bitbake --help
84 </literallayout>
85 </para>
86
87 <para>
88 The most common usage for BitBake is <filename>bitbake <replaceable>packagename</replaceable></filename>, where
89 <filename>packagename</filename> is the name of the package you want to build
90 (referred to as the "target" in this manual).
91 The target often equates to the first part of a recipe's filename
92 (e.g. "foo" for a recipe named
93 <filename>foo_1.3.0-r0.bb</filename>).
94 So, to process the <filename>matchbox-desktop_1.2.3.bb</filename> recipe file, you
95 might type the following:
96 <literallayout class='monospaced'>
97 $ bitbake matchbox-desktop
98 </literallayout>
99 Several different versions of <filename>matchbox-desktop</filename> might exist.
100 BitBake chooses the one selected by the distribution configuration.
101 You can get more details about how BitBake chooses between different
102 target versions and providers in the
103 "<ulink url='&YOCTO_DOCS_BB_URL;#bb-bitbake-preferences'>Preferences</ulink>"
104 section of the BitBake User Manual.
105 </para>
106
107 <para>
108 BitBake also tries to execute any dependent tasks first.
109 So for example, before building <filename>matchbox-desktop</filename>, BitBake
110 would build a cross compiler and <filename>glibc</filename> if they had not already
111 been built.
112 </para>
113
114 <para>
115 A useful BitBake option to consider is the <filename>-k</filename> or
116 <filename>--continue</filename> option.
117 This option instructs BitBake to try and continue processing the job
118 as long as possible even after encountering an error.
119 When an error occurs, the target that
120 failed and those that depend on it cannot be remade.
121 However, when you use this option other dependencies can still be
122 processed.
123 </para>
124 </section>
125
126 <section id='usingpoky-components-metadata'>
127 <title>Metadata (Recipes)</title>
128
129 <para>
130 Files that have the <filename>.bb</filename> suffix are "recipes"
131 files.
132 In general, a recipe contains information about a single piece of
133 software.
134 This information includes the location from which to download the
135 unaltered source, any source patches to be applied to that source
136 (if needed), which special configuration options to apply,
137 how to compile the source files, and how to package the compiled
138 output.
139 </para>
140
141 <para>
142 The term "package" is sometimes used to refer to recipes. However,
143 since the word "package" is used for the packaged output from the OpenEmbedded
144 build system (i.e. <filename>.ipk</filename> or <filename>.deb</filename> files),
145 this document avoids using the term "package" when referring to recipes.
146 </para>
147 </section>
148
149 <section id='usingpoky-components-classes'>
150 <title>Classes</title>
151
152 <para>
153 Class files (<filename>.bbclass</filename>) contain information that
154 is useful to share between
155 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> files.
156 An example is the
157 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
158 class, which contains common settings for any application that
159 Autotools uses.
160 The "<link linkend='ref-classes'>Classes</link>" chapter provides
161 details about classes and how to use them.
162 </para>
163 </section>
164
165 <section id='usingpoky-components-configuration'>
166 <title>Configuration</title>
167
168 <para>
169 The configuration files (<filename>.conf</filename>) define various configuration variables
170 that govern the OpenEmbedded build process.
171 These files fall into several areas that define machine configuration options,
172 distribution configuration options, compiler tuning options, general common configuration
173 options, and user configuration options in <filename>local.conf</filename>, which is found
174 in the
175 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
176 </para>
177 </section>
178</section>
179
180<section id="cross-development-toolchain-generation">
181 <title>Cross-Development Toolchain Generation</title>
182
183 <para>
184 The Yocto Project does most of the work for you when it comes to
185 creating
186 <ulink url='&YOCTO_DOCS_DEV_URL;#cross-development-toolchain'>cross-development toolchains</ulink>.
187 This section provides some technical background on how
188 cross-development toolchains are created and used.
189 For more information on toolchains, you can also see the
190 <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink>.
191 </para>
192
193 <para>
194 In the Yocto Project development environment, cross-development
195 toolchains are used to build the image and applications that run on the
196 target hardware.
197 With just a few commands, the OpenEmbedded build system creates
198 these necessary toolchains for you.
199 </para>
200
201 <para>
202 The following figure shows a high-level build environment regarding
203 toolchain construction and use.
204 </para>
205
206 <para>
207 <imagedata fileref="figures/cross-development-toolchains.png" width="8in" depth="6in" align="center" />
208 </para>
209
210 <para>
211 Most of the work occurs on the Build Host.
212 This is the machine used to build images and generally work within the
213 the Yocto Project environment.
214 When you run BitBake to create an image, the OpenEmbedded build system
215 uses the host <filename>gcc</filename> compiler to bootstrap a
216 cross-compiler named <filename>gcc-cross</filename>.
217 The <filename>gcc-cross</filename> compiler is what BitBake uses to
218 compile source files when creating the target image.
219 You can think of <filename>gcc-cross</filename> simply as an
220 automatically generated cross-compiler that is used internally within
221 BitBake only.
222 </para>
223
224 <para>
225 The chain of events that occurs when <filename>gcc-cross</filename> is
226 bootstrapped is as follows:
227 <literallayout class='monospaced'>
228 gcc -> binutils-cross -> gcc-cross-initial -> linux-libc-headers -> glibc-initial -> glibc -> gcc-cross -> gcc-runtime
229 </literallayout>
230 <itemizedlist>
231 <listitem><para><filename>gcc</filename>:
232 The build host's GNU Compiler Collection (GCC).
233 </para></listitem>
234 <listitem><para><filename>binutils-cross</filename>:
235 The bare minimum binary utilities needed in order to run
236 the <filename>gcc-cross-initial</filename> phase of the
237 bootstrap operation.
238 </para></listitem>
239 <listitem><para><filename>gcc-cross-initial</filename>:
240 An early stage of the bootstrap process for creating
241 the cross-compiler.
242 This stage builds enough of the <filename>gcc-cross</filename>,
243 the C library, and other pieces needed to finish building the
244 final cross-compiler in later stages.
245 This tool is a "native" package (i.e. it is designed to run on
246 the build host).
247 </para></listitem>
248 <listitem><para><filename>linux-libc-headers</filename>:
249 Headers needed for the cross-compiler.
250 </para></listitem>
251 <listitem><para><filename>glibc-initial</filename>:
252 An initial version of the Embedded GLIBC needed to bootstrap
253 <filename>glibc</filename>.
254 </para></listitem>
255 <listitem><para><filename>gcc-cross</filename>:
256 The final stage of the bootstrap process for the
257 cross-compiler.
258 This stage results in the actual cross-compiler that
259 BitBake uses when it builds an image for a targeted
260 device.
261 <note>
262 If you are replacing this cross compiler toolchain
263 with a custom version, you must replace
264 <filename>gcc-cross</filename>.
265 </note>
266 This tool is also a "native" package (i.e. it is
267 designed to run on the build host).
268 </para></listitem>
269 <listitem><para><filename>gcc-runtime</filename>:
270 Runtime libraries resulting from the toolchain bootstrapping
271 process.
272 This tool produces a binary that consists of the
273 runtime libraries need for the targeted device.
274 </para></listitem>
275 </itemizedlist>
276 </para>
277
278 <para>
279 You can use the OpenEmbedded build system to build an installer for
280 the relocatable SDK used to develop applications.
281 When you run the installer, it installs the toolchain, which contains
282 the development tools (e.g., the
283 <filename>gcc-cross-canadian</filename>),
284 <filename>binutils-cross-canadian</filename>, and other
285 <filename>nativesdk-*</filename> tools you need to cross-compile and
286 test your software.
287 The figure shows the commands you use to easily build out this
288 toolchain.
289 This cross-development toolchain is built to execute on the
290 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
291 which might or might not be the same
292 machine as the Build Host.
293 <note>
294 If your target architecture is supported by the Yocto Project,
295 you can take advantage of pre-built images that ship with the
296 Yocto Project and already contain cross-development toolchain
297 installers.
298 </note>
299 </para>
300
301 <para>
302 Here is the bootstrap process for the relocatable toolchain:
303 <literallayout class='monospaced'>
304 gcc -> binutils-crosssdk -> gcc-crosssdk-initial -> linux-libc-headers ->
305 glibc-initial -> nativesdk-glibc -> gcc-crosssdk -> gcc-cross-canadian
306 </literallayout>
307 <itemizedlist>
308 <listitem><para><filename>gcc</filename>:
309 The build host's GNU Compiler Collection (GCC).
310 </para></listitem>
311 <listitem><para><filename>binutils-crosssdk</filename>:
312 The bare minimum binary utilities needed in order to run
313 the <filename>gcc-crosssdk-initial</filename> phase of the
314 bootstrap operation.
315 </para></listitem>
316 <listitem><para><filename>gcc-crosssdk-initial</filename>:
317 An early stage of the bootstrap process for creating
318 the cross-compiler.
319 This stage builds enough of the
320 <filename>gcc-crosssdk</filename> and supporting pieces so that
321 the final stage of the bootstrap process can produce the
322 finished cross-compiler.
323 This tool is a "native" binary that runs on the build host.
324 </para></listitem>
325 <listitem><para><filename>linux-libc-headers</filename>:
326 Headers needed for the cross-compiler.
327 </para></listitem>
328 <listitem><para><filename>glibc-initial</filename>:
329 An initial version of the Embedded GLIBC needed to bootstrap
330 <filename>nativesdk-glibc</filename>.
331 </para></listitem>
332 <listitem><para><filename>nativesdk-glibc</filename>:
333 The Embedded GLIBC needed to bootstrap the
334 <filename>gcc-crosssdk</filename>.
335 </para></listitem>
336 <listitem><para><filename>gcc-crosssdk</filename>:
337 The final stage of the bootstrap process for the
338 relocatable cross-compiler.
339 The <filename>gcc-crosssdk</filename> is a transitory compiler
340 and never leaves the build host.
341 Its purpose is to help in the bootstrap process to create the
342 eventual relocatable <filename>gcc-cross-canadian</filename>
343 compiler, which is relocatable.
344 This tool is also a "native" package (i.e. it is
345 designed to run on the build host).
346 </para></listitem>
347 <listitem><para><filename>gcc-cross-canadian</filename>:
348 The final relocatable cross-compiler.
349 When run on the
350 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
351 this tool
352 produces executable code that runs on the target device.
353 Only one cross-canadian compiler is produced per architecture
354 since they can be targeted at different processor optimizations
355 using configurations passed to the compiler through the
356 compile commands.
357 This circumvents the need for multiple compilers and thus
358 reduces the size of the toolchains.
359 </para></listitem>
360 </itemizedlist>
361 </para>
362
363 <note>
364 For information on advantages gained when building a
365 cross-development toolchain installer, see the
366 "<ulink url='&YOCTO_DOCS_ADT_URL;#optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</ulink>"
367 section in the Yocto Project Application Developer's Guide.
368 </note>
369</section>
370
371<section id="shared-state-cache">
372 <title>Shared State Cache</title>
373
374 <para>
375 By design, the OpenEmbedded build system builds everything from scratch unless
376 BitBake can determine that parts do not need to be rebuilt.
377 Fundamentally, building from scratch is attractive as it means all parts are
378 built fresh and there is no possibility of stale data causing problems.
379 When developers hit problems, they typically default back to building from scratch
380 so they know the state of things from the start.
381 </para>
382
383 <para>
384 Building an image from scratch is both an advantage and a disadvantage to the process.
385 As mentioned in the previous paragraph, building from scratch ensures that
386 everything is current and starts from a known state.
387 However, building from scratch also takes much longer as it generally means
388 rebuilding things that do not necessarily need to be rebuilt.
389 </para>
390
391 <para>
392 The Yocto Project implements shared state code that supports incremental builds.
393 The implementation of the shared state code answers the following questions that
394 were fundamental roadblocks within the OpenEmbedded incremental build support system:
395 <itemizedlist>
396 <listitem><para>What pieces of the system have changed and what pieces have
397 not changed?</para></listitem>
398 <listitem><para>How are changed pieces of software removed and replaced?</para></listitem>
399 <listitem><para>How are pre-built components that do not need to be rebuilt from scratch
400 used when they are available?</para></listitem>
401 </itemizedlist>
402 </para>
403
404 <para>
405 For the first question, the build system detects changes in the "inputs" to a given task by
406 creating a checksum (or signature) of the task's inputs.
407 If the checksum changes, the system assumes the inputs have changed and the task needs to be
408 rerun.
409 For the second question, the shared state (sstate) code tracks which tasks add which output
410 to the build process.
411 This means the output from a given task can be removed, upgraded or otherwise manipulated.
412 The third question is partly addressed by the solution for the second question
413 assuming the build system can fetch the sstate objects from remote locations and
414 install them if they are deemed to be valid.
415 </para>
416
417 <note>
418 The OpenEmbedded build system does not maintain
419 <link linkend='var-PR'><filename>PR</filename></link> information
420 as part of the shared state packages.
421 Consequently, considerations exist that affect maintaining shared
422 state feeds.
423 For information on how the OpenEmbedded build system
424 works with packages and can
425 track incrementing <filename>PR</filename> information, see the
426 "<ulink url='&YOCTO_DOCS_DEV_URL;#incrementing-a-package-revision-number'>Incrementing a Package Revision Number</ulink>"
427 section.
428 </note>
429
430 <para>
431 The rest of this section goes into detail about the overall incremental build
432 architecture, the checksums (signatures), shared state, and some tips and tricks.
433 </para>
434
435 <section id='overall-architecture'>
436 <title>Overall Architecture</title>
437
438 <para>
439 When determining what parts of the system need to be built, BitBake
440 works on a per-task basis rather than a per-recipe basis.
441 You might wonder why using a per-task basis is preferred over a per-recipe basis.
442 To help explain, consider having the IPK packaging backend enabled and then switching to DEB.
443 In this case, the
444 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
445 and
446 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
447 task outputs are still valid.
448 However, with a per-recipe approach, the build would not include the
449 <filename>.deb</filename> files.
450 Consequently, you would have to invalidate the whole build and rerun it.
451 Rerunning everything is not the best solution.
452 Also, in this case, the core must be "taught" much about specific tasks.
453 This methodology does not scale well and does not allow users to easily add new tasks
454 in layers or as external recipes without touching the packaged-staging core.
455 </para>
456 </section>
457
458 <section id='checksums'>
459 <title>Checksums (Signatures)</title>
460
461 <para>
462 The shared state code uses a checksum, which is a unique signature of a task's
463 inputs, to determine if a task needs to be run again.
464 Because it is a change in a task's inputs that triggers a rerun, the process
465 needs to detect all the inputs to a given task.
466 For shell tasks, this turns out to be fairly easy because
467 the build process generates a "run" shell script for each task and
468 it is possible to create a checksum that gives you a good idea of when
469 the task's data changes.
470 </para>
471
472 <para>
473 To complicate the problem, there are things that should not be included in
474 the checksum.
475 First, there is the actual specific build path of a given task -
476 the <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
477 It does not matter if the work directory changes because it should not
478 affect the output for target packages.
479 Also, the build process has the objective of making native or cross packages relocatable.
480 The checksum therefore needs to exclude <filename>WORKDIR</filename>.
481 The simplistic approach for excluding the work directory is to set
482 <filename>WORKDIR</filename> to some fixed value and create the checksum
483 for the "run" script.
484 </para>
485
486 <para>
487 Another problem results from the "run" scripts containing functions that
488 might or might not get called.
489 The incremental build solution contains code that figures out dependencies
490 between shell functions.
491 This code is used to prune the "run" scripts down to the minimum set,
492 thereby alleviating this problem and making the "run" scripts much more
493 readable as a bonus.
494 </para>
495
496 <para>
497 So far we have solutions for shell scripts.
498 What about Python tasks?
499 The same approach applies even though these tasks are more difficult.
500 The process needs to figure out what variables a Python function accesses
501 and what functions it calls.
502 Again, the incremental build solution contains code that first figures out
503 the variable and function dependencies, and then creates a checksum for the data
504 used as the input to the task.
505 </para>
506
507 <para>
508 Like the <filename>WORKDIR</filename> case, situations exist where dependencies
509 should be ignored.
510 For these cases, you can instruct the build process to ignore a dependency
511 by using a line like the following:
512 <literallayout class='monospaced'>
513 PACKAGE_ARCHS[vardepsexclude] = "MACHINE"
514 </literallayout>
515 This example ensures that the
516 <link linkend='var-PACKAGE_ARCHS'><filename>PACKAGE_ARCHS</filename></link>
517 variable does not
518 depend on the value of
519 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
520 even if it does reference it.
521 </para>
522
523 <para>
524 Equally, there are cases where we need to add dependencies BitBake is not able to find.
525 You can accomplish this by using a line like the following:
526 <literallayout class='monospaced'>
527 PACKAGE_ARCHS[vardeps] = "MACHINE"
528 </literallayout>
529 This example explicitly adds the <filename>MACHINE</filename> variable as a
530 dependency for <filename>PACKAGE_ARCHS</filename>.
531 </para>
532
533 <para>
534 Consider a case with in-line Python, for example, where BitBake is not
535 able to figure out dependencies.
536 When running in debug mode (i.e. using <filename>-DDD</filename>), BitBake
537 produces output when it discovers something for which it cannot figure out
538 dependencies.
539 The Yocto Project team has currently not managed to cover those dependencies
540 in detail and is aware of the need to fix this situation.
541 </para>
542
543 <para>
544 Thus far, this section has limited discussion to the direct inputs into a task.
545 Information based on direct inputs is referred to as the "basehash" in the
546 code.
547 However, there is still the question of a task's indirect inputs - the
548 things that were already built and present in the
549 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
550 The checksum (or signature) for a particular task needs to add the hashes
551 of all the tasks on which the particular task depends.
552 Choosing which dependencies to add is a policy decision.
553 However, the effect is to generate a master checksum that combines the basehash
554 and the hashes of the task's dependencies.
555 </para>
556
557 <para>
558 At the code level, there are a variety of ways both the basehash and the
559 dependent task hashes can be influenced.
560 Within the BitBake configuration file, we can give BitBake some extra information
561 to help it construct the basehash.
562 The following statement effectively results in a list of global variable
563 dependency excludes - variables never included in any checksum:
564 <literallayout class='monospaced'>
565 BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \
566 SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
567 USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
568 PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
569 CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX"
570 </literallayout>
571 The previous example excludes
572 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
573 since that variable is actually constructed as a path within
574 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>, which is on
575 the whitelist.
576 </para>
577
578 <para>
579 The rules for deciding which hashes of dependent tasks to include through
580 dependency chains are more complex and are generally accomplished with a
581 Python function.
582 The code in <filename>meta/lib/oe/sstatesig.py</filename> shows two examples
583 of this and also illustrates how you can insert your own policy into the system
584 if so desired.
585 This file defines the two basic signature generators <filename>OE-Core</filename>
586 uses: "OEBasic" and "OEBasicHash".
587 By default, there is a dummy "noop" signature handler enabled in BitBake.
588 This means that behavior is unchanged from previous versions.
589 <filename>OE-Core</filename> uses the "OEBasicHash" signature handler by default
590 through this setting in the <filename>bitbake.conf</filename> file:
591 <literallayout class='monospaced'>
592 BB_SIGNATURE_HANDLER ?= "OEBasicHash"
593 </literallayout>
594 The "OEBasicHash" <filename>BB_SIGNATURE_HANDLER</filename> is the same as the
595 "OEBasic" version but adds the task hash to the stamp files.
596 This results in any
597 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
598 change that changes the task hash, automatically
599 causing the task to be run again.
600 This removes the need to bump <link linkend='var-PR'><filename>PR</filename></link>
601 values, and changes to Metadata automatically ripple across the build.
602 </para>
603
604 <para>
605 It is also worth noting that the end result of these signature generators is to
606 make some dependency and hash information available to the build.
607 This information includes:
608 <itemizedlist>
609 <listitem><para><filename>BB_BASEHASH_task-</filename><replaceable>taskname</replaceable>:
610 The base hashes for each task in the recipe.
611 </para></listitem>
612 <listitem><para><filename>BB_BASEHASH_</filename><replaceable>filename</replaceable><filename>:</filename><replaceable>taskname</replaceable>:
613 The base hashes for each dependent task.
614 </para></listitem>
615 <listitem><para><filename>BBHASHDEPS_</filename><replaceable>filename</replaceable><filename>:</filename><replaceable>taskname</replaceable>:
616 The task dependencies for each task.
617 </para></listitem>
618 <listitem><para><filename>BB_TASKHASH</filename>:
619 The hash of the currently running task.
620 </para></listitem>
621 </itemizedlist>
622 </para>
623 </section>
624
625 <section id='shared-state'>
626 <title>Shared State</title>
627
628 <para>
629 Checksums and dependencies, as discussed in the previous section, solve half the
630 problem of supporting a shared state.
631 The other part of the problem is being able to use checksum information during the build
632 and being able to reuse or rebuild specific components.
633 </para>
634
635 <para>
636 The
637 <link linkend='ref-classes-sstate'><filename>sstate</filename></link>
638 class is a relatively generic implementation of how to "capture"
639 a snapshot of a given task.
640 The idea is that the build process does not care about the source of a task's output.
641 Output could be freshly built or it could be downloaded and unpacked from
642 somewhere - the build process does not need to worry about its origin.
643 </para>
644
645 <para>
646 There are two types of output, one is just about creating a directory
647 in <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
648 A good example is the output of either
649 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
650 or
651 <link linkend='ref-tasks-package'><filename>do_package</filename></link>.
652 The other type of output occurs when a set of data is merged into a shared directory
653 tree such as the sysroot.
654 </para>
655
656 <para>
657 The Yocto Project team has tried to keep the details of the
658 implementation hidden in <filename>sstate</filename> class.
659 From a user's perspective, adding shared state wrapping to a task
660 is as simple as this
661 <link linkend='ref-tasks-deploy'><filename>do_deploy</filename></link>
662 example taken from the
663 <link linkend='ref-classes-deploy'><filename>deploy</filename></link>
664 class:
665 <literallayout class='monospaced'>
666 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
667 SSTATETASKS += "do_deploy"
668 do_deploy[sstate-name] = "deploy"
669 do_deploy[sstate-inputdirs] = "${DEPLOYDIR}"
670 do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
671
672 python do_deploy_setscene () {
673 sstate_setscene(d)
674 }
675 addtask do_deploy_setscene
676 do_deploy[dirs] = "${DEPLOYDIR} ${B}"
677 </literallayout>
678 In this example, we add some extra flags to the task, a name field ("deploy"), an
679 input directory where the task sends data, and the output
680 directory where the data from the task should eventually be copied.
681 We also add a <filename>_setscene</filename> variant of the task and add the task
682 name to the <filename>SSTATETASKS</filename> list.
683 </para>
684
685 <para>
686 If you have a directory whose contents you need to preserve, you can do this with
687 a line like the following:
688 <literallayout class='monospaced'>
689 do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}"
690 </literallayout>
691 This method, as well as the following example, also works for multiple directories.
692 <literallayout class='monospaced'>
693 do_package[sstate-inputdirs] = "${PKGDESTWORK} ${SHLIBSWORKDIR}"
694 do_package[sstate-outputdirs] = "${PKGDATA_DIR} ${SHLIBSDIR}"
695 do_package[sstate-lockfile] = "${PACKAGELOCK}"
696 </literallayout>
697 These methods also include the ability to take a lockfile when manipulating
698 shared state directory structures since some cases are sensitive to file
699 additions or removals.
700 </para>
701
702 <para>
703 Behind the scenes, the shared state code works by looking in
704 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link> and
705 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
706 for shared state files.
707 Here is an example:
708 <literallayout class='monospaced'>
709 SSTATE_MIRRORS ?= "\
710 file://.* http://someserver.tld/share/sstate/PATH \n \
711 file://.* file:///some/local/dir/sstate/PATH"
712 </literallayout>
713 <note>
714 The shared state directory (<filename>SSTATE_DIR</filename>) is
715 organized into two-character subdirectories, where the subdirectory
716 names are based on the first two characters of the hash.
717 If the shared state directory structure for a mirror has the
718 same structure as <filename>SSTATE_DIR</filename>, you must
719 specify "PATH" as part of the URI to enable the build system
720 to map to the appropriate subdirectory.
721 </note>
722 </para>
723
724 <para>
725 The shared state package validity can be detected just by looking at the
726 filename since the filename contains the task checksum (or signature) as
727 described earlier in this section.
728 If a valid shared state package is found, the build process downloads it
729 and uses it to accelerate the task.
730 </para>
731
732 <para>
733 The build processes use the <filename>*_setscene</filename> tasks
734 for the task acceleration phase.
735 BitBake goes through this phase before the main execution code and tries
736 to accelerate any tasks for which it can find shared state packages.
737 If a shared state package for a task is available, the shared state
738 package is used.
739 This means the task and any tasks on which it is dependent are not
740 executed.
741 </para>
742
743 <para>
744 As a real world example, the aim is when building an IPK-based image,
745 only the
746 <link linkend='ref-tasks-package_write_ipk'><filename>do_package_write_ipk</filename></link>
747 tasks would have their
748 shared state packages fetched and extracted.
749 Since the sysroot is not used, it would never get extracted.
750 This is another reason why a task-based approach is preferred over a
751 recipe-based approach, which would have to install the output from every task.
752 </para>
753 </section>
754
755 <section id='tips-and-tricks'>
756 <title>Tips and Tricks</title>
757
758 <para>
759 The code in the build system that supports incremental builds is not
760 simple code.
761 This section presents some tips and tricks that help you work around
762 issues related to shared state code.
763 </para>
764
765 <section id='debugging'>
766 <title>Debugging</title>
767
768 <para>
769 When things go wrong, debugging needs to be straightforward.
770 Because of this, the Yocto Project includes strong debugging
771 tools:
772 <itemizedlist>
773 <listitem><para>Whenever a shared state package is written out, so is a
774 corresponding <filename>.siginfo</filename> file.
775 This practice results in a pickled Python database of all
776 the metadata that went into creating the hash for a given shared state
777 package.</para></listitem>
778 <listitem><para>If you run BitBake with the <filename>--dump-signatures</filename>
779 (or <filename>-S</filename>) option, BitBake dumps out
780 <filename>.siginfo</filename> files in
781 the stamp directory for every task it would have executed instead of
782 building the specified target package.</para></listitem>
783 <listitem><para>There is a <filename>bitbake-diffsigs</filename> command that
784 can process <filename>.siginfo</filename> files.
785 If you specify one of these files, BitBake dumps out the dependency
786 information in the file.
787 If you specify two files, BitBake compares the two files and dumps out
788 the differences between the two.
789 This more easily helps answer the question of "What
790 changed between X and Y?"</para></listitem>
791 </itemizedlist>
792 </para>
793 </section>
794
795 <section id='invalidating-shared-state'>
796 <title>Invalidating Shared State</title>
797
798 <para>
799 The OpenEmbedded build system uses checksums and shared state
800 cache to avoid unnecessarily rebuilding tasks.
801 Collectively, this scheme is known as "shared state code."
802 </para>
803
804 <para>
805 As with all schemes, this one has some drawbacks.
806 It is possible that you could make implicit changes to your
807 code that the checksum calculations do not take into
808 account.
809 These implicit changes affect a task's output but do not trigger
810 the shared state code into rebuilding a recipe.
811 Consider an example during which a tool changes its output.
812 Assume that the output of <filename>rpmdeps</filename> changes.
813 The result of the change should be that all the
814 <filename>package</filename> and
815 <filename>package_write_rpm</filename> shared state cache
816 items become invalid.
817 However, because the change to the output is
818 external to the code and therefore implicit,
819 the associated shared state cache items do not become
820 invalidated.
821 In this case, the build process uses the cached items rather
822 than running the task again.
823 Obviously, these types of implicit changes can cause problems.
824 </para>
825
826 <para>
827 To avoid these problems during the build, you need to
828 understand the effects of any changes you make.
829 Realize that changes you make directly to a function
830 are automatically factored into the checksum calculation.
831 Thus, these explicit changes invalidate the associated area of
832 shared state cache.
833 However, you need to be aware of any implicit changes that
834 are not obvious changes to the code and could affect the output
835 of a given task.
836 </para>
837
838 <para>
839 When you identify an implicit change, you can easily take steps
840 to invalidate the cache and force the tasks to run.
841 The steps you can take are as simple as changing a function's
842 comments in the source code.
843 For example, to invalidate package shared state files, change
844 the comment statements of
845 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
846 or the comments of one of the functions it calls.
847 Even though the change is purely cosmetic, it causes the
848 checksum to be recalculated and forces the OpenEmbedded build
849 system to run the task again.
850 </para>
851
852 <note>
853 For an example of a commit that makes a cosmetic change to
854 invalidate shared state, see this
855 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/commit/meta/classes/package.bbclass?id=737f8bbb4f27b4837047cb9b4fbfe01dfde36d54'>commit</ulink>.
856 </note>
857 </section>
858 </section>
859</section>
860
861<section id='x32'>
862 <title>x32</title>
863
864 <para>
865 x32 is a processor-specific Application Binary Interface (psABI) for x86_64.
866 An ABI defines the calling conventions between functions in a processing environment.
867 The interface determines what registers are used and what the sizes are for various C data types.
868 </para>
869
870 <para>
871 Some processing environments prefer using 32-bit applications even when running
872 on Intel 64-bit platforms.
873 Consider the i386 psABI, which is a very old 32-bit ABI for Intel 64-bit platforms.
874 The i386 psABI does not provide efficient use and access of the Intel 64-bit processor resources,
875 leaving the system underutilized.
876 Now consider the x86_64 psABI.
877 This ABI is newer and uses 64-bits for data sizes and program pointers.
878 The extra bits increase the footprint size of the programs, libraries,
879 and also increases the memory and file system size requirements.
880 Executing under the x32 psABI enables user programs to utilize CPU and system resources
881 more efficiently while keeping the memory footprint of the applications low.
882 Extra bits are used for registers but not for addressing mechanisms.
883 </para>
884
885 <section id='support'>
886 <title>Support</title>
887
888 <para>
889 This Yocto Project release supports the final specifications of x32
890 psABI.
891 Support for x32 psABI exists as follows:
892 <itemizedlist>
893 <listitem><para>You can create packages and images in x32 psABI format on x86_64 architecture targets.
894 </para></listitem>
895 <listitem><para>You can successfully build many recipes with the x32 toolchain.</para></listitem>
896 <listitem><para>You can create and boot <filename>core-image-minimal</filename> and
897 <filename>core-image-sato</filename> images.</para></listitem>
898 </itemizedlist>
899 </para>
900 </section>
901
902 <section id='completing-x32'>
903 <title>Completing x32</title>
904
905 <para>
906 Future Plans for the x32 psABI in the Yocto Project include the following:
907 <itemizedlist>
908 <listitem><para>Enhance and fix the few remaining recipes so they
909 work with and support x32 toolchains.</para></listitem>
910 <listitem><para>Enhance RPM Package Manager (RPM) support for x32 binaries.</para></listitem>
911 <listitem><para>Support larger images.</para></listitem>
912 </itemizedlist>
913 </para>
914 </section>
915
916 <section id='using-x32-right-now'>
917 <title>Using x32 Right Now</title>
918
919 <para>
920 Follow these steps to use the x32 spABI:
921 <itemizedlist>
922 <listitem><para>Enable the x32 psABI tuning file for <filename>x86_64</filename>
923 machines by editing the <filename>conf/local.conf</filename> like this:
924 <literallayout class='monospaced'>
925 MACHINE = "qemux86-64"
926 DEFAULTTUNE = "x86-64-x32"
927 baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) \
928 or 'INVALID'), True) or 'lib'}"
929 #MACHINE = "genericx86"
930 #DEFAULTTUNE = "core2-64-x32"
931 </literallayout></para></listitem>
932 <listitem><para>As usual, use BitBake to build an image that supports the x32 psABI.
933 Here is an example:
934 <literallayout class='monospaced'>
935 $ bitbake core-image-sato
936 </literallayout></para></listitem>
937 <listitem><para>As usual, run your image using QEMU:
938 <literallayout class='monospaced'>
939 $ runqemu qemux86-64 core-image-sato
940 </literallayout></para></listitem>
941 </itemizedlist>
942 </para>
943 </section>
944</section>
945
946<section id="wayland">
947 <title>Wayland</title>
948
949 <para>
950 <ulink url='http://en.wikipedia.org/wiki/Wayland_(display_server_protocol)'>Wayland</ulink>
951 is a computer display server protocol that
952 provides a method for compositing window managers to communicate
953 directly with applications and video hardware and expects them to
954 communicate with input hardware using other libraries.
955 Using Wayland with supporting targets can result in better control
956 over graphics frame rendering than an application might otherwise
957 achieve.
958 </para>
959
960 <para>
961 The Yocto Project provides the Wayland protocol libraries and the
962 reference
963 <ulink url='http://en.wikipedia.org/wiki/Wayland_(display_server_protocol)#Weston'>Weston</ulink>
964 compositor as part of its release.
965 This section describes what you need to do to implement Wayland and
966 use the compositor when building an image for a supporting target.
967 </para>
968
969 <section id="wayland-support">
970 <title>Support</title>
971
972 <para>
973 The Wayland protocol libraries and the reference Weston compositor
974 ship as integrated packages in the <filename>meta</filename> layer
975 of the
976 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
977 Specifically, you can find the recipes that build both Wayland
978 and Weston at <filename>meta/recipes-graphics/wayland</filename>.
979 </para>
980
981 <para>
982 You can build both the Wayland and Weston packages for use only
983 with targets that accept the
984 <ulink url='http://dri.freedesktop.org/wiki/'>Mesa 3D and Direct Rendering Infrastructure</ulink>,
985 which is also known as Mesa DRI.
986 This implies that you cannot build and use the packages if your
987 target uses, for example, the
988 <trademark class='registered'>Intel</trademark> Embedded Media and
989 Graphics Driver (<trademark class='registered'>Intel</trademark>
990 EMGD) that overrides Mesa DRI.
991 </para>
992
993 <note>
994 Due to lack of EGL support, Weston 1.0.3 will not run directly on
995 the emulated QEMU hardware.
996 However, this version of Weston will run under X emulation without
997 issues.
998 </note>
999 </section>
1000
1001 <section id="enabling-wayland-in-an-image">
1002 <title>Enabling Wayland in an Image</title>
1003
1004 <para>
1005 To enable Wayland, you need to enable it to be built and enable
1006 it to be included in the image.
1007 </para>
1008
1009 <section id="enable-building">
1010 <title>Building</title>
1011
1012 <para>
1013 To cause Mesa to build the <filename>wayland-egl</filename>
1014 platform and Weston to build Wayland with Kernel Mode
1015 Setting
1016 (<ulink url='https://wiki.archlinux.org/index.php/Kernel_Mode_Setting'>KMS</ulink>)
1017 support, include the "wayland" flag in the
1018 <link linkend="var-DISTRO_FEATURES"><filename>DISTRO_FEATURES</filename></link>
1019 statement in your <filename>local.conf</filename> file:
1020 <literallayout class='monospaced'>
1021 DISTRO_FEATURES_append = " wayland"
1022 </literallayout>
1023 </para>
1024
1025 <note>
1026 If X11 has been enabled elsewhere, Weston will build Wayland
1027 with X11 support
1028 </note>
1029 </section>
1030
1031 <section id="enable-installation-in-an-image">
1032 <title>Installing</title>
1033
1034 <para>
1035 To install the Wayland feature into an image, you must
1036 include the following
1037 <link linkend='var-CORE_IMAGE_EXTRA_INSTALL'><filename>CORE_IMAGE_EXTRA_INSTALL</filename></link>
1038 statement in your <filename>local.conf</filename> file:
1039 <literallayout class='monospaced'>
1040 CORE_IMAGE_EXTRA_INSTALL += "wayland weston"
1041 </literallayout>
1042 </para>
1043 </section>
1044 </section>
1045
1046 <section id="running-weston">
1047 <title>Running Weston</title>
1048
1049 <para>
1050 To run Weston inside X11, enabling it as described earlier and
1051 building a Sato image is sufficient.
1052 If you are running your image under Sato, a Weston Launcher appears
1053 in the "Utility" category.
1054 </para>
1055
1056 <para>
1057 Alternatively, you can run Weston through the command-line
1058 interpretor (CLI), which is better suited for development work.
1059 To run Weston under the CLI, you need to do the following after
1060 your image is built:
1061 <orderedlist>
1062 <listitem><para>Run these commands to export
1063 <filename>XDG_RUNTIME_DIR</filename>:
1064 <literallayout class='monospaced'>
1065 mkdir -p /tmp/$USER-weston
1066 chmod 0700 /tmp/$USER-weston
1067 export XDG_RUNTIME_DIR=/tmp/$USER-weston
1068 </literallayout></para></listitem>
1069 <listitem><para>Launch Weston in the shell:
1070 <literallayout class='monospaced'>
1071 weston
1072 </literallayout></para></listitem>
1073 </orderedlist>
1074 </para>
1075 </section>
1076</section>
1077
1078<section id="licenses">
1079 <title>Licenses</title>
1080
1081 <para>
1082 This section describes the mechanism by which the OpenEmbedded build system
1083 tracks changes to licensing text.
1084 The section also describes how to enable commercially licensed recipes,
1085 which by default are disabled.
1086 </para>
1087
1088 <para>
1089 For information that can help you maintain compliance with various open
1090 source licensing during the lifecycle of the product, see the
1091 "<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
1092 in the Yocto Project Development Manual.
1093 </para>
1094
1095 <section id="usingpoky-configuring-LIC_FILES_CHKSUM">
1096 <title>Tracking License Changes</title>
1097
1098 <para>
1099 The license of an upstream project might change in the future.
1100 In order to prevent these changes going unnoticed, the
1101 <filename><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link></filename>
1102 variable tracks changes to the license text. The checksums are validated at the end of the
1103 configure step, and if the checksums do not match, the build will fail.
1104 </para>
1105
1106 <section id="usingpoky-specifying-LIC_FILES_CHKSUM">
1107 <title>Specifying the <filename>LIC_FILES_CHKSUM</filename> Variable</title>
1108
1109 <para>
1110 The <filename>LIC_FILES_CHKSUM</filename>
1111 variable contains checksums of the license text in the source code for the recipe.
1112 Following is an example of how to specify <filename>LIC_FILES_CHKSUM</filename>:
1113 <literallayout class='monospaced'>
1114 LIC_FILES_CHKSUM = "file://COPYING;md5=xxxx \
1115 file://licfile1.txt;beginline=5;endline=29;md5=yyyy \
1116 file://licfile2.txt;endline=50;md5=zzzz \
1117 ..."
1118 </literallayout>
1119 </para>
1120
1121 <para>
1122 The build system uses the
1123 <filename><link linkend='var-S'>S</link></filename> variable as
1124 the default directory when searching files listed in
1125 <filename>LIC_FILES_CHKSUM</filename>.
1126 The previous example employs the default directory.
1127 </para>
1128
1129 <para>
1130 Consider this next example:
1131 <literallayout class='monospaced'>
1132 LIC_FILES_CHKSUM = "file://src/ls.c;beginline=5;endline=16;\
1133 md5=bb14ed3c4cda583abc85401304b5cd4e"
1134 LIC_FILES_CHKSUM = "file://${WORKDIR}/license.html;md5=5c94767cedb5d6987c902ac850ded2c6"
1135 </literallayout>
1136 </para>
1137
1138 <para>
1139 The first line locates a file in
1140 <filename>${S}/src/ls.c</filename>.
1141 The second line refers to a file in
1142 <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>.
1143 </para>
1144 <para>
1145 Note that <filename>LIC_FILES_CHKSUM</filename> variable is
1146 mandatory for all recipes, unless the
1147 <filename>LICENSE</filename> variable is set to "CLOSED".
1148 </para>
1149 </section>
1150
1151 <section id="usingpoky-LIC_FILES_CHKSUM-explanation-of-syntax">
1152 <title>Explanation of Syntax</title>
1153 <para>
1154 As mentioned in the previous section, the
1155 <filename>LIC_FILES_CHKSUM</filename> variable lists all the
1156 important files that contain the license text for the source code.
1157 It is possible to specify a checksum for an entire file, or a specific section of a
1158 file (specified by beginning and ending line numbers with the "beginline" and "endline"
1159 parameters, respectively).
1160 The latter is useful for source files with a license notice header,
1161 README documents, and so forth.
1162 If you do not use the "beginline" parameter, then it is assumed that the text begins on the
1163 first line of the file.
1164 Similarly, if you do not use the "endline" parameter, it is assumed that the license text
1165 ends with the last line of the file.
1166 </para>
1167
1168 <para>
1169 The "md5" parameter stores the md5 checksum of the license text.
1170 If the license text changes in any way as compared to this parameter
1171 then a mismatch occurs.
1172 This mismatch triggers a build failure and notifies the developer.
1173 Notification allows the developer to review and address the license text changes.
1174 Also note that if a mismatch occurs during the build, the correct md5
1175 checksum is placed in the build log and can be easily copied to the recipe.
1176 </para>
1177
1178 <para>
1179 There is no limit to how many files you can specify using the
1180 <filename>LIC_FILES_CHKSUM</filename> variable.
1181 Generally, however, every project requires a few specifications for license tracking.
1182 Many projects have a "COPYING" file that stores the license information for all the source
1183 code files.
1184 This practice allows you to just track the "COPYING" file as long as it is kept up to date.
1185 </para>
1186
1187 <tip>
1188 If you specify an empty or invalid "md5" parameter, BitBake returns an md5 mis-match
1189 error and displays the correct "md5" parameter value during the build.
1190 The correct parameter is also captured in the build log.
1191 </tip>
1192
1193 <tip>
1194 If the whole file contains only license text, you do not need to use the "beginline" and
1195 "endline" parameters.
1196 </tip>
1197 </section>
1198 </section>
1199
1200 <section id="enabling-commercially-licensed-recipes">
1201 <title>Enabling Commercially Licensed Recipes</title>
1202
1203 <para>
1204 By default, the OpenEmbedded build system disables
1205 components that have commercial or other special licensing
1206 requirements.
1207 Such requirements are defined on a
1208 recipe-by-recipe basis through the
1209 <link linkend='var-LICENSE_FLAGS'><filename>LICENSE_FLAGS</filename></link>
1210 variable definition in the affected recipe.
1211 For instance, the
1212 <filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
1213 recipe contains the following statement:
1214 <literallayout class='monospaced'>
1215 LICENSE_FLAGS = "commercial"
1216 </literallayout>
1217 Here is a slightly more complicated example that contains both an
1218 explicit recipe name and version (after variable expansion):
1219 <literallayout class='monospaced'>
1220 LICENSE_FLAGS = "license_${PN}_${PV}"
1221 </literallayout>
1222 In order for a component restricted by a <filename>LICENSE_FLAGS</filename>
1223 definition to be enabled and included in an image, it
1224 needs to have a matching entry in the global
1225 <link linkend='var-LICENSE_FLAGS_WHITELIST'><filename>LICENSE_FLAGS_WHITELIST</filename></link>
1226 variable, which is a variable
1227 typically defined in your <filename>local.conf</filename> file.
1228 For example, to enable
1229 the <filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
1230 package, you could add either the string
1231 "commercial_gst-plugins-ugly" or the more general string
1232 "commercial" to <filename>LICENSE_FLAGS_WHITELIST</filename>.
1233 See the
1234 "<link linkend='license-flag-matching'>License Flag Matching</link>" section
1235 for a full explanation of how <filename>LICENSE_FLAGS</filename> matching works.
1236 Here is the example:
1237 <literallayout class='monospaced'>
1238 LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly"
1239 </literallayout>
1240 Likewise, to additionally enable the package built from the recipe containing
1241 <filename>LICENSE_FLAGS = "license_${PN}_${PV}"</filename>, and assuming
1242 that the actual recipe name was <filename>emgd_1.10.bb</filename>,
1243 the following string would enable that package as well as
1244 the original <filename>gst-plugins-ugly</filename> package:
1245 <literallayout class='monospaced'>
1246 LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly license_emgd_1.10"
1247 </literallayout>
1248 As a convenience, you do not need to specify the complete license string
1249 in the whitelist for every package.
1250 You can use an abbreviated form, which consists
1251 of just the first portion or portions of the license string before
1252 the initial underscore character or characters.
1253 A partial string will match
1254 any license that contains the given string as the first
1255 portion of its license.
1256 For example, the following
1257 whitelist string will also match both of the packages
1258 previously mentioned as well as any other packages that have
1259 licenses starting with "commercial" or "license".
1260 <literallayout class='monospaced'>
1261 LICENSE_FLAGS_WHITELIST = "commercial license"
1262 </literallayout>
1263 </para>
1264
1265 <section id="license-flag-matching">
1266 <title>License Flag Matching</title>
1267
1268 <para>
1269 License flag matching allows you to control what recipes the
1270 OpenEmbedded build system includes in the build.
1271 Fundamentally, the build system attempts to match
1272 <link linkend='var-LICENSE_FLAGS'><filename>LICENSE_FLAGS</filename></link>
1273 strings found in recipes against
1274 <link linkend='var-LICENSE_FLAGS_WHITELIST'><filename>LICENSE_FLAGS_WHITELIST</filename></link>
1275 strings found in the whitelist.
1276 A match causes the build system to include a recipe in the
1277 build, while failure to find a match causes the build system to
1278 exclude a recipe.
1279 </para>
1280
1281 <para>
1282 In general, license flag matching is simple.
1283 However, understanding some concepts will help you
1284 correctly and effectively use matching.
1285 </para>
1286
1287 <para>
1288 Before a flag
1289 defined by a particular recipe is tested against the
1290 contents of the whitelist, the expanded string
1291 <filename>_${PN}</filename> is appended to the flag.
1292 This expansion makes each <filename>LICENSE_FLAGS</filename>
1293 value recipe-specific.
1294 After expansion, the string is then matched against the
1295 whitelist.
1296 Thus, specifying
1297 <filename>LICENSE_FLAGS = "commercial"</filename>
1298 in recipe "foo", for example, results in the string
1299 <filename>"commercial_foo"</filename>.
1300 And, to create a match, that string must appear in the
1301 whitelist.
1302 </para>
1303
1304 <para>
1305 Judicious use of the <filename>LICENSE_FLAGS</filename>
1306 strings and the contents of the
1307 <filename>LICENSE_FLAGS_WHITELIST</filename> variable
1308 allows you a lot of flexibility for including or excluding
1309 recipes based on licensing.
1310 For example, you can broaden the matching capabilities by
1311 using license flags string subsets in the whitelist.
1312 <note>When using a string subset, be sure to use the part of
1313 the expanded string that precedes the appended underscore
1314 character (e.g. <filename>usethispart_1.3</filename>,
1315 <filename>usethispart_1.4</filename>, and so forth).
1316 </note>
1317 For example, simply specifying the string "commercial" in
1318 the whitelist matches any expanded
1319 <filename>LICENSE_FLAGS</filename> definition that starts with
1320 the string "commercial" such as "commercial_foo" and
1321 "commercial_bar", which are the strings the build system
1322 automatically generates for hypothetical recipes named
1323 "foo" and "bar" assuming those recipes simply specify the
1324 following:
1325 <literallayout class='monospaced'>
1326 LICENSE_FLAGS = "commercial"
1327 </literallayout>
1328 Thus, you can choose to exhaustively
1329 enumerate each license flag in the whitelist and
1330 allow only specific recipes into the image, or
1331 you can use a string subset that causes a broader range of
1332 matches to allow a range of recipes into the image.
1333 </para>
1334
1335 <para>
1336 This scheme works even if the
1337 <filename>LICENSE_FLAGS</filename> string already
1338 has <filename>_${PN}</filename> appended.
1339 For example, the build system turns the license flag
1340 "commercial_1.2_foo" into "commercial_1.2_foo_foo" and would
1341 match both the general "commercial" and the specific
1342 "commercial_1.2_foo" strings found in the whitelist, as
1343 expected.
1344 </para>
1345
1346 <para>
1347 Here are some other scenarios:
1348 <itemizedlist>
1349 <listitem><para>You can specify a versioned string in the
1350 recipe such as "commercial_foo_1.2" in a "foo" recipe.
1351 The build system expands this string to
1352 "commercial_foo_1.2_foo".
1353 Combine this license flag with a whitelist that has
1354 the string "commercial" and you match the flag along
1355 with any other flag that starts with the string
1356 "commercial".</para></listitem>
1357 <listitem><para>Under the same circumstances, you can
1358 use "commercial_foo" in the whitelist and the
1359 build system not only matches "commercial_foo_1.2" but
1360 also matches any license flag with the string
1361 "commercial_foo", regardless of the version.
1362 </para></listitem>
1363 <listitem><para>You can be very specific and use both the
1364 package and version parts in the whitelist (e.g.
1365 "commercial_foo_1.2") to specifically match a
1366 versioned recipe.</para></listitem>
1367 </itemizedlist>
1368 </para>
1369 </section>
1370
1371 <section id="other-variables-related-to-commercial-licenses">
1372 <title>Other Variables Related to Commercial Licenses</title>
1373
1374 <para>
1375 Other helpful variables related to commercial
1376 license handling exist and are defined in the
1377 <filename>poky/meta/conf/distro/include/default-distrovars.inc</filename> file:
1378 <literallayout class='monospaced'>
1379 COMMERCIAL_AUDIO_PLUGINS ?= ""
1380 COMMERCIAL_VIDEO_PLUGINS ?= ""
1381 COMMERCIAL_QT = ""
1382 </literallayout>
1383 If you want to enable these components, you can do so by making sure you have
1384 statements similar to the following
1385 in your <filename>local.conf</filename> configuration file:
1386 <literallayout class='monospaced'>
1387 COMMERCIAL_AUDIO_PLUGINS = "gst-plugins-ugly-mad \
1388 gst-plugins-ugly-mpegaudioparse"
1389 COMMERCIAL_VIDEO_PLUGINS = "gst-plugins-ugly-mpeg2dec \
1390 gst-plugins-ugly-mpegstream gst-plugins-bad-mpegvideoparse"
1391 COMMERCIAL_QT ?= "qmmp"
1392 LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly commercial_gst-plugins-bad commercial_qmmp"
1393 </literallayout>
1394 Of course, you could also create a matching whitelist
1395 for those components using the more general "commercial"
1396 in the whitelist, but that would also enable all the
1397 other packages with
1398 <link linkend='var-LICENSE_FLAGS'><filename>LICENSE_FLAGS</filename></link>
1399 containing "commercial", which you may or may not want:
1400 <literallayout class='monospaced'>
1401 LICENSE_FLAGS_WHITELIST = "commercial"
1402 </literallayout>
1403 </para>
1404
1405 <para>
1406 Specifying audio and video plug-ins as part of the
1407 <filename>COMMERCIAL_AUDIO_PLUGINS</filename> and
1408 <filename>COMMERCIAL_VIDEO_PLUGINS</filename> statements
1409 or commercial Qt components as part of
1410 the <filename>COMMERCIAL_QT</filename> statement (along
1411 with the enabling <filename>LICENSE_FLAGS_WHITELIST</filename>) includes the
1412 plug-ins or components into built images, thus adding
1413 support for media formats or components.
1414 </para>
1415 </section>
1416 </section>
1417</section>
1418</chapter>
1419<!--
1420vim: expandtab tw=80 ts=4
1421-->
diff --git a/documentation/ref-manual/usingpoky.xml b/documentation/ref-manual/usingpoky.xml
new file mode 100644
index 0000000000..2116852163
--- /dev/null
+++ b/documentation/ref-manual/usingpoky.xml
@@ -0,0 +1,915 @@
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; [<replaceable>build_dir</replaceable>]
39 </literallayout>
40 </para>
41
42 <para>
43 The <replaceable>build_dir</replaceable> argument is optional and specifies the directory the
44 OpenEmbedded build system uses for the build -
45 the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
46 If you do not specify a Build Directory, it defaults to a directory
47 named <filename>build</filename> in your current working directory.
48 A common practice is to use a different Build Directory for different targets.
49 For example, <filename>~/build/x86</filename> for a <filename>qemux86</filename>
50 target, and <filename>~/build/arm</filename> for a <filename>qemuarm</filename> target.
51 </para>
52
53 <para>
54 Once the build environment is set up, you can build a target using:
55 <literallayout class='monospaced'>
56 $ bitbake <replaceable>target</replaceable>
57 </literallayout>
58 </para>
59
60 <para>
61 The <replaceable>target</replaceable> is the name of the recipe you want to build.
62 Common targets are the images in <filename>meta/recipes-core/images</filename>,
63 <filename>meta/recipes-sato/images</filename>, etc. all found in the
64 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
65 Or, the target can be the name of a recipe for a specific piece of software such as
66 BusyBox.
67 For more details about the images the OpenEmbedded build system supports, see the
68 "<link linkend="ref-images">Images</link>" chapter.
69 </para>
70
71 <note>
72 Building an image without GNU General Public License Version
73 3 (GPLv3), or similarly licensed, components is supported for
74 only minimal and base images.
75 See the "<link linkend='ref-images'>Images</link>" chapter for more information.
76 </note>
77 </section>
78
79 <section id='building-an-image-using-gpl-components'>
80 <title>Building an Image Using GPL Components</title>
81
82 <para>
83 When building an image using GPL components, you need to maintain your original
84 settings and not switch back and forth applying different versions of the GNU
85 General Public License.
86 If you rebuild using different versions of GPL, dependency errors might occur
87 due to some components not being rebuilt.
88 </para>
89 </section>
90</section>
91
92<section id='usingpoky-install'>
93 <title>Installing and Using the Result</title>
94
95 <para>
96 Once an image has been built, it often needs to be installed.
97 The images and kernels built by the OpenEmbedded build system are placed in the
98 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink> in
99 <filename class="directory">tmp/deploy/images</filename>.
100 For information on how to run pre-built images such as <filename>qemux86</filename>
101 and <filename>qemuarm</filename>, see the
102 "<ulink url='&YOCTO_DOCS_QS_URL;#using-pre-built'>Using Pre-Built Binaries and QEMU</ulink>"
103 section in the Yocto Project Quick Start.
104 For information about how to install these images, see the documentation for your
105 particular board or machine.
106 </para>
107</section>
108
109<section id='usingpoky-debugging'>
110 <title>Debugging Build Failures</title>
111
112 <para>
113 The exact method for debugging build failures depends on the nature of
114 the problem and on the system's area from which the bug originates.
115 Standard debugging practices such as comparison against the last
116 known working version with examination of the changes and the
117 re-application of steps to identify the one causing the problem are
118 valid for the Yocto Project just as they are for any other system.
119 Even though it is impossible to detail every possible potential failure,
120 this section provides some general tips to aid in debugging.
121 </para>
122
123 <para>
124 A useful feature for debugging is the error reporting tool.
125 Configuring the Yocto Project to use this tool causes the
126 OpenEmbedded build system to produce error reporting commands as
127 part of the console output.
128 You can enter the commands after the build completes
129 to log error information
130 into a common database, that can help you figure out what might be
131 going wrong.
132 For information on how to enable and use this feature, see the
133 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool'>Using the Error Reporting Tool</ulink>"
134 section in the Yocto Project Development Manual.
135 </para>
136
137 <para>
138 For discussions on debugging, see the
139 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
140 and
141 "<ulink url='&YOCTO_DOCS_DEV_URL;#adt-eclipse'>Working within Eclipse</ulink>"
142 sections in the Yocto Project Development Manual.
143 </para>
144
145 <note>
146 The remainder of this section presents many examples of the
147 <filename>bitbake</filename> command.
148 You can learn about BitBake by reading the
149 <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual'>BitBake User Manual</ulink>.
150 </note>
151
152
153 <section id='usingpoky-debugging-taskfailures'>
154 <title>Task Failures</title>
155
156 <para>The log file for shell tasks is available in
157 <filename>${WORKDIR}/temp/log.do_<replaceable>taskname</replaceable>.pid</filename>.
158 For example, the <filename>do_compile</filename> task for the QEMU minimal image for the x86
159 machine (<filename>qemux86</filename>) might be
160 <filename>tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_compile.20830</filename>.
161 To see what
162 <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
163 runs to generate that log, look at the corresponding
164 <filename>run.do_<replaceable>taskname</replaceable>.pid</filename> file located in the same directory.
165 </para>
166
167 <para>
168 Presently, the output from Python tasks is sent directly to the console.
169 </para>
170 </section>
171
172 <section id='usingpoky-debugging-taskrunning'>
173 <title>Running Specific Tasks</title>
174
175 <para>
176 Any given package consists of a set of tasks.
177 The standard BitBake behavior in most cases is:
178 <filename>do_fetch</filename>,
179 <filename>do_unpack</filename>,
180 <filename>do_patch</filename>, <filename>do_configure</filename>,
181 <filename>do_compile</filename>, <filename>do_install</filename>,
182 <filename>do_package</filename>,
183 <filename>do_package_write_*</filename>, and
184 <filename>do_build</filename>.
185 The default task is <filename>do_build</filename> and any tasks
186 on which it depends build first.
187 Some tasks, such as <filename>do_devshell</filename>, are not part
188 of the default build chain.
189 If you wish to run a task that is not part of the default build
190 chain, you can use the <filename>-c</filename> option in BitBake.
191 Here is an example:
192 <literallayout class='monospaced'>
193 $ bitbake matchbox-desktop -c devshell
194 </literallayout>
195 </para>
196
197 <para>
198 If you wish to rerun a task, use the <filename>-f</filename> force
199 option.
200 For example, the following sequence forces recompilation after
201 changing files in the work directory.
202 <literallayout class='monospaced'>
203 $ bitbake matchbox-desktop
204 .
205 .
206 <replaceable>make some changes to the source code in the work directory</replaceable>
207 .
208 .
209 $ bitbake matchbox-desktop -c compile -f
210 $ bitbake matchbox-desktop
211 </literallayout>
212 </para>
213
214 <para>
215 This sequence first builds and then recompiles
216 <filename>matchbox-desktop</filename>.
217 The last command reruns all tasks (basically the packaging tasks)
218 after the compile.
219 BitBake recognizes that the <filename>do_compile</filename>
220 task was rerun and therefore understands that the other tasks
221 also need to be run again.
222 </para>
223
224 <para>
225 You can view a list of tasks in a given package by running the
226 <filename>do_listtasks</filename> task as follows:
227 <literallayout class='monospaced'>
228 $ bitbake matchbox-desktop -c listtasks
229 </literallayout>
230 The results appear as output to the console and are also in the
231 file <filename>${WORKDIR}/temp/log.do_listtasks</filename>.
232 </para>
233 </section>
234
235 <section id='usingpoky-debugging-dependencies'>
236 <title>Dependency Graphs</title>
237
238 <para>
239 Sometimes it can be hard to see why BitBake wants to build
240 other packages before building a given package you have specified.
241 The <filename>bitbake -g <replaceable>targetname</replaceable></filename> command
242 creates the <filename>pn-buildlist</filename>,
243 <filename>pn-depends.dot</filename>,
244 <filename>package-depends.dot</filename>, and
245 <filename>task-depends.dot</filename> files in the current
246 directory.
247 These files show what will be built and the package and task
248 dependencies, which are useful for debugging problems.
249 You can use the
250 <filename>bitbake -g -u depexp <replaceable>targetname</replaceable></filename>
251 command to display the results in a more human-readable form.
252 </para>
253 </section>
254
255 <section id='usingpoky-debugging-bitbake'>
256 <title>General BitBake Problems</title>
257
258 <para>
259 You can see debug output from BitBake by using the <filename>-D</filename> option.
260 The debug output gives more information about what BitBake
261 is doing and the reason behind it.
262 Each <filename>-D</filename> option you use increases the logging level.
263 The most common usage is <filename>-DDD</filename>.
264 </para>
265
266 <para>
267 The output from <filename>bitbake -DDD -v</filename> <replaceable>targetname</replaceable> can reveal why
268 BitBake chose a certain version of a package or why BitBake
269 picked a certain provider.
270 This command could also help you in a situation where you think BitBake did something
271 unexpected.
272 </para>
273 </section>
274
275 <section id='development-host-system-issues'>
276 <title>Development Host System Issues</title>
277
278 <para>
279 Sometimes issues on the host development system can cause your
280 build to fail.
281 Following are known, host-specific problems.
282 Be sure to always consult the
283 <ulink url='&YOCTO_RELEASE_NOTES;'>Release Notes</ulink>
284 for a look at all release-related issues.
285 <itemizedlist>
286 <listitem><para><emphasis><filename>glibc-initial</filename> fails to build</emphasis>:
287 If your development host system has the unpatched
288 <filename>GNU Make 3.82</filename>,
289 the
290 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
291 task fails for <filename>glibc-initial</filename> during
292 the build.</para>
293 <para>Typically, every distribution that ships
294 <filename>GNU Make 3.82</filename> as
295 the default already has the patched version.
296 However, some distributions, such as Debian, have
297 <filename>GNU Make 3.82</filename> as an option, which
298 is unpatched.
299 You will see this error on these types of distributions.
300 Switch to <filename>GNU Make 3.81</filename> or patch
301 your <filename>make</filename> to solve the problem.
302 </para></listitem>
303 </itemizedlist>
304 </para>
305 </section>
306
307 <section id='usingpoky-debugging-buildfile'>
308 <title>Building with No Dependencies</title>
309 <para>
310 To build a specific recipe (<filename>.bb</filename> file),
311 you can use the following command form:
312 <literallayout class='monospaced'>
313 $ bitbake -b <replaceable>somepath</replaceable>/<replaceable>somerecipe</replaceable>.bb
314 </literallayout>
315 This command form does not check for dependencies.
316 Consequently, you should use it
317 only when you know existing dependencies have been met.
318 <note>
319 You can also specify fragments of the filename.
320 In this case, BitBake checks for a unique match.
321 </note>
322 </para>
323 </section>
324
325 <section id='usingpoky-debugging-variables'>
326 <title>Variables</title>
327 <para>
328 You can use the <filename>-e</filename> BitBake option to
329 display the parsing environment for a configuration.
330 The following displays the general parsing environment:
331 <literallayout class='monospaced'>
332 $ bitbake -e
333 </literallayout>
334 This next example shows the parsing environment for a specific
335 recipe:
336 <literallayout class='monospaced'>
337 $ bitbake -e <replaceable>recipename</replaceable>
338 </literallayout>
339 </para>
340 </section>
341
342 <section id='recipe-logging-mechanisms'>
343 <title>Recipe Logging Mechanisms</title>
344 <para>
345 Best practices exist while writing recipes that both log build progress and
346 act on build conditions such as warnings and errors.
347 Both Python and Bash language bindings exist for the logging mechanism:
348 <itemizedlist>
349 <listitem><para><emphasis>Python:</emphasis> For Python functions, BitBake
350 supports several loglevels: <filename>bb.fatal</filename>,
351 <filename>bb.error</filename>, <filename>bb.warn</filename>,
352 <filename>bb.note</filename>, <filename>bb.plain</filename>,
353 and <filename>bb.debug</filename>.</para></listitem>
354 <listitem><para><emphasis>Bash:</emphasis> For Bash functions, the same set
355 of loglevels exist and are accessed with a similar syntax:
356 <filename>bbfatal</filename>, <filename>bberror</filename>,
357 <filename>bbwarn</filename>, <filename>bbnote</filename>,
358 <filename>bbplain</filename>, and <filename>bbdebug</filename>.</para></listitem>
359 </itemizedlist>
360 </para>
361
362 <para>
363 For guidance on how logging is handled in both Python and Bash recipes, see the
364 <filename>logging.bbclass</filename> file in the
365 <filename>meta/classes</filename> folder of the
366 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
367 </para>
368
369 <section id='logging-with-python'>
370 <title>Logging With Python</title>
371 <para>
372 When creating recipes using Python and inserting code that handles build logs,
373 keep in mind the goal is to have informative logs while keeping the console as
374 "silent" as possible.
375 Also, if you want status messages in the log, use the "debug" loglevel.
376 </para>
377
378 <para>
379 Following is an example written in Python.
380 The code handles logging for a function that determines the
381 number of tasks needed to be run.
382 See the
383 "<link linkend='ref-tasks-listtasks'><filename>do_listtasks</filename></link>"
384 section for additional information:
385 <literallayout class='monospaced'>
386 python do_listtasks() {
387 bb.debug(2, "Starting to figure out the task list")
388 if noteworthy_condition:
389 bb.note("There are 47 tasks to run")
390 bb.debug(2, "Got to point xyz")
391 if warning_trigger:
392 bb.warn("Detected warning_trigger, this might be a problem later.")
393 if recoverable_error:
394 bb.error("Hit recoverable_error, you really need to fix this!")
395 if fatal_error:
396 bb.fatal("fatal_error detected, unable to print the task list")
397 bb.plain("The tasks present are abc")
398 bb.debug(2, "Finished figuring out the tasklist")
399 }
400 </literallayout>
401 </para>
402 </section>
403
404 <section id='logging-with-bash'>
405 <title>Logging With Bash</title>
406 <para>
407 When creating recipes using Bash and inserting code that handles build
408 logs, you have the same goals - informative with minimal console output.
409 The syntax you use for recipes written in Bash is similar to that of
410 recipes written in Python described in the previous section.
411 </para>
412
413 <para>
414 Following is an example written in Bash.
415 The code logs the progress of the <filename>do_my_function</filename> function.
416 <literallayout class='monospaced'>
417 do_my_function() {
418 bbdebug 2 "Running do_my_function"
419 if [ exceptional_condition ]; then
420 bbnote "Hit exceptional_condition"
421 fi
422 bbdebug 2 "Got to point xyz"
423 if [ warning_trigger ]; then
424 bbwarn "Detected warning_trigger, this might cause a problem later."
425 fi
426 if [ recoverable_error ]; then
427 bberror "Hit recoverable_error, correcting"
428 fi
429 if [ fatal_error ]; then
430 bbfatal "fatal_error detected"
431 fi
432 bbdebug 2 "Completed do_my_function"
433 }
434 </literallayout>
435 </para>
436 </section>
437 </section>
438
439 <section id='usingpoky-debugging-others'>
440 <title>Other Tips</title>
441
442 <para>
443 Here are some other tips that you might find useful:
444 <itemizedlist>
445 <listitem><para>When adding new packages, it is worth watching for
446 undesirable items making their way into compiler command lines.
447 For example, you do not want references to local system files like
448 <filename>/usr/lib/</filename> or <filename>/usr/include/</filename>.
449 </para></listitem>
450 <listitem><para>If you want to remove the <filename>psplash</filename>
451 boot splashscreen,
452 add <filename>psplash=false</filename> to the kernel command line.
453 Doing so prevents <filename>psplash</filename> from loading
454 and thus allows you to see the console.
455 It is also possible to switch out of the splashscreen by
456 switching the virtual console (e.g. Fn+Left or Fn+Right on a Zaurus).
457 </para></listitem>
458 </itemizedlist>
459 </para>
460 </section>
461</section>
462
463<section id='maintaining-build-output-quality'>
464 <title>Maintaining Build Output Quality</title>
465
466 <para>
467 Many factors can influence the quality of a build.
468 For example, if you upgrade a recipe to use a new version of an upstream software
469 package or you experiment with some new configuration options, subtle changes
470 can occur that you might not detect until later.
471 Consider the case where your recipe is using a newer version of an upstream package.
472 In this case, a new version of a piece of software might introduce an optional
473 dependency on another library, which is auto-detected.
474 If that library has already been built when the software is building,
475 the software will link to the built library and that library will be pulled
476 into your image along with the new software even if you did not want the
477 library.
478 </para>
479
480 <para>
481 The
482 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
483 class exists to help you maintain
484 the quality of your build output.
485 You can use the class to highlight unexpected and possibly unwanted
486 changes in the build output.
487 When you enable build history, it records information about the contents of
488 each package and image and then commits that information to a local Git
489 repository where you can examine the information.
490 </para>
491
492 <para>
493 The remainder of this section describes the following:
494 <itemizedlist>
495 <listitem><para>How you can enable and disable
496 build history</para></listitem>
497 <listitem><para>How to understand what the build history contains
498 </para></listitem>
499 <listitem><para>How to limit the information used for build history
500 </para></listitem>
501 <listitem><para>How to examine the build history from both a
502 command-line and web interface</para></listitem>
503 </itemizedlist>
504 </para>
505
506 <section id='enabling-and-disabling-build-history'>
507 <title>Enabling and Disabling Build History</title>
508
509 <para>
510 Build history is disabled by default.
511 To enable it, add the following <filename>INHERIT</filename>
512 statement and set the
513 <link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></link>
514 variable to "1" at the end of your
515 <filename>conf/local.conf</filename> file found in the
516 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
517 <literallayout class='monospaced'>
518 INHERIT += "buildhistory"
519 BUILDHISTORY_COMMIT = "1"
520 </literallayout>
521 Enabling build history as previously described
522 causes the build process to collect build
523 output information and commit it to a local
524 <ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink> repository.
525 <note>
526 Enabling build history increases your build times slightly,
527 particularly for images, and increases the amount of disk
528 space used during the build.
529 </note>
530 </para>
531
532 <para>
533 You can disable build history by removing the previous statements
534 from your <filename>conf/local.conf</filename> file.
535 </para>
536 </section>
537
538 <section id='understanding-what-the-build-history-contains'>
539 <title>Understanding What the Build History Contains</title>
540
541 <para>
542 Build history information is kept in
543 <filename>${</filename><link linkend='var-TOPDIR'><filename>TOPDIR</filename></link><filename>}/buildhistory</filename>
544 in the Build Directory as defined by the
545 <link linkend='var-BUILDHISTORY_DIR'><filename>BUILDHISTORY_DIR</filename></link>
546 variable.
547 The following is an example abbreviated listing:
548 <imagedata fileref="figures/buildhistory.png" align="center" width="6in" depth="4in" />
549 </para>
550
551 <para>
552 At the top level, there is a <filename>metadata-revs</filename> file
553 that lists the revisions of the repositories for the layers enabled
554 when the build was produced.
555 The rest of the data splits into separate
556 <filename>packages</filename>, <filename>images</filename> and
557 <filename>sdk</filename> directories, the contents of which are
558 described below.
559 </para>
560
561 <section id='build-history-package-information'>
562 <title>Build History Package Information</title>
563
564 <para>
565 The history for each package contains a text file that has
566 name-value pairs with information about the package.
567 For example, <filename>buildhistory/packages/i586-poky-linux/busybox/busybox/latest</filename>
568 contains the following:
569 <literallayout class='monospaced'>
570 PV = 1.22.1
571 PR = r32
572 RPROVIDES =
573 RDEPENDS = glibc (>= 2.20) update-alternatives-opkg
574 RRECOMMENDS = busybox-syslog busybox-udhcpc update-rc.d
575 PKGSIZE = 540168
576 FILES = /usr/bin/* /usr/sbin/* /usr/lib/busybox/* /usr/lib/lib*.so.* \
577 /etc /com /var /bin/* /sbin/* /lib/*.so.* /lib/udev/rules.d \
578 /usr/lib/udev/rules.d /usr/share/busybox /usr/lib/busybox/* \
579 /usr/share/pixmaps /usr/share/applications /usr/share/idl \
580 /usr/share/omf /usr/share/sounds /usr/lib/bonobo/servers
581 FILELIST = /bin/busybox /bin/busybox.nosuid /bin/busybox.suid /bin/sh \
582 /etc/busybox.links.nosuid /etc/busybox.links.suid
583 </literallayout>
584 Most of these name-value pairs correspond to variables used
585 to produce the package.
586 The exceptions are <filename>FILELIST</filename>, which is the
587 actual list of files in the package, and
588 <filename>PKGSIZE</filename>, which is the total size of files
589 in the package in bytes.
590 </para>
591
592 <para>
593 There is also a file corresponding to the recipe from which the
594 package came (e.g.
595 <filename>buildhistory/packages/i586-poky-linux/busybox/latest</filename>):
596 <literallayout class='monospaced'>
597 PV = 1.22.1
598 PR = r32
599 DEPENDS = initscripts kern-tools-native update-rc.d-native \
600 virtual/i586-poky-linux-compilerlibs virtual/i586-poky-linux-gcc \
601 virtual/libc virtual/update-alternatives
602 PACKAGES = busybox-ptest busybox-httpd busybox-udhcpd busybox-udhcpc \
603 busybox-syslog busybox-mdev busybox-hwclock busybox-dbg \
604 busybox-staticdev busybox-dev busybox-doc busybox-locale busybox
605 </literallayout>
606 </para>
607
608 <para>
609 Finally, for those recipes fetched from a version control
610 system (e.g., Git), a file exists that lists source revisions
611 that are specified in the recipe and lists the actual revisions
612 used during the build.
613 Listed and actual revisions might differ when
614 <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
615 is set to
616 <filename>${<link linkend='var-AUTOREV'>AUTOREV</link>}</filename>.
617 Here is an example assuming
618 <filename>buildhistory/packages/qemux86-poky-linux/linux-yocto/latest_srcrev</filename>):
619 <literallayout class='monospaced'>
620 # SRCREV_machine = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1"
621 SRCREV_machine = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1"
622 # SRCREV_meta = "a227f20eff056e511d504b2e490f3774ab260d6f"
623 SRCREV_meta = "a227f20eff056e511d504b2e490f3774ab260d6f"
624 </literallayout>
625 You can use the <filename>buildhistory-collect-srcrevs</filename>
626 command with the <filename>-a</filename> option to
627 collect the stored <filename>SRCREV</filename> values
628 from build history and report them in a format suitable for
629 use in global configuration (e.g.,
630 <filename>local.conf</filename> or a distro include file) to
631 override floating <filename>AUTOREV</filename> values to a
632 fixed set of revisions.
633 Here is some example output from this command:
634 <literallayout class='monospaced'>
635 $ buildhistory-collect-srcrevs -a
636 # i586-poky-linux
637 SRCREV_pn-glibc = "b8079dd0d360648e4e8de48656c5c38972621072"
638 SRCREV_pn-glibc-initial = "b8079dd0d360648e4e8de48656c5c38972621072"
639 SRCREV_pn-opkg-utils = "53274f087565fd45d8452c5367997ba6a682a37a"
640 SRCREV_pn-kmod = "fd56638aed3fe147015bfa10ed4a5f7491303cb4"
641 # x86_64-linux
642 SRCREV_pn-gtk-doc-stub-native = "1dea266593edb766d6d898c79451ef193eb17cfa"
643 SRCREV_pn-dtc-native = "65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf"
644 SRCREV_pn-update-rc.d-native = "eca680ddf28d024954895f59a241a622dd575c11"
645 SRCREV_glibc_pn-cross-localedef-native = "b8079dd0d360648e4e8de48656c5c38972621072"
646 SRCREV_localedef_pn-cross-localedef-native = "c833367348d39dad7ba018990bfdaffaec8e9ed3"
647 SRCREV_pn-prelink-native = "faa069deec99bf61418d0bab831c83d7c1b797ca"
648 SRCREV_pn-opkg-utils-native = "53274f087565fd45d8452c5367997ba6a682a37a"
649 SRCREV_pn-kern-tools-native = "23345b8846fe4bd167efdf1bd8a1224b2ba9a5ff"
650 SRCREV_pn-kmod-native = "fd56638aed3fe147015bfa10ed4a5f7491303cb4"
651 # qemux86-poky-linux
652 SRCREV_machine_pn-linux-yocto = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1"
653 SRCREV_meta_pn-linux-yocto = "a227f20eff056e511d504b2e490f3774ab260d6f"
654 # all-poky-linux
655 SRCREV_pn-update-rc.d = "eca680ddf28d024954895f59a241a622dd575c11"
656 </literallayout>
657 <note>
658 Here are some notes on using the
659 <filename>buildhistory-collect-srcrevs</filename> command:
660 <itemizedlist>
661 <listitem><para>By default, only values where the
662 <filename>SRCREV</filename> was
663 not hardcoded (usually when <filename>AUTOREV</filename>
664 was used) are reported.
665 Use the <filename>-a</filename> option to see all
666 <filename>SRCREV</filename> values.
667 </para></listitem>
668 <listitem><para>The output statements might not have any effect
669 if overrides are applied elsewhere in the build system
670 configuration.
671 Use the <filename>-f</filename> option to add the
672 <filename>forcevariable</filename> override to each output line
673 if you need to work around this restriction.
674 </para></listitem>
675 <listitem><para>The script does apply special handling when
676 building for multiple machines.
677 However, the script does place a
678 comment before each set of values that specifies
679 which triplet to which they belong as shown above
680 (e.g., <filename>i586-poky-linux</filename>).
681 </para></listitem>
682 </itemizedlist>
683 </note>
684 </para>
685 </section>
686
687 <section id='build-history-image-information'>
688 <title>Build History Image Information</title>
689
690 <para>
691 The files produced for each image are as follows:
692 <itemizedlist>
693 <listitem><para><filename>image-files:</filename>
694 A directory containing selected files from the root
695 filesystem.
696 The files are defined by
697 <link linkend='var-BUILDHISTORY_IMAGE_FILES'><filename>BUILDHISTORY_IMAGE_FILES</filename></link>.
698 </para></listitem>
699 <listitem><para><filename>build-id.txt:</filename>
700 Human-readable information about the build configuration
701 and metadata source revisions.
702 This file contains the full build header as printed
703 by BitBake.</para></listitem>
704 <listitem><para><filename>*.dot:</filename>
705 Dependency graphs for the image that are
706 compatible with <filename>graphviz</filename>.
707 </para></listitem>
708 <listitem><para><filename>files-in-image.txt:</filename>
709 A list of files in the image with permissions,
710 owner, group, size, and symlink information.
711 </para></listitem>
712 <listitem><para><filename>image-info.txt:</filename>
713 A text file containing name-value pairs with information
714 about the image.
715 See the following listing example for more information.
716 </para></listitem>
717 <listitem><para><filename>installed-package-names.txt:</filename>
718 A list of installed packages by name only.</para></listitem>
719 <listitem><para><filename>installed-package-sizes.txt:</filename>
720 A list of installed packages ordered by size.
721 </para></listitem>
722 <listitem><para><filename>installed-packages.txt:</filename>
723 A list of installed packages with full package
724 filenames.</para></listitem>
725 </itemizedlist>
726 <note>
727 Installed package information is able to be gathered and
728 produced even if package management is disabled for the final
729 image.
730 </note>
731 </para>
732
733 <para>
734 Here is an example of <filename>image-info.txt</filename>:
735 <literallayout class='monospaced'>
736 DISTRO = poky
737 DISTRO_VERSION = 1.7
738 USER_CLASSES = buildstats image-mklibs image-prelink
739 IMAGE_CLASSES = image_types
740 IMAGE_FEATURES = debug-tweaks
741 IMAGE_LINGUAS =
742 IMAGE_INSTALL = packagegroup-core-boot run-postinsts
743 BAD_RECOMMENDATIONS =
744 NO_RECOMMENDATIONS =
745 PACKAGE_EXCLUDE =
746 ROOTFS_POSTPROCESS_COMMAND = write_package_manifest; license_create_manifest; \
747 write_image_manifest ; buildhistory_list_installed_image ; \
748 buildhistory_get_image_installed ; ssh_allow_empty_password; \
749 postinst_enable_logging; rootfs_update_timestamp ; ssh_disable_dns_lookup ;
750 IMAGE_POSTPROCESS_COMMAND = buildhistory_get_imageinfo ;
751 IMAGESIZE = 6900
752 </literallayout>
753 Other than <filename>IMAGESIZE</filename>, which is the
754 total size of the files in the image in Kbytes, the
755 name-value pairs are variables that may have influenced the
756 content of the image.
757 This information is often useful when you are trying to determine
758 why a change in the package or file listings has occurred.
759 </para>
760 </section>
761
762 <section id='using-build-history-to-gather-image-information-only'>
763 <title>Using Build History to Gather Image Information Only</title>
764
765 <para>
766 As you can see, build history produces image information,
767 including dependency graphs, so you can see why something
768 was pulled into the image.
769 If you are just interested in this information and not
770 interested in collecting specific package or SDK information,
771 you can enable writing only image information without
772 any history by adding the following to your
773 <filename>conf/local.conf</filename> file found in the
774 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
775 <literallayout class='monospaced'>
776 INHERIT += "buildhistory"
777 BUILDHISTORY_COMMIT = "0"
778 BUILDHISTORY_FEATURES = "image"
779 </literallayout>
780 Here, you set the
781 <link linkend='var-BUILDHISTORY_FEATURES'><filename>BUILDHISTORY_FEATURES</filename></link>
782 variable to use the image feature only.
783 </para>
784 </section>
785
786 <section id='build-history-sdk-information'>
787 <title>Build History SDK Information</title>
788 <para>
789 Build history collects similar information on the contents
790 of SDKs (e.g. <filename>meta-toolchain</filename>
791 or <filename>bitbake -c populate_sdk imagename</filename>)
792 as compared to information it collects for images.
793 The following list shows the files produced for each SDK:
794 <itemizedlist>
795 <listitem><para><filename>files-in-sdk.txt:</filename>
796 A list of files in the SDK with permissions,
797 owner, group, size, and symlink information.
798 This list includes both the host and target parts
799 of the SDK.
800 </para></listitem>
801 <listitem><para><filename>sdk-info.txt:</filename>
802 A text file containing name-value pairs with information
803 about the SDK.
804 See the following listing example for more information.
805 </para></listitem>
806 <listitem><para>The following information appears under
807 each of the <filename>host</filename>
808 and <filename>target</filename> directories
809 for the portions of the SDK that run on the host and
810 on the target, respectively:
811 <itemizedlist>
812 <listitem><para><filename>depends.dot:</filename>
813 Dependency graph for the SDK that is
814 compatible with <filename>graphviz</filename>.
815 </para></listitem>
816 <listitem><para><filename>installed-package-names.txt:</filename>
817 A list of installed packages by name only.
818 </para></listitem>
819 <listitem><para><filename>installed-package-sizes.txt:</filename>
820 A list of installed packages ordered by size.
821 </para></listitem>
822 <listitem><para><filename>installed-packages.txt:</filename>
823 A list of installed packages with full package
824 filenames.</para></listitem>
825 </itemizedlist>
826 </para></listitem>
827 </itemizedlist>
828 </para>
829
830 <para>
831 Here is an example of <filename>sdk-info.txt</filename>:
832 <literallayout class='monospaced'>
833 DISTRO = poky
834 DISTRO_VERSION = 1.3+snapshot-20130327
835 SDK_NAME = poky-glibc-i686-arm
836 SDK_VERSION = 1.3+snapshot
837 SDKMACHINE =
838 SDKIMAGE_FEATURES = dev-pkgs dbg-pkgs
839 BAD_RECOMMENDATIONS =
840 SDKSIZE = 352712
841 </literallayout>
842 Other than <filename>SDKSIZE</filename>, which is the
843 total size of the files in the SDK in Kbytes, the
844 name-value pairs are variables that might have influenced the
845 content of the SDK.
846 This information is often useful when you are trying to
847 determine why a change in the package or file listings
848 has occurred.
849 </para>
850 </section>
851
852 <section id='examining-build-history-information'>
853 <title>Examining Build History Information</title>
854
855 <para>
856 You can examine build history output from the command line or
857 from a web interface.
858 </para>
859
860 <para>
861 To see any changes that have occurred (assuming you have
862 <link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT = "1"</filename></link>),
863 you can simply
864 use any Git command that allows you to view the history of
865 a repository.
866 Here is one method:
867 <literallayout class='monospaced'>
868 $ git log -p
869 </literallayout>
870 You need to realize, however, that this method does show
871 changes that are not significant (e.g. a package's size
872 changing by a few bytes).
873 </para>
874
875 <para>
876 A command-line tool called <filename>buildhistory-diff</filename>
877 does exist, though, that queries the Git repository and prints just
878 the differences that might be significant in human-readable form.
879 Here is an example:
880 <literallayout class='monospaced'>
881 $ ~/poky/poky/scripts/buildhistory-diff . HEAD^
882 Changes to images/qemux86_64/glibc/core-image-minimal (files-in-image.txt):
883 /etc/anotherpkg.conf was added
884 /sbin/anotherpkg was added
885 * (installed-package-names.txt):
886 * anotherpkg was added
887 Changes to images/qemux86_64/glibc/core-image-minimal (installed-package-names.txt):
888 anotherpkg was added
889 packages/qemux86_64-poky-linux/v86d: PACKAGES: added "v86d-extras"
890 * PR changed from "r0" to "r1"
891 * PV changed from "0.1.10" to "0.1.12"
892 packages/qemux86_64-poky-linux/v86d/v86d: PKGSIZE changed from 110579 to 144381 (+30%)
893 * PR changed from "r0" to "r1"
894 * PV changed from "0.1.10" to "0.1.12"
895 </literallayout>
896 </para>
897
898 <para>
899 To see changes to the build history using a web interface, follow
900 the instruction in the <filename>README</filename> file here.
901 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/buildhistory-web/'></ulink>.
902 </para>
903
904 <para>
905 Here is a sample screenshot of the interface:
906 <imagedata fileref="figures/buildhistory-web.png" align="center" scalefit="1" width="130%" contentdepth="130%" />
907 </para>
908 </section>
909 </section>
910</section>
911
912</chapter>
913<!--
914vim: expandtab tw=80 ts=4
915-->