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 <john.ernberg@actia.se>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
John Ernberg
2024-12-27 10:36:35 +00:00
committed by Thomas Petazzoni
parent 8c9c1222b7
commit 1d5b36bfa4
2 changed files with 8 additions and 0 deletions

View File

@@ -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

View File

@@ -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