From 1d5b36bfa4b998a3e213fc45166b76d2dbb5c709 Mon Sep 17 00:00:00 2001 From: John Ernberg Date: Fri, 27 Dec 2024 10:36:35 +0000 Subject: [PATCH] fs/squashfs: allow to disable compression of the filesystem Devices with large amounts of flash but operating in connectivity- constrained areas can benefit from using uncompressed images as this allows delta updates using binary diff algorithms. Connectivity-constrained areas in this context are defined as areas where the connection is very slow, unstable, etcetera, where it is difficult to transfer data in large scale. Add a "none" option to the compression menu and map it to the mksquashfs -no-compression flag to enable this feature. Disable the ability to select extreme compression in this case as that makes absolutely no sense combined with no compression. Signed-off-by: John Ernberg Signed-off-by: Thomas Petazzoni --- fs/squashfs/Config.in | 6 ++++++ fs/squashfs/squashfs.mk | 2 ++ 2 files changed, 8 insertions(+) diff --git a/fs/squashfs/Config.in b/fs/squashfs/Config.in index 21322a2246..4f898bfdd4 100644 --- a/fs/squashfs/Config.in +++ b/fs/squashfs/Config.in @@ -69,6 +69,8 @@ choice Select the squashfs compression algorithm to use when generating the filesystem. + Select "none" to disable compression. + config BR2_TARGET_ROOTFS_SQUASHFS4_GZIP bool "gzip" @@ -87,11 +89,15 @@ config BR2_TARGET_ROOTFS_SQUASHFS4_XZ config BR2_TARGET_ROOTFS_SQUASHFS4_ZSTD bool "zstd" +config BR2_TARGET_ROOTFS_SQUASHFS4_NONE + bool "none" + endchoice config BR2_TARGET_ROOTFS_SQUASHFS_EXTREME_COMP bool "extreme compression when available" default y if BR2_TARGET_ROOTFS_SQUASHFS4_LZ4 # legacy + depends on !BR2_TARGET_ROOTFS_SQUASHFS4_NONE help Use options to increase compression ration as much as possible, like using architecture-specific options, at diff --git a/fs/squashfs/squashfs.mk b/fs/squashfs/squashfs.mk index cf083663c1..3b9d0efbbe 100644 --- a/fs/squashfs/squashfs.mk +++ b/fs/squashfs/squashfs.mk @@ -26,6 +26,8 @@ else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_XZ),y) ROOTFS_SQUASHFS_ARGS += -comp xz else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_ZSTD),y) ROOTFS_SQUASHFS_ARGS += -comp zstd +else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_NONE),y) +ROOTFS_SQUASHFS_ARGS += -no-compression else ROOTFS_SQUASHFS_ARGS += -comp gzip endif