2.3. Performing a Simple Build

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 Linux host.

Notes

The build process creates an entire Linux distribution from source and places it in your Build Directory under tmp/deploy/images. For detailed information on the build process using BitBake, see the "Images" section in the Yocto Project Reference Manual. You can also reference the "Building Images" section in the Yocto Project Quick Start.

The following figure and list overviews the build process:

  1. Set up Your Host Development System to Support Development Using the Yocto Project: See the "Setting Up to Use the Yocto Project" section in the Yocto Project Quick Start for options on how to get a build host ready to use the Yocto Project.

  2. Initialize the Build Environment: Initialize the build environment by sourcing the build environment script (i.e. oe-init-build-env).

  3. Make Sure Your local.conf File is Correct: Ensure the conf/local.conf configuration 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 MACHINE variable, the packaging format used during the build (PACKAGE_CLASSES), and a centralized tarball download directory through the DL_DIR variable.

  4. Build the Image: Build the image using the bitbake command. For example, the following command builds the core-image-minimal image:

         $ bitbake core-image-minimal
                    

    For information on BitBake, see the BitBake User Manual.