Implementing A/B System Updates with U-Boot
Michael Opdenacker, Bootlin [Open Source Summit EU 2022]

This is an experience of preparing A/B updates with U-Boot and swupdate.

A/B update: the current version of kernel, rootfs, … is not touched, instead another copy is written. After writing and verifying, the active and inactive partition (or bank, volume, …) are swapped so the next boot goes to the new one. The bootloader is responsible for that swapping. In addition, a watchdog is used to reboot automatically in case the new copy doesn’t actually work and in that case roll back to the previous, known-working version.

Practical questions: how to identify the active partition, how to swap partitions, and how to fall back.

To identify the active partition: use bootable flag: use sgdisk or parted to set the flag and clear it on the old one. Similarly use sgdisk or parted to check which partition is marked as bootable.

(I didn’t pay attention any more to the rest of the talk because I don’t really agree with the content.)