Refactoring meta-rauc-community: Cleaner
Code, Better Maintenance, More Machines
Leon Anavi
Konsulko Group
leon.anavi@konsulko.com
leon@anavi.org
Embedded Recipes 2025
Embedded Recipes 2025, Leon Anavi
Experts in commercial development,
committed to Linux and Open Source
 Founded in 2012 by embedded Linux engineers with a long history in OSS
ecosystem and embedded systems markets
 Decades of hands-on experience in open source community projects and
developing commercial products based on embedded Linux
 Particular expertise at the system level. Contributors to OpenEmbedded, Yocto
Project, U-Boot, Automotive Grade Linux (AGL) and the Linux kernel
 Headquartered in San Jose, California. Globally distributed engineering team
across the North America and Europe
 https://www.konsulko.com/
Embedded Recipes 2025, Leon Anavi
Agenda
 RAUC
 A/B updates (dual redundant scheme)
 RAUC advanced features
 meta-rauc-community
 Supported devices
Embedded Recipes 2025, Leon Anavi
RAUC
 A lightweight update client that runs on an Embedded Linux device and reliably
controls software A/B updates
 Supports multiple update scenarios
 Supports advanced features: HTTP streaming and adaptive updates
 Provides tool for the build system to create, inspect and modify update bundles
 Uses X.509 cryptography to sign update bundles
 Supports encrypted update bundles
 Compatible with the Yocto Project, PTXdist and Buildroot
Embedded Recipes 2025, Leon Anavi
RAUC Git Repositories and Licenses
 RAUC – LGPLv2.1
https://github.com/rauc/rauc
 meta-rauc - MIT
https://github.com/rauc/meta-rauc
 meta-rauc-community - MIT
https://github.com/rauc/meta-rauc-community
 rauc-hawkbit – LGPLv2.1
https://github.com/rauc/rauc-hawkbit
 rauc-hawkbit-updater – LGPLv2.1
https://github.com/rauc/rauc-hawkbit-updater
Embedded Recipes 2025, Leon Anavi
RAUC Key Words
 Update Bundle – update artifact distributed as a
binary file with extension .raucb
 Slot – anything that can be updated: device,
partition or a file. RAUC slots are described in a
system configuration file systemd.conf.
Embedded Recipes 2025, Leon Anavi
 Supports single and redundant persistent data partitions
 For redundant data partitions the active rootfs slot has to mount the correct data
partition dynamically, for example with a udev rule
RAUC Data Partition
Embedded Recipes 2025, Leon Anavi
A/B Updates
 Dual A/B identical rootfs partitions
 Data partition for storing any persistent data which is left unchanged during the
update process
 Typically a client application (e.g. RAUC) runs on the embedded device and
periodically connects to a server to check for updates
 If a new software update is available, the client application downloads and installs
it on the other partition
 The bootloader switches the active partitions on reboot after upgrade
 Fallback in case of update failure
Embedded Recipes 2025, Leon Anavi
How Does RAUC work?
 The workflow for installing a RAUC bundle to the B partition:
Embedded Recipes 2025, Leon Anavi
Supported Bootloaders
Embedded Recipes 2025, Leon Anavi
RAUC Advanced Features
 HTTP Streaming
Supports installing bundles directly from a HTTP(S) server, without having to
download and store the bundle locally
 Adaptive Updates
Adaptive updates can be installed on any version, using data from the target
system, such as previous versions or even interrupted installations. Paired with
HTTP Streaming, RAUC downloads only the required parts of the bundle,
improving efficiency.
 Casync - a combination of the rsync algorithm and content-addressable storage.
RAUC also supports desync, the alternative casync implementation in Go.
Embedded Recipes 2025, Leon Anavi
Who Uses RAUC with Casync?
 Note: They switched from casync to desync
Embedded Recipes 2025, Leon Anavi
Delta Updates
 Only the binary delta between the difference is sent to the embedded device
 Works in a Git-like model for filesystem trees
 Saves storage space and connection bandwidth
 Rollback of the system to a previous state
