Marcus Folkesson

Embedded Linux Artist

Checkpoint-restore in Linux

Checkpoint-restore in Linux I'm working on power saving features for a project based on a Raspberry Pi Zero. Unfortunately, the RPi does not support features as hibernation to disk or suspend to RAM because how the processor is constructed (the GPU is actually the main processor). So I was looking for alternatives. That's when I stumpled upon CRIU ( [1], [2] ), Checkpoint-Restore In Userspace. (I actually started to read about PTRACE_SEIZE [4] and ptrace parasite code [3] and found out that CRIU is one of their users. cover

meta-readonly-rootfs-overlay

meta-readonly-rootfs-overlay meta-readonly-rootfs-overlay [1] is a meta layer for the Yocto project [2] originally written by Claudius Heine. I took over the maintainership in May 2022 to keep it updated with recent Yocto releases and keep add functionality. I've implemented it in a couple of industrial products so far and think it needs some extra attention as I find it so useful. Why does this exists? Having a read-only root file system is useful for many scenarios: cover

TIL - ignore_routes_with_linkdown

TIL - ignore_routes_with_linkdown TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post Usually, a high level network managers such as NetworkManager or Connman, removes routes for unaccessible ("linkdown" or "unplugged") link states. If these links are not managed by a network manager but are managed in other ways or is somehow misconfigured, then you could end up with a default route that is still hanging around even if the link is down. cover

Embedded Open Source Summit 2023

Embedded Open Source Summit 2023 This year the Embedded Linux Conference is colocated with Automotive Linux Summit, Embedded IOT summit, Safety-critical software summit, LFEnergy and Zephyr Summit. The event was held in Prague, Czech Republic this time. It's the second time I'm at a Linux conference in Czech Republic, and it clearly is my favorite place for such a event. Not only for the cheap beer but also for the architecture and the culture. cover

Route priorities - metric values

Route priorities - metric values Brief It's not an uncommon scenario that a Linux system has several network interfaces that are all up and routeable. For example, consider a laptop with both Ethernet and WiFi. But how does the system determine which route to use when trying to reach another host? I was up to setup a system with both a 4G modem and a WiFi connection. My use case was that when the WiFi is available, that interface should be prioritized over 4G. cover

Lund Linux Conference 2023

Lund Linux Conference 2023 The conference Lund Linux Conference (LLC) [1] is a "half-open" conference located in Lund. It's a conference with with high quality and I appreciate that the athmosphere is more familiar than at the larger conferences. I've been at the conference a couple of times before and the quality on the talks this year was as good as usual. ( The talks are by the way availalble on Youtube [3]. cover

TIL - Split streams with boost::tee_device

TIL - Split streams with boost::tee_device TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post Split streams could be useful if you want the same output to appear in more than one stream at once. Boost support tee_device, which works pretty much as the tee(1) [1] command line tool. Everything written to that device is splitted up and written into two streams. cover

TIL - NFS UDP Support

TIL - NFS UDP Support TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post Today I was trying to bring up an really old board (v2.6.32 kernel) that used to mount its root filesystem via NFS. Unfortunately, I have to stick to this configuration for a few reasons. The virtual machine that came with the board did not start anymore, so I had to setup a new one. cover

Write a device driver for Zephyr - Part 1

Write a device driver for Zephyr - Part 1 This is the first post in this series. See also part part2, part3 and part4. Overview The first time I came across Zephyr [1] was on Embedded Linux Conference in 2016. Once back from the conference I tried to install it on a Cortex-M EVK board I had on my desk. It did not go smoothly at all. The documentation was not very good back then and I don't think I ever got system up and running. cover

Write a device driver for Zephyr - Part 2

Write a device driver for Zephyr - Part 2 This is the second post in this series. See also part part1, part3 and part4. Overview In the first part1 of this series, we did setup the hardware and prepared the software environment. In this part we will focus on pretty much everything but writing the actual driver implementation. We will touch multiple areas in order to fully integrate the driver into the Zephyr project, this includes: cover