SlideShare a Scribd company logo
Yocto Project Introduction
2015
issue.hsu@gmail.com
Outline
• What is Yocto Project
• Yocto Project Workflow
• References
2
What is Yocto Project
3
What is Yocto Project
• Overview
• Components
• Yocto Project VS OpenEmbedded
• Concept
4
Overview
• Yocto Project = Poky + Tools + Upstreams
5
Components
• Poky = BitBake + metadata
– Poky: reference build system used by the Yocto Project. It is a collection
of projects and tools, used to bootstrap a new distribution based on the
Yocto Project
– BitBake: the build engine. It is a task scheduler, like make. It interprets
configuration files and recipes (also called metadata) to perform a set of
tasks, to download, configure and build specified packages and
filesystem images
– Metadata: task configurations and definitions
• Metadata = configuration (.conf) + classes (.bbclass) + recipes
(.bb)
• OpenEmbedded Core
– a set of base layers. It is a set of recipes, layers and classes which are
shared between all OpenEmbedded based systems
6
Components
• Sub-Projects
– Hob: graphical user interface for BitBake
– Application Development Toolkit (ADT): development
environment for user-space applications to run on OS stacks built
by Poky
– Eclipse IDE Plugin: integration of ADT into the Eclipse IDE
– EGLIBC: embedded variant of the GNU C Library
– Matchbox: X windows-based open source graphical UI for
embedded devices
– Autobuilder: automation for Yocto Project build tests and QA
– Build Appliance: virtual machine image to try out the Yocto
Project and Poky
– Pseudo: system administrator simulation environment
– Swabber: host leakage detection tool 7
Yocto Project VS OpenEmbedded
• OpenEmbedded is an Open Source Project providing a
Build Framework for Embedded Linux Systems
– Not a reference distribution
– Designed to be the foundation for others
– Large library of recipes to cross-compile over 1000 packages
• The Yocto Project is focused on enabling Commercial
Product Development
– Provides a reference distribution policy and root file system
blueprints for building Linux OS stacks
– Co-maintains OpenEmbedded components and improves their
quality
– Provides additional tooling such as Autobuilder and QA Tests
– Provides tools for application development such as ADT and
Eclipse Plugin
8
Key Concept
• Bitbake will generate what you need according to the recipes
– 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, including:
• Where to obtain the upstream sources and which patches to apply
• Dependencies (on libraries or other recipes)
• Configuration/compilation options
• Define what files go into what output packages
9
Yocto Project Workflow
10
Overview of Yocto Project Workflow
11
Yocto Project Workflow Configurations
• $ source oe-init-build-env [build_dir]
• $ build_dir> bitbake <target>
12
Configuration
• User Configuration
– conf/local.conf – some things to set:
– Parallelism Options: Controlled by the
BB_NUMBER_THREADS, PARALLEL_MAKE, and
BB_NUMBER_PARSE_THREADS variables
– Target Machine Selection: Controlled by the MACHINE
variable
– Download Directory: Controlled by the DL_DIR variable
– Shared State Directory: Controlled by the SSTATE_DIR
variable
– Build Output: Controlled by the TMPDIR variable
13
Configuration
• Metadata and Patches:
– Recipes for building packages
– Eg, meta/recipes-core/coreutils/coreutils_6.9.bb builds
the core utilities (version 6.9) and installs them
– meta/recipes-core/coreutils/coreutils-6.9/ includes
patches, also could include extra files to install
– Can be extended and enhanced via “layers”
– Software layers contain user-supplied recipe files,
patches, and append files
14
Configuration
• BSPs and Machine Configurations:
– Configuration files to describe a machine
• Processor/SOC tuning files
– May include Linux kernel enhancements
– Includes board specific kernel configuration
– Machine specific package modifications
– BSP layers provide machine configurations
• conf/machine/machine.conf
• conf/layer.conf
• the layer is dedicated to specific recipes by function:
recipes-bsp, recipes-core, recipes-graphics, and recipes-
kernel
15
Configuration
– Machine settings are specified in a layer's
conf/machine/xxx.conf file(s)
• Sandy Bridge + Cougar Point
– meta-intel/conf/meta-
sugarbay/machine/sugarbay.conf
• Routerstation Pro (MIPS)
– meta-yocto-bsp/conf/machine/routerstationpro.conf
16
Configuration
• Policy Configurations:
– The distribution layer provides policy configurations
for your distribution
• classes: Class files (.bbclass) hold common
functionality that can be shared among recipes in the
distribution
• conf: This area holds configuration files for the layer
(conf/layer.conf), the distribution
(conf/distro/distro.conf), and any distribution-wide
include files
• recipes-*: Recipes and append files that affect common
functionality across the distribution. This area could
include recipes and append files to add distribution-
specific configuration, initialization scripts, custom
image recipes, and so forth
17
Yocto Project Layer
• Layers contain extensions and customizations to base system
– Can include image customizations, additional recipes, modifying recipes, adding
extra configuration
– Really just another directory to look for recipes or recipe extensions
– Added to the BBLAYERS variable in build/conf/bblayers.conf
• Layers are grouped by functional components
• Common Examples of Layers
– Custom Toolchains (compilers, debuggers, profiling tools, etc)
– Distribution specifications and customizations
– Functional areas (selinux, networking, etc)
– OSV components
– Project level changes
– BSP/Machine specific components
18
Configuration Layers expanded Figure
19
High-level Overview of Poky Task
Execution
• BitBake supports both _prepend and _append as a method of extending task functionality by
injecting code indicated by using prepend or append suffix into the beginning or end of a task.
20
Source Fetching
• Recipes call out location of all sources, whether on
the internet or local (Look for SRC_URI in *.bb files)
• Bitbake can get sources from git, svn, bzr, from
tarballs, and many, many more
• Versions of packages can be fixed or updated
automatically (Add SRCREV_pn- PN =
"${AUTOREV}” to local.conf)
• Yocto Project sources mirror available as a fallback,
if the sources move on the internet
21
Patching
• Once sources are obtained, the patches are
applied
• This is a good place to patch the software yourself
• However, we encourage you to contribute
development upstream whenever possible
22
Configuration/Compile
• Autoconf can be triggered automatically to ensure latest
libtool is used
DESCRIPTION = "GNU Helloworld application“
SECTION = "examples"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
PR = "r0"
SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"
inherit autotools gettext
• CFLAGS can be set
CFLAGS_prepend = "-I ${S}/include "
• Install task to set modes, permissions, target directories,
done by “pseudo”
do_install () {
oe_runmake install DESTDIR=${D} SBINDIR=${sbindir}
MANDIR=${mandir} }
23
Packaging
• The most popular package formats are supported: RPM,
Debian, and ipk
– Set PACKAGE_CLASSES in conf/local.conf
• You can split into multiple packages using PACKAGES
and FILES in a *.bb file
– PACKAGES =+ "sxpm cxpm"
– FILES_cxpm = "${bindir}/cxpm"
– FILES_sxpm = "${bindir}/sxpm"
24
Image Generation
• Images are constructed using the packages built earlier in
the process
• Uses for these images:
– Live Image to boot a device
– Root filesystem for QEMU emulator
– Sysroot for App development
• Yocto Project lets you customize your embedded Linux OS
25
ADT Generation
• Cross toolchain and installation script generated
• This can be used to set up an application developer’s
cross development environment to create apps
• MACHINE=qemuarm bitbake poky-image-sato-sdk meta-
toolchain package-index
• QEMU built for target architecture emulation
26
Preparing for Application Development
27
Running on QEMU
$ git clone http://git.yoctoproject.org/git/poky
$ cd poky
$ git checkout -b fido origin/fido
$ source oe-init-build-env
$ MACHINE=qemuarm bitbake core-image-sato
$ runqemu qemuarm core-image-sato
$ MACHINE=qemuarm64 runqemu /path/to/image.bin
/path/to/rootfs_image.ext4
28
Reference
https://www.yoctoproject.org/docs/curren
t/yocto-project-qs/yocto-project-qs.html
Setting up the App Developer
29
• Package
Repository
(networked or
local)
• Sysroot (Bootable Linux
filesystem tree with
development headers)
• Cross toolchain
installation (such as:
/opt/poky)
System Developer
Application Developer
Yocto Project helps set up
the embedded application
development
BSP Developer's Guide
https://www.yoctoproject.org/docs/curren
t/bsp-guide/bsp-guide.html
Application Developer's Guide
http://www.yoctoproject.org/docs/current/
adt-manual/adt-manual.html
Cross-Development Toolchain
Generation
30
gcc-cross to build
target image
gcc-crosssdk to
produce relocatable
sdk that executes on
SDKMACHINE
gcc-cross-canadian that
executes on SDKMACHINE
and produces target
applications
Building a Toolchain Installer
• $ MACHINE=qemuarm bitbake meta-toolchain [-c populate_sdk]
• When the bitbake command completes, the toolchain installer will be
in tmp/deploy/sdk
• By default, this toolchain does not build static binaries
– If you want to use the toolchain to build these types of libraries, you need to be
sure your image has the appropriate static development libraries
– Use the IMAGE_INSTALL variable inside your local.conf file to install the
appropriate library packages
– Following is an example using glibc static development libraries:
• IMAGE_INSTALL_append = " glibc-staticdev"
31
Reference:
http://www.yoctoproject.org/docs/1.8/adt-manual/adt-
manual.html#optionally-building-a-toolchain-installer
Using a Cross-Toolchain Tarball
• Get your toolchain installer using one of the following methods
– Get it from http://downloads.yoctoproject.org/releases/yocto/yocto-1.8/toolchain/
– Build your own toolchain installer, like previous page
• tmp/deploy/sdk/
• Once you have the installer, run it to install the toolchain
– $ tmp/deploy/sdk/poky-glibc-i686-meta-toolchain-armv5e-toolchain-1.8.sh
– The first thing the installer prompts you for is the directory into which you want to
install the toolchain
• The default directory used is /opt/poky/1.8
32
Reference:
http://www.yoctoproject.org/docs/1.8/adt-manual/adt-
manual.html#using-an-existing-toolchain-tarball
Setting Up the Cross-Development
Environment
• $ /opt/poky/1.8/environment-setup-x86_64-poky-linux
• When you run the setup script, many environment variables are
defined
33
Reference:
http://www.yoctoproject.org/docs/1.8/adt-manual/adt-
manual.html#setting-up-the-cross-development-environment
• SDKTARGETSYSROOT - The path to the sysroot used for cross-
compilation
• PKG_CONFIG_PATH - The path to the target pkg-config files
• CONFIG_SITE - A GNU autoconf site file preconfigured for the
target
• CC - The minimal command and arguments to run the C compiler
• CXX - The minimal command and arguments to run the C++
compiler
• CPP - The minimal command and arguments to run the C
preprocessor
• AS - The minimal command and arguments to run the assembler
• LD - The minimal command and arguments to run the linker
• GDB - The minimal command and arguments to run the GNU
Debugger
• STRIP - The minimal command and arguments to run 'strip', which
strips symbols
• RANLIB - The minimal command and arguments to run 'ranlib‘
• OBJCOPY - The minimal command and arguments to run 'objcopy‘
• OBJDUMP - The minimal command and arguments to run
'objdump‘
• AR - The minimal command and arguments to run 'ar‘
• NM - The minimal command and arguments to run 'nm‘
• TARGET_PREFIX - The toolchain binary prefix for the target tools
• CROSS_COMPILE - The toolchain binary prefix for the target tools
• CONFIGURE_FLAGS - The minimal arguments for GNU configure
• CFLAGS - Suggested C flags
• CXXFLAGS - Suggested C++ flags
• LDFLAGS - Suggested linker flags when you use CC to link
• CPPFLAGS - Suggested preprocessor flags
Using an External Toolchain
• The fundamental steps you need to accomplish are as follows:
– Understand where the installed toolchain resides. For cases where you need to
build the external toolchain, you would need to take separate steps to build and
install the toolchain.
– Make sure you add the layer that contains the toolchain to your bblayers.conf file
through the BBLAYERS variable.
– Set the EXTERNAL_TOOLCHAIN variable in your local.conf file to the location in
which you installed the toolchain.
• A good example of an external toolchain used with the Yocto Project
is Mentor Graphics® Sourcery G++ Toolchain
– You can see information on how to use that particular layer in the README file at
http://github.com/MentorEmbedded/meta-sourcery/
– You can find further information by reading about the TCMODE variable in the
Yocto Project Reference Manual's variable glossary
34
Reference:
http://www.yoctoproject.org/docs/1.8/adt-manual/adt-
manual.html#optionally-using-an-external-toolchain
Extracting the Root Filesystem
• Here are some cases where you need to extract the root filesystem:
– You want to boot the image using NFS
– You want to use the root filesystem as the target sysroot. For example, the Eclipse
IDE environment with the Eclipse Yocto Plug-in installed allows you to use QEMU
to boot under NFS
– You want to develop your target application using the root filesystem as the target
sysroot
• Following is an example
– $ source /opt/poky/1.8/environment-setup-i586-poky-linux
– $ runqemu-extract-sdk core-image-sato-sdk-qemux86-
2011091411831.rootfs.tar.bz2 $HOME/qemux86-sato
35
References
36
Reference Manuals
• Yocto Project Reference Manual
– http://www.yoctoproject.org/docs/current/ref-manual/ref-
manual.html
• Yocto Project Development Manual
– http://www.yoctoproject.org/docs/1.8/dev-manual/dev-
manual.html
• Bitbake
– http://www.yoctoproject.org/docs/1.8/bitbake-user-
manual/bitbake-user-manual.html
37
Trainings and Tutorials
• Yocto Training from Free Electrons
– http://free-electrons.com/doc/training/yocto/yocto-slides.pdf
– http://free-electrons.com/doc/training/yocto/yocto-labs.pdf
• Developer Day 2014 Materials
– http://www.yoctoproject.org/bulk/devday-eu-2014/ypdd14-hallinan-intro-lab.pdf
• The Yocto Project: Introducing devtool
– https://drive.google.com/file/d/0B3KGzY5fW7laTDVxUXo3UDRvd2s/view
– http://events.linuxfoundation.org/sites/events/files/slides/yocto_project_dev_workflow_elc_2015_0.pdf
• OpenEmbedded and Yocto introduction
– http://wiki.kaeilos.com/index.php/Setup_an_external_toolchain_with_Yocto
• http://10.19.133.152/wiki/doku.php?id=yocto
• http://www.crashcourse.ca/wiki/index.php/Yocto_FAQ
• Building your own recipes from first principles
– https://wiki.yoctoproject.org/wiki/Building_your_own_recipes_from_first_principles
38
External Toolchain Reference
• https://wiki.linaro.org/KenWerner/Sandbox/OpenEmbedded-Core
• https://git.linaro.org/openembedded/meta-linaro.git
• http://www.rocketboards.org/foswiki/Documentation/YoctoDoraBuild
WithMetaAltera
• http://wiki.kaeilos.com/index.php/Setup_an_external_toolchain_with_
Yocto
• https://developer.ridgerun.com/wiki/index.php?title=Yocto_RR_SDK_I
ntegration
• http://elinux.org/images/c/c8/ExternalToolchainsInYocto.pdf
39
Modify Toolchain Options
• Toolchain component versions
– poky/meta/conf/distro/
• TCMODE
• TCLIBC
• GCCVERSION
• BINUVERSION
• GDBVERSION
• GLIBCVERSION
• Target machine options
– poky/meta/conf/macine/
• DEFAULTTUNE
• TUNEVALID
• AVAILTUNES
• TUNE_FEATURES
40
Other Important Variables
• Other define variables
– poky/meta/conf/documentation.conf
• SELECTED_OPTIMIZATION
• FULL_OPTIMIZATION
• BUILD_OPTIMIZATION
• OVERRIDES
– http://www.yoctoproject.org/docs/latest/bitbake-user-manual/bitbake-user-
manual.html#conditional-syntax-overrides
– http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#ref-
varlocality
– http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#ref-
variables-glos
– http://www.embeddedlinux.org.cn/OEManual/recipes_directories.html
41
Built Toolchains
• Glibc @sanji
– meta-toolchain @ branch master
• armv5+gcc-4.9 / armv5+gcc-5.2 ok
• arm64+gcc-5.2 ok
• armv7a+gcc-5.2 ok
• Uclibc @yacc
– meta-toolchain @ branch master
• armv5+gcc-4.9 / armv5+gcc-5.2 ok
• Musl @usopp
– Have to add meta-musl layer. git clone https://github.com/kraj/meta-musl
– meta-toolchain @ master
• armv5+gcc-4.9 / armv5+gcc-5.2 ok
• arm64+gcc-5.2 ok
• armv7a+gcc-5.2 ok
42
Built Images
• Glibc @sanji
– core-image-sato @ branch master
• armv5+gcc-4.9 / armv5+gcc-5.2 ok
• arm64+gcc-5.2 ok
• armv7a+gcc-5.2 ok
• Uclibc @yacc
– core-image-minimal @ branch master
• armv5+gcc-4.9 / armv5+gcc-5.2 ok
• Musl @usopp
– Have to add meta-musl layer. git clone https://github.com/kraj/meta-musl
– core-image-minimal @ master
• armv5+gcc-5.2 ok
• arm64+gcc-5.2 ok
• armv7a+gcc-5.2 ok
• runqemu
– Both armv5 and arm64 core-image-minimal build with glibc gcc-4.9/gcc-5.2 can boot with
qemu
– uclibc/musl and armv7 core-image-minimal are failed to boot the kernel
43
Speed up the build
• http://stackoverflow.com/questions/18074979/methods-for-speeding-
up-build-time-in-a-project-using-bitbake
• http://www.yoctoproject.org/docs/latest/ref-manual/ref-
manual.html#speeding-up-the-build
44

More Related Content

What's hot

LCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted FirmwareLCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted Firmware
Linaro
 
BusyBox for Embedded Linux
BusyBox for Embedded LinuxBusyBox for Embedded Linux
BusyBox for Embedded Linux
Emertxe Information Technologies Pvt Ltd
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
SysPlay eLearning Academy for You
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
mukul bhardwaj
 
Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)
Thomas Petazzoni
 
