* [Buildroot] [PATCH] fs/squashfs: Allow to disable compression of the filesystem
@ 2024-12-27 10:36 John Ernberg
2024-12-30 21:42 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: John Ernberg @ 2024-12-27 10:36 UTC (permalink / raw)
To: buildroot@buildroot.org; +Cc: Jonas Blixt, John Ernberg
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>
---
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
--
2.47.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] fs/squashfs: Allow to disable compression of the filesystem
2024-12-27 10:36 [Buildroot] [PATCH] fs/squashfs: Allow to disable compression of the filesystem John Ernberg
@ 2024-12-30 21:42 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-12-30 21:42 UTC (permalink / raw)
To: John Ernberg; +Cc: buildroot@buildroot.org, Jonas Blixt
On Fri, 27 Dec 2024 10:36:35 +0000
John Ernberg <john.ernberg@actia.se> wrote:
> 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>
> ---
> fs/squashfs/Config.in | 6 ++++++
> fs/squashfs/squashfs.mk | 2 ++
> 2 files changed, 8 insertions(+)
Thanks a lot for this patch, makes sense, so I've applied to our master
branch!
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-30 21:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-27 10:36 [Buildroot] [PATCH] fs/squashfs: Allow to disable compression of the filesystem John Ernberg
2024-12-30 21:42 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox