Commit 448343f3 authored by Roman Alifanov's avatar Roman Alifanov

added zstd compression option with `SQUASHFS=zstd`

parent 0ab5ceaf
...@@ -6,6 +6,7 @@ CONFIGS=/boot/config-* ...@@ -6,6 +6,7 @@ CONFIGS=/boot/config-*
GZ_OPTS="-comp gzip" GZ_OPTS="-comp gzip"
XZ_OPTS="-comp xz" XZ_OPTS="-comp xz"
LZO_OPTS="-comp lzo" LZO_OPTS="-comp lzo"
ZSTD_OPTS="-comp zstd -Xcompression-level 11"
verbose() { [ -z "$GLOBAL_VERBOSE" ] || echo "** $@" >&2; } verbose() { [ -z "$GLOBAL_VERBOSE" ] || echo "** $@" >&2; }
fatal() { echo "** error: $@" >&2; exit 1; } fatal() { echo "** error: $@" >&2; exit 1; }
...@@ -37,6 +38,12 @@ options() ...@@ -37,6 +38,12 @@ options()
{ {
# squashfs options: not really neccessary but better than none # squashfs options: not really neccessary but better than none
# NB: this config file should be carried over into install2 # NB: this config file should be carried over into install2
if [ "$GLOBAL_SQUASHFS" = "zstd" ] && configured "SQUASHFS_ZSTD=y"; then
verbose "using modern zstd compression"
echo "$ZSTD_OPTS"
return 0
fi
if [ "$GLOBAL_SQUASHFS" != "fast" ] && configured "SQUASHFS_XZ=y"; then if [ "$GLOBAL_SQUASHFS" != "fast" ] && configured "SQUASHFS_XZ=y"; then
# NB: the decompression filter overhead might hurt # NB: the decompression filter overhead might hurt
# NB: there are arm, powerpc and some other filters too # NB: there are arm, powerpc and some other filters too
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment