Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts/image: use 256kb blocksize for squashfs images #2992

Merged
merged 1 commit into from
Oct 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions scripts/image
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,15 @@ 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"
# Set mksquashfs options for each compression method
if [ -z "$SQUASHFS_COMPRESSION_OPTION" ]; then
if [ "${SQUASHFS_COMPRESSION:-gzip}" = "gzip" ]; then
SQUASHFS_COMPRESSION_OPTION="-Xcompression-level 9 -b 262144"
elif [ "$SQUASHFS_COMPRESSION" = "lzo" ]; then
SQUASHFS_COMPRESSION_OPTION="-Xcompression-level 9 -b 524288"
elif [ "$SQUASHFS_COMPRESSION" = "zstd" ]; then
SQUASHFS_COMPRESSION_OPTION="-Xcompression-level 22 -b 262144"
fi
fi

# create squashfs file, default to gzip if no compression configured
Expand Down