aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic-2.6/patches/002-lzma_decompress.patch
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2007-05-23 19:48:34 +0000
committerImre Kaloz <kaloz@openwrt.org>2007-05-23 19:48:34 +0000
commit615e8af8411e64db4db57d453af00ea9a7ca1fa2 (patch)
treeb4fa16ada763cf659876a3ef907e0e49e4cb73f1 /target/linux/generic-2.6/patches/002-lzma_decompress.patch
parente1bb43f263ea0a0c72bac8750fb420697ca7866f (diff)
downloadupstream-615e8af8411e64db4db57d453af00ea9a7ca1fa2.tar.gz
upstream-615e8af8411e64db4db57d453af00ea9a7ca1fa2.tar.bz2
upstream-615e8af8411e64db4db57d453af00ea9a7ca1fa2.zip
break trunk temporary - upgrade to 2.6.21.1 and iptables 1.3.7
SVN-Revision: 7315
Diffstat (limited to 'target/linux/generic-2.6/patches/002-lzma_decompress.patch')
-rw-r--r--target/linux/generic-2.6/patches/002-lzma_decompress.patch241
1 files changed, 126 insertions, 115 deletions
diff --git a/target/linux/generic-2.6/patches/002-lzma_decompress.patch b/target/linux/generic-2.6/patches/002-lzma_decompress.patch
index ca9767729c..d39d3d6877 100644
--- a/target/linux/generic-2.6/patches/002-lzma_decompress.patch
+++ b/target/linux/generic-2.6/patches/002-lzma_decompress.patch
@@ -1,15 +1,110 @@
---- linux-2.6.19.old/lib/Makefile 2007-04-18 17:41:22.679403384 +0200
-+++ linux-2.6.19.dev/lib/Makefile 2007-04-18 17:41:43.303268080 +0200
-@@ -54,6 +54,7 @@
- obj-$(CONFIG_AUDIT_GENERIC) += audit.o
-
- obj-$(CONFIG_SWIOTLB) += swiotlb.o
-+obj-y += LzmaDecode.o
-
- hostprogs-y := gen_crc32table
- clean-files := crc32table.h
---- linux-2.6.19.old/lib/LzmaDecode.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.19.dev/lib/LzmaDecode.c 2006-12-14 03:13:20.000000000 +0100
+diff -Nur linux-2.6.21.1/include/linux/LzmaDecode.h linux-2.6.21.1-owrt/include/linux/LzmaDecode.h
+--- linux-2.6.21.1/include/linux/LzmaDecode.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.21.1-owrt/include/linux/LzmaDecode.h 2007-05-14 10:51:05.000000000 +0200
+@@ -0,0 +1,100 @@
++/*
++ LzmaDecode.h
++ LZMA Decoder interface
++
++ LZMA SDK 4.05 Copyright (c) 1999-2004 Igor Pavlov (2004-08-25)
++ http://www.7-zip.org/
++
++ LZMA SDK is licensed under two licenses:
++ 1) GNU Lesser General Public License (GNU LGPL)
++ 2) Common Public License (CPL)
++ It means that you can select one of these two licenses and
++ follow rules of that license.
++
++ SPECIAL EXCEPTION:
++ Igor Pavlov, as the author of this code, expressly permits you to
++ statically or dynamically link your code (or bind by name) to the
++ interfaces of this file without subjecting your linked code to the
++ terms of the CPL or GNU LGPL. Any modifications or additions
++ to this file, however, are subject to the LGPL or CPL terms.
++*/
++
++#ifndef __LZMADECODE_H
++#define __LZMADECODE_H
++
++/* #define _LZMA_IN_CB */
++/* Use callback for input data */
++
++/* #define _LZMA_OUT_READ */
++/* Use read function for output data */
++
++/* #define _LZMA_PROB32 */
++/* It can increase speed on some 32-bit CPUs,
++ but memory usage will be doubled in that case */
++
++/* #define _LZMA_LOC_OPT */
++/* Enable local speed optimizations inside code */
++
++#ifndef UInt32
++#ifdef _LZMA_UINT32_IS_ULONG
++#define UInt32 unsigned long
++#else
++#define UInt32 unsigned int
++#endif
++#endif
++
++#ifdef _LZMA_PROB32
++#define CProb UInt32
++#else
++#define CProb unsigned short
++#endif
++
++#define LZMA_RESULT_OK 0
++#define LZMA_RESULT_DATA_ERROR 1
++#define LZMA_RESULT_NOT_ENOUGH_MEM 2
++
++#ifdef _LZMA_IN_CB
++typedef struct _ILzmaInCallback
++{
++ int (*Read)(void *object, unsigned char **buffer, UInt32 *bufferSize);
++} ILzmaInCallback;
++#endif
++
++#define LZMA_BASE_SIZE 1846
++#define LZMA_LIT_SIZE 768
++
++/*
++bufferSize = (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp)))* sizeof(CProb)
++bufferSize += 100 in case of _LZMA_OUT_READ
++by default CProb is unsigned short,
++but if specify _LZMA_PROB_32, CProb will be UInt32(unsigned int)
++*/
++
++#ifdef _LZMA_OUT_READ
++int LzmaDecoderInit(
++ unsigned char *buffer, UInt32 bufferSize,
++ int lc, int lp, int pb,
++ unsigned char *dictionary, UInt32 dictionarySize,
++ #ifdef _LZMA_IN_CB
++ ILzmaInCallback *inCallback
++ #else
++ unsigned char *inStream, UInt32 inSize
++ #endif
++);
++#endif
++
++int LzmaDecode(
++ unsigned char *buffer,
++ #ifndef _LZMA_OUT_READ
++ UInt32 bufferSize,
++ int lc, int lp, int pb,
++ #ifdef _LZMA_IN_CB
++ ILzmaInCallback *inCallback,
++ #else
++ unsigned char *inStream, UInt32 inSize,
++ #endif
++ #endif
++ unsigned char *outStream, UInt32 outSize,
++ UInt32 *outSizeProcessed);
++
++#endif
+diff -Nur linux-2.6.21.1/lib/LzmaDecode.c linux-2.6.21.1-owrt/lib/LzmaDecode.c
+--- linux-2.6.21.1/lib/LzmaDecode.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.21.1-owrt/lib/LzmaDecode.c 2007-05-14 10:51:05.000000000 +0200
@@ -0,0 +1,663 @@
+/*
+ LzmaDecode.c
@@ -674,107 +769,23 @@
+ *outSizeProcessed = nowPos;
+ return LZMA_RESULT_OK;
+}
---- linux-2.6.19.old/include/linux/LzmaDecode.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.19.dev/include/linux/LzmaDecode.h 2006-12-14 03:13:20.000000000 +0100
-@@ -0,0 +1,100 @@
-+/*
-+ LzmaDecode.h
-+ LZMA Decoder interface
-+
-+ LZMA SDK 4.05 Copyright (c) 1999-2004 Igor Pavlov (2004-08-25)
-+ http://www.7-zip.org/
-+
-+ LZMA SDK is licensed under two licenses:
-+ 1) GNU Lesser General Public License (GNU LGPL)
-+ 2) Common Public License (CPL)
-+ It means that you can select one of these two licenses and
-+ follow rules of that license.
-+
-+ SPECIAL EXCEPTION:
-+ Igor Pavlov, as the author of this code, expressly permits you to
-+ statically or dynamically link your code (or bind by name) to the
-+ interfaces of this file without subjecting your linked code to the
-+ terms of the CPL or GNU LGPL. Any modifications or additions
-+ to this file, however, are subject to the LGPL or CPL terms.
-+*/
-+
-+#ifndef __LZMADECODE_H
-+#define __LZMADECODE_H
-+
-+/* #define _LZMA_IN_CB */
-+/* Use callback for input data */
-+
-+/* #define _LZMA_OUT_READ */
-+/* Use read function for output data */
-+
-+/* #define _LZMA_PROB32 */
-+/* It can increase speed on some 32-bit CPUs,
-+ but memory usage will be doubled in that case */
-+
-+/* #define _LZMA_LOC_OPT */
-+/* Enable local speed optimizations inside code */
-+
-+#ifndef UInt32
-+#ifdef _LZMA_UINT32_IS_ULONG
-+#define UInt32 unsigned long
-+#else
-+#define UInt32 unsigned int
-+#endif
-+#endif
-+
-+#ifdef _LZMA_PROB32
-+#define CProb UInt32
-+#else
-+#define CProb unsigned short
-+#endif
-+
-+#define LZMA_RESULT_OK 0
-+#define LZMA_RESULT_DATA_ERROR 1
-+#define LZMA_RESULT_NOT_ENOUGH_MEM 2
-+
-+#ifdef _LZMA_IN_CB
-+typedef struct _ILzmaInCallback
-+{
-+ int (*Read)(void *object, unsigned char **buffer, UInt32 *bufferSize);
-+} ILzmaInCallback;
-+#endif
-+
-+#define LZMA_BASE_SIZE 1846
-+#define LZMA_LIT_SIZE 768
-+
-+/*
-+bufferSize = (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp)))* sizeof(CProb)
-+bufferSize += 100 in case of _LZMA_OUT_READ
-+by default CProb is unsigned short,
-+but if specify _LZMA_PROB_32, CProb will be UInt32(unsigned int)
-+*/
-+
-+#ifdef _LZMA_OUT_READ
-+int LzmaDecoderInit(
-+ unsigned char *buffer, UInt32 bufferSize,
-+ int lc, int lp, int pb,
-+ unsigned char *dictionary, UInt32 dictionarySize,
-+ #ifdef _LZMA_IN_CB
-+ ILzmaInCallback *inCallback
-+ #else
-+ unsigned char *inStream, UInt32 inSize
-+ #endif
-+);
-+#endif
-+
-+int LzmaDecode(
-+ unsigned char *buffer,
-+ #ifndef _LZMA_OUT_READ
-+ UInt32 bufferSize,
-+ int lc, int lp, int pb,
-+ #ifdef _LZMA_IN_CB
-+ ILzmaInCallback *inCallback,
-+ #else
-+ unsigned char *inStream, UInt32 inSize,
-+ #endif
-+ #endif
-+ unsigned char *outStream, UInt32 outSize,
-+ UInt32 *outSizeProcessed);
+diff -Nur linux-2.6.21.1/lib/Makefile linux-2.6.21.1-owrt/lib/Makefile
+--- linux-2.6.21.1/lib/Makefile 2007-04-27 23:49:26.000000000 +0200
++++ linux-2.6.21.1-owrt/lib/Makefile 2007-05-14 10:52:43.000000000 +0200
+@@ -12,7 +12,7 @@
+
+ lib-y += kobject.o kref.o kobject_uevent.o klist.o
+
+-obj-y += sort.o parser.o halfmd4.o debug_locks.o random32.o bust_spinlocks.o
++obj-y += sort.o parser.o halfmd4.o debug_locks.o random32.o bust_spinlocks.o LzmaDecode.o
+
+ ifeq ($(CONFIG_DEBUG_KOBJECT),y)
+ CFLAGS_kobject.o += -DDEBUG
+@@ -56,6 +56,7 @@
+ obj-$(CONFIG_AUDIT_GENERIC) += audit.o
+
+ obj-$(CONFIG_SWIOTLB) += swiotlb.o
+
-+#endif
-
+ obj-$(CONFIG_FAULT_INJECTION) += fault-inject.o
+
+ lib-$(CONFIG_GENERIC_BUG) += bug.o