Embedded Recipes 2025, Leon Anavi
Update
Strategy
Storage Space Update Size Rollback to a
Previous Stage
Fallback to a
Back-up Image
on a separate
partition
A/B
Updates
Large Large Yes Yes
Delta
Updates
Small Small Yes No
A/B vs Delta Updates
Embedded Recipes 2025, Leon Anavi
Popular Open Source Solutions
 RAUC
 Mender
 SWUpdate
 Swupd
 UpdateHub
 Balena
 Memfault
 qbee.io
 Snap
 Libostree (OSTree)
 Flatpak
 QtOTA
 Torizon
 Aktualizr-lite
 HERE OTA Connect (Aktualizr) ❌
 FullMetalUpdate ❌
Embedded Recipes 2025, Leon Anavi
RAUC Integration Steps
 Select an appropriate bootloader
 Enable SquashFS in the Linux kernel configurations
 ext4 root file system (RAUC does not have an ext2 / ext3 file type)
 Create specific partitions that matches the RAUC slots in the OpenEmbedded
Kickstart (.wks) file
 Configure Bootloader environment and create a script to switch RAUC slots
 Describe RAUC slots in system.conf
 Create a certificate and a keyring to RAUC’s system.conf
 Create RAUC update bundle
Embedded Recipes 2025, Leon Anavi
 Yocto/OE demo layer with examples how to integrate RAUC on
various machines
 Depends on Yocto/OE BSP layers
 Started in 2020
 Moved to the RAUC organization in GitHub in 2021
 104 contributors to RAUC, 47 to meta-rauc and
21 to meta-rauc-community ⏫
 https://github.com/rauc/meta-rauc-community/
 Contributions are always welcome as GitHub pull requests
meta-rauc-community
2015
2020
2021
2026
Wrynose 6.0
Embedded Recipes 2025, Leon Anavi
 Raspberry Pi
 BeagleBone Black
 x86-64
 NXP i.MX6 & i.MX8
 QEMU
 Rockchip
 Allwinner (Sunxi)
 STM32MP157F-DK2 and DHSBC STM32MP13
meta-rauc-community Supported Platforms
Embedded Recipes 2025, Leon Anavi
RAUC on Raspberry Pi 5
 Append to local.conf:
MACHINE = "raspberrypi5"
RPI_USE_U_BOOT = "1"
DISTRO_FEATURES:append = " rauc"
IMAGE_INSTALL:append = " rauc"
IMAGE_FSTYPES:append = " ext4"
WKS_FILE = "sdimage-dual-raspberrypi.wks.in"
INIT_MANAGER = "systemd"
Embedded Recipes 2025, Leon Anavi
RAUC on Raspberry Pi 5
 Build an image:
bitbake core-image-minimal
 Add nano to the new version of the image through local.conf:
IMAGE_INSTALL:append = " nano"
 Build a RAUC update bundle:
bitbake update-bundle
Embedded Recipes 2025, Leon Anavi
RAUC with HTTP Streaming on Raspberry Pi 5
 Launch a web server with HTTP streaming:
cd tmp/deploy/images/raspberrypi5/
busybox httpd -p 8000 -f -v
 Login on Raspberry Pi 5 and execute:
rauc install http://<IP>:8000/update-bundle-raspberrypi5.raucb
reboot
Embedded Recipes 2025, Leon Anavi
How Does Raspberry Pi 5 boot with RAUC?
 Raspberry Pi has a proprietary bootloader with a specific boot scenario.
 Raspberry Pi boot SPI EEPROM is available on Raspberry Pi 4 and 5. Old models don’t
have EEPROM and use bootcode.bin.
 The Raspberry Pi bootloader reads config.txt and launches U-Boot, which executes a
script with RAUC variables BOOT_ORDER and BOOT_<bootname>_LEFT
Embedded Recipes 2025, Leon Anavi
How Does Raspberry Pi 5 boot with RAUC?
 rpi-u-boot-scr.bbappend adds boot.cmd.in:
Embedded Recipes 2025, Leon Anavi
How does RAUC client app access U-Boot env?
 libubootenv is an open source library to accesss the U-Boot environment which
offers the CLI tools fw_printenv и fw_setenv for reading and writing U-Boot
variables from Linux user space.
 fw_printenv for reading U-Boot variables
 fw_setenv for writing U-Boot variable
 Yocto/OpenEmbedded BSP layer meta-raspberrypi provides fw_env.config, which
