Improved version of our popular “Embedded Linux system development” course

Embedded Linux system development courseOur Embedded Linux system development course has been for many years one of our most popular training courses. It is our course targeted at engineers who are getting started with Linux on embedded systems, and need to understand the big picture, but with a sufficiently deep level of details. It describes the overall structure of an embedded Linux system, and teaches step by step how it is build: cross-compilation toolchain, bootloader, Linux kernel, minimal root filesystem, storage, integration of user-space components, build systems, etc.

Even though this course has seen many small updates throughout the years to use newer versions of the different software components and various improvements and updates to the training materials, the course had remained fundamentally the same for quite some time. However, we had identified a number of areas on which we wanted to make some more fundamental changes, and we’ve taken the chance of the summer season to prepare a brand new version of this course, with many major changes and improvements.

This updated version of the course is now available, and as usual with Bootlin its training materials are freely available:

Embedded Linux system development courseCompared to our previous version of this course, the main changes are:

  • Major rewrite of the lecture section on bootloader and firmware, to better cover UEFI, Trusted Firmware (TF-A), Trusted Execution Environment, and overall reflect the increased complexity of the booting process of modern embedded platforms. The corresponding practical lab also makes use of TF-A to illustrate this.
  • Addition of a new section on Accessing hardware devices with many details on the Device Tree, how to identify kernel drivers for devices, and what are the typical interfaces in Linux to access hardware. This is illustrated by a new lab in which we manipulate GPIOs, LEDs, add support for a sound card connected over USB, and add support for a joystick connected over I2C, which extending the Device Tree and manipulating pin-muxing.
  • Removal of the practical lab on flash filesystems, due to the progressively reducing number of platforms that use raw NAND flash. We still have a lecture on how raw flash memory is handled in Linux (MTD, UBI, UBIFS), but no longer a practical lab, in order to spend time on topics that are more commonly relevant.
  • A major rework of the final part of the course which covers the user-space stack, with the aim of showing how to build a reasonably realistic product:
    • We explain and demonstrate how to cross-compile and integrate manually libraries and applications in an embedded Linux system. We illustrate this by cross-compiling alsa-lib and alsa-utils to play audio with our USB audio device, libgpiod to manipulate GPIOs, and ipcalc to manipulate the Meson build system.
    • We then explain the concepts and principles behind embedded Linux build systems (with a focus on Buildroot and Yocto), as well as binary distributions. We illustrate this by using Buildroot to build a complete embedded Linux system, which uses mpd as an audio player daemon.
    • We then cover open-source licensing topics.
    • We then cover the major Linux software stacks for graphics, multimedia, networking, as well as systemd and D-Bus. We illustrate this by changing our system to use systemd as an init system, and use udev for device management.
    • Finally, we cover application development and debugging: how to cross-compile your own application, how to debug it, using strace, ltrace, gdb, perf, valgrind. We illustrate this by implementing an application that allows to use an I2C-connected joystick to control the audio playback of an audio playlist. This application is then analyzed and debugged using the relevant debugging tools.
  • The real-time Linux part of the course has been removed from the course, as we now have a dedicated real-time Linux with PREEMPT_RT course, which goes into many more details on this topic.

The course is currently delivered with practical labs done on the STM32MP1 platform from ST, but we intend to port it on the BeagleBone Black and Qemu as well. In any case, the course is very generic and relevant for all embedded Linux projects, regardless of the specific hardware platform being used.

This new edition has already been delivered to several customers, both on-line and on-site. All our slots for 2022 are already fully booked, but we do offer for 2023:

  • A public on-line session on January 30, 31, February 2, 3, 6, 7, 9, 2023, from 2:00 PM to 6:00 PM UTC+1. Registration is accessible directly online. This is the best option to train a few engineers from your team.
  • Private sessions, either on-line or on-site, upon request. You can contact us to discuss the details and get a quote.

We are really looking forward to continuing to share our knowledge about embedded Linux with even more engineers, and are confident that this updated version of the course will make this knowledge sharing even more efficient and fruitful.

Bootlin toolchains 2022.08 released

Bootlin toolchains 2022.08The toolchains.bootlin.com service provides freely available pre-compiled cross-compilation toolchains for a wide range of CPU architectures and configurations.

We have just published version 2022.08 of these toolchains, which are now built using Buildroot 2022.08. Thanks to this the toolchains now use the following components:

  • The bleeding-edge toolchains are based on gcc 12, binutils 2.39, gdb 12, kernel headers 5.4, glibc 2.35 or musl 1.2.3 or uclibc-ng 1.0.42.
  • The stable toolchains are based on gcc 11, binutils 2.38, gdb 11, kernel headers 4.9, glibc 2.35 or musl 1.2.3 or uclibc-ng 1.0.42.

Even though glibc 2.36 has been recently released, it still caused too many issues to be integrated in this toolchain release. glibc 2.36 will be part of a future update of these toolchains.

We also have a few new toolchains that appeared:

  • Toolchains for the OpenRISC CPU architecture, based on the glibc C library. We already had toolchains for OpenRISC, but not using glibc.
  • We now have both stable and bleeding-edge toolchains for the x86-64-v2, x86-64-v3 and x86-64-v4 architecture variants. We used to have only bleeding-edge toolchains for these variants as only the latest gcc had support for them.

The only toolchain that was not updated as part of this release is the m68k Coldfire toolchain, as we currently have a regression on elf2flt. This will hopefully be adressed in the future.

If you have feedback or encounter any issue in using these toolchains, the project issue tracker is where you should go.

Welcome to Théo Lebrun!

Welcome on board!We are happy to announce that Théo Lebrun has joined our engineering team, as of September 9, 2022, just in time to attend the Embedded Linux Conference Europe with the rest of the Bootlin engineering team.

Théo has just graduated from the Université de Technologie de Belfort Montbéliard, and did his final 6-month internship at Bootlin, where he worked on PipeWire and support for the A2B Audio Bus in the Linux kernel.

Théo is joining our team based in Lyon, where Alexandre Belloni, Grégory Clement and Kamel Bouhara are based.

Welcome on board Théo!

Bootlin at Linux Plumbers conference 2022

Next week, almost the entire Bootlin team will be at the Embedded Linux Conference Europe in Dublin, see our previous blog post on this topic. We will give four talks at this event, on a variety of Linux kernel and embedded Linux topics.

During the same week, also in Dublin albeit in a different location, will take place the Linux Plumbers conference. Bootlin engineer Miquèl Raynal will give a talk at Linux Plumbers, as part of the IoTs a 4-Letter Word micro-conference. Miquèl’s talk will discuss Linux IEEE 802.15.4 MLME improvements, as Miquèl has been working for several months on bringing improvements to the 802.15.4 stack in the Linux kernel.

Buildroot Summer 2022 Hackathon

Buildroot is an easy-to-use and popular embedded Linux build system, used by many as an alternative to Yocto/OpenEmbedded. Bootlin has expertise in both build systems, and has in particular been a long time contributor to the Buildroot project. Bootlin CEO’s Thomas Petazzoni is one of the co-maintainers of the project, to which he has contributed over 5000 patches.

From July 23 to July 27, four members of the Buildroot community gathered in the sunny south of France for a 5-day long hackathon on Buildroot: Yann Morin, Romain Naour from Smile, Arnout Vandecappelle from Mind and Thomas Petazzoni from Bootlin.

The main goal of this hackathon was to reduce the backlog of patches accumulated in the project’s patchwork, the tool used in the Buildroot community to record all contributed patches and make sure all of them are handled: reviewed, accepted, or potentially rejected.

When we started the hackathon, the backlog of patches cumulated to over 410 patches, and the hackathon allowed to reduce the backlog to 150-160 patches, especially taking care of all patches contributed before the beginning of 2022. In total, over 400 patches were merged during the hackathon in the Buildroot Git repository, which obviously is more than the reduction of the backlog of patches. This is mainly due to additional patches contributed during the hackathon itself (the community has been very active at submitting new patches!) and due to the review process triggering additional ideas or rework that required more patches.