Building Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 ArchBuilding Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 Arch
Sherif Mousa
 
U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
Emertxe Information Technologies Pvt Ltd
 
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Anne Nicolas
 
Programming Embedded linux
Programming Embedded linuxProgramming Embedded linux
Programming Embedded linux
Liran Ben Haim
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)
shimosawa
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
RuggedBoardGroup
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
Satpal Parmar
 
A practical guide to buildroot
A practical guide to buildrootA practical guide to buildroot
A practical guide to buildroot
Emertxe Information Technologies Pvt Ltd
 
Linux kernel
Linux kernelLinux kernel
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot)
Omkar Rane
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device Driver
Nanik Tolaram
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoC
Macpaul Lin
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom Board
Patrick Bellasi
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
Wave Digitech
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
shimosawa
 

What's hot (20)

LCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted FirmwareLCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted Firmware
 
BusyBox for Embedded Linux
BusyBox for Embedded LinuxBusyBox for Embedded Linux
BusyBox for Embedded Linux
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)
 
Building Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 ArchBuilding Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 Arch
 
U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
 
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
 
Programming Embedded linux
Programming Embedded linuxProgramming Embedded linux
Programming Embedded linux
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
A practical guide to buildroot
A practical guide to buildrootA practical guide to buildroot
A practical guide to buildroot
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot)
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device Driver
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoC
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom Board
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
 