points to the U-Boot environment:
/boot/uboot.env 0x0000 0x4000
Embedded Recipes 2025, Leon Anavi
libubootenv
 Provides a hardware independent way to access to U-Boot environment
 Written in C
 Available in GitHub under LGPL-2.1
 Started by Stefano Babic in December 2018
 Used by SWUpdate, RAUC, Mender, RAUC and other solutions
 OpenEmbedded/Yocto recipe:
https://git.openembedded.org/openembedded-core/tree/meta/recipes-bsp/u-boot/
Embedded Recipes 2025, Leon Anavi
Can RAUC Work on Raspberry Pi without U-Boot?
 The Raspberry Pi bootloader supports TRYBOOT
https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#fail-safe-os-updates-tryboot
 Gaël PORTAY opened a GitHub pull request to support TRYBOOT in RAUC:
https://github.com/rauc/rauc/pull/1599
 A recently-added conditional in the Raspberry Pi firmware makes it suitable for A/B
updates using RAUC, Bootlin's Benjamin demonstrates: https://www.hackster.io/news/olivier-benjamin-
finds-a-currently-undocumented-raspberry-pi-feature-for-secure-a-b-updates-0df38de1c9e6
 Secure boot and TPM 2.0 connected over SPI to Raspberry Pi 5 is possible through
initramfs and configuration bootloader=custom in RAUC’s system.conf
 Note: Secure boot is available on Raspberry Pi 4 and 5. Both SoCs don’t seem to
feature a secure memory controller so portion of the DRAM can’t be protected
properly from he non-secure world: https://trustedfirmware-a.readthedocs.io/en/latest/plat/rpi5.html
Embedded Recipes 2025, Leon Anavi
 A collection of different sub-layers for each supported platform
 A lot of repeatable source code in the sub-layers that is redundant
 Different platforms depend on different Yocto/OE BSP layers
 Some BSP layers support only LTS release of the Yocto Project, for example the
RAUC integration for STM32MP157F-DK2 and DHSBC STM32MP13 is available for
release Scarthgap only
 The integration for all supported ARM boards is based on U-Boot as a bootloader
Current State of meta-rauc-community
Embedded Recipes 2025, Leon Anavi
Add meta-rauc-community layer with unified common source code base:
 Update bundle that uses core-image-base for all (more) supported platforms
 Automatic grow of the data partition
 Unified mechanism to generate U-Boot scripts through Yocto/OE variables
(but is it worth it as it will make things a bit more complicated?)
 What else?
What Can We Improve?
Embedded Recipes 2025, Leon Anavi
 Add more hardware plaforms and boards. Which are the most wanted?
 kas or bitbake-setup configurations for each board for easier getting started.
Which is the more appropriate choice?
 More GitHub workflows and actions for CI/CD (work in progress).
 Support device tree updates on Raspberry Pi in a similar way as the
implementation for Mender.
What Else Can We Improve?
Embedded Recipes 2025, Leon Anavi
3rd
Party Management Servers
 Eclipse HawkBit
https://eclipse.dev/hawkbit/
 qbee.io
https://github.com/qbee-io/meta-qbee
 AWS IoT
https://github.com/aws4embeddedlinux/meta-aws
Embedded Recipes 2025, Leon Anavi
Conclusions
 Choosing the best solution can be challenging, as it depends on the specific
requirements of your project. Developing an in-house solution is rarely worth the
effort.
 With many reliable open-source solutions available for updating embedded Linux
devices, RAUC stands out as an entirely open source solution with advanced
features.
 The dual A/B update mechanism implementation depends on the bootloader.
 The layer meta-rauc-community layer provides RAUC demo integration on various
