* [PATCH] MIPS: ZBOOT: support LZ4 compression scheme
@ 2013-09-16 15:43 Florian Fainelli
2013-09-16 15:47 ` Gabor Juhos
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2013-09-16 15:43 UTC (permalink / raw)
To: linux-mips; +Cc: ralf, blogic, james.hogan, Florian Fainelli
Add support for the XZ compression scheme in the ZBOOT decompression
stub, in order to support it we need to:
- select the "lz4" compression tool to compress the vmlinux.bin
payload
- memcpy() is also required for decompress_unlz4.c so we share the
implementation between GZIP, XZ and now LZ4
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
Ralf, John,
This applied to the previous patch that I sent for XZ.
arch/mips/Kconfig | 1 +
arch/mips/boot/compressed/Makefile | 1 +
arch/mips/boot/compressed/decompress.c | 7 ++++++-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index a6ac9a9..ddf4fb0 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1492,6 +1492,7 @@ config SYS_SUPPORTS_ZBOOT
bool
select HAVE_KERNEL_GZIP
select HAVE_KERNEL_BZIP2
+ select HAVE_KERNEL_LZ4
select HAVE_KERNEL_LZMA
select HAVE_KERNEL_LZO
select HAVE_KERNEL_XZ
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index c1f8f07..ca0c343 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -48,6 +48,7 @@ $(obj)/vmlinux.bin: $(KBUILD_IMAGE) FORCE
tool_$(CONFIG_KERNEL_GZIP) = gzip
tool_$(CONFIG_KERNEL_BZIP2) = bzip2
+tool_$(CONFIG_KERNEL_LZ4) = lz4
tool_$(CONFIG_KERNEL_LZMA) = lzma
tool_$(CONFIG_KERNEL_LZO) = lzo
tool_$(CONFIG_KERNEL_XZ) = xzkern
diff --git a/arch/mips/boot/compressed/decompress.c b/arch/mips/boot/compressed/decompress.c
index cff7b7d..a8c6fd6 100644
--- a/arch/mips/boot/compressed/decompress.c
+++ b/arch/mips/boot/compressed/decompress.c
@@ -43,7 +43,8 @@ void error(char *x)
/* activate the code for pre-boot environment */
#define STATIC static
-#if defined(CONFIG_KERNEL_GZIP) || defined(CONFIG_KERNEL_XZ)
+#if defined(CONFIG_KERNEL_GZIP) || defined(CONFIG_KERNEL_XZ) || \
+ defined(CONFIG_KERNEL_LZ4)
void *memcpy(void *dest, const void *src, size_t n)
{
int i;
@@ -72,6 +73,10 @@ void *memset(void *s, int c, size_t n)
#include "../../../../lib/decompress_bunzip2.c"
#endif
+#ifdef CONFIG_KERNEL_LZ4
+#include "../../../../lib/decompress_unlz4.c"
+#endif
+
#ifdef CONFIG_KERNEL_LZMA
#include "../../../../lib/decompress_unlzma.c"
#endif
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-16 15:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-16 15:43 [PATCH] MIPS: ZBOOT: support LZ4 compression scheme Florian Fainelli
2013-09-16 15:47 ` Gabor Juhos
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.