Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 6026/1: ARM: Add support for LZMA-compressed kernel images

This patch allows using a kernel image compressed with LZMA on ARM.
Extracting the image is fairly slow, but it might be useful on machines
with a very limited amount of storage, as the size benefit is quite
significant (about 25% smaller with LZMA compared to GZIP)

Tested-by: Martin Michlmayr <tbm@cyrius.com>
Tested-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Albin Tonnerre and committed by
Russell King
6e8699f7 5cfc8ee0

+12
+1
arch/arm/Kconfig
··· 21 21 select HAVE_GENERIC_DMA_COHERENT 22 22 select HAVE_KERNEL_GZIP 23 23 select HAVE_KERNEL_LZO 24 + select HAVE_KERNEL_LZMA 24 25 select HAVE_PERF_EVENTS 25 26 select PERF_USE_VMALLOC 26 27 help
+1
arch/arm/boot/compressed/Makefile
··· 65 65 66 66 suffix_$(CONFIG_KERNEL_GZIP) = gzip 67 67 suffix_$(CONFIG_KERNEL_LZO) = lzo 68 + suffix_$(CONFIG_KERNEL_LZMA) = lzma 68 69 69 70 targets := vmlinux vmlinux.lds \ 70 71 piggy.$(suffix_y) piggy.$(suffix_y).o \
+4
arch/arm/boot/compressed/decompress.c
··· 40 40 #include "../../../../lib/decompress_unlzo.c" 41 41 #endif 42 42 43 + #ifdef CONFIG_KERNEL_LZMA 44 + #include "../../../../lib/decompress_unlzma.c" 45 + #endif 46 + 43 47 void do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)) 44 48 { 45 49 decompress(input, len, NULL, NULL, output, NULL, error);
+6
arch/arm/boot/compressed/piggy.lzma.S
··· 1 + .section .piggydata,#alloc 2 + .globl input_data 3 + input_data: 4 + .incbin "arch/arm/boot/compressed/piggy.lzma" 5 + .globl input_data_end 6 + input_data_end: