summaryrefslogtreecommitdiffstats
path: root/fs/squashfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/squashfs')
-rw-r--r--fs/squashfs/Config.in20
-rw-r--r--fs/squashfs/squashfs.mk14
2 files changed, 32 insertions, 2 deletions
diff --git a/fs/squashfs/Config.in b/fs/squashfs/Config.in
index bcc93b925..85416becb 100644
--- a/fs/squashfs/Config.in
+++ b/fs/squashfs/Config.in
@@ -19,5 +19,23 @@ config BR2_TARGET_ROOTFS_SQUASHFS3
bool "3.x"
endchoice
-endif
+choice
+ prompt "Compression algorithm"
+ default BR2_TARGET_ROOTFS_SQUASHFS4_GZIP
+ depends on BR2_TARGET_ROOTFS_SQUASHFS4
+ help
+ Select the squashfs compression algorithm to use when
+ generating the filesystem.
+
+config BR2_TARGET_ROOTFS_SQUASHFS4_GZIP
+ bool "gzip"
+
+config BR2_TARGET_ROOTFS_SQUASHFS4_LZMA
+ bool "lzma"
+
+config BR2_TARGET_ROOTFS_SQUASHFS4_LZO
+ bool "lzo"
+
+endchoice
+endif
diff --git a/fs/squashfs/squashfs.mk b/fs/squashfs/squashfs.mk
index 6117de62a..7efe979e8 100644
--- a/fs/squashfs/squashfs.mk
+++ b/fs/squashfs/squashfs.mk
@@ -6,6 +6,17 @@
ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4),y)
ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs
+
+ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZO),y)
+ROOTFS_SQUASHFS_ARGS += -comp lzo
+else
+ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZMA),y)
+ROOTFS_SQUASHFS_ARGS += -comp lzma
+else
+ROOTFS_SQUASHFS_ARGS += -comp gzip
+endif
+endif
+
else
ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs3
@@ -19,7 +30,8 @@ endif
define ROOTFS_SQUASHFS_CMD
$(HOST_DIR)/usr/bin/mksquashfs $(TARGET_DIR) $$@ -noappend \
- $(ROOTFS_SQUASHFS_ARGS)
+ $(ROOTFS_SQUASHFS_ARGS) && \
+ chmod 0644 $$@
endef
$(eval $(call ROOTFS_TARGET,squashfs))