“Rusty” swapping optimization: zswap backend written in Rust
Vitaly Wool
Lund Linux Conference 2025
Vitaly Wool
Lund Linux Conference 2025
Konsulko engineers are often asked to evaluate radio modules and other hardware that may be used with one of our customers’ custom boards for an upcoming embedded product.
Recently, for two separate clients, we completed a detailed review of two WiFi/Bluetooth modules based on the Infinion CYW43439, manufactured by Ezurio (formerly Laird Connectivity and Boundary Devices). Ezurio hardware seems to be a popular choice, especially in the US, but Konsulko has no commercial relationship with the company and has made a purely technical evaluation.
Konsulko Senior Engineer Darko Alavanja has written this Integration and Troubleshooting Guide focussing on the Sterling LWB+ with WiFi 4 and Bluetooth 5.2 support. It has SDIO 2.0 and HCI HS-UART interface with a few additional GPIOs for turning on the module’s WiFi and/or BT regulators, sleep operation etc.
The Sona IF-513 module is M.2 form factor module that that supports Wi-Fi 6E + Bluetooth® 5.4 and uses SDIO 3.0 and HS-UART. It has a similar setup to Sterling LWB+ with one important quirk discussed in the Guide.
Topics include:
The troubleshooting section addresses:
You may download the guide to Integration and Troubleshooting of a Sterling LWB+ radio module here.
After 27 years, Windows CE, later known as Windows Embedded CE and Windows Embedded Compact, reached its end-of-life in 2023. Konsulko Group has been helping customers who formerly used Microsoft’s OS for embedded devices to transition to Linux. This short article by Konsulko Principal Software Engineer George McCollister outlines the steps.
Linux, with its vast hardware support and software ecosystem is a natural replacement for device manufacturers that used Windows CE to migrate their product offerings.
The Yocto Project unifies the OpenEmbedded build system and other tools to provide a powerful launch platform for your Embedded Linux device. Recipes for hundreds of software packages are included and thousands more are available through 3rd party layers. Most SoC vendors provide a Yocto compatible BSP (Board Support Package) layer with recipes for building a boot loader and OS kernel. It’s also possible to create your own BSP layer either from scratch or to extend a vendor provided layer.
The most important part of the Windows CE to Yocto-enabled Embedded Linux transition process is understanding the available software components and tools so you can choose the most suitable replacements. It’s common for Windows CE devices to have more custom software since the software ecosystem is much smaller than Embedded Linux. It’s critical to identify which custom software can be replaced with software provided by Yocto Project and third-party layers. Choosing the correct existing tools, drivers, libraries and frameworks will provide a smoother transition and more robust, easy to maintain final product.

