Marcus Folkesson

Embedded Linux Artist

Repair of an IC-211E HAM Radio

Repair of an IC-211E HAM Radio A friend of mine (SM7FWZ [3] ) gave me an ICOM IC-211E, a 2M all mode transceiver that I'm having a lot of fun with. When I got it, it had one drawback - transmitting on SSB (Single Side Band) didn't work very well, neither for USB (Upper Side Band) nor LSB (Lower Side Band). The signal that reached the antenna was really disturbed, so here is something that needs to be fixed! cover

Bird counting

Bird counting I've been counting birds for couple of years now, but for the last past six mounths I have also recorded which species I see at bird table. I live in the middle of a bird sanctuary, so I think it could be good to know my neighbors. So the main reason for this was to learn to tell the difference between different species for birds. I must say that this was a success, I can name about 30 different bird species with a fairly high degree of certainty around my bird table. cover

TIL - raw HTML in Hugo

TIL - raw HTML in Hugo 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 using Hugo [1] for this website setup [2] and find it very satisfying. I can write all my content in reStructured Text [3] and create a website out from it. Today I needed to add a part of raw HTML into one of my pages and that was when I found Shortcodes [4] in which is very useful.

Working on U-boot from Yocto (iMX8)

Working on U-boot from Yocto (iMX8) I have been asked a couple of times how to quickly make changes for U-Boot in Yocto. Those who asked have used to rebuild and flash an entire image each time, which takes an unnecessarily which is not a fast procedure. To rebuild U-Boot is`nt significantly different from any other recipe, but one difference is that imx-mkimage must also be built to generate a bootable image.

Increase the quality of your commits with pre-commit

Increase the quality of your commits with pre-commit pre-commit [1] is a framework for managing and maintaining pre-commit hooks for git. By running hooks before any commit, many small pitfalls could be avoided before being pushed and will spare reviewers time and energy. Such hooks could for example check that commit messages follow a specific format or that the code pass a lint test for a specific type of file. cover

TIL - Parse command output from shell

TIL - Parse command output from shell 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 Parse text output in shell scripts is something that is needed every now and then. It used to be some clever pipeline with regular expressions, grep, cut or even awk. But now I've started to use read for such things, and it has helped me a lot.

Changing the root of your Linux filesystem

Changing the root of your Linux filesystem After my previous post [1], I've got a few questions from people about the difference between chroot, pivot_root and switch_root, they all seems to do the same thing, right? Almost. Lets shed some light on this topic. Rootfs First of all, we need to specify what we mean when we say rootfs. rootfs is a special instance of a ram filesystem (usually tpmfs) that is created in an early boot stage.

chroot and user namespaces

chroot and user namespaces When playing around with libcamera [1] and br2-readonly-rootfs-overlay [2] I found something.. well.. unexpected. At least at first glance. What happened was that I encountered this error: 1 $ libcamera-still 2Preview window unavailable 3[0:02:54.785102683] [517] INFO Camera camera_manager.cpp:299 libcamera v0.0.0+67319-2023.02-22-gd530afad-dirty (2024-02-20T16:56:34+01:00) 4[0:02:54.885731084] [518] ERROR Process process.cpp:312 Failed to unshare execution context: Operation not permitted Failed to unshare execution context: Operation not permitted... what? I know that libcamera executes proprietary IPAs (Image Processing Algorithms) as black boxes, and that the execution is isolated in their own namespace.

Streamline your kernel config

Streamline your kernel config When working with embedded systems, it's not that uncommon that you need to compile your own kernel for your hardware platform. The configuration file you use is probably based on some default configuration that you borrowed from the kernel tree, a vendor tree, a SoM-vendor or simply from your collegue. As the configuration is somehow generic, it probably contains tons of kernel modules that is not needed for your application.

Power button and embedded Linux

Power button and embedded Linux Not all embedded Linux systems has a power button, but for consumer electronic devices it could be a good thing to be able to turn it off. But how does it work in practice? Physical button It all starts with a physical button. At the board level, the button is usually connected to a General-Purpose-Input-Output (GPIO) pin on the processor. It doesn't have to be directly connected to the processor though, all that matters is that the button press can somehow be mapped to the Linux input subsystem.