Marcus Folkesson

Embedded Linux Artist

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.

Memory management in the kernel

Memory management in the kernel Memory management is among the most complex parts in the Linux kernel. There is so many critical parts such as page allocator, slab allocator, virtual memory handling, memory mapping, MMU, IOMMU and so on. All these parts has to work perfect (or at least allmost perfect :-) ) because all system do use them either they want to or not. If there is a bug or performance issue you will be noticed quite soon.

MMAP memory between kernel and userspace

MMAP memory between kernel and userspace Allocate memory in kernel space and then let the userspace map it to their virtual address space sounds like an easy task, and sure it's. There are just a few things that is good to know about page mapping. The MMU (Memory Management Unit) contains page tables with entries for mapping between virtual and physical addresses. These pages is the smallest units that the MMU deals with.

PID1 in containers

PID1 in containers What is PID 1 The top-most process in a UNIX system has PID (Process ID) 1 and is usually the init process. The Init process is the first userspace application started on a system and is started by the kernel at boottime. The kernel is looking in a few predefined paths (and the init kernel parameter). If no such application is found, the system will panic().

2.2" TFT display on Beaglebone

2.2" TFT display on Beaglebone I recently bought a 2.2" TFT display on Ebay (come on, 7 bucks...) and was up to use it with my BeagleBone. Luckily for me there was no Linux driver for the ILI9341 controller so it's just to roll up my sleeves and get to work. Boot up the BeagleBone I haven't booted up my bone for a while and support for the board seems cover

Magic SysRq

Magic SysRq Every kernel-hacker should knows about the magic SysRQ. Period. To enable the magic, make sure CONFIG_MAGIC_SYSRQ is set in your Kernel hacking tab. I use this feature a lot, mostly for set loglevel and reboot the system. But it is also very useful to get information out of the system even if it is completely frozen. As everybody is using GNU Screen (what else?) as their TTY terminal, the keyboard combination is: ctrl+A B.

Take control of your Buffalo Linkstation NAS

Take control of your Buffalo Linkstation NAS I finally bought a NAS for all of my super-important stuff. It became a Buffalo Linkstation LS200, most because of the price ($300 for 4TB). It supports all of the standard protocols such as FTP, SAMBA, ATP and so on. However, it would be really useful to use some sane protocols like sftp so you could use rsync for your backup scripts.