SlideShare une entreprise Scribd logo
1  sur  44
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

Contenu connexe

Tendances

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 ArchSherif Mousa
 
Run Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using YoctoRun Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using YoctoMarco Cavallini
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequenceHoucheng Lin
 
Embedded Recipes 2017 - Introduction to Yocto Project/OpenEmbedded - Mylène J...
Embedded Recipes 2017 - Introduction to Yocto Project/OpenEmbedded - Mylène J...Embedded Recipes 2017 - Introduction to Yocto Project/OpenEmbedded - Mylène J...
Embedded Recipes 2017 - Introduction to Yocto Project/OpenEmbedded - Mylène J...Anne Nicolas
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal BootloaderSatpal Parmar
 
Jagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchJagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchlinuxlab_conf
 
Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_Linaro
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013Wave Digitech
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux SystemJian-Hong Pan
 
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 Projectlinuxlab_conf
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom BoardPatrick Bellasi
 
How Linux Processes Your Network Packet - Elazar Leibovich
How Linux Processes Your Network Packet - Elazar LeibovichHow Linux Processes Your Network Packet - Elazar Leibovich
How Linux Processes Your Network Packet - Elazar LeibovichDevOpsDays Tel Aviv
 
Debian or Yocto Project? Which is the best for your Embedded Linux project?
Debian or Yocto Project? Which is the best for your Embedded Linux project?Debian or Yocto Project? Which is the best for your Embedded Linux project?
Debian or Yocto Project? Which is the best for your Embedded Linux project?Chris Simmonds
 
Embedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoEmbedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoSherif Mousa
 
Linux Kernel Module - For NLKB
Linux Kernel Module - For NLKBLinux Kernel Module - For NLKB
Linux Kernel Module - For NLKBshimosawa
 

Tendances (20)

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
 
Run Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using YoctoRun Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using Yocto
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
 
Embedded Recipes 2017 - Introduction to Yocto Project/OpenEmbedded - Mylène J...
Embedded Recipes 2017 - Introduction to Yocto Project/OpenEmbedded - Mylène J...Embedded Recipes 2017 - Introduction to Yocto Project/OpenEmbedded - Mylène J...
Embedded Recipes 2017 - Introduction to Yocto Project/OpenEmbedded - Mylène J...
 
U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
Embedded Operating System - Linux
Embedded Operating System - LinuxEmbedded Operating System - Linux
Embedded Operating System - Linux
 
Jagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchJagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratch
 
Bootloaders
BootloadersBootloaders
Bootloaders
 
Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux System
 
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
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom Board
 
How Linux Processes Your Network Packet - Elazar Leibovich
How Linux Processes Your Network Packet - Elazar LeibovichHow Linux Processes Your Network Packet - Elazar Leibovich
How Linux Processes Your Network Packet - Elazar Leibovich
 
Debian or Yocto Project? Which is the best for your Embedded Linux project?
Debian or Yocto Project? Which is the best for your Embedded Linux project?Debian or Yocto Project? Which is the best for your Embedded Linux project?
Debian or Yocto Project? Which is the best for your Embedded Linux project?
 
Embedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoEmbedded Linux from Scratch to Yocto
Embedded Linux from Scratch to Yocto
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Linux Kernel Module - For NLKB
Linux Kernel Module - For NLKBLinux Kernel Module - For NLKB
Linux Kernel Module - For NLKB
 

Similaire à 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 Distributionemertxemarketing
 
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 Joblinuxlab_conf
 
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 ProjectYoshitake Kobayashi
 
yocto_scale_handout-with-notes
yocto_scale_handout-with-notesyocto_scale_handout-with-notes
yocto_scale_handout-with-notesSteve 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
 
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 - Denxyang firo
 
DevOps: Arquitectura, Estrategia y Modelo
DevOps: Arquitectura, Estrategia y ModeloDevOps: Arquitectura, Estrategia y Modelo
DevOps: Arquitectura, Estrategia y ModeloSUSE 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 2Qualcomm 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 2018Mender.io
 
Yocto Project Kernel Lab, Hands-On
Yocto Project Kernel Lab, Hands-OnYocto Project Kernel Lab, Hands-On
Yocto Project Kernel Lab, Hands-OnTrevor Woerner
 
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
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovskyphp-user-group-minsk
 
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 OpenPOWERIndrajit Poddar
 
Princeton RSE Peer network first meeting
Princeton RSE Peer network first meetingPrinceton RSE Peer network first meeting
Princeton RSE Peer network first meetingHenry Schreiner
 
Building Emmbedded Linux with Yocto project
Building Emmbedded Linux with Yocto projectBuilding Emmbedded Linux with Yocto project
Building Emmbedded Linux with Yocto projecttwcoimbatore
 
Embedded linux build systems
Embedded linux build systems  Embedded linux build systems
Embedded linux build systems Mender.io
 
Win ce 6.0 development (1)
Win ce 6.0 development (1)Win ce 6.0 development (1)
Win ce 6.0 development (1)Rajshree Daware
 

Similaire à 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
 
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...
 
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. 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...
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim 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
 
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
 
Embedded linux build systems
Embedded linux build systems  Embedded linux build systems
Embedded linux build systems
 
Win ce 6.0 development (1)
Win ce 6.0 development (1)Win ce 6.0 development (1)
Win ce 6.0 development (1)
 

Plus de Yi-Hsiu Hsu

Glow introduction
Glow introductionGlow introduction
Glow introductionYi-Hsiu Hsu
 
Understand more about C
Understand more about CUnderstand more about C
Understand more about CYi-Hsiu Hsu
 
Introduction to memory order consume
Introduction to memory order consumeIntroduction to memory order consume
Introduction to memory order consumeYi-Hsiu Hsu
 
RISC-V Introduction
RISC-V IntroductionRISC-V Introduction
RISC-V IntroductionYi-Hsiu Hsu
 
GCC for ARMv8 Aarch64
GCC for ARMv8 Aarch64GCC for ARMv8 Aarch64
GCC for ARMv8 Aarch64Yi-Hsiu Hsu
 
Introduction to armv8 aarch64
Introduction to armv8 aarch64Introduction to armv8 aarch64
Introduction to armv8 aarch64Yi-Hsiu Hsu
 

Plus de 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
 

Dernier

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 

Dernier (20)

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..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