Marcus Folkesson

Embedded Linux Artist

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

Write a device driver for Zephyr - Part 3

Write a device driver for Zephyr - Part 3 This is the third post in this series. See also part part1, part2 and part4. Overview In the previous part we prepared Zephyr for our soon to be born driver. Now we have finally come to the fun point - write the actual driver code! Driver API I used to write code for the Linux kernel which is a little bit more complex kernel than Zephyr. cover

Write a device driver for Zephyr - Part 4

Write a device driver for Zephyr - Part 4 This is the forth post in this series. See also part part1, part2 and part3. Overview This is the forth and last part of this series where we will focus on contribute the driver back to the Zephyr project. Zephyr use Github for hosting the project and all contribution is by Pull Requests. The process is all well documented [1], both on how to contribute but also what the project expect from you as a contributor. cover

Encrypted storage on i.MX

Encrypted storage on i.MX Brief Many embedded Linux systems does have some kind of sensitive information on a file storage. It could be private keys, passwords or whatever. It's always a risk that this information could be revealed by an unauthorized person that got their physical hands on the device. The only protection against attackers that who simply bypass the system and access the data storage directly is encryption. cover

TIL - Buildroot & BR_NO_CHECK_HASH_FOR

TIL - Buildroot & BR_NO_CHECK_HASH_FOR 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 In Buildroot [1], the integrity of (allmost) all downloaded packages is verified against a hash. Even packages that are fetched from a git repository is verified this way. This is a good thing that no one really should work around.

Bug in the iMX8MP ECSPI module?

Bug in the iMX8MP ECSPI module? Background I do have a system where I can swap between iMX8M Mini and iMX8M Plus CPU modules on the same carrier board. I did write a a SPI driver for a device on the carrier board. The device is connected to the ECSPI1 (the CPU contains several ECSPI modules) and use the hardware chipselect 0 (SS0). The driver has been used with the iMX8MM CPU module for a while, but as soon I swapped to the iMX8MP it certainly stopped working. cover

Capture an image with V4L2

Capture an image with V4L2 Brief As we has seen before, cameras in Linux could be a complex [1] story and you have to watch every step you take to get it right. libcamera [2] does a great job to simplify this in a platform independent way and should be used whenever it's possible. But not all cameras does have a complex flow-chart. Some cameras (e.g. web cameras) are "self-contained" where the image data goes straight from the camera to the user application, without any detours through different IP blocks for image processing on its way. cover