052-lzo_compressed_kernel_for_x86.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --- a/arch/x86/Kconfig
  2. +++ b/arch/x86/Kconfig
  3. @@ -49,6 +49,7 @@ config X86
  4. select HAVE_KERNEL_GZIP
  5. select HAVE_KERNEL_BZIP2
  6. select HAVE_KERNEL_LZMA
  7. + select HAVE_KERNEL_LZO
  8. select HAVE_ARCH_KMEMCHECK
  9. config OUTPUT_FORMAT
  10. --- a/arch/x86/boot/compressed/Makefile
  11. +++ b/arch/x86/boot/compressed/Makefile
  12. @@ -4,7 +4,7 @@
  13. # create a compressed vmlinux image from the original vmlinux
  14. #
  15. -targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o
  16. +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
  17. KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
  18. KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
  19. @@ -48,10 +48,13 @@ $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.al
  20. $(call if_changed,bzip2)
  21. $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
  22. $(call if_changed,lzma)
  23. +$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE
  24. + $(call if_changed,lzo)
  25. suffix-$(CONFIG_KERNEL_GZIP) := gz
  26. suffix-$(CONFIG_KERNEL_BZIP2) := bz2
  27. suffix-$(CONFIG_KERNEL_LZMA) := lzma
  28. +suffix-$(CONFIG_KERNEL_LZO) := lzo
  29. quiet_cmd_mkpiggy = MKPIGGY $@
  30. cmd_mkpiggy = $(obj)/mkpiggy $< > $@ || ( rm -f $@ ; false )
  31. --- a/arch/x86/boot/compressed/misc.c
  32. +++ b/arch/x86/boot/compressed/misc.c
  33. @@ -162,6 +162,10 @@ static int lines, cols;
  34. #include "../../../../lib/decompress_unlzma.c"
  35. #endif
  36. +#ifdef CONFIG_KERNEL_LZO
  37. +#include "../../../../lib/decompress_unlzo.c"
  38. +#endif
  39. +
  40. static void scroll(void)
  41. {
  42. int i;