Similar to Yocto Project introduction

Yocto Project : Custom Embedded Linux Distribution
Yocto Project : Custom Embedded Linux DistributionYocto Project : Custom Embedded Linux Distribution
Yocto Project : Custom Embedded Linux Distribution
emertxemarketing
 
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily JobLuca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
linuxlab_conf
 
Yocto: Training in English
Yocto: Training in EnglishYocto: Training in English
Yocto: Training in English
Otavio Salvador
 
The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project
 The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project
The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project
Yoshitake Kobayashi
 
yocto_scale_handout-with-notes
yocto_scale_handout-with-notesyocto_scale_handout-with-notes
yocto_scale_handout-with-notes
Steve Arnold
 
Generating a Reproducible and Maintainable Embedded Linux Environment with Po...
Generating a Reproducible and Maintainable Embedded Linux Environment with Po...Generating a Reproducible and Maintainable Embedded Linux Environment with Po...
Generating a Reproducible and Maintainable Embedded Linux Environment with Po...
LF Events
 
Stefano Cordibella - An introduction to Yocto Project
Stefano Cordibella - An introduction to Yocto ProjectStefano Cordibella - An introduction to Yocto Project
Stefano Cordibella - An introduction to Yocto Project
linuxlab_conf
 
Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...
Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...
Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...
melbats
 
