From 9a26533a06a8892b4014d86fe0c9d9e3b08ae1e5 Mon Sep 17 00:00:00 2001 From: Thore Sommer Date: Wed, 7 Oct 2020 23:25:22 +0200 Subject: Add option to change compression algorithm and level for squashfs. --- scripts/build/binary_rootfs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'scripts/build/binary_rootfs') 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) -- cgit v1.2.3