linux-mips
[Top] [All Lists]

[PATCH v1] MIPS: Add support of LZO-compressed kernels

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH v1] MIPS: Add support of LZO-compressed kernels
From: Wu Zhangjin <wuzhangjin@gmail.com>
Date: Fri, 15 Jan 2010 20:34:46 +0800
Cc: linux-mips@linux-mips.org, Sergei Shtylyov <sshtylyov@ru.mvista.com>, Wu Zhangjin <wuzhangjin@gmail.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=3QMDt3hs/4A82/HXXzPeVFUW8Ig3GbXsMsg03TodJGk=; b=KzyvCh1kjhG4lpJvFDcdOawBGpcSzZcAEuzLx4K00S7z8A5Ta1qrUysE+RXclbYhO9 d9V78e55GE9dCul5JMyP86Cd33oULpsDOBe66pROq9NDVU0d3REaaKA4vhKcb0oUZMOL b0XtHEvrPDdFD8GCSDllo/tJhh2mKFrXo1p3Q=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=kUiYxBnhGU6wc3VPH4r4lfQlrP0zoomz1SdlzUqCsMeDY50HIg3gome6jq5ssPhBgV kHaisFdT4nfKdfFq6qOR3dMWq2iz5BiIYDvlL85WI7F49kfyPDstvW+cfgqqNRsygnaJ rTu+lStJT22LKpQpIpM3M9btwTilqeNwWAByw=
Sender: linux-mips-bounce@linux-mips.org
(Changes from v0: 'align "lzo" with the rest of the suffixes/tool names' as
 Sergei suggested.)

The commit "lib: add support for LZO-compressed kernels" has been merged
into linus' 2.6.33-rc4 tree, so, It is time to add the support for MIPS.

NOTE: to enable this support, the lzop application is needed.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
---
 arch/mips/Kconfig                      |    1 +
 arch/mips/boot/compressed/Makefile     |    2 ++
 arch/mips/boot/compressed/decompress.c |    4 ++++
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 9541171..8b5d174 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1311,6 +1311,7 @@ config SYS_SUPPORTS_ZBOOT
        select HAVE_KERNEL_GZIP
        select HAVE_KERNEL_BZIP2
        select HAVE_KERNEL_LZMA
+       select HAVE_KERNEL_LZO
 
 config SYS_SUPPORTS_ZBOOT_UART16550
        bool
diff --git a/arch/mips/boot/compressed/Makefile 
b/arch/mips/boot/compressed/Makefile
index 671d344..bdcfd49 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -41,9 +41,11 @@ $(obj)/vmlinux.bin: $(KBUILD_IMAGE)
 suffix_$(CONFIG_KERNEL_GZIP)  = gz
 suffix_$(CONFIG_KERNEL_BZIP2) = bz2
 suffix_$(CONFIG_KERNEL_LZMA)  = lzma
+suffix_$(CONFIG_KERNEL_LZO)   = lzo
 tool_$(CONFIG_KERNEL_GZIP)    = gzip
 tool_$(CONFIG_KERNEL_BZIP2)   = bzip2
 tool_$(CONFIG_KERNEL_LZMA)    = lzma
+tool_$(CONFIG_KERNEL_LZO)     = lzo
 $(obj)/vmlinux.$(suffix_y): $(obj)/vmlinux.bin
        $(call if_changed,$(tool_y))
 
diff --git a/arch/mips/boot/compressed/decompress.c 
b/arch/mips/boot/compressed/decompress.c
index e48fd72..55d02b3 100644
--- a/arch/mips/boot/compressed/decompress.c
+++ b/arch/mips/boot/compressed/decompress.c
@@ -77,6 +77,10 @@ void *memset(void *s, int c, size_t n)
 #include "../../../../lib/decompress_unlzma.c"
 #endif
 
+#ifdef CONFIG_KERNEL_LZO
+#include "../../../../lib/decompress_unlzo.c"
+#endif
+
 void decompress_kernel(unsigned long boot_heap_start)
 {
        int zimage_size;
-- 
1.6.5.6


<Prev in Thread] Current Thread [Next in Thread>