OpenEmbedded & BitBake - Denx
OpenEmbedded & BitBake - DenxOpenEmbedded & BitBake - Denx
OpenEmbedded & BitBake - Denx
yang firo
 
Building Embedded Linux UDOONEO
Building Embedded Linux UDOONEOBuilding Embedded Linux UDOONEO
Building Embedded Linux UDOONEO
NEEVEE Technologies
 
DevOps: Arquitectura, Estrategia y Modelo
DevOps: Arquitectura, Estrategia y ModeloDevOps: Arquitectura, Estrategia y Modelo
DevOps: Arquitectura, Estrategia y Modelo
SUSE España
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2
Qualcomm Developer Network
 
Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018
Mender.io
 
OpenEmbedded
OpenEmbeddedOpenEmbedded
OpenEmbedded
Scott Garman
 
Yocto Project Kernel Lab, Hands-On
Yocto Project Kernel Lab, Hands-OnYocto Project Kernel Lab, Hands-On
Yocto Project Kernel Lab, Hands-On
Trevor Woerner
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
php-user-group-minsk
 
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Max Romanovsky
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Indrajit Poddar
 
Princeton RSE Peer network first meeting
Princeton RSE Peer network first meetingPrinceton RSE Peer network first meeting
Princeton RSE Peer network first meeting
Henry Schreiner
 
