Professional Tools for Embedded Linux © 2012 The Linux Foundation. All rights reserved. Jeff Osier-Mixon, Intel Corporation Yocto Project Community Manager OSCON | 7/19/2012
Jan 18, 2015
Professional Tools for Embedded Linux
© 2012 The Linux Foundation. All rights reserved.
Jeff Osier-Mixon, Intel Corporation
Yocto Project Community Manager
OSCON | 7/19/2012
The smallest unit of measure,
equal to one septillionth (10-24).
[ yoc-to ]
Agenda: Introduction Development Process Getting Started Q&A
Introduction
Introducing the Yocto Project
• Overall goals
• Project components
• Governance
• Relationships
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 4
Introducing the Yocto Project
→ Overall Goals
• Unify the embedded Linux development experience by providing
consistent, interoperable tools, metadata, & processes on all
popular architectures (ARM, Intel, MIPS, PowerPC)
• Respond to the needs of embedded systems developers
• Provide upstream resources for commercial providers
• Encourage community involvement
• Maintain community relationships
• Test thoroughly & provide nightly build structure
• Release on 6-month cadence
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 5
Introducing the Yocto Project
→ Overview
[video: https://vimeo.com/24743626]
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 6
Introducing the Yocto Project
→ Project Components
• Build system
– Poky reference system
• BitBake (build tool)
• OpenEmbedded Core (core metadata)
• Core BSPs & layers
• Creates reference distribution
– Development tools
• Application Development Toolkit & Eclipse IDE
• Hob graphical interface
– Related build tools
• Cross-prelink, pseudo, swabber, autobuilder
• Embedded Library: EGLIBC
• Build Appliance
• Reference projects
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 7
Introducing the Yocto Project
→ Governance
• Open source umbrella project
• Organized under the Linux Foundation
• Split governance model
• Technical Leadership Team
• Advisory Board made up of participating organizations
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved
All logos are trademarks of their respective owners. 8
Introducing the Yocto Project
→ Governance: Roles
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 9
Advisory Board
Chief Architect
Maintainers/Leaders
Contributors
Voting Members
Advocacy Subgroup
Finance Subgroup
Infrastructure Subgroup Project & Team Management
Documentation, Build, QA
Technical Team
Systems Administrator
Shared Maintainerships
Introducing the Yocto Project
→ Governance: Relationships
Parent organization
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 10
OpenEmbedded Project
The Linux Foundation
It’s complicated
Upstream Projects Mutually beneficial
The World
It’s awesome
Introducing the Yocto Project
→ Governance: Relationships
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved
All logos are trademarks of their respective owners. 11
Advisory Board
Chief Architect
Maintainers/Leaders
Contributors
Voting Members
Advocacy Subgroup
Finance Subgroup
Infrastructure Subgroup Project & Team Management
Documentation, Build, QA
Technical Team
Systems Administrator
Shared Maintainerships
upstream projects
Development
Development Process
• Build system components
• Workflow diagram
• Adjustment points
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 13
Development Process
→ Build System Components
• BitBake: build engine, follows metadata instructions
• Metadata: instructions for BitBake (recipes, classes, config files)
• OpenEmbedded Core: core set of metadata for OE-based systems
• Poky: a reference build system for the Yocto Project: includes
BitBake & OpenEmbedded Core, produces reference distro
• Package: software component in a package format
• Image: final build output, often a kernel and root filesystem
• Recipe: instructions on how to build a package
• Layer: set of related recipes intended to fit alongside other layers
• Cross-development tools or cross-compiler: tools that provide
binary output for a different architecture from the one they run on
• Toolchain: compiler, debugger, binary utilites, etc. designed to
work together for a specific architecture
• BSP: board support package, contains hardware-specific drivers and
other components for a specific architecture, board, or chipset
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 14
Development Process
→ Build System Components: BitBake
• Build engine, originally derived from Portage
• Relatively simple, highly configurable
• Operates on metadata
• Sequentially steps through tasks
• Maintainership shared with OpenEmbedded
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 15
Development Process
→ Build System Components: Layers
• openembedded-core
– Core classes and image recipes
– QEMU-emulated machine definitions
– Maintainership shared with OpenEmbedded
• linux-yocto
– Stable kernel at release time; moving to LTSI kernel
• BSP layers
– meta-intel: Intel processors and SoCs
– meta-ti: Texas Instruments boards
– meta-freescale: Freescale iMx development boards
• Feature layers
– meta-ivi
– meta-rt
• Many more (see git.yoctoproject.org)
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 16
Development Process
→ Build System Components: Poky
• Reference build system – a representation of the Yocto Project
• Includes BitBake, openembedded-core
• Can build multiple image types
– core-image-minimal
– core-image-base
– core-image-sato
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 17
Development Process
→ Workflow Diagram
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 18
Development Process
→ Adjustment Points
• During development
• Configuration
• During build
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 19
Getting Started
Getting Started
• Download
• Configure your environment
• Configure the image
• Build & rebuild
• A look at Hob
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 21
Getting Started
→ Download
• Tarball (packaged release): $ wget http://downloads.yoctoproject.org/releases/yocto/\
yocto-1.2/poky-denzil-7.0.tar.bz2
$ tar xjf poky-denzil-7.0.tar.bz2
• Git (tip of master branch):
$ git clone git://git.yoctoproject.org/poky.git
• Virtual machine: $ wget http://downloads.yoctoproject.org/releases/yocto/\
yocto-1.2/tools/Build_Appliance.zip
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 22
Getting Started
→ Configure Your Environment
• Install required packages (Ubuntu shown): $ sudo apt-get install sed wget subversion git-core coreutils \
unzip texi2html texinfo libsdl1.2-dev docbook-utils fop gawk \
python-pysqlite2 diffstat make gcc build-essential xsltproc \
g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev \
autoconf automake groff libtool xterm libxml-parser-perl
• Set up environment variables: $ cd poky-denzil-7.0
$ ./oe-init-build-env
### Shell environment set up for builds.
###You can now run 'bitbake <target>‘
Common targets are:
core-image-minimal
core-image-sato
meta-toolchain
. . .
23
Getting Started
→ Configure the Image
# This file is your local configuration file and is where all local user settings
# are placed. The comments in this file give some guide to the options a new user
...
# Parallelism Options
#
# These two options control how much parallelism BitBake should use. The first
# option determines how many tasks bitbake should run in parallel:
#
BB_NUMBER_THREADS = "8"
#
# The second option controls how many processes make should run in parallel when
# running compile tasks:
#
PARALLEL_MAKE = "-j 8"
...
# This sets the default machine to be qemux86 if no other machine is selected:
MACHINE ??= "qemux86"
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 24
Getting Started
→ Build & Rebuild
Pseudo is not present but is required, building this first before the main build
Parsing recipes: 100%
|##############################################################################################
################################################################################| Time: 00:00:53
Parsing of 835 .bb files complete (0 cached, 835 parsed). 1135 targets, 19 skipped, 0 masked, 0 errors.
Build Configuration:
BB_VERSION = "1.15.2"
TARGET_ARCH = "i586"
TARGET_OS = "linux"
MACHINE = "qemux86"
DISTRO = "poky"
DISTRO_VERSION = "1.2+snapshot-20120719"
TUNE_FEATURES = "m32 i586"
TARGET_FPU = ""
meta
meta-yocto = "master:99203edda6f0b09d817454d656c100b7a8806b18"
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 1 of 63 (ID: 11, /Mondo/poky/poky/meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_fetch)
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 25
Getting Started
→ Build & Rebuild
NOTE: Running task 1 of 63 (ID: 11, /Mondo/poky/poky/meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_fetch)
NOTE: package quilt-native-0.60-r0: task do_fetch: Started
NOTE: package quilt-native-0.60-r0: task do_fetch: Succeeded
NOTE: Running task 2 of 63 (ID: 7, /Mondo/poky/poky/meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_unpack)
NOTE: package quilt-native-0.60-r0: task do_unpack: Started
NOTE: package quilt-native-0.60-r0: task do_unpack: Succeeded
NOTE: Running task 3 of 63 (ID: 8, /Mondo/poky/poky/meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_patch)
NOTE: package quilt-native-0.60-r0: task do_patch: Started
NOTE: package quilt-native-0.60-r0: task do_patch: Succeeded
NOTE: Running task 4 of 63 (ID: 12, /Mondo/poky/poky/meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_configure)
NOTE: package quilt-native-0.60-r0: task do_configure: Started
NOTE: package quilt-native-0.60-r0: task do_configure: Succeeded
NOTE: Running task 5 of 63 (ID: 13, /Mondo/poky/poky/meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_compile)
NOTE: package quilt-native-0.60-r0: task do_compile: Started
NOTE: package quilt-native-0.60-r0: task do_compile: Succeeded
NOTE: Running task 6 of 63 (ID: 9, /Mondo/poky/poky/meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_install)
NOTE: package quilt-native-0.60-r0: task do_install: Started
NOTE: package quilt-native-0.60-r0: task do_install: Succeeded
NOTE: Running task 7 of 63 (ID: 10, /Mondo/poky/poky/meta/recipes-devtools/quilt/quilt-native_0.60.bb,
do_populate_sysroot)
NOTE: package quilt-native-0.60-r0: task do_populate_sysroot: Started
NOTE: package quilt-native-0.60-r0: task do_populate_sysroot: Succeeded
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 26
Getting Started
→ A Look at Hob
Yocto Project presentation @ OSCON 2012
© 2012 The Linux Foundation. All rights reserved 27
More information at yoctoproject.org
Thank You!