A good first step is to perform the Yocto Project Quick Build. This will familiarize you with the basics required to build an Embedded Linux Image and find the appropriate BSP layer for your hardware. Once you add a BSP layer you can build an image such as core-image-minimal for one of the MACHINEs provided by the BSP. This build process will usually provide a boot loader image (typically U-Boot), a Linux kernel image, a Linux devicetree blob and filesystem image. Some BSPs will provide a wic image that can be directly flashed to bootable media such as a Micro SD card. Unlike Windows CE, the default file system type used for the root file system is usually Ext4.
Before attempting to port any device drivers from Windows CE, check to see if a suitable driver already exists in the Linux kernel. The first place to look is in the official Linux kernel source tree. The drivers directory is organized into subsystems, find the subsystem for the type of device that you’re looking for and browse through available drivers. If you’re unable to locate a driver for the device, download the source code and search the driver directory for the part number or partial part number. For example if you were looking for a driver for the TI WL1837MOD WiFi and Bluetooth module you would try searching for “wl1837” with a tool such as git grep. This would lead to the following results in this case but if you were still unable to find a device driver the next place to look is on the component manufacturer’s website.
bluetooth/hci_ll.c: { .compatible = "ti,wl1837-st" },
net/wireless/ti/wlcore/sdio.c: { .compatible = "ti,wl1837", .data = &wl18xx_data },
net/wireless/ti/wlcore/spi.c: { .compatible = "ti,wl1837", .data = &wl18xx_data},
For bluetooth you would use the hci_ll driver and for wireless LAN you would use the wlcore driver. Once you find the compatible string for the driver you want to use, you need to add an entry for it to the kernel devicetree under the appropriate node. If the module was connected via SPI controller 1 you would add the new node under the spi1 node. Documentation/devicetree/bindings in the Linux kernel source includes information about the devicetree properties the driver recognizes.
Linux systems have a system and init manager. Yocto defaults to building the OS image with the SysVinit system but systemd and BusyBox init are also available. BusyBox init can be suitable for very simple embedded systems while systemd is better suited to systems that have many running services with interdependencies.
Once you’re able to build and boot a basic Linux system consisting of a boot loader, kernel and simple root file system you can explore adding additional software into your image. There are hundreds of packages that you can include in your image available in poky and hundreds more available in meta-openembedded.
If there’s no recipe for the software you want to add in either poky or meta-openembedded it may be provided by a 3rd party layer. The OpenEmbedded Layer Index makes it easy to find 3rd party layers by browsing or searching by layer or recipe name.
If you’re migrating software written to use .NET framework there are two different Yocto compatible layers available which allow it to run on Linux.
If you have application code that uses the Win32 API it will need to be ported to use a combination of POSIX function calls and other libraries. Any Win32 threading or synchronization function calls made from C will need to be changed to use pthreads. C++ code can be changed to use concurrency classes which abstract pthread calls. Win32 code that creates or interacts with window objects (HWND) will need to be changed to use a different graphical framework such as GTK or Qt.
If you’re using Qt Framework in Windows CE you can utilize the meta-qt5 or meta-qt6 layers (depending on which version of Qt your application uses) to build the framework and provide bitbake classes to build your application.
There are multiple Yocto compatible solutions available for doing OTA and other types of updates.
Konsulko Group’s long history with Linux, Yocto Project and OpenEmbedded can provide the expertise customers need when moving to an embedded, open source operating system. Some of Konsulko’s engineers were working with Linux even before the inception of Windows CE in 1996, and many have years of experience moving product offerings from proprietary RTOSs to Linux. Contact us to discuss how we can help with your migration.
As we reach the end of 2024, we want to thank our customers, partners and engineers for another successful year (our 12th!) helping companies around the world develop their embedded products.
We’ve collected sixteen new case studies across multiple industries to showcase our work and give a sense of the scope and breadth of our engineering across multiple industries.
At Konsulko Group, we provide engineering services to help our customers develop innovative, secure, and FDA-compliant healthcare products. With expertise spanning biometric sensor integration, secure embedded Linux development, and scalable system design, we provide software and hardware engineering services to support our customers in the medical industry as they develop innovative and reliable products.
Our work spans a wide range of applications, and we are engaged by Point-of-Care Diagnostics companies, Medical Device Startups, Robotics and Automation developers, Biometric Sensor Integration projects and established Healthcare manufacturers.
Konsulko Group provides engineering services to support customers in designing and developing innovative products across the industrial and heavy equipment market. Our clients rely on our expertise to bring their ideas to life, whether they are building advanced agricultural machinery, mining systems or industrial automation equipment. While we do not deliver turnkey solutions, we offer the hardware and software engineering capabilities necessary to help our customers achieve their goals.
We work with a diverse range of customers, including global leaders in Agriculture Technology, Mining Equipment, Transportation and Railway Technology providers, Heavy Machinery manufacturers, and Food and Manufacturing Equipment suppliers.
We’ve published five case studies:
Konsulko Group has extensive experience providing engineering services to support our telecommunications customers in designing and developing innovative technologies. With expertise in embedded Linux software and hardware engineering, we help our customers create next-generation products.
We collaborate with a diverse range of customers in the telecommunications industry, including Network Infrastructure suppliers, Wireless Communications innovators, Satcom Technology developers, Telecom Monitoring and Optimization specialists, and Defense and Secure Communications providers.
You may read detailed descriptions of five of our engagements here:
The transportation industry is undergoing a technological revolution, and Konsulko Group is at the forefront, helping customers develop embedded systems that drive innovation in connected vehicles, autonomous platforms, and advanced automotive technologies.
We work with a diverse range of customers in the transportation industry, including Connected and Autonomous Vehicle developers, Semiconductor leaders, Mapping and Navigation innovators, Industry Consortiums and OEMs, and Silicon Valley Innovation Offices.
We’ve posted four case studies of a few of our engagements:
Konsulko Group offers complete hardware services including design, integration, validation and certification, rapid prototyping, biometric signals, sensors, wireless communications, low power applications and manufacturing test/support.
In April, Konsulko Group welcomed three veteran hardware developers to our growing team. Alexandar Kalaydjiev now serves as Konsulko Hardware Director. Marin Balkandjiev and Tsvetan Mudrov, PhD joined Konsulko as Principal Hardware Engineers.
Customers can leverage their technical expertise and extensive experience to create comprehensive products and solutions tailored to their specific requirements.
Konsulko hardware engineers can manage and facilitate the production of the developed products, ensuring their successful realization. We can provide deployment support as required, ensuring a smooth transition for the end-customer.
In addition to our Hardware group, Konsulko continues to attract outstanding talent to our team. This year we have added three individuals who represent some of the best in embedded Linux and open source engineering.
You can learn more about the whole Konsulko team of embedded hardware and software consultants on our Meet the Team page.
Konsulko’s senior leadership have been contributors in the Linux kernel and other OSS communities since the late 1990s. In addition to our commercial engineering work for our customers, the Konsulko team continues to have active roles in a number of Open Source projects including U-Boot, Yocto Project, OpenEmbedded and Automotive Grade Linux (AGL).
Konsulko engineers made presentations at open source and commercial conferences and developer gatherings including Embedded Linux Conferences (North America and Europe), AGL All Member Meetings and Yocto Project Summits. We also published seven new technical articles as blogs on our website.
All of us at Konsulko Group look forward to working with you in the coming year. Contact us to explore how our engineering services can help bring your innovative products to life in 2025 and beyond.
We’re heading to Austria for Open Source Summit Europe, with a large contingent of our engineers, as well as four speakers for this always important conference.
Principal Engineer Scott Murray will join the Linux Foundation’s Walt Miner to present “What’s Happening with Automotive Grade Linux and How Our Update to Yocto 5.0 Went.” Walt and Scott will share some lessons learned from upgrading from the 4.0 to 5.0 versions of the Yocto Project and provide an update on the latest AGL features included in the Ricefish release.
Vitaly Wool, Principal Engineer and GM of Konsulko AB will discuss “Rusty Swapping: Rewriting a Zswap Backend in Rust.” Rust has gained popularity as the second Linux kernel high-level language. Recently, Vitaly rewrote a zswap backend called zblock in Rust. This talk will cover the main principles of zblock (which stay the same no matter which language is used), the obstacles met while implementing it in Rust, and finally the comparison of the two.
Principal Engineer Tim Orling will present “Are You Ready For Scarthgap? Best Practices For The Latest Yocto Project LTS Release.” Tim will discuss setting up your own “distribution” and board-support package (BSP), and share techniques for managing and discovering layers. He’ll discuss best practices to ensure your public layers are ready for the Layer Index, and investigate meta-lts-mixin layers. He’ll look at the latest tools for Software Bill of Materials (SBOM), license compliance (SPDX), and software vulnerabilities (CVEs), and share ways to leverage new IDE tools added in this release.
At Yocto Project Developer Day 2024 (co-located with OSEE) Senior Engineer Leon Anavi will provide a “Side-by-side Comparison of Dual A/B Update Solutions with the Yocto Project.” Leon’s talk will provide a detailed exploration of Mender, RAUC, and swupdate, comparing them on the same hardware platforms. He’ll discuss their advantages and disadvantages and how to select the most appropriate open-source solution for specific projects. Leon will delve into various use cases and practical examples, concluding with a side-by-side comparison.
We hope you’ll be able to join us in Vienna.
Software over-the-air (OTA) updates are essential for any modern embedded Linux device. In part 1, we explored A/B software updates using RAUC and qbee.io. For our demonstrations, we utilized the new open source hardware Olimex’s iMX8MPlus System on Module (SOM) and Evaluation Board (EVB). The NXP i.MX8MP is a robust microprocessor, ideal for industrial-grade applications and widely adopted across various industries. In part 2, we will use Mender to update the same hardware.

