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/dev-manual/dev-manual-start.xml | 134 +++++++++++++++++++++++--- 1 file changed, 119 insertions(+), 15 deletions(-) (limited to 'documentation/dev-manual/dev-manual-start.xml') 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. + + + -- cgit v1.2.3-54-g00ecf