mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge pull request #2892 from antonlacon/compression-levels
scripts/image: use maximum lzo and zstd compression level for images
This commit is contained in:
commit
a588776dff
@ -231,9 +231,16 @@ rm -rf $TARGET_IMG/$IMAGE_NAME.kernel
|
||||
cp -PR $BUILD/linux-$(kernel_version)/arch/$TARGET_KERNEL_ARCH/boot/$KERNEL_TARGET $TARGET_IMG/$IMAGE_NAME.kernel
|
||||
chmod 0644 $TARGET_IMG/$IMAGE_NAME.kernel
|
||||
|
||||
# use strongest available compression level for images
|
||||
if [ "$SQUASHFS_COMPRESSION" = "lzo" -o "${SQUASHFS_COMPRESSION:-gzip}" = "gzip" ]; then
|
||||
SQUASHFS_COMPRESSION_OPTION="-Xcompression-level 9"
|
||||
elif [ "$SQUASHFS_COMPRESSION" = "zstd" ]; then
|
||||
SQUASHFS_COMPRESSION_OPTION="-Xcompression-level 22"
|
||||
fi
|
||||
|
||||
# create squashfs file, default to gzip if no compression configured
|
||||
echo "rm -rf \"$TARGET_IMG/$IMAGE_NAME.system\"" >> $FAKEROOT_SCRIPT
|
||||
echo "$TOOLCHAIN/bin/mksquashfs \"$BUILD/image/system\" \"$TARGET_IMG/$IMAGE_NAME.system\" -noappend -comp ${SQUASHFS_COMPRESSION:-gzip}" >> $FAKEROOT_SCRIPT
|
||||
echo "$TOOLCHAIN/bin/mksquashfs \"$BUILD/image/system\" \"$TARGET_IMG/$IMAGE_NAME.system\" -noappend -comp ${SQUASHFS_COMPRESSION:-gzip} ${SQUASHFS_COMPRESSION_OPTION}" >> $FAKEROOT_SCRIPT
|
||||
|
||||
# run fakeroot
|
||||
$TOOLCHAIN/bin/fakeroot -- $FAKEROOT_SCRIPT
|
||||
|
Loading…
x
Reference in New Issue
Block a user