| 1 | From d0f226a0f104c7d1da1d215b8013359273e39e18 Mon Sep 17 00:00:00 2001 |
| 2 | From: Albin Tonnerre <albin.tonnerre@free-electrons.com> |
| 3 | Date: Fri, 16 Oct 2009 16:17:22 +0200 |
| 4 | Subject: [PATCH] Add LZMA decompression on ARM |
| 5 | |
| 6 | |
| 7 | Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com> |
| 8 | --- |
| 9 | arch/arm/Kconfig | 1 + |
| 10 | arch/arm/boot/compressed/Makefile | 1 + |
| 11 | arch/arm/boot/compressed/misc.c | 4 ++++ |
| 12 | arch/arm/boot/compressed/piggy.lzma.S | 6 ++++++ |
| 13 | 4 files changed, 12 insertions(+), 0 deletions(-) |
| 14 | create mode 100644 arch/arm/boot/compressed/piggy.lzma.S |
| 15 | |
| 16 | --- a/arch/arm/Kconfig |
| 17 | +++ b/arch/arm/Kconfig |
| 18 | @@ -20,6 +20,7 @@ config ARM |
| 19 | select HAVE_GENERIC_DMA_COHERENT |
| 20 | select HAVE_KERNEL_GZIP |
| 21 | select HAVE_KERNEL_LZO |
| 22 | + select HAVE_KERNEL_LZMA |
| 23 | help |
| 24 | The ARM series is a line of low-power-consumption RISC chip designs |
| 25 | licensed by ARM Ltd and targeted at embedded applications and |
| 26 | --- a/arch/arm/boot/compressed/Makefile |
| 27 | +++ b/arch/arm/boot/compressed/Makefile |
| 28 | @@ -65,6 +65,7 @@ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/ |
| 29 | |
| 30 | suffix_$(CONFIG_KERNEL_GZIP) = gzip |
| 31 | suffix_$(CONFIG_KERNEL_LZO) = lzo |
| 32 | +suffix_$(CONFIG_KERNEL_LZMA) = lzma |
| 33 | |
| 34 | targets := vmlinux vmlinux.lds \ |
| 35 | piggy.$(suffix_y) piggy.$(suffix_y).o \ |
| 36 | --- a/arch/arm/boot/compressed/misc.c |
| 37 | +++ b/arch/arm/boot/compressed/misc.c |
| 38 | @@ -237,6 +237,10 @@ static unsigned long free_mem_end_ptr; |
| 39 | #include "../../../../lib/decompress_inflate.c" |
| 40 | #endif |
| 41 | |
| 42 | +#ifdef CONFIG_KERNEL_LZMA |
| 43 | +#include "../../../../lib/decompress_unlzma.c" |
| 44 | +#endif |
| 45 | + |
| 46 | #ifdef CONFIG_KERNEL_LZO |
| 47 | #include "../../../../lib/decompress_unlzo.c" |
| 48 | #endif |
| 49 | --- /dev/null |
| 50 | +++ b/arch/arm/boot/compressed/piggy.lzma.S |
| 51 | @@ -0,0 +1,6 @@ |
| 52 | + .section .piggydata,#alloc |
| 53 | + .globl input_data |
| 54 | +input_data: |
| 55 | + .incbin "arch/arm/boot/compressed/piggy.lzma" |
| 56 | + .globl input_data_end |
| 57 | +input_data_end: |
| 58 | |