Here is a summary of the main highlights that were merged during this hackathon:

  • New package for ntpsec, a “a secure, hardened, and improved implementation of Network Time Protocol”
  • Some cleanup of the genimage configuration files to use shortcuts for common GPT partition GUIDs
  • Test cases added for the get-developers script
  • Addition of several new defconfigs for multiple RISC-V 64-bit noMMU platforms: Sipeed MAIX-Bit, Sipeed MAIXDUINO, Sipeed MAIX-Dock, Sipeed MAIX-Go and Canaan KD233, based on Canaan K210 SoC.
  • Migration of the .py to .pyc byte-compilation to use the built-in Python infrastructure instead of a custom script.
  • Addition of support for version 12 of the GCC compiler. This means that GCC 11 is now the default in Buildroot, and support for GCC 9 has been removed.
  • Many new Python packages added: python-lark, python-typeguard, python-mypy-extensions, python-typing-inspect, python-rfc3987, python-ruamel-yaml, python-pyrsistent, python-pylibfdt, python-maturin
  • Rust has been bumped to 1.62.0
  • New package for mender-connect, a daemon responsible for handling bidirectional (websocket) communication with the Mender server
  • Some fixes to the glslsandbox-player package
  • New package for OpenSC, a set of libraries and utilities to work with smart cards.
  • New package for hyperfine, a benchmark tool written in Rust. It evaluates execution time of a command passed in arguments and make a relative comparison if multiple arguments are used at the same time.
  • New package for hawktracer, a highly portable, low-overhead, configurable profiling tool built in Amazon Video for getting performance metrics from low-end devices.
  • New package for vis-network, a JS library to display dynamic, automatically organised, customizable network views
  • New package for Avocado, an automated testing suite containing tests for various subsystems.
  • New package for freeradius-server, an open source server which implements a protocol for remote user Authorization, Authentication and Accounting.
  • New package for volk, a Vector-Optimized Library of Kernels. It is a library that contains kernels of hand-written SIMD code for different mathematical operations.
  • A rework of the LTO handling: LTO support is now always enabled in GCC, and the new option BR2_ENABLE_LTO allows to request LTO to be used by packages that support it.
  • New package for the Qt 6 library, separate from the current Qt 5 package. For now, the Qt 6 package is very minimal: it only packages qt6base, and only the core of Qt, not even the GUI support is enabled. As part of this, the double-conversion and libb2 packages were added.
  • Support for configurable page size for ARM64 was added. In addition to the default 4 KB, 64 KB pages are supported. This includes some test cases that allow to validate the 64 KB ARM64 page size support in Qemu.
  • New package for clpeak, a tool that profiles OpenCL devices to find their peak capacities, together with its dependency OpenCL-CLHPP, the C++ bindings for OpenCL
  • A rework of several top-level menuconfig options: the “enable MMU” option is now part of the Target architecture menu, the Toolchain menu is now before the Build options menu, which allows the choice of the C library to be done before the choice of static vs. shared libraries. This allows the choice of static library to be made unavailable when glibc is selected, fixing a number of invalid configurations.
  • New package for GDAL, a translator library for raster and vector geospatial data formats.
  • New package for libutp, a uTorrent Transport Protocol library
  • New package for dust, an alternative written in Rust of the command “du”.
  • The C-SKY CPU architecture support was removed, as it was no longer maintained, and barely used.
  • New package for gitlab-runner, the open source project that is used to run your jobs and send the results back to GitLab
  • New package for dbus-broker, which is an alternative implementation of the D-Bus daemon, by the systemd community. It is integrated in Buildroot so that either classic D-Bus or dbus-broker can be used as the D-Bus daemon implementation.
  • New package for nerdctl, a Docker-compatible CLI for containerd, controlling runc.
  • A rework of how the udev hwdb is handled, to be consistent between systemd and eudev, and to remove useless hwdb source files from the target, as the hwdb is compiled at build time.
  • And at least 137 packages have seen their version bumped

Several other topics were looked at and discussed, but did not necessarily lead to patches already integrated. One such topic is the investigation of several issues with elf2flt, the tool used on noMMU architectures to produce binaries in the FLAT format, from an ELF binary. Another topic is the merge of the SciPy package, for which the review and testing is well advanced.

Overall, it was a very productive hackathon, and besides the massive work done on Buildroot from 9 AM to (at least) midnight each day, the participants also enjoyed lots of side discussions, embedded Linux related or not. We look forward to the next in-person gathering of the Buildroot community, on September 17/18 in Dublin, right after the Embedded Linux Conference Europe.