fs/common.mk: support lz4 compression
authorPeter Korsgaard <peter@korsgaard.com>
Fri, 13 Oct 2017 19:16:52 +0000 (21:16 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 8 Jan 2018 22:43:58 +0000 (23:43 +0100)
Similar to the other compressors.  Notice that we use the -l (legacy format)
for Linux kernel initrd compatibility.

Lz4 decompression is supported by the Linux kernel since 3.11.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
fs/common.mk

index 98232f0b9f9ab7140fbad9740a6efc2f582763e2..9715eb13d92790f11bcd2209171b52ecddbac131 100644 (file)
@@ -56,6 +56,11 @@ ROOTFS_$(2)_DEPENDENCIES += host-lzma
 ROOTFS_$(2)_COMPRESS_EXT = .lzma
 ROOTFS_$(2)_COMPRESS_CMD = $$(LZMA) -9 -c
 endif
+ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZ4),y)
+ROOTFS_$(2)_DEPENDENCIES += host-lz4
+ROOTFS_$(2)_COMPRESS_EXT = .lz4
+ROOTFS_$(2)_COMPRESS_CMD = lz4 -l -9 -c
+endif
 ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZO),y)
 ROOTFS_$(2)_DEPENDENCIES += host-lzop
 ROOTFS_$(2)_COMPRESS_EXT = .lzo