X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/9b8a15dcde03aec801a4f5ec14f27f149179bf6c..ca1329b26cbf56d82efc682347f07f765d7f2dd6:/target/linux/rdc/patches-2.6.28/006-bzip2_lzma_x86.patch?ds=inline diff --git a/target/linux/rdc/patches-2.6.28/006-bzip2_lzma_x86.patch b/target/linux/rdc/patches-2.6.28/006-bzip2_lzma_x86.patch index 7e9252e2d..c1865a86b 100644 --- a/target/linux/rdc/patches-2.6.28/006-bzip2_lzma_x86.patch +++ b/target/linux/rdc/patches-2.6.28/006-bzip2_lzma_x86.patch @@ -1,228 +1,5 @@ -diff -urN linux-2.6.28.9/arch/arm/boot/compressed/Makefile linux-2.6.28.9.new/arch/arm/boot/compressed/Makefile ---- linux-2.6.28.9/arch/arm/boot/compressed/Makefile 2009-03-23 22:55:52.000000000 +0100 -+++ linux-2.6.28.9.new/arch/arm/boot/compressed/Makefile 2009-04-24 14:08:08.000000000 +0200 -@@ -67,8 +67,15 @@ - - SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ - --targets := vmlinux vmlinux.lds piggy.gz piggy.o font.o font.c \ -- head.o misc.o $(OBJS) -+suffix_$(CONFIG_KERNEL_GZIP) = gz -+suffix_$(CONFIG_KERNEL_BZIP2) = bz2 -+suffix_$(CONFIG_KERNEL_LZMA) = lzma -+ -+targets := vmlinux vmlinux.lds \ -+ piggy.gz piggy.gz.o \ -+ piggy.bz2 piggy.bz2.o \ -+ piggy.lzma piggy.lzma.o \ -+ font.o font.c head.o misc.o $(OBJS) - - ifeq ($(CONFIG_FUNCTION_TRACER),y) - ORIG_CFLAGS := $(KBUILD_CFLAGS) -@@ -95,7 +102,7 @@ - # would otherwise mess up our GOT table - CFLAGS_misc.o := -Dstatic= - --$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \ -+$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \ - $(addprefix $(obj)/, $(OBJS)) FORCE - $(call if_changed,ld) - @: -@@ -103,7 +110,17 @@ - $(obj)/piggy.gz: $(obj)/../Image FORCE - $(call if_changed,gzip) - --$(obj)/piggy.o: $(obj)/piggy.gz FORCE -+$(obj)/piggy.bz2: $(obj)/../Image FORCE -+ $(call if_changed,bzip2) -+ -+$(obj)/piggy.lzma: $(obj)/../Image FORCE -+ $(call if_changed,lzma) -+ -+$(obj)/piggy.gz.o: $(obj)/piggy.gz FORCE -+ -+$(obj)/piggy.bz2.o: $(obj)/piggy.bz2 FORCE -+ -+$(obj)/piggy.lzma.o: $(obj)/piggy.lzma FORCE - - CFLAGS_font.o := -Dstatic= - -diff -urN linux-2.6.28.9/arch/arm/boot/compressed/misc.c linux-2.6.28.9.new/arch/arm/boot/compressed/misc.c ---- linux-2.6.28.9/arch/arm/boot/compressed/misc.c 2009-03-23 22:55:52.000000000 +0100 -+++ linux-2.6.28.9.new/arch/arm/boot/compressed/misc.c 2009-04-24 14:08:08.000000000 +0200 -@@ -169,116 +169,34 @@ - /* - * gzip delarations - */ --#define OF(args) args - #define STATIC static - --typedef unsigned char uch; --typedef unsigned short ush; - typedef unsigned long ulg; - --#define WSIZE 0x8000 /* Window size must be at least 32k, */ -- /* and a power of two */ -- --static uch *inbuf; /* input buffer */ --static uch window[WSIZE]; /* Sliding window buffer */ -- --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 */ -- --/* 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 */ -- --#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 int fill_inbuf(void); --static void flush_window(void); --static void error(char *m); -- - extern char input_data[]; - extern char input_data_end[]; - --static uch *output_data; --static ulg output_ptr; --static ulg bytes_out; -- - static void error(char *m); - --static void putstr(const char *); -- --extern int end; - static ulg free_mem_ptr; - static ulg free_mem_end_ptr; - --#ifdef STANDALONE_DEBUG --#define NO_INFLATE_MALLOC --#endif -- - #define ARCH_HAS_DECOMP_WDOG -+#define NEW_CODE - -+#ifdef CONFIG_KERNEL_GZIP - #include "../../../../lib/inflate.c" -+#endif - --/* =========================================================================== -- * Fill the input buffer. This is called only when the buffer is empty -- * and at least one byte is really needed. -- */ --int fill_inbuf(void) --{ -- if (insize != 0) -- error("ran out of input data"); -+#ifdef CONFIG_KERNEL_BZIP2 -+#include "../../../../lib/decompress_bunzip2.c" -+#endif - -- inbuf = input_data; -- insize = &input_data_end[0] - &input_data[0]; -+#ifdef CONFIG_KERNEL_LZMA -+#include "../../../../lib/decompress_unlzma.c" -+#endif - -- inptr = 1; -- return inbuf[0]; --} - --/* =========================================================================== -- * Write the output window window[0..outcnt-1] and update crc and bytes_out. -- * (Used for the decompressed data only.) -- */ --void flush_window(void) --{ -- ulg c = crc; -- unsigned n; -- uch *in, *out, ch; -- -- in = window; -- out = &output_data[output_ptr]; -- for (n = 0; n < outcnt; n++) { -- ch = *out++ = *in++; -- c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8); -- } -- crc = c; -- bytes_out += (ulg)outcnt; -- output_ptr += (ulg)outcnt; -- outcnt = 0; -- putstr("."); --} - - #ifndef arch_error - #define arch_error(x) -@@ -301,16 +219,24 @@ - decompress_kernel(ulg output_start, ulg free_mem_ptr_p, ulg free_mem_ptr_end_p, - int arch_id) - { -- output_data = (uch *)output_start; /* Points to kernel start */ -- free_mem_ptr = free_mem_ptr_p; -- free_mem_end_ptr = free_mem_ptr_end_p; -+ ulg output_ptr; -+ ulg *ptr; -+ size_t input_len = input_data_end - input_data; -+ size_t pos = 0; -+ - __machine_arch_type = arch_id; - - arch_decomp_setup(); - -- makecrc(); -- putstr("Uncompressing Linux..."); -- gunzip(); -+ ptr = (ulg *) (((long)input_data_end) - 4); -+ output_ptr = output_start + *ptr; -+ -+ free_mem_ptr = output_ptr; -+ free_mem_end_ptr = output_ptr + 0x4000000; -+ -+ putstr("Decompressing Linux..."); -+ decompress(input_data, input_len, -+ NULL, NULL, (unsigned char *) output_start, &pos, error); - putstr(" done, booting the kernel.\n"); - return output_ptr; - } -@@ -320,11 +246,8 @@ - - int main() - { -- output_data = output_buffer; -- -- makecrc(); - putstr("Uncompressing Linux..."); -- gunzip(); -+ decompress(input_data, input_len, NULL, output_buffer, NULL); - putstr("done.\n"); - return 0; - } -diff -urN linux-2.6.28.9/arch/x86/boot/compressed/Makefile linux-2.6.28.9.new/arch/x86/boot/compressed/Makefile ---- linux-2.6.28.9/arch/x86/boot/compressed/Makefile 2009-03-23 22:55:52.000000000 +0100 -+++ linux-2.6.28.9.new/arch/x86/boot/compressed/Makefile 2009-04-24 14:10:01.000000000 +0200 +--- 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 # @@ -232,7 +9,7 @@ diff -urN linux-2.6.28.9/arch/x86/boot/compressed/Makefile linux-2.6.28.9.new/ar KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 KBUILD_CFLAGS += -fno-strict-aliasing -fPIC -@@ -47,9 +47,17 @@ +@@ -47,9 +47,17 @@ ifeq ($(CONFIG_X86_32),y) ifdef CONFIG_RELOCATABLE $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin.all FORCE $(call if_changed,gzip) @@ -250,7 +27,7 @@ diff -urN linux-2.6.28.9/arch/x86/boot/compressed/Makefile linux-2.6.28.9.new/ar endif LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T -@@ -60,5 +68,9 @@ +@@ -60,5 +68,9 @@ $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bi LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T endif @@ -261,9 +38,8 @@ diff -urN linux-2.6.28.9/arch/x86/boot/compressed/Makefile linux-2.6.28.9.new/ar + +$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE $(call if_changed,ld) -diff -urN linux-2.6.28.9/arch/x86/boot/compressed/misc.c linux-2.6.28.9.new/arch/x86/boot/compressed/misc.c ---- linux-2.6.28.9/arch/x86/boot/compressed/misc.c 2009-03-23 22:55:52.000000000 +0100 -+++ linux-2.6.28.9.new/arch/x86/boot/compressed/misc.c 2009-04-24 14:08:08.000000000 +0200 +--- a/arch/x86/boot/compressed/misc.c ++++ b/arch/x86/boot/compressed/misc.c @@ -116,71 +116,13 @@ /* * gzip declarations @@ -336,7 +112,7 @@ diff -urN linux-2.6.28.9/arch/x86/boot/compressed/misc.c linux-2.6.28.9.new/arch static void error(char *m); /* -@@ -189,11 +131,6 @@ +@@ -189,11 +131,6 @@ static void error(char *m); static struct boot_params *real_mode; /* Pointer to real-mode data */ static int quiet; @@ -348,7 +124,7 @@ diff -urN linux-2.6.28.9/arch/x86/boot/compressed/misc.c linux-2.6.28.9.new/arch static void *memset(void *s, int c, unsigned n); static void *memcpy(void *dest, const void *src, unsigned n); -@@ -213,7 +150,19 @@ +@@ -213,7 +150,19 @@ static char *vidmem; static int vidport; static int lines, cols; @@ -368,7 +144,7 @@ diff -urN linux-2.6.28.9/arch/x86/boot/compressed/misc.c linux-2.6.28.9.new/arch static void scroll(void) { -@@ -293,38 +242,6 @@ +@@ -293,38 +242,6 @@ static void *memcpy(void *dest, const vo return dest; } @@ -407,7 +183,7 @@ diff -urN linux-2.6.28.9/arch/x86/boot/compressed/misc.c linux-2.6.28.9.new/arch static void error(char *x) { -@@ -407,12 +324,8 @@ +@@ -407,12 +324,8 @@ asmlinkage void decompress_kernel(void * lines = real_mode->screen_info.orig_video_lines; cols = real_mode->screen_info.orig_video_cols; @@ -420,7 +196,7 @@ diff -urN linux-2.6.28.9/arch/x86/boot/compressed/misc.c linux-2.6.28.9.new/arch #ifdef CONFIG_X86_64 if ((unsigned long)output & (__KERNEL_ALIGN - 1)) -@@ -430,10 +343,9 @@ +@@ -430,10 +343,9 @@ asmlinkage void decompress_kernel(void * #endif #endif @@ -432,9 +208,8 @@ diff -urN linux-2.6.28.9/arch/x86/boot/compressed/misc.c linux-2.6.28.9.new/arch parse_elf(output); if (!quiet) putstr("done.\nBooting the kernel.\n"); -diff -urN linux-2.6.28.9/arch/x86/include/asm/boot.h linux-2.6.28.9.new/arch/x86/include/asm/boot.h ---- linux-2.6.28.9/arch/x86/include/asm/boot.h 2009-03-23 22:55:52.000000000 +0100 -+++ linux-2.6.28.9.new/arch/x86/include/asm/boot.h 2009-04-24 14:08:08.000000000 +0200 +--- a/arch/x86/include/asm/boot.h ++++ b/arch/x86/include/asm/boot.h @@ -15,11 +15,21 @@ + (CONFIG_PHYSICAL_ALIGN - 1)) \ & ~(CONFIG_PHYSICAL_ALIGN - 1)) @@ -458,10 +233,9 @@ diff -urN linux-2.6.28.9/arch/x86/include/asm/boot.h linux-2.6.28.9.new/arch/x86 #define BOOT_STACK_SIZE 0x1000 #endif -diff -urN linux-2.6.28.9/drivers/block/Kconfig linux-2.6.28.9.new/drivers/block/Kconfig ---- linux-2.6.28.9/drivers/block/Kconfig 2009-03-23 22:55:52.000000000 +0100 -+++ linux-2.6.28.9.new/drivers/block/Kconfig 2009-04-24 14:08:08.000000000 +0200 -@@ -358,6 +358,30 @@ +--- a/drivers/block/Kconfig ++++ b/drivers/block/Kconfig +@@ -358,6 +358,30 @@ config BLK_DEV_XIP will prevent RAM block device backing store memory from being allocated from highmem (only a problem for highmem systems). @@ -492,9 +266,8 @@ diff -urN linux-2.6.28.9/drivers/block/Kconfig linux-2.6.28.9.new/drivers/block/ config CDROM_PKTCDVD tristate "Packet writing on CD/DVD media" depends on !UML -diff -urN linux-2.6.28.9/include/linux/decompress/bunzip2.h linux-2.6.28.9.new/include/linux/decompress/bunzip2.h ---- linux-2.6.28.9/include/linux/decompress/bunzip2.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.28.9.new/include/linux/decompress/bunzip2.h 2009-04-24 14:08:08.000000000 +0200 +--- /dev/null ++++ b/include/linux/decompress/bunzip2.h @@ -0,0 +1,10 @@ +#ifndef DECOMPRESS_BUNZIP2_H +#define DECOMPRESS_BUNZIP2_H @@ -506,9 +279,8 @@ diff -urN linux-2.6.28.9/include/linux/decompress/bunzip2.h linux-2.6.28.9.new/i + int *pos, + void(*error)(char *x)); +#endif -diff -urN linux-2.6.28.9/include/linux/decompress/generic.h linux-2.6.28.9.new/include/linux/decompress/generic.h ---- linux-2.6.28.9/include/linux/decompress/generic.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.28.9.new/include/linux/decompress/generic.h 2009-04-24 14:08:08.000000000 +0200 +--- /dev/null ++++ b/include/linux/decompress/generic.h @@ -0,0 +1,30 @@ +#ifndef DECOMPRESS_GENERIC_H +#define DECOMPRESS_GENERIC_H @@ -540,9 +312,8 @@ diff -urN linux-2.6.28.9/include/linux/decompress/generic.h linux-2.6.28.9.new/i + + +#endif -diff -urN linux-2.6.28.9/include/linux/decompress/inflate.h linux-2.6.28.9.new/include/linux/decompress/inflate.h ---- linux-2.6.28.9/include/linux/decompress/inflate.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.28.9.new/include/linux/decompress/inflate.h 2009-04-24 14:08:08.000000000 +0200 +--- /dev/null ++++ b/include/linux/decompress/inflate.h @@ -0,0 +1,13 @@ +#ifndef INFLATE_H +#define INFLATE_H @@ -557,9 +328,8 @@ diff -urN linux-2.6.28.9/include/linux/decompress/inflate.h linux-2.6.28.9.new/i + int *pos, + void(*error_fn)(char *x)); +#endif -diff -urN linux-2.6.28.9/include/linux/decompress/mm.h linux-2.6.28.9.new/include/linux/decompress/mm.h ---- linux-2.6.28.9/include/linux/decompress/mm.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.28.9.new/include/linux/decompress/mm.h 2009-04-24 14:08:08.000000000 +0200 +--- /dev/null ++++ b/include/linux/decompress/mm.h @@ -0,0 +1,89 @@ +/* + * linux/compr_mm.h @@ -650,9 +420,8 @@ diff -urN linux-2.6.28.9/include/linux/decompress/mm.h linux-2.6.28.9.new/includ +#endif /* STATIC */ + +#endif /* DECOMPR_MM_H */ -diff -urN linux-2.6.28.9/include/linux/decompress/unlzma.h linux-2.6.28.9.new/include/linux/decompress/unlzma.h ---- linux-2.6.28.9/include/linux/decompress/unlzma.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.28.9.new/include/linux/decompress/unlzma.h 2009-04-24 14:08:08.000000000 +0200 +--- /dev/null ++++ b/include/linux/decompress/unlzma.h @@ -0,0 +1,12 @@ +#ifndef DECOMPRESS_UNLZMA_H +#define DECOMPRESS_UNLZMA_H @@ -666,10 +435,9 @@ diff -urN linux-2.6.28.9/include/linux/decompress/unlzma.h linux-2.6.28.9.new/in + ); + +#endif -diff -urN linux-2.6.28.9/init/Kconfig linux-2.6.28.9.new/init/Kconfig ---- linux-2.6.28.9/init/Kconfig 2009-03-23 22:55:52.000000000 +0100 -+++ linux-2.6.28.9.new/init/Kconfig 2009-04-24 14:08:08.000000000 +0200 -@@ -101,6 +101,56 @@ +--- a/init/Kconfig ++++ b/init/Kconfig +@@ -101,6 +101,56 @@ config LOCALVERSION_AUTO which is done within the script "scripts/setlocalversion".) @@ -726,9 +494,8 @@ diff -urN linux-2.6.28.9/init/Kconfig linux-2.6.28.9.new/init/Kconfig config SWAP bool "Support for paging of anonymous memory (swap)" depends on MMU && BLOCK -diff -urN linux-2.6.28.9/init/do_mounts_rd.c linux-2.6.28.9.new/init/do_mounts_rd.c ---- linux-2.6.28.9/init/do_mounts_rd.c 2009-04-24 13:59:44.000000000 +0200 -+++ linux-2.6.28.9.new/init/do_mounts_rd.c 2009-04-24 14:08:08.000000000 +0200 +--- a/init/do_mounts_rd.c ++++ b/init/do_mounts_rd.c @@ -11,6 +11,12 @@ #include "do_mounts.h" @@ -742,7 +509,7 @@ diff -urN linux-2.6.28.9/init/do_mounts_rd.c linux-2.6.28.9.new/init/do_mounts_r int __initdata rd_prompt = 1;/* 1 = prompt for RAM disk, 0 = don't prompt */ static int __init prompt_ramdisk(char *str) -@@ -29,7 +35,7 @@ +@@ -29,7 +35,7 @@ static int __init ramdisk_start_setup(ch } __setup("ramdisk_start=", ramdisk_start_setup); @@ -751,7 +518,7 @@ diff -urN linux-2.6.28.9/init/do_mounts_rd.c linux-2.6.28.9.new/init/do_mounts_r /* * This routine tries to find a RAM disk image to load, and returns the -@@ -46,7 +52,7 @@ +@@ -46,7 +52,7 @@ static int __init crd_load(int in_fd, in * gzip */ static int __init @@ -760,7 +527,7 @@ diff -urN linux-2.6.28.9/init/do_mounts_rd.c linux-2.6.28.9.new/init/do_mounts_r { const int size = 512; struct minix_super_block *minixsb; -@@ -74,6 +80,7 @@ +@@ -74,6 +80,7 @@ identify_ramdisk_image(int fd, int start sys_lseek(fd, start_block * BLOCK_SIZE, 0); sys_read(fd, buf, size); @@ -768,7 +535,7 @@ diff -urN linux-2.6.28.9/init/do_mounts_rd.c linux-2.6.28.9.new/init/do_mounts_r /* * If it matches the gzip magic numbers, return 0 */ -@@ -81,9 +88,39 @@ +@@ -81,9 +88,39 @@ identify_ramdisk_image(int fd, int start printk(KERN_NOTICE "RAMDISK: Compressed image found at block %d\n", start_block); @@ -808,7 +575,7 @@ diff -urN linux-2.6.28.9/init/do_mounts_rd.c linux-2.6.28.9.new/init/do_mounts_r /* romfs is at block zero too */ if (romfsb->word0 == ROMSB_WORD0 && -@@ -156,6 +193,7 @@ +@@ -156,6 +193,7 @@ int __init rd_load_image(char *from) int nblocks, i, disk; char *buf = NULL; unsigned short rotate = 0; @@ -816,7 +583,7 @@ diff -urN linux-2.6.28.9/init/do_mounts_rd.c linux-2.6.28.9.new/init/do_mounts_r #if !defined(CONFIG_S390) && !defined(CONFIG_PPC_ISERIES) char rotator[4] = { '|' , '/' , '-' , '\\' }; #endif -@@ -168,12 +206,12 @@ +@@ -168,12 +206,12 @@ int __init rd_load_image(char *from) if (in_fd < 0) goto noclose_input; @@ -831,7 +598,7 @@ diff -urN linux-2.6.28.9/init/do_mounts_rd.c linux-2.6.28.9.new/init/do_mounts_r goto successful_load; goto done; } -@@ -272,138 +310,48 @@ +@@ -272,138 +310,48 @@ int __init rd_load_disk(int n) return rd_load_image("/dev/root"); } @@ -993,10 +760,9 @@ diff -urN linux-2.6.28.9/init/do_mounts_rd.c linux-2.6.28.9.new/init/do_mounts_r - kfree(window); return result; } -diff -urN linux-2.6.28.9/init/initramfs.c linux-2.6.28.9.new/init/initramfs.c ---- linux-2.6.28.9/init/initramfs.c 2009-03-23 22:55:52.000000000 +0100 -+++ linux-2.6.28.9.new/init/initramfs.c 2009-04-24 14:13:53.000000000 +0200 -@@ -389,11 +389,14 @@ +--- a/init/initramfs.c ++++ b/init/initramfs.c +@@ -389,11 +389,14 @@ static int __init write_buffer(char *buf return len - count; } @@ -1013,7 +779,7 @@ diff -urN linux-2.6.28.9/init/initramfs.c linux-2.6.28.9.new/init/initramfs.c while ((written = write_buffer(buf, len)) < len && !message) { char c = buf[written]; if (c == '0') { -@@ -407,73 +410,14 @@ +@@ -407,73 +410,14 @@ static void __init flush_buffer(char *bu } else error("junk in compressed archive"); } @@ -1092,7 +858,7 @@ diff -urN linux-2.6.28.9/init/initramfs.c linux-2.6.28.9.new/init/initramfs.c static char * __init unpack_to_rootfs(char *buf, unsigned len, int check_only) { -@@ -482,9 +426,10 @@ +@@ -482,9 +426,10 @@ static char * __init unpack_to_rootfs(ch header_buf = kmalloc(110, GFP_KERNEL); symlink_buf = kmalloc(PATH_MAX + N_ALIGN(PATH_MAX) + 1, GFP_KERNEL); name_buf = kmalloc(N_ALIGN(PATH_MAX), GFP_KERNEL); @@ -1105,7 +871,7 @@ diff -urN linux-2.6.28.9/init/initramfs.c linux-2.6.28.9.new/init/initramfs.c state = Start; this_header = 0; message = NULL; -@@ -504,22 +449,38 @@ +@@ -504,22 +449,38 @@ static char * __init unpack_to_rootfs(ch continue; } this_header = 0; @@ -1157,10 +923,9 @@ diff -urN linux-2.6.28.9/init/initramfs.c linux-2.6.28.9.new/init/initramfs.c kfree(name_buf); kfree(symlink_buf); kfree(header_buf); -diff -urN linux-2.6.28.9/lib/Makefile linux-2.6.28.9.new/lib/Makefile ---- linux-2.6.28.9/lib/Makefile 2009-04-24 13:59:44.000000000 +0200 -+++ linux-2.6.28.9.new/lib/Makefile 2009-04-24 14:08:08.000000000 +0200 -@@ -11,7 +11,8 @@ +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -11,7 +11,8 @@ lib-y := ctype.o string.o vsprintf.o cmd rbtree.o radix-tree.o dump_stack.o \ idr.o int_sqrt.o extable.o prio_tree.o \ sha1.o irq_regs.o reciprocal_div.o argv_split.o \ @@ -1170,9 +935,8 @@ diff -urN linux-2.6.28.9/lib/Makefile linux-2.6.28.9.new/lib/Makefile lib-$(CONFIG_MMU) += ioremap.o lib-$(CONFIG_SMP) += cpumask.o -diff -urN linux-2.6.28.9/lib/decompress_bunzip2.c linux-2.6.28.9.new/lib/decompress_bunzip2.c ---- linux-2.6.28.9/lib/decompress_bunzip2.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.28.9.new/lib/decompress_bunzip2.c 2009-04-24 14:08:08.000000000 +0200 +--- /dev/null ++++ b/lib/decompress_bunzip2.c @@ -0,0 +1,735 @@ +/* vi: set sw = 4 ts = 4: */ +/* Small bzip2 deflate implementation, by Rob Landley (rob@landley.net). @@ -1909,9 +1673,8 @@ diff -urN linux-2.6.28.9/lib/decompress_bunzip2.c linux-2.6.28.9.new/lib/decompr +} + +#define decompress bunzip2 -diff -urN linux-2.6.28.9/lib/decompress_unlzma.c linux-2.6.28.9.new/lib/decompress_unlzma.c ---- linux-2.6.28.9/lib/decompress_unlzma.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.28.9.new/lib/decompress_unlzma.c 2009-04-24 14:08:08.000000000 +0200 +--- /dev/null ++++ b/lib/decompress_unlzma.c @@ -0,0 +1,647 @@ +/* Lzma decompressor for Linux kernel. Shamelessly snarfed + *from busybox 1.1.1 @@ -2560,10 +2323,9 @@ diff -urN linux-2.6.28.9/lib/decompress_unlzma.c linux-2.6.28.9.new/lib/decompre +} + +#define decompress unlzma -diff -urN linux-2.6.28.9/lib/inflate.c linux-2.6.28.9.new/lib/inflate.c ---- linux-2.6.28.9/lib/inflate.c 2009-03-23 22:55:52.000000000 +0100 -+++ linux-2.6.28.9.new/lib/inflate.c 2009-04-24 14:08:08.000000000 +0200 -@@ -109,20 +109,78 @@ +--- a/lib/inflate.c ++++ b/lib/inflate.c +@@ -109,20 +109,78 @@ static char rcsid[] = "#Id: inflate.c,v #endif #ifndef STATIC @@ -2651,7 +2413,7 @@ diff -urN linux-2.6.28.9/lib/inflate.c linux-2.6.28.9.new/lib/inflate.c #define slide window /* Huffman code lookup table entry--this entry is four bytes for machines -@@ -133,10 +191,10 @@ +@@ -133,10 +191,10 @@ static char rcsid[] = "#Id: inflate.c,v an unused code. If a code with e == 99 is looked up, this implies an error in the data. */ struct huft { @@ -2665,7 +2427,7 @@ diff -urN linux-2.6.28.9/lib/inflate.c linux-2.6.28.9.new/lib/inflate.c struct huft *t; /* pointer to next level of table */ } v; }; -@@ -144,7 +202,7 @@ +@@ -144,7 +202,7 @@ struct huft { /* Function prototypes */ STATIC int INIT huft_build OF((unsigned *, unsigned, unsigned, @@ -2674,7 +2436,7 @@ diff -urN linux-2.6.28.9/lib/inflate.c linux-2.6.28.9.new/lib/inflate.c STATIC int INIT huft_free OF((struct huft *)); STATIC int INIT inflate_codes OF((struct huft *, struct huft *, int, int)); STATIC int INIT inflate_stored OF((void)); -@@ -159,28 +217,28 @@ +@@ -159,28 +217,28 @@ STATIC int INIT inflate OF((void)); circular buffer. The index is updated simply by incrementing and then ANDing with 0x7fff (32K-1). */ /* It is left to other modules to supply the 32 K area. It is assumed @@ -2710,7 +2472,7 @@ diff -urN linux-2.6.28.9/lib/inflate.c linux-2.6.28.9.new/lib/inflate.c 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; -@@ -217,59 +275,21 @@ +@@ -217,59 +275,21 @@ static const ush cpdext[] = { /* the stream. */ @@ -2776,7 +2538,7 @@ diff -urN linux-2.6.28.9/lib/inflate.c linux-2.6.28.9.new/lib/inflate.c /* Huffman code decoding is performed using a multi-level table lookup. The fastest way to decode is to simply build a lookup table whose -@@ -307,7 +327,7 @@ +@@ -307,7 +327,7 @@ STATIC const int lbits = 9; /* STATIC const int dbits = 6; /* bits in base distance lookup table */ @@ -2785,7 +2547,7 @@ diff -urN linux-2.6.28.9/lib/inflate.c linux-2.6.28.9.new/lib/inflate.c #define BMAX 16 /* maximum bit length of any code (16 for explode) */ #define N_MAX 288 /* maximum number of codes in any set */ -@@ -319,8 +339,8 @@ +@@ -319,8 +339,8 @@ STATIC int INIT huft_build( unsigned *b, /* code lengths in bits (all assumed <= BMAX) */ unsigned n, /* number of codes (assumed <= N_MAX) */ unsigned s, /* number of simple-valued codes (0..s-1) */ @@ -2796,7 +2558,7 @@ diff -urN linux-2.6.28.9/lib/inflate.c linux-2.6.28.9.new/lib/inflate.c struct huft **t, /* result: starting table */ int *m /* maximum lookup bits, returns actual */ ) -@@ -500,8 +520,8 @@ +@@ -500,8 +520,8 @@ DEBG1("5 "); if (h) { x[h] = i; /* save pattern for backing up */ @@ -2807,7 +2569,7 @@ diff -urN linux-2.6.28.9/lib/inflate.c linux-2.6.28.9.new/lib/inflate.c r.v.t = q; /* pointer to this table */ j = i >> (w - l); /* (get around Turbo C bug) */ u[h-1][j] = r; /* connect to last table */ -@@ -511,18 +531,18 @@ +@@ -511,18 +531,18 @@ DEBG1("6 "); DEBG("h6c "); /* set up table entry in r */ @@ -2830,7 +2592,7 @@ diff -urN linux-2.6.28.9/lib/inflate.c linux-2.6.28.9.new/lib/inflate.c r.v.n = d[*p++ - s]; } DEBG("h6d "); -@@ -592,11 +612,12 @@ +@@ -592,11 +612,12 @@ STATIC int INIT inflate_codes( Return an error code or zero if it all goes ok. */ { register unsigned e; /* table entry flag/number of extra bits */ @@ -2845,7 +2607,7 @@ diff -urN linux-2.6.28.9/lib/inflate.c linux-2.6.28.9.new/lib/inflate.c register unsigned k; /* number of bits in bit buffer */ -@@ -622,7 +643,7 @@ +@@ -622,7 +643,7 @@ STATIC int INIT inflate_codes( DUMPBITS(t->b) if (e == 16) /* then it's a literal */ { @@ -2854,7 +2616,7 @@ diff -urN linux-2.6.28.9/lib/inflate.c linux-2.6.28.9.new/lib/inflate.c Tracevv((stderr, "%c", slide[w-1])); if (w == WSIZE) { -@@ -659,11 +680,25 @@ +@@ -659,11 +680,25 @@ STATIC int INIT inflate_codes( /* do the copy */ do { @@ -2882,7 +2644,7 @@ diff -urN linux-2.6.28.9/lib/inflate.c linux-2.6.28.9.new/lib/inflate.c w += e; d += e; } -@@ -673,9 +708,8 @@ +@@ -673,9 +708,8 @@ STATIC int INIT inflate_codes( slide[w++] = slide[d++]; Tracevv((stderr, "%c", slide[w-1])); } while (--e); @@ -2894,7 +2656,7 @@ diff -urN linux-2.6.28.9/lib/inflate.c linux-2.6.28.9.new/lib/inflate.c w = 0; } } while (n); -@@ -702,7 +736,7 @@ +@@ -702,7 +736,7 @@ STATIC int INIT inflate_stored(void) { unsigned n; /* number of bytes in block */ unsigned w; /* current window position */ @@ -2903,7 +2665,7 @@ diff -urN linux-2.6.28.9/lib/inflate.c linux-2.6.28.9.new/lib/inflate.c register unsigned k; /* number of bits in bit buffer */ DEBG(" $@ @@ -3122,9 +2883,8 @@ diff -urN linux-2.6.28.9/scripts/Makefile.lib linux-2.6.28.9.new/scripts/Makefil + +quiet_cmd_lzma = LZMA $@ +cmd_lzma = (/usr/bin/lzma -9 -c $< ; $(size_append) $<) >$@ || (rm -f $@ ; false) -diff -urN linux-2.6.28.9/scripts/bin_size linux-2.6.28.9.new/scripts/bin_size ---- linux-2.6.28.9/scripts/bin_size 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.28.9.new/scripts/bin_size 2009-04-24 14:08:08.000000000 +0200 +--- /dev/null ++++ b/scripts/bin_size @@ -0,0 +1,10 @@ +#!/bin/sh +