The document provides an overview of the Yocto Project, which is an open-source initiative designed to help users create custom Linux-based systems for embedded devices. It details the project's components, including the build architecture, key concepts like recipes, and the workflow for developing with Yocto. Additionally, it emphasizes the benefits of using Yocto, such as software stack reuse and simplified hardware platform updates.
Introduction to Embedded Linux and Yocto, focusing on the agenda of the presentation.
Yocto is a collaborative project for creating custom Linux systems. It allows development across various architectures and simplifies updates in software stacks.
Overview of Yocto components including OpenEmbedded architecture, BitBake, metadata and recipes necessary for building Linux images.
Key concepts of Yocto including recipes which define how to build packages and an introduction to Yocto's workflow for building Linux images.
Mention of Yocto member organizations and introductory insights into working with Yocto for embedded Linux development.
Practical steps to download and set up Yocto, including directory structure for components such as BitBake and scripts.
Detailed information on writing recipes, managing configuration files, and understanding build steps in the Yocto Project.
Information about layers in Yocto, including Board Support Packages (BSP) that help support specific hardware platforms.
Useful links provided for quick start guides, manuals, and resources related to the Yocto Project.
Closing slide of the presentation providing the speaker's contact information.
Embedded Linux @Information Technology Institute 1
Embedded Linux
Yocto
Information Technology Institute
Sherif Mousa
2.
Embedded Linux @Information Technology Institute 2
Agenda
●
What is Yocto?
●
Why Yocto?
●
Yocto Project Overview
●
Yocto Key Concept (recipe)
●
Yocto Workflow
●
Yocto Member Organizations
●
Working with Yocto
3.
Embedded Linux @Information Technology Institute 3
What is Yocto?
It's not an embedded Linux distribution -
It creates a custom one for you.
●
www.yoctoproject.org
●
The Yocto Project is an open-source collaboration project. It
provides templates, tools and methods to help you create custom
Linux-based systems for embedded products regardless of
hardware architecture.
●
Yocto Project uses a build system based on the OpenEmbedded
(OE) project, which uses the BitBake tool, to construct complete
Linux images. The BitBake and OE components are combined
together to form Poky, a reference build system.
4.
Embedded Linux @Information Technology Institute 4
Why Yocto?
●
Develop using one common Linux OS for different
architectures.
●
Re-use your software stack with future devices.
●
Changing hardware platforms with updating just one line
in a config file and rebuild.
●
Base your work on a validated collection of software and
libraries.
Developers spend lots of time porting or making build systems, leaves
less time and resources to develop value-adding software features.
5.
Embedded Linux @Information Technology Institute 5
Yocto Project Overview
●
OpenEmbedded (OE) – The overall build architecture
used by the Yocto Project.
●
BitBake – Task executor and scheduler.
●
Metadata – Task definitions.
●
Configuration (*.conf) – global definitions of variables.
●
Classes (*.bbclass) – encapsulation and inheritance of
build logic, packaging, etc.
●
Recipes (*.bb) – the logical units of software/images to
build.
6.
Embedded Linux @Information Technology Institute 6
Yocto Project Overview (cont'd)
●
OpenEmbedded Core (oe-core) – A core set of
metadata shared by the OpenEmbedded and the
Yocto Project.
●
meta-yocto – Reference policy/distro configuration
and reference hardware support layer.
●
Poky – A pre-prepared combination of the build
system components needed; also the name of our
reference distro in meta-yocto
Poky = Bitbake + OE-core + meta-yocto + docs
7.
Embedded Linux @Information Technology Institute 7
Yocto Key Concept (recipe)
●
The Yocto Project provides tools and metadata for
creating custom Linux images.
●
These images are created from a repository of 'baked'
recipes.
●
A recipe is a set of instructions for building packages:
– Where to obtain the upstream sources and which patches to
apply
– Dependencies (on libraries or other recipes)
– Configuration/compilation options
– Define which files go into what output packages
8.
Embedded Linux @Information Technology Institute 8
Yocto Workflow
9.
Embedded Linux @Information Technology Institute 9
Yocto Member Organizations
10.
Embedded Linux @Information Technology Institute 10
Working with Yocto
11.
Embedded Linux @Information Technology Institute 11
Yocto First Shot
●
Download Yocto source
– All releases: http://downloads.yoctoproject.org/releases/yocto/
– Current final release: poky-dizzy-12.0.1.tar.bz2
●
Untar the downloaded file
$ tar xvf pokydizzy12.0.1.tar.bz2
●
Go inside the project directory: $ cd pokydizzy12.0.1
●
Source the poky default environment script
$ source oeinitbuildenv
●
Configure (if you want) your conf ile: $ vim conf/local.conf
●
Start the build process (and wait ….)
bitbake coreimageminimal
●
Run Qemu emulator with output image
runqemu qemux86
12.
Embedded Linux @Information Technology Institute 12
Poky Directory Structure
●
bitbake: the BitBake utility itself.
●
documentation: documentation sources.
●
scripts: various support scripts (e.g, runqemu)
●
meta/conf: important configuration files,
bitbake.conf, reference distro config, machine
configs for QEMU architectures.
●
meta/classes: BitBake classes.
●
meta/recipes-* : recipes for all packages & libs
13.
Embedded Linux @Information Technology Institute 13
Recipe Skeleton
●
Example of a recipe
SUMMARY = “”
DISCRIPTION = “”
HOMEPAGE = “”
LICENSE = “”
SRC_URI = “”
SRC_URI[md5sum] = “”
inherit stuff
don't edit the poky default recipes, but create
your own recipes & layers
14.
Embedded Linux @Information Technology Institute 14
Yocto Configuration Files
●
Build directory files
●
conf/bblayers.conf
– Contains locations for all layers needed for your build process.
BBLAYERS ?= "
/home/user/yocto/poky/metayocto ............
●
conf/local.conf
– Set your build options, choose target machine, add or remove features
from your build image
BB_NUMBER_THREADS = "threads"
PARALLEL_MAKE = "j threads"
MACHINE ?= "qemuarm"
DL_DIR ?= <downloaddirpath>
15.
Embedded Linux @Information Technology Institute 15
Recipe build steps
●
Building recipes involves executing the following
functions, which can be overridden when needed for
customizations.
– do_fetch
– do_unpack
– do_patch
– do_configure
– do_compile
– do_install
– do_package
16.
Embedded Linux @Information Technology Institute 16
Layers
●
The Yocto Project build system is composed of
layers.
●
A layer is a logical collection of recipes
representing the core, a Board Support
Package (BSP), or an application stack.
●
All layers have a priority and can override policy
and config settings of the layers beneath it.
17.
Embedded Linux @Information Technology Institute 17
Board Support Package (BSP)
●
BSPs are layers to enable support for specific
hardware platforms.
●
Defines machine configuration for the “board”.
●
Adds machine-specific recipes and
customizations.
– Kernel config
– Graphics drivers (e.g, Xorg)
– Additional recipes to support hardware features
18.
Embedded Linux @Information Technology Institute 18
Yocto Layers Stacking
Developers-Specific Layer
Commercial Layer
UI - Optional Layer
Hardware Specific BSP
Yocto Layer Metadata (meta-yocto)
OpenEmbedded Core Metadata (oe-core)
19.
Embedded Linux @Information Technology Institute 19
Useful Links
●
Yocto Project quick start guide
– yocto-project-qs
●
Bitbake user manual
– bitbake-user-manual
●
Yocto Project development manual
– dev-manual