1. Ross Burton, Userspace Architect for YoctoOpen Source Technology Centre at IntelThis session is a high level introduction to the Yocto Project
2. What is the Yocto Project?
3. Appears to be confusion in the automotive community about the Yocto Project.What is is, what it can oﬀer and so on.We were invited by the LF to come here and clarify what Yocto is.So, the Yocto Project is...
4. Umbrella project
5. An umbrella project.You dont download or install the Yocto Project itselfJust like you dont install the Apache Foundation
6. Build environmentand development tools
7. An embedded build environment and development toolsSpeciﬁcally, a build system (bitbake), package metadata (oe-core),Eclipse plugin, Application Development Toolkit (deployable toolchain)
8. x86 • ARMMIPS • PowerPC
9. We support all of the big architectures.oe-core builds for qemu machines for all of these architecturesEnsures that the core builds for everythingOptional BSPs for speciﬁc platform supportEverything is cross compiled, so no "but it worked for x86" problems
10. Collaboration space
11. Finally YP is a collaboration space, providing a forumfor users to share their problems and solutionsPublic mailing lists and weekly phone conferencePAUSE
12. So many choices…
13. When picking a platform whats the diﬀerence between yocto andandroid, linaro, tizen, buildroot, baserock, or hacking yourfavourite desktop distribution...
14. …why pick the Yocto Project?
15. YP is Linux for embedded, from a small ARM board to mission critical xeon clustersBuilds a custom distro suited to your needsEasy to add, remove, or change componentsOpen development process, no code drops or license complications
16. Some are easy to hack on,but you’ll regret it later
17. Especially if your target is x86, its easy to start with adesktop distribution and chop pieces outBuilding new pieces and rebuilding the pieces that need changesBut when you need to change hardware, or rebuild with diﬀerent compiler ﬂagsIts not that easy any more
18. Designed for the long term
19. Yocto is designed for long term useSix monthly release cycle but maintained release branchesCommercial support from OSVsTools to help do the mundane distribution building- Generate package repos and disk images- Static release archives for license compliance
20. Won’t fall apart in time
21. Yocto wont surprise you late in product developmentReproducable builds for the entire systemClear process for updates - easy to make the changesand publish a new image or repoGPL compliant - trivial to public source *and* build instructions
22. Who is in the Yocto Project?
23. Not a complete list
24. Hardware manufacturers
25. i.e. Intel, Texas Instruments, Freescale
26. Embedded OSVs
27. i.e. Wind River, MontaVista, Enea Software, Mentor GraphicsCommercial supported linux from these vendors
28. Consultants and individuals
29. Consultants, small and largeindividuals "scratching an itch" for their own projects
30. Advisory Board
31. ﬁnally should mention the advisory board.Yocto is a project at the Linux Foundation, not owned by anyparticular companyThe advisory board is comprised of reps from member companiesworking on YoctoThe boards ﬁrst action was to name itself "advisory board" ratherthan "steering group" to reﬂect that it oﬀers advice and input anddoesnt control the project technical direction entirely in thehands of the architects and maintainers
32. How does it work?
33. Enough about what the Yocto Project can doHow does it work?
34. It’s all about the layers
35. A YP distribution is assembled from a number of layersLayers are modular and you can combine layers from diﬀerent sourcesAn example
41. unless you happy with a qemu emulated machine youll need a bspIntel hardware BSP, such as cedar trail (atom, netbook/industrial), ﬁsh riverisland 2 (atom, digital signage, smart services), jasper forest (xeon, server)
42. meta-yoctometa-intel oe-core Bitbake
43. Distribution policy(Poky in meta-yocto for historial reasons)
44. Let’s build something!
45. Enough talk, lets pretend to build something.
46. $ wget http://downloads.yoctoproject.org/… /poky-denzil-7.0.tar.bz2$ tar xjf poky-denzil-7.0.tar.bz2$ cd poky-denzil-7.0
47. One of the downloads from the Yocto Project is Poky, a referencedistribution. This is basically Bitbake, oe-core, and meta-yoctoglued together for convenience Grabbing and extracting the tarballof the 7.0 "denzil" release is as youd expect
48. $ ./oe-init-build-env### Shell environment set up for builds.### You can now run bitbake <target>‘Common targets are: core-image-minimal core-image-sato…$ emacs conf/local.conf
49. First you need to source a shell script to setup the environment.Now lets have a quick look at the conﬁguration ﬁle
51. Just a small fragment of the options available. Defaults are allreasonable and it will successfully build out of the box.For a faster build, change the parallel options. My build machine isa quad core with hyperthreading, so I set both of those to 8 to keepit busyDefault target is x86 on qemu. This is trivially changed by simplychanging the MACHINE variable.Other options include where to keep downloaded tarballs; location ofany mirrors; features to enable such as multiarch, installing thetoolchain in the image for development, what package format to use,and more.
52. $ bitbake core-image-minimal
53. Then, you can run bitbake with the name of the target you wantTargets can be anything - images, packages, or operations.Lets build core-image-minimal, a small system that boots to aconsole good start to build up from if youre making asingle-purpose system
55. While bitbake is running youll see a report of what its doing,something like this. This isnt actually the output fromcore-image-minimal but a colleagues world build that happened to berunning when I was writing the slides. Poor guy is in for a longwait, webkit and two qt builds.
56. $ ls tmp/deploy/images/…core-image-minimal-atom-pc-20120918205848.hddimgcore-image-minimal-atom-pc-20120918205848.isocore-image-minimal-atom-pc-20120918205848.rootfs.cpio.gzcore-image-minimal-atom-pc-20120918205848.rootfs.ext3
57. When it ﬁnishes building the results are in the deploy directoryHere we can see the constructed root ﬁle system as a cpio archive,a bare ﬁlesystem, a bootable ISO image, and a disk image.Generally Id be writing the disk image to a fast USB stick with ddand booting from that for testing.The build output is conﬁgurable per build and per machine. Thisbuild was for a fairly standard Intel system so the ﬁnal output istypically bootable on those. Build for a say beagleboard and youllget kernel, bootloader and rootfs tarballs to write a SD card.alongside the images directory there is the package repository thatwas used to construct the root fs. This can be shared on the networkand used as a normal repository, ie install some development ordebug symbol packages to ﬁx a bug.
59. Hob is a graphical interface to bitbakedemo gremlins have decided to break hob on this laptop - works on my build machine1st iteration, gtk+ application to conﬁgure an image and monitor the build2nd iteration, web-based. currently under development.
60. Now what?
61. So thats how to build an image, but what could we do with it?Two quick ideas
63. I expect virtualisation to be common in next-generation automotivesystems as individual processors become more powerful and logicallyseparate systems are ran in virtual machines on fewer physicalprocessors.Because systems built by Yocto can be trivially tuned to be exactlywhat is required and nothing else they are a good match forvirtualised systems, both as a minimal host that does simply managesthe virtual machines, or as a specialized virtual machine itself.
64. Specialised subsystem
65. Cars are complicated beasts these days with many processors performing specialised rolesDashboard, engine management, and so on.
68. Creditscars2.jpghttp://www.ﬂickr.com/photos/15443451@N00/516336421/Creative Commons 2.0 BY-NC-SA (C) Piyapat Ch.cables.jpggroup.jpgtumble.jpgumbrella.jpg(C) David Stewart, All Rights Reserved, Used with Permission.tools.jpghttp://www.ﬂickr.com/photos/22749993@N08/5386712834/Creative Commons 2.0 BY (C) Jim Pennuccicpus.jpghttp://www.ﬂickr.com/photos/17642817@N00/4553998825/Creative Commons 2.0 BY (C) Jason Rogerspeople.jpghttp://www.ﬂickr.com/photos/29370225@N03/6292167005/Creative Commons 2.0 BY (C) Roberto Trmminiﬁgs.jpghttp://www.ﬂickr.com/photos/40646519@N00/305410323/Creative Commons 2.0 BY (C) peter duttonengineer.jpg