Marcus Folkesson

Embedded Linux Artist

Crosscompile libcamera for RPi

Crosscompile libcamera for RPi Goal The goal is to cross-compile libcamera [1] and libcamera-apps [2] for Raspberry Pi using the latest Raspbian [3] (Bullseye) release. Usually you setup the root filesystem with Buildroot [4] or Yocto [5] and generate a SDK that you can use to compile your application. The Raspbian distribution does not come with a SDK so we have to setup our own. We will use a Raspberry Pi 3b for this.

Mounting with systemd and udev

Mounting with systemd and udev Systemd hasn't always been my first choice as init system for embedded system, but I cannot ignore that it has many good and handy things that other init systems don't. At the same time, that is just what I don't like with systemd, it does not follow the "Do one thing and do it well"-philosophy that I like so much. I'm very thorn about it.

This website setup

This website setup This post is more for my own good if I have to setup my website once again. Maybe someone find it useful. Tools Hugo I use Hugo [1] to generate my website. Hugo is a fantastic tool for generate static web pages in an flexible way. All pages is written in reStructured Text [2] which is the markup syntax I strongly prefer. Docker The web server [4] and traefik [5] server is running in docker [3] containers.

Parsing command line options

Parsing command line options Parsing command line options is something almost every command or applications needs to handle in some way, and there is too many home-made argument parsers out there. As so many programs needs to parse options from the command line, this facility is encapsulated in a standard library function getopt(2). The GNU C library provides an even more sophisticated API for parsing the command line, argp(), and is described in the glibc manual [1].

Embedded Linux Conference 2019

Embedded Linux Conference 2019 Here we go again! This trip got exited even before it begun. I checked my passport the day before we should leave and noticed that my passport has expired. Outch. Fortunately I was able to get a temporary passport at the airport. I must admit that I'm not traveling that often and do not have these 'must-checks' in my muscle memory.. This time we were heading Lyon in France.

ligsegfault.so

libsegfault.so The dynamic linker [1] in a Linux system is using several environment variables to customize it's behavior. The most commonly used is probably LD_LIBRARY_PATH which is a list of directories where it search for libraries at execution time. Another variable I use quite often is LD_TRACE_LOADED_OBJECTS to let the program list its dynamic dependencies, just like ldd(1). For example, consider the following output $ LD_TRACE_LOADED_OBJECTS=1 /bin/bash linux-vdso.so.1 (0x00007ffece29e000) libreadline.

Embedded Linux Conference 2018

Embedded Linux Conference 2018 OK, time for another conference. This time in Edinburgh, Scotland. My travel is limited to Edinburgh, but this city has a lot of things to see, including Edinburgh Castle, the Royal Botanic Garden, the clock that is always is 3 minutes wrong [1] and lots of more. A side note, yes I've tried Haggis as it's a must-try-thing and so should you. But be prepared to buy a backup-meal.

Lund Linux Conference 2018

Lund Linux Conference 2018 It's just two weeks from now til the Lund Linux Conference (LLC) [1] begins! LLC is a two-day conference with the same layout as the bigger Linux conferences - just smaller, but just as nice. There will be talks about PCIe, The serial device bus, security in cars and a few more topics. My highlights this year is to hear about the XDP (eXpress Data Path) [2] to get really fast packet processing with standard Linux.

OOM-killer

OOM-killer When the system is running out of memory, the Out-Of-Memory (OOM) killer picks a process to kill based on the current memory footprint. In case of OOM, we will calculate a badness score between 0 (never kill) and 1000 for each process in the system. The process with the highest score will be killed. A score of 0 is reserved for unkillable tasks such as the global init process (see [1]) or kernel threads (processes with PF_KTHREAD flag set).

Embedded Linux course in Linköping

Embedded Linux course in Linköping I tech in our Embedded Linux course on a regular basis, this time in Linköping. It's a fun course with interesting labs where you will write your own linux device driver for a custom board. The course itself is quite moderate, but with talented participants, we easily slip over to more interesting things like memory management, the MTD subsystem, how ftrace works internally and how to use it, different contexts, introduce perf and much more.