SOURCES (LINUX_2_6): kernel-bzip2-lzma.patch - update from http://udpcast.l...

areq areq at pld-linux.org
Thu Sep 25 13:57:45 CEST 2008


Author: areq                         Date: Thu Sep 25 11:57:45 2008 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- update from http://udpcast.linux.lu/download/bzip2-lzma-kernel-2.6.26.3.patch.gz

---- Files affected:
SOURCES:
   kernel-bzip2-lzma.patch (1.1.2.5 -> 1.1.2.6) 

---- Diffs:

================================================================
Index: SOURCES/kernel-bzip2-lzma.patch
diff -u SOURCES/kernel-bzip2-lzma.patch:1.1.2.5 SOURCES/kernel-bzip2-lzma.patch:1.1.2.6
--- SOURCES/kernel-bzip2-lzma.patch:1.1.2.5	Fri May 16 17:06:10 2008
+++ SOURCES/kernel-bzip2-lzma.patch	Thu Sep 25 13:57:39 2008
@@ -1,5 +1,60 @@
---- e/arch/x86/boot/compressed/Makefile	2007-12-18 21:55:57.000000000 +0000
-+++ e/arch/x86/boot/compressed/Makefile	2007-12-27 09:13:47.000000000 +0000
+diff -purN -X linux-2.6.26.3udpcast/Documentation/dontdiff linux-2.6.26.3/arch/x86/boot/compressed/head_32.S linux-2.6.26.3udpcast/arch/x86/boot/compressed/head_32.S
+--- linux-2.6.26.3/arch/x86/boot/compressed/head_32.S	2008-08-20 20:11:37.000000000 +0200
++++ linux-2.6.26.3udpcast/arch/x86/boot/compressed/head_32.S	2008-09-06 12:23:22.000000000 +0200
+@@ -75,7 +75,11 @@ startup_32:
+ 
+ 	/* Replace the compressed data size with the uncompressed size */
+ 	subl input_len(%ebp), %ebx
++#ifdef CONFIG_KERNEL_LZMA
++	movl output_len_lzma(%ebp), %eax
++#else
+ 	movl output_len(%ebp), %eax
++#endif
+ 	addl %eax, %ebx
+ 	/* Add 8 bytes for every 32K input block */
+ 	shrl $12, %eax
+@@ -135,7 +139,11 @@ relocated:
+ /*
+  * Do the decompression, and jump to the new kernel..
+  */
++#ifdef CONFIG_KERNEL_LZMA
++	movl output_len_lzma(%ebx), %eax
++#else
+ 	movl output_len(%ebx), %eax
++#endif
+ 	pushl %eax
+ 	pushl %ebp	# output address
+ 	movl input_len(%ebx), %eax
+diff -purN -X linux-2.6.26.3udpcast/Documentation/dontdiff linux-2.6.26.3/arch/x86/boot/compressed/head_64.S linux-2.6.26.3udpcast/arch/x86/boot/compressed/head_64.S
+--- linux-2.6.26.3/arch/x86/boot/compressed/head_64.S	2008-08-20 20:11:37.000000000 +0200
++++ linux-2.6.26.3udpcast/arch/x86/boot/compressed/head_64.S	2008-09-06 21:27:59.000000000 +0200
+@@ -89,7 +89,11 @@ startup_32:
+ 
+ 	/* Replace the compressed data size with the uncompressed size */
+ 	subl	input_len(%ebp), %ebx
++#ifdef CONFIG_KERNEL_LZMA
++	movl	output_len_lzma(%ebp), %eax
++#else
+ 	movl	output_len(%ebp), %eax
++#endif
+ 	addl	%eax, %ebx
+ 	/* Add 8 bytes for every 32K input block */
+ 	shrl	$12, %eax
+@@ -232,7 +236,11 @@ ENTRY(startup_64)
+ 	/* Replace the compressed data size with the uncompressed size */
+ 	movl	input_len(%rip), %eax
+ 	subq	%rax, %rbx
++#ifdef CONFIG_KERNEL_LZMA
++	movl	output_len_lzma(%rip), %eax
++#else
+ 	movl	output_len(%rip), %eax
++#endif
+ 	addq	%rax, %rbx
+ 	/* Add 8 bytes for every 32K input block */
+ 	shrq	$12, %rax
+diff -purN -X linux-2.6.26.3udpcast/Documentation/dontdiff linux-2.6.26.3/arch/x86/boot/compressed/Makefile linux-2.6.26.3udpcast/arch/x86/boot/compressed/Makefile
+--- linux-2.6.26.3/arch/x86/boot/compressed/Makefile	2008-08-20 20:11:37.000000000 +0200
++++ linux-2.6.26.3udpcast/arch/x86/boot/compressed/Makefile	2008-09-04 20:04:13.000000000 +0200
 @@ -4,7 +4,7 @@
  # create a compressed vmlinux image from the original vmlinux
  #
@@ -9,44 +64,32 @@
  
  KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
  KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
-@@ -50,6 +50,23 @@
- $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
+@@ -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)
- endif
-+
-+ifdef CONFIG_RELOCATABLE
 +$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin.all FORCE
 +	$(call if_changed,bzip2)
-+else
-+$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
-+	$(call if_changed,bzip2)
-+endif
-+
-+ifdef CONFIG_RELOCATABLE
 +$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin.all FORCE
 +	$(call if_changed,lzma)
-+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)
-+endif
-+
+ endif
  LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T
  
  else
-@@ -55,6 +73,12 @@
  $(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
  
-@@ -65,6 +76,9 @@
  LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T
  endif
  
@@ -57,30 +100,26 @@
 -$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
 +$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE
  	$(call if_changed,ld)
---- e/arch/x86/boot/compressed/misc.c	2007-12-27 10:02:06.000000000 +0000
-+++ e/arch/x86/boot/compressed/misc.c	2007-12-27 11:58:57.000000000 +0000
-@@ -104,6 +104,7 @@
- 
- #define OF(args)  args
- #define STATIC static
-+#define MYSTATIC static
- 
- #undef memset
- #undef memcpy
-@@ -121,9 +122,12 @@
- 				 * always be larger than our output buffer.
- 				 */
+diff -purN -X linux-2.6.26.3udpcast/Documentation/dontdiff linux-2.6.26.3/arch/x86/boot/compressed/misc.c linux-2.6.26.3udpcast/arch/x86/boot/compressed/misc.c
+--- linux-2.6.26.3/arch/x86/boot/compressed/misc.c	2008-08-20 20:11:37.000000000 +0200
++++ linux-2.6.26.3udpcast/arch/x86/boot/compressed/misc.c	2008-09-06 21:34:29.000000000 +0200
+@@ -136,11 +136,15 @@ typedef unsigned long	ulg;
+ #define WSIZE		0x80000000
  
+ /* Input buffer: */
++
 +#ifdef CONFIG_KERNEL_GZIP
- static uch *inbuf;	/* input buffer */
+ static unsigned char	*inbuf;
 +#endif
- static uch *window;	/* Sliding window buffer, (and final output buffer) */
+ 
+ /* Sliding window buffer (and final output buffer): */
+ static unsigned char	*window;
  
 +#ifdef CONFIG_KERNEL_GZIP
- static unsigned insize;  /* valid bytes in inbuf */
- static unsigned inptr;   /* index of next byte to be processed in inbuf */
- static unsigned outcnt;  /* bytes in output buffer */
-@@ -158,9 +162,14 @@
+ /* Valid bytes in inbuf: */
+ static unsigned		insize;
+ 
+@@ -180,9 +184,14 @@ static unsigned		outcnt;
  
  static int  fill_inbuf(void);
  static void flush_window(void);
@@ -92,10 +131,10 @@
  static void gzip_mark(void **);
  static void gzip_release(void **);
 +#endif
-   
+ 
  /*
   * This is set up by the setup-routine at boot-time
-@@ -181,7 +190,9 @@
+@@ -203,7 +212,9 @@ static long bytes_out;
  static void *malloc(int size);
  static void free(void *where);
  
@@ -105,20 +144,7 @@
  static void *memcpy(void *dest, const void *src, unsigned n);
  
  static void putstr(const char *);
-@@ -189,8 +200,12 @@
- #ifdef CONFIG_X86_64
- #define HEAP_SIZE             0x7000
- #else
-+#if (defined CONFIG_KERNEL_BZIP2 || defined CONFIG_KERNEL_LZMA)
-+#define HEAP_SIZE             0x400000
-+#else
- #define HEAP_SIZE             0x4000
- #endif
-+#endif
- 
- static char *vidmem = (char *)0xb8000;
- static int vidport;
-@@ -199,7 +214,29 @@
+@@ -225,7 +236,30 @@ static int lines, cols;
  void *xquad_portio;
  #endif
  
@@ -143,12 +169,13 @@
 +#endif
 +
 +#ifdef CONFIG_KERNEL_LZMA
++#define IN_MEMORY
 +#include "../../../../lib/decompress_unlzma.c"
 +#endif
  
  static void *malloc(int size)
  {
-@@ -223,6 +260,7 @@
+@@ -251,6 +285,7 @@ static void free(void *where)
  {	/* Don't care */
  }
  
@@ -156,31 +183,31 @@
  static void gzip_mark(void **ptr)
  {
  	*ptr = (void *) free_mem_ptr;
-@@ -232,6 +270,7 @@
+@@ -260,6 +295,7 @@ static void gzip_release(void **ptr)
  {
- 	free_mem_ptr = (unsigned long) *ptr;
+ 	free_mem_ptr = (memptr) *ptr;
  }
 +#endif
-  
+ 
  static void scroll(void)
  {
-@@ -279,6 +318,7 @@
- 	outb_p(0xff & (pos >> 1), vidport+1);
+@@ -312,6 +348,7 @@ static void putstr(const char *s)
+ 	outb(0xff & (pos >> 1), vidport+1);
  }
  
 +#if (defined CONFIG_KERNEL_GZIP || defined CONFIG_KERNEL_BZIP2)
- static void* memset(void* s, int c, unsigned n)
+ static void *memset(void *s, int c, unsigned n)
  {
  	int i;
-@@ -287,6 +327,7 @@
- 	for (i=0;i<n;i++) ss[i] = c;
+@@ -320,6 +357,7 @@ static void *memset(void *s, int c, unsi
+ 	for (i = 0; i < n; i++) ss[i] = c;
  	return s;
  }
 +#endif
  
- static void* memcpy(void* dest, const void* src, unsigned n)
+ static void *memcpy(void *dest, const void *src, unsigned n)
  {
-@@ -297,6 +338,27 @@
+@@ -331,6 +369,27 @@ static void *memcpy(void *dest, const vo
  	return dest;
  }
  
@@ -194,11 +221,11 @@
 +    char *data = (char *) datav;
 +    unsigned n;
 +    uch *out;
-+    
-+    out = window; 
-+    for (n = 0; n < len; n++) {
++
++    out = window;
++    for (n = 0; n < len; n++)
 +	    *out++ = *data++;
-+    }
++
 +    bytes_out += (ulg)len;
 +    window += (ulg)len;
 +    return len;
@@ -208,18 +235,18 @@
  /* ===========================================================================
   * Fill the input buffer. This is called only when the buffer is empty
   * and at least one byte is really needed.
-@@ -329,6 +391,7 @@
- 	bytes_out += (ulg)outcnt;
+@@ -363,6 +422,7 @@ static void flush_window(void)
+ 	bytes_out += (unsigned long)outcnt;
  	outcnt = 0;
  }
 +#endif
  
  static void error(char *x)
  {
-@@ -358,9 +421,11 @@
+@@ -444,9 +504,11 @@ asmlinkage void decompress_kernel(void *
  	window = output;		/* Output buffer (Normally at 1M) */
  	free_mem_ptr     = heap;	/* Heap */
- 	free_mem_end_ptr = heap + HEAP_SIZE;
+ 	free_mem_end_ptr = heap + BOOT_HEAP_SIZE;
 +#ifdef CONFIG_KERNEL_GZIP
  	inbuf  = input_data;		/* Input buffer */
  	insize = input_len;
@@ -227,8 +254,8 @@
 +#endif
  
  #ifdef CONFIG_X86_64
-
-@@ -371,9 +436,21 @@
+ 	if ((unsigned long)output & (__KERNEL_ALIGN - 1))
+@@ -464,9 +526,20 @@ asmlinkage void decompress_kernel(void *
  #endif
  #endif
  
@@ -236,10 +263,9 @@
 +	putstr("\nBunzipping Linux... ");
 +	bunzip2(input_data, input_len-4, NULL, compr_flush, NULL);
 +#endif
-+
 +#ifdef CONFIG_KERNEL_LZMA
 +	putstr("\nUnlzmaing Linux... ");
-+	unlzma(input_data, input_len-4, NULL, compr_flush, NULL);
++	unlzma(input_data, input_len, NULL, output, NULL);
 +#endif
 +
 +#ifdef CONFIG_KERNEL_GZIP
@@ -247,15 +273,49 @@
  	putstr("\nDecompressing Linux... ");
  	gunzip();
 +#endif
+ 	parse_elf(output);
  	putstr("done.\nBooting the kernel.\n");
  	return;
- }
-diff -urN linux-2.6.23.12/drivers/block/Kconfig linux-2.6.23.12udpcast/drivers/block/Kconfig
---- linux-2.6.23.12/drivers/block/Kconfig	2007-12-18 21:55:57.000000000 +0000
-+++ linux-2.6.23.12udpcast/drivers/block/Kconfig	2007-12-27 09:13:47.000000000 +0000
-@@ -374,6 +374,30 @@
- 	  setups function - apparently needed by the rd_load_image routine
- 	  that supposes the filesystem in the image uses a 1024 blocksize.
+diff -purN -X linux-2.6.26.3udpcast/Documentation/dontdiff linux-2.6.26.3/arch/x86/boot/compressed/vmlinux.scr linux-2.6.26.3udpcast/arch/x86/boot/compressed/vmlinux.scr
+--- linux-2.6.26.3/arch/x86/boot/compressed/vmlinux.scr	2008-08-20 20:11:37.000000000 +0200
++++ linux-2.6.26.3udpcast/arch/x86/boot/compressed/vmlinux.scr	2008-09-06 21:31:55.000000000 +0200
+@@ -3,6 +3,7 @@ SECTIONS
+   .rodata.compressed : {
+ 	input_len = .;
+ 	LONG(input_data_end - input_data) input_data = .;
++	output_len_lzma = . + 5;
+ 	*(.data)
+ 	output_len = . - 4;
+ 	input_data_end = .;
+diff -purN -X linux-2.6.26.3udpcast/Documentation/dontdiff linux-2.6.26.3/Documentation/dontdiff linux-2.6.26.3udpcast/Documentation/dontdiff
+--- linux-2.6.26.3/Documentation/dontdiff	2008-08-20 20:11:37.000000000 +0200
++++ linux-2.6.26.3udpcast/Documentation/dontdiff	2008-09-06 22:04:53.000000000 +0200
+@@ -183,10 +183,18 @@ vmlinux
+ vmlinux-*
+ vmlinux.aout
+ vmlinux*.lds*
+-vmlinux*.scr
+ vsyscall.lds
+ wanxlfw.inc
+ uImage
+ unifdef
+ zImage*
+ zconf.hash.c
++bounds.h
++cpustr.h
++vdso-syms.lds
++vdso.so.dbg
++mkcpustr
++vmlinux.bin.all
++vmlinux.bin.lzma
++vmlinux.bin.bz2
++vmlinux.bin.gz
+diff -purN -X linux-2.6.26.3udpcast/Documentation/dontdiff linux-2.6.26.3/drivers/block/Kconfig linux-2.6.26.3udpcast/drivers/block/Kconfig
+--- linux-2.6.26.3/drivers/block/Kconfig	2008-08-20 20:11:37.000000000 +0200
++++ linux-2.6.26.3udpcast/drivers/block/Kconfig	2008-09-03 19:47:02.000000000 +0200
+@@ -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"
@@ -284,9 +344,37 @@
  config CDROM_PKTCDVD
  	tristate "Packet writing on CD/DVD media"
  	depends on !UML
-diff -urN linux-2.6.23.12/include/linux/decompress_bunzip2.h linux-2.6.23.12udpcast/include/linux/decompress_bunzip2.h
---- linux-2.6.23.12/include/linux/decompress_bunzip2.h	1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23.12udpcast/include/linux/decompress_bunzip2.h	2007-12-27 11:59:44.000000000 +0000
+diff -purN -X linux-2.6.26.3udpcast/Documentation/dontdiff linux-2.6.26.3/include/asm-x86/boot.h linux-2.6.26.3udpcast/include/asm-x86/boot.h
+--- linux-2.6.26.3/include/asm-x86/boot.h	2008-08-20 20:11:37.000000000 +0200
++++ linux-2.6.26.3udpcast/include/asm-x86/boot.h	2008-09-06 21:33:56.000000000 +0200
+@@ -17,12 +17,23 @@
+ 				+ (CONFIG_PHYSICAL_ALIGN - 1)) \
+ 				& ~(CONFIG_PHYSICAL_ALIGN - 1))
+ 
++#if (defined CONFIG_KERNEL_BZIP2 || defined CONFIG_KERNEL_LZMA)
++#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
+ 
++
+ #endif /* _ASM_BOOT_H */
+diff -purN -X linux-2.6.26.3udpcast/Documentation/dontdiff linux-2.6.26.3/include/linux/decompress_bunzip2.h linux-2.6.26.3udpcast/include/linux/decompress_bunzip2.h
+--- linux-2.6.26.3/include/linux/decompress_bunzip2.h	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.26.3udpcast/include/linux/decompress_bunzip2.h	2008-09-05 23:51:20.000000000 +0200
 @@ -0,0 +1,20 @@
 +#ifndef DECOMPRESS_BUNZIP2_H
 +#define DECOMPRESS_BUNZIP2_H
@@ -294,156 +382,92 @@
 +/* Other housekeeping constants */
 +#define BZIP2_IOBUF_SIZE		4096
 +
-+#ifndef MYSTATIC
-+#define MYSTATIC
++#ifndef STATIC
++#define STATIC extern
 +#endif
 +
 +#ifndef INIT
-+#define INIT
++#define INIT /* */
 +#endif
 +
-+MYSTATIC int INIT bunzip2(char *inbuf, int len, 
-+			  int(*fill)(void*,unsigned int),
-+			  int(*flush)(void*,unsigned int),
-+			  int *pos);
++STATIC int INIT bunzip2(char *inbuf, int len,
++			int(*fill)(void*, unsigned int),
++			int(*flush)(void*, unsigned int),
++			int *pos);
 +
 +#endif
-diff -urN linux-2.6.23.12/include/linux/decompress_generic.h linux-2.6.23.12udpcast/include/linux/decompress_generic.h
---- linux-2.6.23.12/include/linux/decompress_generic.h	1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23.12udpcast/include/linux/decompress_generic.h	2007-12-27 09:13:47.000000000 +0000
+diff -purN -X linux-2.6.26.3udpcast/Documentation/dontdiff linux-2.6.26.3/include/linux/decompress_generic.h linux-2.6.26.3udpcast/include/linux/decompress_generic.h
+--- linux-2.6.26.3/include/linux/decompress_generic.h	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.26.3udpcast/include/linux/decompress_generic.h	2008-09-05 17:47:11.000000000 +0200
 @@ -0,0 +1,28 @@
 +#ifndef DECOMPRESS_GENERIC_H
 +#define DECOMPRESS_GENERIC_H
 +
 +/* Minimal chunksize to be read.
-+ * Bzip2 prefers at least 4096
-+ * Lzma prefers 0x10000 */
++ *Bzip2 prefers at least 4096
++ *Lzma prefers 0x10000 */
 +#define COMPR_IOBUF_SIZE	4096
 +
-+typedef int (*uncompress_fn) (char *inbuf, int len, 
-+			      int(*fill)(char*,unsigned int),
-+			      int(*writebb)(char*,unsigned int),
++typedef int (*uncompress_fn) (char *inbuf, int len,
++			      int(*fill)(char*, unsigned int),
++			      int(*writebb)(char*, unsigned int),
 +			      int *posp);
 +
 +/* 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
++ *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
++ *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
 + */
-+ 
++
 +
 +#endif
-diff -urN linux-2.6.23.12/include/linux/decompress_unlzma.h linux-2.6.23.12udpcast/include/linux/decompress_unlzma.h
---- linux-2.6.23.12/include/linux/decompress_unlzma.h	1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23.12udpcast/include/linux/decompress_unlzma.h	2007-12-27 11:59:39.000000000 +0000
-@@ -0,0 +1,19 @@
+diff -purN -X linux-2.6.26.3udpcast/Documentation/dontdiff linux-2.6.26.3/include/linux/decompress_unlzma.h linux-2.6.26.3udpcast/include/linux/decompress_unlzma.h
+--- linux-2.6.26.3/include/linux/decompress_unlzma.h	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.26.3udpcast/include/linux/decompress_unlzma.h	2008-09-06 10:03:46.000000000 +0200
+@@ -0,0 +1,24 @@
 +#ifndef DECOMPRESS_UNLZMA_H
 +#define DECOMPRESS_UNLZMA_H
 +
 +#define LZMA_IOBUF_SIZE	0x10000
 +
-+#ifndef MYSTATIC
-+#define MYSTATIC
++#ifndef STATIC
++#define STATIC extern
 +#endif
 +
 +#ifndef INIT
-+#define INIT
++#define INIT /* */
 +#endif
 +
-+MYSTATIC int INIT unlzma(char *,int,
-+			 int(*fill)(void*,unsigned int),
-+			 int(*flush)(void*,unsigned int),
-+			 int *);
-+
++STATIC int unlzma(char *, int,
++		  int(*fill)(void*, unsigned int),
++#ifdef IN_MEMORY
++		  unsigned char *output,
++#else
++		  int(*flush)(void*, unsigned int),
 +#endif
-diff -urN linux-2.6.23.12/init/Kconfig linux-2.6.23.12udpcast/init/Kconfig
---- linux-2.6.23.12/init/Kconfig	2007-12-18 21:55:57.000000000 +0000
-+++ linux-2.6.23.12udpcast/init/Kconfig	2007-12-27 09:13:47.000000000 +0000
-@@ -92,6 +92,56 @@
- 
- 	  which is done within the script "scripts/setlocalversion".)
- 
-+choice
-+        prompt "Kernel compression mode"
-+        default KERNEL_GZIP
-+        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'
++		  int *
++	);
 +
-+config KERNEL_GZIP
-+       bool "Gzip"
-+       help
-+         The old and tries 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"
-+	help
-+	  Its compression ratio and speed is intermediate.
-+	  Decompression speed is slowest among the 3.
-+	  The kernel size is about 10 per cent 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"
-+       help
-+         The most recent compression algorithm.
-+	 Its ratio is best, decompression speed is between the other
-+	 2. Compression is slowest.
-+	 The kernel size is about 33 per cent smaller with lzma,
-+	 in comparison to gzip.
-+
-+endchoice
-+
-+
- config SWAP
- 	bool "Support for paging of anonymous memory (swap)"
- 	depends on MMU && BLOCK
-diff -urN linux-2.6.23.12/init/do_mounts_rd.c linux-2.6.23.12udpcast/init/do_mounts_rd.c
---- linux-2.6.23.12/init/do_mounts_rd.c	2007-12-18 21:55:57.000000000 +0000
-+++ linux-2.6.23.12udpcast/init/do_mounts_rd.c	2007-12-27 10:58:08.000000000 +0000
-@@ -11,6 +11,16 @@
<<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.5&r2=1.1.2.6&f=u



More information about the pld-cvs-commit mailing list