40429-Building Custom Embedded Images With The Yocto Project
40429-Building Custom Embedded Images With The Yocto Project
distribution
It creates a custom one for you.
Overview
BSP Layers
Application Layers
Future
Image Creator
Q&A
April 13th,
2/
April 13th,
3/
April 13th,
4/
April 13th,
5/
Layers
April 13th,
6/
BSP 'Layers'
Examples:
meta-intel/meta-sugarbay/machine/sugarbay.conf
Beagleboard (arm)
April 13th,
yocto/meta/conf/machine/beagleboard.conf
7/
April 13th,
8/
April 13th,
9/
A Machine Configuration
(meta-sugarbay/conf/machine/sugarbay.conf)
TARGET_ARCH="x86_64"
MACHINE_FEATURES="kernel26screenkeyboardpciusbhostext2ext3x86
KERNEL_IMAGETYPE="bzImage"
PREFERRED_PROVIDER_virtual/kernel="linuxyocto"
PREFERRED_PROVIDER_linuxlibcheaders?="linuxlibcheadersyocto"
PREFERRED_PROVIDER_virtual/libx11?="libx11trim"
PREFERRED_PROVIDER_virtual/libgl?="mesadri"
PREFERRED_PROVIDER_virtual/xserver?="xserverxf86drilite"
PREFERRED_PROVIDER_virtual/xserverxf86?="xserverxf86drilite"
XSERVER?="xserverxf86drilite\
xf86inputmouse\
xf86inputkeyboard\
xf86videointel"
MACHINE_EXTRA_RRECOMMENDS="kernelmoduleseeeacpiscripts"
GUI_MACHINE_CLASS="bigscreen"
IMAGE_ROOTFS_SIZE_ext3="2000000"
IMAGE_FSTYPES?="ext3cpio.gz"
MACHINE_ESSENTIAL_EXTRA_RDEPENDS="grub"
PREFERRED_VERSION_grub?="1.98"
SRCREV_machine_pnlinuxyocto_sugarbay?="41ec30ddc42912fec133a533b924e9c56ecda8f9"
SRCREV_meta_pnlinuxyocto_sugarbay?="5a32d7fe3b817868ebb697d2d883d743903685ae"
April 13th,
10/
All kernels used by the Yocto Project are kernel.org based (plus patches)
You can provide a kernel recipe for any kernel and use it (see e.g. laverne)
You can create a git repo usable by the Yocto Project's kernel tools
SRC_URI = "git://git.pokylinux.org/linux-yocto-2.6.37;branch=${KBRANCH}
The kernel for a given machine is actually built from two git branches
April 13th,
11/
You derive your machine branch from one of the */base branches
April 13th,
12/
CONFIG_LOG_BUF_SHIFT=16
April 13th,
13/
KBRANCH=${KMACHINE}
SRC_URI="git://git.pokylinux.org/linuxyocto2.6.37;protocol=git;
branch=${KBRANCH},meta;name=machine,meta
$catmetasugarbay/kernelrecipes/kernel/linuxyocto_git.bbappend
COMPATIBLE_MACHINE_sugarbay="sugarbay"
KMACHINE_sugarbay="yocto/standard/commonpc64/sugarbay"
April 13th,
14/
Now that we have Yocto running on our machine, let's build our application!
April 13th,
15/
Layers
April 13th,
16/
April 13th,
17/
uPnP
Audio Renderer
Content Directory
Video Renderer
Beagleboard
OMAP ARMv7
PPC 8513
E300
SandyBridge
Atom e660
Rygel (uPNP)
MediaTomb
Control Point
Acer Netbook
Atom N270
Rygel / Sato
Runs Yocto 1.0 with the Demo Layer out of the box
April 13th,
18/
conf/layer.conf
#Defaulttofirstdisk/firstpartitionontheRouterStationPro
RSP_ROOT?="sda1"
#RSP_ROOT?="sda2"
#Wehaveaconfandclassesdirectory,addtoBBPATH
BBPATH:="${BBPATH}:${LAYERDIR}"
#Wehaveanimagesandvariousrecipe*directories,addtoBBFILES
BBFILES:="${BBFILES}${LAYERDIR}/images/*.bb$
{LAYERDIR}/images/*.bbappend${LAYERDIR}/recipes*/*/*.bb$
{LAYERDIR}/recipes*/*/*.bbappend"
BBFILE_COLLECTIONS+="demo"
BBFILE_PATTERN_demo:="^${LAYERDIR}/"
BBFILE_PRIORITY_demo="6"
#SetuptheaudiomixerfortheBeagleboardxM
MACHINE_EXTRA_RRECOMMENDS_append_beagleboard+="bbxmaudio"
April 13th,
19/
Configure bblayers.conf
April 13th,
# BSP Layer
# Demo Layer
20/
file://COPYING;md5=4fbd65380cdd255951079008b364516c\
file://libgupnpdlna/gupnpdlna
discoverer.c;endline=20;md5="
DEPENDS="gupnpgstreamergstpluginsbase"
PR="r0"
SRC_URI="http://gupnp.org/sites/all/files/sources/${PN}$
{PV}.tar.gz"
SRC_URI[md5sum]="c97ffbada5cb9f700d910995fab6ab46"
SRC_URI[md256sum]=<sha256sum>
inheritautotoolspkgconfig
April 13th,
21/
MediaTomb - mediatomb_0.12.1.bb
DESCRIPTION="MediaTombUPnPAVMediaServerforLinux"
HOMEPAGE="http://mediatomb.cc/"
LICENSE="GPLv2"
LIC_FILES_CHKSUM=
"file://COPYING;md5=0b609ee7722218aa600220f779cb5035\
file://src/main.cc;beginline=14;endline=25;md5=<md5sum>"
DEPENDS="expatffmpegsqlite3libexifjszlibfileid3lib
ffmpegthumbnailercurl
PR="r1"
SRC_URI="${SOURCEFORGE_MIRROR}/mediatomb/mediatomb${PV}.tar.gz\
file://youtube_warning.patch\
file://init\
file://default\
file://config.xml\
"
inheritautotoolspkgconfigupdaterc.d
INITSCRIPT_NAME="mediatomb"
INITSCRIPT_PARAMS="defaults90"
April
13th,
22/
MediaTomb (cont)
EXTRA_OECONF="disablemysqldisablerplmallocenablesqlite3enable
libjs\
enablelibmagicenableid3libenablelibexifenableinotify\
enabledbautocreatedisablelargefilewithsqlite3h=$
{STAGING_INCDIR}\
withsqlite3libs=${STAGING_LIBDIR}\
withmagich=${STAGING_INCDIR}\
withmagiclibs=${STAGING_LIBDIR}\
withexifh=${STAGING_INCDIR}\
withexiflibs=${STAGING_LIBDIR}\
withzlibh=${STAGING_INCDIR}\
withzliblibs=${STAGING_LIBDIR}\
withjsh=${STAGING_INCDIR}/js\
withjslibs=${STAGING_LIBDIR}\
withid3libh=${STAGING_INCDIR}\
withid3liblibs=${STAGING_LIBDIR}\
withffmpegh=${STAGING_INCDIR}\
withffmpeglibs=${STAGING_LIBDIR}\
withsearch=${STAGING_DIR_HOST}${prefix}/local\
ac_cv_header_sys_inotify_h=yes"
SRC_URI[md5sum]="e927dd5dc52d3cfcebd8ca1af6f0d3c2"
SRC_URI[sha256sum]=
"31163c34a7b9d1c9735181737cb31306f29f1f2a0335fb4f53ecccf8f6
April 13th,
23/
2f11cd"
Creating an Image
IMAGE_INSTALL
IMAGE_FEATURES
Graphics / UI
Standards
April 13th,
24/
April 13th,
25/
April 13th,
26/
poky-image-mediatomb-live.bb
DESCRIPTION = "Bootable Live Media Renderer Image"
require recipes-core/images/poky-image-live.inc
LABELS += "boot install"
ROOTFS = "${DEPLOY_DIR_IMAGE}/poky-image-mediatomb-${MACHINE}.ext3"
LICENSE = "MIT"
do_bootimg[depends] += "poky-image-mediatomb:do_rootfs"
April 13th,
27/
Layers Summary
Recipes
Tasks
Images
April 13th,
28/
April 13th,
29/
MACHINE
Future
Layer management
April 13th,
30/
Q&A
April 13th,
31/
Resources
http://www.yoctoproject.org
http://wiki.yoctoproject.org
April 13th,
32/
Legal Information
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL
PRODUCTS. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF
SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND
INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY RELATING TO SALE
AND/OR USE OF INTEL PRODUCTS, INCLUDING LIABILITY OR WARRANTIES
RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR
INFRINGEMENT OF ANY PATENT, COPYRIGHT, OR OTHER INTELLECTUAL
PROPERTY RIGHT.
Intel may make changes to specifications, product descriptions, and plans at any time,
without notice.
All dates provided are subject to change without notice.
Intel is a trademark of Intel Corporation in the U.S. and other countries.
*Other names and brands may be claimed as the property of others.
Copyright 2009, Intel Corporation. All rights are protected.
April 13th,
33/
34