aboutsummaryrefslogtreecommitdiffstats
path: root/lib/decompress.c
diff options
context:
space:
mode:
authorKyungsik Lee <kyungsik.lee@lge.com>2013-07-08 16:01:46 -0700
committerSimon Shields <keepcalm444@gmail.com>2016-06-12 21:20:10 +1000
commitae59e751939d817c5dea1f07981d4b19c30c3a04 (patch)
tree33ba16eeef78e5b71faff97aa3d841ec63d5619a /lib/decompress.c
parent3948a0f192249f3cb564a1b5010b4089cc685bee (diff)
downloadkernel_samsung_smdk4412-ae59e751939d817c5dea1f07981d4b19c30c3a04.zip
kernel_samsung_smdk4412-ae59e751939d817c5dea1f07981d4b19c30c3a04.tar.gz
kernel_samsung_smdk4412-ae59e751939d817c5dea1f07981d4b19c30c3a04.tar.bz2
lib: add support for LZ4-compressed kernel
Add support for extracting LZ4-compressed kernel images, as well as LZ4-compressed ramdisk images in the kernel boot process. Signed-off-by: Kyungsik Lee <kyungsik.lee@lge.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Borislav Petkov <bp@alien8.de> Cc: Florian Fainelli <florian@openwrt.org> Cc: Yann Collet <yann.collet.73@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Conflicts: scripts/Makefile.lib Change-Id: I2ad2607d9edf0f41c7e7a621f1da72174b142e2d
Diffstat (limited to 'lib/decompress.c')
-rw-r--r--lib/decompress.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/decompress.c b/lib/decompress.c
index 3d766b7..fc3f2dd 100644
--- a/lib/decompress.c
+++ b/lib/decompress.c
@@ -11,6 +11,7 @@
#include <linux/decompress/unxz.h>
#include <linux/decompress/inflate.h>
#include <linux/decompress/unlzo.h>
+#include <linux/decompress/unlz4.h>
#include <linux/types.h>
#include <linux/string.h>
@@ -30,6 +31,9 @@
#ifndef CONFIG_DECOMPRESS_LZO
# define unlzo NULL
#endif
+#ifndef CONFIG_DECOMPRESS_LZ4
+# define unlz4 NULL
+#endif
static const struct compress_format {
unsigned char magic[2];
@@ -42,6 +46,7 @@ static const struct compress_format {
{ {0x5d, 0x00}, "lzma", unlzma },
{ {0xfd, 0x37}, "xz", unxz },
{ {0x89, 0x4c}, "lzo", unlzo },
+ { {0x02, 0x21}, "lz4", unlz4 },
{ {0, 0}, NULL, NULL }
};