Embedded Linux Systems With The Yocto Projects Presentation
Embedded Linux Systems With The Yocto Projects Presentation
Yocto Project
Accelerating Embedded Product Development
Rudolf J Streif
[ yoc-to ]
The smallest unit of measure,
http://www.yoctoproject.org/ecosystem
10/61 © 2015 The Yocto Project
Why Should a Developer Care? (1)
• Build a complete Linux system –from source– in
about an hour (about 90 minutes with X)
• Multiple cores (i.e. quad i7)
• Lots of RAM (i.e. 16 GB of ram or more)
• Fast disk (RAID, SSD, etc…)
• Start with a validated collection of software
(toolchain, kernel, user space)
• Blueprints to get you started quickly and that you can
customize for your own needs
• We distinguish app developers from system
developers and we support both
• Access to a great collection of app developer tools
(performance, debug, power analysis, Eclipse)
Yocto Project
Components
Upstream Projects
21/61 © 2012
2015 The Yocto
Linux Foundation.
Project All rights reserved
Build System Workflow
OpenEmbedded Architecture
Workflow
29/61 © 2012
2015 The Yocto
Linux Foundation.
Project All rights reserved
Machine Configuration
• Recipes call out the location of all sources, patches and files.
These may exist on the internal or be local. (See SRC_URI in
the *.bb files)
• Bitbake can get the sources from git, svn, bzr, tarballs, and
many more*
• Versions of packages can be fixed or updated automatically
(Add SRCREV_pn-PN = “${AUTOREV}” to local.conf)
• The Yocto Project mirrors sources to ensure source reliability
* Complete list includes: http, ftp, https, git, svn, perforce, mercurial, bzr, cvs, osc, repo, ssh, and svk and
the unpacker can cope with tarballs, zip, rar, xz, gz, bz2, and so on.
33/61 © 2015 The Yocto Project
Source Unpacking and Patching
• Output Analysis:
• Categorize generated software (debug, dev, docs, locales)
• Split runtime and debug information
• Perform QA tests (sanity checks)
• Package Generation:
• Support the popular formats, RPM, Debian, and ipk
• Set preferred format using PACKAGE_CLASSES in local.conf
• Package files can be manually defined to override automatic settings
• Package Groups
• Write package group recipes that combine multiple packages into
logical entities.
• Use the package group in IMAGE_INSTALL.
inherit packagegroup
PROVIDES = “${PACKAGES}”
• Image Recipe
IMAGE_INSTALL = “packagegroupcoreboot packagegroupmypkgapps”
Inherit coreimage
BBFILE_COLLECTIONS += "layername"
BBFILE_PATTERN_layername = "^${LAYERDIR}/"
BBFILE_PRIORITY_layername = "1"
LAYERDEPENDS_layername = "core"
LIC_FILES_CHKSUM = "file://COPYING;md5=<chksum>"
inherit kernel
KVER = "${PV}rc5"
LINUX_VERSION ?= "3.11.0"
LINUX_VERSION_EXTENSION ?= "custom"
SRC_FILE = “${KERNELORG_MIRROR}/linux/kernel/v3.x/testing/linux${KVER}.tar.xz”
SRC_URI = "${SRC_FILE};name=kernel \
file://defconfig"
S = "${WORKDIR}/linux${KVER}"
SRC_URI[kernel.md5sum] = "<chksum>"
SRC_URI[kernel.sha256sum] = "<chksum>"
SRC_URI = "git://aragoproject.org/git/projects/linux
am33x.git;protocol=git;bareclone=1"
SRC_URI += "file://defconfig"
SRC_URI += "file://am335xpmfirmware.bin"
SRC_URI += "file://beaglebone.scc \
file://beaglebone.cfg \
file://beagleboneuserconfig.cfg \
file://beagleboneuserpatches.scc \
"
KBRANCH = "v3.2staging"
LINUX_VERSION ?= "3.2.31"
LINUX_VERSION_EXTENSION ?= "bbone"
SRCREV = "720e07b4c1f687b61b147b31c698cb6816d72f01"
PR = "r1"
PV = "${LINUX_VERSION}+git${SRCPV}"
COMPATIBLE_MACHINE_beaglebone = "beaglebone"
do_compile_prepend() {
cp ${WORKDIR}/am335xpmfirmware.bin ${S}/firmware/
}
56/61 © 2015 The Yocto Project
Linux Yocto Kernel Method - Overview
require recipeskernel/linux/linuxyocto.inc
KBRANCH_DEFAULT = "standard/base"
KBRANCH = "${KBRANCH_DEFAULT}"
SRCREV_machine_qemuarm ?= "8fb1a478c9a05362e2e4e62fc30f5ef5d6c21f49"
SRCREV_machine_qemumips ?= "b8870f2b11f4c948ae90a19886335fa8b7fca487"
SRCREV_machine_qemuppc ?= "e4c12f12e61a29b6605c4fcbcfd6dbe18bd7b4e4"
SRCREV_machine_qemux86 ?= "dd089cb5ba37ea14e8f90a884bf2a5be64ed817d"
SRCREV_machine_qemux8664 ?= "dd089cb5ba37ea14e8f90a884bf2a5be64ed817d"
SRCREV_machine ?= "dd089cb5ba37ea14e8f90a884bf2a5be64ed817d"
SRCREV_meta ?= "8482dcdf68f9f7501118f4c01fdcb8f851882997"
SRC_URI = "git://git.yoctoproject.org/linuxyocto3.8.git;protocol=git;bareclone=1;\
branch=${KBRANCH},${KMETA};name=machine,meta"
LINUX_VERSION ?= "3.8.11"
PR = "${INC_PR}.1"
PV = "${LINUX_VERSION}+git${SRCPV}"
KMETA = "meta"
COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemux8664"
Yocto Project
●
Website: https://www.yoctoproject.org
●
Wiki: https://wiki.yoctoproject.org/wiki/Main_Page
●
Downloads: https://www.yoctoproject.org/downloads
●
GIT Repository: http://git.yoctoproject.org
OpenEmbedded
●
Website/Wiki: http://www.openembedded.org/wiki/Main_Page
●
GIT Repository: http://cgit.openembedded.org
Publications
●
Yocto Project – Big in Embedded Linux:
http://go.linuxfoundation.org/Yocto-Big-In-Embedded
●
How Engineering Leaders Can Use The Yocto Project to Solve
Common Embedded Linux Challenges:
http://go.linuxfoundation.org/Yocto-Publication
63/61 © 2012
2015 The Yocto
Linux Foundation.
Project All rights reserved
Thank you for your
participation!