fs/common: add support for LZO and XZ compression methods
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Tue, 22 Jan 2013 01:03:43 +0000 (01:03 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 24 Apr 2013 20:18:13 +0000 (22:18 +0200)
Add support for LZO and XZ compression methods to cpio, ext2, tar and
ubifs filesystem targets.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
fs/common.mk
fs/cpio/Config.in
fs/ext2/Config.in
fs/tar/Config.in
fs/ubifs/Config.in

index a0b7b3909c685a5889c6281a8a97672ab15fd348..c6f67d831dcfb74640171a532eabe868715442f0 100644 (file)
@@ -39,7 +39,7 @@ ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE) \
 define ROOTFS_TARGET_INTERNAL
 
 # extra deps
-ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs $$(if $$(BR2_TARGET_ROOTFS_$(2)_LZMA),host-lzma)
+ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs $$(if $$(BR2_TARGET_ROOTFS_$(2)_LZMA),host-lzma) $$(if $$(BR2_TARGET_ROOTFS_$(2)_LZO),host-lzop) $$(if $$(BR2_TARGET_ROOTFS_$(2)_XZ),host-xz)
 
 $$(BINARIES_DIR)/rootfs.$(1): $$(ROOTFS_$(2)_DEPENDENCIES)
        @$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
@@ -70,6 +70,12 @@ endif
 ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZMA),y)
        $$(LZMA) -9 -c $$@ > $$@.lzma
 endif
+ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZO),y)
+       $$(LZOP) -9 -c $$@ > $$@.lzo
+endif
+ifeq ($$(BR2_TARGET_ROOTFS_$(2)_XZ),y)
+       $(XZ) -9 -C crc32 -c $$@ > $$@.xz
+endif
 
 rootfs-$(1)-show-depends:
        @echo $$(ROOTFS_$(2)_DEPENDENCIES)
index 0669a44e17ba6287d5f867657fe694900cffb943..87dde6414d16e16767b25d9d3bb6fb2b086755ba 100644 (file)
@@ -18,22 +18,32 @@ choice
 config BR2_TARGET_ROOTFS_CPIO_NONE
         bool "no compression"
         help
-         Do not compress the cpio filesystem.
+          Do not compress the cpio filesystem.
 
 config BR2_TARGET_ROOTFS_CPIO_GZIP
         bool "gzip"
         help
-         Do compress the cpio filesystem with gzip.
+          Do compress the cpio filesystem with gzip.
 
 config BR2_TARGET_ROOTFS_CPIO_BZIP2
         bool "bzip2"
         help
-         Do compress the cpio filesystem with bzip2.
+          Do compress the cpio filesystem with bzip2.
 
 config BR2_TARGET_ROOTFS_CPIO_LZMA
         bool "lzma"
         help
-         Do compress the cpio filesystem with lzma.
+          Do compress the cpio filesystem with lzma.
+
+config BR2_TARGET_ROOTFS_CPIO_LZO
+       bool "lzo"
+       help
+         Do compress the cpio filesystem with lzop.
+
+config BR2_TARGET_ROOTFS_CPIO_XZ
+       bool "xz"
+       help
+         Do compress the cpio filesystem with xz.
 
 endchoice
 
index 097242ef702f80f95089be0a212e21474035bd69..e75ef54b3a6fb0dc48cc82a1151965ad41a98521 100644 (file)
@@ -79,6 +79,16 @@ config BR2_TARGET_ROOTFS_EXT2_LZMA
        help
          Do compress the ext2/3/4 filesystem with lzma.
 
+config BR2_TARGET_ROOTFS_EXT2_LZO
+       bool "lzo"
+       help
+         Do compress the ext2 filesystem with lzop.
+
+config BR2_TARGET_ROOTFS_EXT2_XZ
+       bool "xz"
+       help
+         Do compress the ext2 filesystem with xz.
+
 endchoice
 
 endif # BR2_TARGET_ROOTFS_EXT2
index 60b8bf434d134b7c9480c03710e65087cf7549c4..63663ecd6fc1bcec4c841c5c539de618ebcca864 100644 (file)
@@ -14,22 +14,32 @@ choice
 config BR2_TARGET_ROOTFS_TAR_NONE
        bool "no compression"
        help
-        Do not compress the tarball.
+         Do not compress the tarball.
 
 config BR2_TARGET_ROOTFS_TAR_GZIP
        bool "gzip"
        help
-        Do compress the tarball with gzip.
+         Do compress the tarball with gzip.
 
 config BR2_TARGET_ROOTFS_TAR_BZIP2
        bool "bzip2"
        help
-        Do compress the tarball with bzip2.
+         Do compress the tarball with bzip2.
 
 config BR2_TARGET_ROOTFS_TAR_LZMA
        bool "lzma"
        help
-        Do compress the tarball with lzma.
+         Do compress the tarball with lzma.
+
+config BR2_TARGET_ROOTFS_TAR_LZO
+       bool "lzo"
+       help
+         Do compress the tarball with lzop.
+
+config BR2_TARGET_ROOTFS_TAR_XZ
+       bool "xz"
+       help
+         Do compress the tarball with xz.
 
 endchoice
 
index a5ef5f2b29cfc992b70082d2d2e467f38d4c08fa..0a798d861f107b61fe4b029f8cb125dd409d6796 100644 (file)
@@ -75,6 +75,16 @@ config BR2_TARGET_ROOTFS_UBIFS_LZMA
        help
          Do compress the ubifs filesystem with lzma.
 
+config BR2_TARGET_ROOTFS_UBIFS_LZO
+       bool "lzo"
+       help
+         Do compress the ubifs filesystem with lzop.
+
+config BR2_TARGET_ROOTFS_UBIFS_XZ
+       bool "xz"
+       help
+         Do compress the ubifs filesystem with xz.
+
 endchoice
 
 config BR2_TARGET_ROOTFS_UBI