Lecture04_ConfigurationAndBuildProcess
Lecture04_ConfigurationAndBuildProcess
Introduction
The workflow
The build systems
Yocto
Introduction
The workflow
The build systems
Yocto
Introduction
The workflow
The build systems
Yocto
System
programs
binary
Introduction
The workflow
The build systems
Yocto
Open-source build systems, among which the most popular are Yocto and Buildroot
• Very actively maintained and developed projects
• Widely used in the industry
• Built from scratch from source toolchain, bootloaders, kernel, and root file system
Buildroot Yocto
• Focus on simplicity • Provides core recipes and use layers to get support
for more packages and more machines
• Use existing technologies: kconfig, make
• Custom modifications should stay in a separate layer
• Open community
• Versatile build system: tries to be as flexible as
possible and to handle most use cases
• Open community but governed by the Yocto Project
Advisory Board
Buildroot reuses kconfig from the Linux In Yocto the configuration is separated in
kernel multiple parts:
• Entire configuration stored in a single • Distribution configuration (general configuration,
.config/defconfig toolchain selection, etc.)
• Defines all aspects of the system: architecture, • Machine configuration (defines the hw architecture,
kernel version/config, bootloaders, user-space hw features, BSP)
packages, etc.
• Image recipe (what system programs should be
• Building the same system for different machines to installed on the target)
be handled separately
• Local configuration (e.g., how many threads to use
when compiling, whether to remove build artifacts,
etc.)
• Allows to build the same image for different
machines or using different distributions or different
images for one machine
Introduction
The workflow
The build systems
Yocto
Yocto-specific layer
metadata (meta-yocto)
OpenEmbedded core
metadata (oe-core)
20 © 2017 Arm Limited
The Build System Workflow
Source: http://www.yoctoproject.org/docs/2.1/mega-manual/mega-manual.html
meta/conf/machine/include/tune-CPU-name.inc – CPU-specific
configuration
Machine configuration refers to kernel #@DESCRIPTION: Machine configuration for the RaspberryPi 3
include conf/machine/raspberrypi2.conf
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-gator"
Defines distribution policies that affect the way individual recipes are built
• May set alternative preferred versions of recipes
• May enable/disable features
• May configure specific package rules
• May adjust image deployment settings
Bitbake can get the sources from git, svn, bzr, or tarballs.
Versions of packages can be fixed or updated automatically
(Add SRCREV_pn-PN = “${AUTOREV}” to local.conf).
The Yocto Project mirrors sources to ensure source reliability.
Output Analysis
• Categorize generated software (debug, dev, docs, and
locales)
• Split runtime and debug information