Mender.io is an open-source platform designed for managing and deploying over-the-air (OTA) updates to embedded devices. It provides a reliable and secure method to keep devices up-to-date, minimizing downtime and reducing the risks of manual updates. Mender supports an open-source A/B update scheme and offers an optional proprietary implementation for delta updates.
As a turnkey solution, Mender features a web interface for comprehensive device management and is available as a Software-as-a-Service (SaaS) for small and medium businesses, as well as hosted or on-premise solutions for large enterprises. It supports robust update strategies, rollback mechanisms, and add-ons for configuring, monitoring, and troubleshooting devices. Mender is a state-of-the-art solution for maintaining and managing fleets of connected devices across various industries.

Here are the steps to build core-image-base with Mender for Olimex:
pip install kas
git clone -b scarthgap https://github.com/mendersoftware/meta-mender-community
mkdir -p meta-mender-community/mender-nxp && cd meta-mender-community/mender-nxp
cat <<EOF > debug-image.yml
header:
version: 14
local_conf_header:
developer-features: |
EXTRA_IMAGE_FEATURES = "debug-tweaks"
EOF
kas build ../kas/olimex-imx8mp-evb.yml:debug-image.yml
Initiating the build process from scratch is a bit of a marathon, as kas and bitbake need to download all the source code and execute a plethora of tasks. Feel free to grab a cup of tea (or maybe a whole teapot) while you wait!
Using kas and BitBake will result in the production of an image file. After the build process is complete, you will find the generated image at the following relative path: build/tmp/deploy/images/olimex-imx8mp-evb/core-image-base-olimex-imx8mp-evb.sdimg. This path indicates the location within the build directory where the final image is stored, ready for deployment to Olimex iMX8MP-SOM-4GB-IND and iMX8MP-SOM-EVB-IND.
The core-image-base-olimex-imx8mp-evb.sdimg file must be flashed onto a microSD card to be used with your device. This can be accomplished using various applications such as dd or bmaptool for command-line options. If you prefer a user-friendly application with a graphical interface, you can use Balena Etcher, which simplifies the flashing process and provides a straightforward GUI.
To set up and verify your Olimex iMX8MP-SOM-EVB-IND board, follow these steps:

mender-update show-provides
mender-update show-artifact
mender-update --version

A Mender artifact refers to a package format used by the Mender update manager for over-the-air (OTA) software updates. It contains all the necessary components such as firmware, scripts, configuration files, and metadata required to update a device’s software reliably and securely. The layer meta-mender/meta-mender-core is essential for integrating Mender’s functionality into the Yocto Project and OpenEmbedded build system as it provides required classes and scripts that automate the creation of Mender artifacts as part of the build process.
Follow the steps below to build a Mender Artifact for iMX8MP-SOM-EVB-IND that extends the system with the addition of the simple text editor nano:
nano:cat <<EOF > update-image.yml
header:
version: 14
local_conf_header:
update-image: |
IMAGE_INSTALL:append = " nano"
EOF
core-image-base and its corresponding Mender Artifact using:kas build ../kas/olimex-imx8mp-evb.yml:debug-image.yml:update-image.yml
nano at the file path build/tmp/deploy/images/olimex-imx8mp-evb/core-image-base-olimex-imx8mp-evb.mender.Mender serves as a comprehensive update solution, featuring a central server that acts as a hub for storing and orchestrating software updates across fleets of devices via over-the-air deployment. Using Mender’s intuitive web UI or REST APIs, you can efficiently manage devices, upload software releases, and execute seamless deployments to distribute updates across your devices. Alternatively, Mender can operate in standalone mode, independent of a server.
To perform a manual standalone deployment using Mender in the terminal, follow the steps below. In this setup, no Mender Server is involved, and updates are initiated directly on the device.
python3 -m http.server
root on Olimex iMX8MP-SOM-4GB-IND and iMX8MP-SOM-EVB-IND and install the Mender Artifact to perform an upgrade of the device:mender-update install http://<server>:8000/core-image-base-olimex-imx8mp-evb.mender
NOTE: Replace <server> with the IP address of the machine on which the Python3 HTTP server is running.

reboot
root on the board and verify that nano text editor has been installed.mender-update commit

