Thistle OTA Root Filesystem A/B Update on Raspberry Pi 4
ssh <username>@<rpi4-ip-addr>
.
Commands in the rest of this section are executed in the SSH shell on the RPi-4.
sudo raspi-config
to enable the Serial Port interfaces. The option is
under “Interface Options” in the main menu. Click on “Finish” to save the
configuration changes, and reboot the RPi-4 for the changes to take effect.
/dev/mmcblk0
. It contains two partitions: a boot partition mmcblk0p1
, and
a rootfs partition mmcblk0p2
.
fdisk
on the utility OS interactively.
fdisk
menu, first show the current partition table. Take note on the
end sector number for /dev/mmcblk0p2
- we will create a new partition right
after it.
/dev/mmcblk0p3
, as follows. Set the
first sector value the last sector number of /dev/mmcblk0p2
plus 1 (5390336
in this example), and use the default value for all other choices.
fstab
file) of the
microSD card’s default rootfs, and add the tuc
binary to the rootfs.
/etc/fstab
/boot/firmware
to /boot
. Save and exit.
/usr/bin/
config.txt
in the boot partition.
enable_uart=1
to the last line of config.txt
. Save the change, and
power off the Raspberry Pi.
--signing-method="remote"
uses a Thistle-managed,
Cloud
KMS-backed
ECDSA-P256 key to sign OTA update bundles. For other signing methods supported
by TRH, please refer to our blog post OTA Bundle Signing in Production with
Thistle Release
Helper.RaspberryPi
and the two partitions that will be used
as root filesystem alternatively. Amend your configuration using the snippet
below as the microSD card partitions were specified during the image generation.
config.json
onto the Raspberry Pi, this can be done
using scp
or using a USB key. This is necessary so that we can run the update
client on the Raspberry Pi with the appropriate configuration. Under normal
circumstances, this operation will be performed automatically during e.g. the
image personalization step of a deploy pipeline.
thistle
and raspberry
, respectively.