SOURCES (LINUX_2_6): kernel-bzip2-lzma.patch - latest bzip2-lzma-for-linus ...
baggins
baggins at pld-linux.org
Tue Mar 31 11:46:10 CEST 2009
Author: baggins Date: Tue Mar 31 09:46:09 2009 GMT
Module: SOURCES Tag: LINUX_2_6
---- Log message:
- latest bzip2-lzma-for-linus git (merged in 2.6.30)
---- Files affected:
SOURCES:
kernel-bzip2-lzma.patch (1.1.2.8 -> 1.1.2.9)
---- Diffs:
================================================================
Index: SOURCES/kernel-bzip2-lzma.patch
diff -u SOURCES/kernel-bzip2-lzma.patch:1.1.2.8 SOURCES/kernel-bzip2-lzma.patch:1.1.2.9
--- SOURCES/kernel-bzip2-lzma.patch:1.1.2.8 Fri Jan 2 19:20:18 2009
+++ SOURCES/kernel-bzip2-lzma.patch Tue Mar 31 11:46:04 2009
@@ -1,6 +1,167 @@
-diff -urNp linux-2.6.27.orig/arch/x86/boot/compressed/Makefile linux-2.6.27/arch/x86/boot/compressed/Makefile
---- linux-2.6.27.orig/arch/x86/boot/compressed/Makefile 2008-10-29 08:48:23.000000000 +0100
-+++ linux-2.6.27/arch/x86/boot/compressed/Makefile 2008-10-30 22:30:21.000000000 +0100
+Linus,
+
+Please pull the latest bzip2-lzma-for-linus git tree from:
+
+ git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git bzip2-lzma-for-linus
+
+We are sending this as a separate tree as it affects generic
+files as well.
+
+Highlights:
+
+ - Add kernel image compression mode config options:
+
+ Kernel compression mode
+ > 1. Gzip (KERNEL_GZIP) (NEW)
+ 2. Bzip2 (KERNEL_BZIP2) (NEW)
+ 3. LZMA (KERNEL_LZMA) (NEW)
+
+ Initial ramdisk compressed using gzip (RD_GZIP) [Y/n/?] (NEW)
+ Initial ramdisk compressed using bzip2 (RD_BZIP2) [N/y/?] (NEW)
+ Initial ramdisk compressed using lzma (RD_LZMA) [N/y/?] (NEW)
+
+ Built-in initramfs compression mode
+ > 1. None (INITRAMFS_COMPRESSION_NONE) (NEW)
+ 2. Gzip (INITRAMFS_COMPRESSION_GZIP) (NEW)
+ choice[1-2?]:
+
+ ... and matching compression and decompression implementations.
+
+Risks:
+
+ - This has been a historically problematic topic thus we skipped
+ the v2.6.28 and v2.6.29 merge windows with it. Boot failures,
+ panics, initrd decompression problems have been observed and
+ fixed.
+
+ - On x86 we switch over from lib/inflate.c to zlib - same
+ functionality but different library. Other architectures are not
+ affected by that, use of this new facility is opt-in. (This was
+ the last in-kernel user of lib/inflate.c on x86.)
+
+ - To build a kernel with a different compressor the 'bzip2' or 'lzma'
+ tools are needed. If the kernel is built with CONFIG_KERNEL_LZMA=y
+ and the tool is not available the kernel build will fail with a clear
+ message. This tool is available in all major kernel distros, but
+ it is not generally a default-installed package. bzip2 is generally
+ installed by default.
+
+ - There are no known regressions.
+
+ Thanks,
+
+ Ingo
+
+------------------>
+Alain Knaff (8):
+ bzip2/lzma: library support for gzip, bzip2 and lzma decompression
+ bzip2/lzma: config and initramfs support for bzip2/lzma decompression
+ bzip2/lzma: x86 kernel compression support
+ bzip2/lzma: fix built-in initramfs vs CONFIG_RD_GZIP
+ bzip2/lzma: fix decompress_inflate.c vs multi-block-with-embedded-filename
+ bzip2/lzma: don't stop search at first unconfigured compression
+ bzip2/lzma: don't leave empty files around on failure
+ bzip2/lzma: make internal initramfs compression configurable
+
+Cyrill Gorcunov (1):
+ x86: headers cleanup - boot.h
+
+H. Peter Anvin (11):
+ bzip2/lzma: use a table to search for initramfs compression formats
+ bzip2/lzma: handle failures from bzip2 and lzma correctly
+ bzip2/lzma: make config machinery an arch configurable
+ bzip2/lzma: proper Kconfig dependencies for the ramdisk options
+ bzip2/lzma: DECOMPRESS_GZIP should select ZLIB_INFLATE
+ bzip2/lzma: move initrd/ramfs options out of BLK_DEV
+ bzip2/lzma: fix constant in decompress_inflate
+ bzip2/lzma: centralize format detection
+ bzip2/lzma: comprehensible error messages for missing decompressor
+ init: make initrd/initramfs decompression failure a KERN_EMERG event
+ bzip2/lzma: update boot protocol specification
+
+Ingo Molnar (1):
+ bzip2/lzma: make flush_buffer() unconditional
+
+
+ Documentation/x86/boot.txt | 5 +-
+ arch/x86/Kconfig | 3 +
+ arch/x86/boot/compressed/Makefile | 21 +-
+ arch/x86/boot/compressed/misc.c | 118 +-----
+ arch/x86/include/asm/boot.h | 16 +-
+ include/linux/decompress/bunzip2.h | 10 +
+ include/linux/decompress/generic.h | 33 ++
+ include/linux/decompress/inflate.h | 13 +
+ include/linux/decompress/mm.h | 87 +++++
+ include/linux/decompress/unlzma.h | 12 +
+ init/Kconfig | 60 +++
+ init/do_mounts_rd.c | 178 +++-------
+ init/initramfs.c | 122 ++-----
+ lib/Kconfig | 14 +
+ lib/Makefile | 7 +-
+ lib/decompress.c | 54 +++
+ lib/decompress_bunzip2.c | 735 ++++++++++++++++++++++++++++++++++++
+ lib/decompress_inflate.c | 167 ++++++++
+ lib/decompress_unlzma.c | 647 +++++++++++++++++++++++++++++++
+ lib/zlib_inflate/inflate.h | 4 +
+ lib/zlib_inflate/inftrees.h | 4 +
+ scripts/Makefile.lib | 14 +
+ scripts/bin_size | 10 +
+ scripts/gen_initramfs_list.sh | 18 +-
+ usr/Kconfig | 89 +++++
+ usr/Makefile | 36 ++-
+ usr/initramfs_data.S | 2 +-
+ usr/initramfs_data.bz2.S | 29 ++
+ usr/initramfs_data.gz.S | 29 ++
+ usr/initramfs_data.lzma.S | 29 ++
+ 30 files changed, 2222 insertions(+), 344 deletions(-)
+ create mode 100644 include/linux/decompress/bunzip2.h
+ create mode 100644 include/linux/decompress/generic.h
+ create mode 100644 include/linux/decompress/inflate.h
+ create mode 100644 include/linux/decompress/mm.h
+ create mode 100644 include/linux/decompress/unlzma.h
+ create mode 100644 lib/decompress.c
+ create mode 100644 lib/decompress_bunzip2.c
+ create mode 100644 lib/decompress_inflate.c
+ create mode 100644 lib/decompress_unlzma.c
+ create mode 100644 scripts/bin_size
+ create mode 100644 usr/initramfs_data.bz2.S
+ create mode 100644 usr/initramfs_data.gz.S
+ create mode 100644 usr/initramfs_data.lzma.S
+
+diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
+index 7b4596a..d05730e 100644
+--- a/Documentation/x86/boot.txt
++++ b/Documentation/x86/boot.txt
+@@ -542,7 +542,10 @@ Protocol: 2.08+
+
+ The payload may be compressed. The format of both the compressed and
+ uncompressed data should be determined using the standard magic
+- numbers. Currently only gzip compressed ELF is used.
++ numbers. The currently supported compression formats are gzip
++ (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A) and LZMA
++ (magic number 5D 00). The uncompressed payload is currently always ELF
++ (magic number 7F 45 4C 46).
+
+ Field name: payload_length
+ Type: read
+diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
+index bc2fbad..a233768 100644
+--- a/arch/x86/Kconfig
++++ b/arch/x86/Kconfig
+@@ -40,6 +40,9 @@ config X86
+ select HAVE_GENERIC_DMA_COHERENT if X86_32
+ select HAVE_EFFICIENT_UNALIGNED_ACCESS
+ select USER_STACKTRACE_SUPPORT
++ select HAVE_KERNEL_GZIP
++ select HAVE_KERNEL_BZIP2
++ select HAVE_KERNEL_LZMA
+
+ config ARCH_DEFCONFIG
+ string
+diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
+index 1771c80..3ca4c19 100644
+--- a/arch/x86/boot/compressed/Makefile
++++ b/arch/x86/boot/compressed/Makefile
@@ -4,7 +4,7 @@
# create a compressed vmlinux image from the original vmlinux
#
@@ -10,7 +171,7 @@
KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
-@@ -46,9 +46,17 @@ $(obj)/vmlinux.bin.all: $(vmlinux.bin.al
+@@ -47,18 +47,35 @@ ifeq ($(CONFIG_X86_32),y)
ifdef CONFIG_RELOCATABLE
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin.all FORCE
$(call if_changed,gzip)
@@ -28,14 +189,15 @@
endif
LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T
-@@ -56,8 +64,16 @@ else
+ else
++
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
$(call if_changed,gzip)
-
+$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
+ $(call if_changed,bzip2)
+$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
+ $(call if_changed,lzma)
+
LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T
endif
@@ -46,9 +208,10 @@
+
+$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE
$(call if_changed,ld)
-diff -urNp linux-2.6.27.orig/arch/x86/boot/compressed/misc.c linux-2.6.27/arch/x86/boot/compressed/misc.c
---- linux-2.6.27.orig/arch/x86/boot/compressed/misc.c 2008-10-29 08:48:23.000000000 +0100
-+++ linux-2.6.27/arch/x86/boot/compressed/misc.c 2008-10-30 22:27:54.000000000 +0100
+diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
+index da06221..e45be73 100644
+--- a/arch/x86/boot/compressed/misc.c
++++ b/arch/x86/boot/compressed/misc.c
@@ -116,71 +116,13 @@
/*
* gzip declarations
@@ -78,7 +241,7 @@
-
-/* Sliding window buffer (and final output buffer): */
-static unsigned char *window;
-
+-
-/* Valid bytes in inbuf: */
-static unsigned insize;
-
@@ -115,13 +278,13 @@
-# define Tracec(c, x)
-# define Tracecv(c, x)
-#endif
--
+
-static int fill_inbuf(void);
-static void flush_window(void);
static void error(char *m);
/*
-@@ -189,11 +131,6 @@ static void error(char *m);
+@@ -189,13 +131,8 @@ static void error(char *m);
static struct boot_params *real_mode; /* Pointer to real-mode data */
static int quiet;
@@ -131,14 +294,18 @@
-static long bytes_out;
-
static void *memset(void *s, int c, unsigned n);
- static void *memcpy(void *dest, const void *src, unsigned n);
+-static void *memcpy(void *dest, const void *src, unsigned n);
++void *memcpy(void *dest, const void *src, unsigned n);
+ static void __putstr(int, const char *);
+ #define putstr(__x) __putstr(0, __x)
@@ -213,7 +150,17 @@ static char *vidmem;
static int vidport;
static int lines, cols;
+-#include "../../../../lib/inflate.c"
+#ifdef CONFIG_KERNEL_GZIP
- #include "../../../../lib/inflate.c"
++#include "../../../../lib/decompress_inflate.c"
+#endif
+
+#ifdef CONFIG_KERNEL_BZIP2
@@ -151,7 +318,16 @@
static void scroll(void)
{
-@@ -291,38 +238,6 @@ static void *memcpy(void *dest, const vo
+@@ -282,7 +229,7 @@ static void *memset(void *s, int c, unsigned n)
+ return s;
+ }
+
+-static void *memcpy(void *dest, const void *src, unsigned n)
++void *memcpy(void *dest, const void *src, unsigned n)
+ {
+ int i;
+ const char *s = src;
+@@ -293,38 +240,6 @@ static void *memcpy(void *dest, const void *src, unsigned n)
return dest;
}
@@ -190,7 +366,7 @@
static void error(char *x)
{
-@@ -405,12 +320,8 @@ asmlinkage void decompress_kernel(void *
+@@ -407,12 +322,8 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
lines = real_mode->screen_info.orig_video_lines;
cols = real_mode->screen_info.orig_video_cols;
@@ -203,7 +379,7 @@
#ifdef CONFIG_X86_64
if ((unsigned long)output & (__KERNEL_ALIGN - 1))
-@@ -428,10 +339,9 @@ asmlinkage void decompress_kernel(void *
+@@ -430,10 +341,9 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
#endif
#endif
@@ -215,50 +391,24 @@
parse_elf(output);
if (!quiet)
putstr("done.\nBooting the kernel.\n");
-diff -urNp linux-2.6.27.orig/drivers/block/Kconfig linux-2.6.27/drivers/block/Kconfig
---- linux-2.6.27.orig/drivers/block/Kconfig 2008-10-29 08:48:02.000000000 +0100
-+++ linux-2.6.27/drivers/block/Kconfig 2008-10-30 22:27:34.000000000 +0100
-@@ -357,6 +357,30 @@ config BLK_DEV_XIP
- will prevent RAM block device backing store memory from being
- allocated from highmem (only a problem for highmem systems).
+diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h
+index dd61616..6526cf0 100644
+--- a/arch/x86/include/asm/boot.h
++++ b/arch/x86/include/asm/boot.h
+@@ -10,17 +10,31 @@
+ #define EXTENDED_VGA 0xfffe /* 80x50 mode */
+ #define ASK_VGA 0xfffd /* ask for it at bootup */
-+config RD_BZIP2
-+ bool "Initial ramdisk compressed using bzip2"
-+ default n
-+ depends on BLK_DEV_INITRD=y
-+ help
-+ Support loading of a bzip2 encoded initial ramdisk or cpio buffer
-+ If unsure, say N.
-+
-+config RD_LZMA
-+ bool "Initial ramdisk compressed using lzma"
-+ default n
-+ depends on BLK_DEV_INITRD=y
-+ help
-+ Support loading of a lzma encoded initial ramdisk or cpio buffer
-+ If unsure, say N.
++#ifdef __KERNEL__
+
-+config RD_GZIP
-+ bool "Initial ramdisk compressed using gzip"
-+ default y
-+ depends on BLK_DEV_INITRD=y
-+ help
-+ Support loading of a gzip encoded initial ramdisk or cpio buffer.
-+ If unsure, say Y.
-+
- config CDROM_PKTCDVD
- tristate "Packet writing on CD/DVD media"
- depends on !UML
-diff -urNp linux-2.6.28/arch/x86/include/asm/boot.h linux-2.6.28/arch/x86/include/asm/boot.h
---- linux-2.6.28/arch/x86/include/asm/boot.h 2008-10-29 08:47:54.000000000 +0100
-+++ linux-2.6.28/arch/x86/include/asm/boot.h 2008-10-30 22:27:38.000000000 +0100
-@@ -17,11 +17,21 @@
+ /* Physical address where kernel should be loaded. */
+ #define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \
+ (CONFIG_PHYSICAL_ALIGN - 1)) \
& ~(CONFIG_PHYSICAL_ALIGN - 1))
-+#if (defined CONFIG_KERNEL_BZIP2)
++#ifdef CONFIG_KERNEL_BZIP2
+#define BOOT_HEAP_SIZE 0x400000
-+#else
++#else /* !CONFIG_KERNEL_BZIP2 */
+
#ifdef CONFIG_X86_64
#define BOOT_HEAP_SIZE 0x7000
@@ -267,7 +417,7 @@
#define BOOT_HEAP_SIZE 0x4000
+#endif
+
-+#endif
++#endif /* !CONFIG_KERNEL_BZIP2 */
+
+#ifdef CONFIG_X86_64
+#define BOOT_STACK_SIZE 0x4000
@@ -275,9 +425,14 @@
#define BOOT_STACK_SIZE 0x1000
#endif
-diff -urNp linux-2.6.27.orig/include/linux/decompress/bunzip2.h linux-2.6.27/include/linux/decompress/bunzip2.h
---- linux-2.6.27.orig/include/linux/decompress/bunzip2.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27/include/linux/decompress/bunzip2.h 2008-10-30 22:27:29.000000000 +0100
++#endif /* __KERNEL__ */
++
+ #endif /* _ASM_X86_BOOT_H */
+diff --git a/include/linux/decompress/bunzip2.h b/include/linux/decompress/bunzip2.h
+new file mode 100644
+index 0000000..1152721
+--- /dev/null
++++ b/include/linux/decompress/bunzip2.h
@@ -0,0 +1,10 @@
+#ifndef DECOMPRESS_BUNZIP2_H
+#define DECOMPRESS_BUNZIP2_H
@@ -289,10 +444,12 @@
+ int *pos,
+ void(*error)(char *x));
+#endif
-diff -urNp linux-2.6.27.orig/include/linux/decompress/generic.h linux-2.6.27/include/linux/decompress/generic.h
---- linux-2.6.27.orig/include/linux/decompress/generic.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27/include/linux/decompress/generic.h 2008-10-30 22:27:29.000000000 +0100
-@@ -0,0 +1,30 @@
+diff --git a/include/linux/decompress/generic.h b/include/linux/decompress/generic.h
+new file mode 100644
+index 0000000..6dfb856
+--- /dev/null
++++ b/include/linux/decompress/generic.h
+@@ -0,0 +1,33 @@
+#ifndef DECOMPRESS_GENERIC_H
+#define DECOMPRESS_GENERIC_H
+
@@ -321,11 +478,16 @@
+ *fill should be called (repeatedly...) to read data, at most IOBUF_SIZE
+ */
+
++/* Utility routine to detect the decompression method */
++decompress_fn decompress_method(const unsigned char *inbuf, int len,
++ const char **name);
+
+#endif
-diff -urNp linux-2.6.27.orig/include/linux/decompress/inflate.h linux-2.6.27/include/linux/decompress/inflate.h
---- linux-2.6.27.orig/include/linux/decompress/inflate.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27/include/linux/decompress/inflate.h 2008-10-30 22:27:29.000000000 +0100
+diff --git a/include/linux/decompress/inflate.h b/include/linux/decompress/inflate.h
+new file mode 100644
+index 0000000..f9b06cc
+--- /dev/null
++++ b/include/linux/decompress/inflate.h
@@ -0,0 +1,13 @@
+#ifndef INFLATE_H
+#define INFLATE_H
@@ -340,10 +502,12 @@
+ int *pos,
+ void(*error_fn)(char *x));
+#endif
-diff -urNp linux-2.6.27.orig/include/linux/decompress/mm.h linux-2.6.27/include/linux/decompress/mm.h
---- linux-2.6.27.orig/include/linux/decompress/mm.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27/include/linux/decompress/mm.h 2008-10-30 22:27:54.000000000 +0100
-@@ -0,0 +1,88 @@
+diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h
+new file mode 100644
+index 0000000..12ff8c3
+--- /dev/null
++++ b/include/linux/decompress/mm.h
+@@ -0,0 +1,87 @@
+/*
+ * linux/compr_mm.h
+ *
@@ -398,7 +562,6 @@
+#define large_free(a) free(a)
+
+#define set_error_fn(x)
-+#define panic error
+
+#define INIT
+
@@ -432,9 +595,11 @@
+#endif /* STATIC */
+
+#endif /* DECOMPR_MM_H */
-diff -urNp linux-2.6.27.orig/include/linux/decompress/unlzma.h linux-2.6.27/include/linux/decompress/unlzma.h
---- linux-2.6.27.orig/include/linux/decompress/unlzma.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.27/include/linux/decompress/unlzma.h 2008-10-30 22:27:29.000000000 +0100
+diff --git a/include/linux/decompress/unlzma.h b/include/linux/decompress/unlzma.h
+new file mode 100644
+index 0000000..7796538
+--- /dev/null
++++ b/include/linux/decompress/unlzma.h
@@ -0,0 +1,12 @@
+#ifndef DECOMPRESS_UNLZMA_H
+#define DECOMPRESS_UNLZMA_H
@@ -448,23 +613,92 @@
+ );
+
+#endif
-diff -urNp linux-2.6.27.orig/init/do_mounts_rd.c linux-2.6.27/init/do_mounts_rd.c
---- linux-2.6.27.orig/init/do_mounts_rd.c 2008-10-29 08:48:10.000000000 +0100
-+++ linux-2.6.27/init/do_mounts_rd.c 2008-10-30 22:27:34.000000000 +0100
-@@ -10,6 +10,12 @@
+diff --git a/init/Kconfig b/init/Kconfig
+index 6a5c5fe..38396ec 100644
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -101,6 +101,66 @@ config LOCALVERSION_AUTO
+ which is done within the script "scripts/setlocalversion".)
+
++config HAVE_KERNEL_GZIP
++ bool
++
++config HAVE_KERNEL_BZIP2
++ bool
++
++config HAVE_KERNEL_LZMA
++ bool
++
++choice
++ prompt "Kernel compression mode"
++ default KERNEL_GZIP
++ depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA
++ help
++ The linux kernel is a kind of self-extracting executable.
++ Several compression algorithms are available, which differ
++ in efficiency, compression and decompression speed.
++ Compression speed is only relevant when building a kernel.
++ Decompression speed is relevant at each boot.
++
++ If you have any problems with bzip2 or lzma compressed
++ kernels, mail me (Alain Knaff) <alain at knaff.lu>. (An older
++ version of this functionality (bzip2 only), for 2.4, was
++ supplied by Christian Ludwig)
++
++ High compression options are mostly useful for users, who
++ are low on disk space (embedded systems), but for whom ram
++ size matters less.
++
++ If in doubt, select 'gzip'
++
++config KERNEL_GZIP
++ bool "Gzip"
++ depends on HAVE_KERNEL_GZIP
++ help
++ The old and tried gzip compression. Its compression ratio is
++ the poorest among the 3 choices; however its speed (both
++ compression and decompression) is the fastest.
++
++config KERNEL_BZIP2
++ bool "Bzip2"
++ depends on HAVE_KERNEL_BZIP2
++ help
++ Its compression ratio and speed is intermediate.
++ Decompression speed is slowest among the three. The kernel
++ size is about 10% smaller with bzip2, in comparison to gzip.
++ Bzip2 uses a large amount of memory. For modern kernels you
++ will need at least 8MB RAM or more for booting.
++
++config KERNEL_LZMA
++ bool "LZMA"
++ depends on HAVE_KERNEL_LZMA
++ help
++ The most recent compression algorithm.
++ Its ratio is best, decompression speed is between the other
++ two. Compression is slowest. The kernel size is about 33%
++ smaller with LZMA in comparison to gzip.
++
++endchoice
++
+ config SWAP
+ bool "Support for paging of anonymous memory (swap)"
+ depends on MMU && BLOCK
+diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
+index 0f0f0cf..027a402 100644
+--- a/init/do_mounts_rd.c
++++ b/init/do_mounts_rd.c
+@@ -11,6 +11,9 @@
#include "do_mounts.h"
+ #include "../fs/squashfs/squashfs_fs.h"
+#include <linux/decompress/generic.h>
+
-+#include <linux/decompress/bunzip2.h>
-+#include <linux/decompress/unlzma.h>
-+#include <linux/decompress/inflate.h>
+
int __initdata rd_prompt = 1;/* 1 = prompt for RAM disk, 0 = don't prompt */
static int __init prompt_ramdisk(char *str)
-@@ -28,7 +34,7 @@ static int __init ramdisk_start_setup(ch
+@@ -29,7 +32,7 @@ static int __init ramdisk_start_setup(char *str)
}
__setup("ramdisk_start=", ramdisk_start_setup);
@@ -473,64 +707,73 @@
/*
* This routine tries to find a RAM disk image to load, and returns the
-@@ -44,7 +50,7 @@ static int __init crd_load(int in_fd, in
- * gzip
+@@ -38,15 +41,15 @@ static int __init crd_load(int in_fd, int out_fd);
+ * numbers could not be found.
+ *
+ * We currently check for the following magic numbers:
+- * minix
+- * ext2
++ * minix
++ * ext2
+ * romfs
+ * cramfs
+ * squashfs
+- * gzip
++ * gzip
*/
- static int __init
+-static int __init
-identify_ramdisk_image(int fd, int start_block)
++static int __init
+identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor)
{
const int size = 512;
struct minix_super_block *minixsb;
-@@ -70,6 +76,7 @@ identify_ramdisk_image(int fd, int start
- sys_lseek(fd, start_block * BLOCK_SIZE, 0);
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-bzip2-lzma.patch?r1=1.1.2.8&r2=1.1.2.9&f=u
More information about the pld-cvs-commit
mailing list