squashfs: re-add legacy lzma support
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Fri, 4 Mar 2011 14:10:14 +0000 (11:10 -0300)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 5 Mar 2011 14:04:03 +0000 (15:04 +0100)
Readd legacy LZMA support since older patched kernels might be using it.
Introduce an XZ target filesystem option for the new format.

[Peter: add a seperate xz target for squashfs-target as well]
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
fs/squashfs/Config.in
fs/squashfs/squashfs.mk
package/squashfs/Config.in
package/squashfs/squashfs.mk

index 85416becbbed0d2096d7e693c2ce73e190ccb649..f13410a1ce2bf5c16f1dcf275edb83bf829ab5f3 100644 (file)
@@ -37,5 +37,8 @@ config BR2_TARGET_ROOTFS_SQUASHFS4_LZMA
 config BR2_TARGET_ROOTFS_SQUASHFS4_LZO
        bool "lzo"
 
+config BR2_TARGET_ROOTFS_SQUASHFS4_XZ
+       bool "xz"
+
 endchoice
 endif
index 91a7534de3791f33a7d306ef3104ddc3f8ed0ebc..a680dae0f07e7ff844d275f4fb67ee6d62b00749 100644 (file)
@@ -11,11 +11,15 @@ 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
+ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_XZ),y)
 ROOTFS_SQUASHFS_ARGS += -comp xz
 else
 ROOTFS_SQUASHFS_ARGS += -comp gzip
 endif
 endif
+endif
 
 else
 ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs3
index 6730708620a9d6750603e073d02cf7121a031e36..7d0fc71c02fd3b4fb228857a34b64dc5116e0896 100644 (file)
@@ -28,6 +28,12 @@ config BR2_PACKAGE_SQUASHFS_LZO
        help
          Support LZO compression algorithm
 
+config BR2_PACKAGE_SQUASHFS_XZ
+       bool "xz support"
+       select BR2_PACKAGE_XZ
+       help
+         Support XZ compression algorithm
+
 endif
 
 comment "squashfs requires a toolchain with LARGEFILE support"
index 5000a8cb405148613042878b11883e702c188c84..7aa8ca9080d791d3cdcaa10f94f562f4f65e45c0 100644 (file)
@@ -2,11 +2,18 @@ SQUASHFS_VERSION=4.2
 SQUASHFS_SOURCE=squashfs$(SQUASHFS_VERSION).tar.gz
 SQUASHFS_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/squashfs
 
-# no libattr/xz in BR
+# no libattr in BR
 SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=0
 
 ifeq ($(BR2_PACKAGE_SQUASHFS_LZMA),y)
 SQUASHFS_DEPENDENCIES += xz
+SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=1 COMP_DEFAULT=lzma
+else
+SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=0
+endif
+
+ifeq ($(BR2_PACKAGE_SQUASHFS_XZ),y)
+SQUASHFS_DEPENDENCIES += xz
 SQUASHFS_MAKE_ARGS += XZ_SUPPORT=1 COMP_DEFAULT=xz
 else
 SQUASHFS_MAKE_ARGS += XZ_SUPPORT=0
@@ -34,7 +41,8 @@ HOST_SQUASHFS_MAKE_ARGS = \
        XATTR_SUPPORT=0 \
        XZ_SUPPORT=1    \
        GZIP_SUPPORT=1  \
-       LZO_SUPPORT=1
+       LZO_SUPPORT=1   \
+       LZMA_XZ_SUPPORT=1
 
 define SQUASHFS_BUILD_CMDS
  $(TARGET_MAKE_ENV) $(MAKE)    \