Merge linux-pine64 default config changes

Reduce free space overhead in images
This commit is contained in:
zador-blood-stained
2016-08-30 21:22:07 +03:00
parent 86797e04da
commit e5e3206bbd
2 changed files with 158 additions and 66 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -327,10 +327,9 @@ prepare_partitions()
fi
else
local imagesize=$(( $rootfs_size + $OFFSET + $BOOTSIZE )) # MiB
# Hardcoded overhead +40% and +128MB for ext4 leaves ~15% free on root partition
# TODO: Verify and reduce overhead
# Hardcoded overhead +25% and +128MB for ext4 leaves ~20% free on root partition
# extra 128 MiB for emergency swap file
local sdsize=$(bc -l <<< "scale=0; ($imagesize * 1.4) / 1 + 128")
local sdsize=$(bc -l <<< "scale=0; ($imagesize * 1.25) / 1 + 128")
fi
# stage: create blank image