summaryrefslogtreecommitdiff
path: root/scripts/build/binary_rootfs
diff options
context:
space:
mode:
authorThore Sommer <debian@thson.de>2020-10-07 23:25:22 +0200
committerLuca Boccassi <bluca@debian.org>2020-10-12 13:35:16 +0000
commit9a26533a06a8892b4014d86fe0c9d9e3b08ae1e5 (patch)
treeb7a9a535c5bcd3b66a6a4d8d21f64e103f78922e /scripts/build/binary_rootfs
parentce39f3e507a8d03b1c986c400d797f13f82ae9d5 (diff)
downloadvyos-live-build-9a26533a06a8892b4014d86fe0c9d9e3b08ae1e5.tar.gz
vyos-live-build-9a26533a06a8892b4014d86fe0c9d9e3b08ae1e5.zip
Add option to change compression algorithm and level for squashfs.
Diffstat (limited to 'scripts/build/binary_rootfs')
-rwxr-xr-xscripts/build/binary_rootfs13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/build/binary_rootfs b/scripts/build/binary_rootfs
index a81c21fd5..5934ad672 100755
--- a/scripts/build/binary_rootfs
+++ b/scripts/build/binary_rootfs
@@ -287,7 +287,18 @@ case "${LB_CHROOT_FILESYSTEM}" in
esac
fi
- MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -comp xz"
+ # Set squashfs compression type or default to xz
+ if [ -n "${LB_CHROOT_SQUASHFS_COMPRESSION_TYPE}" ]
+ then
+ MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -comp ${LB_CHROOT_SQUASHFS_COMPRESSION_TYPE}"
+ else
+ MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -comp xz"
+ fi
+
+ if [ -n "${LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL}" ]
+ then
+ MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -Xcompression-level ${LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL}"
+ fi
case "${LB_BUILD_WITH_CHROOT}" in
true)