Dive into Yocto, Workshop Report
The "Dive into Yocto, Workshop" was organized by Zilogic Systems, on 12th and 13th September. About 22 people from various organizations, including Burndy, Identiv, Ingersoll Rand, Microchip and Visteon, attended the workshop.
Day 1: Root Filesystems and BitBake
The workshop started with participants, getting their laptops setup with the virtual machines. VirtualBox with a Debian image was used as the build system. Qemu emulating an ARM Versatile Platform Board was used as the target. There were a few hiccups with some laptops, mostly with VirtualBox not being able to run the 64-bit Debian Image.
With most issues resolved, the workshop started with the first session
"Building a Root FS", by Vijay. Vijay started with a very minimal
"Hello World" filesystem. The root filesystem consisted of only a
statically compiled hello world program, stored as /bin/sh
. The
filesystem was booted in the emulated target machine. As a next step
bash
was cross-compiled, installed into the rootfs and booted in the
emulated target. The same was done with coreutils
. Then library
dependencies were demonstrated by building less
and libncurses
.
In the second session "BitBake, Introduction", Vijay started out with
the limitations of make
and why a separate integration build system
is required. He then explained bitbake
using a simple sandwich
project, where BitBake recipes created text files. The concept of
dependencies were also shown with one recipe using the text file
created by another recipe.
In the third session "Rootfs with BitBake", BitBake recipes for
building a root filesystem, with bash and coreutils were provided. The
recipes were improved to move out common build tasks to a separate
BitBake class file. The recipes were further simplified by using
BitBake’s Fetcher
module for fetching and unpacking.
In the fourth session "BitBake with Layers", the concept of layers and
its use cases were introduced. The bblayers.conf
file and the
config. file processing order, was explained. This was followed by a
example project called lunch
, to demonstrate layers. The project was
used to demonstrate, the addition of a new layer, and usage of
.bbappend
files to modify recipes in other layers.
This brought us to the end of the first day, establishing the foundation required for understanding Yocto.
Day 2: The Yocto Project
The second day, we had the "Getting Started with Yocto" session. The
session started with the limitations of writing our own recipes. And
then the Yocto Project, its history and relationship with the
OpenEmbedded project was covered. Building a simple ARM rootfs with
poky
was shown next. A pre-built sstate cache was used to accelerate
the build process. Build process customization by setting the
IMAGE_INSTALL
variable was shown next. Further customization by
creating additional layers was demonstrated next. A new layer was
created with a image recipe for creating a tiny filesystem with bash,
coreutils and less. The layer was further extended to add a custom
distro, with debian packaging.
Other features of poky
like Machine configuration, package groups
and sstate cache were introduced.
The feedback was really positive, people liked the overall flow of the workshop. People who were already familiar with Yocto, got a better insight into the inner workings of the build system. And those who were new to build systems got a kick start introduction, to the Yocto. Thanks to all people for having participated in the workshop!