Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

The Yocto Project


Published on

An overview of the Yocto Project, for the Automotive Summit 2012.

Published in: Technology
  • very nice ...cleared almost all the doubts .Rest will be cleared, i hope at the time of actual build process.
    Are you sure you want to  Yes  No
    Your message goes here

The Yocto Project

  1. 1. Ross Burton, Userspace Architect for YoctoOpen Source Technology Centre at IntelThis session is a high level introduction to the Yocto Project
  2. 2. What is the Yocto Project?
  3. 3. Appears to be confusion in the automotive community about the Yocto Project.What is is, what it can offer and so on.We were invited by the LF to come here and clarify what Yocto is.So, the Yocto Project is...
  4. 4. Umbrella project
  5. 5. An umbrella project.You dont download or install the Yocto Project itselfJust like you dont install the Apache Foundation
  6. 6. Build environmentand development tools
  7. 7. An embedded build environment and development toolsSpecifically, a build system (bitbake), package metadata (oe-core),Eclipse plugin, Application Development Toolkit (deployable toolchain)
  8. 8. x86 • ARMMIPS • PowerPC
  9. 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 specific platform supportEverything is cross compiled, so no "but it worked for x86" problems
  10. 10. Collaboration space
  11. 11. Finally YP is a collaboration space, providing a forumfor users to share their problems and solutionsPublic mailing lists and weekly phone conferencePAUSE
  12. 12. So many choices…
  13. 13. When picking a platform whats the difference between yocto andandroid, linaro, tizen, buildroot, baserock, or hacking yourfavourite desktop distribution...
  14. 14. …why pick the Yocto Project?
  15. 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. 16. Some are easy to hack on,but you’ll regret it later
  17. 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 different compiler flagsIts not that easy any more
  18. 18. Designed for the long term
  19. 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. 20. Won’t fall apart in time
  21. 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. 22. Who is in the Yocto Project?
  23. 23. Not a complete list
  24. 24. Hardware manufacturers
  25. 25. i.e. Intel, Texas Instruments, Freescale
  26. 26. Embedded OSVs
  27. 27. i.e. Wind River, MontaVista, Enea Software, Mentor GraphicsCommercial supported linux from these vendors
  28. 28. Consultants and individuals
  29. 29. Consultants, small and largeindividuals "scratching an itch" for their own projects
  30. 30. Advisory Board
  31. 31. finally 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 first action was to name itself "advisory board" ratherthan "steering group" to reflect that it offers advice and input anddoesnt control the project technical direction entirely in thehands of the architects and maintainers
  32. 32. How does it work?
  33. 33. Enough about what the Yocto Project can doHow does it work?
  34. 34. It’s all about the layers
  35. 35. A YP distribution is assembled from a number of layersLayers are modular and you can combine layers from different sourcesAn example
  36. 36. Bitbake
  37. 37. Build system
  38. 38. oe-coreBitbake
  39. 39. core metadatatoolchain, kernel, eglibc, cairo, gstreamer, Xorg, Wayland (soon), gtk/qt
  40. 40. meta-intel oe-core Bitbake
  41. 41. unless you happy with a qemu emulated machine youll need a bspIntel hardware BSP, such as cedar trail (atom, netbook/industrial), fish riverisland 2 (atom, digital signage, smart services), jasper forest (xeon, server)
  42. 42. meta-yoctometa-intel oe-core Bitbake
  43. 43. Distribution policy(Poky in meta-yocto for historial reasons)
  44. 44. Let’s build something!
  45. 45. Enough talk, lets pretend to build something.
  46. 46. $ wget… /poky-denzil-7.0.tar.bz2$ tar xjf poky-denzil-7.0.tar.bz2$ cd poky-denzil-7.0
  47. 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. 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. 49. First you need to source a shell script to setup the environment.Now lets have a quick look at the configuration file
  50. 50. # BB_NUMBER_THREADS = "4"# PARALLEL_MAKE = "-j 4"MACHINE ??= "qemux86"…#MACHINE ?= "qemuarm"#MACHINE ?= "qemumips"#MACHINE ?= "atom-pc"#MACHINE ?= "beagleboard"
  51. 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. 52. $ bitbake core-image-minimal
  53. 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
  54. 54. Currently 7 running tasks (5452 of 9438):0: webkit-gtk-1.8.2-r1 do_compile (pid 27137)1: qt4-embedded-4.8.1-r48.1 do_compile (pid 27129)2: qt4-x11-free-4.8.1-r46.1 do_compile (pid 27096)3: systemtap-1.8+git1…-r0 do_compile (pid 27130)4: gmp-5.0.5-r0 do_package_write_rpm (pid 27131)5: libglade-2.6.4-r4 do_package_write_rpm (pid 27134)6: nfs-utils-1.2.3-r5 do_unpack (pid 27187)
  55. 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. 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. 57. When it finishes building the results are in the deploy directoryHere we can see the constructed root file system as a cpio archive,a bare filesystem, 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 configurable per build and per machine. Thisbuild was for a fairly standard Intel system so the final 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 fix a bug.
  58. 58. Hob
  59. 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 configure an image and monitor the build2nd iteration, web-based. currently under development.
  60. 60. Now what?
  61. 61. So thats how to build an image, but what could we do with it?Two quick ideas
  62. 62. Virtualisation
  63. 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. 64. Specialised subsystem
  65. 65. Cars are complicated beasts these days with many processors performing specialised rolesDashboard, engine management, and so on.
  66. 66. Q&A
  67. 67. Thanks!
  68. 68. Creditscars2.jpg Commons 2.0 BY-NC-SA (C) Piyapat Ch.cables.jpggroup.jpgtumble.jpgumbrella.jpg(C) David Stewart, All Rights Reserved, Used with Commons 2.0 BY (C) Jim Pennuccicpus.jpg Commons 2.0 BY (C) Jason Rogerspeople.jpg Commons 2.0 BY (C) Roberto Trmminifigs.jpg Commons 2.0 BY (C) peter duttonengineer.jpg