SlideShare a Scribd company logo
Remote-update adventures
RAUC, Yocto, Barebox
Embedded Recipes 2019
2019-09-24 – Paris Story, Paris
Patrick Boettcher YAISE
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
About me
●
Kernel developer since 2004 – (media drivers)
●
Embedded C++, C (mostly Linux and RTOS),
Python, compilers and testing frameworks
●
Freelancer with YAISE
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
Overview
1- Intro / Starting position
2- Remote update-strategy
3- Remote upgrade-strategy
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
The project
●
industrialized LORA-gateway (LoRaWan
with 3G/4G
●
special housing and connectors
●
selected Phytec phyCORE-i.MX 6UL
– 512MB RAM
– 512MB NAND
– ARM Cortex A7 – up to 900MHz
●
Phytec provides a customizable Yocto distribution
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
Phytec’s Yocto Distro
●
2018
●
based on morty (yocto 2.2)
●
using barebox as bootloader
●
device-tree well handled (barebox merges with
dtb and hands all of it to the kernel)
●
no “standard” system-updade mechanism in this
release
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
System configuration
●
barebox (with built-in-device-tree)
●
barebox-env
●
kernel
●
dtb
●
rootfs-partition (~490MB )
●
system is accessible via remote-ssh-tunnel (initiated
by the system, via the WAN connection)
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
What happened?
●
June 2018: first 100 devices have been delivered with the
application-layer running nicely
●
September 2018: a software update requires update of the
base-system (kernel and libc)– of course
– tried to do it with opkg/ipk – not satisfying (to be retried)
– decision to study upgrade possibilities
– learned a lot during #er2018 when discussing with Marek
●
October 2018: Decision-time (customer pays):
– 1st define general update strategy
– 2nd define strategy to update the deployed 100 systems
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
Overview
1- Intro / Starting position
2- Remote update-strategy
3- Remote upgrade-strategy
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
Basic facts after study - 1
Stick close to what exists and
do not re-invent the wheel, but what does exist?
●
Partitioning (UBI) and filesystem (UBIFS) cannot be
modified from Linux’s user-space running on UBI
●
Putting processes “somewhere else” to change UBI is
complex; barebox can of course do it
●
Barebox has bootchooser
●
Barebox has “state”-partition
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
Basic facts after study - 2
●
Barebox has a filesystem inside its environment
●
Barebox is self-updatable
●
Barebox’ environment can be accessed from
Linux’s user-space
●
Robust Auto-Update Controller (RAUC) with signed
bundles exists and works
●
Newer versions of Phytec’s Distro use all this, but
do not support Morty
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
New partitioning (schema!)
●
barebox (with built-in-device-tree)
●
barebox-env
●
rescue-initramfs (46M)
●
rescue-dtb (512K)
●
system0/1: kernel (9M), dtb (512K), rootfs (210M)
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
Reconfiguring barebox
●
Add bootchooser-functionality (default: 3 attempts per
system, then rescue)
●
Add state-functionality to device-tree (stored in
eeprom)
●
Add format and flash-scripts to defaultenv
●
Add boot-scripts to defaultenv
●
Build barebox-target-tools to rootfs
●
barebox_2017.04.0-phy3.bbappend / state-eeprom.dts
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
RAUC - bundle
●
Add meta-rauc
– provides “bundle-class”
– provides user-space tools and config-base
●
In your layer add a bundle-file and a .bbappend
for certs and config
●
bitbake <bundle-file-target> meli-bundle.bb
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
RAUC – bootchooser - demo
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
Overview
1- Intro / Starting position
2- Remote update-strategy
3- Remote upgrade-strategy
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
Blind upgrade strategy
●
How to convert a remote system from a single-
system-installation to dual-installation?
●
Simple:
– Copy new-barebox, kernel, dtb, rootfs to the rootfs (scp)
– Instrument barebox from userspace (bareboxenv)
– Reboot
– Meditation during 3 minutes
– ssh-reverse-tunnel is apprearing
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
Blind time- 1
●
user-space
– injects a script to barebox which is executed at boot
– reboot
●
in old-barebox:
– script: mount rootfs, update-barebox if image present
– reset
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
Blind time- 2
●
in new-barebox:
– script mounts rootfs, copies images if present
– copy some specific config-files to backup-dir in barebox-env
– repartitioning
– flash rootfs, kernel, dtb
– resets state, bootchooser
– self-destruction
– reset
●
in new-linux
– first-boot: config-files are extracted from backup-dir barebox-env
– everything works – ssh-tunnel appears
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
Success
●
All remotely deployed devices have been
upgraded successfully to date
2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox
Oh well
●
Rescue system had no functionality – the idea
was: we’ll get to it later
– 25 systems failed over to rescue system because of
power-supply-variation during kernel boot
●
SSL certificate was valid for one year only. No
certificate infrastructure present for this project
– Update installs a certificate with 100 years validity
Questions?
@PatBoeFra
https://github.com/pboettch
https://yai.se/
p@yai.se

More Related Content

PDF
Surfing on an Interactive Kiosk
PDF
A/B Linux updates with RAUC and meta-rauc-community: now & in the future
PDF
DPDK in Containers Hands-on Lab
PDF
DPDK & Layer 4 Packet Processing
PDF
Linux packet-forwarding
PDF
痛い目にあってわかる HAクラスタのありがたさ
PDF
最新型SX1302ベース LoRaWAN HAT for Rasberry Pi PG1302-JP日本語マニュアル
PDF
JANOG43 Forefront of SRv6, Open Source Implementations
Surfing on an Interactive Kiosk
A/B Linux updates with RAUC and meta-rauc-community: now & in the future
DPDK in Containers Hands-on Lab
DPDK & Layer 4 Packet Processing
Linux packet-forwarding
痛い目にあってわかる HAクラスタのありがたさ
最新型SX1302ベース LoRaWAN HAT for Rasberry Pi PG1302-JP日本語マニュアル
JANOG43 Forefront of SRv6, Open Source Implementations

What's hot (20)

PDF
Eigrp
PDF
リペア時間短縮にむけた取り組み@Yahoo! JAPAN #casstudy
PDF
Ethernetの受信処理
PDF
Blazing Performance with Flame Graphs
PDF
Boost UDP Transaction Performance
PDF
High-Performance Networking Using eBPF, XDP, and io_uring
PDF
10分で分かるLinuxブロックレイヤ
PPTX
DPDK KNI interface
PPTX
Elixir入門「第2回:PC間で通信するアプリをサクっと書いてみる」
PDF
Linux BPF Superpowers
PDF
10GbE時代のネットワークI/O高速化
PDF
SRv6 study
PDF
最適なOpenJDKディストリビューションの選び方 #codetokyo19B3 #ccc_l5
PDF
Zebra SRv6 CLI on Linux Dataplane (ENOG#49)
PDF
Upgrade to MySQL 8.0!
PDF
DPDKによる高速コンテナネットワーキング
PDF
PG-REXで学ぶPacemaker運用の実例
PDF
What are latest new features that DPDK brings into 2018?
PDF
Hadoop Compatible File Systems 2019 (db tech showcase 2019 Tokyo講演資料、2019/09/25)
PDF
MySQLバックアップの基本
Eigrp
リペア時間短縮にむけた取り組み@Yahoo! JAPAN #casstudy
Ethernetの受信処理
Blazing Performance with Flame Graphs
Boost UDP Transaction Performance
High-Performance Networking Using eBPF, XDP, and io_uring
10分で分かるLinuxブロックレイヤ
DPDK KNI interface
Elixir入門「第2回:PC間で通信するアプリをサクっと書いてみる」
Linux BPF Superpowers
10GbE時代のネットワークI/O高速化
SRv6 study
最適なOpenJDKディストリビューションの選び方 #codetokyo19B3 #ccc_l5
Zebra SRv6 CLI on Linux Dataplane (ENOG#49)
Upgrade to MySQL 8.0!
DPDKによる高速コンテナネットワーキング
PG-REXで学ぶPacemaker運用の実例
What are latest new features that DPDK brings into 2018?
Hadoop Compatible File Systems 2019 (db tech showcase 2019 Tokyo講演資料、2019/09/25)
MySQLバックアップの基本
Ad

Similar to Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox (20)

ODP
Os Grossupdated
PDF
Ubuntu core on bubblegum 96
PDF
Ubuntu core on bubblegum 96
PDF
Embedded Linux BSP Training (Intro)
PDF
App container rkt
PDF
Linux day 2016 Yocto Project
PDF
SystemReady IR and MediaTek Genio-1200-EVK - Tech part - COSCUP 20240804
PDF
Run Qt on Linux embedded systems using Yocto
ODP
Meego aptcms2010
PDF
Bootstrapping Forman with Vagrant - Setting up a local Provision & Deployment...
PDF
OSDC 2014: Nat Morris - Open Network Install Environment
PDF
Autobuilder2 Yocto Project Summit Lyon 2019
PPTX
Fn project quick installation guide
PDF
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
PDF
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
PDF
Bringing Tizen to a Raspberry Pi 2 Near You
PDF
The Yocto Project
PPTX
AGILE software, devices and wider ecosystem
ODP
Convert your package to multibuild on Open Build Service
PDF
Os Grossupdated
Ubuntu core on bubblegum 96
Ubuntu core on bubblegum 96
Embedded Linux BSP Training (Intro)
App container rkt
Linux day 2016 Yocto Project
SystemReady IR and MediaTek Genio-1200-EVK - Tech part - COSCUP 20240804
Run Qt on Linux embedded systems using Yocto
Meego aptcms2010
Bootstrapping Forman with Vagrant - Setting up a local Provision & Deployment...
OSDC 2014: Nat Morris - Open Network Install Environment
Autobuilder2 Yocto Project Summit Lyon 2019
Fn project quick installation guide
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Bringing Tizen to a Raspberry Pi 2 Near You
The Yocto Project
AGILE software, devices and wider ecosystem
Convert your package to multibuild on Open Build Service
Ad

More from Anne Nicolas (20)

PDF
Kernel Recipes 2019 - Driving the industry toward upstream first
PDF
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
PDF
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
PDF
Kernel Recipes 2019 - Metrics are money
PDF
Kernel Recipes 2019 - Kernel documentation: past, present, and future
PDF
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
PDF
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
PDF
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
PDF
Embedded Recipes 2019 - Making embedded graphics less special
PDF
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
PDF
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
PDF
Embedded Recipes 2019 - Testing firmware the devops way
PDF
Embedded Recipes 2019 - Herd your socs become a matchmaker
PDF
Embedded Recipes 2019 - LLVM / Clang integration
PDF
Embedded Recipes 2019 - Introduction to JTAG debugging
PDF
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
PDF
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
PDF
Kernel Recipes 2019 - Suricata and XDP
PDF
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
PDF
Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Formal modeling made easy

Recently uploaded (20)

PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Essential Infomation Tech presentation.pptx
PPTX
history of c programming in notes for students .pptx
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Transform Your Business with a Software ERP System
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Introduction to Artificial Intelligence
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
System and Network Administration Chapter 2
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
ai tools demonstartion for schools and inter college
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
Navsoft: AI-Powered Business Solutions & Custom Software Development
Essential Infomation Tech presentation.pptx
history of c programming in notes for students .pptx
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Transform Your Business with a Software ERP System
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Introduction to Artificial Intelligence
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
System and Network Administration Chapter 2
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Internet Downloader Manager (IDM) Crack 6.42 Build 41
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
Upgrade and Innovation Strategies for SAP ERP Customers
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PTS Company Brochure 2025 (1).pdf.......
ai tools demonstartion for schools and inter college
How Creative Agencies Leverage Project Management Software.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle

Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox

  • 1. Remote-update adventures RAUC, Yocto, Barebox Embedded Recipes 2019 2019-09-24 – Paris Story, Paris Patrick Boettcher YAISE
  • 2. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox About me ● Kernel developer since 2004 – (media drivers) ● Embedded C++, C (mostly Linux and RTOS), Python, compilers and testing frameworks ● Freelancer with YAISE
  • 3. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox Overview 1- Intro / Starting position 2- Remote update-strategy 3- Remote upgrade-strategy
  • 4. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox The project ● industrialized LORA-gateway (LoRaWan with 3G/4G ● special housing and connectors ● selected Phytec phyCORE-i.MX 6UL – 512MB RAM – 512MB NAND – ARM Cortex A7 – up to 900MHz ● Phytec provides a customizable Yocto distribution
  • 5. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox Phytec’s Yocto Distro ● 2018 ● based on morty (yocto 2.2) ● using barebox as bootloader ● device-tree well handled (barebox merges with dtb and hands all of it to the kernel) ● no “standard” system-updade mechanism in this release
  • 6. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox System configuration ● barebox (with built-in-device-tree) ● barebox-env ● kernel ● dtb ● rootfs-partition (~490MB ) ● system is accessible via remote-ssh-tunnel (initiated by the system, via the WAN connection)
  • 7. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox What happened? ● June 2018: first 100 devices have been delivered with the application-layer running nicely ● September 2018: a software update requires update of the base-system (kernel and libc)– of course – tried to do it with opkg/ipk – not satisfying (to be retried) – decision to study upgrade possibilities – learned a lot during #er2018 when discussing with Marek ● October 2018: Decision-time (customer pays): – 1st define general update strategy – 2nd define strategy to update the deployed 100 systems
  • 8. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox Overview 1- Intro / Starting position 2- Remote update-strategy 3- Remote upgrade-strategy
  • 9. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox Basic facts after study - 1 Stick close to what exists and do not re-invent the wheel, but what does exist? ● Partitioning (UBI) and filesystem (UBIFS) cannot be modified from Linux’s user-space running on UBI ● Putting processes “somewhere else” to change UBI is complex; barebox can of course do it ● Barebox has bootchooser ● Barebox has “state”-partition
  • 10. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox Basic facts after study - 2 ● Barebox has a filesystem inside its environment ● Barebox is self-updatable ● Barebox’ environment can be accessed from Linux’s user-space ● Robust Auto-Update Controller (RAUC) with signed bundles exists and works ● Newer versions of Phytec’s Distro use all this, but do not support Morty
  • 11. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox New partitioning (schema!) ● barebox (with built-in-device-tree) ● barebox-env ● rescue-initramfs (46M) ● rescue-dtb (512K) ● system0/1: kernel (9M), dtb (512K), rootfs (210M)
  • 12. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox Reconfiguring barebox ● Add bootchooser-functionality (default: 3 attempts per system, then rescue) ● Add state-functionality to device-tree (stored in eeprom) ● Add format and flash-scripts to defaultenv ● Add boot-scripts to defaultenv ● Build barebox-target-tools to rootfs ● barebox_2017.04.0-phy3.bbappend / state-eeprom.dts
  • 13. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox RAUC - bundle ● Add meta-rauc – provides “bundle-class” – provides user-space tools and config-base ● In your layer add a bundle-file and a .bbappend for certs and config ● bitbake <bundle-file-target> meli-bundle.bb
  • 14. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox RAUC – bootchooser - demo
  • 15. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox Overview 1- Intro / Starting position 2- Remote update-strategy 3- Remote upgrade-strategy
  • 16. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox Blind upgrade strategy ● How to convert a remote system from a single- system-installation to dual-installation? ● Simple: – Copy new-barebox, kernel, dtb, rootfs to the rootfs (scp) – Instrument barebox from userspace (bareboxenv) – Reboot – Meditation during 3 minutes – ssh-reverse-tunnel is apprearing
  • 17. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox Blind time- 1 ● user-space – injects a script to barebox which is executed at boot – reboot ● in old-barebox: – script: mount rootfs, update-barebox if image present – reset
  • 18. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox Blind time- 2 ● in new-barebox: – script mounts rootfs, copies images if present – copy some specific config-files to backup-dir in barebox-env – repartitioning – flash rootfs, kernel, dtb – resets state, bootchooser – self-destruction – reset ● in new-linux – first-boot: config-files are extracted from backup-dir barebox-env – everything works – ssh-tunnel appears
  • 19. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox Success ● All remotely deployed devices have been upgraded successfully to date
  • 20. 2019-09-24 Remote-update adventures - RAUC, Yocto, Barebox Oh well ● Rescue system had no functionality – the idea was: we’ll get to it later – 25 systems failed over to rescue system because of power-supply-variation during kernel boot ● SSL certificate was valid for one year only. No certificate infrastructure present for this project – Update installs a certificate with 100 years validity