Updated Yocto support for SiFive RISC-V platforms

SiFive logoA few months ago, we started supporting SiFive in their effort to maintain and improve the Yocto support for their RISC-V processors and platforms. The Yocto support for SiFive platforms is divided into two layers:

These layers allow to build ready-to-use Yocto images for the Qemu RISC-V 64-bit emulation, the HiFive Unleashed and HiFive Unmatched development boards.

As part of our work on the Yocto support for SiFive platofrms, we have already published three new releases of these layers: 2022.06, 2022.08 and 2022.10. In this blog post, we review the main highlights of those releases.

Continue reading “Updated Yocto support for SiFive RISC-V platforms”

Upcoming Yocto Project Summit 2022.11 – One talk from Bootlin

Headline of the Yocto Project Summit 2022.11.

As every six months for the last two years, a new virtual edition of the Yocto Project Summit is coming, and its schedule has been announced.

This summit will be over 3 days:

  • Tuesday, November 29
    Two tracks in parallel, a beginner track and a “hands-on” track for people already familiar with the concepts.
  • Wednesday, November 30
    Only one track, with intermediate level talks on all kinds of topics.
  • Thursday, December 1
    Only one track, starting with “product showcase” talks and going on with intermediate level talks on various topics too.

Last but not least, at the end of each day, you will get a chance to hangout with other contributors and users, and ask all the questions that you may have.

Bootlin is proud to contribute one talk to this summit: Bitbaking SPDX SBoM which we will prepare and present. This talk will cover one of the topics we explored to document features of the Yocto Project which had no documentation yet. SPDX and SBoM are related to software supply chain security, vulnerability management and license compliance. These are hot topics these days, and there will be another presentation about SBoMs (SBoMs and Supply Chain with the Yocto Project by Joshua Watt), and two about security (Detecting and fixing CVE security issues in yocto based embedded Linux distribution by Mikko Rapeli, and Maintenance and Security of a Yocto Project-based Distribution: A Year of Experiences by Marta Rybczynska).

Bootlin is indeed involved in the Yocto Project by maintaining its documentation (see the active contributors through the git repository), and also a participant to the Yocto SWAT team, keeping track of all the issues encountered by the autobuilder machines and runs.

Though the Yocto Project and OpenEmbedded are Open Source projects, registration for this conference is not free but just costs 40 USD, to cover infrastructure and staffing costs, the event being hosted by the Linux Foundation.

Device Tree phandle: the C code point of view

Introduction

