mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 16:56:33 +00:00
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:
parent
6a74b96570
commit
a03a0d17de
1 changed files with 2 additions and 2 deletions
|
|
@ -47,12 +47,12 @@ dd if="$WORK/in.img" of="$WORK/rootfs.ext4" \
|
|||
|
||||
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"
|
||||
e2fsck -fy "$WORK/rootfs.ext4" || true
|
||||
resize2fs -M "$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 ))
|
||||
truncate -s "$ROOTFS_BYTES_SLOT" "$WORK/rootfs.ext4"
|
||||
resize2fs "$WORK/rootfs.ext4"
|
||||
|
|
|
|||
Loading…
Reference in a new issue