SOURCES (CRI): kernel-CRI-lzma-vmlinuz.patch - new patch from LKML, now wit...
hawk
hawk at pld-linux.org
Wed Oct 29 09:19:32 CET 2008
Author: hawk Date: Wed Oct 29 08:19:32 2008 GMT
Module: SOURCES Tag: CRI
---- Log message:
- new patch from LKML, now with LZMA ramdisk too
---- Files affected:
SOURCES:
kernel-CRI-lzma-vmlinuz.patch (1.1.2.4 -> 1.1.2.5)
---- Diffs:
================================================================
Index: SOURCES/kernel-CRI-lzma-vmlinuz.patch
diff -u SOURCES/kernel-CRI-lzma-vmlinuz.patch:1.1.2.4 SOURCES/kernel-CRI-lzma-vmlinuz.patch:1.1.2.5
--- SOURCES/kernel-CRI-lzma-vmlinuz.patch:1.1.2.4 Thu May 8 20:49:31 2008
+++ SOURCES/kernel-CRI-lzma-vmlinuz.patch Wed Oct 29 09:19:26 2008
@@ -1,1221 +1,2971 @@
-diff -urNp linux-2.6.25.orig/arch/x86/boot/compressed/Makefile linux-2.6.25/arch/x86/boot/compressed/Makefile
---- linux-2.6.25.orig/arch/x86/boot/compressed/Makefile 2008-05-08 14:47:45.000000000 +0200
-+++ linux-2.6.25/arch/x86/boot/compressed/Makefile 2008-05-08 20:42:22.000000000 +0200
+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-29 08:59:01.000000000 +0100
@@ -4,7 +4,7 @@
# create a compressed vmlinux image from the original vmlinux
#
-targets := vmlinux vmlinux.bin vmlinux.bin.gz head_$(BITS).o misc.o piggy.o
-+targets := vmlinux vmlinux.bin head_$(BITS).o piggy.o
++targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o
KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
-@@ -17,10 +17,11 @@ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__A
-
- LDFLAGS := -m elf_$(UTS_MACHINE)
- LDFLAGS_vmlinux := -T
--
--$(obj)/vmlinux: $(src)/vmlinux_$(BITS).lds $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/piggy.o FORCE
-- $(call if_changed,ld)
-- @:
-+ifeq ($(CONFIG_X86_32),y)
-+LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T
-+else
-+LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T
-+endif
-
- OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note -R .comment -S
- $(obj)/vmlinux.bin: vmlinux FORCE
-@@ -42,7 +43,16 @@ quiet_cmd_relocbin = BUILD $@
- cmd_relocbin = cat $(filter-out FORCE,$^) > $@
- $(obj)/vmlinux.bin.all: $(vmlinux.bin.all-y) FORCE
- $(call if_changed,relocbin)
-+endif
-+
-+ifeq ($(CONFIG_KERNEL_GZIP),y)
-+targets += vmlinux.bin.gz misc.o
-+
-+$(obj)/vmlinux: $(src)/vmlinux_$(BITS).lds $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/piggy.o FORCE
-+ $(call if_changed,ld)
-+ @:
-
-+ifeq ($(CONFIG_X86_32),y)
+@@ -46,19 +46,34 @@ $(obj)/vmlinux.bin.all: $(vmlinux.bin.al
ifdef CONFIG_RELOCATABLE
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin.all FORCE
$(call if_changed,gzip)
-@@ -50,15 +60,35 @@ else
++$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin.all FORCE
++ $(call if_changed,bzip2)
++$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin.all FORCE
++ $(call if_changed,lzma)
+ 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)
endif
--LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T
--
+ LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T
+
else
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
$(call if_changed,gzip)
-+endif
++$(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
-+$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
-+ $(call if_changed,ld)
+ LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T
endif
-+ifeq ($(CONFIG_KERNEL_LZMA),y)
-+targets += vmlinux.bin.lzma misc_lzma.o
++suffix_$(CONFIG_KERNEL_GZIP) = gz
++suffix_$(CONFIG_KERNEL_BZIP2) = bz2
++suffix_$(CONFIG_KERNEL_LZMA) = lzma
-$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
-+$(obj)/vmlinux: $(src)/vmlinux_$(BITS).lds $(obj)/head_$(BITS).o $(obj)/misc_lzma.o $(obj)/piggy.o FORCE
++$(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-29 08:59:22.000000000 +0100
+@@ -116,71 +116,13 @@
+ /*
+ * gzip declarations
+ */
+-
+-#define OF(args) args
+ #define STATIC static
+
+ #undef memset
+ #undef memcpy
+ #define memzero(s, n) memset((s), 0, (n))
+
+-typedef unsigned char uch;
+-typedef unsigned short ush;
+-typedef unsigned long ulg;
+-
+-/*
+- * Window size must be at least 32k, and a power of two.
+- * We don't actually have a window just a huge output buffer,
+- * so we report a 2G window size, as that should always be
+- * larger than our output buffer:
+- */
+-#define WSIZE 0x80000000
+-
+-/* Input buffer: */
+-static unsigned char *inbuf;
+-
+-/* Sliding window buffer (and final output buffer): */
+-static unsigned char *window;
+
+-/* Valid bytes in inbuf: */
+-static unsigned insize;
+-
+-/* Index of next byte to be processed in inbuf: */
+-static unsigned inptr;
+-
+-/* Bytes in output buffer: */
+-static unsigned outcnt;
+-
+-/* gzip flag byte */
+-#define ASCII_FLAG 0x01 /* bit 0 set: file probably ASCII text */
+-#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gz file */
+-#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
+-#define ORIG_NAM 0x08 /* bit 3 set: original file name present */
+-#define COMMENT 0x10 /* bit 4 set: file comment present */
+-#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
+-#define RESERVED 0xC0 /* bit 6, 7: reserved */
+-
+-#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf())
+-
+-/* Diagnostic functions */
+-#ifdef DEBUG
+-# define Assert(cond, msg) do { if (!(cond)) error(msg); } while (0)
+-# define Trace(x) do { fprintf x; } while (0)
+-# define Tracev(x) do { if (verbose) fprintf x ; } while (0)
+-# define Tracevv(x) do { if (verbose > 1) fprintf x ; } while (0)
+-# define Tracec(c, x) do { if (verbose && (c)) fprintf x ; } while (0)
+-# define Tracecv(c, x) do { if (verbose > 1 && (c)) fprintf x ; } while (0)
+-#else
+-# define Assert(cond, msg)
+-# define Trace(x)
+-# define Tracev(x)
+-# define Tracevv(x)
+-# 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);
+ static struct boot_params *real_mode; /* Pointer to real-mode data */
+ static int quiet;
+
+-extern unsigned char input_data[];
+-extern int input_len;
+-
+-static long bytes_out;
+-
+ static void *memset(void *s, int c, unsigned n);
+ static void *memcpy(void *dest, const void *src, unsigned n);
+
+@@ -213,7 +150,17 @@ static char *vidmem;
+ static int vidport;
+ static int lines, cols;
+
++#ifdef CONFIG_KERNEL_GZIP
+ #include "../../../../lib/inflate.c"
++#endif
+
-+ifeq ($(CONFIG_X86_32),y)
-+ifdef CONFIG_RELOCATABLE
-+$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin.all FORCE
-+ $(call if_changed,lzma)
-+else
-+$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
-+ $(call if_changed,lzma)
-+endif
-+else
-+$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
-+ $(call if_changed,lzma)
-+endif
++#ifdef CONFIG_KERNEL_BZIP2
++#include "../../../../lib/decompress_bunzip2.c"
++#endif
+
-+$(obj)/piggy.o: $(obj)/vmlinux_lzma.scr $(obj)/vmlinux.bin.lzma FORCE
-+ $(call if_changed,ld)
-+endif
-diff -urNp linux-2.6.25.orig/arch/x86/boot/compressed/misc_lzma.c linux-2.6.25/arch/x86/boot/compressed/misc_lzma.c
---- linux-2.6.25.orig/arch/x86/boot/compressed/misc_lzma.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.25/arch/x86/boot/compressed/misc_lzma.c 2008-05-08 17:02:10.000000000 +0200
-@@ -0,0 +1,311 @@
-+/*
-+ * misc_lzma.c
-+ *
-+ * Support for lzma compressed vmlinuz.
-+ * Based on original misc.c and GPL lzma patches found on internet.
++#ifdef CONFIG_KERNEL_LZMA
++#include "../../../../lib/decompress_unlzma.c"
++#endif
+
+ static void scroll(void)
+ {
+@@ -291,38 +238,6 @@ static void *memcpy(void *dest, const vo
+ return dest;
+ }
+
+-/* ===========================================================================
+- * Fill the input buffer. This is called only when the buffer is empty
+- * and at least one byte is really needed.
+- */
+-static int fill_inbuf(void)
+-{
+- error("ran out of input data");
+- return 0;
+-}
+-
+-/* ===========================================================================
+- * Write the output window window[0..outcnt-1] and update crc and bytes_out.
+- * (Used for the decompressed data only.)
+- */
+-static void flush_window(void)
+-{
+- /* With my window equal to my output buffer
+- * I only need to compute the crc here.
+- */
+- unsigned long c = crc; /* temporary variable */
+- unsigned n;
+- unsigned char *in, ch;
+-
+- in = window;
+- for (n = 0; n < outcnt; n++) {
+- ch = *in++;
+- c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);
+- }
+- crc = c;
+- bytes_out += (unsigned long)outcnt;
+- outcnt = 0;
+-}
+
+ static void error(char *x)
+ {
+@@ -405,12 +320,8 @@ asmlinkage void decompress_kernel(void *
+ lines = real_mode->screen_info.orig_video_lines;
+ cols = real_mode->screen_info.orig_video_cols;
+
+- window = output; /* Output buffer (Normally at 1M) */
+ free_mem_ptr = heap; /* Heap */
+ free_mem_end_ptr = heap + BOOT_HEAP_SIZE;
+- inbuf = input_data; /* Input buffer */
+- insize = input_len;
+- inptr = 0;
+
+ #ifdef CONFIG_X86_64
+ if ((unsigned long)output & (__KERNEL_ALIGN - 1))
+@@ -428,10 +339,9 @@ asmlinkage void decompress_kernel(void *
+ #endif
+ #endif
+
+- makecrc();
+ if (!quiet)
+ putstr("\nDecompressing Linux... ");
+- gunzip();
++ decompress(input_data, input_len, NULL, NULL, output, NULL, error);
+ 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-29 08:54:14.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).
+
++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.
++
++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.27.orig/include/asm-x86/boot.h linux-2.6.27/include/asm-x86/boot.h
+--- linux-2.6.27.orig/include/asm-x86/boot.h 2008-10-29 08:47:54.000000000 +0100
++++ linux-2.6.27/include/asm-x86/boot.h 2008-10-29 08:54:19.000000000 +0100
+@@ -17,11 +17,21 @@
+ + (CONFIG_PHYSICAL_ALIGN - 1)) \
+ & ~(CONFIG_PHYSICAL_ALIGN - 1))
+
++#if (defined CONFIG_KERNEL_BZIP2)
++#define BOOT_HEAP_SIZE 0x400000
++#else
++
+ #ifdef CONFIG_X86_64
+ #define BOOT_HEAP_SIZE 0x7000
+-#define BOOT_STACK_SIZE 0x4000
+ #else
+ #define BOOT_HEAP_SIZE 0x4000
++#endif
++
++#endif
++
++#ifdef CONFIG_X86_64
++#define BOOT_STACK_SIZE 0x4000
++#else
+ #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-29 08:54:07.000000000 +0100
+@@ -0,0 +1,10 @@
++#ifndef DECOMPRESS_BUNZIP2_H
++#define DECOMPRESS_BUNZIP2_H
++
++int bunzip2(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
+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-29 08:54:07.000000000 +0100
+@@ -0,0 +1,30 @@
++#ifndef DECOMPRESS_GENERIC_H
++#define DECOMPRESS_GENERIC_H
++
++/* Minimal chunksize to be read.
++ *Bzip2 prefers at least 4096
++ *Lzma prefers 0x10000 */
++#define COMPR_IOBUF_SIZE 4096
++
++typedef int (*decompress_fn) (unsigned char *inbuf, int len,
++ int(*fill)(void*, unsigned int),
++ int(*writebb)(void*, unsigned int),
++ unsigned char *output,
++ int *posp,
++ void(*error)(char *x));
++
++/* inbuf - input buffer
++ *len - len of pre-read data in inbuf
++ *fill - function to fill inbuf if empty
++ *writebb - function to write out outbug
++ *posp - if non-null, input position (number of bytes read) will be
++ * returned here
+ *
++ *If len != 0, the inbuf is initialized (with as much data), and fill
++ *should not be called
++ *If len = 0, the inbuf is allocated, but empty. Its size is IOBUF_SIZE
++ *fill should be called (repeatedly...) to read data, at most IOBUF_SIZE
+ */
+
-+#undef CONFIG_PARAVIRT
-+#ifdef CONFIG_X86_64
-+#define _LINUX_STRING_H_ 1
-+#define __LINUX_BITMAP_H 1
++
++#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-29 08:54:07.000000000 +0100
+@@ -0,0 +1,13 @@
++#ifndef INFLATE_H
++#define INFLATE_H
++
++/* Other housekeeping constants */
++#define INBUFSIZ 4096
++
++int gunzip(unsigned char *inbuf, int len,
++ int(*fill)(void*, unsigned int),
++ int(*flush)(void*, unsigned int),
++ unsigned char *output,
++ 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-29 08:59:22.000000000 +0100
+@@ -0,0 +1,88 @@
++/*
++ * linux/compr_mm.h
++ *
++ * Memory management for pre-boot and ramdisk uncompressors
++ *
++ * Authors: Alain Knaff <alain at knaff.lu>
++ *
++ */
++
++#ifndef DECOMPR_MM_H
++#define DECOMPR_MM_H
++
++#ifdef STATIC
++
++/* Code active when included from pre-boot environment: */
+
-+#include <linux/linkage.h>
-+#include <linux/screen_info.h>
-+#include <asm/io.h>
-+#include <asm/page.h>
-+#include <asm/boot.h>
-+
-+/* WARNING!!
-+ * This code is compiled with -fPIC and it is relocated dynamically
-+ * at run time, but no relocation processing is performed.
-+ * This means that it is not safe to place pointers in static structures.
++/* A trivial malloc implementation, adapted from
++ * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
+ */
++static unsigned long malloc_ptr;
++static int malloc_count;
+
-+#define OF(args) args
-+#define STATIC static
++static void *malloc(int size)
++{
++ void *p;
+
-+#undef memcpy
++ if (size < 0)
++ error("Malloc error");
++ if (!malloc_ptr)
++ malloc_ptr = free_mem_ptr;
+
-+typedef unsigned char uch;
-+typedef unsigned short ush;
-+typedef unsigned long ulg;
-+
-+#define WSIZE 0x80000000 /* Window size must be at least 32k,
-+ * and a power of two
-+ * We don't actually have a window just
-+ * a huge output buffer so I report
-+ * a 2G windows size, as that should
-+ * always be larger than our output buffer.
-+ */
++ malloc_ptr = (malloc_ptr + 3) & ~3; /* Align */
+
-+static uch *inbuf; /* input buffer */
-+static uch *window; /* Sliding window buffer, (and final output buffer) */
++ p = (void *)malloc_ptr;
++ malloc_ptr += size;
+
-+static unsigned insize; /* valid bytes in inbuf */
-+static unsigned inptr; /* index of next byte to be processed in inbuf */
++ if (free_mem_end_ptr && malloc_ptr >= free_mem_end_ptr)
++ error("Out of memory");
+
-+/* gzip flag byte */
-+#define ASCII_FLAG 0x01 /* bit 0 set: file probably ASCII text */
-+#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
-+#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
-+#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
-+#define COMMENT 0x10 /* bit 4 set: file comment present */
-+#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
-+#define RESERVED 0xC0 /* bit 6,7: reserved */
++ malloc_count++;
++ return p;
++}
+
-+#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf())
-+
-+/* Diagnostic functions */
-+#ifdef DEBUG
-+# define Assert(cond,msg) {if(!(cond)) error(msg);}
-+# define Trace(x) fprintf x
-+# define Tracev(x) {if (verbose) fprintf x ;}
-+# define Tracevv(x) {if (verbose>1) fprintf x ;}
-+# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
-+# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
-+#else
-+# define Assert(cond,msg)
-+# define Trace(x)
-+# define Tracev(x)
-+# define Tracevv(x)
-+# define Tracec(c,x)
-+# define Tracecv(c,x)
-+#endif
++static void free(void *where)
++{
++ malloc_count--;
++ if (!malloc_count)
++ malloc_ptr = free_mem_ptr;
++}
+
-+static int fill_inbuf(void);
-+static void error(char *m);
-+
-+/*
-+ * This is set up by the setup-routine at boot-time
-+ */
-+static unsigned char *real_mode; /* Pointer to real-mode data */
++#define large_malloc(a) malloc(a)
++#define large_free(a) free(a)
++
++#define set_error_fn(x)
++#define panic error
++
++#define INIT
++
++#else /* STATIC */
++
++/* Code active when compiled standalone for use when loading ramdisk: */
++
++#include <linux/kernel.h>
++#include <linux/fs.h>
++#include <linux/string.h>
++#include <linux/vmalloc.h>
++
++/* Use defines rather than static inline in order to avoid spurious
++ * warnings when not needed (indeed large_malloc / large_free are not
++ * needed by inflate */
++
++#define malloc(a) kmalloc(a, GFP_KERNEL)
++#define free(a) kfree(a)
++
++#define large_malloc(a) vmalloc(a)
++#define large_free(a) vfree(a)
++
++static void(*error)(char *m);
++#define set_error_fn(x) error = x;
++
++#define INIT __init
++#define STATIC
++
++#include <linux/init.h>
++
++#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-29 08:54:07.000000000 +0100
+@@ -0,0 +1,12 @@
++#ifndef DECOMPRESS_UNLZMA_H
++#define DECOMPRESS_UNLZMA_H
++
++int unlzma(unsigned char *, int,
++ int(*fill)(void*, unsigned int),
++ int(*flush)(void*, unsigned int),
++ unsigned char *output,
++ int *posp,
++ void(*error)(char *x)
++ );
+
-+#define RM_EXT_MEM_K (*(unsigned short *)(real_mode + 0x2))
-+#ifndef STANDARD_MEMORY_BIOS_CALL
-+#define RM_ALT_MEM_K (*(unsigned long *)(real_mode + 0x1e0))
+#endif
-+#define RM_SCREEN_INFO (*(struct screen_info *)(real_mode+0))
+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-29 08:54:14.000000000 +0100
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-CRI-lzma-vmlinuz.patch?r1=1.1.2.4&r2=1.1.2.5&f=u
More information about the pld-cvs-commit
mailing list