feat(turris,omnia): re-enable disk resizing
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit Details

This commit is contained in:
wpetit 2023-04-26 15:55:13 +02:00
parent 2cf46ed9a5
commit 81360c3fda
2 changed files with 13 additions and 17 deletions

View File

@ -1,25 +1,21 @@
#!/bin/sh #!/bin/sh
# set -eo pipefail set -eo pipefail
# FLAG_FILE=/root/.disk_resized block info
# if [ -f "$FLAG_FILE" ]; then DISK=/dev/mmcblk0
# exit PARTITION="${DISK}p2"
# fi
# DISK=/dev/mmcblk0 parted -s -a opt "$DISK" "resizepart 2 100%"
# PARTITION="${DISK}p2"
# parted -s -a opt "$DISK" "resizepart 2 100%" FS_SIZE="$(unsquashfs -s "$PARTITION" | grep -o 'Filesystem size [0-9]* bytes' | grep -o '[0-9][0-9]*')"
FS_OFFSET="$(expr '(' "$FS_SIZE" + 65535 ')' / 65536 '*' 65536)"
LOOP_DEVICE="$(losetup -f --show -o "$FS_OFFSET" "$PARTITION")"
# FS_SIZE="$(unsquashfs -s "$PARTITION" | grep -o 'Filesystem size [0-9]* bytes' | grep -o '[0-9][0-9]*')" e2fsck -y -f "$LOOP_DEVICE"
# FS_OFFSET="$(expr '(' "$FS_SIZE" + 65535 ')' / 65536 '*' 65536)" resize2fs "$LOOP_DEVICE"
# LOOP_DEVICE="$(losetup -f --show -o "$FS_OFFSET" "$PARTITION")"
# e2fsck -y -f "$LOOP_DEVICE" rm -f /etc/uci-defaults/99-resize-disk.sh
# resize2fs "$LOOP_DEVICE"
# touch "$FLAG_FILE" reboot
# reboot

View File

@ -5,7 +5,7 @@ turris: omnia
omnia: omnia:
$(MAKE) \ $(MAKE) \
ADDITIONAL_INSTALL="install-turris-omnia-uci-defaults" \ ADDITIONAL_INSTALL="install-turris-omnia-uci-defaults" \
ADDITIONAL_OPENWRT_PACKAGES="losetup squashfs-tools-unsquashfs resize2fs e2fsprogs parted" \ ADDITIONAL_OPENWRT_PACKAGES="losetup squashfs-tools-unsquashfs resize2fs e2fsprogs parted block-mount" \
OPENWRT_TARGET="mvebu/cortexa9" \ OPENWRT_TARGET="mvebu/cortexa9" \
EMISSARY_ARCH="armv7" \ EMISSARY_ARCH="armv7" \
OPENWRT_PROFILE="cznic_turris-omnia" \ OPENWRT_PROFILE="cznic_turris-omnia" \