Nadeem N. Bagban
Foreword
If we look back at the last 15 years of the field of embedded systems, we will see that everything has changed radically. Embedded systems have become more and more powerful and have gained new functionalities. Today, you can find "embedded" quad-core systems with 1 GB of RAM and several GBs of storage, comparable to a few-years-old desktop computer. Nowadays, it is not unusual that the requirements of an embedded system are low consumption, graphic acceleration, multimedia capabilities, sufficient storage, and so on.
On the software side, if we look back again at those 15 years, we will notice that most of the Linux-running embedded systems at that time were in-house developments built from the ground up. Their main functionality was to boot the device and run the specific application (usually not graphical) the device was designed for. A typical system from those days contained a minimal Linux kernel, a small C library (uclibc), BusyBox as the base user space, and then the specific application or set of applications.
As the hardware became more powerful and gained more functionalities, the requirements of the software also increased. With embedded systems becoming powerful enough to run distributions that were considered mostly for desktops (such as Debian or Ubuntu), it's no longer as easy as building a minimal set of software packages (uclibc, BusyBox, and a command-line application) anymore. You now have to choose between different windowing systems (X11, Wayland, and so on) and different graphic libraries (Qt, GTK, and so on). Maybe your hardware has dedicated units for video processing (VPU) or graphics processing (GPU) and is running its own firmware, and so on.
All of this extra difficulty is what makes an embedded software engineer look for new tools that ease their work and speed up the development. This is the context where different Linux build systems began to appear.
The first build system to show up was Buildroot. It has its roots in the uClibc project. The initial goal of Buildroot was to build a root filesystem based on the uclibc library for testing purposes. Buildroot is based on a Makefile's structure, kconfig as the configuration tool, and patches that apply to the different software packages before being built. These days, Buildroot supports multiple architectures, and apart from root filesystem images, it also can build kernel and bootloader images.
A bit later, OpenEmbedded was born. Its goal is a bit different because it is defined as a Linux distribution builder. OpenEmbedded is based on recipes interpreted by the BitBake build engine. BitBake in turn is a tool derived from portage (Gentoo's distribution package manager). An interesting feature about OpenEmbedded is that the recipes can specify dependencies between packages, and later on, BitBake parses all the recipes and creates a queue of tasks in the correct order to fulfill the dependencies. Two examples of distributions created with OpenEmbedded are Angstrom and OpenMoko.
Another OpenEmbedded-based distribution was Poky Linux. This has special importance because it's the way that leads to Yocto. The Yocto Project is an open source project whose goal is to provide the tools that help build Linux-based embedded systems. Under the umbrella of the Yocto Project, there are multiple software projects, such as Poky, the BitBake build engine, and even OpenEmbedded-Core. These are probably the main projects, but by no means, the only projects. In this new phase, Poky (the former Linux distribution) became the reference system of the Yocto Project, being the build system of the Yocto Project these days and using the BitBake build engine and OpenEmbedded-Core metadata (recipes, classes, and configuration files) underneath. This is the reason people tend to confuse the Yocto Project with the Poky build system.
Poky is a nearly complete solution for embedded software engineering teams. It allows you to create a distribution for your hardware. It also allows you to create a software development kit (SDK) tailored for your distribution. This SDK may be used by other engineers in a team to compile the user-space applications that will later run on your Linux system. The price to pay for the functionality Poky provides is a steep learning curve compared to other build systems.
Alex Gonzlez's contribution with Embedded Linux Projects Using Yocto Project Cookbook is of great help to overcome that steep learning curve. The practical focus of this book and its structure in the form of short recipes help you resolve specific problems that you may find along the way when building an embedded product.
So please enjoy and learn from this book. In return for the invested time, you will get deeper knowledge of embedded system development with the help of the Yocto Project.
Javier Viguera
Embedded Software Engineer at Digi International
About the Author
Alex Gonzlez is software engineering supervisor at Digi International and one of the maintainers of the Digi Embedded Yocto distribution.
He started working professionally with embedded systems in 1999 and the Linux kernel in 2004, designing products for voice and video over IP networks, and followed his interests into machine-to-machine (M2M) technologies and the Internet of Things.
Born and raised in Bilbao, Spain, Alex has his second home in the UK, where he lived for over 10 years and received his MSc in communication systems from the University of Portsmouth. He currently lives in La Rioja, where he enjoys photography and a good Riojan wine.