summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual/ref-structure.rst
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/ref-manual/ref-structure.rst')
-rw-r--r--documentation/ref-manual/ref-structure.rst871
1 files changed, 871 insertions, 0 deletions
diff --git a/documentation/ref-manual/ref-structure.rst b/documentation/ref-manual/ref-structure.rst
new file mode 100644
index 0000000000..59d8c0d6c4
--- /dev/null
+++ b/documentation/ref-manual/ref-structure.rst
@@ -0,0 +1,871 @@
1**************************
2Source Directory Structure
3**************************
4
5The `Source Directory <#source-directory>`__ consists of numerous files,
6directories and subdirectories; understanding their locations and
7contents is key to using the Yocto Project effectively. This chapter
8describes the Source Directory and gives information about those files
9and directories.
10
11For information on how to establish a local Source Directory on your
12development system, see the "`Locating Yocto Project Source
13Files <&YOCTO_DOCS_DEV_URL;#locating-yocto-project-source-files>`__"
14section in the Yocto Project Development Tasks Manual.
15
16.. note::
17
18 The OpenEmbedded build system does not support file or directory
19 names that contain spaces. Be sure that the Source Directory you use
20 does not contain these types of names.
21
22.. _structure-core:
23
24Top-Level Core Components
25=========================
26
27This section describes the top-level components of the `Source
28Directory <#source-directory>`__.
29
30.. _structure-core-bitbake:
31
32``bitbake/``
33------------
34
35This directory includes a copy of BitBake for ease of use. The copy
36usually matches the current stable BitBake release from the BitBake
37project. BitBake, a `Metadata <#metadata>`__ interpreter, reads the
38Yocto Project Metadata and runs the tasks defined by that data. Failures
39are usually caused by errors in your Metadata and not from BitBake
40itself; consequently, most users do not need to worry about BitBake.
41
42When you run the ``bitbake`` command, the main BitBake executable (which
43resides in the ``bitbake/bin/`` directory) starts. Sourcing the
44environment setup script (i.e. ````` <#structure-core-script>`__) places
45the ``scripts/`` and ``bitbake/bin/`` directories (in that order) into
46the shell's ``PATH`` environment variable.
47
48For more information on BitBake, see the `BitBake User
49Manual <&YOCTO_DOCS_BB_URL;>`__.
50
51.. _structure-core-build:
52
53``build/``
54----------
55
56This directory contains user configuration files and the output
57generated by the OpenEmbedded build system in its standard configuration
58where the source tree is combined with the output. The `Build
59Directory <#build-directory>`__ is created initially when you ``source``
60the OpenEmbedded build environment setup script (i.e.
61````` <#structure-core-script>`__).
62
63It is also possible to place output and configuration files in a
64directory separate from the `Source Directory <#source-directory>`__ by
65providing a directory name when you ``source`` the setup script. For
66information on separating output from your local Source Directory files
67(commonly described as an "out of tree" build), see the
68"````` <#structure-core-script>`__" section.
69
70.. _handbook:
71
72``documentation/``
73------------------
74
75This directory holds the source for the Yocto Project documentation as
76well as templates and tools that allow you to generate PDF and HTML
77versions of the manuals. Each manual is contained in its own sub-folder;
78for example, the files for this reference manual reside in the
79``ref-manual/`` directory.
80
81.. _structure-core-meta:
82
83``meta/``
84---------
85
86This directory contains the minimal, underlying OpenEmbedded-Core
87metadata. The directory holds recipes, common classes, and machine
88configuration for strictly emulated targets (``qemux86``, ``qemuarm``,
89and so forth.)
90
91.. _structure-core-meta-poky:
92
93``meta-poky/``
94--------------
95
96Designed above the ``meta/`` content, this directory adds just enough
97metadata to define the Poky reference distribution.
98
99.. _structure-core-meta-yocto-bsp:
100
101``meta-yocto-bsp/``
102-------------------
103
104This directory contains the Yocto Project reference hardware Board
105Support Packages (BSPs). For more information on BSPs, see the `Yocto
106Project Board Support Package (BSP) Developer's
107Guide <&YOCTO_DOCS_BSP_URL;>`__.
108
109.. _structure-meta-selftest:
110
111``meta-selftest/``
112------------------
113
114This directory adds additional recipes and append files used by the
115OpenEmbedded selftests to verify the behavior of the build system. You
116do not have to add this layer to your ``bblayers.conf`` file unless you
117want to run the selftests.
118
119.. _structure-meta-skeleton:
120
121``meta-skeleton/``
122------------------
123
124This directory contains template recipes for BSP and kernel development.
125
126.. _structure-core-scripts:
127
128``scripts/``
129------------
130
131This directory contains various integration scripts that implement extra
132functionality in the Yocto Project environment (e.g. QEMU scripts). The
133````` <#structure-core-script>`__ script prepends this directory to the
134shell's ``PATH`` environment variable.
135
136The ``scripts`` directory has useful scripts that assist in contributing
137back to the Yocto Project, such as ``create-pull-request`` and
138``send-pull-request``.
139
140.. _structure-core-script:
141
142````
143----
144
145This script sets up the OpenEmbedded build environment. Running this
146script with the ``source`` command in a shell makes changes to ``PATH``
147and sets other core BitBake variables based on the current working
148directory. You need to run an environment setup script before running
149BitBake commands. The script uses other scripts within the ``scripts``
150directory to do the bulk of the work.
151
152When you run this script, your Yocto Project environment is set up, a
153`Build Directory <#build-directory>`__ is created, your working
154directory becomes the Build Directory, and you are presented with some
155simple suggestions as to what to do next, including a list of some
156possible targets to build. Here is an example: $ source
157oe-init-build-env ### Shell environment set up for builds. ### You can
158now run 'bitbake <target>' Common targets are: core-image-minimal
159core-image-sato meta-toolchain meta-ide-support You can also run
160generated qemu images with a command like 'runqemu qemux86-64' The
161default output of the ``oe-init-build-env`` script is from the
162``conf-notes.txt`` file, which is found in the ``meta-poky`` directory
163within the `Source Directory <#source-directory>`__. If you design a
164custom distribution, you can include your own version of this
165configuration file to mention the targets defined by your distribution.
166See the "`Creating a Custom Template Configuration
167Directory <&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory>`__"
168section in the Yocto Project Development Tasks Manual for more
169information.
170
171By default, running this script without a Build Directory argument
172creates the ``build/`` directory in your current working directory. If
173you provide a Build Directory argument when you ``source`` the script,
174you direct the OpenEmbedded build system to create a Build Directory of
175your choice. For example, the following command creates a Build
176Directory named ``mybuilds/`` that is outside of the `Source
177Directory <#source-directory>`__: $ source OE_INIT_FILE ~/mybuilds The
178OpenEmbedded build system uses the template configuration files, which
179are found by default in the ``meta-poky/conf/`` directory in the Source
180Directory. See the "`Creating a Custom Template Configuration
181Directory <&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory>`__"
182section in the Yocto Project Development Tasks Manual for more
183information.
184
185.. note::
186
187 The OpenEmbedded build system does not support file or directory
188 names that contain spaces. If you attempt to run the
189 OE_INIT_FILE
190 script from a Source Directory that contains spaces in either the
191 filenames or directory names, the script returns an error indicating
192 no such file or directory. Be sure to use a Source Directory free of
193 names containing spaces.
194
195.. _structure-basic-top-level:
196
197``LICENSE, README, and README.hardware``
198----------------------------------------
199
200These files are standard top-level files.
201
202.. _structure-build:
203
204The Build Directory - ``build/``
205================================
206
207The OpenEmbedded build system creates the `Build
208Directory <#build-directory>`__ when you run the build environment setup
209script ````` <#structure-core-script>`__. If you do not give the Build
210Directory a specific name when you run the setup script, the name
211defaults to ``build/``.
212
213For subsequent parsing and processing, the name of the Build directory
214is available via the ```TOPDIR`` <#var-TOPDIR>`__ variable.
215
216.. _structure-build-buildhistory:
217
218``build/buildhistory/``
219-----------------------
220
221The OpenEmbedded build system creates this directory when you enable
222build history via the ``buildhistory`` class file. The directory
223organizes build information into image, packages, and SDK
224subdirectories. For information on the build history feature, see the
225"`Maintaining Build Output
226Quality <&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality>`__"
227section in the Yocto Project Development Tasks Manual.
228
229.. _structure-build-conf-local.conf:
230
231``build/conf/local.conf``
232-------------------------
233
234This configuration file contains all the local user configurations for
235your build environment. The ``local.conf`` file contains documentation
236on the various configuration options. Any variable set here overrides
237any variable set elsewhere within the environment unless that variable
238is hard-coded within a file (e.g. by using '=' instead of '?='). Some
239variables are hard-coded for various reasons but such variables are
240relatively rare.
241
242At a minimum, you would normally edit this file to select the target
243``MACHINE``, which package types you wish to use
244(```PACKAGE_CLASSES`` <#var-PACKAGE_CLASSES>`__), and the location from
245which you want to access downloaded files (``DL_DIR``).
246
247If ``local.conf`` is not present when you start the build, the
248OpenEmbedded build system creates it from ``local.conf.sample`` when you
249``source`` the top-level build environment setup script
250````` <#structure-core-script>`__.
251
252The source ``local.conf.sample`` file used depends on the
253``$TEMPLATECONF`` script variable, which defaults to ``meta-poky/conf/``
254when you are building from the Yocto Project development environment,
255and to ``meta/conf/`` when you are building from the OpenEmbedded-Core
256environment. Because the script variable points to the source of the
257``local.conf.sample`` file, this implies that you can configure your
258build environment from any layer by setting the variable in the
259top-level build environment setup script as follows:
260TEMPLATECONF=your_layer/conf Once the build process gets the sample
261file, it uses ``sed`` to substitute final
262``${``\ ```OEROOT`` <#var-OEROOT>`__\ ``}`` values for all
263``##OEROOT##`` values.
264
265.. note::
266
267 You can see how the
268 TEMPLATECONF
269 variable is used by looking at the
270 scripts/oe-setup-builddir
271 script in the
272 Source Directory
273 . You can find the Yocto Project version of the
274 local.conf.sample
275 file in the
276 meta-poky/conf
277 directory.
278
279.. _structure-build-conf-bblayers.conf:
280
281``build/conf/bblayers.conf``
282----------------------------
283
284This configuration file defines
285`layers <&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers>`__,
286which are directory trees, traversed (or walked) by BitBake. The
287``bblayers.conf`` file uses the ```BBLAYERS`` <#var-BBLAYERS>`__
288variable to list the layers BitBake tries to find.
289
290If ``bblayers.conf`` is not present when you start the build, the
291OpenEmbedded build system creates it from ``bblayers.conf.sample`` when
292you ``source`` the top-level build environment setup script (i.e.
293````` <#structure-core-script>`__).
294
295As with the ``local.conf`` file, the source ``bblayers.conf.sample``
296file used depends on the ``$TEMPLATECONF`` script variable, which
297defaults to ``meta-poky/conf/`` when you are building from the Yocto
298Project development environment, and to ``meta/conf/`` when you are
299building from the OpenEmbedded-Core environment. Because the script
300variable points to the source of the ``bblayers.conf.sample`` file, this
301implies that you can base your build from any layer by setting the
302variable in the top-level build environment setup script as follows:
303TEMPLATECONF=your_layer/conf Once the build process gets the sample
304file, it uses ``sed`` to substitute final
305``${``\ ```OEROOT`` <#var-OEROOT>`__\ ``}`` values for all
306``##OEROOT##`` values.
307
308.. note::
309
310 You can see how the
311 TEMPLATECONF
312 variable
313 scripts/oe-setup-builddir
314 script in the
315 Source Directory
316 . You can find the Yocto Project version of the
317 bblayers.conf.sample
318 file in the
319 meta-poky/conf/
320 directory.
321
322.. _structure-build-conf-sanity_info:
323
324``build/cache/sanity_info``
325---------------------------
326
327This file indicates the state of the sanity checks and is created during
328the build.
329
330.. _structure-build-downloads:
331
332``build/downloads/``
333--------------------
334
335This directory contains downloaded upstream source tarballs. You can
336reuse the directory for multiple builds or move the directory to another
337location. You can control the location of this directory through the
338``DL_DIR`` variable.
339
340.. _structure-build-sstate-cache:
341
342``build/sstate-cache/``
343-----------------------
344
345This directory contains the shared state cache. You can reuse the
346directory for multiple builds or move the directory to another location.
347You can control the location of this directory through the
348``SSTATE_DIR`` variable.
349
350.. _structure-build-tmp:
351
352``build/tmp/``
353--------------
354
355The OpenEmbedded build system creates and uses this directory for all
356the build system's output. The ```TMPDIR`` <#var-TMPDIR>`__ variable
357points to this directory.
358
359BitBake creates this directory if it does not exist. As a last resort,
360to clean up a build and start it from scratch (other than the
361downloads), you can remove everything in the ``tmp`` directory or get
362rid of the directory completely. If you do, you should also completely
363remove the ``build/sstate-cache`` directory.
364
365.. _structure-build-tmp-buildstats:
366
367``build/tmp/buildstats/``
368-------------------------
369
370This directory stores the build statistics.
371
372.. _structure-build-tmp-cache:
373
374``build/tmp/cache/``
375--------------------
376
377When BitBake parses the metadata (recipes and configuration files), it
378caches the results in ``build/tmp/cache/`` to speed up future builds.
379The results are stored on a per-machine basis.
380
381During subsequent builds, BitBake checks each recipe (together with, for
382example, any files included or appended to it) to see if they have been
383modified. Changes can be detected, for example, through file
384modification time (mtime) changes and hashing of file contents. If no
385changes to the file are detected, then the parsed result stored in the
386cache is reused. If the file has changed, it is reparsed.
387
388.. _structure-build-tmp-deploy:
389
390``build/tmp/deploy/``
391---------------------
392
393This directory contains any "end result" output from the OpenEmbedded
394build process. The ```DEPLOY_DIR`` <#var-DEPLOY_DIR>`__ variable points
395to this directory. For more detail on the contents of the ``deploy``
396directory, see the
397"`Images <&YOCTO_DOCS_OM_URL;#images-dev-environment>`__" and
398"`Application Development
399SDK <&YOCTO_DOCS_OM_URL;#sdk-dev-environment>`__" sections in the Yocto
400Project Overview and Concepts Manual.
401
402.. _structure-build-tmp-deploy-deb:
403
404``build/tmp/deploy/deb/``
405-------------------------
406
407This directory receives any ``.deb`` packages produced by the build
408process. The packages are sorted into feeds for different architecture
409types.
410
411.. _structure-build-tmp-deploy-rpm:
412
413``build/tmp/deploy/rpm/``
414-------------------------
415
416This directory receives any ``.rpm`` packages produced by the build
417process. The packages are sorted into feeds for different architecture
418types.
419
420.. _structure-build-tmp-deploy-ipk:
421
422``build/tmp/deploy/ipk/``
423-------------------------
424
425This directory receives ``.ipk`` packages produced by the build process.
426
427.. _structure-build-tmp-deploy-licenses:
428
429``build/tmp/deploy/licenses/``
430------------------------------
431
432This directory receives package licensing information. For example, the
433directory contains sub-directories for ``bash``, ``busybox``, and
434``glibc`` (among others) that in turn contain appropriate ``COPYING``
435license files with other licensing information. For information on
436licensing, see the "`Maintaining Open Source License Compliance During
437Your Product's
438Lifecycle <&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle>`__"
439section in the Yocto Project Development Tasks Manual.
440
441.. _structure-build-tmp-deploy-images:
442
443``build/tmp/deploy/images/``
444----------------------------
445
446This directory is populated with the basic output objects of the build
447(think of them as the "generated artifacts" of the build process),
448including things like the boot loader image, kernel, root filesystem and
449more. If you want to flash the resulting image from a build onto a
450device, look here for the necessary components.
451
452Be careful when deleting files in this directory. You can safely delete
453old images from this directory (e.g. ``core-image-*``). However, the
454kernel (``*zImage*``, ``*uImage*``, etc.), bootloader and other
455supplementary files might be deployed here prior to building an image.
456Because these files are not directly produced from the image, if you
457delete them they will not be automatically re-created when you build the
458image again.
459
460If you do accidentally delete files here, you will need to force them to
461be re-created. In order to do that, you will need to know the target
462that produced them. For example, these commands rebuild and re-create
463the kernel files: $ bitbake -c clean virtual/kernel $ bitbake
464virtual/kernel
465
466.. _structure-build-tmp-deploy-sdk:
467
468``build/tmp/deploy/sdk/``
469-------------------------
470
471The OpenEmbedded build system creates this directory to hold toolchain
472installer scripts which, when executed, install the sysroot that matches
473your target hardware. You can find out more about these installers in
474the "`Building an SDK
475Installer <&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer>`__"
476section in the Yocto Project Application Development and the Extensible
477Software Development Kit (eSDK) manual.
478
479.. _structure-build-tmp-sstate-control:
480
481``build/tmp/sstate-control/``
482-----------------------------
483
484The OpenEmbedded build system uses this directory for the shared state
485manifest files. The shared state code uses these files to record the
486files installed by each sstate task so that the files can be removed
487when cleaning the recipe or when a newer version is about to be
488installed. The build system also uses the manifests to detect and
489produce a warning when files from one task are overwriting those from
490another.
491
492.. _structure-build-tmp-sysroots-components:
493
494``build/tmp/sysroots-components/``
495----------------------------------
496
497This directory is the location of the sysroot contents that the task
498```do_prepare_recipe_sysroot`` <#ref-tasks-prepare_recipe_sysroot>`__
499links or copies into the recipe-specific sysroot for each recipe listed
500in ```DEPENDS`` <#var-DEPENDS>`__. Population of this directory is
501handled through shared state, while the path is specified by the
502```COMPONENTS_DIR`` <#var-COMPONENTS_DIR>`__ variable. Apart from a few
503unusual circumstances, handling of the ``sysroots-components`` directory
504should be automatic, and recipes should not directly reference
505``build/tmp/sysroots-components``.
506
507.. _structure-build-tmp-sysroots:
508
509``build/tmp/sysroots/``
510-----------------------
511
512Previous versions of the OpenEmbedded build system used to create a
513global shared sysroot per machine along with a native sysroot. Beginning
514with the DISTRO version of the Yocto Project, sysroots exist in
515recipe-specific ```WORKDIR`` <#var-WORKDIR>`__ directories. Thus, the
516``build/tmp/sysroots/`` directory is unused.
517
518.. note::
519
520 The
521 build/tmp/sysroots/
522 directory can still be populated using the
523 bitbake build-sysroots
524 command and can be used for compatibility in some cases. However, in
525 general it is not recommended to populate this directory. Individual
526 recipe-specific sysroots should be used.
527
528.. _structure-build-tmp-stamps:
529
530``build/tmp/stamps/``
531---------------------
532
533This directory holds information that BitBake uses for accounting
534purposes to track what tasks have run and when they have run. The
535directory is sub-divided by architecture, package name, and version.
536Following is an example:
537stamps/all-poky-linux/distcc-config/1.0-r0.do_build-2fdd....2do Although
538the files in the directory are empty of data, BitBake uses the filenames
539and timestamps for tracking purposes.
540
541For information on how BitBake uses stamp files to determine if a task
542should be rerun, see the "`Stamp Files and the Rerunning of
543Tasks <&YOCTO_DOCS_OM_URL;#stamp-files-and-the-rerunning-of-tasks>`__"
544section in the Yocto Project Overview and Concepts Manual.
545
546.. _structure-build-tmp-log:
547
548``build/tmp/log/``
549------------------
550
551This directory contains general logs that are not otherwise placed using
552the package's ``WORKDIR``. Examples of logs are the output from the
553``do_check_pkg`` or ``do_distro_check`` tasks. Running a build does not
554necessarily mean this directory is created.
555
556.. _structure-build-tmp-work:
557
558``build/tmp/work/``
559-------------------
560
561This directory contains architecture-specific work sub-directories for
562packages built by BitBake. All tasks execute from the appropriate work
563directory. For example, the source for a particular package is unpacked,
564patched, configured and compiled all within its own work directory.
565Within the work directory, organization is based on the package group
566and version for which the source is being compiled as defined by the
567```WORKDIR`` <#var-WORKDIR>`__.
568
569It is worth considering the structure of a typical work directory. As an
570example, consider ``linux-yocto-kernel-3.0`` on the machine ``qemux86``
571built within the Yocto Project. For this package, a work directory of
572``tmp/work/qemux86-poky-linux/linux-yocto/3.0+git1+<.....>``, referred
573to as the ``WORKDIR``, is created. Within this directory, the source is
574unpacked to ``linux-qemux86-standard-build`` and then patched by Quilt.
575(See the "`Using Quilt in Your
576Workflow <&YOCTO_DOCS_DEV_URL;#using-a-quilt-workflow>`__" section in
577the Yocto Project Development Tasks Manual for more information.) Within
578the ``linux-qemux86-standard-build`` directory, standard Quilt
579directories ``linux-3.0/patches`` and ``linux-3.0/.pc`` are created, and
580standard Quilt commands can be used.
581
582There are other directories generated within ``WORKDIR``. The most
583important directory is ``WORKDIR/temp/``, which has log files for each
584task (``log.do_*.pid``) and contains the scripts BitBake runs for each
585task (``run.do_*.pid``). The ``WORKDIR/image/`` directory is where "make
586install" places its output that is then split into sub-packages within
587``WORKDIR/packages-split/``.
588
589.. _structure-build-tmp-work-tunearch-recipename-version:
590
591``build/tmp/work/tunearch/recipename/version/``
592-----------------------------------------------
593
594The recipe work directory - ``${WORKDIR}``.
595
596As described earlier in the
597"```build/tmp/sysroots/`` <#structure-build-tmp-sysroots>`__" section,
598beginning with the DISTRO release of the Yocto Project, the OpenEmbedded
599build system builds each recipe in its own work directory (i.e.
600```WORKDIR`` <#var-WORKDIR>`__). The path to the work directory is
601constructed using the architecture of the given build (e.g.
602```TUNE_PKGARCH`` <#var-TUNE_PKGARCH>`__,
603```MACHINE_ARCH`` <#var-MACHINE_ARCH>`__, or "allarch"), the recipe
604name, and the version of the recipe (i.e.
605```PE`` <#var-PE>`__\ ``:``\ ```PV`` <#var-PV>`__\ ``-``\ ```PR`` <#var-PR>`__).
606
607A number of key subdirectories exist within each recipe work directory:
608
609- ``${WORKDIR}/temp``: Contains the log files of each task executed for
610 this recipe, the "run" files for each executed task, which contain
611 the code run, and a ``log.task_order`` file, which lists the order in
612 which tasks were executed.
613
614- ``${WORKDIR}/image``: Contains the output of the
615 ```do_install`` <#ref-tasks-install>`__ task, which corresponds to
616 the ``${``\ ```D`` <#var-D>`__\ ``}`` variable in that task.
617
618- ``${WORKDIR}/pseudo``: Contains the pseudo database and log for any
619 tasks executed under pseudo for the recipe.
620
621- ``${WORKDIR}/sysroot-destdir``: Contains the output of the
622 ```do_populate_sysroot`` <#ref-tasks-populate_sysroot>`__ task.
623
624- ``${WORKDIR}/package``: Contains the output of the
625 ```do_package`` <#ref-tasks-package>`__ task before the output is
626 split into individual packages.
627
628- ``${WORKDIR}/packages-split``: Contains the output of the
629 ``do_package`` task after the output has been split into individual
630 packages. Subdirectories exist for each individual package created by
631 the recipe.
632
633- ``${WORKDIR}/recipe-sysroot``: A directory populated with the target
634 dependencies of the recipe. This directory looks like the target
635 filesystem and contains libraries that the recipe might need to link
636 against (e.g. the C library).
637
638- ``${WORKDIR}/recipe-sysroot-native``: A directory populated with the
639 native dependencies of the recipe. This directory contains the tools
640 the recipe needs to build (e.g. the compiler, Autoconf, libtool, and
641 so forth).
642
643- ``${WORKDIR}/build``: This subdirectory applies only to recipes that
644 support builds where the source is separate from the build artifacts.
645 The OpenEmbedded build system uses this directory as a separate build
646 directory (i.e. ``${``\ ```B`` <#var-B>`__\ ``}``).
647
648.. _structure-build-work-shared:
649
650``build/tmp/work-shared/``
651--------------------------
652
653For efficiency, the OpenEmbedded build system creates and uses this
654directory to hold recipes that share a work directory with other
655recipes. In practice, this is only used for ``gcc`` and its variants
656(e.g. ``gcc-cross``, ``libgcc``, ``gcc-runtime``, and so forth).
657
658.. _structure-meta:
659
660The Metadata - ``meta/``
661========================
662
663As mentioned previously, `Metadata <#metadata>`__ is the core of the
664Yocto Project. Metadata has several important subdivisions:
665
666.. _structure-meta-classes:
667
668``meta/classes/``
669-----------------
670
671This directory contains the ``*.bbclass`` files. Class files are used to
672abstract common code so it can be reused by multiple packages. Every
673package inherits the ``base.bbclass`` file. Examples of other important
674classes are ``autotools.bbclass``, which in theory allows any
675Autotool-enabled package to work with the Yocto Project with minimal
676effort. Another example is ``kernel.bbclass`` that contains common code
677and functions for working with the Linux kernel. Functions like image
678generation or packaging also have their specific class files such as
679``image.bbclass``, ``rootfs_*.bbclass`` and ``package*.bbclass``.
680
681For reference information on classes, see the
682"`Classes <#ref-classes>`__" chapter.
683
684.. _structure-meta-conf:
685
686``meta/conf/``
687--------------
688
689This directory contains the core set of configuration files that start
690from ``bitbake.conf`` and from which all other configuration files are
691included. See the include statements at the end of the ``bitbake.conf``
692file and you will note that even ``local.conf`` is loaded from there.
693While ``bitbake.conf`` sets up the defaults, you can often override
694these by using the (``local.conf``) file, machine file or the
695distribution configuration file.
696
697.. _structure-meta-conf-machine:
698
699``meta/conf/machine/``
700----------------------
701
702This directory contains all the machine configuration files. If you set
703``MACHINE = "qemux86"``, the OpenEmbedded build system looks for a
704``qemux86.conf`` file in this directory. The ``include`` directory
705contains various data common to multiple machines. If you want to add
706support for a new machine to the Yocto Project, look in this directory.
707
708.. _structure-meta-conf-distro:
709
710``meta/conf/distro/``
711---------------------
712
713The contents of this directory controls any distribution-specific
714configurations. For the Yocto Project, the ``defaultsetup.conf`` is the
715main file here. This directory includes the versions and the ``SRCDATE``
716definitions for applications that are configured here. An example of an
717alternative configuration might be ``poky-bleeding.conf``. Although this
718file mainly inherits its configuration from Poky.
719
720.. _structure-meta-conf-machine-sdk:
721
722``meta/conf/machine-sdk/``
723--------------------------
724
725The OpenEmbedded build system searches this directory for configuration
726files that correspond to the value of
727```SDKMACHINE`` <#var-SDKMACHINE>`__. By default, 32-bit and 64-bit x86
728files ship with the Yocto Project that support some SDK hosts. However,
729it is possible to extend that support to other SDK hosts by adding
730additional configuration files in this subdirectory within another
731layer.
732
733.. _structure-meta-files:
734
735``meta/files/``
736---------------
737
738This directory contains common license files and several text files used
739by the build system. The text files contain minimal device information
740and lists of files and directories with known permissions.
741
742.. _structure-meta-lib:
743
744``meta/lib/``
745-------------
746
747This directory contains OpenEmbedded Python library code used during the
748build process.
749
750.. _structure-meta-recipes-bsp:
751
752``meta/recipes-bsp/``
753---------------------
754
755This directory contains anything linking to specific hardware or
756hardware configuration information such as "u-boot" and "grub".
757
758.. _structure-meta-recipes-connectivity:
759
760``meta/recipes-connectivity/``
761------------------------------
762
763This directory contains libraries and applications related to
764communication with other devices.
765
766.. _structure-meta-recipes-core:
767
768``meta/recipes-core/``
769----------------------
770
771This directory contains what is needed to build a basic working Linux
772image including commonly used dependencies.
773
774.. _structure-meta-recipes-devtools:
775
776``meta/recipes-devtools/``
777--------------------------
778
779This directory contains tools that are primarily used by the build
780system. The tools, however, can also be used on targets.
781
782.. _structure-meta-recipes-extended:
783
784``meta/recipes-extended/``
785--------------------------
786
787This directory contains non-essential applications that add features
788compared to the alternatives in core. You might need this directory for
789full tool functionality or for Linux Standard Base (LSB) compliance.
790
791.. _structure-meta-recipes-gnome:
792
793``meta/recipes-gnome/``
794-----------------------
795
796This directory contains all things related to the GTK+ application
797framework.
798
799.. _structure-meta-recipes-graphics:
800
801``meta/recipes-graphics/``
802--------------------------
803
804This directory contains X and other graphically related system
805libraries.
806
807.. _structure-meta-recipes-kernel:
808
809``meta/recipes-kernel/``
810------------------------
811
812This directory contains the kernel and generic applications and
813libraries that have strong kernel dependencies.
814
815.. _structure-meta-recipes-lsb4:
816
817``meta/recipes-lsb4/``
818----------------------
819
820This directory contains recipes specifically added to support the Linux
821Standard Base (LSB) version 4.x.
822
823.. _structure-meta-recipes-multimedia:
824
825``meta/recipes-multimedia/``
826----------------------------
827
828This directory contains codecs and support utilities for audio, images
829and video.
830
831.. _structure-meta-recipes-rt:
832
833``meta/recipes-rt/``
834--------------------
835
836This directory contains package and image recipes for using and testing
837the ``PREEMPT_RT`` kernel.
838
839.. _structure-meta-recipes-sato:
840
841``meta/recipes-sato/``
842----------------------
843
844This directory contains the Sato demo/reference UI/UX and its associated
845applications and configuration data.
846
847.. _structure-meta-recipes-support:
848
849``meta/recipes-support/``
850-------------------------
851
852This directory contains recipes used by other recipes, but that are not
853directly included in images (i.e. dependencies of other recipes).
854
855.. _structure-meta-site:
856
857``meta/site/``
858--------------
859
860This directory contains a list of cached results for various
861architectures. Because certain "autoconf" test results cannot be
862determined when cross-compiling due to the tests not able to run on a
863live system, the information in this directory is passed to "autoconf"
864for the various architectures.
865
866.. _structure-meta-recipes-txt:
867
868``meta/recipes.txt``
869--------------------
870
871This file is a description of the contents of ``recipes-*``.