Marcus Folkesson

Embedded Linux Artist

Linux driver for PhoenixRC adapter

Linux driver for PhoenixRC adapter Update: Michael Larabel on Phoronix has written a post [3] about this driver. Go ahead and read it as well! A few years ago I used to build multi rotors, mostly quad copters and tricopters. It's a fun hobby, both building and flying is incredible satisfying. The first multi rotors i built was nicely made with CNC cutted details. They looked really nice and robust. cover

Patch changelogs with git-notes

Patch changelogs with git-notes Git notes [1] is a neat function that has been around since v1.6.6. Notes is a kind of metadata that belongs to a certain commit but is stored separately (different git object) from the commit itself. The fact that it's a separate git object is important, it will therefor keep the commit hash intact, and as a bonus - it has its own diff log. cover

Buildroot: out-of-tree builds

Buildroot: out-of-tree builds Like the Linux kernel, Buildroot supports building out-of-tree in a very similar way. This could be very useful when you have multiple configurations in the same Buildroot repository that you want to build without interference. Consider the following example: cd buildroot/ mkdir -p ../outputs/device{1,2} make O=../outputs/device1 menuconfig make O=../outputs/device1 make O=../outputs/device2 menuconfig make O=../outputs/device2 Each output has its own .config so you may change the build configurations independently.

get_maintainers and git send-email

get_maintainers and git send-email Many with me prefer email as communication channel, especially for patches. Github, Gerrit and all other "nice" and "user friendly" tools that tries to "help" you to manage your submissions does not simply fit my workflow. As you may already know, all patches to the Linux kernel is by email. scripts/get_maintainer.pl (see [1] for more info about the process) is a handy tool that takes a patch as input and gives back a bunch of emails addresses.

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). cover

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. cover

printk()

printk() So, a week in Prague has come to its end. The Embedded Linux Conference Europe was this year co-located with Open Source Summit and offered a lot of interesting talks on various topics. One of the hottest topics this year was about our most beloved debugging function - prink(). What is so hard with printing? It turns out that printk is quite deadlock-prone and that is not an easy thing to work around in the current infrastructure of the kernel.

libostree and $OSTREE_REPO environment path

libostree and $OSTREE_REPO environment path libostree is a great tool to handle incremental or full updates for an Linux file system. But virtually all commands of ostree requires the --repo argument to override the default system repository path. This is really annoying after a while so my first attempt to get rid of this was to create an alias : 1alias ost='ostree --repo=/tmp/repo' It works but is not good. To solve it once and for all I was about to implement support for getting the repo path from an environment variable.

FIT vs legacy image format

FIT vs legacy image format U-Boot supports several image formats when booting a kernel. However, a Linux system usually need multiple files for booting. Such files may be the kernel itself, an initrd and a device tree blob. A typical embedded Linux system have all these files in at least two-three different configurations. It's not uncommon to have a Default configuration Rescue configuration Development configuration Production configuration ... Only these four configurations may end up with unmanageable amount of different files.

config utility for Buildroot

config utility for Buildroot I'm using the ./scripts/config script in the Linux kernel tree a lot. The script is used to manipulate a .config file from the command line which is quite nice to be able to do. I use it mostly to enable configurations from a script or as a part of automated tests. Buildroot is also using KBuild as its configuration system so I adapted this script and submitted a patch.