lib-add-support-for-lz4-compressed-kernel.patch removed from -mm tree
Subsystems (2)
[email protected]
maintainerSubject: [merged] lib-add-support-for-lz4-compressed-kernel.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 09 Jul 2013 16:22:23 -0700
The patch titled
Subject: lib: add support for LZ4-compressed kernel
has been removed from the -mm tree. Its filename was
lib-add-support-for-lz4-compressed-kernel.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Kyungsik Lee <[email protected]>
Subject: lib: add support for LZ4-compressed kernel
Add support for extracting LZ4-compressed kernel images, as well as LZ4-compressed ramdisk images in the kernel boot process.
---
include/linux/decompress/unlz4.h | 10 + init/Kconfig | 17 ++ lib/Kconfig | 7 + lib/Makefile | 2 lib/decompress.c | 5 lib/decompress_unlz4.c | 187 +++++++++++++++++++++++++++++ lib/lz4/Makefile | 1 lib/lz4/lz4_decompress.c | 2 scripts/Makefile.lib | 5 usr/Kconfig | 9 + 10 files changed, 243 insertions(+), 2 deletions(-)
include/linux/decompress/unlz4.h new file +10 -0
@@ -0,0 +1,10 @@ +#ifndef DECOMPRESS_UNLZ4_H +#define DECOMPRESS_UNLZ4_H + +int unlz4 (unsigned char *inbuf,int len, +int (*fill)(void *,unsigned int ), +int (*flush)(void *,unsigned int ), +unsigned char *output, +int *pos, +void (*error)(char *x)); +#endif
init/Kconfig renamed from init/Kconfig~lib-add-support-for-lz4-compressed-kernel +16 -1
@@ -112,10 +112,13 @@ config HAVE_KERNEL_XZ config HAVE_KERNEL_LZO bool +config HAVE_KERNEL_LZ4 + bool + choice prompt "Kernel compression mode" default KERNEL_GZIP - depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO + depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4 help The linux kernel is a kind of self-extracting executable. Several compression algorithms are available, which differ
@@ -182,6 +185,18 @@ config KERNEL_LZO size is about 10% bigger than gzip; however its speed (both compression and decompression) is the fastest. +config KERNEL_LZ4 + bool "LZ4" + depends on HAVE_KERNEL_LZ4 + help + LZ4 is an LZ77-type compressor with a fixed, byte-oriented encoding. + A preliminary version of LZ4 de/compression tool is available at + <https://code.google.com/p/lz4/>. + + Its compression ratio is worse than LZO. The size of the kernel + is about 8% bigger than LZO. But the decompression speed is + faster than LZO. + endchoice config DEFAULT_HOSTNAME
lib/Kconfig renamed from lib/Kconfig~lib-add-support-for-lz4-compressed-kernel +7 -0
@@ -194,6 +194,9 @@ config LZO_COMPRESS config LZO_DECOMPRESS tristate +config LZ4_DECOMPRESS + tristate + source "lib/xz/Kconfig" #
@@ -218,6 +221,10 @@ config DECOMPRESS_LZO select LZO_DECOMPRESS tristate +config DECOMPRESS_LZ4 + select LZ4_DECOMPRESS + tristate + # # Generic allocator support is selected if needed #
lib/Makefile renamed from lib/Makefile~lib-add-support-for-lz4-compressed-kernel +2 -0
@@ -75,6 +75,7 @@ obj-$(CONFIG_REED_SOLOMON) += reed_solom obj-$(CONFIG_BCH) += bch.o obj-$(CONFIG_LZO_COMPRESS) += lzo/ obj-$(CONFIG_LZO_DECOMPRESS) += lzo/ +obj-$(CONFIG_LZ4_DECOMPRESS) += lz4/ obj-$(CONFIG_XZ_DEC) += xz/ obj-$(CONFIG_RAID6_PQ) += raid6/
@@ -83,6 +84,7 @@ lib-$(CONFIG_DECOMPRESS_BZIP2) += decomp lib-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o lib-$(CONFIG_DECOMPRESS_XZ) += decompress_unxz.o lib-$(CONFIG_DECOMPRESS_LZO) += decompress_unlzo.o +lib-$(CONFIG_DECOMPRESS_LZ4) += decompress_unlz4.o obj-$(CONFIG_TEXTSEARCH) += textsearch.o obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o
lib/decompress.c renamed from lib/decompress.c~lib-add-support-for-lz4-compressed-kernel +5 -0
@@ -11,6 +11,7 @@#include <linux/decompress/unxz.h> #include <linux/decompress/inflate.h> #include <linux/decompress/unlzo.h> +#include <linux/decompress/unlz4.h> #include <linux/types.h> #include <linux/string.h>
@@ -31,6 +32,9 @@#ifndef CONFIG_DECOMPRESS_LZO # define unlzo NULL#endif +#ifndef CONFIG_DECOMPRESS_LZ4 +# define unlz4 NULL +#endif struct compress_format {unsigned char magic[2 ];
@@ -45,6 +49,7 @@ static const struct compress_format comp { {0x5d, 0x00}, "lzma", unlzma }, { {0xfd, 0x37}, "xz", unxz }, { {0x89, 0x4c}, "lzo", unlzo }, + { {0x02, 0x21}, "lz4", unlz4 }, { {0, 0}, NULL, NULL } };
lib/decompress_unlz4.c new file +187 -0
187 lines not on this page · raw message
lib/lz4/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_LZ4_DECOMPRESS) += lz4_decompress.o
lib/lz4/lz4_decompress.c renamed from lib/lz4/lz4_decompress.c~lib-add-support-for-lz4-compressed-kernel +1 -1
@@ -1,7 +1,7 @@/* * LZ4 Decompressor for Linux kernel * -* Copyright (C) 2013 LG Electronics Co., Ltd. (http://www.lge.com/) +* Copyright (C) 2013, LG Electronics, Kyungsik Lee <[email protected]> * * Based on LZ4 implementation by Yann Collet. *
scripts/Makefile.lib renamed from scripts/Makefile.lib~lib-add-support-for-lz4-compressed-kernel +5 -0
@@ -311,6 +311,11 @@ cmd_lzo = (cat $(filter-out FORCE,$^) | lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ (rm -f $@ ; false) +quiet_cmd_lz4 = LZ4 $@ +cmd_lz4 = (cat $(filter-out FORCE,$^) | \ + lz4c -l -c1 stdin stdout && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ + (rm -f $@ ; false) + # U-Boot mkimage # ---------------------------------------------------------------------------
usr/Kconfig renamed from usr/Kconfig~lib-add-support-for-lz4-compressed-kernel +9 -0
@@ -90,6 +90,15 @@ config RD_LZO Support loading of a LZO encoded initial ramdisk or cpio buffer If unsure, say N. +config RD_LZ4 + bool "Support initial ramdisks compressed using LZ4" if EXPERT + default !EXPERT + depends on BLK_DEV_INITRD + select DECOMPRESS_LZ4 + help + Support loading of a LZ4 encoded initial ramdisk or cpio buffer + If unsure, say N. + choice prompt "Built-in initramfs compression mode" if INITRAMFS_SOURCE!="" help
_
Patches currently in -mm which might be from [email protected] are
origin.patch