This example illustrates the seamless integration of Mender using the Yocto Project release Scarthgap on an embedded computer powered by the NXP i.MX8MP SoC. It demonstrates how you can effectively manage updates across fleets of devices using the Mender server. Furthermore, Mender also provides additional tools for remote troubleshooting, ensuring smooth operations in the field.
The Mender client is an application that runs on embedded devices. In a production setup, it connects to the Mender server to perform automatic updates by downloading and installing Mender Artifacts as they become available. Initially, the Mender client was developed in Go. However, a strategic decision was made to rewrite it in C++ to reduce the application’s footprint and support more platforms, including real-time operating systems (RTOS).
In comparison, RAUC, the alternative A/B open-source solution explored in part one, also has an application running on the embedded Linux device, but it is written in C. Unlike Mender, RAUC does not provide a server to manage devices, so a third-party solution such as qbee.io or Eclipse hawkBit is required.
Another notable technical difference is that RAUC integration through meta-rauc-nxp relies on a wks file where the A and B partitions are explicitly specified. In contrast, meta-mender-nxp uses classes and special variables provided by Mender to define those partitions, and BitBake generates a temporary wks file while building Mender-enabled images.
In terms of security, both Mender and RAUC support signing and verification of updates. Mender supports signing artifacts using RSA with a recommended key length of at least 3072 bits or ECDSA with curve P-256. RAUC employs X.509 cryptography for signing and verifying update bundles.
Leveraging the insights and experiences discussed in parts 1 and 2 of this article, here is a side-by-side comparison of the key features of Mender and RAUC:
| Feature | Mender | RAUC |
|---|---|---|
| A/B updates | Yes | Yes |
| Roll-back | Yes | Yes |
| Configure add-on | Available | No |
| Monitor add-on | Available | No |
| Troubleshoot add-on | Available | No |
| Client implementation | C++ | C |
| Client license | Apache 2.0 | LGPL-2.1 |
| Yocto Project integration | Yes | Yes |
| Management server | Yes | 3rd-party |
Mender.io provides a comprehensive, turnkey solution that covers everything from embedded devices to cloud-based software-as-a-service for managing fleets of connected devices. It also offers convenient add-ons and proprietary delta updates. Meanwhile, RAUC reliably integrates seamlessly with both in-house and third-party device management systems. The choice of update technology should be based on your specific requirements and use cases.
Over the years, Konsulko engineers have made significant contributions to the community and crucial embedded Linux open-source projects, including the Yocto Project, OpenEmbedded, the Linux kernel, and U-Boot. We specialize in assisting customers in developing commercial products leveraging these technologies. With expertise in BSP bring-up on diverse hardware platforms for embedded devices, our services encompass a wide range of open-source solutions for software updates. Contact us to discuss the best update strategy and technology for your embedded product requirements.
Software over-the-air (OTA) updates are essential for embedded Linux devices as they ensure timely application of security patches, fix vulnerabilities, and enhance security features to protect against threats. They offer a convenient way to deliver new features, performance improvements, and bug fixes without needing physical access to the device, keeping it up-to-date and functional.
Several high-quality open-source OTA solutions are available today, allowing developers to leverage and customize existing systems rather than creating proprietary ones, saving both time and money. In this series of articles, we will explore and compare software update strategies using the A/B scheme, where two identical copies of the root filesystem are maintained, one active and one for the next update. Popular OTA update solutions like Mender, RAUC, and Swupdate implement this approach. This article will focus on RAUC using a typical development setup. In part 2 we will implement software updates with Mender. For our demonstration, we will use the i.MX8MP, a versatile microprocessor from NXP Semiconductors known for its industrial-grade reliability and popularity in smart home devices, industrial automation, medical equipment, and multimedia systems.

Recently, Olimex launched an open-source hardware iMX8MPlus System on Module (SOM) and Evaluation Board (EVB) tailored for industrial applications. Leon Anavi, Senior Engineer at Konsulko Group, contributed support for Olimex iMX8MP-SOM-4GB-IND and iMX8MP-SOM-EVB-IND to the community-maintained Yocto and OpenEmbedded BSP layers. This effort encompassed Linux kernel and U-Boot uplift. Subsequently, leveraging his role as founder and maintainer of the meta-rauc-community layer, Leon integrated support for RAUC software updates on these boards and seamlessly integrated them with qbee cloud service.
Qbee.io is a comprehensive cloud platform for managing and maintaining IoT and edge devices. Using the qbee-agent running on the embedded devices, it offers features such as configuration management, remote accesss, monitorning, security and OTA software updates based on RAUC. These capabilities enable businesses to efficiently oversee their distributed technology infrastructure, ensuring devices remain up-to-date, secure, and perform optimally. Earlier in 2024 Tim Orling, Konsulko Group Principal Software Engineer, implemented image update with qbee and RAUC on Raspberry Pi 5.
This technical article will guide you through the exacts steps to build a basic image for Olimex iMX8MP-SOM-4GB-IND and iMX8MP-SOM-EVB-IND using Yocto Project release 5.0 LTS (scarthgap) as well as to perform a software update using qbee and RAUC.

