Marcus Folkesson

Embedded Linux Artist

TIL - Git jump

TIL - Git jump 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 Git v2.40.0 was released [1] yesterday (2023-03-13) and one of the release notes that caught my eyes was this one: * "git jump" (in contrib/) learned to present the "quickfix list" to its standard output (instead of letting it consumed by the editor it invokes), and learned to also drive emacs/emacsclient. cover

Service of a pocket watch

Service of a pocket watch Mechanical watches is fascinating. A mechanical timepiece that gets its energy from unwinding a tightly coiled flat spring. All this energy does feed another spring-driven balance wheel that oscillates back and forth in a given frequency. All without any batteries. Isn't that cool? Mechanical watches is quite expensive and need regular services, so I bought a no-name brand pocket watch that suddenly could stop tick and didn't keep time very well. cover

Razor leather case

Razor Leather Case My safety razor broke during usage last week, so I sadly had to order a new one. I'm not really into shaving at all, but I want something that works and safety razors does both work and is cheap in the long run. For those interested, I bought a AL13 razor from Henson Shaving [1]. This time I used my Laser cutting machine to cut out the leather. cover

Route traffic with NAT

Route traffic with NAT Long time ago I wrota a blog post [1] about how to use NAT to route traffic to your embedded device via your host computer. Back then we were using iptables to achieve it, nowadays nftables is the preferred successor, so it's time for an update. What is NAT anyway? Network Address Translation, or NAT, does map an address space into another by modifying the network address infromation in the IP header for each packet. cover

Leather watch strap keeper

Leather watch strap keeper My watch was missing the strap keeper, so I had to make one. To be honest, I did not put my soul into this project, I had an urge to fix it while the food was getting ready in the oven. Anyway, here is my steps to make one. The steps Cut out a leather strap. My final size was about 14mm wide. Bevel the edges: cover

Contiguous Memory Allocator

Contiguous Memory Allocator Introduction I do find memory management as one of the most fascinating subsystem in the Linux kernel, and I take every chance I see to talk about it. This post is inspired by a project I'm currently working on; an embedded Linux platform with a camera connected to the CSI-2 bus. Before we dig into which problems we could trip over, lets talk briefly about how the kernel handles memory. cover

TIL - U-Boot support for HTTP

TIL - U-Boot support for HTTP 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 Until now, U-Boot did only support UDP and were limited to protocols that are based on that. In practice it meant that you were only able to use TFTP and NFS for network file transfer. cover

Use custom EDID in Linux

Use custom EDID in Linux Extended Display Identification Data (EDID) is a metadata format for display devices to describe their capabilities such as resolution, display size, timing, bit depth and update frequency. It's a 128-byte (EDID) or 256-byte (Enhanced-EDID) structure transferred from the display device over the Display Data Channel (DDC) protocol, which is a layer on top of the I2C specification. The EDID is accessible via the I2C address 0x50 and can usually be read even if the display is turned off, which is quite nice. cover

Audio and Embedded Linux

Audio and Embedded Linux Brief Last time I used wrote kernel drivers for the ASoC (ALSA System on Chip) subsystem, the functionality was split up into these parts: Platform class driver that defines the SoC audio interface for the actual CPU itself. This includes both the DAI (Digital Audio Interface) and any potential audio muxes (e.g. i.MX6 has its AUDMUX). CODEC class driver that controls the actual CODEC. Machine drivers that is the magic glue between the SoC and the CODEC which connect the both interfaces. cover

Debug kernel with KGDB

Debug kernel with KGDB What is KGDB? KGDB intend to be used as a source code level debugger on a running Linux kernel. It works with GDB and allows the user to inspect memory, variables, setup breakpoints, step lines and instructions. Pretty much the same that all application developers are used to, but for the kernel itself. Almost every embedded Linux system does have a serial port available, and that is all that you need to connect GDB to your kernel. cover