popular platforms and development boards. Efforts are underway to improve it
and unify the code base, hopefully on time for the next Yocto LTS release in 2026.
Embedded Recipes 2025, Leon Anavi
Thank You!
Useful links:
 https://rauc.io/
 https://rauc.readthedocs.io/en/latest/
 https://www.yoctoproject.org/
 https://docs.yoctoproject.org/
 https://github.com/rauc/meta-rauc-community
 https://www.konsulko.com/ota-qbee-rauc-imx8mp
 https://www.konsulko.com/rauc-beaglebone-black
 https://www.konsulko.com/rauc-on-rockchip

Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines

  • 1.
    Refactoring meta-rauc-community: Cleaner Code,Better Maintenance, More Machines Leon Anavi Konsulko Group leon.anavi@konsulko.com leon@anavi.org Embedded Recipes 2025
  • 2.
    Embedded Recipes 2025,Leon Anavi Experts in commercial development, committed to Linux and Open Source  Founded in 2012 by embedded Linux engineers with a long history in OSS ecosystem and embedded systems markets  Decades of hands-on experience in open source community projects and developing commercial products based on embedded Linux  Particular expertise at the system level. Contributors to OpenEmbedded, Yocto Project, U-Boot, Automotive Grade Linux (AGL) and the Linux kernel  Headquartered in San Jose, California. Globally distributed engineering team across the North America and Europe  https://www.konsulko.com/
  • 3.
    Embedded Recipes 2025,Leon Anavi Agenda  RAUC  A/B updates (dual redundant scheme)  RAUC advanced features  meta-rauc-community  Supported devices
  • 4.
    Embedded Recipes 2025,Leon Anavi RAUC  A lightweight update client that runs on an Embedded Linux device and reliably controls software A/B updates  Supports multiple update scenarios  Supports advanced features: HTTP streaming and adaptive updates  Provides tool for the build system to create, inspect and modify update bundles  Uses X.509 cryptography to sign update bundles  Supports encrypted update bundles  Compatible with the Yocto Project, PTXdist and Buildroot
  • 5.
    Embedded Recipes 2025,Leon Anavi RAUC Git Repositories and Licenses  RAUC – LGPLv2.1 https://github.com/rauc/rauc  meta-rauc - MIT https://github.com/rauc/meta-rauc  meta-rauc-community - MIT https://github.com/rauc/meta-rauc-community  rauc-hawkbit – LGPLv2.1 https://github.com/rauc/rauc-hawkbit  rauc-hawkbit-updater – LGPLv2.1 https://github.com/rauc/rauc-hawkbit-updater
  • 6.
    Embedded Recipes 2025,Leon Anavi RAUC Key Words  Update Bundle – update artifact distributed as a binary file with extension .raucb  Slot – anything that can be updated: device, partition or a file. RAUC slots are described in a system configuration file systemd.conf.
  • 7.
    Embedded Recipes 2025,Leon Anavi  Supports single and redundant persistent data partitions  For redundant data partitions the active rootfs slot has to mount the correct data partition dynamically, for example with a udev rule RAUC Data Partition
  • 8.
    Embedded Recipes 2025,Leon Anavi A/B Updates  Dual A/B identical rootfs partitions  Data partition for storing any persistent data which is left unchanged during the update process  Typically a client application (e.g. RAUC) runs on the embedded device and periodically connects to a server to check for updates  If a new software update is available, the client application downloads and installs it on the other partition  The bootloader switches the active partitions on reboot after upgrade  Fallback in case of update failure
  • 9.
    Embedded Recipes 2025,Leon Anavi How Does RAUC work?  The workflow for installing a RAUC bundle to the B partition:
  • 10.
    Embedded Recipes 2025,Leon Anavi Supported Bootloaders
  • 11.
    Embedded Recipes 2025,Leon Anavi RAUC Advanced Features  HTTP Streaming Supports installing bundles directly from a HTTP(S) server, without having to download and store the bundle locally  Adaptive Updates Adaptive updates can be installed on any version, using data from the target system, such as previous versions or even interrupted installations. Paired with HTTP Streaming, RAUC downloads only the required parts of the bundle, improving efficiency.  Casync - a combination of the rsync algorithm and content-addressable storage. RAUC also supports desync, the alternative casync implementation in Go.
  • 12.
    Embedded Recipes 2025,Leon Anavi Who Uses RAUC with Casync?  Note: They switched from casync to desync
  • 13.
    Embedded Recipes 2025,Leon Anavi Delta Updates  Only the binary delta between the difference is sent to the embedded device  Works in a Git-like model for filesystem trees  Saves storage space and connection bandwidth  Rollback of the system to a previous state
  • 14.
    Embedded Recipes 2025,Leon Anavi Update Strategy Storage Space Update Size Rollback to a Previous Stage Fallback to a Back-up Image on a separate partition A/B Updates Large Large Yes Yes Delta Updates Small Small Yes No A/B vs Delta Updates
  • 15.
    Embedded Recipes 2025,Leon Anavi Popular Open Source Solutions  RAUC  Mender  SWUpdate  Swupd  UpdateHub  Balena  Memfault  qbee.io  Snap  Libostree (OSTree)  Flatpak  QtOTA  Torizon  Aktualizr-lite  HERE OTA Connect (Aktualizr) ❌  FullMetalUpdate ❌
  • 16.
    Embedded Recipes 2025,Leon Anavi RAUC Integration Steps  Select an appropriate bootloader  Enable SquashFS in the Linux kernel configurations  ext4 root file system (RAUC does not have an ext2 / ext3 file type)  Create specific partitions that matches the RAUC slots in the OpenEmbedded Kickstart (.wks) file  Configure Bootloader environment and create a script to switch RAUC slots  Describe RAUC slots in system.conf  Create a certificate and a keyring to RAUC’s system.conf  Create RAUC update bundle
  • 17.
    Embedded Recipes 2025,Leon Anavi  Yocto/OE demo layer with examples how to integrate RAUC on various machines  Depends on Yocto/OE BSP layers  Started in 2020  Moved to the RAUC organization in GitHub in 2021  104 contributors to RAUC, 47 to meta-rauc and 21 to meta-rauc-community ⏫  https://github.com/rauc/meta-rauc-community/  Contributions are always welcome as GitHub pull requests meta-rauc-community 2015 2020 2021 2026 Wrynose 6.0
  • 18.
    Embedded Recipes 2025,Leon Anavi  Raspberry Pi  BeagleBone Black  x86-64  NXP i.MX6 & i.MX8  QEMU  Rockchip  Allwinner (Sunxi)  STM32MP157F-DK2 and DHSBC STM32MP13 meta-rauc-community Supported Platforms
  • 19.
    Embedded Recipes 2025,Leon Anavi RAUC on Raspberry Pi 5  Append to local.conf: MACHINE = "raspberrypi5" RPI_USE_U_BOOT = "1" DISTRO_FEATURES:append = " rauc" IMAGE_INSTALL:append = " rauc" IMAGE_FSTYPES:append = " ext4" WKS_FILE = "sdimage-dual-raspberrypi.wks.in" INIT_MANAGER = "systemd"
  • 20.
    Embedded Recipes 2025,Leon Anavi RAUC on Raspberry Pi 5  Build an image: bitbake core-image-minimal  Add nano to the new version of the image through local.conf: IMAGE_INSTALL:append = " nano"  Build a RAUC update bundle: bitbake update-bundle
  • 21.
    Embedded Recipes 2025,Leon Anavi RAUC with HTTP Streaming on Raspberry Pi 5  Launch a web server with HTTP streaming: cd tmp/deploy/images/raspberrypi5/ busybox httpd -p 8000 -f -v  Login on Raspberry Pi 5 and execute: rauc install http://<IP>:8000/update-bundle-raspberrypi5.raucb reboot
  • 22.
    Embedded Recipes 2025,Leon Anavi How Does Raspberry Pi 5 boot with RAUC?  Raspberry Pi has a proprietary bootloader with a specific boot scenario.  Raspberry Pi boot SPI EEPROM is available on Raspberry Pi 4 and 5. Old models don’t have EEPROM and use bootcode.bin.  The Raspberry Pi bootloader reads config.txt and launches U-Boot, which executes a script with RAUC variables BOOT_ORDER and BOOT_<bootname>_LEFT
  • 23.
    Embedded Recipes 2025,Leon Anavi How Does Raspberry Pi 5 boot with RAUC?  rpi-u-boot-scr.bbappend adds boot.cmd.in:
  • 24.
    Embedded Recipes 2025,Leon Anavi How does RAUC client app access U-Boot env?  libubootenv is an open source library to accesss the U-Boot environment which offers the CLI tools fw_printenv и fw_setenv for reading and writing U-Boot variables from Linux user space.  fw_printenv for reading U-Boot variables  fw_setenv for writing U-Boot variable  Yocto/OpenEmbedded BSP layer meta-raspberrypi provides fw_env.config, which points to the U-Boot environment: /boot/uboot.env 0x0000 0x4000
  • 25.
    Embedded Recipes 2025,Leon Anavi libubootenv  Provides a hardware independent way to access to U-Boot environment  Written in C  Available in GitHub under LGPL-2.1  Started by Stefano Babic in December 2018  Used by SWUpdate, RAUC, Mender, RAUC and other solutions  OpenEmbedded/Yocto recipe: https://git.openembedded.org/openembedded-core/tree/meta/recipes-bsp/u-boot/
  • 26.
    Embedded Recipes 2025,Leon Anavi Can RAUC Work on Raspberry Pi without U-Boot?  The Raspberry Pi bootloader supports TRYBOOT https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#fail-safe-os-updates-tryboot  Gaël PORTAY opened a GitHub pull request to support TRYBOOT in RAUC: https://github.com/rauc/rauc/pull/1599  A recently-added conditional in the Raspberry Pi firmware makes it suitable for A/B updates using RAUC, Bootlin's Benjamin demonstrates: https://www.hackster.io/news/olivier-benjamin- finds-a-currently-undocumented-raspberry-pi-feature-for-secure-a-b-updates-0df38de1c9e6  Secure boot and TPM 2.0 connected over SPI to Raspberry Pi 5 is possible through initramfs and configuration bootloader=custom in RAUC’s system.conf  Note: Secure boot is available on Raspberry Pi 4 and 5. Both SoCs don’t seem to feature a secure memory controller so portion of the DRAM can’t be protected properly from he non-secure world: https://trustedfirmware-a.readthedocs.io/en/latest/plat/rpi5.html
  • 27.
    Embedded Recipes 2025,Leon Anavi  A collection of different sub-layers for each supported platform  A lot of repeatable source code in the sub-layers that is redundant  Different platforms depend on different Yocto/OE BSP layers  Some BSP layers support only LTS release of the Yocto Project, for example the RAUC integration for STM32MP157F-DK2 and DHSBC STM32MP13 is available for release Scarthgap only  The integration for all supported ARM boards is based on U-Boot as a bootloader Current State of meta-rauc-community
  • 28.
    Embedded Recipes 2025,Leon Anavi Add meta-rauc-community layer with unified common source code base:  Update bundle that uses core-image-base for all (more) supported platforms  Automatic grow of the data partition  Unified mechanism to generate U-Boot scripts through Yocto/OE variables (but is it worth it as it will make things a bit more complicated?)  What else? What Can We Improve?
  • 29.
    Embedded Recipes 2025,Leon Anavi  Add more hardware plaforms and boards. Which are the most wanted?  kas or bitbake-setup configurations for each board for easier getting started. Which is the more appropriate choice?  More GitHub workflows and actions for CI/CD (work in progress).  Support device tree updates on Raspberry Pi in a similar way as the implementation for Mender. What Else Can We Improve?
  • 30.
    Embedded Recipes 2025,Leon Anavi 3rd Party Management Servers  Eclipse HawkBit https://eclipse.dev/hawkbit/  qbee.io https://github.com/qbee-io/meta-qbee  AWS IoT https://github.com/aws4embeddedlinux/meta-aws
  • 31.
    Embedded Recipes 2025,Leon Anavi Conclusions  Choosing the best solution can be challenging, as it depends on the specific requirements of your project. Developing an in-house solution is rarely worth the effort.  With many reliable open-source solutions available for updating embedded Linux devices, RAUC stands out as an entirely open source solution with advanced features.  The dual A/B update mechanism implementation depends on the bootloader.  The layer meta-rauc-community layer provides RAUC demo integration on various popular platforms and development boards. Efforts are underway to improve it and unify the code base, hopefully on time for the next Yocto LTS release in 2026.
  • 32.
    Embedded Recipes 2025,Leon Anavi Thank You! Useful links:  https://rauc.io/  https://rauc.readthedocs.io/en/latest/  https://www.yoctoproject.org/  https://docs.yoctoproject.org/  https://github.com/rauc/meta-rauc-community  https://www.konsulko.com/ota-qbee-rauc-imx8mp  https://www.konsulko.com/rauc-beaglebone-black  https://www.konsulko.com/rauc-on-rockchip