git clone -b scarthgap https://git.yoctoproject.org/poky poky-olimex-imx8mp
cd poky-olimex-imx8mp
git clone -b scarthgap https://github.com/Freescale/meta-freescale.git
git clone -b scarthgap https://github.com/Freescale/meta-freescale-3rdparty.git
git clone -b scarthgap https://github.com/Freescale/meta-freescale-distro.git
git clone -b scarthgap https://github.com/rauc/meta-rauc.git
git clone -b scarthgap https://github.com/rauc/meta-rauc-community.git
git clone -b master https://github.com/qbee-io/meta-qbee.git
git clone -b scarthgap git://git.openembedded.org/meta-openembedded
source oe-init-build-env
bitbake-layers add-layer ../meta-openembedded/meta-oe
bitbake-layers add-layer ../meta-freescale
bitbake-layers add-layer ../meta-freescale-3rdparty
bitbake-layers add-layer ../meta-freescale-distro
bitbake-layers add-layer ../meta-rauc
bitbake-layers add-layer ../meta-rauc-community/meta-rauc-nxp
bitbake-layers add-layer ../meta-qbee/meta-qbee
conf/local.conf by appending the following configurations to the end of the file:MACHINE = "olimex-imx8mp-evb"
INIT_MANAGER = "systemd"
ACCEPT_FSL_EULA = "1"
WKS_FILE = "dual-imx-boot-bootpart.wks.in"
DISTRO_FEATURES:append = " rauc"
IMAGE_FSTYPES:append = " ext4"
IMAGE_BOOT_FILES:append = " boot.scr"
IMAGE_INSTALL:append = " rauc-grow-data-part"


<bootstrap_key> with the qbee bootstrap key and append to conf/local.conf:QBEE_BOOTSTRAP_KEY = "<bootstrap_key>"
bitbake core-image-base
Creating an image from the ground up is a time-consuming process that requires numerous Yocto/OpenEmbedded recipes and configurations. Please be patient as bitbake systematically manages each step.
tmp/deploy/images/olimex-imx8mp-evb/core-image-base-olimex-imx8mp-evb.rootfs.wic.gz to microSD card.
olimex-imx8mp-evb has successfully connected:
A RAUC update bundle comprises the file system image(s) or archive(s) designated for system installation, accompanied by a manifest detailing the images for installation, encompassing options and meta-information. Additionally, it may include scripts designated for execution before, during or after the installation process. To sign and verify the update bundles RAUC uses SSL keys. Layer meta-rauc-beaglebone contains a keyring containing all keys and a recipe for a simple RAUC update bundle for demonstration purposes only.
Follow the steps below to create RAUC update bundle that extends the system by adding the popular text based editor nano:
conf/local.conf:IMAGE_INSTALL:append = " nano"
bitbake update-bundle
Please follow the steps below to upload the RAUC bundle to qbee.io and update the board:

olimex-imx8mp-evb and go to tab Configure. From Settings > OTA enable RAUC image updates:


nano is present:
olimex-imx8mp-evb, navigate to the Logs tab, and review the logs related to the RAUC update.
With qbee.io, multiple IoT devices can be grouped together and managed as a fleet from the cloud service. In practical product development scenarios, enhancing the Yocto Project and OpenEmbedded workflow can be achieved through a few straightforward commands to streamline continuous integration (CI).
The second part of the article will detail the exact steps to build, boot, and update an image on the Olimex iMX8MP-SOM-4GB-IND and iMX8MP-SOM-EVB-IND hardware, this time using Mender instead of RAUC, with the Yocto Project release 5.0 LTS (scarthgap).
Konsulko engineers have played pivotal roles as contributors and mentors in the commercial product space from the early days of OpenEmbedded and the Yocto Project. Our team excels in utilizing RAUC, Mender, Swupdate and a range of other open-source tools to deliver comprehensive software update solutions. Contact us to discuss your specific product requirements and discover how Konsulko engineers can improve your embedded Linux development projects.
Scott Murray, Principal Software Engineer at Konsulko Group presented at the summer Automotive Grade Linux AMM. Scott shared details around the work done the past few years to prepare AGL before it upgraded to the new Yocto Project long-term support release, Scarthgap, earlier this year.

