x86 Kernel Development & Relocatable Binaries – What I learned about Toolchains and Relocatable Code

This post is roughly a summary of the obscure knowledge I learned about toolchains and relocatable code in the last couple of years by studying the code of the microkernels NOVA and Hedron, my professional hands-on experience with kernel development, and several learning projects. I present some of the “hard and not obvious” properties of producing kernel binaries, information that only stands “between the lines” in existing projects, and topics I didn’t find Read more…

Parallel Recursive FTPS Mirroring (Directory Download) from Command Line

TL;DR In this blog post, I show you the best option I found that you can use in 2024 to perform a parallel recursive download (backup) of an FTP directory via FTPS (explicit FTP via TLS) from the command line. lftp is the best command line tool (for Linux, macOS and other UNIX-like systems), but needs to be properly configured. For GUI-focused users, I recommend FileZilla. Introduction FTP is a quite outdated protocol Read more…

Code snippet: Command line tool lftp for a parallel recursive secure FTP download of a remote directory.

Compile Linux out-of-tree Module on NixOS in a Nix shell with an FHS Environment

In an earlier post, I talked about how you can build an out-of-tree Linux kernel module in a Nix derivation, i.e., package it in Nix. However, for quick prototyping, sometimes you want to just enter $ make in your shell, for example to check if everything compiles. Out-of-tree module projects following the recommended guidelines use a Makefile, possibly an additional KBuild file, and of course C source and header files. This header file Read more…

systemd udev Rules to Detect USB Device Plugging (including Bus and Device Number)

The other day, I was working on some udev rules to invoke a script when a USB device is added or removed from my machine. I needed the USB bus and USB port number to further process that event. I decided to use udev for that. However, getting the relevant attributes was not as intuitive as I expected, and existing documentation wasn’t that good. Here’s what I did and how I solved it. Read more…