Finally, it comes down to installing RAUC into the Debian partitions.
๐ Our script: rauc-utils/install.sh is already complete. Feel free to read and understand it.
This script will:
raucca.cert.pem (certificate used to sign the update images)system.confrauc-mark-good.service/etc/fw_env.config, fstab, and enables systemd services
But in order to run it, recursively copy the entire RAUC utils directory from host to somewhere inside the debian rootfs (e.g., /root/rauc-utils/) and run it using chroot-enter.sh (as you've done in the prev. task).
We can now run mk-disk-image2.sh. The disk.img will be updated with 4 partitions (boot, A, B + data), Debian will be copied to the first 2 EXT4 partitions and the bootloader will be installed at 32KB offset (the SoC's BL1/BOOTROM wants it there).
๐ In order to have the A-B partitioning scheme, we'll need to add this script: rauc-utils/boot.cmd.in to our u-boot default environment. Feel free to study it (highly recommended)!
Use the rauc-utils/uboot-modify-bootcmd.sh script to just to this!
Then rebuild uboot (you must delete u-boot/.config and u-boot/flash.bin for our Makefile to trigger the recompilation of UBoot).
Power up the board and go into u-boot. Let fastboot start and use fastboot flash 0:0 disk.img.
Use your root password (hope you set it!).
Once Debian booted, check:
mount | grep rootfs cat /etc/rauc/system.conf