<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Linux on Marcus Folkesson</title>
    <link>https://www.marcusfolkesson.se/tags/linux/</link>
    <description>Recent content in Linux on Marcus Folkesson</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 29 Jan 2026 10:00:34 +0100</lastBuildDate>
    <atom:link href="https://www.marcusfolkesson.se/tags/linux/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Shrink disk images</title>
      <link>https://www.marcusfolkesson.se/blog/shrink-disk-images/</link>
      <pubDate>Thu, 29 Jan 2026 10:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/shrink-disk-images/</guid>
      <description>Shrink disk images Brief I wanted to shrink a raw disk image file I had that contained multiple partitions. Nothing unusual at all. I thought it should be multiple tools out there to do this (and I&#39;m sure there are), but the first couple of Google results were just showing some old GUI tools - which I refuse to use.&#xA;Instead of searching further, I decided to &amp;quot;just do it&amp;quot;.</description>
    </item>
    <item>
      <title>Using socat to bridge interfaces</title>
      <link>https://www.marcusfolkesson.se/blog/using-socat-to-bridge-interfaces/</link>
      <pubDate>Sun, 16 Nov 2025 10:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/using-socat-to-bridge-interfaces/</guid>
      <description>Using socat to bridge interfaces Brief Whenever it comes to connecting two interfaces together on Linux, socat is my go-to tool. It is a flexible tool that basically create links between anything to anything.&#xA;socat establishes two bidirectional byte streams and transfers data between them. These byte streams could be constructed from a very large set of different types of sinks and sources, which makes it very powerful.&#xA;When I say anything, I really mean anything.</description>
    </item>
    <item>
      <title>What to expect</title>
      <link>https://www.marcusfolkesson.se/blog/what-to-expect/</link>
      <pubDate>Mon, 01 Sep 2025 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/what-to-expect/</guid>
      <description>What to expect When working in Linux, you’ve probably come across commands that require interactive input — things like typing a password or confirming the same prompt over and over again. This can be frustrating when you want to automate tasks or just need to e.g. type the same range of commands every time your embedded Linux system boots up. This is what expect [1] is used for.&#xA;So, what is expect?</description>
    </item>
    <item>
      <title>Determine wakeup cause (ACPI)</title>
      <link>https://www.marcusfolkesson.se/blog/determine-wakeup-cause-with-acpi/</link>
      <pubDate>Sat, 19 Apr 2025 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/determine-wakeup-cause-with-acpi/</guid>
      <description>Determine wakeup cause (ACPI) I had a problem with my laptop to enter suspend mode, when I ran systemctl suspend it would just woke up immediately.&#xA;Let&#39;s find out what causes this.&#xA;Advanced Configuration and Power Interface (ACPI) First a few words about ACPI.&#xA;The embedded Linux systems I used to work with usually not supports ACPI, even if support for ACPI starts to show up on some ARM64 and Risc-V boards.</description>
    </item>
    <item>
      <title>Lets talk about ECC and NAND flashes</title>
      <link>https://www.marcusfolkesson.se/blog/talk-about-ecc-and-nand-flashes/</link>
      <pubDate>Thu, 30 Jan 2025 11:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/talk-about-ecc-and-nand-flashes/</guid>
      <description>Lets talk about ECC and NAND flashes Raw NAND flashes is not that common these days. At least not in those projects I have been working with for the last ~8 years. They seems to have been replaced by eMMC for many applications, but there are still some use cases where raw NAND flashes are prefered.&#xA;In this blog post, we will talk a little about Error Correcting Code (ECC) and NAND flashes as that is such a critical part of the NAND flash technology.</description>
    </item>
    <item>
      <title>Remoteproc, rpmsg and SYSBIOS</title>
      <link>https://www.marcusfolkesson.se/blog/remoteproc-rpmsg-and-sysbios/</link>
      <pubDate>Thu, 05 Dec 2024 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/remoteproc-rpmsg-and-sysbios/</guid>
      <description>Remoteproc, rpmsg and SYSBIOS I&#39;m currently working with a couple of SoCs (OMAPL-138, DRA7xx) from Texas Instruments where both has an C6xx DSP core along with the ARM core. This is no unusual configuration, many modern SoCs today have heterogeneous remote processor devices in asymetric multiprocessing (AMP) configurations like these two.&#xA;In this case, the DSP-cores where supposed to run SYS/BIOS with the TI IPC MessageQ stack to communicate with the ARM core.</description>
    </item>
    <item>
      <title>Detect time jumps in Linux</title>
      <link>https://www.marcusfolkesson.se/blog/detect-time-jumps-in-linux/</link>
      <pubDate>Mon, 11 Nov 2024 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/detect-time-jumps-in-linux/</guid>
      <description>Detect time jumps in Linux Recently I had a case where the application created multiple timers for different events. After the timers was created, the NTP client updates the system time resulting in that all timers being off and needing to be adjusted. Adjust the timers is one thing, but how do we detect the time jump?&#xA;It&#39;s not the first time I&#39;m in a situation where I have to deal with such time jumps, I guess it&#39;s quite a common case, so why not write a few words about it?</description>
    </item>
    <item>
      <title>Protected FIFOs and regular files</title>
      <link>https://www.marcusfolkesson.se/blog/protected-fifos-and-regular-files/</link>
      <pubDate>Mon, 21 Oct 2024 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/protected-fifos-and-regular-files/</guid>
      <description>Protected FIFOs and regular files Since version 4.19 [1], Linux has the default behaviour to prevents opening of regular files and FIFOs that is not owned by the user in world writable sticky directories. Example on such directory is /tmp/ which usually has the sticky bit set.&#xA;This may sound obvious, but what is not so obvious is that this restriction also applies to the root user. You can therefore end up in a situation where e.</description>
    </item>
    <item>
      <title>Writing a clocksource driver for Linux</title>
      <link>https://www.marcusfolkesson.se/blog/writing-a-clocksource-driver-for-linux/</link>
      <pubDate>Thu, 10 Oct 2024 09:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/writing-a-clocksource-driver-for-linux/</guid>
      <description>Writing a clocksource driver for Linux Today we are going to write a clocksource [1] driver for Linux!&#xA;A clocksource in a Linux system is one of several parts of the kernel timekeeping abstractions. The clocksource is the the timeline of the Linux system and is the one you go to whenever you issue the command date. To do this, the clocksource should provide a monotonic, atomic counter that is as accurate as possible.</description>
    </item>
    <item>
      <title>Writing a UART driver for Linux</title>
      <link>https://www.marcusfolkesson.se/blog/writing-a-uart-driver-for-linux/</link>
      <pubDate>Sat, 05 Oct 2024 09:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/writing-a-uart-driver-for-linux/</guid>
      <description>Writing a UART driver for Linux Today we are going to write a UART driver for Linux!&#xA;UART (Universal asynchronous receiver-transmitter) is on of the most common device-to-device communication protocols that almost every SoC or microcontroller has hardware support for. Most SoC has several UART ports, but sometimes that is not enough as in this case.&#xA;Background I&#39;m working in a project where we have an ARM SoC connected to an FPGA on the AEMIF interface.</description>
    </item>
    <item>
      <title>&#34;You are the primary manager for this project&#34;</title>
      <link>https://www.marcusfolkesson.se/blog/you-are-the-primary-manager-for-this-project/</link>
      <pubDate>Thu, 19 Sep 2024 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/you-are-the-primary-manager-for-this-project/</guid>
      <description>&amp;quot;You are the primary manager for this project&amp;quot; Yes I&#39;m. But also:&#xA;THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</description>
    </item>
    <item>
      <title>Restrictions that comes with capabilities</title>
      <link>https://www.marcusfolkesson.se/blog/restrictions-that-comes-with-capabilities/</link>
      <pubDate>Tue, 10 Sep 2024 12:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/restrictions-that-comes-with-capabilities/</guid>
      <description>Restrictions that comes with capabilities I debugged an interesting problem this weekend related to which impact capabilites could have on a running process in a Linux system.&#xA;I already knew that there are some security restrictions for applications that setuid/setgid or have capabilities set. One example is that LD_LIBRARY_PATH is silently ignored for an application with capabilities. You are simply not allowed to link in whatever you like for priviliged applications - which is a good thing.</description>
    </item>
    <item>
      <title>Board bring-up part 4: Wrap it up</title>
      <link>https://www.marcusfolkesson.se/blog/board-bring-up-part4/</link>
      <pubDate>Sat, 17 Aug 2024 12:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/board-bring-up-part4/</guid>
      <description>Board bring-up part 4: Wrap it up I&#39;m currently working with a board bring up for a custom hardware based on a OMAPL138 from Texas Instruments. It is fun to work with &amp;quot;real&amp;quot; bring-ups. Most of my customers use System On Modules (SoM:s) these days. You get a lot for free with those modules but a lot of the fun is stripped away.&#xA;This post is not intended to be guide, it is more of a follow-me-through-my-work-post divided into three parts.</description>
    </item>
    <item>
      <title>Board bring-up part 3: Other peripherals</title>
      <link>https://www.marcusfolkesson.se/blog/board-bring-up-part3/</link>
      <pubDate>Fri, 16 Aug 2024 12:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/board-bring-up-part3/</guid>
      <description>Board bring-up part 3: Other peripherals I&#39;m currently working with a board bring up for a custom hardware based on a OMAPL138 from Texas Instruments. It is fun to work with &amp;quot;real&amp;quot; bring-ups. Most of my customers use System On Modules (SoM:s) these days. You get a lot for free with those modules but a lot of the fun is stripped away.&#xA;This post is not intended to be guide, it is more of a follow-me-through-my-work-post divided into three parts.</description>
    </item>
    <item>
      <title>Board bring-up part 2: NAND flash</title>
      <link>https://www.marcusfolkesson.se/blog/board-bring-up-part2/</link>
      <pubDate>Thu, 15 Aug 2024 12:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/board-bring-up-part2/</guid>
      <description>Board bring-up part 2: NAND flash I&#39;m currently working with a board bring up for a custom hardware based on a OMAPL138 from Texas Instruments. It is fun to work with &amp;quot;real&amp;quot; bring-ups. Most of my customers use System On Modules (SoM:s) these days. You get a lot for free with those modules but a lot of the fun is stripped away.&#xA;This post is not intended to be guide, it is more of a follow-me-through-my-work-post divided into three parts.</description>
    </item>
    <item>
      <title>Board bring-up part 1: Memory hassle</title>
      <link>https://www.marcusfolkesson.se/blog/board-bring-up-part1/</link>
      <pubDate>Wed, 14 Aug 2024 12:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/board-bring-up-part1/</guid>
      <description>Board bring-up part 1: Memory hassle I&#39;m currently working with a board bring up for a custom hardware based on a OMAPL138 from Texas Instruments. It is fun to work with &amp;quot;real&amp;quot; bring-ups. Most of my customers use System On Modules (SoM:s) these days. You get a lot for free with those modules but a lot of the fun is stripped away.&#xA;This post is not intended to be guide, it is more of a follow-me-through-my-work-post divided into three parts.</description>
    </item>
    <item>
      <title>--build, --host and --target explained</title>
      <link>https://www.marcusfolkesson.se/blog/build-host-and-target-explained/</link>
      <pubDate>Wed, 17 Jul 2024 12:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/build-host-and-target-explained/</guid>
      <description>--build, --host and --target explained Too often I see abuse of the --host, --build and --target options during (cross-)compilation of code using autotools. The feeling is more that people try different values until it seems to produce what they want without knowing what they are actually doing.&#xA;But who can blame them. What these parameters do it not obvious and very few people compile their own crosscompiler nowadays - or ever did.</description>
    </item>
    <item>
      <title>OMAPL138 AIS generator</title>
      <link>https://www.marcusfolkesson.se/blog/omapl138-ais-generator/</link>
      <pubDate>Sat, 13 Jul 2024 12:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/omapl138-ais-generator/</guid>
      <description>OMAPL138 AIS Generator I&#39;m currently working on an old platform based on OMAPL138 from Texas Instruments.&#xA;The OMAPL138 SoC is cool in itself, it is a ARM9 core with a C674x DSP coprocessor. My project scope is to modernize the platform to a more recent kernel/bootloader and add support for a few more interfaces due to a new HW revision.&#xA;The OMAPL138 is from 2009 but still active. The latest revision for the chip (Rev.</description>
    </item>
    <item>
      <title>What time is it? RTCs explained in embedded Linux</title>
      <link>https://www.marcusfolkesson.se/blog/what-time-is-it/</link>
      <pubDate>Tue, 02 Jul 2024 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/what-time-is-it/</guid>
      <description>What time is it? RTCs explained in embedded Linux Most smart devices keep track of time and it&#39;s usually something that everyone expects to be &amp;quot;right&amp;quot;, accurate and just work. I mean, you can keep time pretty well with just a pendulum or a spring [1], so why would this be a complicated thing in an embedded system?&#xA;Your smart alarm clock, smart phone or even your new cool IoT refrigerator make all use of the time for sure, but they probably do it for different purposes and have different requirements of the accuracy of time.</description>
    </item>
    <item>
      <title>Lund Linux Conference 2024</title>
      <link>https://www.marcusfolkesson.se/blog/lund-linux-con-2024/</link>
      <pubDate>Tue, 28 May 2024 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/lund-linux-con-2024/</guid>
      <description>Lund Linux Conference 2024 I have started to write a few lines about this conference each year as I think it deserves attention. Also, the more attendees we are, the more fun we get.&#xA;The conference Lund Linux Conference (LLC) [1] is a &amp;quot;half-open&amp;quot; conference located in Lund. It&#39;s a conference with a high quality and I appreciate that the athmosphere is more familiar than at the larger conferences. I&#39;ve been at the conference several of times before and the quality on the talks this year was as good as usual.</description>
    </item>
    <item>
      <title>Versioning with SWUpdate</title>
      <link>https://www.marcusfolkesson.se/blog/versioning-with-swupdate/</link>
      <pubDate>Wed, 15 May 2024 10:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/versioning-with-swupdate/</guid>
      <description>Versioning with SWUpdate TLDR; It is now possible to let SWUpdate manage the sw-versions file entirely thanks to the --gen--swversions feature I&#39;ve been working on.&#xA;SWUpdate SWUpdate [1] is a project I&#39;ve been using for a very long time for updating firmware on embedded systems.&#xA;The update service is a critical part of any embedded system, so having a well-tested, flexible, competent and ready-to-use solution is so much worth. Too many times I&#39;ve seen custom made update services that contain bugs, is not flexible enough or using slots for whatever software that could be updated.</description>
    </item>
    <item>
      <title>Changing the root of your Linux filesystem</title>
      <link>https://www.marcusfolkesson.se/blog/changing-the-root-of-your-linux-filesystem/</link>
      <pubDate>Sat, 02 Mar 2024 12:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/changing-the-root-of-your-linux-filesystem/</guid>
      <description>Changing the root of your Linux filesystem After my previous post [1], I&#39;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.&#xA;Lets shed some light on this topic.&#xA;Rootfs First of all, we need to specify what we mean when we say rootfs.&#xA;rootfs is a special instance of a ram filesystem (usually tpmfs) that is created in an early boot stage.</description>
    </item>
    <item>
      <title>chroot and user namespaces</title>
      <link>https://www.marcusfolkesson.se/blog/chroot-and-user-namespaces/</link>
      <pubDate>Thu, 22 Feb 2024 18:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/chroot-and-user-namespaces/</guid>
      <description>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.&#xA;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&#xA;Failed to unshare execution context: Operation not permitted... what?&#xA;I know that libcamera executes proprietary IPAs (Image Processing Algorithms) as black boxes, and that the execution is isolated in their own namespace.</description>
    </item>
    <item>
      <title>Streamline your kernel config</title>
      <link>https://www.marcusfolkesson.se/blog/streamline-your-kernel-config/</link>
      <pubDate>Thu, 15 Feb 2024 18:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/streamline-your-kernel-config/</guid>
      <description>Streamline your kernel config When working with embedded systems, it&#39;s not that uncommon that you need to compile your own kernel for your hardware platform.&#xA;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.&#xA;As the configuration is somehow generic, it probably contains tons of kernel modules that is not needed for your application.</description>
    </item>
    <item>
      <title>Power button and embedded Linux</title>
      <link>https://www.marcusfolkesson.se/blog/power-button-and-embedded-linux/</link>
      <pubDate>Fri, 09 Feb 2024 18:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/power-button-and-embedded-linux/</guid>
      <description>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?&#xA;Physical button It all starts with a physical button.&#xA;At the board level, the button is usually connected to a General-Purpose-Input-Output (GPIO) pin on the processor. It doesn&#39;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.</description>
    </item>
    <item>
      <title>br2-readonly-rootfs-overlay</title>
      <link>https://www.marcusfolkesson.se/blog/br2-readonly-rootfs-overlay/</link>
      <pubDate>Mon, 05 Feb 2024 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/br2-readonly-rootfs-overlay/</guid>
      <description>br2-readonly-rootfs-overlay This is a Buildroot external module that could be used as a reference design when building your own system with an overlayed root filesystem. It&#39;s created as an external module to make it easy to adapt for your to your own application.&#xA;The goal is to achieve the same functionality I have in meta-readonly-rootfs-overlay [1] but for Buildroot.&#xA;Why does this exists? Having a read-only root file system is useful for many scenarios:</description>
    </item>
    <item>
      <title>Expose network namespace created by Docker</title>
      <link>https://www.marcusfolkesson.se/blog/expose-netns-from-docker/</link>
      <pubDate>Wed, 20 Dec 2023 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/expose-netns-from-docker/</guid>
      <description>Expose network namespace created by Docker Disclaimer: this is probably *not* the best way for doing this, but it&#39;s pretty good for educational purposes.&#xA;During a debug session I wanted to connect an application to a service tha ran in a docker container. This was for test-purposes only, so hackish and fast are the keywords.&#xA;First of all, I&#39;m not a Docker expert, but I&#39;ve a pretty good understanding on Linux internals, namespaces and how things works on a Linux system.</description>
    </item>
    <item>
      <title>Skip flashing unused blocks with UUU</title>
      <link>https://www.marcusfolkesson.se/blog/skip-flashing-unused-blocks-with-uuu/</link>
      <pubDate>Mon, 11 Dec 2023 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/skip-flashing-unused-blocks-with-uuu/</guid>
      <description>Skip flashing unused blocks with UUU TL;DR: UUU does now (or will shortly) support blockmaps for flashing images. Use it. It will shorten your flashing time *a lot.*&#xA;It will soon be time to manufacture circuit boards for a project I&#39;m currently working on. After manufacturing, it will need some firmware for sure, but how do we flash it in the most efficient way? The board is based on an i.</description>
    </item>
    <item>
      <title>Burn eFuses for MAC address on iMX8MP</title>
      <link>https://www.marcusfolkesson.se/blog/burn-efuses-for-mac-address-on-imx8/</link>
      <pubDate>Sat, 28 Oct 2023 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/burn-efuses-for-mac-address-on-imx8/</guid>
      <description>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.&#xA;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:</description>
    </item>
    <item>
      <title>Loopback with two (physical) ethernet interfaces</title>
      <link>https://www.marcusfolkesson.se/blog/loopback-with-two-ethernet-interfaces/</link>
      <pubDate>Sat, 21 Oct 2023 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/loopback-with-two-ethernet-interfaces/</guid>
      <description>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?&#xA;As Linux (actually the default network namespace) is aware of both adapters and their IP/MAC-addresses, the system sees no reason to send any traffic out.</description>
    </item>
    <item>
      <title>Support for CRIU in Buildroot</title>
      <link>https://www.marcusfolkesson.se/blog/support-for-criu-in-buildroot/</link>
      <pubDate>Sun, 01 Oct 2023 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/support-for-criu-in-buildroot/</guid>
      <description>Support for CRIU in Buildroot A couple of months ago I started to evaluate [1] CRIU [2] for a project I&#39;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.&#xA;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.</description>
    </item>
    <item>
      <title>Checkpoint-restore in Linux</title>
      <link>https://www.marcusfolkesson.se/blog/checkpoint-restore/</link>
      <pubDate>Sun, 23 Jul 2023 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/checkpoint-restore/</guid>
      <description>Checkpoint-restore in Linux I&#39;m working on power saving features for a project based on a Raspberry Pi Zero. Unfortunately, the RPi does not support features as hibernation to disk or suspend to RAM because how the processor is constructed (the GPU is actually the main processor). So I was looking for alternatives.&#xA;That&#39;s when I stumpled upon CRIU ( [1], [2] ), Checkpoint-Restore In Userspace. (I actually started to read about PTRACE_SEIZE [4] and ptrace parasite code [3] and found out that CRIU is one of their users.</description>
    </item>
    <item>
      <title>meta-readonly-rootfs-overlay</title>
      <link>https://www.marcusfolkesson.se/blog/meta-readonly-rootfs-overlay/</link>
      <pubDate>Sat, 22 Jul 2023 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/meta-readonly-rootfs-overlay/</guid>
      <description>meta-readonly-rootfs-overlay meta-readonly-rootfs-overlay [1] is a meta layer for the Yocto project [2] originally written by Claudius Heine. I took over the maintainership in May 2022 to keep it updated with recent Yocto releases and keep add functionality.&#xA;I&#39;ve implemented it in a couple of industrial products so far and think it needs some extra attention as I find it so useful.&#xA;Why does this exists? Having a read-only root file system is useful for many scenarios:</description>
    </item>
    <item>
      <title>Embedded Open Source Summit 2023</title>
      <link>https://www.marcusfolkesson.se/blog/embedded-open-source-summit-2023/</link>
      <pubDate>Tue, 27 Jun 2023 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/embedded-open-source-summit-2023/</guid>
      <description>Embedded Open Source Summit 2023 This year the Embedded Linux Conference is colocated with Automotive Linux Summit, Embedded IOT summit, Safety-critical software summit, LFEnergy and Zephyr Summit. The event was held in Prague, Czech Republic this time.&#xA;It&#39;s the second time I&#39;m at a Linux conference in Czech Republic, and it clearly is my favorite place for such a event. Not only for the cheap beer but also for the architecture and the culture.</description>
    </item>
    <item>
      <title>Route priorities - metric values</title>
      <link>https://www.marcusfolkesson.se/blog/route-metric-values/</link>
      <pubDate>Sun, 11 Jun 2023 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/route-metric-values/</guid>
      <description>Route priorities - metric values Brief It&#39;s not an uncommon scenario that a Linux system has several network interfaces that are all up and routeable. For example, consider a laptop with both Ethernet and WiFi.&#xA;But how does the system determine which route to use when trying to reach another host?&#xA;I was up to setup a system with both a 4G modem and a WiFi connection. My use case was that when the WiFi is available, that interface should be prioritized over 4G.</description>
    </item>
    <item>
      <title>Lund Linux Conference 2023</title>
      <link>https://www.marcusfolkesson.se/blog/lund-linux-con-2023/</link>
      <pubDate>Thu, 25 May 2023 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/lund-linux-con-2023/</guid>
      <description>Lund Linux Conference 2023 The conference Lund Linux Conference (LLC) [1] is a &amp;quot;half-open&amp;quot; conference located in Lund. It&#39;s a conference with with high quality and I appreciate that the athmosphere is more familiar than at the larger conferences. I&#39;ve been at the conference a couple of times before and the quality on the talks this year was as good as usual. ( The talks are by the way availalble on Youtube [3].</description>
    </item>
    <item>
      <title>Encrypted storage on i.MX</title>
      <link>https://www.marcusfolkesson.se/blog/encrypted-storage-on-imx/</link>
      <pubDate>Mon, 03 Apr 2023 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/encrypted-storage-on-imx/</guid>
      <description>Encrypted storage on i.MX Brief Many embedded Linux systems does have some kind of sensitive information on a file storage. It could be private keys, passwords or whatever. It&#39;s always a risk that this information could be revealed by an unauthorized person that got their physical hands on the device. The only protection against attackers that who simply bypass the system and access the data storage directly is encryption.</description>
    </item>
    <item>
      <title>Bug in the iMX8MP ECSPI module?</title>
      <link>https://www.marcusfolkesson.se/blog/bug-in-imx8mp-ecspi-module/</link>
      <pubDate>Tue, 21 Mar 2023 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/bug-in-imx8mp-ecspi-module/</guid>
      <description>Bug in the iMX8MP ECSPI module? Background I do have a system where I can swap between iMX8M Mini and iMX8M Plus CPU modules on the same carrier board.&#xA;I did write a a SPI driver for a device on the carrier board. The device is connected to the ECSPI1 (the CPU contains several ECSPI modules) and use the hardware chipselect 0 (SS0). The driver has been used with the iMX8MM CPU module for a while, but as soon I swapped to the iMX8MP it certainly stopped working.</description>
    </item>
    <item>
      <title>Route traffic with NAT</title>
      <link>https://www.marcusfolkesson.se/blog/route-traffic-with-nat/</link>
      <pubDate>Fri, 17 Feb 2023 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/route-traffic-with-nat/</guid>
      <description>Route traffic with NAT Long time ago I wrota a blog post [1] about how to use NAT to route traffic to your embedded device via your host computer.&#xA;Back then we were using iptables to achieve it, nowadays nftables is the preferred successor, so it&#39;s time for an update.&#xA;What is NAT anyway? Network Address Translation, or NAT, does map an address space into another by modifying the network address infromation in the IP header for each packet.</description>
    </item>
    <item>
      <title>Use custom EDID in Linux</title>
      <link>https://www.marcusfolkesson.se/blog/custom-edid-in-linux/</link>
      <pubDate>Sat, 07 Jan 2023 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/custom-edid-in-linux/</guid>
      <description>Use custom EDID in Linux Extended Display Identification Data (EDID) is a metadata format for display devices to describe their capabilities such as resolution, display size, timing, bit depth and update frequency. It&#39;s a 128-byte (EDID) or 256-byte (Enhanced-EDID) structure transferred from the display device over the Display Data Channel (DDC) protocol, which is a layer on top of the I2C specification.&#xA;The EDID is accessible via the I2C address 0x50 and can usually be read even if the display is turned off, which is quite nice.</description>
    </item>
    <item>
      <title>Raspberry Pi and QEMU</title>
      <link>https://www.marcusfolkesson.se/blog/rpi-qemu/</link>
      <pubDate>Tue, 29 Nov 2022 12:05:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/rpi-qemu/</guid>
      <description>Raspberry Pi and QEMU What is QEMU? QEMU is a generic and open source machine emulator and visualizer. It emulates full machines (boards) of different architectures and is useful for both application and kernel development. The CPU itself could be fully emulated (together with devices, memories and so on) or work with a hypervisor such as KVM or Xen.&#xA;If support for your hardware is missing, then it&#39;s a fairly easy task to write a stub driver that your application can interface.</description>
    </item>
    <item>
      <title>Crosscompile libcamera for RPi</title>
      <link>https://www.marcusfolkesson.se/blog/compile-libcamera-for-rpi/</link>
      <pubDate>Tue, 29 Nov 2022 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/compile-libcamera-for-rpi/</guid>
      <description>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.&#xA;We will use a Raspberry Pi 3b for this.</description>
    </item>
    <item>
      <title>Mounting with systemd and udev</title>
      <link>https://www.marcusfolkesson.se/blog/systemd-udev/</link>
      <pubDate>Fri, 12 Aug 2022 09:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/systemd-udev/</guid>
      <description>Mounting with systemd and udev Systemd hasn&#39;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&#39;t. At the same time, that is just what I don&#39;t like with systemd, it does not follow the &amp;quot;Do one thing and do it well&amp;quot;-philosophy that I like so much. I&#39;m very thorn about it.</description>
    </item>
    <item>
      <title>This website setup</title>
      <link>https://www.marcusfolkesson.se/blog/website-setup/</link>
      <pubDate>Wed, 03 Mar 2021 12:00:34 +0100</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/website-setup/</guid>
      <description>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.&#xA;Tools Hugo I use Hugo [1] to generate my website. Hugo is a fantastic tool for generate static web pages in an flexible way.&#xA;All pages is written in reStructured Text [2] which is the markup syntax I strongly prefer.&#xA;Docker The web server [4] and traefik [5] server is running in docker [3] containers.</description>
    </item>
    <item>
      <title>Parsing command line options</title>
      <link>https://www.marcusfolkesson.se/blog/cmdline-parsing/</link>
      <pubDate>Wed, 29 Jan 2020 15:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/cmdline-parsing/</guid>
      <description>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).&#xA;The GNU C library provides an even more sophisticated API for parsing the command line, argp(), and is described in the glibc manual [1].</description>
    </item>
    <item>
      <title>Embedded Linux Conference 2019</title>
      <link>https://www.marcusfolkesson.se/blog/embedded-linux-conference-2019/</link>
      <pubDate>Thu, 31 Oct 2019 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/embedded-linux-conference-2019/</guid>
      <description>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&#39;m not traveling that often and do not have these &#39;must-checks&#39; in my muscle memory..&#xA;This time we were heading Lyon in France.</description>
    </item>
    <item>
      <title>ligsegfault.so</title>
      <link>https://www.marcusfolkesson.se/blog/libsegfault/</link>
      <pubDate>Thu, 13 Dec 2018 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/libsegfault/</guid>
      <description>libsegfault.so The dynamic linker [1] in a Linux system is using several environment variables to customize it&#39;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).&#xA;For example, consider the following output&#xA;$ LD_TRACE_LOADED_OBJECTS=1 /bin/bash linux-vdso.so.1 (0x00007ffece29e000) libreadline.</description>
    </item>
    <item>
      <title>Embedded Linux Conference 2018</title>
      <link>https://www.marcusfolkesson.se/blog/embedded-linux-conference-2018/</link>
      <pubDate>Tue, 23 Oct 2018 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/embedded-linux-conference-2018/</guid>
      <description>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&#39;ve tried Haggis as it&#39;s a must-try-thing and so should you. But be prepared to buy a backup-meal.</description>
    </item>
    <item>
      <title>Lund Linux Conference 2018</title>
      <link>https://www.marcusfolkesson.se/blog/lund-linux-con-2018/</link>
      <pubDate>Fri, 20 Apr 2018 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/lund-linux-con-2018/</guid>
      <description>Lund Linux Conference 2018 It&#39;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.&#xA;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.</description>
    </item>
    <item>
      <title>OOM-killer</title>
      <link>https://www.marcusfolkesson.se/blog/oom-killer/</link>
      <pubDate>Fri, 01 Dec 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/oom-killer/</guid>
      <description>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).</description>
    </item>
    <item>
      <title>Embedded Linux course in Linköping</title>
      <link>https://www.marcusfolkesson.se/blog/embedded-linux-course-in-linkoping/</link>
      <pubDate>Sun, 19 Nov 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/embedded-linux-course-in-linkoping/</guid>
      <description>Embedded Linux course in Linköping I tech in our Embedded Linux course on a regular basis, this time in Linköping. It&#39;s a fun course with interesting labs where you will write your own linux device driver for a custom board.&#xA;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.</description>
    </item>
    <item>
      <title>FIT vs legacy image format</title>
      <link>https://www.marcusfolkesson.se/blog/fit-vs-legacy-image-format/</link>
      <pubDate>Wed, 18 Oct 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/fit-vs-legacy-image-format/</guid>
      <description>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.&#xA;A typical embedded Linux system have all these files in at least two-three different configurations. It&#39;s not uncommon to have a&#xA;Default configuration Rescue configuration Development configuration Production configuration ... Only these four configurations may end up with unmanageable amount of different files.</description>
    </item>
    <item>
      <title>Magic SysRq</title>
      <link>https://www.marcusfolkesson.se/blog/magic-sysrq/</link>
      <pubDate>Sun, 27 Aug 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/magic-sysrq/</guid>
      <description>Magic SysRq Every kernel-hacker should knows about the magic SysRQ. Period.&#xA;To enable the magic, make sure CONFIG_MAGIC_SYSRQ is set in your Kernel hacking tab.&#xA;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.&#xA;As everybody is using GNU Screen (what else?) as their TTY terminal, the keyboard combination is: ctrl+A B.</description>
    </item>
    <item>
      <title>Take control of your Buffalo Linkstation NAS</title>
      <link>https://www.marcusfolkesson.se/blog/take-control-of-your-buffalo-linkstation/</link>
      <pubDate>Sun, 27 Aug 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/take-control-of-your-buffalo-linkstation/</guid>
      <description>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.&#xA;However, it would be really useful to use some sane protocols like sftp so you could use rsync for your backup scripts.</description>
    </item>
    <item>
      <title>NAT with Linux</title>
      <link>https://www.marcusfolkesson.se/blog/nat-with-linux/</link>
      <pubDate>Thu, 27 Jul 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/nat-with-linux/</guid>
      <description>NAT with Linux To share an internet connection may sometimes be very practical when working with embedded devices. The network may have restrictions/authentications that stops you from plug in your device into the network of the big company you are working for.&#xA;But what about creating your own network and use your computer as NAT (Network Address Translation)?&#xA;It&#39;s not that hard to setup, it&#39;s actually just a few command lines away.</description>
    </item>
    <item>
      <title>-ENOENT, but believe me, it&#39;s there</title>
      <link>https://www.marcusfolkesson.se/blog/enoent-but-believe-me-its-there/</link>
      <pubDate>Thu, 13 Jul 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/enoent-but-believe-me-its-there/</guid>
      <description>-ENOENT, but believe me, it&#39;s there Almost every ELF-file in a Linux environment is dynamically linked, and the operating system has to locate all dynamic libraries in order to execute the file. To its help, it has the runtime dynamic linker, whose only job is to interpret the ELF file format, load the shared objects with unresolved references, and, at last, execute and pass over the control to the ELF file.</description>
    </item>
    <item>
      <title>Terminate a hanging SSH session</title>
      <link>https://www.marcusfolkesson.se/blog/terminate-a-hanging-ssh-session/</link>
      <pubDate>Tue, 27 Jun 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/terminate-a-hanging-ssh-session/</guid>
      <description>Terminate a hanging SSH session It may be very frustrating when SSH sessions just hangs because the target is power cycling or something. Lucky for you there is a &amp;quot;secret&amp;quot; escape sequence that allows you to terminate the session (and a few other things).&#xA;The escape sequence is &amp;lt;enter&amp;gt;~X where X is a command letter. To see all available key sequences, type &amp;lt;enter&amp;gt;~?.&#xA;Example output: 1 marcus@Ilos:~$ ~? 2 Supported escape sequences: 3 ~.</description>
    </item>
    <item>
      <title>Interrupts, and how to divide them between cores</title>
      <link>https://www.marcusfolkesson.se/blog/interrupts-and-how-to-divide-them-between-cores/</link>
      <pubDate>Fri, 07 Apr 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/interrupts-and-how-to-divide-them-between-cores/</guid>
      <description>Interrupts, and how to divide them between cores Symetric MultiProcessing (SMP) are becoming increasingly common in embedded systems. Many chip manufacturers such as Texas Instruments and Freescale offers ARM multicores, even FPGA manufacturers like Xilinx and Altera has System-on-Chip with multiple ARM cores. One benefit with SoC is that it&#39;s even possible to add soft cores in the programmable logic if it&#39;s necessary.&#xA;The trend is clear, multiple cores is here and it&#39;s not likely to be fewer of them.</description>
    </item>
    <item>
      <title>Linux memory overcommit</title>
      <link>https://www.marcusfolkesson.se/blog/linux-memory-overcommit/</link>
      <pubDate>Mon, 27 Mar 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/linux-memory-overcommit/</guid>
      <description>Linux memory overcommit Linux is generous in terms of memory, it will almost never fail on requests from malloc(3) with friends. What does this mean in practice and how may it be a potential issue?&#xA;In short, overcommit memory means that the system will give the application so much memory it&#39;s asking for, even if the physical memory is not available. How does this work? Well, the requested memory comes with one small restriction; the application is given as much memory it demands if it not going to use it.</description>
    </item>
    <item>
      <title>LDD without LDD</title>
      <link>https://www.marcusfolkesson.se/blog/ldd-without-ldd/</link>
      <pubDate>Fri, 27 Jan 2017 19:39:34 +0200</pubDate>
      <guid>https://www.marcusfolkesson.se/blog/ldd-without-ldd/</guid>
      <description>LDD without LDD I often meet colleges at work who gets frustrated when they try to see the shared libraries dependencies for an ELF file and the ldd command is simply stripped out from target. (I do often strip targets :-) )&#xA;The ldd command is not a binary executable but a script that simple calls the runtime dynamic linker with a few environment variables set, and you may do the same!</description>
    </item>
  </channel>
</rss>
