Yocto Project Introduction

From eLinux.org
Revision as of 10:19, 3 August 2012 by Tim Bird (Talk | contribs) (The big picture)

Jump to: navigation, search

This is an introduction about the Yocto Project, written from the point of view of someone somewhat familiar with embedded Linux development and embedded Linux distribution maintenance. In my own investigation of the Yocto Project, I found that there were a few key concepts that I didn't find discussed or presented anywhere. I'd like to fix that with this page. The purpose of this page is to give a broad overview of how the project technically works, so that the learning curve for people approaching the Yocto Project for the first time is lessened.

The big picture

The Yocto Project is a collection of tools and meta-data (defined in a bit) that allows a developer to build their own custom distribution of Linux for their embedded platform. This could be a developer at a semi-conductor company, who wishes to develop board support for one of their hardware platforms, or it could be an independent developer writing a complete software stack for a product they are making. It could also be a group of engineers developing a distribution for use in multiple devices or products -- such as an embedded Linux distribution company, or the "systems" team at a company that produces multiple embedded Linux products.

The main parts

The main parts of the Yocto Project are the build system, the package meta-data, and the developer tools. The build system uses a tool called "bitbake" to process the meta-data and produce a complete Linux distribution. By design, the build system produces not just the software that will run on the target, but also the development tools used to build that software. It basically starts completely from scratch, building all the tools needed construct the software, and then using those to build the kernel, libraries, and programs that comprise a Linux distribution. Finally, it prepares the resulting software into appropriate bundles (including packages, images, or both) for deployment to the target device and in preparation for application development and debugging.

Build system

Bitbake has a user-manual at http://docs.openembedded.org/bitbake/html/ . (As of August, 2012, this document appears to be a bit dated, and missing a few items of importance.) Basically, bitbake can be thought of as "make" on steroids. It basically performs the same type of functionality as make: which is determining the actions to perform based on what the user requests at the command line and the project data and existing build state, and then performing those actions.

Bitbake uses it's own new syntax for expressing:

  • the tasks to perform
  • the relationships (dependencies) between those tasks
  • the variables that control how the tasks are performed
  • the actual build instructions (e.g. compiler commands, linker commands, packaging commands, etc.)

Bitbake differs from make in several key ways. The first, is that it has a global view of the task list for a distribution. That is, it reads the entire set of files related to

The meta-data