fs: allow to specify compression options
PATCH 1/1 fs: allow to specify compression options
Add $BR2_TARGET_ROOTFS_xxx_OPTS options to allow changing the rootfs compression options.
This allows to trade compression ratio versus compression speed for example.
We default to the previous settings.
---
Hi,
I would like to propose this patch, to allow specifying rootfs compression options. I use it to reduce lzop compression level for faster rootfs compression.
Best regards,
V.
fs/Config.in | 34 ++++++++++++++++++++++++++++++++++ fs/common.mk | 10 +++++----- 2 files changed, 39 insertions(+), 5 deletions(-)
fs/Config.in +34 -0
@@ -13,4 +13,38 @@ source "fs/tar/Config.in" source "fs/ubifs/Config.in" source "fs/yaffs2/Config.in" +menu "Filesystem compression options" + +config BR2_TARGET_ROOTFS_GZIP_OPTS + string "Gzip options" + default "-9" + help + Options to use when compressing the root filesystem with gzip. + +config BR2_TARGET_ROOTFS_BZIP2_OPTS + string "Bzip2 options" + default "-9" + help + Options to use when compressing the root filesystem with bzip2. + +config BR2_TARGET_ROOTFS_LZMA_OPTS + string "Lzma options" + default "-9" + help + Options to use when compressing the root filesystem with lzma. + +config BR2_TARGET_ROOTFS_LZOP_OPTS + string "Lzop options" + default "-9" + help + Options to use when compressing the root filesystem with lzop. + +config BR2_TARGET_ROOTFS_XZ_OPTS + string "Xz options" + default "-9 -C crc32" + help + Options to use when compressing the root filesystem with xz. + +endmenu + endmenu
fs/common.mk +5 -5
@@ -45,25 +45,25 @@ ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs \ ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y) ROOTFS_$(2)_COMPRESS_EXT = .gz -ROOTFS_$(2)_COMPRESS_CMD = gzip -9 -c +ROOTFS_$(2)_COMPRESS_CMD = gzip $$(call qstrip,$$(BR2_TARGET_ROOTFS_GZIP_OPTS)) -c endif ifeq ($$(BR2_TARGET_ROOTFS_$(2)_BZIP2),y) ROOTFS_$(2)_COMPRESS_EXT = .bz2 -ROOTFS_$(2)_COMPRESS_CMD = bzip2 -9 -c +ROOTFS_$(2)_COMPRESS_CMD = bzip2 $$(call qstrip,$$(BR2_TARGET_ROOTFS_BZIP2_OPTS)) -c endif ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZMA),y) ROOTFS_$(2)_DEPENDENCIES += host-lzma ROOTFS_$(2)_COMPRESS_EXT = .lzma -ROOTFS_$(2)_COMPRESS_CMD = $$(LZMA) -9 -c +ROOTFS_$(2)_COMPRESS_CMD = $$(LZMA) $$(call qstrip,$$(BR2_TARGET_ROOTFS_LZMA_OPTS)) -c endif ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZO),y) ROOTFS_$(2)_DEPENDENCIES += host-lzop ROOTFS_$(2)_COMPRESS_EXT = .lzo -ROOTFS_$(2)_COMPRESS_CMD = $$(LZOP) -9 -c +ROOTFS_$(2)_COMPRESS_CMD = $$(LZOP) $$(call qstrip,$$(BR2_TARGET_ROOTFS_LZOP_OPTS)) -c endif ifeq ($$(BR2_TARGET_ROOTFS_$(2)_XZ),y) ROOTFS_$(2)_COMPRESS_EXT = .xz -ROOTFS_$(2)_COMPRESS_CMD = xz -9 -C crc32 -c +ROOTFS_$(2)_COMPRESS_CMD = xz $$(call qstrip,$$(BR2_TARGET_ROOTFS_XZ_OPTS)) -c endif $$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES)
Signature · 1 line
2.1.3
PATCH 1/1 fs: allow to specify compression options
Vincent, All,
On 2014-12-03 18:10 +0100, Vincent Stehl? spake thusly:
Quoted 4 lines
Add $BR2_TARGET_ROOTFS_xxx_OPTS options to allow changing the rootfs compression options.
This allows to trade compression ratio versus compression speed for example.
Thank you for your contribution!
However, we would prefer that compression option be simply removed for all filesystems, except for squashfs and jffs2 for which compression is intrinsic to the filesystem.
Would you mind to work on this, please?
Thank you!
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'