fix(rauc): increase rootfs headroom from 25% to 50%

25% was too tight — firmware OTA writes to /opt/betterframe/kiosk/
on the rootfs and fills it. 50% headroom gives enough space for
the kiosk binary download + swap.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mitchell R 2026-05-26 02:46:17 +02:00
parent 6a74b96570
commit a03a0d17de
No known key found for this signature in database

View file

@ -47,12 +47,12 @@ dd if="$WORK/in.img" of="$WORK/rootfs.ext4" \
rm "$WORK/in.img" rm "$WORK/in.img"
# Shrink rootfs to actual used + 25% headroom. # Shrink rootfs to actual used + 50% headroom (25% was too tight for OTA).
echo "==> Compacting rootfs.ext4" echo "==> Compacting rootfs.ext4"
e2fsck -fy "$WORK/rootfs.ext4" || true e2fsck -fy "$WORK/rootfs.ext4" || true
resize2fs -M "$WORK/rootfs.ext4" resize2fs -M "$WORK/rootfs.ext4"
ROOTFS_BYTES_USED="$(stat -c%s "$WORK/rootfs.ext4")" ROOTFS_BYTES_USED="$(stat -c%s "$WORK/rootfs.ext4")"
ROOTFS_BYTES_SLOT=$(( ROOTFS_BYTES_USED * 5 / 4 )) ROOTFS_BYTES_SLOT=$(( ROOTFS_BYTES_USED * 3 / 2 ))
ROOTFS_BYTES_SLOT=$(( (ROOTFS_BYTES_SLOT + 1048575) / 1048576 * 1048576 )) ROOTFS_BYTES_SLOT=$(( (ROOTFS_BYTES_SLOT + 1048575) / 1048576 * 1048576 ))
truncate -s "$ROOTFS_BYTES_SLOT" "$WORK/rootfs.ext4" truncate -s "$ROOTFS_BYTES_SLOT" "$WORK/rootfs.ext4"
resize2fs "$WORK/rootfs.ext4" resize2fs "$WORK/rootfs.ext4"