Published on

An overview of OpenEmbedded for embedded Linux systems. Presentation given for the Portland Linux User Group Advanced Topics meeting on February 17, 2010.

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. OpenEmbedded Scott Garman [email_address] PLUG Advanced Topics February 17, 2010
  2. 2. What is OpenEmbedded? <ul><li>A set of recipes and metadata to build Linux distributions for embedded devices with the BitBake build system
  3. 3. A framework for creating customized embedded Linux distributions
  4. 4. Å ngstr ö m is one of the more popular OE-based distros </li></ul>
  5. 5. History: The OpenZaurus Project
  6. 6. Common Approaches <ul><li>The state of embedded Linux distros: </li><ul><li>Minimal, no-frills installs (no package mgmt, OS comes as a static disk image)
  7. 7. Taking a well-known Linux distro (Debian, RedHat) and “butchering” it by ripping out package mgmt and documentation
  8. 8. Result: Need to take your device off-line to update software, re-flash completely </li></ul></ul>
  9. 9. The OpenEmbedded Approach <ul><li>BitBake – A cross-compiling and build system inspired by Gentoo's portage </li><ul><li>Flexible, fine-grained control over compile-time options and optimization levels </li></ul><li>IPKG – A package format inspired by Debian's dpkg </li><ul><li>Robust dependency resolution, easy to define package sets for different embedded applications, live upgrades </li></ul></ul>
  10. 10. OpenEmbedded Stats <ul><li>As of February 2010: </li><ul><li>More than 1,900 software packages available
  11. 11. More than 250 machine definitions
  12. 12. More than 25 machine/package configurations (distros) </li></ul></ul>(estimates based on directory/configuration file counts)
  13. 13. Getting Started <ul><li>Read the Getting Started wiki pages for your host distribution (do not skip!)
  14. 14. Download BitBake
  15. 15. Checkout the OpenEmbedded repository (git)
  16. 16. Create your local.conf file, which defines which distro your are building for which target machine </li></ul>
  17. 17. local.conf # Where BitBake should download sources to DL_DIR = “/oe/build/sources” # BitBake recipe files BBFILES = “/oe/openembedded/recipes/*/*.bb” # Hardware, distribution, and image filesystem MACHINE = “gumstix-connex” DISTRO = “angstrom-2008.1” IMAGE_FSTYPES = “jffs2”
  18. 18. Start Baking Those Bits! <ul><li>BitBake can build individual packages, but you will probably want to start by building one of the package sets that gets rolled into a filesystem image </li><ul><li>bitbake console-image
  19. 19. See “Useful targets” on the OE wiki for a list of common images (X11 support, GPE environment, etc) </li></ul><li>This will take a really long time (hours) </li></ul>
  20. 20. More About BitBake <ul><li>Python-based build tool which uses “recipes” to know how to build a package </li><ul><li>Downloads sources into a local cache so multiple builds can re-use
  21. 21. Knows about autoconf and other build methods </li></ul><li>Will build all dependencies of your package from scratch (including compiling the cross-compiler and then running compiles of your packages in qemu) </li></ul>
  22. 22. BitBake Demos Machine configuration: conf/machine/gumstix.conf Package recipe: recipes/xscreensaver/ Task recipe: recipes/tasks/
  23. 23. Disadvantages of OpenEmbedded <ul><li>Vendor-supplied methods of setting up the device may be faster
  24. 24. BitBake can take a lot of time and disk space to compile everything
  25. 25. BitBake's power and flexibility comes at the cost of some complexity
  26. 26. If you don't need/care about package management/live updates, OE loses many advantages </li></ul>
  27. 27. When to Use OpenEmbedded <ul><li>Your company or organization is developing many embedded products using different devices; you want to standardize on an environment to speed up development
  28. 28. You need a robust package management system for deploying live updates to your devices in the field
  29. 29. You already have in-house expertise with OE/BitBake and want to leverage it </li></ul>
  30. 30. Resources and Credits <ul><li>
  31. 31.
  32. 32.
  33. 33. OpenEmbedded for Deep Embedded Systems: </li><ul><li> </li></ul><li>Free Electrons OpenEmbedded Training: </li><ul><li> </li></ul></ul>