diff options
| author | Kyungsik Lee <kyungsik.lee@lge.com> | 2013-07-08 19:01:48 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-09 13:33:30 -0400 |
| commit | f9b493ac9b833fd9dd3bbd50460adb33f29e1238 (patch) | |
| tree | da0a287ecbfe40796443a4209bb4e4261d6b84ea /arch/arm/boot/compressed | |
| parent | e76e1fdfa8f8dc1ea6699923cf5d92b5bee9c936 (diff) | |
arm: add support for LZ4-compressed kernel
Integrates the LZ4 decompression code to the arm pre-boot code.
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>
Diffstat (limited to 'arch/arm/boot/compressed')
| -rw-r--r-- | arch/arm/boot/compressed/.gitignore | 1 | ||||
| -rw-r--r-- | arch/arm/boot/compressed/Makefile | 3 | ||||
| -rw-r--r-- | arch/arm/boot/compressed/decompress.c | 4 | ||||
| -rw-r--r-- | arch/arm/boot/compressed/piggy.lz4.S | 6 |
4 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/boot/compressed/.gitignore b/arch/arm/boot/compressed/.gitignore index f79a08efe000..47279aa96a6a 100644 --- a/arch/arm/boot/compressed/.gitignore +++ b/arch/arm/boot/compressed/.gitignore | |||
| @@ -6,6 +6,7 @@ piggy.gzip | |||
| 6 | piggy.lzo | 6 | piggy.lzo |
| 7 | piggy.lzma | 7 | piggy.lzma |
| 8 | piggy.xzkern | 8 | piggy.xzkern |
| 9 | piggy.lz4 | ||
| 9 | vmlinux | 10 | vmlinux |
| 10 | vmlinux.lds | 11 | vmlinux.lds |
| 11 | 12 | ||
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 48d0a44270bd..7ac1610252ba 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
| @@ -91,6 +91,7 @@ suffix_$(CONFIG_KERNEL_GZIP) = gzip | |||
| 91 | suffix_$(CONFIG_KERNEL_LZO) = lzo | 91 | suffix_$(CONFIG_KERNEL_LZO) = lzo |
| 92 | suffix_$(CONFIG_KERNEL_LZMA) = lzma | 92 | suffix_$(CONFIG_KERNEL_LZMA) = lzma |
| 93 | suffix_$(CONFIG_KERNEL_XZ) = xzkern | 93 | suffix_$(CONFIG_KERNEL_XZ) = xzkern |
| 94 | suffix_$(CONFIG_KERNEL_LZ4) = lz4 | ||
| 94 | 95 | ||
| 95 | # Borrowed libfdt files for the ATAG compatibility mode | 96 | # Borrowed libfdt files for the ATAG compatibility mode |
| 96 | 97 | ||
| @@ -115,7 +116,7 @@ targets := vmlinux vmlinux.lds \ | |||
| 115 | font.o font.c head.o misc.o $(OBJS) | 116 | font.o font.c head.o misc.o $(OBJS) |
| 116 | 117 | ||
| 117 | # Make sure files are removed during clean | 118 | # Make sure files are removed during clean |
| 118 | extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern \ | 119 | extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \ |
| 119 | lib1funcs.S ashldi3.S $(libfdt) $(libfdt_hdrs) \ | 120 | lib1funcs.S ashldi3.S $(libfdt) $(libfdt_hdrs) \ |
| 120 | hyp-stub.S | 121 | hyp-stub.S |
| 121 | 122 | ||
diff --git a/arch/arm/boot/compressed/decompress.c b/arch/arm/boot/compressed/decompress.c index 24b0475cb8bf..bd245d34952d 100644 --- a/arch/arm/boot/compressed/decompress.c +++ b/arch/arm/boot/compressed/decompress.c | |||
| @@ -51,6 +51,10 @@ extern char * strstr(const char * s1, const char *s2); | |||
| 51 | #include "../../../../lib/decompress_unxz.c" | 51 | #include "../../../../lib/decompress_unxz.c" |
| 52 | #endif | 52 | #endif |
| 53 | 53 | ||
| 54 | #ifdef CONFIG_KERNEL_LZ4 | ||
| 55 | #include "../../../../lib/decompress_unlz4.c" | ||
| 56 | #endif | ||
| 57 | |||
| 54 | int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)) | 58 | int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)) |
| 55 | { | 59 | { |
| 56 | return decompress(input, len, NULL, NULL, output, NULL, error); | 60 | return decompress(input, len, NULL, NULL, output, NULL, error); |
diff --git a/arch/arm/boot/compressed/piggy.lz4.S b/arch/arm/boot/compressed/piggy.lz4.S new file mode 100644 index 000000000000..3d9a575618a3 --- /dev/null +++ b/arch/arm/boot/compressed/piggy.lz4.S | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | .section .piggydata,#alloc | ||
| 2 | .globl input_data | ||
| 3 | input_data: | ||
| 4 | .incbin "arch/arm/boot/compressed/piggy.lz4" | ||
| 5 | .globl input_data_end | ||
| 6 | input_data_end: | ||
