From 32651058c0ae2263a0684fcefe1a82504a9ac366 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 15 Jan 2018 11:30:54 -0800 Subject: dev-manual, ref-manual: Moved building image to dev-manual Fixes [YOCTO #12370] The section in the ref-manual that overviewed the buld process was redundant and more of a "how-to" topic. I have moved and merged it into the dev-manual into a similar area. (From yocto-docs rev: 44f1351334342629aaa0976f62e64ac4f67166aa) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/Makefile | 3 +- documentation/dev-manual/dev-manual-start.xml | 134 +++++++++++++++++--- .../ref-manual/figures/building-an-image.png | Bin 14891 -> 0 bytes documentation/ref-manual/usingpoky.xml | 141 --------------------- 4 files changed, 120 insertions(+), 158 deletions(-) delete mode 100755 documentation/ref-manual/figures/building-an-image.png diff --git a/documentation/Makefile b/documentation/Makefile index e9ec914df9..c08d912302 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -214,7 +214,7 @@ TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png \ figures/wip.png else TARFILES = mega-manual.html mega-style.css \ - figures/building-an-image.png figures/YP-flow-diagram.png \ + figures/YP-flow-diagram.png \ figures/using-a-pre-built-image.png \ figures/poky-title.png figures/buildhistory.png \ figures/buildhistory-web.png \ @@ -282,7 +282,6 @@ XSLTOPTS = --xinclude ALLPREQ = html eclipse tarball TARFILES = ref-manual.html ref-style.css figures/poky-title.png \ figures/buildhistory.png figures/buildhistory-web.png \ - figures/building-an-image.png \ figures/build-workspace-directory.png \ eclipse MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse diff --git a/documentation/dev-manual/dev-manual-start.xml b/documentation/dev-manual/dev-manual-start.xml index 4c6c441fe0..dc30659159 100644 --- a/documentation/dev-manual/dev-manual-start.xml +++ b/documentation/dev-manual/dev-manual-start.xml @@ -701,13 +701,16 @@ -
- Performing a Simple Build +
+ Building an Image + In the development environment, you need to build an image whenever + you change hardware support, add or change system libraries, or add + or change services that have dependencies. Several methods exist that allow you to build an image within the Yocto Project. - This procedure shows how to build an image using BitBake from a + This section shows you how to build an image using BitBake from a Linux host. Notes @@ -715,7 +718,7 @@ For information on how to build an image using Toaster, see the - Yocto Project Toaster Manual. + Toaster Manual. For information on how to use @@ -724,6 +727,12 @@ section in the Yocto Project Application Development and the Extensible Software Development Kit (eSDK) manual. + + For a practical example on how to build an image using the + OpenEmbedded build system, see the + "Building Images" + section of the Yocto Project Quick Start. + @@ -736,9 +745,6 @@ For detailed information on the build process using BitBake, see the "Images" section in the Yocto Project Overview Manual. - You can also reference the - "Building Images" - section in the Yocto Project Quick Start. @@ -757,14 +763,30 @@ Initialize the Build Environment: Initialize the build environment by sourcing the build environment script (i.e. - &OE_INIT_FILE;). + &OE_INIT_FILE;): + + $ source &OE_INIT_FILE; [build_dir] + + + When you use the initialization script, the + OpenEmbedded build system uses build as + the default Build Directory in your current work directory. + You can use a build_dir argument + with the script to specify a different build directory. + Tip + A common practice is to use a different Build Directory for + different targets. + For example, ~/build/x86 for a + qemux86 target, and + ~/build/arm for a + qemuarm target. + Make Sure Your local.conf File is Correct: Ensure the conf/local.conf configuration - file, which is found in the - Build Directory, + file, which is found in the Build Directory, is set up how you want it. This file defines many aspects of the build environment including the target machine architecture through the @@ -772,18 +794,100 @@ the packaging format used during the build (PACKAGE_CLASSES), and a centralized tarball download directory through the - DL_DIR variable. + DL_DIR variable. Build the Image: - Build the image using the bitbake command. - For example, the following command builds the + Build the image using the bitbake command: + + $ bitbake target + + + For information on BitBake, see the + BitBake User Manual. + + The target is the name of the + recipe you want to build. + Common targets are the images in + meta/recipes-core/images, + meta/recipes-sato/images, etc. all found + in the + Source Directory. + Or, the target can be the name of a recipe for a specific + piece of software such as BusyBox. + For more details about the images the OpenEmbedded build + system supports, see the + "Images" + chapter in the Yocto Project Reference Manual. + + As an example, the following command builds the core-image-minimal image: $ bitbake core-image-minimal - For information on BitBake, see the - BitBake User Manual. + Once an image has been built, it often needs to be installed. + The images and kernels built by the OpenEmbedded build system + are placed in the Build Directory in + tmp/deploy/images. + For information on how to run pre-built images such as + qemux86 and qemuarm, + see the + Yocto Project Application Development and the Extensible Software Development Kit (eSDK) + manual. + For information about how to install these images, see the + documentation for your particular board or machine. + Build Notes + + + If you experience a build error due to resources + temporarily being unavailable and it appears you + should not be having this issue, it might be due + to the combination of a 4.3+ Linux kernel and + systemd version 228+ + (i.e. see this + link + for information). + + To work around this issue, you can try either + of the following: + + + Try the build again. + + + Modify the "DefaultTasksMax" + systemd parameter + by uncommenting it and setting it to + "infinity". + You can find this parameter in the + system.conf file + located in + /etc/systemd + on most systems. + + + + + Building an image without GNU General Public + License Version 3 (GPLv3), or similarly licensed, + components is supported for only minimal and + base images. + See the + "Images" + chapter in the Yocto Project Reference Manual + for more information. + + + When building an image using GPL components, + you need to maintain your original settings and + not switch back and forth applying different + versions of the GNU General Public License. + If you rebuild using different versions of GPL, + dependency errors might occur due to some components + not being rebuilt. + + + diff --git a/documentation/ref-manual/figures/building-an-image.png b/documentation/ref-manual/figures/building-an-image.png deleted file mode 100755 index 1fbea5ab00..0000000000 Binary files a/documentation/ref-manual/figures/building-an-image.png and /dev/null differ diff --git a/documentation/ref-manual/usingpoky.xml b/documentation/ref-manual/usingpoky.xml index 73b5df88dd..bfca60a99b 100644 --- a/documentation/ref-manual/usingpoky.xml +++ b/documentation/ref-manual/usingpoky.xml @@ -11,147 +11,6 @@ documentation set provide more details on how to use the Yocto Project. -
- Running a Build - - - This section provides a summary of the build process and provides information - for less obvious aspects of the build process. - For general information on how to build an image using the OpenEmbedded build - system, see the - "Building Images" - section of the Yocto Project Quick Start. - - -
- Build Overview - - - In the development environment you will need to build an image whenever you change hardware - support, add or change system libraries, or add or change services that have dependencies. - - - - - - - - Building an Image - - - - - The first thing you need to do is set up the OpenEmbedded build - environment by sourcing the environment setup script - (i.e. - &OE_INIT_FILE;). - Here is an example: - - $ source &OE_INIT_FILE; [build_dir] - - - - - The build_dir argument is optional and specifies the directory the - OpenEmbedded build system uses for the build - - the - Build Directory. - If you do not specify a Build Directory, it defaults to a directory - named build in your current working directory. - A common practice is to use a different Build Directory for different targets. - For example, ~/build/x86 for a qemux86 - target, and ~/build/arm for a qemuarm target. - - - - Once the build environment is set up, you can build a target using: - - $ bitbake target - - - - If you experience a build error due to resources - temporarily being unavailable and it appears you - should not be having this issue, it might be due - to the combination of a 4.3+ Linux kernel and - systemd version 228+ - (i.e. see this - link - for information). - - - - To work around this issue, you can try either - of the following: - - - Try the build again. - - - Modify the "DefaultTasksMax" - systemd parameter - by uncommenting it and setting it to - "infinity". - You can find this parameter in the - system.conf file - located in - /etc/systemd - on most systems. - - - - - - - - The target is the name of the recipe you want to build. - Common targets are the images in meta/recipes-core/images, - meta/recipes-sato/images, etc. all found in the - Source Directory. - Or, the target can be the name of a recipe for a specific piece of software such as - BusyBox. - For more details about the images the OpenEmbedded build system supports, see the - "Images" chapter. - - - - Building an image without GNU General Public License Version - 3 (GPLv3), or similarly licensed, components is supported for - only minimal and base images. - See the "Images" chapter for more information. - -
- -
- Building an Image Using GPL Components - - - When building an image using GPL components, you need to maintain your original - settings and not switch back and forth applying different versions of the GNU - General Public License. - If you rebuild using different versions of GPL, dependency errors might occur - due to some components not being rebuilt. - -
-
- -
- Installing and Using the Result - - - Once an image has been built, it often needs to be installed. - The images and kernels built by the OpenEmbedded build system are placed in the - Build Directory in - tmp/deploy/images. - For information on how to run pre-built images such as qemux86 - and qemuarm, see the - Yocto Project Application Development and the Extensible Software Development Kit (eSDK) - manual. - For information about how to install these images, see the documentation for your - particular board or machine. - -
-
Debugging Tools and Techniques -- cgit v1.2.3-54-g00ecf