Building Emmbedded Linux with Yocto project
Building Emmbedded Linux with Yocto projectBuilding Emmbedded Linux with Yocto project
Building Emmbedded Linux with Yocto project
twcoimbatore
 

Similar to Yocto Project introduction (20)

Yocto Project : Custom Embedded Linux Distribution
Yocto Project : Custom Embedded Linux DistributionYocto Project : Custom Embedded Linux Distribution
Yocto Project : Custom Embedded Linux Distribution
 
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily JobLuca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
 
Yocto: Training in English
Yocto: Training in EnglishYocto: Training in English
Yocto: Training in English
 
The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project
 The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project
The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project
 
yocto_scale_handout-with-notes
yocto_scale_handout-with-notesyocto_scale_handout-with-notes
yocto_scale_handout-with-notes
 
Generating a Reproducible and Maintainable Embedded Linux Environment with Po...
Generating a Reproducible and Maintainable Embedded Linux Environment with Po...Generating a Reproducible and Maintainable Embedded Linux Environment with Po...
Generating a Reproducible and Maintainable Embedded Linux Environment with Po...
 
Stefano Cordibella - An introduction to Yocto Project
Stefano Cordibella - An introduction to Yocto ProjectStefano Cordibella - An introduction to Yocto Project
Stefano Cordibella - An introduction to Yocto Project
 
Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...
Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...
Eclipse Con US 2013 - Buildroot Eclipse Bundle : A powerful IDE for Embedded ...
 
OpenEmbedded & BitBake - Denx
OpenEmbedded & BitBake - DenxOpenEmbedded & BitBake - Denx
OpenEmbedded & BitBake - Denx
 
Building Embedded Linux UDOONEO
Building Embedded Linux UDOONEOBuilding Embedded Linux UDOONEO
Building Embedded Linux UDOONEO
 
DevOps: Arquitectura, Estrategia y Modelo
DevOps: Arquitectura, Estrategia y ModeloDevOps: Arquitectura, Estrategia y Modelo
DevOps: Arquitectura, Estrategia y Modelo
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2
 
Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018
 
OpenEmbedded
OpenEmbeddedOpenEmbedded
OpenEmbedded
 
Yocto Project Kernel Lab, Hands-On
Yocto Project Kernel Lab, Hands-OnYocto Project Kernel Lab, Hands-On
Yocto Project Kernel Lab, Hands-On
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
 
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
 
Princeton RSE Peer network first meeting
Princeton RSE Peer network first meetingPrinceton RSE Peer network first meeting
Princeton RSE Peer network first meeting
 
Building Emmbedded Linux with Yocto project
Building Emmbedded Linux with Yocto projectBuilding Emmbedded Linux with Yocto project
Building Emmbedded Linux with Yocto project
 

More from Yi-Hsiu Hsu

Glow introduction
Glow introductionGlow introduction
Glow introduction
Yi-Hsiu Hsu
 
TensorRT survey
TensorRT surveyTensorRT survey
TensorRT survey
Yi-Hsiu Hsu
 
Understand more about C
Understand more about CUnderstand more about C
Understand more about C
Yi-Hsiu Hsu
 
Introduction to memory order consume
Introduction to memory order consumeIntroduction to memory order consume
Introduction to memory order consume
Yi-Hsiu Hsu
 
RISC-V Introduction
RISC-V IntroductionRISC-V Introduction
RISC-V Introduction
Yi-Hsiu Hsu
 
Memory model
Memory modelMemory model
Memory model
Yi-Hsiu Hsu
 
GCC for ARMv8 Aarch64
GCC for ARMv8 Aarch64GCC for ARMv8 Aarch64
GCC for ARMv8 Aarch64
Yi-Hsiu Hsu
 
Introduction to armv8 aarch64
Introduction to armv8 aarch64Introduction to armv8 aarch64
Introduction to armv8 aarch64
Yi-Hsiu Hsu
 

More from Yi-Hsiu Hsu (8)

Glow introduction
Glow introductionGlow introduction
Glow introduction
 
TensorRT survey
TensorRT surveyTensorRT survey
TensorRT survey
 
Understand more about C
Understand more about CUnderstand more about C
Understand more about C
 
Introduction to memory order consume
Introduction to memory order consumeIntroduction to memory order consume
Introduction to memory order consume
 
RISC-V Introduction
RISC-V IntroductionRISC-V Introduction
RISC-V Introduction
 
Memory model
Memory modelMemory model
Memory model
 
GCC for ARMv8 Aarch64
GCC for ARMv8 Aarch64GCC for ARMv8 Aarch64
GCC for ARMv8 Aarch64
 
Introduction to armv8 aarch64
Introduction to armv8 aarch64Introduction to armv8 aarch64
Introduction to armv8 aarch64
 

Recently uploaded

Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Codeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdfCodeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdf
Semiosis Software Private Limited
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 

Recently uploaded (20)

Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Codeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdfCodeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdf
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 