Over the years Konsulko Group engineers made many upstream contributions to various open source OTA (over-the-air) update solutions for embedded Linux devices. Recently Leon Anavi, Konsulko Group Senior Engineer and maintainer of meta-rauc-community ported RAUC to Radxa Rock Pi 4 Model B. This is the first Rockchip device supported in meta-rauc-community.
RAUC is one of the popular solutions that provide OTA updates for Embedded Linux devices. RAUC is developed with focus on stability, security and flexibility and is compatible with all popular build systems.
The Radxa Rock Pi 4 Model B is a single-board computer with a Rockchip RK3399 processor, 4GB RAM, and various storage options including microSD card and NVMe SSD. It features Gigabit Ethernet, dual-band Wi-Fi, Bluetooth 5.0, USB 3.0, 4K video output via HDMI and USB-C, and a 40-pin GPIO header compatible with Raspberry Pi. This article explains how to build an image for the Radxa Rock Pi 4 Model B using the Yocto Project and OpenEmbedded, and how to perform software updates with RAUC.

git clone -b scarthgap https://git.yoctoproject.org/poky poky-rauc-rockchip
cd poky-rauc-rockchip
git clone -b scarthgap git://git.yoctoproject.org/meta-arm
git clone -b scarthgap git://git.yoctoproject.org/meta-rockchip
git clone -b scarthgap https://github.com/rauc/meta-rauc.git
git clone -b scarthgap https://github.com/rauc/meta-rauc-community.git
git clone -b scarthgap git://git.openembedded.org/meta-openembedded
source oe-init-build-env
bitbake-layers add-layer ../meta-arm/meta-arm-toolchain
bitbake-layers add-layer ../meta-arm/meta-arm
bitbake-layers add-layer ../meta-rockchip
bitbake-layers add-layer ../meta-openembedded/meta-oe
bitbake-layers add-layer ../meta-rauc
bitbake-layers add-layer ../meta-rauc-community/meta-rauc-rockchip
conf/local.conf by appending the following configurations to the end of the file:MACHINE = "rock-pi-4b"
SERIAL_CONSOLES="115200;ttyS2"
IMAGE_FSTYPES:append = " ext4"
WKS_FILE = "rockchip-dual.wks.in"
MACHINE_FEATURES:append = " rk-u-boot-env"
UBOOT_EXTLINUX_KERNEL_IMAGE="/${KERNEL_IMAGETYPE}"
UBOOT_EXTLINUX_ROOT="root=PARTLABEL=${bootpart}"
UBOOT_EXTLINUX_KERNEL_ARGS = "rootwait rw rootfstype=ext4 rauc.slot=${raucslot}"
WIC_CREATE_EXTRA_ARGS = "--no-fstab-update"
DISTRO_FEATURES:append = " rauc"
INIT_MANAGER = "systemd"
bitbake core-image-base
Building an image from scratch is a lengthy process that involves numerous Yocto/OpenEmbedded recipes and configurations. Please be patient while bitbake methodically handles each task.
tmp/deploy/images/rock-pi-4b/core-image-base-rock-pi-4b.rootfs.wic to microSD card.rauc status

A RAUC update bundle comprises the file system image(s) or archive(s) designated for system installation, accompanied by a manifest detailing the images for installation, encompassing options and meta-information. Additionally, it may include scripts designated for execution before, during or after the installation process. To sign and verify the update bundles RAUC uses SSL keys. Layer meta-rauc-beaglebone contains a keyring containing all keys and a recipe for a simple RAUC update bundle for demonstration purposes only.
Follow the steps below to create RAUC update bundle that extends the system by adding the popular text based editor nano:
conf/local.conf:IMAGE_INSTALL:append = " nano"
bitbake update-bundle
Follow the steps below to update core-image-minimal running from a microSD card on Radxa Rock Pi 4 Model B:
cd tmp/deploy/images/rock-pi-4b/
pip3 install --user rangehttpserver
python3 -m RangeHTTPServer
<IP> with the actual IP address of the computer on which the HTTP server is running and execute the following command to install the update:rauc install http://<IP>:8000/update-bundle-rock-pi-4b.raucb