In this blog post, we’ll discuss the phandle properties used in Device Tree. These properties are used to describe a relationship between components described in the Device Tree. Many blog posts describe this property from the Device Tree source point of view (you can for example have a look at https://elinux.org/Device_Tree_Mysteries#Phandle for details related to Device Tree source). In this blog post, we want to take a different approach, and discuss how to handle this type of property from the Linux kernel C code point of view.

Continue reading “Device Tree phandle: the C code point of view”

Bootlin at Capitole du Libre 2022: sponsor, booth and talks

Capitole du Libre 2022Capitole du Libre is a free-software/open-source conference with a local/regional scope organized in Toulouse, France, since ~2012. As one of the Bootlin offices is also located in Toulouse, Bootlin has often participated to this event by giving talks or simply by attending.

The 2022 edition, the first after 2 years of interruption due to the COVID19 crisis, will take place on November 19 and November 20. Bootlin will participate by:

If you’re in the Toulouse area and a free-software/open-source enthusiast, we strongly recommend you to attend Capitole du Libre. The event is free, no registration is required, and there’s a very nice line-up of talks and workshops!

Workaround for creating bootable FAT partition for Beagle Bone / AM335x on recent distros

On recent GNU/Linux distributions such as Ubuntu 22.04 and 22.10, you may hit an issue creating a bootable FAT partition for embedded boards, at least with the TI AM335x processor, such as the 32 bit Beagle Bone boards.

Continue reading “Workaround for creating bootable FAT partition for Beagle Bone / AM335x on recent distros”

Welcome to Jérémie Dautheribes

Welcome on board!Bootlin is really happy to welcome another engineer in its team: Jérémie Dautheribes, who joined us on November 2, 2022.

Jérémie Dautheribes graduated in 2020 with a master degree in Ambiant, Mobile and Embedded Systems from the Toulouse University. After graduating, he worked at the french research institute INRIA on cache optimization for FreeRTOS multicore programs, and then in a company called EPSI where he was in charge of developing and maintaining Linux-based BSPs for i.MX6 and Tegra platforms, based on Yocto.

In addition, Jérémie has some experience in using the Rust programming language for low-level development, a skill that might prove to be useful for doing Linux kernel development in the future!

Jérémie is now joining our team located in Toulouse, France, where he will work at our office with Hervé Codina, Paul Kocialkowski, Köry Maincent, Thomas Perrot, Miquèl Raynal and Thomas Petazzoni.

For more details, see Jérémie’s page on Bootlin.com and his LinkedIn profile.

New training course: Linux debugging, profiling, tracing and performance analysis

Since its inception, Bootlin has offered training courses on technical topics related to the use of Linux in embedded systems, with freely accessible training materials, and trainers with in-depth and real-life experience in their field. Based on these ideas, we have progressively extended our training portfolio over the years.

Today, we are extremely happy to announce a brand new course: Linux debugging, profiling, tracing and performance analysis. Many of our customers working on embedded Linux systems have expressed interest in diving into these complex topics, so we’ve created this course to:

  1. Give enough background information about how Linux works to be able to have a solid reasoning when investigating performance issues or simply bugs. Our course therefore details how user-space vs. kernel-space works, scheduling, and memory management, as a prerequisite to understanding better how Linux works.
  2. Give a strong introduction to the most important debugging, profiling and tracing tools in Linux, which are often not easy to get started with. We cover a very large spectrum of tools: strace, gdb, perf, ftrace, LTTng, kgdb, kmemleak, and many more. All these tools are illustrated through practical examples.

See the complete agenda for this course: debugging-online-agenda.pdf. The complete training materials will be freely available after the first session has been delivered, end of November 2022.

This course is currently being prepared by Bootlin engineer Clément Léger, who will also be teaching this course. Clément has a deep knowledge of how CPUs work and how Linux runs on a given CPU architecture, by having ported the Linux kernel to a brand new CPU architecture.

While the first session of this course will be delivered to a private customer, we have already scheduled a first public session which will take place on January 30, 31, Feb 1, 2, 2023, plus an extra session on Feb 3, 2023 if needed to cover all topics/questions. This session will take place each day from 14:00 to 18:00 UTC+1 (Paris time). Registration takes place directly online: the pricing is 569 EUR per seat at the discounted rate, or at 669 EUR per seat at the normal rate.

We can also organize a private session of this course for your team/company, either on-line or on-site: contact us to request a quote if you’re interested.

Linux 6.0 released, Bootlin contributions

Linux 6.0 has been released two weeks ago, and Linux 6.1-rc1 is already out of the door, but we didn’t get the chance to look at the contributions made by Bootlin to the Linux 6.0 release. Before we do that, let’s provide our usual must-read articles on Linux 6.0: the Linux 6.0 merge window part 1 and Linux 6.0 merge window part 2 LWN.net articles and the KernelNewbies.org article.

On Bootlin side, our significant contributions to this release have been:

  • Clément Léger contributed a new driver for the Ethernet switch found in the Renesas RZ/N1 processor, as well as a PCS driver for the MII converter of the same processor. Obviously, this came with the related Device Tree bindings and Device Tree changes, but also with a few small changes in the DSA subsystem.
  • Hervé Codina enabled support for the PCIe controller found in the same Renesas RZ/N1 processor, which in fact does not allow to use PCIe devices, but USB devices: this PCIe controller is only used to connect to an internal USB controller in the chip, which therefore allows to use USB devices.
  • Köry Maincent extended the existing mpc4922 DAC IIO driver to also support the mpc4921 variant, which has only one output channel instead of two.
  • Luca Ceresoli contributed several improvements to the I2C subsystem documentation.
  • Paul Kocialkowski contributed a new DRM driver for the logiCVC-ML display controller IP
  • Paul Kocialkowski contributed two new V4L drivers for the MIPI CSI-2 camera interfaces available in the Allwinner A31 family of processors (sun6i) and the Allwinner A83T family of processors (sun8i).

Here is the full details of our contributions, commit by commit:

Yocto Project: quickest instructions to generate BeagleBone images

Here are the quickest instructions (I hope) for having the Yocto Project build an embedded Linux image for BeagleBone boards based on the TI AM335x CPU:

git clone -b kirkstone https://git.yoctoproject.org/git/poky
source poky/oe-init-build-env

This gets you in a new build directory. You can then generate your image:

MACHINE="beaglebone-yocto" bitbake core-image-minimal

Once the build is over, you can flash the image on a microSD card (assuming it’s mapped to /dev/mmcblk0):

cd tmp/deploy/images/beaglebone-yocto
dd if=core-image-minimal-beaglebone-yocto.wic of=/dev/mmcblk0 bs=4M

More details for customizing images and supporting other boards in the Yocto Project manual.BeagleBone Black board booting on an embedded Linux root filesystem built by the Yocto Project

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.