summaryrefslogtreecommitdiffstats
path: root/documentation/poky-ref-manual/ref-structure.xml
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-10-15 11:55:59 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-10-15 11:55:59 +0100
commit22083287912ebd552e33b79f7c567bc966376d43 (patch)
treea16fa012a97a249e25a405d4092b0a89321bfaf6 /documentation/poky-ref-manual/ref-structure.xml
parent13a702e9e572a2dc9f6b52a1531a2237d4d98ff1 (diff)
downloadpoky-22083287912ebd552e33b79f7c567bc966376d43.tar.gz
handbook: Move into documentation directory
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'documentation/poky-ref-manual/ref-structure.xml')
-rw-r--r--documentation/poky-ref-manual/ref-structure.xml514
1 files changed, 514 insertions, 0 deletions
diff --git a/documentation/poky-ref-manual/ref-structure.xml b/documentation/poky-ref-manual/ref-structure.xml
new file mode 100644
index 0000000000..ca589de428
--- /dev/null
+++ b/documentation/poky-ref-manual/ref-structure.xml
@@ -0,0 +1,514 @@
1<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
3
4<appendix id='ref-structure'>
5
6<title>Reference: Directory Structure</title>
7
8<para>
9 Poky consists of several components and understanding what these are
10 and where they're located is one of the keys to use it. This section walks
11 through the Poky directory structure giving information about the various
12 files and directories.
13</para>
14
15<section id='structure-core'>
16 <title>Top level core components</title>
17
18 <section id='structure-core-bitbake'>
19 <title><filename class="directory">bitbake/</filename></title>
20
21 <para>
22 A copy of BitBake is included within Poky for ease of use, and should
23 usually match the current BitBake stable release from the BitBake project.
24 Bitbake, a metadata interpreter, reads the Poky metadata and runs the tasks
25 defined in the Poky metadata. Failures are usually from the metadata, not
26 BitBake itself, so most users don't need to worry about BitBake. The
27 <filename class="directory">bitbake/bin/</filename> directory is placed
28 into the PATH environment variable by the <link
29 linkend="structure-core-script">poky-init-build-env</link> script.
30 </para>
31 <para>
32 For more information on BitBake please see the BitBake project site at
33 <ulink url="http://bitbake.berlios.de/"/>
34 and the BitBake on-line manual at <ulink url="http://bitbake.berlios.de/manual/"/>.
35 </para>
36 </section>
37
38 <section id='structure-core-build'>
39 <title><filename class="directory">build/</filename></title>
40
41 <para>
42 This directory contains user configuration files and the output
43 generated by Poky in its standard configuration where the source tree is
44 combined with the output. It is also possible to place output and configuration
45 files in a directory separate from the Poky source, see the section <link
46 linkend='structure-core-script'>seperate output directory</link>.
47 </para>
48 </section>
49
50 <section id='structure-core-meta'>
51 <title><filename class="directory">meta/</filename></title>
52
53 <para>
54 This directory contains the core metadata, a key part of Poky. Within this
55 directory there are definitions of the machines, the Poky distribution
56 and the packages that make up a given system.
57 </para>
58 </section>
59
60 <section id='structure-core-meta-extras'>
61 <title><filename class="directory">meta-extras/</filename></title>
62
63 <para>
64 This directory is similar to <filename class="directory">meta/</filename>,
65 and contains some extra metadata not included in standard Poky. These are
66 disabled by default, and are not supported as part of Poky.
67 </para>
68 </section>
69
70 <section id='structure-core-meta-***'>
71 <title><filename class="directory">meta-***/</filename></title>
72
73 <para>
74 These directories are optional layers to be added to core metadata, which
75 are enabled by adding them to conf/bblayers.conf.
76 </para>
77 </section>
78
79 <section id='structure-core-scripts'>
80 <title><filename class="directory">scripts/</filename></title>
81
82 <para>
83 This directory contains various integration scripts which implement
84 extra functionality in the Poky environment, such as the QEMU
85 scripts. This directory is appended to the PATH environment variable by the
86 <link linkend="structure-core-script">poky-init-build-env</link> script.
87 </para>
88 </section>
89
90 <section id='structure-core-sources'>
91 <title><filename class="directory">sources/</filename></title>
92
93 <para>
94 While not part of a checkout, Poky will create this directory as
95 part of any build. Any downloads are placed in this directory (as
96 specified by the <glossterm><link linkend='var-DL_DIR'>DL_DIR</link>
97 </glossterm> variable). This directory can be shared between Poky
98 builds to save downloading files multiple times. SCM checkouts are
99 also stored here as e.g. <filename class="directory">sources/svn/
100 </filename>, <filename class="directory">sources/cvs/</filename> or
101 <filename class="directory">sources/git/</filename> and the
102 sources directory may contain archives of checkouts for various
103 revisions or dates.
104 </para>
105
106 <para>
107 It's worth noting that BitBake creates <filename class="extension">.md5
108 </filename> stamp files for downloads. It uses these to mark downloads as
109 complete as well as for checksum and access accounting purposes. If you add
110 a file manually to the directory, you need to touch the corresponding
111 <filename class="extension">.md5</filename> file too.
112 </para>
113
114 <para>
115 This location can be overridden by setting <glossterm><link
116 linkend='var-DL_DIR'>DL_DIR</link></glossterm> in <filename>local.conf
117 </filename>. This directory can be shared between builds and even between
118 machines via NFS, so downloads are only made once, speeding up builds.
119 </para>
120
121 </section>
122
123 <section id='handbook'>
124 <title><filename class="directory">handbook</filename></title>
125
126 <para>
127 This is the location where this handbook is generated
128 </para>
129 </section>
130
131 <section id='structure-core-script'>
132 <title><filename>poky-init-build-env</filename></title>
133
134 <para>
135 This script is used to setup the Poky build environment. Sourcing this file in
136 a shell makes changes to PATH and sets other core BitBake variables based on the
137 current working directory. You need to use this before running Poky commands.
138 Internally it uses scripts within the <filename class="directory">scripts/
139 </filename> directory to do the bulk of the work. This script supports
140 specifying any directory as the build output:
141 </para>
142
143 <programlisting>
144source POKY_SRC/poky-init-build-env [BUILDDIR]
145 </programlisting>
146
147 <para>
148 The above command can be typed from any directory, as long as POKY_SRC points to
149 the desired Poky source tree. The optional BUILDDIR could be any directory you'd
150 like Poky to generate the build output into.
151 </para>
152 </section>
153</section>
154
155<section id='structure-build'>
156 <title><filename class="directory">build/</filename> - The Build Directory</title>
157
158 <section id='structure-build-conf-local.conf'>
159 <title><filename>build/conf/local.conf</filename></title>
160
161 <para>
162 This file contains all the local user configuration of Poky. If there
163 is no <filename>local.conf</filename> present, it is created from
164 <filename>local.conf.sample</filename>. The <filename>local.conf</filename>
165 file contains documentation on the various configuration options. Any
166 variable set here overrides any variable set elsewhere within Poky unless
167 that variable is hardcoded within Poky (e.g. by using '=' instead of '?=').
168 Some variables are hardcoded for various reasons but these variables are
169 relatively rare.
170 </para>
171
172 <para>
173 Edit this file to set the <glossterm><link linkend='var-MACHINE'>MACHINE</link></glossterm> for which you want to build, which package types you
174 wish to use (PACKAGE_CLASSES) or where downloaded files should go
175 (<glossterm><link linkend='var-DL_DIR'>DL_DIR</link></glossterm>).
176 </para>
177 </section>
178
179 <section id='structure-build-conf-bblayers.conf'>
180 <title><filename>build/conf/bblayers.conf</filename></title>
181
182 <para>
183 This file defines layers walked by bitbake. If there's no <filename>
184 bblayers.conf</filename> present, it is created from <filename>bblayers.conf.sample
185 </filename> when the environment setup script is sourced.
186 </para>
187 </section>
188
189 <section id='structure-build-tmp'>
190 <title><filename class="directory">build/tmp/</filename></title>
191
192 <para>
193 This is created by BitBake if it doesn't exist and is where all the Poky output
194 is placed. To clean Poky and start a build from scratch (other than downloads),
195 you can wipe this directory. The <filename class="directory">tmp/
196 </filename> directory has some important sub-components detailed below.
197 </para>
198 </section>
199
200 <section id='structure-build-tmp-cache'>
201 <title><filename class="directory">build/tmp/cache/</filename></title>
202
203 <para>
204 When BitBake parses the metadata it creates a cache file of the result which can
205 be used when subsequently running commands. These are stored here on
206 a per machine basis.
207 </para>
208 </section>
209
210 <section id='structure-build-tmp-deploy'>
211 <title><filename class="directory">build/tmp/deploy/</filename></title>
212
213 <para>Any 'end result' output from Poky is placed under here.</para>
214 </section>
215
216 <section id='structure-build-tmp-deploy-deb'>
217 <title><filename class="directory">build/tmp/deploy/deb/</filename></title>
218
219 <para>
220 Any .deb packages emitted by Poky are placed here, sorted into feeds for
221 different architecture types.
222 </para>
223 </section>
224
225 <section id='structure-build-tmp-deploy-rpm'>
226 <title><filename class="directory">build/tmp/deploy/rpm/</filename></title>
227
228 <para>
229 Any .rpm packages emitted by Poky are placed here, sorted into feeds for
230 different architecture types.
231 </para>
232 </section>
233
234 <section id='structure-build-tmp-deploy-images'>
235 <title><filename class="directory">build/tmp/deploy/images/</filename></title>
236
237 <para>
238 Complete filesystem images are placed here. If you want to flash the resulting
239 image from a build onto a device, look here for them.
240 </para>
241 </section>
242
243 <section id='structure-build-tmp-deploy-ipk'>
244 <title><filename class="directory">build/tmp/deploy/ipk/</filename></title>
245
246 <para>Any resulting .ipk packages emitted by Poky are placed here.</para>
247 </section>
248
249 <section id='structure-build-tmp-sysroots'>
250 <title><filename class="directory">build/tmp/sysroots/</filename></title>
251
252 <para>
253 Any package needing to share output with other packages does so within sysroots.
254 This means it contains any shared header files and any shared libraries amongst
255 other data. It is subdivided by architecture so multiple builds can run within
256 the one build directory.
257 </para>
258 </section>
259
260 <section id='structure-build-tmp-stamps'>
261 <title><filename class="directory">build/tmp/stamps/</filename></title>
262
263 <para>
264 This is used by BitBake for accounting purposes to keep track of which tasks
265 have been run and when. It is also subdivided by architecture. The files are
266 empty and the important information is the filenames and timestamps.
267 </para>
268 </section>
269
270 <section id='structure-build-tmp-log'>
271 <title><filename class="directory">build/tmp/log/</filename></title>
272
273 <para>
274 This contains some general logs if not placing in a package's
275 <glossterm><link linkend='var-WORKDIR'>WORKDIR</link></glossterm>, such as
276 the log output from check_pkg or distro_check tasks.
277 </para>
278 </section>
279
280 <section id='structure-build-tmp-pkgdata'>
281 <title><filename class="directory">build/tmp/pkgdata/</filename></title>
282
283 <para>
284 This is an intermediate place for saving packaging data, which will be used
285 in later packaging process. For detail please refer to <link linkend='ref-classes-package'>
286 package.bbclass</link>.
287 </para>
288 </section>
289
290 <section id='structure-build-tmp-pstagelogs'>
291 <title><filename class="directory">build/tmp/pstagelogs/</filename></title>
292
293 <para>
294 This directory contains manifest for task based prebuilt. Each manifest is basically
295 a file list for installed files from a given task, which would be useful for later
296 packaging or cleanup process.
297 </para>
298 </section>
299
300 <section id='structure-build-tmp-work'>
301 <title><filename class="directory">build/tmp/work/</filename></title>
302
303 <para>
304 This directory contains various subdirectories for each architecture, and each package built by BitBake has its own work directory under the appropriate architecture subdirectory. All tasks are executed from this work directory. As an example, the source for a particular package will be unpacked, patched, configured and compiled all within its own work directory.
305 </para>
306
307 <para>
308 It is worth considering the structure of a typical work directory. An
309 example is the linux-rp kernel, version 2.6.20 r7 on the machine spitz
310 built within Poky. For this package a work directory of <filename
311 class="directory">tmp/work/spitz-poky-linux-gnueabi/linux-rp-2.6.20-r7/
312 </filename>, referred to as <glossterm><link linkend='var-WORKDIR'>WORKDIR
313 </link></glossterm>, is created. Within this directory, the source is
314 unpacked to linux-2.6.20 and then patched by quilt (see <link
315 linkend="usingpoky-modifying-packages-quilt">Section 3.5.1</link>).
316 Within the <filename class="directory">linux-2.6.20</filename> directory,
317 standard Quilt directories <filename class="directory">linux-2.6.20/patches</filename>
318 and <filename class="directory">linux-2.6.20/.pc</filename> are created,
319 and standard quilt commands can be used.
320 </para>
321
322 <para>
323 There are other directories generated within <glossterm><link
324 linkend='var-WORKDIR'>WORKDIR</link></glossterm>. The most important
325 is <glossterm><link linkend='var-WORKDIR'>WORKDIR</link></glossterm><filename class="directory">/temp/</filename> which has log files for each
326 task (<filename>log.do_*.pid</filename>) and the scripts BitBake runs for
327 each task (<filename>run.do_*.pid</filename>). The <glossterm><link
328 linkend='var-WORKDIR'>WORKDIR</link></glossterm><filename
329 class="directory">/image/</filename> directory is where <command>make
330 install</command> places its output which is then split into subpackages
331 within <glossterm><link linkend='var-WORKDIR'>WORKDIR</link></glossterm>
332 <filename class="directory">/packages-split/</filename>.
333 </para>
334 </section>
335</section>
336
337<section id='structure-meta'>
338 <title><filename class="directory">meta/</filename> - The Metadata</title>
339
340 <para>
341 As mentioned previously, this is the core of Poky. It has several
342 important subdivisions:
343 </para>
344
345 <section id='structure-meta-classes'>
346 <title><filename class="directory">meta/classes/</filename></title>
347
348 <para>
349 Contains the <filename class="extension">*.bbclass</filename> files. Class
350 files are used to abstract common code allowing it to be reused by multiple
351 packages. The <filename>base.bbclass</filename> file is inherited by every
352 package. Examples of other important classes are
353 <filename>autotools.bbclass</filename> that in theory allows any
354 Autotool-enabled package to work with Poky with minimal effort, or
355 <filename>kernel.bbclass</filename> that contains common code and functions
356 for working with the linux kernel. Functions like image generation or
357 packaging also have their specific class files (<filename>image.bbclass
358 </filename>, <filename>rootfs_*.bbclass</filename> and
359 <filename>package*.bbclass</filename>).
360 </para>
361 </section>
362
363 <section id='structure-meta-conf'>
364 <title><filename class="directory">meta/conf/</filename></title>
365
366 <para>
367 This is the core set of configuration files which start from
368 <filename>bitbake.conf</filename> and from which all other configuration
369 files are included (see the includes at the end of the file, even
370 <filename>local.conf</filename> is loaded from there!). While
371 <filename>bitbake.conf</filename> sets up the defaults, these can often be
372 overridden by user (<filename>local.conf</filename>), machine or
373 distribution configuration files.
374 </para>
375 </section>
376
377 <section id='structure-meta-conf-machine'>
378 <title><filename class="directory">meta/conf/machine/</filename></title>
379
380 <para>
381 Contains all the machine configuration files. If you set MACHINE="spitz", the
382 end result is Poky looking for a <filename>spitz.conf</filename> file in this directory. The includes
383 directory contains various data common to multiple machines. If you want to add
384 support for a new machine to Poky, this is the directory to look in.
385 </para>
386 </section>
387
388 <section id='structure-meta-conf-distro'>
389 <title><filename class="directory">meta/conf/distro/</filename></title>
390
391 <para>
392 Any distribution specific configuration is controlled from here. OpenEmbedded
393 supports multiple distributions of which Poky is one. Poky only contains the
394 Poky distribution so poky.conf is the main file here. This includes the
395 versions and SRCDATES for applications which are configured here. An example of
396 an alternative configuration is poky-bleeding.conf although this mainly inherits
397 its configuration from Poky itself.
398 </para>
399 </section>
400
401 <section id='structure-meta-recipes-bsp'>
402 <title><filename class="directory">meta/recipes-bsp/</filename></title>
403
404 <para>
405 Anything linking to specific hardware or hardware configuration information
406 are placed here, such as uboot, grub, etc.
407 </para>
408 </section>
409
410 <section id='structure-meta-recipes-connectivity'>
411 <title><filename class="directory">meta/recipes-connectivity/</filename></title>
412
413 <para>
414 Libraries and applications related to communication with other devices
415 </para>
416 </section>
417
418 <section id='structure-meta-recipes-core'>
419 <title><filename class="directory">meta/recipes-core/</filename></title>
420
421 <para>
422 What's needed to build a basic working Linux image including commonly used dependencies
423 </para>
424 </section>
425
426 <section id='structure-meta-recipes-devtools'>
427 <title><filename class="directory">meta/recipes-devtools/</filename></title>
428
429 <para>
430 Tools primarily used by the build system (but can also be used on targets)
431 </para>
432 </section>
433
434 <section id='structure-meta-recipes-extended'>
435 <title><filename class="directory">meta/recipes-extended/</filename></title>
436
437 <para>
438 Applications which whilst not essential add features compared to the alternatives in
439 core. May be needed for full tool functionality or LSB compliance.
440 </para>
441 </section>
442
443 <section id='structure-meta-recipes-gnome'>
444 <title><filename class="directory">meta/recipes-gnome/</filename></title>
445
446 <para>
447 All things related to the GTK+ application framework
448 </para>
449 </section>
450
451 <section id='structure-meta-recipes-graphics'>
452 <title><filename class="directory">meta/recipes-graphics/</filename></title>
453
454 <para>
455 X and other graphically related system libraries
456 </para>
457 </section>
458
459 <section id='structure-meta-recipes-kernel'>
460 <title><filename class="directory">meta/recipes-kernel/</filename></title>
461
462 <para>
463 The kernel and generic applications/libraries with strong kernel dependencies
464 </para>
465 </section>
466
467 <section id='structure-meta-recipes-multimedia'>
468 <title><filename class="directory">meta/recipes-multimedia/</filename></title>
469
470 <para>
471 Codecs and support utilties for audio, images and video
472 </para>
473 </section>
474
475 <section id='structure-meta-recipes-qt'>
476 <title><filename class="directory">meta/recipes-qt/</filename></title>
477
478 <para>
479 All things related to the QT application framework
480 </para>
481 </section>
482
483 <section id='structure-meta-recipes-sato'>
484 <title><filename class="directory">meta/recipes-sato/</filename></title>
485
486 <para>
487 The Sato demo/reference UI/UX, its associated apps and configuration
488 </para>
489 </section>
490
491 <section id='structure-meta-packages'>
492 <title><filename class="directory">meta/packages/</filename></title>
493
494 <para>
495 this is a catch-all place for the rest which not fits into above
496 recipes-***. Images and tasks are also placed here.
497 </para>
498 </section>
499
500 <section id='structure-meta-site'>
501 <title><filename class="directory">meta/site/</filename></title>
502
503 <para>
504 Certain autoconf test results cannot be determined when cross compiling since it
505 can't run tests on a live system. This directory therefore contains a list of
506 cached results for various architectures which is passed to autoconf.
507 </para>
508 </section>
509</section>
510
511</appendix>
512<!--
513vim: expandtab tw=80 ts=4
514-->