Raspberry PI tryboot_a_b=1 support preview

Hi all,

we are currently baking a plugin for the Raspberry Pi tryboot feature that would allow to own full boot image lifecycle updates on the Raspberry Pi with Pantavisor.

The current Pantavisor PR that adds the goodness to roll raspberry pi boot partition updates as full binary blobs can be found here: WIP: rpiab support by asac · Pull Request #402 · pantavisor/pantavisor · GitHub

You will also to pull the following base branches in your Pantavisor repo sync to build a rpi a/b boot enable image:

Happy Testing!

  • Alexander

After a few rounds of local work and testing, we are about to land this feature. The main pantavisor PR is to be found here: rpiab booloader support for Raspbery Pi Firmware A/B tryboot by asac · Pull Request #402 · pantavisor/pantavisor · GitHub

rpiab booloader support for Raspbery Pi Firmware A/B tryboot

 * ship pantavisor and kernel as part of full raspberry pi boot partition
 * install dtbs to boot partition from kernel
 * use mcopy to copy autoboot.txt to and from partition 1
 * patch cmdline.txt in boot-a/b partition to have pv_rev
 * add pvzlib.c/h helper to support shipping gzipped boot partitions
 * add support for shipping 'rpiab' partition in run.json
 * parse /proc-device-tree and autoconf.txt in early boot to find tryboot
   info and partition and boot disk (through boot-mode)
 * set tryboot flag through IOCTL_MBOX_PROPERTY ioctl (mbox_property)

Example run.json:
    "addons": [],
    "firmware": "firmware.squashfs",
    "initrd_config": "trail.config",
    "modules": "modules.squashfs",
    "rpiab": "pantavisor-rpi.img.gz"

See: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#fail-safe-os-updates-tryboot
See: https://www.raspberrypi.com/documentation/computers/config_txt.html#autoboot-txt
See: https://github.com/raspberrypi/userland/tree/master/host_applications/linux/apps/vcmailbox

Will post an update once initial images are there for testing…