Escolar Documentos
Profissional Documentos
Cultura Documentos
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, t he Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Scope
This training material intends to get users up to speed quickly with a Yocto/Poky based Linux distribution for Freescale's QorIQ and i.MX6 products It covers the topics required so as to be able to :
install the software on a Linux host machine build standard images for a supported target board customize images add packages
BSP or distro developers should review the Yocto, BitBake and OpenEmbedded community documentation for additional details
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, t he Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
"An open source collaboration project that provides templates, tools and methods to help you create custom LinuxLinux -based systems for embedded products regardless of the hardware architecture." Many individuals as well as companies (e.g. Freescale, Intel, TI, Wind River, Mentor, etc.) are contributing to the Yocto project
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Bitbake : parses metadata and runs tasks OpenEmbedded Core : core metadata and build information to build baseline embedded systems y Poky : Yocto example distribution which integrates all the required pieces and makes an official release hob : GUI tool to select packages to build and easily create custom image
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, t he Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Freescale is an active part of the upstream community Freescale has created architecture specific layers for QorIQ and i.MX6 , that can be "plugged" into the Yocto build system ("dylan dylan" "release), release) allowing users to build for Freescale target machines
QorIQ Q Q :p pre-integrated g in an SDK release ( (currently y 1.4) ) iMX : community repository fslcommunitybspplatform
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Host Distro's
Yocto runs on most recent Linux distributions with Python 2 6/2 7 like ... 2.6/2.7,
Tested Host Distributions
CentOS 5.x/6.x Debian 6.07 Fedora Core 13/17/18/19 OpenSUSE 11.4 / 12.1 RHEL 5 5.7 7 Ubuntu 10.04/12.04/13.04
TM
10
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
ISO Images
source tar balls and recipes allowing full non-cache builds from source for any core. core this ISO also contains all SDK documentation.
boot loader/kernel/rfs/ucode/dtb/hv
TM
For each ISO image or physical DVD : $ sudo mount oloop\ QorIQSDK<version>[SOURCE|<core>]<date>yocto.iso\ /mnt mnt/ /cdrom
As a non-root user
(*),
In the installation p path run the script p to p prepare p the environment (Internet access may be required) : $cd QorIQSDKV1.420130625yocto $ ../scripts/hostprepare.sh
(*)
TM
The fslsetuppoky script sets up a build environment for a chosen target machine :
[QorIQSDK]$ ../fsl ./fslsetuppoky h
Usage:source./fsl ./ /fslsetuppoky<mmachine> /fsl Optionalparameters:[jjobs][ttasks][spath][p][l][h] Supportedppcmachines:b4420qds64bb4420qdsb4860qds64bb4860qds bsc9131rdbbsc9132qdsp1010rdbp1020rdbp1021rdbp1022dsp1023rdbp1025twr p2020dsp2020rdbp2041rdbp3041dsp4080dsp5020ds64bp5020dsp5040ds64b p5040dst4160qds64bt4160qdst4240qds64bt4240qds
*[jjobs]:numberofjobsformaketospawnduringthecompilationstage. *[ttasks]:numberofBitBake tasksthatcanbeissuedinparallel. *[dpath]:nondefaultDL_DIRpath(downloaddir) *[cpath]:nondefaultSSTATE_DIRpath(sharedstateCachedir) *[bpath]:nondefaultbuilddirlocation *[spath]:appendanextrapathtobuild_machine_release folder *[l]:lite mode mode.Tohelpconservediskspace, space deletesthebuilding directoryoncethepackageisbuilt. *[p]:appendcacheandsourcemirrors(ForFSLInternalUseOnly) *[h]:help
TM
14
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
$ ../fsl ./fslsetuppoky mp4080ds j4 t2 l Configuringforp4080dsboardtype Creatinganyocto buildoutputat<...>/QorIQSDKV1.4 20130625yocto/build_p4080ds_release Runthefollowingcommandstostartabuild: bitbakefslimagelsbsdk Imagebuildcommands bitbakefslimagekvm bitbakefslimage g full bitbakefslimageflash bitbakefslimageminimal bitbakefslimage g core Toreturntothisbuildenvironmentlaterpleaserun: source<...>/QorIQSDKV1.420130625 yocto/build p4080ds release/SOURCE THIS yocto/build_p4080ds_release/SOURCE_THIS
To create multiple build environments use [spath] , e g build_p4080ds_release e.g. build build_p4080ds_release_version1 p4080ds release_version1 version1
TM
15
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
SDKinstallationfolder
SDKlayers
QorIQSDK bitbake build_p4080ds_release documentation meta metafslnetworking metafslppc metafslppctoolchain metahob metaoe metaskeleton metavirtualization metay yocto metayoctobsp scripts sources sstatecache
17
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
After creating a new build environment or returning t an existing to i ti one, the th shell's h ll' current t working ki directory is changed to ... buildor build_<machine>_<suffix> ... from which bitbake must be invoked
TM
19
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
$grep v e"^#"local.conf
DISTRO?="poky" poky SDKusesrpmpackagemanagement PACKAGE_CLASSES?="package_rpm "package_rpm" " EXTRA_IMAGE_FEATURES="debugtweaks" USER_CLASSES?="buildstats imagemklibs imageprelink " PATCHRESOLVE="noop "noop noop" " CONF_VERSION="1" Setby: m<machine> MACHINE="p4080ds "p4080ds" " DISTRO="fsl "fslnetworking" BB_NUMBER_THREADS _ _ ="2 "2" Setby: t<threads> j<jobs> PARALLEL_MAKE="j4" 4" DL_DIR="/home/ "/home/yt_sdks yt_sdks/QorIQ /QorIQSDKV1.420130625yocto yocto/build_p4080ds_release/../sources /build_p4080ds_release/../sources" " SSTATE_DIR="/home/ "/home/yt_sdks yt_sdks/QorIQ /QorIQSDKV1.420130625yocto/ build_p4080ds_release/../sstate build_p4080ds_release/../sstatecache cache" " INHERIT+="ownmirrors" SSTATE_MIRRORS="file://.*/(.*)/(.*)file://native/\ file://native/\1/\ 1/\2\n" BBFILE_PRIORITY_openembeddedlayer="1" SSTATE_PKG_SUFFIX="txz "txz" " SSTATE_PKG_TARZIPPROG="xz "xz" " LICENSE_FLAGS_WHITELIST="noncommercial_netperf commercial_netperf" " COPY_LIC_MANIFEST="1" COPY_LIC_DIRS="1" Setby: l (lite mode) INHERIT+="rm_work "rm_work" "
TM
20
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Touch conf/ conf/local.conf local.conf to force a reload of the cache $touch<project>/conf/ <project>/conf/local.conf local.conf $bitbake< <image_recipe image_recipe> > This will force all configuration files and dependencies to be reparsed
TM
22
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
A build environment has a ./ ./tmp tmp directory, or ${TMPDIR}, which receives all the build output
<project>/tmp <project>/ tmp
buildstats cache h deploy images licenses rpm sdk log pkgdata sstatecontrol stamps sysroots p4080ds p4080dstcbootstrap x86_64 86 64linux li work workshared
Generatedimagefiles(kernel,uboot,rcw,rfs,...) Producedinstallable.rpmfilesofbuiltpackages g
Sharedheaderfilesandlibraries
TM
23
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
A working directory ${WORKDIR} ${WORKDIR}, is created for each package. package All tasks execute from a work directory. Working directories are grouped in sub-folders :
<machine> < ac e>fsl s linux u : boa board d specific target side packages like rcw, kernel, u-boot, ... <core>fsllinux : non non-board board specific packages, compiled for the target architecture <host>*
TM
25
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Images are generated by invoking bitbake for an image recipe e.g. recipe, eg $ bitbakefslimagecore
By default multiple image file types are generated simultaneously, defined by : [metafslnetworking/images/fslimageminimal.bb] IMAGE_FSTYPES?="tar.gzext2.gz.ubootjffs2ubi ubi" "
A *. *.rootfs.tar.gz rootfs.tar.gz image file contains an archive of the file system, suitable for deployment :
TM
27
fslimageminimal : Basic just packages to boot up a board; suitable as a starting point for a custom image fslimagecore : fslimageflash : fslimagefull : fslimagekvm : fslimageminimal + FSL-specific packages To recover fslimagefull to SD/USB/HD media All packages + self-hosted tool chain; deploy to mass storage fslimageminimal + KVM + QEMU
29
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
FMan microcode fsl_fman_ucode_p4080_r2.0_106_2_9.bin fsl_fman_ucode_p4080_r3.0_106_2_9.bin fslimagefullp4080ds20130826143000.rootfs.tar.gz fslimagefullp4080ds.tar.gz >fslimagefullp4080ds20130826143000.rootfs.tar.gz hv RFS image files and symlinks [...] hv.uImage Embedded hypervisor image h hypervisor.config i fi hvcfg README HV configuration device tree R_PPSXX_0xe hv2plnxlnx.dtb modules3.8r14.3p4080ds20130709102656.tgz rcw README Reset Configuration Word images R_PPPNN_0x5 R_PPSXN_0x10 rcw_13g_1500mhz_rev2.bin [...] rcw_5g g_1500mhz_rev3.bin R_PPSXX_0xe R_RRRSS_0x16 README__DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt u-boot images and symlinks ubootP4080DS.bin >ubootP4080DSgitr33.bin ubootP4080DSgitr33.bin [...] ubootspiP4080DS_SPIFLASHgitr33.bin uImage3.8r14.3p4080ds20130709102656.bin Kernel image, dtb's and symlinks uImage3.8r14.3p4080ds20130709102656.dtb uImage3.8r14.3p4080dsusdpaa20130709102656.dtb uImagep4080ds.bin >uImage3.8r14.3p4080ds20130709102656.bin uImagep4080ds.dtb >uImage3.8r14.3p4080ds20130709102656.dtb uImage I p4080ds 4080d usdpaa.dtb d dtb >uImage I 3.8 3 8r14.3 14 3p4080ds 4080d usdpaa d 20130709102656.dtb 20130709102656 dtb
31
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
bin boot dev etc home lib linuxrc >../bin/busybox ../bin/busybox y media mnt proc sbin sys tmp usr var
TM
33
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
$ bitbake gfslimage<variant>
Parsingrecipes:100% |################################################|Time:00:00:18 Parsingof1239.bbfilescomplete(0cached,1239parsed).1587 targets,49skipped,0masked,0errors. NOTE:Resolvinganymissingtaskqueuedependencies NOTE:Preparingrunqueue NOTE:PNdependenciessavedto'pndepends.dot' NOTE:Packagedependenciessavedto'package packagedepends.dot depends dot' NOTE:Taskdependenciessavedto'taskdepends.dot'
$ catpndepends.dot|grep v e'native' e'digraph'\ e'image' e'group' e'cross' e'opkg 'opkg' ' e'postinst 'postinst'| '|\ \ awk '{print$1}'|sort|uniq |tr d'"'
TM
35
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
attr basefiles eglibcinitial expat initifupdown initscripts libffi libgcc modutilsinitscripts sysvinit sysvinitinittab updaterc.d rc d usbutils
Note : The conditional installation of core- or SoC-specific packages p g into a rootfs image g is specified p in : metafslnetworking/images/fslimageprivate.inc
TM
36
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
alsalib coreutils elfutils lf il flib gdbm inputproto iptables libedit libppc libxau mdadm perl psmisc shadowsecuretty stat utilmacros
TM
bridgeutils dbusglib fil file fsltlu i2ctools iproute2 libcap libnl libtool libxml2 netperf p opt readline kmmhost tcpdump xproto
bzip2 debianutils fl flex gawk inetutils ipsectools libcheck libpcap libx11 lmbench openssl p procps shadow sqlite3 sdpaa xtrans
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, t he Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
version h, help k, continue f, force cCMD, cmd cmd=CMD =CMD v, verbose D, debug n, dryrun s, showversions e, environment g, graphviz uUI, ui ui=UI =UI
showprogram'sversionnumberandexit showthishelpmessageandexit continue asmuchaspossibleafteranerror. error. force runofspecifiedcmd cmd, ,regardlessofstampstatus specifytasktoexecute. outputmorechitchattotheterminal increasethedebuglevel. don'texecute,justgothroughthemotions showcurrentandpreferredversionsofallpackages showtheglobalorperpackageenvironment emitthedependencytreesofthespecifiedpackagesin thedotsyntax userinterfacetouse
TM
41
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
bitbake must always be executed from within the <project>directory When bitbake (a Python script) runs :
it parses recipes i and d tasks t k determines task queue dependencies prepares and d executes t a run queue of f tasks, t k which hi h perform f the steps needed to obtain the desired result, e.g. image generation
Any required earlier tasks will be run first (e.g. source will be installed before compilation) To speed d up subsequent b b builds, ld generated d <pkg>.rpm's ' are saved to the binary cache folders in : <project>/tmp <project>/ tmp/deploy/rpm /deploy/rpm
TM
42
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Invoke bitbake to run a specific task specified in the recipe of a package or an image. image e.g. eg
generate one of the defined image types b ild an build n individual indi id l package p k ge build the cross compiler toolchain Optionally with c<CMD> indicate a specific task to perform
$ bitbake[c<CMD>][options]<recipe>
An initial image built may take a significant amount of time, if many packages are not available in the binary cache h
TM
43
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
menuconfig
deploy
TM
44
clean : cleansstate :
remove the work folder of the package clean + delete the cached binary
when a known good package fails to build unexpectedly, or an image build fails with "error: " Failed F il ddependencies" d d i ", do ccleansstate first on the failing package, then rebuild
patch : p menuconfig :
cleanall :
TM
45
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Assume :
a packages source files have been installed in its working directory the user has directly modified one or more source files
BitBake will not be able to determine if any local changes were made to its source files, so a rebuild will not automatically be triggered. Always force clean the package when any source files have been changed : bitbakeccleanf<pkg>
TM
46
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Enable build output : Generate bitbake debug output : Force rerun of specified task :
Dump the environment : Dump package dependency list : Continue even in case of error :
TM
47
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
For each executed bitbake task, log files are written to the package package's s temp folder, folder e.g. e g for uboots s deploy task :
$cd <project>/ <project>/tmp tmp/work/p4080ds /work/p4080dsfsllinux/uboot/gitr33/temp $ls la|grep deploy
lrwxrwxrwx 1fsl l f l fsl f l 27Aug A 2616:07 16 07log.do_deploy_setscene l d d l t > log.do_deploy_setscene.9178 rwrwr 1fsl fsl 835Aug2616:07log.do_deploy_setscene.9178 rwrwr 1fsl fsl 75Aug2616:07run.do_deploy_setscene.9178
Whenever a bitbake task for a package fails, the path to the log file capturing the failure is displayed. To log output to console (e.g. from make) during the build, add the v, verbose option
TM
48
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
$ bitbakefslimageminimal
Loadingcache:100%|############################################################3####|ETA:00:00:00 Loaded1757entriesfromdependencycache. BuildConfiguration: BB_VERSION="1.18.0" BUILD_SYS="x86_64linux" NATIVELSBSTRING="Fedora19" TARGET_SYS="powerpcfsl_networkinglinux" MACHINE=" "p4080ds p4080ds" " DISTRO="fsl "fslnetworking networking" " DISTRO_VERSION="1.4" TUNE_FEATURES="m32fpuhardppce500mc ppce500mc" " TARGET_FPU="hard" meta metayocto metayoctobsp ="sdkv1.4.x:5a7532143a49f59a5c85b08d3daf574fb1eccd8d" metafslppc="sdkv1.4.x:7e0d7796a10d4810242fb25791fc7bc47baeaf7c" metafslppctoolchain ="sdkv1.4.x:8ec94cec04527cb971c125b1ddd2c5375034d723" metavirtualization="sdk sdkv1.4.x:ad6df4f59cd7646f61db29e8fa51f878329d6f93 v1.4.x:ad6df4f59cd7646f61db29e8fa51f878329d6f93" metafslnetworking="(detachedfrom00f7a53):00f7a535029ca7ef8c96ba8e9916d4742166bab0" metaoe metanetworking="sdkv1.4.x:7c8dd8f096b64a709175d37a08a4fb02ca263616" NOTE:Resolvinganymissingtaskqueuedependencies NOTE:Preparingrunqueue NOTE:ExecutingSetScene Tasks NOTE:ExecutingRunQueue Tasks NOTE:TasksSummary:Attempted1643tasksofwhich1641didn'tneedtobererunandallsucceeded. Summary:Therewas1WARNINGmessageshown. shown
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
50
To install the sources of a package : $ bitbake cpatch<pkg> Any earlier tasks that must be completed before d do_patch h will ill be b implicitly i li itl executed t d fi first t
TM
52
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
$ cd build_p4080ds_release build p4080ds release $ bitbake cpatchuboot [...] $ cd tmp tmp/work/p4080ds /work/p4080dsfsllinux/uboot/gitr33 $ ls
deployrpms deployuboot git licensedestdir package packagessplit pkgdata pseudo sstateinstalldeploy sstateinstalldeployrpm sstateinstallpackage sstateinstallpackagedata sstateinstallpopulatelic sstateinstallpopulatesysroot sysrootdestdir temp
$ ls git
api config.mkdriversincludemkconfig rules.mk archCOPYINGdtslibnand_spl nand spl snapshot.commit snapshot commit boardCREDITSexamplesMAINTAINERSnetspl boards.cfgdiskfsMAKEALLposttest commondochelper.mkMakefile READMEtools
TM
53
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Shared hardware tuning definitions: <core>.inc files Machine specific config meta-data : <machine>.conf files
Example : P4080DS
[metafslppc/conf/machine/p4080ds.conf]
requiree500mc.inc requireconf/machine/include/socfamily.inc
metafslppc/conf machine e500mc.inc i e500v2.inc e550064b.inc e5500.inc e650064b.inc b i e6500.inc mpc8536ds.conf [...] p4080ds.conf 4080d f [...] t4240qds.conf
SOC_FAMILY="p4080" UBOOT_MACHINES="P4080DSP4080DS_SECURE_BOOTP4080DS_SDCARDP4080DS_SPIFLASH" KERNEL DEVICETREE="${S}/arch/powerpc/boot/dts/p4080ds.dts KERNEL_DEVICETREE "${S}/ h/ /b t/dt / 4080d dt \ ${S}/arch/powerpc/boot/dts/p4080dsusdpaa.dts" KERNEL_DEFCONFIG="${S}/arch/powerpc/ "${S}/arch/powerpc/configs configs/corenet32_smp_defconfig" /corenet32_smp_defconfig" [...]
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
55
$grep P4080DSboards.cfg
P4080DS P4080DS_SDCARD P4080DS_SECURE_BOOT P4080DS_SPIFLASH P4080DS_SRIOBOOT_MASTER P4080DS_SRIOBOOT_SLAVE powerpc powerpc powerpc powerpc powerpc powerpc mpc85xx mpc85xx mpc85xx mpc85xx mpc85xx mpc85xx corenet_ds corenet_ds corenet_ds corenet_ds corenet_ds corenet_ds freescale freescale freescale freescale freescale freescale [...] [...] [...] [...] [...]
Add any board configs needed to UBOOT_MACHINES All board configs will be built, with a separate output folder for each in the git source folder
TM
57
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
JFFS2_ERASEBLOCK :
KERNEL_DEFCONFIG: maybe be present to define the default kernel defconfig KERNEL_DEVICETREE : one or more default d f lt d device i trees, t all of which will be built
TM
59
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
create a custom layer (more on that later), to keep your original work separate from original release meta-data copy a known good <machine>.conf <machine> conf to <new_machine>.conf new machine> new_machine machine>.conf > conf change the <newmachine>.conf as needed update the script used for setting up a build environment as a test set up a build environment for the new board config
TM
60
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
metafslppc
conf f [...] machine Defaultkernelconfig anddevicetree KERNEL_DEVICETREE ="${S}/arch/powerpc/boot/dts/p4080ds.dts\ [...] ${S}/arch/powerpc/boot/dts/p4080dsusdpaa.dts" p4080ds p4080ds.conf conf KERNEL_DEFCONFIG ="${S}/arch/powerpc/configs/corenet32_smp_defconfig" [...] recipeskernel do_configure_prepend(){ linux #copydesireddefconfig sowepickitupforthereal kernel_do_configure files cp${KERNEL_DEFCONFIG}${B}/.config linuxqoriqsdk.bb linuxqoriqsdkheaders.bb linuxqoriqsdk.inc
TM
61
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
63
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
a kernel rebuild :
TM
65
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Freescale-specific packages, such as kernel and u-boot, are no longer supplied as pristine tar balls plus patches. patches Instead, git tar balls are provided, which include the entire patch commit history Yocto uses git commands when needed, but hides these from the user To get started with git :
gitscm.com g git.jk.gs
TM
66
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
67
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
For a package provide as a git repo, patches are identified in the git commit history
For non-git packages patches may be contained in one of the package p g recipe p folders
Install the package source from the git tar ball Enter the installed package's git folder List the commits with g git log g Identify the <since>..<until> commit range of interest Generate the p patch files with g git formatp patch
TM
68
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
From within the git folder, list the commits to find those of interest, interest then generate the patches
git log decorate[<commitlimitingoptions>]|more git formatpatch[<since>|<revisionrange>] o<outputdir>
TM
69
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Patches
To query for all applied patches, delivered as patch files (not git commits) , e.g. e g for busybox :
$bitbake ebusybox |grep ^SRC_URI|tr s''' '\ \n'|\ tr s'\ '\t''\ '\n'|grep g p p patch file://B921600.patch file://get_header_tar.patch file://busyboxappletlibdependency.patch [...] file://fail_on_no_media.patch file://busyboxawkmakeFSTRinterpretescape.patch
TM
70
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
BitBake commands are issued from the Linux bash shell A separate interactive BitBake shell will be started for those BitBake tasks that require a UI, like :
menuconfig devshell
the screen utility is used to allow connecting the current console to the bitbake interactive shell
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
71
The OE_TERMINAL variable must be appropriately configured to allow correct operation of interactive BitBake shells
defines the terminal configuration as one of the followings : auto (default), (d f l ) gnome,xfce, xfce f ,rxvt rxvt, ,screen,konsole k l (KDE3.xonly),none
To explicitly configure for a non-default terminal configuration, change OE_TERMINAL in conf/ conf/local.conf local.conf When using BitBake from within a non-graphical non graphical environment, set OE_TERMINAL as follows :
OE TERMINAL screen OE_TERMINAL=screen OE_TERMINAL=
TM
72
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
An architecture specific cross compiler toolchain and libc are built and installed per build project and invoked by BitBake tasks as needed.
An external compiler tool chain can be configured for use by Yocto as described in: www.openembedded.org/wiki/Adding_a_secondary_toolchain
An cross compiler A il tool t l chain h i for f use outside t id of f BitBake BitB k can be generated as follows : $ bitbakefsltoolchain or $ bitbakemetatoolchain
An installable tar file will be installed here : <project>/tmp <project>/ tmp/deploy/ /deploy/sdk sdk
TM
73
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, t he Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
M t d t Metadata
BitBake
TM
75
A bitbake recipe is a .bb file, that defines all the tasks that apply to building a package or image The defined tasks for a recipe can be listed (unsorted), g for uboot : e.g.
$ bitbake clisttasks uboot
[...] NOTE:packageubootgitr26:taskdo_listtasks do_listtasks: :Started do_fetchall do_build do_devshell do_cleansstate do_configure [...] [ ] do_clean do_package_write_rpm_setscene do_rm_work do_package do unpack do_unpack do_install do_populate_sysroot_setscene do_rm_work_all do_checkuriall NOTE:packageubootgitr30:taskdo_listtasks do do_listtasks: listtasks:Succeeded listtasks:
76
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
The contents of the specified file will be inserted at that location and parsed by bitbake The file name convention for an include file : .inc The path Th h specified ifi d i is relative l i and d the h first fi one found f d within BBPATH require raises a ParseError if the file is not found, found include does not
TM
77
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
78
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
DEPENDS : build time dependencies between .bb files RDEPENDS : runtime dependencies PROVIDES : specifies the functionality a .bb file provides PREFERRED_VERSION_ :
if multiple .bb files exist for a package, bitbake defaults to the most recent version to specify a specific package version to use PREFERRED_VERSION_<pkg>=" "x.y x.y" " E.g.: PREFERRED_VERSION_mypackage ="1.3" will select the recipe mypackage1.3.bb even over any more recent version
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
79
Operation Set to a value Expand Set to a default value Immediate expansion Append pp Prepend Append (no space) Prepend Append/prepend conditional on OVERRIDES
Example VAR1="value" value VAR2="X${VAR1}Y" VAR1?="defval "defval" " VAR1??= ?? "defval "defval defval" " VAR1="value" VAR1:="${VAR1}append VAR1="value" VAR1+="Y" VAR1="value" VAR1=+"X" VAR1="value" VAR1.="Y" VAR1="value" VAR1= =."X" X VAR1="XY" OVERRIDES="A:B" VAR1_append_A="C"
Resulting Value "value" value "XvalueY XvalueY" " if VAR1 unassigned : "defval" defval" else VAR1 unchanged "value" "valueappend" valueappend" "value" "valueY" "value" "Xvalue" "value" "valueY" valueY" "value" "Xvalue Xvalue" " VAR1 set to "XYC"
TM
80
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
For an expression :
VARIABLE VARIABLE_operation_value ti l operator t string t i
If OVERRIDES contains value then after ft all ll += and d =+ operators t h have been b applied li d apply operation (_append_ or _prepend_ prepend_)
E Example l : [metafslppc/recipeskernel/uboot/uboot_git.bb] TOOLCHAIN OPTIONS append e550064b ="/ TOOLCHAIN_OPTIONS_append_e5500 TOOLCHAIN_OPTIONS_append_ /../lib32 /lib32${MACHINE} ${MACHINE}" If OVERRIDES contains e550064b then append "/../lib32${MACHINE}" to TOOLCHAIN_OPTIONS
TM
82
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Append specific changes to an existing <pkg>.bb recipe i b by creating ti a <pkg>. <pkg>.bbappend k bbappend bb d file fil
use
an identical basename
$bitbakelayersshowappends|grep busybox
Parsingrecipes..done. busybox packagerecipe busybox_1.20.2.bb: busybox_1.20.2.bb : .../metaoe oe/meta /metaoe oe/recipes /recipescore/ core/busybox busybox/busybox_1.20.2.bbappend /busybox_1.20.2.bbappend .../metayocto yocto/recipes /recipescore/ core/busybox busybox/busybox_1.20.2.bbappend /busybox_1.20.2.bbappend .../metafslppc/recipesappend/ append/busybox busybox/busybox_1.20.2.bbappend /busybox_1.20.2.bbappend .../metafslnetworking/recipesappend/ append/busybox busybox/busybox_1.20.2.bbappend /busybox_1.20.2.bbappend .../metavirtualization/recipescore/ core/busybox busybox/busybox_1.20.2.bbappend /busybox_1.20.2.bbappend
changestoappendtobusybox.bb
TM
83
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, t he Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Yocto meta-data is organized into layers, layers so that configurations can be kept isolated from each other The conf/bblayers.conf conf/bblayers.conf file defines the layers BitBake will parse, when determining which tasks to run Package recipes are organized in layer sub-folders In a BitBake command a packages may be fully qualified or specified by basename only p gbasename basename>[ >[ [_<version>][.bb] ][ ] <pkg
also l : www.openembedded.org/wiki/LayerIndex
TM
85
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
layersdefinedforthebuildenv
layerdirectory meta<layer>/ y / conf layerconfigurationfile layer.conf images imagerecipe <imagename>.bb [...] recipecategorydirectory recipes<category> recipedirectory <recipefolder> files locallystoredfilesdirectory <explicit li i fil files> <recipe>.bb recipe.bbfile [...] [...] [ ]
TM
86
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
The SDK configuration includes the example Yocto distribution based on the Poky baseline, plus Freescale specific layers :
meta metafslnetworking metafslppc metafslppctoolchain metahob metaoe metaskeleton metavirtualization metayocto metayoctobsp Freescale PPC layer (private) Freescale PPC hardware support metadata (public)
... aligned with SDK releases ... aligned with Yocto releases
87
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
git.yoctoproject.org
TM
for all public Freescale projects : kernel, k l u-boot, b .. subset is available in the Yocto project git repository it : git.yoctoproject.org/cgit git.yoctoproject.org/ cgit/cgit.cgi/?q= /cgit.cgi/?q=fsl fslppc
pushed
through git.freescale.com
TM
88
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
thislayer'sconfiguration
hardwaretuningand machineconfigurations
recipecategories
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
recipes i core:
recipesdevtools : qemu tclap recipesgraphics: xorgdriverxorgxserver recipeskernel: recipestest: recipestools: asf cryptodev linuxqoriqdebuguboot testfloat bootformatcst embeddedhv ethconfig flib hvcfg muxserverrcw skmm usdpaa websysmon fmc fmlib fmucode
recipesucode :
TM
90
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
through the SDK ISO release images, for legal reasons (not upstream)
TM
91
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
metafslnetworking/ conf layer.conf customlicenses images fsl f limage i core.bb bb [...] fslimageminimal.bb [ [...] ] fsltoolchain.bb packagegroups recipesappend recipes i binary bi recipesbsp recipesconnectivity recipes p devtools recipesextended recipeskernel recipessupport recipes i tools t l
TM
thislayer'sconfiguration
imagerecipeswhichdependon Freescaleprivatepackages
recipecategories
92
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
di diagnostic ti edink di k qeucode d vsc7385firmware cantest fsliptl7pmfslpme fsltlu i2cflashutilixxatstackptp rfutil tcfqoriqdbg
recipesconnectivity : ipsectoolsopenssl recipesdevtools : recipesextended : recipeskernel : recipessupport : recipestools : valgrind shadow dtcoprofile skmmhost dnsmasq apptrk debugprintflashimagehvtest hyperrelay ipc libhugetlbfs libppc mergefilespmeregexanalyzerpmetools usim uspdcp
93
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
flatten : Builds a "flattened" directory from the currently configured layers, with overlayed recipes removed and .$ bbappend f appended d d to their h corresponding d recipes bitbakefiles l layers flatten <directory>
TM
95
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
flatten : Builds a "flattened" directory from the currently configured layers, with overlayed recipes removed and .bbappend files appended to their corresponding recipes $bitbakelayersflatten<directory>
96
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
Layers
show_overlayed : lists highest priority recipes with the recipes they overlay as sub-items $bitbakelayersshow_overlayed
TM
97
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, t he Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
When modifying existing packages and images, or developing new ones : !!! create and work in your own custom layer !!!
avoids id having h i to t modify dif any of f the th SDK provided id d layers l isolates your changes for released layers
The f Th following ll i customization i i examples l are f fully ll contained i d within a new metacustom layer This custom layer, layer its recipes and source files are available with this slide deck
TM
99
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Make a new layer directory : <installdir>/metacustom Create a new metacustom/conf/ custom/conf/layer.conf layer.conf file from a copy of metafsl<arch>/conf/ <arch>/conf/layer.conf layer.conf and change as shown :
[metacustom/conf/ custom/conf/layer.conf layer.conf] ]
#Wehaveapackagesdirectory,addtoBBFILES BBPATH:="${BBPATH}:${LAYERDIR}" ${BBPATH}:${LAYERDIR} BBFILES+="${LAYERDIR}/recipes*/*/*.bb*" BBFILES+="${LAYERDIR}/images/*.bb*" BBFILE_COLLECTIONS+="custom "custom" " BBFILE_PATTERN_custom BBFILE_PATTERN_ custom :="^${LAYERDIR}/" BBFILE PRIORITY custom ="6 BBFILE_PRIORITY_custom BBFILE_PRIORITY_ "6"
Metadatafromhigherprioritylayers overridessamefromlowerpriority layers. Execute"bitbakelayersshowlayers" toseelayerpriorities
TM
100
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
101
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Copy the original image recipe to your custom layer: $cpmetafsl<arch>/images/ <arch>/images/fsl fslimage<variant>.bb\ metacustom/images/customimage.bb The require Th i <file> fil lines li i in th the new recipe i are no longer l sourced from the current, so add images/ to their relative paths
[ [custom t image.bb] i bb]
Edit the IMAGE_INSTALL variable in customimage.bb g to add or remove packages To : $build bitbake fcustomimage
TM
102
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Edit the new image recipe to require the settings from an existing image recipe, then customize : PR.=".1" IMAGE_INSTALL="bridgeutils utils" " require images/fsl images/fslimage<variant>. <variant>.bb bb
It is not possible in the custom recipe to remove packages k defined d f d by b the h required d external l image recipe
TM
103
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Note the leading space Check configuration result with : $ bitbake efslimage g <variant>|grep g p IMAGE_INSTALL
TM
104
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
dbg packages for all installed packages dev packages for all installed packages Development tools such as gcc, make, ... Debugging tools such as gdb and strace. Profiling tools such as oprofile, exmap, lttng and valgrind Makes an image suitable for development
TM
105
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
106
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
add ROOTFS_POSTPROCESS_COMMAND variable to the image recipe, specifying commands to execute before image generation [metacustom/images/customimage.bb] image bb] requirecustomrootfs_post_process.inc [customrootfs_post_process.inc] rootfs post process inc]
ROOTFS_POSTPROCESS_COMMAND+="rm rf ${IMAGE_ROOTFS}/boot;\ rm rf ${IMAGE_ROOTFS}/ ${IMAGE_ROOTFS}/usr usr/include /include;\ rm rf ${IMAGE_ROOTFS}/ ${IMAGE_ROOTFS}/usr usr/share/info /share/info;\ (find fi d${IMAGE_ROOTFS} ${IMAGE ROOTFS} type t d name"man" " "|xargs rm rf f );\ (find${IMAGE_ROOTFS} typed name"src "src" "|xargs rm rf );\ (find${IMAGE_ROOTFS} typed name"doc"|xargs rm rf );\ (find${IMAGE_ROOTFS} name"*python*"|xargs rm rf );\ (find${IMAGE_ROOTFS} name"elf_*86*"|xargs rm rf );\ (find${IMAGE_ROOTFS} name"elf_*64*"|xargs rm rf );\ (find${IMAGE_ROOTFS} name"*openbios "*openbios*" *"|xargs rm rf );\ (find${ ${IMAGE_ROOTFS} } name"powerpc p p fsl*"|xargs g rm rf );\ "
TM
107
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
108
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Unmanaged means : no recipe exists for creating and installing explicit files that must be deployed By using a mergefiles recipe your selection of unmanaged files and directories :
will be packaged as an installable .rpm which will be deployed after all other packages and before image files are created
It is preferable to copy the provided mergefiles.bb recipe and make modifications there
TM
109
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
By default no network interfaces are brought up automatically. automatically Either manually configure after boot : #iplink list available interfaces [...] #ifconfig <netif name>...
Or add an / /etc/network/interfaces / / files to RFS. See also : manpages.debian.net/cgi manpages.debian.net/ cgibin/ bin/man.cgi?query man.cgi?query=interfaces =interfaces
TM
110
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
System services to be launched at tb boot t and/or d/ managed d at runtime are defined in : To add additional services :
[recipescore] [...] initifupdown initrdscripts i it initscripts i t [...] systemd [...] [ ] sysvinit [...]
TM
111
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Prior to regenerating the RFS, make sure to clean the SSTATE for f any contributing t ib ti package k that th t requires i a rebuild because of reconfiguration or source code change: g
$bitbake ccleansstate <pkg> or $bitbake ccleansstate <image>
TM
112
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, t he Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
_<version> will set the ${PV} variable, that may be used in the recipe. Note the leading underscore '_ _' Yocto Y t will ill always l use th the highest hi h t revision i i number b of fa package. To use a specific package version :
$bitbake[cCMD]<pkg> <pkg>_<version> <version>
TM
114
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Make one or more directories to group your recipes, e g meta e.g. meta-custom/recipes custom/recipes-custom Make a sub-directory for each recipe, e.g. simple
write it a <pkg>_<version>.bb k i bb recipe, i e.g. simple_1.0.bb i l bb populate with the required explicit files, tar balls and patches metacustom conf layer.conf y recipescustom simple files simple.c simple_1.0.bb
newlayerfolder layer.conf fileformetacustom folderforcustomrecipes recipefolder
explicitsourcefile(s) .bbrecipe
TM
115
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
DESCRIPTION : package description (*) LICENSE : list of package source licenses. For closed source packages packages, use LICENSE= LICENSE="CLOSED" CLOSED LIC_FILES_CHKSUM : checksums of the license text in the recipe source code SECTION : section where package should be put HOMEPAGE : website with info about package AUTHOR : email address used to contact the original author or authors in order to send patches, forward bugs, etc. SRC_URI : list of source files - local or remote
(*)
(*)
TM
116
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
SRC_URI variable must list the locally stored source files Write a do_compile and do_install task
[metacustom/recipescustom/simple/simple_1.0.bb]
DESCRIPTION="Simple Simpleapplication" application SECTION="examples" LICENSE="MIT" LIC_FILES_CHKSUM= "file://${COMMON file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 LICENSE DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" PR="r0" SRC_URI="file://simple.c" S="${WORKDIR}/simple" { } p
.c sourcefromlocalfiles folder Outputfolder
do_compile() { do_compile() ${CC}${WORKDIR}/simple.c ${WORKDIR}/simple.c o${S}/simple } do_install() { do_install() install d${D}${bindir ${D}${bindir} } install m0755${S}/simple${D}${bindir ${D}${bindir} } }
TM
117
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
ppce500mcfsl_networkinglinux/simple/1.0r0/ deployrpms ppce500mc simple1.0r0.ppce500mc.rpm simpledbg1.0r0.ppce500mc.rpm simpledev1.0r0.ppce500mc.rpm image usr bin simple licensedestdir simple package packagessplit pkgdata pseudo simple simple simple.c simple.spec sysrootdestdir temp
${WORKDIR}
Installablebinary.rpm
Locationinrootfs image
Compiledbinary Sourcefile
TM
118
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
SRC_URI variable must list the source archive Use inheritautotools E.g. for the GNU hello package ( (source archive hi i is remotely t l stored t d on th the GNU mirror) i ):
[metacustom/recipescustom/hello/hello_2.8.bb]
DESCRIPTION="GNU GNUHelloworld application application" SECTION="examples" LICENSE="GPLv2+" LIC_FILES_CHKSUM="file://COPYING;md5=d32239bcb673463ab874e80d47fae504" PR="r0" r0 SRC_URI="${GNU_MIRROR}/hello/hello${PV}. ${PV}.tar.gz tar.gz" " SRC_URI[md5sum]="6a67cbbbc0420061ef938a9a2736fbd6" SRC_URI[sha256sum]= "e6b77f81f7cf7daefad4a9f5b65de6cae9c3f13b8cfbaea8cb53bb5ea5460d73" e6b77f81f7cf7daefad4a9f5b65de6cae9c3f13b8cfbaea8cb53bb5ea5460d73 inheritautotools gettext
TM
119
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Recipe must :
list source archive in the SRC_URI variable store additional make options in the EXTRA_OEMAKE variable provide manually written do_install task
pulls mtdutils v1.5.0 from upstream git and builds the package using its Makefile
TM
120
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
Unmanaged you have not created a recipe By using a mergefiles recipe your selection of unmanaged files and directories :
will ill be b packaged k d as an installable i t ll bl .rpm which will be deployed after all other packages and before image files are created
It is preferable to make a custom copy of the SDK-provided mergefiles recipe and make modifications there
TM
122
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
123
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
124
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Add the mergefilescustom package to a custom image Regenerate the image files As an alternative to copying individual files and di directories t i into i t files/merge fil / :
create a tar ball with an .md5sum file change the SRC_URI in the mergefilescustom recipe so that the archive is sourced update the tar ball and checksum when needed
TM
125
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, t he Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
This opens a new terminal window with a shell prompt within the SDK environment :
with PATH variable set to include the cross toolchain pkgconfig variables find the correct .pc files. configure finds all the necessary files working directory is changed to the ${S} directory
Within this devshell you can manually execute configure commands or compile.
TM
127
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Building the Linux kernel or u-boot using command line make allows very quick edit/build/test cycles. cycles Doing so in a bitbake devshell avoids the overhead incurred by the bitbake build framework.
Requirements :
No preparation is needed if a configured source tree already exists Otherwise run bitbake c<configure> g , so the source and build are set up for the correct platform
In a devshell one can optionally build a source tree copy that exists outside of the build environment
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
128
devshell
$ bitbake cconfigurevirtual/kernel $ bitbake cdevshell virtual/kernel
# pwd devshell console starts, prompt changes to '#' q qsdk sdk/3.8 /3.8r14.3/ r14.3/git git g <...>/linuxqoriq #unsetLDFLAGS required
#make j32all [...] WRAParch/powerpc/boot/uImage arch/powerpc/boot/uImage ImageName:Linux3.8.13rt9QorIQSDKV1.4 Created:TueSep314:41:102013 ImageType:PowerPCLinuxKernelImage( (gzip gzip compressed) DataSize:4199585Bytes=4101.16kB =4.01MB LoadAddress:00000000 EntryPoint:00000000 [...] [ ]
TM
129
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
devshell
$bitbake cconfigureuboot $bitbake cdevshell uboot
#pwd devshell console starts, prompt changes to '#' #unset tLDFLAGS #export xportCROSS_COMPILE=powerpcfsl_networkinglinux #makeP2041RDB_config optional manual configuration #make
TM
131
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
133
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
BBFILES = List of recipe files used by BitBake to build software BBPATH = Used by BitBake to locate .bbclass and configuration files, i.e. like a PATH variable
TM
134
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Append to <project_dir project_dir>/conf/ >/conf/local.conf local.conf : #deletesourcesafterbuild INHERIT+="rm "rm_work rm work" work"
When acutely running out of disk space during builds : Delete work directories for non-machine specific packages : $rm tmp/work/x86_64 tmp/work/x86_64linux/* $rm tmp/work/ppc* tmp/work/ppc*fsllinux/*
When multiple build projects exist, move their respective sysroots host binaries to a common folder, then create symlinks from each build project, e.g.: $mv atmp tmp/ /sysroots/x86_64 sysroots/x86_64linux.. $ln s../../../x86_64linuxtmp tmp/ /sysroots sysroots/x86_64 /x86_64linux
135
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
TM
TM
137
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
138
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
139
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
140
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
The SDK documentation bundles the Yocto community documentation files : [sdk_documentation/ sdk_documentation/pdf pdf] ] adtmanual.pdf manual pdf bspguide.pdf devmanual.pdf k kernel lmanual.pdf l df pokyrefmanual.pdf
TM
142
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ, StarCore and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, ColdFire+, CoreNet, Flexis, Kinetis, MXC, Platform in a Package, Processor Expert, QorIQ Qonverge, Qorivva, QUICC Engine, SMARTMOS, TurboLink, VortiQa and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. 2011 Freescale Semiconductor, Inc.
TM
TM