فهرست منبع

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>
John Ernberg 7 ماه پیش
والد
کامیت
1d5b36bfa4
2فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 6 0
      fs/squashfs/Config.in
  2. 2 0
      fs/squashfs/squashfs.mk

+ 6 - 0
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

+ 2 - 0
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