Marcus Folkesson

Embedded Linux Artist

TIL - sort in vim

TIL - Sort in VIM 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 After 15+ years of daily VIM usage I just discovered the :sort function. Quite embarassing. It is also possible to sort in revese ( :sort!) and remove duplicate lines ( :sort u). cover

Burn eFuses for MAC address on iMX8MP

Burn eFuses for MAC address on iMX8MP The iMX (iMX6, iMX7, iMX8) has a similiar OCOTP (On-Chip One Time Programmable) module that store, for example the MAC addresses for the internal ethernet controllers. The reference manual is not clear either on the byte order or which bytes belong to which MAC address when there are several. In fact, I had to look at the U-boot implementation [1] to know for sure how these fuses is used: cover

Loopback with two (physical) ethernet interfaces

Loopback with two (physical) ethernet interfaces Imagine that you have an embedded device with two physical ethernet ports. You want to verify the functionality of both these ports in the manufacturing process, so you connect an ethernet cable between the ports, setup IP addresses and now what? As Linux (actually the default network namespace) is aware of the both adapters and their IP/MAC-addresses, the system see no reason to send any traffic out. cover

TIL - notmuch-lore

TIL - notmuch-lore 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 Notmuch [1] is an mail indexer and is a great tool to search in high-volume mailboxes (e.g. mailing lists). Being subscribed to all these mailing lists and retreiving all mails over IMAP daily could be quite annoying and harm your mail quota.

kas-container and QEMU

kas-container and QEMU KAS KAS [1] is a setup tool for bitbake based projects such as Yocto. There are many similiar alternatives out there and I've tried most of them, but my absolute favorite is KAS. In order to use KAS, you have to setup a YAML file to contain information about your machine, distribution, meta layers and local configuration. Here is a small example configuration copied from the KAS documentation: cover

TIL - git man-pages

TIL - git man-pages 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 I'm a big user of man-pages. Today I found a set of pages that I've not noticed before when I was reading man git: SEE ALSO gittutorial(7), gittutorial-2(7), giteveryday(7), gitcvs-migration(7), gitglossary(7), gitcore-tutorial(7), gitcli(7), The Git User’s Manual[1], gitworkflows(7) Especially

Support for CRIU in Buildroot

Support for CRIU in Buildroot A couple of months ago I started to evaluate [1] CRIU [2] for a project I'm working on. The project itself is using Buildroot to build and generate the root filesystem. Unfortunately, Buildroot lacks support for CRIU so there were some work to do. To write the package was not straight forward. The package is only supported on certain architectures and the utils/test-pkg script failed for a few toolchains. cover

TIL - Git --color-moved

TIL - Git --color-moved 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 Did you know that Git is able to detect moved blocks and use different colors from the usual added/removed lines? Me neither until now. The paremeter is --color-moved and has been around since v0.4.0, so there is no new feature. cover

TIL - Buildroot and LIBFOO_LINUX_CONFIG_FIXUPS

TIL - Buildroot and LIBFOO_LINUX_CONFIG_FIXUPS 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 Some applications in a Linux system depends on certain kernel features to work properly. I'm currently working on adding support for CRIU [1] in Buildroot [2] which has such requirements. That's when I stumble upon the LIBFOO_LINUX_CONFIG_FIXUP variable.

Use b4 for kernel contributions

Use b4 for kernel contributions There is a little tool called b4 [1] that has been part of my workflow with the Linux kernel for a while. It's developed to be a tool used to simplify the work of the maintainers, but my main use of the tool has been to fetch patch series from the mailing list and apply them to my local git repository during reviews. I recently noticed that it got a lot of handy features (experimental though) for the contributors as well, which I now want to test! cover