Commit 13510997d600a076e064f10587a8f6d20f8fff41

Authored by Albin Tonnerre
Committed by Linus Torvalds
1 parent e7db7b4270

x86: add support for LZO-compressed kernels

The necessary changes to the x86 Kconfig and boot/compressed to allow the
use of this new compression method

Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Tested-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Russell King <rmk@arm.linux.org.uk>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 3 changed files with 9 additions and 1 deletions Side-by-side Diff

... ... @@ -49,6 +49,7 @@
49 49 select HAVE_KERNEL_GZIP
50 50 select HAVE_KERNEL_BZIP2
51 51 select HAVE_KERNEL_LZMA
  52 + select HAVE_KERNEL_LZO
52 53 select HAVE_HW_BREAKPOINT
53 54 select PERF_EVENTS
54 55 select ANON_INODES
arch/x86/boot/compressed/Makefile
... ... @@ -4,7 +4,7 @@
4 4 # create a compressed vmlinux image from the original vmlinux
5 5 #
6 6  
7   -targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o
  7 +targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.lzo head_$(BITS).o misc.o piggy.o
8 8  
9 9 KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
10 10 KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
11 11  
... ... @@ -49,10 +49,13 @@
49 49 $(call if_changed,bzip2)
50 50 $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
51 51 $(call if_changed,lzma)
  52 +$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE
  53 + $(call if_changed,lzo)
52 54  
53 55 suffix-$(CONFIG_KERNEL_GZIP) := gz
54 56 suffix-$(CONFIG_KERNEL_BZIP2) := bz2
55 57 suffix-$(CONFIG_KERNEL_LZMA) := lzma
  58 +suffix-$(CONFIG_KERNEL_LZO) := lzo
56 59  
57 60 quiet_cmd_mkpiggy = MKPIGGY $@
58 61 cmd_mkpiggy = $(obj)/mkpiggy $< > $@ || ( rm -f $@ ; false )
arch/x86/boot/compressed/misc.c
... ... @@ -162,6 +162,10 @@
162 162 #include "../../../../lib/decompress_unlzma.c"
163 163 #endif
164 164  
  165 +#ifdef CONFIG_KERNEL_LZO
  166 +#include "../../../../lib/decompress_unlzo.c"
  167 +#endif
  168 +
165 169 static void scroll(void)
166 170 {
167 171 int i;