NOTE: As alternative, instead of using an HTTP server, you can transfer the update bundle to Rock Pi 4 Model B and install it from local storage.
reboot
which nano
Check RAUC status to confirm the system have booted from the second partition:
rauc status

The default serial baud rate for the Radxa Rock Pi 4’s U-Boot and kernel console is 1500000. However, many USB-to-UART cables, such as those using the popular Silicon Labs CP2102 chip, cannot handle this high speed. To avoid these issues, a patch is applied to rock-pi-4-rk3399_defconfig through u-boot_%.bbappend, setting U-Boot’s baud rate to 115200. Additionally, for the kernel, we set SERIAL_CONSOLES="115200;ttyS2" in conf/local.conf. This ensures that both U-Boot and the Linux kernel operate at a baud rate of 115200 in our demonstration.

The Radxa Rock Pi 4 Model B uses U-Boot with extlinux support to boot. For RAUC integration, it employs a boot.scr script, which handles the A/B system switching and passes environment variables to extlinux/extlinux.conf. The rockchip-dual.wks.in file creates two identical partitions (A and B), a data partition, and a fixed-size 32MB boot partition. The boot.scr and extlinux/extlinux.conf files are stored in the boot partition.
In real-world product development, the Yocto Project and OpenEmbedded workflow can be improved with some simple commands to facilitate continuous integration (CI).
Since OpenEmbedded and the Yocto Project began, Konsulko engineers have been key contributors and mentors in developing commercial products. Our team excels in using RAUC, Mender, and other open-source tools for delivering superior software updates. Reach out to us to see how Konsulko engineers can support your embedded product development efforts.
TuxCon is an annual open-source conference held in Plovdiv, Bulgaria, aimed to promote the adoption of open-source hardware and software, and organized by passionate volunteers. Since the conference’s inception in 2014, Konsulko Group engineers have participated and supported this important local event.
The 2024 edition of TuxCon took place on May 11th and 12th at the Technical University of Sofia, Plovdiv branch, featuring presentations on various interesting topics. This edition featured a couple of talks (in Bulgarian) about the Yocto Project and OpenEmbedded.

Konsulko Group junior engineer Atanas Bunchev spoke at the event, sharing his experience with Balena on Raspberry Pi and PHYTEC phyBOARD-AM62x. Balena.io, commonly known as Balena, is a platform that simplifies the deployment and management of embedded Linux devices using images based on the Yocto Project and OpenEmbedded. It leverages Docker containers for streamlined application deployment across various Internet of Things (IoT), offers centralized device management for monitoring and updates, and supports scalability from prototypes to large-scale projects. Atanas further elaborated on the utilization of Balena AutoKit for conducting automated QA testing on embedded Linux devices.

The second talk about the Yocto Project at TuxCon 2024 was delivered by Sadika Hasan, a senior-year student from “Paisii Hilendarski” University of Plovdiv. She demonstrated how to create a custom Linux distribution and Software Development Kit (SDK) by extending Poky, the Yocto Project’s reference distribution. Additionally, she covered the integration of the custom SDK with Visual Studio Code and the remote debugging of a C++ application on a Raspberry Pi Zero W 2.
Sadika’s presentation is part of her bachelor thesis, supervised by Professor Dimitar Tokmakov from ECIT (Electronics and Information and Communication Technology) department of “Paisii Hilendarski” University of Plovdiv and Konsulko engineer Leon Anavi.
Professor Tokmakov, with the assistance of engineer Nikolay Nedelev from Romit LTD, is actively involved in the ECOVEM project (European Center of Vocational Excellence in Microelectronics). As part of their efforts, two students from PU developed diploma theses for their Bachelor of Science degrees utilizing the Yocto Project. These theses were based on real-life problem solving and the practical experience of the Konsulko Group with industrial embedded Linux devices.
From the early days of OpenEmbedded and the Yocto Project, Konsulko engineers have actively contributed upstream and engaged with the community, offering their expertise in developing high-quality commercial products. If you are developing a new product, get in touch to see how Konsulko’s engineering expertise can enhance your project. Additionally, if you are a Linux software developer passionate about open source, we invite you to explore potential opportunities to join the Konsulko team.