Yocto Project introduction

  • 2. Outline • What is Yocto Project • Yocto Project Workflow • References 2
  • 3. What is Yocto Project 3
  • 4. What is Yocto Project • Overview • Components • Yocto Project VS OpenEmbedded • Concept 4
  • 5. Overview • Yocto Project = Poky + Tools + Upstreams 5
  • 6. Components • Poky = BitBake + metadata – Poky: reference build system used by the Yocto Project. It is a collection of projects and tools, used to bootstrap a new distribution based on the Yocto Project – BitBake: the build engine. It is a task scheduler, like make. It interprets configuration files and recipes (also called metadata) to perform a set of tasks, to download, configure and build specified packages and filesystem images – Metadata: task configurations and definitions • Metadata = configuration (.conf) + classes (.bbclass) + recipes (.bb) • OpenEmbedded Core – a set of base layers. It is a set of recipes, layers and classes which are shared between all OpenEmbedded based systems 6
  • 7. Components • Sub-Projects – Hob: graphical user interface for BitBake – Application Development Toolkit (ADT): development environment for user-space applications to run on OS stacks built by Poky – Eclipse IDE Plugin: integration of ADT into the Eclipse IDE – EGLIBC: embedded variant of the GNU C Library – Matchbox: X windows-based open source graphical UI for embedded devices – Autobuilder: automation for Yocto Project build tests and QA – Build Appliance: virtual machine image to try out the Yocto Project and Poky – Pseudo: system administrator simulation environment – Swabber: host leakage detection tool 7
  • 8. Yocto Project VS OpenEmbedded • OpenEmbedded is an Open Source Project providing a Build Framework for Embedded Linux Systems – Not a reference distribution – Designed to be the foundation for others – Large library of recipes to cross-compile over 1000 packages • The Yocto Project is focused on enabling Commercial Product Development – Provides a reference distribution policy and root file system blueprints for building Linux OS stacks – Co-maintains OpenEmbedded components and improves their quality – Provides additional tooling such as Autobuilder and QA Tests – Provides tools for application development such as ADT and Eclipse Plugin 8
  • 9. Key Concept • Bitbake will generate what you need according to the recipes – 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, including: • Where to obtain the upstream sources and which patches to apply • Dependencies (on libraries or other recipes) • Configuration/compilation options • Define what files go into what output packages 9
  • 11. Overview of Yocto Project Workflow 11
  • 12. Yocto Project Workflow Configurations • $ source oe-init-build-env [build_dir] • $ build_dir> bitbake <target> 12
  • 13. Configuration • User Configuration – conf/local.conf – some things to set: – Parallelism Options: Controlled by the BB_NUMBER_THREADS, PARALLEL_MAKE, and BB_NUMBER_PARSE_THREADS variables – Target Machine Selection: Controlled by the MACHINE variable – Download Directory: Controlled by the DL_DIR variable – Shared State Directory: Controlled by the SSTATE_DIR variable – Build Output: Controlled by the TMPDIR variable 13
  • 14. Configuration • Metadata and Patches: – Recipes for building packages – Eg, meta/recipes-core/coreutils/coreutils_6.9.bb builds the core utilities (version 6.9) and installs them – meta/recipes-core/coreutils/coreutils-6.9/ includes patches, also could include extra files to install – Can be extended and enhanced via “layers” – Software layers contain user-supplied recipe files, patches, and append files 14
  • 15. Configuration • BSPs and Machine Configurations: – Configuration files to describe a machine • Processor/SOC tuning files – May include Linux kernel enhancements – Includes board specific kernel configuration – Machine specific package modifications – BSP layers provide machine configurations • conf/machine/machine.conf • conf/layer.conf • the layer is dedicated to specific recipes by function: recipes-bsp, recipes-core, recipes-graphics, and recipes- kernel 15
  • 16. Configuration – Machine settings are specified in a layer's conf/machine/xxx.conf file(s) • Sandy Bridge + Cougar Point – meta-intel/conf/meta- sugarbay/machine/sugarbay.conf • Routerstation Pro (MIPS) – meta-yocto-bsp/conf/machine/routerstationpro.conf 16
  • 17. Configuration • Policy Configurations: – The distribution layer provides policy configurations for your distribution • classes: Class files (.bbclass) hold common functionality that can be shared among recipes in the distribution • conf: This area holds configuration files for the layer (conf/layer.conf), the distribution (conf/distro/distro.conf), and any distribution-wide include files • recipes-*: Recipes and append files that affect common functionality across the distribution. This area could include recipes and append files to add distribution- specific configuration, initialization scripts, custom image recipes, and so forth 17
  • 18. Yocto Project Layer • Layers contain extensions and customizations to base system – Can include image customizations, additional recipes, modifying recipes, adding extra configuration – Really just another directory to look for recipes or recipe extensions – Added to the BBLAYERS variable in build/conf/bblayers.conf • Layers are grouped by functional components • Common Examples of Layers – Custom Toolchains (compilers, debuggers, profiling tools, etc) – Distribution specifications and customizations – Functional areas (selinux, networking, etc) – OSV components – Project level changes – BSP/Machine specific components 18
  • 20. High-level Overview of Poky Task Execution • BitBake supports both _prepend and _append as a method of extending task functionality by injecting code indicated by using prepend or append suffix into the beginning or end of a task. 20
  • 21. Source Fetching • Recipes call out location of all sources, whether on the internet or local (Look for SRC_URI in *.bb files) • Bitbake can get sources from git, svn, bzr, from tarballs, and many, many more • Versions of packages can be fixed or updated automatically (Add SRCREV_pn- PN = "${AUTOREV}” to local.conf) • Yocto Project sources mirror available as a fallback, if the sources move on the internet 21
  • 22. Patching • Once sources are obtained, the patches are applied • This is a good place to patch the software yourself • However, we encourage you to contribute development upstream whenever possible 22
  • 23. Configuration/Compile • Autoconf can be triggered automatically to ensure latest libtool is used DESCRIPTION = "GNU Helloworld application“ SECTION = "examples" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" PR = "r0" SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.gz" inherit autotools gettext • CFLAGS can be set CFLAGS_prepend = "-I ${S}/include " • Install task to set modes, permissions, target directories, done by “pseudo” do_install () { oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} } 23
  • 24. Packaging • The most popular package formats are supported: RPM, Debian, and ipk – Set PACKAGE_CLASSES in conf/local.conf • You can split into multiple packages using PACKAGES and FILES in a *.bb file – PACKAGES =+ "sxpm cxpm" – FILES_cxpm = "${bindir}/cxpm" – FILES_sxpm = "${bindir}/sxpm" 24
  • 25. Image Generation • Images are constructed using the packages built earlier in the process • Uses for these images: – Live Image to boot a device – Root filesystem for QEMU emulator – Sysroot for App development • Yocto Project lets you customize your embedded Linux OS 25
  • 26. ADT Generation • Cross toolchain and installation script generated • This can be used to set up an application developer’s cross development environment to create apps • MACHINE=qemuarm bitbake poky-image-sato-sdk meta- toolchain package-index • QEMU built for target architecture emulation 26
  • 27. Preparing for Application Development 27
  • 28. Running on QEMU $ git clone http://git.yoctoproject.org/git/poky $ cd poky $ git checkout -b fido origin/fido $ source oe-init-build-env $ MACHINE=qemuarm bitbake core-image-sato $ runqemu qemuarm core-image-sato $ MACHINE=qemuarm64 runqemu /path/to/image.bin /path/to/rootfs_image.ext4 28 Reference https://www.yoctoproject.org/docs/curren t/yocto-project-qs/yocto-project-qs.html
  • 29. Setting up the App Developer 29 • Package Repository (networked or local) • Sysroot (Bootable Linux filesystem tree with development headers) • Cross toolchain installation (such as: /opt/poky) System Developer Application Developer Yocto Project helps set up the embedded application development BSP Developer's Guide https://www.yoctoproject.org/docs/curren t/bsp-guide/bsp-guide.html Application Developer's Guide http://www.yoctoproject.org/docs/current/ adt-manual/adt-manual.html
  • 30. Cross-Development Toolchain Generation 30 gcc-cross to build target image gcc-crosssdk to produce relocatable sdk that executes on SDKMACHINE gcc-cross-canadian that executes on SDKMACHINE and produces target applications
  • 31. Building a Toolchain Installer • $ MACHINE=qemuarm bitbake meta-toolchain [-c populate_sdk] • When the bitbake command completes, the toolchain installer will be in tmp/deploy/sdk • By default, this toolchain does not build static binaries – If you want to use the toolchain to build these types of libraries, you need to be sure your image has the appropriate static development libraries – Use the IMAGE_INSTALL variable inside your local.conf file to install the appropriate library packages – Following is an example using glibc static development libraries: • IMAGE_INSTALL_append = " glibc-staticdev" 31 Reference: http://www.yoctoproject.org/docs/1.8/adt-manual/adt- manual.html#optionally-building-a-toolchain-installer
  • 32. Using a Cross-Toolchain Tarball • Get your toolchain installer using one of the following methods – Get it from http://downloads.yoctoproject.org/releases/yocto/yocto-1.8/toolchain/ – Build your own toolchain installer, like previous page • tmp/deploy/sdk/ • Once you have the installer, run it to install the toolchain – $ tmp/deploy/sdk/poky-glibc-i686-meta-toolchain-armv5e-toolchain-1.8.sh – The first thing the installer prompts you for is the directory into which you want to install the toolchain • The default directory used is /opt/poky/1.8 32 Reference: http://www.yoctoproject.org/docs/1.8/adt-manual/adt- manual.html#using-an-existing-toolchain-tarball
  • 33. Setting Up the Cross-Development Environment • $ /opt/poky/1.8/environment-setup-x86_64-poky-linux • When you run the setup script, many environment variables are defined 33 Reference: http://www.yoctoproject.org/docs/1.8/adt-manual/adt- manual.html#setting-up-the-cross-development-environment • SDKTARGETSYSROOT - The path to the sysroot used for cross- compilation • PKG_CONFIG_PATH - The path to the target pkg-config files • CONFIG_SITE - A GNU autoconf site file preconfigured for the target • CC - The minimal command and arguments to run the C compiler • CXX - The minimal command and arguments to run the C++ compiler • CPP - The minimal command and arguments to run the C preprocessor • AS - The minimal command and arguments to run the assembler • LD - The minimal command and arguments to run the linker • GDB - The minimal command and arguments to run the GNU Debugger • STRIP - The minimal command and arguments to run 'strip', which strips symbols • RANLIB - The minimal command and arguments to run 'ranlib‘ • OBJCOPY - The minimal command and arguments to run 'objcopy‘ • OBJDUMP - The minimal command and arguments to run 'objdump‘ • AR - The minimal command and arguments to run 'ar‘ • NM - The minimal command and arguments to run 'nm‘ • TARGET_PREFIX - The toolchain binary prefix for the target tools • CROSS_COMPILE - The toolchain binary prefix for the target tools • CONFIGURE_FLAGS - The minimal arguments for GNU configure • CFLAGS - Suggested C flags • CXXFLAGS - Suggested C++ flags • LDFLAGS - Suggested linker flags when you use CC to link • CPPFLAGS - Suggested preprocessor flags
  • 34. Using an External Toolchain • The fundamental steps you need to accomplish are as follows: – Understand where the installed toolchain resides. For cases where you need to build the external toolchain, you would need to take separate steps to build and install the toolchain. – Make sure you add the layer that contains the toolchain to your bblayers.conf file through the BBLAYERS variable. – Set the EXTERNAL_TOOLCHAIN variable in your local.conf file to the location in which you installed the toolchain. • A good example of an external toolchain used with the Yocto Project is Mentor Graphics® Sourcery G++ Toolchain – You can see information on how to use that particular layer in the README file at http://github.com/MentorEmbedded/meta-sourcery/ – You can find further information by reading about the TCMODE variable in the Yocto Project Reference Manual's variable glossary 34 Reference: http://www.yoctoproject.org/docs/1.8/adt-manual/adt- manual.html#optionally-using-an-external-toolchain
  • 35. Extracting the Root Filesystem • Here are some cases where you need to extract the root filesystem: – You want to boot the image using NFS – You want to use the root filesystem as the target sysroot. For example, the Eclipse IDE environment with the Eclipse Yocto Plug-in installed allows you to use QEMU to boot under NFS – You want to develop your target application using the root filesystem as the target sysroot • Following is an example – $ source /opt/poky/1.8/environment-setup-i586-poky-linux – $ runqemu-extract-sdk core-image-sato-sdk-qemux86- 2011091411831.rootfs.tar.bz2 $HOME/qemux86-sato 35
  • 37. Reference Manuals • Yocto Project Reference Manual – http://www.yoctoproject.org/docs/current/ref-manual/ref- manual.html • Yocto Project Development Manual – http://www.yoctoproject.org/docs/1.8/dev-manual/dev- manual.html • Bitbake – http://www.yoctoproject.org/docs/1.8/bitbake-user- manual/bitbake-user-manual.html 37
  • 38. Trainings and Tutorials • Yocto Training from Free Electrons – http://free-electrons.com/doc/training/yocto/yocto-slides.pdf – http://free-electrons.com/doc/training/yocto/yocto-labs.pdf • Developer Day 2014 Materials – http://www.yoctoproject.org/bulk/devday-eu-2014/ypdd14-hallinan-intro-lab.pdf • The Yocto Project: Introducing devtool – https://drive.google.com/file/d/0B3KGzY5fW7laTDVxUXo3UDRvd2s/view – http://events.linuxfoundation.org/sites/events/files/slides/yocto_project_dev_workflow_elc_2015_0.pdf • OpenEmbedded and Yocto introduction – http://wiki.kaeilos.com/index.php/Setup_an_external_toolchain_with_Yocto • http://10.19.133.152/wiki/doku.php?id=yocto • http://www.crashcourse.ca/wiki/index.php/Yocto_FAQ • Building your own recipes from first principles – https://wiki.yoctoproject.org/wiki/Building_your_own_recipes_from_first_principles 38
  • 39. External Toolchain Reference • https://wiki.linaro.org/KenWerner/Sandbox/OpenEmbedded-Core • https://git.linaro.org/openembedded/meta-linaro.git • http://www.rocketboards.org/foswiki/Documentation/YoctoDoraBuild WithMetaAltera • http://wiki.kaeilos.com/index.php/Setup_an_external_toolchain_with_ Yocto • https://developer.ridgerun.com/wiki/index.php?title=Yocto_RR_SDK_I ntegration • http://elinux.org/images/c/c8/ExternalToolchainsInYocto.pdf 39
  • 40. Modify Toolchain Options • Toolchain component versions – poky/meta/conf/distro/ • TCMODE • TCLIBC • GCCVERSION • BINUVERSION • GDBVERSION • GLIBCVERSION • Target machine options – poky/meta/conf/macine/ • DEFAULTTUNE • TUNEVALID • AVAILTUNES • TUNE_FEATURES 40
  • 41. Other Important Variables • Other define variables – poky/meta/conf/documentation.conf • SELECTED_OPTIMIZATION • FULL_OPTIMIZATION • BUILD_OPTIMIZATION • OVERRIDES – http://www.yoctoproject.org/docs/latest/bitbake-user-manual/bitbake-user- manual.html#conditional-syntax-overrides – http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#ref- varlocality – http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#ref- variables-glos – http://www.embeddedlinux.org.cn/OEManual/recipes_directories.html 41
  • 42. Built Toolchains • Glibc @sanji – meta-toolchain @ branch master • armv5+gcc-4.9 / armv5+gcc-5.2 ok • arm64+gcc-5.2 ok • armv7a+gcc-5.2 ok • Uclibc @yacc – meta-toolchain @ branch master • armv5+gcc-4.9 / armv5+gcc-5.2 ok • Musl @usopp – Have to add meta-musl layer. git clone https://github.com/kraj/meta-musl – meta-toolchain @ master • armv5+gcc-4.9 / armv5+gcc-5.2 ok • arm64+gcc-5.2 ok • armv7a+gcc-5.2 ok 42
  • 43. Built Images • Glibc @sanji – core-image-sato @ branch master • armv5+gcc-4.9 / armv5+gcc-5.2 ok • arm64+gcc-5.2 ok • armv7a+gcc-5.2 ok • Uclibc @yacc – core-image-minimal @ branch master • armv5+gcc-4.9 / armv5+gcc-5.2 ok • Musl @usopp – Have to add meta-musl layer. git clone https://github.com/kraj/meta-musl – core-image-minimal @ master • armv5+gcc-5.2 ok • arm64+gcc-5.2 ok • armv7a+gcc-5.2 ok • runqemu – Both armv5 and arm64 core-image-minimal build with glibc gcc-4.9/gcc-5.2 can boot with qemu – uclibc/musl and armv7 core-image-minimal are failed to boot the kernel 43
  • 44. Speed up the build • http://stackoverflow.com/questions/18074979/methods-for-speeding- up-build-time-in-a-project-using-bitbake • http://www.yoctoproject.org/docs/latest/ref-manual/ref- manual.html#speeding-up-the-build 44