From: Kyungsik Lee <kyungsik.lee@lge.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Russell King <linux@arm.linux.org.uk>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Michal Marek <mmarek@suse.cz>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
x86@kernel.org, celinux-dev@lists.celinuxforum.org
Cc: Nicolas Pitre <nico@fluxnic.net>,
Nitin Gupta <nitingupta910@gmail.com>,
"Markus F.X.J. Oberhumer" <markus@oberhumer.com>,
Richard Purdie <rpurdie@openedhand.com>,
Josh Triplett <josh@joshtriplett.org>,
Joe Millenbach <jmillenbach@gmail.com>,
David Sterba <dsterba@suse.cz>,
Richard Cochran <richardcochran@gmail.com>,
Albin Tonnerre <albin.tonnerre@free-electrons.com>,
Egon Alter <egon.alter@gmx.net>,
hyojun.im@lge.com, chan.jeong@lge.com,
raphael.andy.lee@gmail.com, Kyungsik Lee <kyungsik.lee@lge.com>
Subject: [RFC PATCH v2 3/4] arm: Add support for LZ4-compressed kernel
Date: Tue, 26 Feb 2013 15:24:29 +0900 [thread overview]
Message-ID: <1361859870-15751-4-git-send-email-kyungsik.lee@lge.com> (raw)
In-Reply-To: <1361859870-15751-1-git-send-email-kyungsik.lee@lge.com>
This patch integrates the LZ4 decompression code to the arm pre-boot code.
And it depends on two patchs below
lib: Add support for LZ4-compressed kernel
decompressor: Add LZ4 decompressor module
Signed-off-by: Kyungsik Lee <kyungsik.lee@lge.com>
v2:
- Apply CFLAGS, -Os to decompress.o to improve decompress
performance during boot-up process
---
arch/arm/Kconfig | 1 +
arch/arm/boot/compressed/.gitignore | 1 +
arch/arm/boot/compressed/Makefile | 6 +++++-
arch/arm/boot/compressed/decompress.c | 4 ++++
arch/arm/boot/compressed/piggy.lz4.S | 6 ++++++
5 files changed, 17 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/boot/compressed/piggy.lz4.S
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 67874b8..0f9b363 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -38,6 +38,7 @@ config ARM
select HAVE_IDE if PCI || ISA || PCMCIA
select HAVE_IRQ_WORK
select HAVE_KERNEL_GZIP
+ select HAVE_KERNEL_LZ4
select HAVE_KERNEL_LZMA
select HAVE_KERNEL_LZO
select HAVE_KERNEL_XZ
diff --git a/arch/arm/boot/compressed/.gitignore b/arch/arm/boot/compressed/.gitignore
index f79a08e..47279aa 100644
--- a/arch/arm/boot/compressed/.gitignore
+++ b/arch/arm/boot/compressed/.gitignore
@@ -6,6 +6,7 @@ piggy.gzip
piggy.lzo
piggy.lzma
piggy.xzkern
+piggy.lz4
vmlinux
vmlinux.lds
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 5cad8a6..2249d52 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -24,6 +24,9 @@ endif
AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET)
HEAD = head.o
OBJS += misc.o decompress.o
+ifeq ($(CONFIG_KERNEL_LZ4),y)
+CFLAGS_decompress.o := -Os
+endif
FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c
# string library code (-Os is enforced to keep it much smaller)
@@ -88,6 +91,7 @@ suffix_$(CONFIG_KERNEL_GZIP) = gzip
suffix_$(CONFIG_KERNEL_LZO) = lzo
suffix_$(CONFIG_KERNEL_LZMA) = lzma
suffix_$(CONFIG_KERNEL_XZ) = xzkern
+suffix_$(CONFIG_KERNEL_LZ4) = lz4
# Borrowed libfdt files for the ATAG compatibility mode
@@ -112,7 +116,7 @@ targets := vmlinux vmlinux.lds \
font.o font.c head.o misc.o $(OBJS)
# Make sure files are removed during clean
-extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern \
+extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \
lib1funcs.S ashldi3.S $(libfdt) $(libfdt_hdrs)
ifeq ($(CONFIG_FUNCTION_TRACER),y)
diff --git a/arch/arm/boot/compressed/decompress.c b/arch/arm/boot/compressed/decompress.c
index 9deb56a..a95f071 100644
--- a/arch/arm/boot/compressed/decompress.c
+++ b/arch/arm/boot/compressed/decompress.c
@@ -53,6 +53,10 @@ extern char * strstr(const char * s1, const char *s2);
#include "../../../../lib/decompress_unxz.c"
#endif
+#ifdef CONFIG_KERNEL_LZ4
+#include "../../../../lib/decompress_unlz4.c"
+#endif
+
int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
{
return decompress(input, len, NULL, NULL, output, NULL, error);
diff --git a/arch/arm/boot/compressed/piggy.lz4.S b/arch/arm/boot/compressed/piggy.lz4.S
new file mode 100644
index 0000000..3d9a575
--- /dev/null
+++ b/arch/arm/boot/compressed/piggy.lz4.S
@@ -0,0 +1,6 @@
+ .section .piggydata,#alloc
+ .globl input_data
+input_data:
+ .incbin "arch/arm/boot/compressed/piggy.lz4"
+ .globl input_data_end
+input_data_end:
--
1.8.1.1
next prev parent reply other threads:[~2013-02-26 6:25 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-26 6:24 [RFC PATCH v2 0/4] Add support for LZ4-compressed kernel Kyungsik Lee
2013-02-26 6:24 ` [RFC PATCH v2 1/4] decompressor: Add LZ4 decompressor module Kyungsik Lee
2013-02-26 13:12 ` David Sterba
2013-02-27 4:38 ` Kyungsik Lee
2013-02-26 6:24 ` [RFC PATCH v2 2/4] lib: Add support for LZ4-compressed kernel Kyungsik Lee
2013-02-26 14:00 ` David Sterba
2013-02-28 5:22 ` Kyungsik Lee
2013-02-26 6:24 ` Kyungsik Lee [this message]
2013-02-26 6:24 ` [RFC PATCH v2 4/4] x86: " Kyungsik Lee
2013-02-26 20:33 ` [RFC PATCH v2 0/4] " Markus F.X.J. Oberhumer
2013-02-26 20:59 ` Nicolas Pitre
2013-02-26 21:58 ` Peter Korsgaard
2013-02-26 22:09 ` Nicolas Pitre
2013-02-26 22:10 ` Russell King - ARM Linux
2013-02-27 1:40 ` Joe Perches
2013-02-27 9:56 ` Russell King - ARM Linux
2013-02-27 15:49 ` Joe Perches
2013-02-27 16:08 ` Nicolas Pitre
2013-02-27 16:31 ` Russell King - ARM Linux
2013-02-27 16:53 ` Borislav Petkov
2013-02-27 17:04 ` Joe Perches
2013-02-27 17:16 ` Nicolas Pitre
2013-02-27 17:39 ` Joe Perches
2013-02-27 17:52 ` Nicolas Pitre
2013-02-27 17:57 ` Russell King - ARM Linux
2013-02-27 17:36 ` Russell King - ARM Linux
2013-02-28 4:22 ` Joe Perches
2013-02-27 7:36 ` Kyungsik Lee
2013-02-27 9:51 ` Russell King - ARM Linux
2013-02-27 10:20 ` Johannes Stezenbach
2013-02-27 15:35 ` Nicolas Pitre
2013-02-27 13:23 ` Kyungsik Lee
2013-02-27 22:21 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1361859870-15751-4-git-send-email-kyungsik.lee@lge.com \
--to=kyungsik.lee@lge.com \
--cc=akpm@linux-foundation.org \
--cc=albin.tonnerre@free-electrons.com \
--cc=celinux-dev@lists.celinuxforum.org \
--cc=chan.jeong@lge.com \
--cc=dsterba@suse.cz \
--cc=egon.alter@gmx.net \
--cc=hpa@zytor.com \
--cc=hyojun.im@lge.com \
--cc=jmillenbach@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=markus@oberhumer.com \
--cc=mingo@redhat.com \
--cc=mmarek@suse.cz \
--cc=nico@fluxnic.net \
--cc=nitingupta910@gmail.com \
--cc=raphael.andy.lee@gmail.com \
--cc=richardcochran@gmail.com \
--cc=rpurdie@openedhand.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).