From 39de08c1052fc988f1a9ecb51a94cc4ba97f711e Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Fri, 19 Aug 2011 09:29:54 -0700 Subject: documentation/poky-ref-manual/ref-structure.xml: Scrubbed for Poky and edits I converted "Poky" to "the Yocto Project." I also updated several examples. In particular the build/tmp/work example. (From yocto-docs rev: eb82bc36904f502fb4f314ff05eb86cff27ce0b6) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/poky-ref-manual/ref-structure.xml | 352 +++++++++++------------- 1 file changed, 168 insertions(+), 184 deletions(-) (limited to 'documentation') diff --git a/documentation/poky-ref-manual/ref-structure.xml b/documentation/poky-ref-manual/ref-structure.xml index 6b5e6460b2..b5e2e3550f 100644 --- a/documentation/poky-ref-manual/ref-structure.xml +++ b/documentation/poky-ref-manual/ref-structure.xml @@ -6,28 +6,36 @@ Reference: Directory Structure - Poky consists of several components. - Understanding them and knowing where they are located is key to using Poky well. - This appendix describes the Poky directory structure and gives information about the various + The Yocto Project consists of several components. + Understanding them and knowing where they are located is key to using the Yocto Project well. + This appendix describes the Yocto Project file's directory structure and gives information about the various files and directories. + + For information on how to establish the Yocto Project files on your local development system, see the + + Getting Setup section in the + + The Yocto Project Development Manual. + +
Top level core components
- <filename class="directory">bitbake/</filename> + <filename>bitbake/</filename> - Poky includes a copy of BitBake for ease of use. + The Yocto Project includes a copy of BitBake for ease of use. The copy usually matches the current stable BitBake release from the BitBake project. - BitBake, a metadata interpreter, reads the Poky metadata and runs the tasks + BitBake, a metadata interpreter, reads the Yocto Project metadata and runs the tasks defined by that data. Failures are usually from the metadata and not from BitBake itself. Consequently, most users do not need to worry about BitBake. - The bitbake/bin/ directory is placed - into the PATH environment variable by the + The bitbake/bin/ directory is placed + into the PATH environment variable by the oe-init-build-env script. @@ -38,118 +46,88 @@
- <filename class="directory">build/</filename> + <filename>build/</filename> This directory contains user configuration files and the output - generated by Poky in its standard configuration where the source tree is - combined with the output. + generated by the Yocto Project in its standard configuration where the source tree is + combined with the output. + The build directory is created initially when you source + the Yocto Project environment setup script oe-init-build-env. + + + It is also possible to place output and configuration - files in a directory separate from the Poky source. - For information on separating output from the Poky source, see source + the setup script. + For information on separating output from the Yocto Project files, see oe-init-build-env.
-
- <filename class="directory">meta/</filename> +
+ <filename>documentation</filename> - This directory contains the core metadata, which is a key part of Poky. - This directory contains the machine definitions, the Poky distribution, - and the packages that make up a given system. + This directory holds the source for the Yocto Project documentation + as well as templates and tools that allow you to generate PDF and HTML + versions of the manuals. + Each manual is contained in a sub-folder. + For example, the files for this manual reside in + poky-ref-manual.
-
- <filename class="directory">meta-demoapps/</filename> + <filename>meta-demoapps/</filename> - This directory contains recipes for applications and demos that are not core. + This directory contains recipes for applications and demos that are not part of the + Yocto Project core.
- <filename class="directory">meta-rt/</filename> + <filename>meta-rt/</filename> - This directory contains recipes for RealTime. + This directory contains recipes for real-time kernels.
-
- <filename class="directory">scripts/</filename> + <filename>scripts/</filename> This directory contains various integration scripts that implement - extra functionality in the Poky environment (e.g. QEMU scripts). + extra functionality in the Yocto Project environment (e.g. QEMU scripts). The oe-init-build-env script appends this - directory to the PATH environment variable. - -
- - - -
- <filename class="directory">documentation</filename> - This directory holds the source for the documentation. Each manual is contained in - a sub-folder. For example, the files for this manual reside in - poky-ref-manual. + The scripts directory has useful scripts that assist contributing + back to the Yocto Project, such as create_pull_request and + send_pull_request.
@@ -157,25 +135,25 @@ <filename>oe-init-build-env</filename> - This script sets up the Poky build environment. - Sourcing this file in - a shell makes changes to PATH and sets other core BitBake variables based on the + This script sets up the Yocto Project build environment. + Running this script with the source command in + a shell makes changes to PATH and sets other core BitBake variables based on the current working directory. - You need to run this script before running Poky commands. - The script uses other scripts within the scripts/ - directory to do the bulk of the work. - You can use this script to specify any directory for the build's output by doing the following: + You need to run this script before running BitBake commands. + The script uses other scripts within the scripts directory to do + the bulk of the work. - - $ source POKY_SRC/oe-init-build-env [BUILDDIR] - - - You can enter the above command from any directory, as long as POKY_SRC points to - the desired Poky source tree. - The optional BUILDDIR can be any directory into which you would - like Poky to generate the build output. + By default, running this script without a build directory argument creates the + build directory. + If you provide a build directory argument when you source + the script, you direct the Yocto Project to create a build directory of your choice. + For example, the following command creates a build directory named + mybuilds that is outside of the Yocto Project files: + + $ source oe-init-build-env ~/mybuilds +
@@ -189,14 +167,14 @@
- The Build Directory - <filename class="directory">build/</filename> + The Build Directory - <filename>build/</filename>
<filename>build/pseudodone</filename> - This tag file indicates that the intitial pseudo binar was created. - The first time BitBake is invoked this file is built. + This tag file indicates that the intitial pseudo binary was created. + The file is built the first time BitBake is invoked.
@@ -204,21 +182,21 @@ <filename>build/conf/local.conf</filename> - This file contains all the local user configuration of Poky. + This file contains all the local user configuration of the Yocto Project. If there is no local.conf present, it is created from local.conf.sample. The local.conf file contains documentation on the various configuration options. - Any variable set here overrides any variable set elsewhere within Poky unless - that variable is hard-coded within Poky (e.g. by using '=' instead of '?='). + Any variable set here overrides any variable set elsewhere within the Yocto Project unless + that variable is hard-coded within the Yocto Project (e.g. by using '=' instead of '?='). Some variables are hard-coded for various reasons but these variables are relatively rare. - Edit this file to set the MACHINE + Edit this file to set the MACHINE for which you want to build, which package types you - wish to use (PACKAGE_CLASSES) or where you want to downloaded files - (DL_DIR). + wish to use (PACKAGE_CLASSES), or where you want to downloaded files + (DL_DIR).
@@ -228,8 +206,8 @@ This file defines layers, which is a directory tree, traversed (or walked) by BitBake. If bblayers.conf - is not present, it is created from bblayers.conf.sample when the environment - setup script is sourced. + is not present, it is created from bblayers.conf.sample when + you source the environment setup script. @@ -248,7 +226,7 @@ This directory is used for the upstream source tarballs. The directory can be reused by multiple builds or moved to another location. You can control the location of this directory through the - DL_DIR variable. + DL_DIR variable. @@ -259,25 +237,25 @@ This directory is used for the shared state cache. The directory can be reused by multiple builds or moved to another location. You can control the location of this directory through the - SSTATE_DIR variable. + SSTATE_DIR variable.
- <filename class="directory">build/tmp/</filename> + <filename>build/tmp/</filename> - This directory receives all the Poky output. + This directory receives all the Yocto Project output. BitBake creates this directory if it does not exist. - To clean Poky and start a build from scratch (other than downloads), + As a last resort, to clean the Yocto Project and start a build from scratch (other than downloads), you can remove everything in this directory or get rid of the directory completely. - The tmp/ directory has some important - sub-components detailed below. + If you do, you should also completely remove the build/sstate-cache + directory as well.
- <filename class="directory">build/tmp/buildstats/</filename> + <filename>build/tmp/buildstats/</filename> This directory stores the build statistics. @@ -285,56 +263,68 @@
- <filename class="directory">build/tmp/cache/</filename> + <filename>build/tmp/cache/</filename> - When BitBake parses the metadata it creates a cache file of the result that can + When BitBake parses the metadata, it creates a cache file of the result that can be used when subsequently running commands. These results are stored here on a per-machine basis.
- <filename class="directory">build/tmp/deploy/</filename> + <filename>build/tmp/deploy/</filename> - This directory contains any 'end result' output from Poky. + + This directory contains any 'end result' output from the Yocto Project build process. +
- <filename class="directory">build/tmp/deploy/deb/</filename> + <filename>build/tmp/deploy/deb/</filename> - This directory receives any .deb packages produced by Poky. + This directory receives any .deb packages produced by the Yocto Project. The packages are sorted into feeds for different architecture types.
- <filename class="directory">build/tmp/deploy/rpm/</filename> + <filename>build/tmp/deploy/rpm/</filename> - This directory receives any .rpm packages produced by Poky. + This directory receives any .rpm packages produced by the Yocto Project. The packages are sorted into feeds for different architecture types.
- <filename class="directory">build/tmp/deploy/images/</filename> + <filename>build/tmp/deploy/images/</filename> This directory receives complete filesystem images. If you want to flash the resulting image from a build onto a device, look here for the image. + + + Note, you should not remove any files from this directory by hand in an attempt + to rebuild an image. + If you want to clean out the cache, re-run the build using the following + BitBake command: + + $ bitbake -c cleanall <target> + +
- <filename class="directory">build/tmp/deploy/ipk/</filename> + <filename>build/tmp/deploy/ipk/</filename> - This directory receives .ipk packages produced by Poky. + This directory receives .ipk packages produced by the Yocto Project.
- <filename class="directory">build/tmp/sysroots/</filename> + <filename>build/tmp/sysroots/</filename> This directory contains shared header files and libraries as well as other shared @@ -346,7 +336,7 @@
- <filename class="directory">build/tmp/stamps/</filename> + <filename>build/tmp/stamps/</filename> This directory holds information that that BitBake uses for accounting purposes @@ -358,17 +348,18 @@
- <filename class="directory">build/tmp/log/</filename> + <filename>build/tmp/log/</filename> This directory contains general logs that are not otherwise placed using the - package's WORKDIR. - Examples of logs are the output from the "check_pkg" or "distro_check" tasks. + package's WORKDIR. + Examples of logs are the output from the check_pkg or + distro_check tasks.
- <filename class="directory">build/tmp/pkgdata/</filename> + <filename>build/tmp/pkgdata/</filename> This directory contains intermediate packaging data that is used later in the packaging process. @@ -376,72 +367,65 @@
-
- <filename class="directory">build/tmp/pstagelogs/</filename> - - - This directory contains manifest for task-based pre-built. - Each manifest is basically a file list for installed files from a given task. - Manifests are useful for later packaging or cleanup processes. - -
-
- <filename class="directory">build/tmp/work/</filename> + <filename>build/tmp/work/</filename> This directory contains architecture-specific work sub-directories for packages built by BitBake. All tasks execute from a work directory. For example, the source for a particular package is unpacked, patched, configured and compiled all within its own work directory. + Within the work directory, organization is based on the package group for which the source + is being compiled. It is worth considering the structure of a typical work directory. - As an example consider the linux-rp kernel, version 2.6.20 r7 on the machine spitz - built within Poky. - For this package a work directory of - tmp/work/spitz-poky-linux-gnueabi/linux-rp-2.6.20-r7/, - referred to as WORKDIR, is created. - Within this directory, the source is unpacked to linux-2.6.20 and then patched by quilt - (see Section 3.5.1). - Within the linux-2.6.20 directory, - standard quilt directories linux-2.6.20/patches - and linux-2.6.20/.pc are created, - and standard quilt commands can be used. + As an example, consider the linux-yocto kernel 3.0 on the machine qemux86 + built within the Yocto Project. + For this package, a work directory of + tmp/work/qemux86-poky-linux/linux-yocto-3.0+git1+<.....>, + referred to as WORKDIR, is created. + Within this directory, the source is unpacked to + linux-qemux86-standard-build and then patched by Quilt + (see the Modifying Package Source Code + With Quilt section). + Within the linux-qemux86-standard-build directory, + standard Quilt directories linux-3.0/patches + and linux-3.0/.pc are created, + and standard Quilt commands can be used. There are other directories generated within WORKDIR. - The most important directory is WORKDIR - /temp/, which has log files for each + The most important directory is WORKDIR/temp/, which has log files for each task (log.do_*.pid) and contains the scripts BitBake runs for each task (run.do_*.pid). - The WORKDIR/image/ directory is where "make + The WORKDIR/image/ directory is where "make install" places its output that is then split into sub-packages - within WORKDIR/packages-split/. + within WORKDIR/packages-split/.
- The Metadata - <filename class="directory">meta/</filename> + The Metadata - <filename>meta/</filename> - As mentioned previously, metadata is the core of Poky. + As mentioned previously, metadata is the core of the Yocto Project. Metadata has several important subdivisions:
- <filename class="directory">meta/classes/</filename> + <filename>meta/classes/</filename> - This directory contains the *.bbclass files. + This directory contains the *.bbclass files. Class files are used to abstract common code so it can be reused by multiple packages. Every package inherits the base.bbclass file. Examples of other important classes are autotools.bbclass, which - in theory allows any Autotool-enabled package to work with Poky with minimal effort. + in theory allows any Autotool-enabled package to work with the Yocto Project with minimal effort. Another example is kernel.bbclass that contains common code and functions for working with the Linux kernel. Functions like image generation or packaging also have their specific class files @@ -451,14 +435,14 @@
- <filename class="directory">meta/conf/</filename> + <filename>meta/conf/</filename> This directory contains the core set of configuration files that start from bitbake.conf and from which all other configuration files are included. - See the includes at the end of the file and you will note that even - local.conf is loaded from there! + See the include statements at the end of the file and you will note that even + local.conf is loaded from there. While bitbake.conf sets up the defaults, you can often override these by using the (local.conf) file, machine file or the distribution configuration file. @@ -466,32 +450,32 @@
- <filename class="directory">meta/conf/machine/</filename> + <filename>meta/conf/machine/</filename> This directory contains all the machine configuration files. - If you set MACHINE="spitz", Poky looks for a spitz.conf file in this + If you set MACHINE="spitz", Yocto Project looks for a spitz.conf file in this directory. - The includes directory contains various data common to multiple machines. - If you want to add support for a new machine to Poky, look in this directory. + The include directory contains various data common to multiple machines. + If you want to add support for a new machine to the Yocto Project, look in this directory.
- <filename class="directory">meta/conf/distro/</filename> + <filename>meta/conf/distro/</filename> Any distribution-specific configuration is controlled from this directory. - Poky only contains the Poky distribution so poky.conf - is the main file here. + The Yocto Project only contains the Yocto Project distribution so + defaultsetup.conf is the main file here. This directory includes the versions and SRCDATES for applications that are configured here. An example of an alternative configuration is poky-bleeding.conf - although this file mainly inherits its configuration from Poky itself. + although this file mainly inherits its configuration from the Yocto Project itself.
- <filename class="directory">meta/recipes-bsp/</filename> + <filename>meta/recipes-bsp/</filename> This directory contains anything linking to specific hardware or hardware configuration information @@ -500,7 +484,7 @@
- <filename class="directory">meta/recipes-connectivity/</filename> + <filename>meta/recipes-connectivity/</filename> This directory contains libraries and applications related to communication with other devices. @@ -508,7 +492,7 @@
- <filename class="directory">meta/recipes-core/</filename> + <filename>meta/recipes-core/</filename> This directory contains what is needed to build a basic working Linux image @@ -517,7 +501,7 @@
- <filename class="directory">meta/recipes-devtools/</filename> + <filename>meta/recipes-devtools/</filename> This directory contains tools that are primarily used by the build system. @@ -526,7 +510,7 @@
- <filename class="directory">meta/recipes-extended/</filename> + <filename>meta/recipes-extended/</filename> This directory contains non-essential applications that add features compared to the @@ -537,7 +521,7 @@
- <filename class="directory">meta/recipes-gnome/</filename> + <filename>meta/recipes-gnome/</filename> This directory contains all things related to the GTK+ application framework. @@ -545,7 +529,7 @@
- <filename class="directory">meta/recipes-graphics/</filename> + <filename>meta/recipes-graphics/</filename> This directory contains X and other graphically related system libraries @@ -553,7 +537,7 @@
- <filename class="directory">meta/recipes-kernel/</filename> + <filename>meta/recipes-kernel/</filename> This directory contains the kernel and generic applications and libraries that @@ -562,7 +546,7 @@
- <filename class="directory">meta/recipes-multimedia/</filename> + <filename>meta/recipes-multimedia/</filename> This directory contains codecs and support utilities for audio, images and video. @@ -570,7 +554,7 @@
- <filename class="directory">meta/recipes-qt/</filename> + <filename>meta/recipes-qt/</filename> This directory contains all things related to the QT application framework. @@ -578,7 +562,7 @@
- <filename class="directory">meta/recipes-sato/</filename> + <filename>meta/recipes-sato/</filename> This directory contains the Sato demo/reference UI/UX and its associated applications @@ -587,7 +571,7 @@
- <filename class="directory">meta/recipes-support/</filename> + <filename>meta/recipes-support/</filename> This directory contains recipes that used by other recipes, but that are not directly @@ -596,7 +580,7 @@
- <filename class="directory">meta/site/</filename> + <filename>meta/site/</filename> This directory contains a list of cached results for various architectures. @@ -607,7 +591,7 @@
- <filename class="directory">meta/recipes.txt/</filename> + <filename>meta/recipes.txt/</filename> This file is a description of the contents of recipes-*. -- cgit v1.2.3-54-g00ecf