Marcus Folkesson

Embedded Linux Artist

br2-readonly-rootfs-overlay

br2-readonly-rootfs-overlay This is a Buildroot external module that could be used as a reference design when building your own system with an overlayed root filesystem. It's created as an external module to make it easy to adapt for your to your own application. The goal is to achieve the same functionality I have in meta-readonly-rootfs-overlay [1] but for Buildroot. Why does this exists? Having a read-only root file system is useful for many scenarios:

Watch repair

Watch repair Time for another watch repair! The watch can be winded up to max, but it does not move nor tick, so my guess is that the gear train is stuck somewhere. It is also the first time I use my microscope to something else other than soldering components (and looking at creepy bugs with my kids..). Take it apart I started to take everything apart as usual, starting with the balance wheel. cover

TIL - Reuse your SSH connection

TIL - Reuse your SSH connection 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 OpenSSH has the feature to reuse an existing SSH connection for multiple subsequent connections to the same host. It will improve your workflow because it reduces the time it takes to establish a new connection and in cases where you have to type a password, the time saving is even more.

TIL - xxd color support

TIL - xxd color 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 (2 January 2024), version 9.1 of the Vim editor has been released [1]! xxd [2] is a utility that is distributed with Vim and is my go-to-tool when it comes to view or manipulating binary files. cover

TIL - git credential storage

TIL - git credential storage 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 When using SSH as transport protocol for connecting to remotes you could use a key without need to type a username nor password. Unfortunately, this is not possible when the underlaying protocol is HTTPS as it requires a username and password for every connection made.

Expose network namespace created by Docker

Expose network namespace created by Docker Disclaimer: this is probably *not* the best way for doing this, but it's pretty good for educational purposes. During a debug session I wanted to connect an application to a service tha ran in a docker container. This was for test-purposes only, so hackish and fast are the keywords. First of all, I'm not a Docker expert, but I've a pretty good understanding on Linux internals, namespaces and how things works on a Linux system.

Skip flashing unused blocks with UUU

Skip flashing unused blocks with UUU TL;DR: UUU does now (or will shortly) support blockmaps for flashing images. Use it. It will shorten your flashing time *a lot.* It will soon be time to manufacture circuit boards for a project I'm currently working on. After manufacturing, it will need some firmware for sure, but how do we flash it in the most efficient way? The board is based on an i. cover

Mutex guards in the Linux kernel

Mutex guards in the Linux kernel I found an interresting thread [1] while searching my inbox for something completely unrelated. Peter Zijistra has written a few cleanup functions that where introduced in v6.4 with this commit: commit 54da6a0924311c7cf5015533991e44fb8eb12773 Author: Peter Zijlstra <peterz@infradead.org> Date: Fri May 26 12:23:48 2023 +0200 locking: Introduce __cleanup() based infrastructure Use __attribute__((__cleanup__(func))) to build: - simple auto-release pointers using __free() - 'classes' with constructor and destructor semantics for scope-based resource management.

Test packages in Buildroot

Test packages in Buildroot When writing packages for Buildroot there are several conditions that you have to test your package against. This includes different toolchains, architectures, C-libraries, thread-implementations and more. To help you with that, Buildroot provides the utils/test-pkg script. Nothing describes the script better than its own help text [1]: test-pkg: test-build a package against various toolchains and architectures The supplied config snippet is appended to each toolchain config, the resulting configuration is checked to ensure it still contains all options specified in the snippet; if any is missing, the build is skipped, on the assumption that the package under test requires a toolchain or architecture feature that is missing.

TIL - docker scratch image

TIL - Docker scratch image 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 The scratch image is the smallest possible image for docker. It does not contain any libraries nor other executables. It is simply a new, fresh and empty setup of namespaces. The FROM scratch line is even a no-op [1] in the Dockerfile, which results in that it will not create an extra layer in you image.