ARM: Add support for LZMA-compressed kernel images
PATCH 1/1 ARM: Add support for LZMA-compressed kernel images
This patch allows using a kernel image compressed with LZMA on ARM, using the support for multiple decompressors introduced in the LZO support patch.
Extracting the image is fairly slow, but it might be useful on machines with a very limited amount of storage.
--- arch/arm/Kconfig | 1 + arch/arm/boot/compressed/Makefile | 1 + arch/arm/boot/compressed/misc.c | 4 ++++ arch/arm/boot/compressed/piggy.lzma.S | 6 ++++++ 4 files changed, 12 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boot/compressed/piggy.lzma.S
arch/arm/Kconfig +1 -0
@@ -20,6 +20,7 @@ config ARM select HAVE_GENERIC_DMA_COHERENT select HAVE_KERNEL_GZIP select HAVE_KERNEL_LZO + select HAVE_KERNEL_LZMA help The ARM series is a line of low-power-consumption RISC chip designs licensed by ARM Ltd and targeted at embedded applications and
arch/arm/boot/compressed/Makefile +1 -0
@@ -65,6 +65,7 @@ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ suffix_$(CONFIG_KERNEL_GZIP) = gzip suffix_$(CONFIG_KERNEL_LZO) = lzo +suffix_$(CONFIG_KERNEL_LZMA) = lzma targets := vmlinux vmlinux.lds \ piggy.$(suffix_y) piggy.$(suffix_y).o \
arch/arm/boot/compressed/misc.c +4 -0
@@ -237,6 +237,10 @@ static unsigned long free_mem_end_ptr;#include "../../../../lib/decompress_inflate.c" #endif +#ifdef CONFIG_KERNEL_LZMA +#include "../../../../lib/decompress_unlzma.c" +#endif +#ifdef CONFIG_KERNEL_LZO #include "../../../../lib/decompress_unlzo.c" #endif
arch/arm/boot/compressed/piggy.lzma.S new file +6 -0
@@ -0,0 +1,6 @@ + .section .piggydata,#alloc + .globl input_data +input_data: + .incbin "arch/arm/boot/compressed/piggy.lzma" + .globl input_data_end +input_data_end:
Signature · 1 line
1.6.3.3
Quoted 5 lines · Albin Tonnerre
This patch allows using a kernel image compressed with LZMA on ARM, using the support for multiple decompressors introduced in the LZO support patch.
Extracting the image is fairly slow, but it might be useful on machines with a very limited amount of storage.
I didn't see a response to my previous message about the LZO patch set. Do you want me to queue up the patch set for the next merge window?
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
Quoted 9 lines · Russell King
Quoted 5 lines · Albin Tonnerre
This patch allows using a kernel image compressed with LZMA on ARM, using the support for multiple decompressors introduced in the LZO support patch.
Extracting the image is fairly slow, but it might be useful on machines with a very limited amount of storage.I didn't see a response to my previous message about the LZO patch set. Do you want me to queue up the patch set for the next merge window?
Oh, sorry, I must have missed it. I would indeed appreciate this, thank you very much.
Regards,
Signature · 4 lines
Albin Tonnerre, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com
Quoted 8 lines · Albin Tonnerre
Quoted 7 lines · Russell King
Quoted 5 lines · Albin Tonnerre
This patch allows using a kernel image compressed with LZMA on ARM, using the support for multiple decompressors introduced in the LZO support patch.
Extracting the image is fairly slow, but it might be useful on machines with a very limited amount of storage.
Quoted 5 lines
Quoted 2 lines
I didn't see a response to my previous message about the LZO patch set. Do you want me to queue up the patch set for the next merge window?
Oh, sorry, I must have missed it. I would indeed appreciate this, thank you very much.
Okay, the next question which needs to be asked of the wider audience is:
Since some of the patch set is not specific to ARM, does anyone have any objection to me pushing all four patches for the next merge window?
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
Quoted 12 lines · Russell King
Quoted 11 lines · Albin Tonnerre
Quoted 9 lines · Russell King
Quoted 5 lines · Albin Tonnerre
This patch allows using a kernel image compressed with LZMA on ARM, using the support for multiple decompressors introduced in the LZO support patch.
Extracting the image is fairly slow, but it might be useful on machines with a very limited amount of storage.I didn't see a response to my previous message about the LZO patch set. Do you want me to queue up the patch set for the next merge window?
Quoted 7 lines
Quoted 2 lines
Oh, sorry, I must have missed it. I would indeed appreciate this, thank you very much.
Okay, the next question which needs to be asked of the wider audience is:
Since some of the patch set is not specific to ARM, does anyone have any objection to me pushing all four patches for the next merge window?
As there are no objections, are you still willing to push this series for this merge window?
Regards,
Signature · 4 lines
Albin Tonnerre, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH v2 1/1 ARM: Add support for LZMA-compressed kernel images
In reply to Albin TonnerreThis 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:
Gzip: Data Size: 1586352 Bytes = 1549.17 kB = 1.51 MB
LZMA: Data Size: 2135916 Bytes = 2085.86 kB = 2.04 MB
---
v2: Updated to apply on top of 2.6.34-rc1
arch/arm/Kconfig | 1 + arch/arm/boot/compressed/Makefile | 1 + arch/arm/boot/compressed/decompress.c | 4 ++++ arch/arm/boot/compressed/piggy.lzma.S | 6 ++++++ 4 files changed, 12 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boot/compressed/piggy.lzma.S
arch/arm/Kconfig +1 -0
@@ -21,6 +21,7 @@ config ARM select HAVE_GENERIC_DMA_COHERENT select HAVE_KERNEL_GZIP select HAVE_KERNEL_LZO + select HAVE_KERNEL_LZMA select HAVE_PERF_EVENTS select PERF_USE_VMALLOC help
arch/arm/boot/compressed/Makefile +1 -0
@@ -65,6 +65,7 @@ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ suffix_$(CONFIG_KERNEL_GZIP) = gzip suffix_$(CONFIG_KERNEL_LZO) = lzo +suffix_$(CONFIG_KERNEL_LZMA) = lzma targets := vmlinux vmlinux.lds \ piggy.$(suffix_y) piggy.$(suffix_y).o \
arch/arm/boot/compressed/decompress.c +4 -0
@@ -39,6 +39,10 @@ extern void error(char *);#include "../../../../lib/decompress_unlzo.c" #endif +#ifdef CONFIG_KERNEL_LZMA +#include "../../../../lib/decompress_unlzma.c" +#endif +void do_decompress (u8 *input,int len,u8 *output,void (*error)(char *x)) {decompress (input, len,NULL ,NULL , output,NULL , error);
arch/arm/boot/compressed/piggy.lzma.S new file +6 -0
@@ -0,0 +1,6 @@ + .section .piggydata,#alloc + .globl input_data +input_data: + .incbin "arch/arm/boot/compressed/piggy.lzma" + .globl input_data_end +input_data_end:
Signature · 1 line
1.7.0
PATCH v2 1/1 ARM: Add support for LZMA-compressed kernel images
Quoted 6 lines · Albin Tonnerre
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:
Gzip: Data Size: 1586352 Bytes = 1549.17 kB = 1.51 MB
LZMA: Data Size: 2135916 Bytes = 2085.86 kB = 2.04 MB
Meh. That should of course be:
LZMA ... 1.51MB
Gzip ... 2.04MB
Signature · 4 lines
Albin Tonnerre, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH v2 1/1 ARM: Add support for LZMA-compressed kernel images
In reply to Albin TonnerreQuoted 9 lines · Albin Tonnerre
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:
Gzip: Data Size: 1586352 Bytes = 1549.17 kB = 1.51 MB
LZMA: Data Size: 2135916 Bytes = 2085.86 kB = 2.04 MBSigned-off-by Albin Tonnerre<[email protected]>Tested-by Martin Michlmayr<[email protected]>
You can add
I think you should submit this patch to Russell's patch system.
Quoted 61 lines
---
v2: Updated to apply on top of 2.6.34-rc1arch/arm/Kconfig | 1 + arch/arm/boot/compressed/Makefile | 1 + arch/arm/boot/compressed/decompress.c | 4 ++++ arch/arm/boot/compressed/piggy.lzma.S | 6 ++++++ 4 files changed, 12 insertions(+), 0 deletions(-)create mode 100644
arch/arm/boot/compressed/piggy.lzma.Sarch/arm/Kconfig +1
-0@@ -21,6 +21,7 @@ config ARM select HAVE_GENERIC_DMA_COHERENT select HAVE_KERNEL_GZIP select HAVE_KERNEL_LZO + select HAVE_KERNEL_LZMA select HAVE_PERF_EVENTS select PERF_USE_VMALLOC helparch/arm/boot/compressed/Makefile +1
-0@@ -65,6 +65,7 @@ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ suffix_$(CONFIG_KERNEL_GZIP) = gzip suffix_$(CONFIG_KERNEL_LZO) = lzo +suffix_$(CONFIG_KERNEL_LZMA) = lzma targets := vmlinux vmlinux.lds \ piggy.$(suffix_y) piggy.$(suffix_y).o \arch/arm/boot/compressed/decompress.c +4
-0@@ -39,6 +39,10 @@ extern void error(char *);#include "../../../../lib/decompress_unlzo.c" #endif +#ifdef CONFIG_KERNEL_LZMA +#include "../../../../lib/decompress_unlzma.c" +#endif +void do_decompress (u8 *input,int len,u8 *output,void (*error)(char *x)) {decompress (input, len,NULL ,NULL , output,NULL , error);arch/arm/boot/compressed/piggy.lzma.S new file +6
-0@@ -0,0 +1,6 @@ + .section .piggydata,#alloc + .globl input_data +input_data: + .incbin "arch/arm/boot/compressed/piggy.lzma" + .globl input_data_end +input_data_end:
PATCH v2 1/1 ARM: Add support for LZMA-compressed kernel images
Quoted 81 lines · Paulius Zaleckas
Quoted 10 lines · Albin Tonnerre
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:
Gzip: Data Size: ? ?1586352 Bytes = 1549.17 kB = 1.51 MB
LZMA: Data Size: ? ?2135916 Bytes = 2085.86 kB = 2.04 MBSigned-off-by Albin Tonnerre<[email protected]>Tested-by Martin Michlmayr<[email protected]>You can add
Tested-by Paulius Zaleckas <[email protected]>I think you should submit this patch to Russell's patch system.
Quoted 64 lines
---
v2: Updated to apply on top of 2.6.34-rc1?arch/arm/Kconfig ? ? ? ? ? ? ? ? ? ? ?| ? ?1 + ?arch/arm/boot/compressed/Makefile ? ? | ? ?1 + ?arch/arm/boot/compressed/decompress.c | ? ?4 ++++ ?arch/arm/boot/compressed/piggy.lzma.S | ? ?6 ++++++?4 files changed, 12 insertions(+), 0 deletions(-) ?create mode 100644
arch/arm/boot/compressed/piggy.lzma.Sarch/arm/Kconfig +0
-0@@ -21,6 +21,7 @@ config ARM? ? ? ?select
HAVE_GENERIC_DMA_COHERENT
? ? ? ?selectHAVE_KERNEL_GZIP
? ? ? ?selectHAVE_KERNEL_LZO
+ ? ? ? selectHAVE_KERNEL_LZMA
? ? ? ?selectHAVE_PERF_EVENTS
? ? ? ?selectPERF_USE_VMALLOC
? ? ? ?helparch/arm/boot/compressed/Makefile +0
-0@@ -65,6 +65,7 @@ SEDFLAGS ? ? ?=s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
?suffix_$(CONFIG_KERNEL_GZIP) = gzip
?suffix_$(CONFIG_KERNEL_LZO) ?= lzo
+suffix_$(CONFIG_KERNEL_LZMA) = lzma?targets ? ? ? := vmlinux
vmlinux.lds\
? ? ? ? ? ? ? ? piggy.$(suffix_y) piggy.$(suffix_y).o \arch/arm/boot/compressed/decompress.c +0
-0@@ -39,6 +39,10 @@ extern void error(char *);?#include "
../../../../lib/decompress_unlzo.c"
?#endifarch/arm/boot/compressed/decompress.c +4
-0+#ifdef CONFIG_KERNEL_LZMA +#include "../../../../lib/decompress_unlzma.c" +#endif +?void
do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
?{
? ? ? ?decompress(input, len, NULL, NULL, output, NULL, error);arch/arm/boot/compressed/piggy.lzma.S new file +4
-0@@ -0,0 +1,6 @@ + ? ? ? .section .piggydata,#alloc + ? ? ? .globl ?input_data +input_data: + ? ? ? .incbin "arch/arm/boot/compressed/piggy.lzma"
Quoted 9 lines
arch/arm/boot/compressed/piggy.lzma.S line 6
Quoted 2 lines
arch/arm/boot/compressed/piggy.lzma.S new file +2
-0+ ? ? ? .globl ?input_data_end +input_data_end:_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Any reason to further delay the LZMA adoption?
It will not be the fastest decompressor, but gives the smallest kernel size. Tested on various Zaurus models (pxa255, pxa270, armv4).
Regards
Andrea Adami
P.S. Fixes to .gitignore would need to be added for lzma.
PATCH v2 1/1 ARM: Add support for LZMA-compressed kernel images
Quoted 3 lines · Andrea Adami
Any reason to further delay the LZMA adoption?
It will not be the fastest decompressor, but gives the smallest kernel size. Tested on various Zaurus models (pxa255, pxa270, armv4).
It's in the devel branch of Russell's tree already, so it should find its way to mainline :)
Regards,
Albin
PATCH v2 1/1 ARM: Add support for LZMA-compressed kernel images
Quoted 8 lines · Albin Tonnerre
Quoted 3 lines · Andrea Adami
Any reason to further delay the LZMA adoption?
It will not be the fastest decompressor, but gives the smallest kernel size. Tested on various Zaurus models (pxa255, pxa270, armv4).It's in the devel branch of Russell's tree already, so it should find its way to mainline :)
Tested on my zaurus, worked just out of the box. Thanks.
PATCH v2 1/1 ARM: Add support for LZMA-compressed kernel images
Quoted 11 lines · Eric Miao
Quoted 8 lines · Albin Tonnerre
Quoted 3 lines · Andrea Adami
Any reason to further delay the LZMA adoption?
It will not be the fastest decompressor, but gives the smallest kernel size. Tested on various Zaurus models (pxa255, pxa270, armv4).It's in the devel branch of Russell's tree already, so it should find its way to mainline :)
Tested on my zaurus, worked just out of the box. Thanks.
And tested on a couple of OMAP3 boards too. Works great. Thanks!
PATCH v2 1/1 ARM: Add support for LZMA-compressed kernel images
In reply to Andrea AdamiQuoted 1 line · Andrea Adami
Any reason to further delay the LZMA adoption?
Only due process; it'll be merged when the next merge window opens.