Marcus Folkesson

Embedded Linux Artist

--build, --host and --target explained

--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. But who can blame them. What these parameters do it not obvious and very few people compile their own crosscompiler nowadays - or ever did.

OMAPL138 AIS generator

OMAPL138 AIS Generator I'm currently working on an old platform based on OMAPL138 from Texas Instruments. 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. The OMAPL138 is from 2009 but still active. The latest revision for the chip (Rev. cover

What time is it? RTCs explained in embedded Linux

What time is it? RTCs explained in embedded Linux Most smart devices keep track of time and it's usually something that everyone expects to be "right", 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? 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. cover

Lund Linux Conference 2024

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. The conference Lund Linux Conference (LLC) [1] is a "half-open" conference located in Lund. It's a conference with a high quality and I appreciate that the athmosphere is more familiar than at the larger conferences. I've been at the conference several of times before and the quality on the talks this year was as good as usual. cover

Versioning with SWUpdate

Versioning with SWUpdate TLDR; It is now possible to let SWUpdate manage the sw-versions file entirely thanks to the --gen--swversions feature I've been working on. SWUpdate SWUpdate [1] is a project I've been using for a very long time for updating firmware on embedded systems. 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've seen custom made update services that contain bugs, is not flexible enough or using slots for whatever software that could be updated. cover

Flattened Image Tree (FIT) with Yocto

Flattened Image Tree (FIT) with Yocto Long time ago, I wrota a post [1] that compared the legacy Image format against Flattened Image Tree Format (FIT) [2] and highlighted the benefits of using it. The benefits is still valid and FIT images is my preferred way to boot a Linux kernel. Dispite that, I almost never see that FIT images is used in examples nor Board Support Packages (BSPs). cover

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

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.