summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-10-02 16:42:57 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-10-02 16:42:57 +0000
commit0fdff487b9164eb469b8aef9ae4be1bf5da33c09 (patch)
tree91c0a83abd043be1c7dd3aa0af018eb1bc7fb8c8
parentd6d36454f162e119c56d6023ea517cc80766c53f (diff)
[tools] mtd-utils: refresh patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23179 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--tools/mtd-utils/patches/100-optional_lzo.patch2
-rw-r--r--tools/mtd-utils/patches/101-ubifs-optional_lzo.patch12
-rw-r--r--tools/mtd-utils/patches/110-portability.patch18
-rw-r--r--tools/mtd-utils/patches/120-cygwin_fixes.patch18
-rw-r--r--tools/mtd-utils/patches/130-lzma_jffs2.patch66
5 files changed, 56 insertions, 60 deletions
diff --git a/tools/mtd-utils/patches/100-optional_lzo.patch b/tools/mtd-utils/patches/100-optional_lzo.patch
index 5af0ae23e..4bd3e5aba 100644
--- a/tools/mtd-utils/patches/100-optional_lzo.patch
+++ b/tools/mtd-utils/patches/100-optional_lzo.patch
@@ -1,6 +1,6 @@
--- a/Makefile
+++ b/Makefile
-@@ -42,10 +42,15 @@ $(SYMLINKS):
+@@ -43,10 +43,15 @@ $(SYMLINKS):
ln -sf ../fs/jffs2/$@ $@
$(BUILDDIR)/mkfs.jffs2: $(addprefix $(BUILDDIR)/,\
diff --git a/tools/mtd-utils/patches/101-ubifs-optional_lzo.patch b/tools/mtd-utils/patches/101-ubifs-optional_lzo.patch
index 9f797e01b..7ab4f63ba 100644
--- a/tools/mtd-utils/patches/101-ubifs-optional_lzo.patch
+++ b/tools/mtd-utils/patches/101-ubifs-optional_lzo.patch
@@ -1,5 +1,3 @@
-diff --git a/mkfs.ubifs/Makefile b/mkfs.ubifs/Makefile
-index a678b0a..919ce89 100644
--- a/mkfs.ubifs/Makefile
+++ b/mkfs.ubifs/Makefile
@@ -6,7 +6,7 @@ ALL_SOURCES=*.[ch] hashtable/*.[ch]
@@ -11,8 +9,6 @@ index a678b0a..919ce89 100644
LDLIBS_mkfs.ubifs += -L$(BUILDDIR)/../lib -lmtd -lcrc32
LDLIBS_mkfs.ubifs += $(ZLIBLDFLAGS) $(LZOLDFLAGS)
-diff --git a/mkfs.ubifs/compr.c b/mkfs.ubifs/compr.c
-index e378c5d..0208f80 100644
--- a/mkfs.ubifs/compr.c
+++ b/mkfs.ubifs/compr.c
@@ -24,7 +24,9 @@
@@ -25,7 +21,7 @@ index e378c5d..0208f80 100644
#include <linux/types.h>
#define crc32 __zlib_crc32
-@@ -85,6 +87,16 @@ static int zlib_deflate(void *in_buf, si
+@@ -86,6 +88,16 @@ static int zlib_deflate(void *in_buf, si
return 0;
}
@@ -42,7 +38,7 @@ index e378c5d..0208f80 100644
static int lzo_compress(void *in_buf, size_t in_len, void *out_buf,
size_t *out_len)
{
-@@ -103,14 +115,16 @@ static int lzo_compress(void *in_buf, si
+@@ -104,14 +116,16 @@ static int lzo_compress(void *in_buf, si
return 0;
}
@@ -64,7 +60,7 @@ index e378c5d..0208f80 100644
static char *zlib_buf;
static int favor_lzo_compress(void *in_buf, size_t in_len, void *out_buf,
-@@ -197,9 +211,11 @@ int compress_data(void *in_buf, size_t i
+@@ -198,9 +212,11 @@ int compress_data(void *in_buf, size_t i
int init_compression(void)
{
@@ -76,7 +72,7 @@ index e378c5d..0208f80 100644
zlib_buf = malloc(UBIFS_BLOCK_SIZE * WORST_COMPR_FACTOR);
if (!zlib_buf) {
-@@ -213,7 +229,9 @@ int init_compression(void)
+@@ -214,7 +230,9 @@ int init_compression(void)
void destroy_compression(void)
{
free(zlib_buf);
diff --git a/tools/mtd-utils/patches/110-portability.patch b/tools/mtd-utils/patches/110-portability.patch
index 43b4faaca..3b71231e4 100644
--- a/tools/mtd-utils/patches/110-portability.patch
+++ b/tools/mtd-utils/patches/110-portability.patch
@@ -10,14 +10,14 @@
#include "compr.h"
--- a/compr_zlib.c
+++ b/compr_zlib.c
-@@ -35,7 +35,6 @@
- #include <stdint.h>
+@@ -39,7 +39,6 @@
#include <zlib.h>
+ #undef crc32
#include <stdio.h>
-#include <asm/types.h>
#include <linux/jffs2.h>
+ #include "common.h"
#include "compr.h"
-
--- a/rbtree.h
+++ b/rbtree.h
@@ -94,8 +94,7 @@ static inline struct page * rb_insert_pa
@@ -67,7 +67,7 @@
#include <sys/types.h>
--- a/mkfs.ubifs/mkfs.ubifs.c
+++ b/mkfs.ubifs/mkfs.ubifs.c
-@@ -773,8 +773,8 @@ int write_leb(int lnum, int len, void *b
+@@ -805,8 +805,8 @@ int write_leb(int lnum, int len, void *b
if (ubi_leb_change_start(ubi, out_fd, lnum, c->leb_size, dtype))
return sys_err_msg("ubi_leb_change_start failed");
@@ -78,7 +78,7 @@
(long long)pos);
if (write(out_fd, buf, c->leb_size) != c->leb_size)
-@@ -1029,6 +1029,7 @@ static int add_inode_with_data(struct st
+@@ -1063,6 +1063,7 @@ static int add_inode_with_data(struct st
if (c->default_compr != UBIFS_COMPR_NONE)
use_flags |= UBIFS_COMPR_FL;
@@ -86,7 +86,7 @@
if (flags & FS_COMPR_FL)
use_flags |= UBIFS_COMPR_FL;
if (flags & FS_SYNC_FL)
-@@ -1039,6 +1040,7 @@ static int add_inode_with_data(struct st
+@@ -1073,6 +1074,7 @@ static int add_inode_with_data(struct st
use_flags |= UBIFS_APPEND_FL;
if (flags & FS_DIRSYNC_FL && S_ISDIR(st->st_mode))
use_flags |= UBIFS_DIRSYNC_FL;
@@ -94,7 +94,7 @@
memset(ino, 0, UBIFS_INO_NODE_SZ);
-@@ -1108,7 +1110,9 @@ static int add_dir_inode(DIR *dir, ino_t
+@@ -1142,7 +1144,9 @@ static int add_dir_inode(DIR *dir, ino_t
fd = dirfd(dir);
if (fd == -1)
return sys_err_msg("dirfd failed");
@@ -104,7 +104,7 @@
flags = 0;
}
-@@ -1293,10 +1297,12 @@ static int add_file(const char *path_nam
+@@ -1327,10 +1331,12 @@ static int add_file(const char *path_nam
key_write(&key, &dn->key);
dn->size = cpu_to_le32(bytes_read);
out_len = NODE_BUFFER_SIZE - UBIFS_DATA_NODE_SZ;
@@ -117,7 +117,7 @@
use_compr = c->default_compr;
compr_type = compress_data(buf, bytes_read, &dn->data,
&out_len, use_compr);
-@@ -1338,7 +1344,9 @@ static int add_non_dir(const char *path_
+@@ -1372,7 +1378,9 @@ static int add_non_dir(const char *path_
if (fd == -1)
return sys_err_msg("failed to open file '%s'",
path_name);
diff --git a/tools/mtd-utils/patches/120-cygwin_fixes.patch b/tools/mtd-utils/patches/120-cygwin_fixes.patch
index 2b6cafedd..e1c04048e 100644
--- a/tools/mtd-utils/patches/120-cygwin_fixes.patch
+++ b/tools/mtd-utils/patches/120-cygwin_fixes.patch
@@ -373,9 +373,9 @@
+
--- a/mkfs.jffs2.c
+++ b/mkfs.jffs2.c
-@@ -75,6 +75,14 @@
- #include "crc32.h"
- #include "rbtree.h"
+@@ -76,6 +76,14 @@
+
+ #include "common.h"
+#ifdef __CYGWIN__
+#include <cygwin/ioctl.h>
@@ -388,7 +388,7 @@
/* Do not use the weird XPG version of basename */
#undef basename
-@@ -474,7 +482,7 @@ static struct filesystem_entry *recursiv
+@@ -375,7 +383,7 @@ static struct filesystem_entry *recursiv
the following macros use it if available or use a hacky workaround...
*/
@@ -397,7 +397,7 @@
#define SCANF_PREFIX "a"
#define SCANF_STRING(s) (&s)
#define GETCWD_SIZE 0
-@@ -557,6 +565,14 @@ static int interpret_table_entry(struct
+@@ -458,6 +466,14 @@ static int interpret_table_entry(struct
}
entry = find_filesystem_entry(root, name, mode);
if (entry) {
@@ -412,7 +412,7 @@
/* Ok, we just need to fixup the existing entry
* and we will be all done... */
entry->sb.st_uid = uid;
-@@ -566,11 +582,21 @@ static int interpret_table_entry(struct
+@@ -467,11 +483,21 @@ static int interpret_table_entry(struct
entry->sb.st_rdev = makedev(major, minor);
}
} else {
@@ -434,8 +434,8 @@
+ }
free(tmp);
if (parent == NULL) {
- error_msg ("skipping device_table entry '%s': no parent directory!", name);
-@@ -584,6 +610,7 @@ static int interpret_table_entry(struct
+ errmsg ("skipping device_table entry '%s': no parent directory!", name);
+@@ -485,6 +511,7 @@ static int interpret_table_entry(struct
add_host_filesystem_entry(name, hostpath, uid, gid, mode, 0, parent);
break;
case 'f':
@@ -445,7 +445,7 @@
case 'p':
--- a/ubi-utils/src/libubi.c
+++ b/ubi-utils/src/libubi.c
-@@ -30,6 +30,9 @@
+@@ -32,6 +32,9 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
diff --git a/tools/mtd-utils/patches/130-lzma_jffs2.patch b/tools/mtd-utils/patches/130-lzma_jffs2.patch
index d75ad3139..b2364b637 100644
--- a/tools/mtd-utils/patches/130-lzma_jffs2.patch
+++ b/tools/mtd-utils/patches/130-lzma_jffs2.patch
@@ -1,4 +1,4 @@
---- a/Makefile
+--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
@@ -9,7 +9,7 @@
ifeq ($(WITHOUT_XATTR), 1)
CPPFLAGS += -DWITHOUT_XATTR
-@@ -51,7 +51,9 @@ $(SYMLINKS):
+@@ -52,7 +52,9 @@ $(SYMLINKS):
ln -sf ../fs/jffs2/$@ $@
$(BUILDDIR)/mkfs.jffs2: $(addprefix $(BUILDDIR)/,\
@@ -20,9 +20,9 @@
compr.o rbtree.o)
LDFLAGS_mkfs.jffs2 := $(ZLIBLDFLAGS)
LDLIBS_mkfs.jffs2 := -lz
---- a/compr.c 2009-06-05 16:59:08.000000000 +0200
-+++ b/compr.c 2010-03-20 23:16:14.556367000 +0100
-@@ -520,6 +520,9 @@
+--- a/compr.c
++++ b/compr.c
+@@ -520,6 +520,9 @@ int jffs2_compressors_init(void)
#ifdef CONFIG_JFFS2_LZO
jffs2_lzo_init();
#endif
@@ -32,7 +32,7 @@
return 0;
}
-@@ -534,5 +537,8 @@
+@@ -534,5 +537,8 @@ int jffs2_compressors_exit(void)
#ifdef CONFIG_JFFS2_LZO
jffs2_lzo_exit();
#endif
@@ -41,8 +41,8 @@
+#endif
return 0;
}
---- a/compr.h 2010-03-20 23:08:46.289595000 +0100
-+++ b/compr.h 2010-03-20 23:51:41.953345921 +0100
+--- a/compr.h
++++ b/compr.h
@@ -18,13 +18,14 @@
#define CONFIG_JFFS2_ZLIB
@@ -72,8 +72,8 @@
+
#endif /* __JFFS2_COMPR_H__ */
---- a/compr_lzma.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/compr_lzma.c 2010-03-20 23:16:15.048654497 +0100
+--- /dev/null
++++ b/compr_lzma.c
@@ -0,0 +1,128 @@
+/*
+ * JFFS2 -- Journalling Flash File System, Version 2.
@@ -203,8 +203,8 @@
+ jffs2_unregister_compressor(&jffs2_lzma_comp);
+ lzma_free_workspace();
+}
---- a/include/linux/jffs2.h 2009-06-05 16:59:08.000000000 +0200
-+++ b/include/linux/jffs2.h 2010-03-20 23:16:15.305246000 +0100
+--- a/include/linux/jffs2.h
++++ b/include/linux/jffs2.h
@@ -47,6 +47,7 @@
#define JFFS2_COMPR_DYNRUBIN 0x05
#define JFFS2_COMPR_ZLIB 0x06
@@ -213,8 +213,8 @@
/* Compatibility flags. */
#define JFFS2_COMPAT_MASK 0xc000 /* What do to if an unknown nodetype is found */
#define JFFS2_NODE_ACCURATE 0x2000
---- a/include/linux/lzma.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/include/linux/lzma.h 2010-03-20 23:16:16.380508712 +0100
+--- /dev/null
++++ b/include/linux/lzma.h
@@ -0,0 +1,61 @@
+#ifndef __LZMA_H__
+#define __LZMA_H__
@@ -277,8 +277,8 @@
+static ISzAlloc lzma_alloc = {p_lzma_malloc, p_lzma_free};
+
+#endif
---- a/include/linux/lzma/LzFind.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/include/linux/lzma/LzFind.h 2010-03-20 23:19:44.189059515 +0100
+--- /dev/null
++++ b/include/linux/lzma/LzFind.h
@@ -0,0 +1,116 @@
+/* LzFind.h -- Match finder for LZ algorithms
+2008-04-04
@@ -396,8 +396,8 @@
+void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
+
+#endif
---- a/include/linux/lzma/LzHash.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/include/linux/lzma/LzHash.h 2010-03-20 23:19:44.588791287 +0100
+--- /dev/null
++++ b/include/linux/lzma/LzHash.h
@@ -0,0 +1,56 @@
+/* LzHash.h -- HASH functions for LZ algorithms
+2008-03-26
@@ -455,8 +455,8 @@
+ hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); }
+
+#endif
---- a/include/linux/lzma/LzmaDec.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/include/linux/lzma/LzmaDec.h 2010-03-20 23:19:43.766328000 +0100
+--- /dev/null
++++ b/include/linux/lzma/LzmaDec.h
@@ -0,0 +1,232 @@
+/* LzmaDec.h -- LZMA Decoder
+2008-04-29
@@ -690,8 +690,8 @@
+ ELzmaStatus *status, ISzAlloc *alloc);
+
+#endif
---- a/include/linux/lzma/LzmaEnc.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/include/linux/lzma/LzmaEnc.h 2010-03-20 23:19:47.392642470 +0100
+--- /dev/null
++++ b/include/linux/lzma/LzmaEnc.h
@@ -0,0 +1,74 @@
+/* LzmaEnc.h -- LZMA Encoder
+2008-04-27
@@ -767,8 +767,8 @@
+ ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
+
+#endif
---- a/include/linux/lzma/Types.h 1970-01-01 01:00:00.000000000 +0100
-+++ b/include/linux/lzma/Types.h 2010-03-20 23:19:44.013465852 +0100
+--- /dev/null
++++ b/include/linux/lzma/Types.h
@@ -0,0 +1,130 @@
+/* Types.h -- Basic types
+2008-04-11
@@ -900,8 +900,8 @@
+#define IAlloc_Free(p, a) (p)->Free((p), a)
+
+#endif
---- a/lzma/LzFind.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/lzma/LzFind.c 2010-03-20 23:19:47.990406000 +0100
+--- /dev/null
++++ b/lzma/LzFind.c
@@ -0,0 +1,753 @@
+/* LzFind.c -- Match finder for LZ algorithms
+2008-04-04
@@ -1656,8 +1656,8 @@
+ vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip;
+ }
+}
---- a/lzma/LzmaDec.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/lzma/LzmaDec.c 2010-03-20 23:19:44.413562000 +0100
+--- /dev/null
++++ b/lzma/LzmaDec.c
@@ -0,0 +1,1014 @@
+/* LzmaDec.c -- LZMA Decoder
+2008-04-29
@@ -2673,8 +2673,8 @@
+ LzmaDec_FreeProbs(&p, alloc);
+ return res;
+}
---- a/lzma/LzmaEnc.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/lzma/LzmaEnc.c 2010-03-20 23:19:47.815156000 +0100
+--- /dev/null
++++ b/lzma/LzmaEnc.c
@@ -0,0 +1,2335 @@
+/* LzmaEnc.c -- LZMA Encoder
+2008-04-28
@@ -5011,9 +5011,9 @@
+ LzmaEnc_Destroy(p, alloc, allocBig);
+ return res;
+}
---- a/mkfs.jffs2.c 2009-06-05 16:59:08.000000000 +0200
-+++ b/mkfs.jffs2.c 2010-03-20 23:16:16.877026000 +0100
-@@ -1761,11 +1761,11 @@ int main(int argc, char **argv)
+--- a/mkfs.jffs2.c
++++ b/mkfs.jffs2.c
+@@ -1691,11 +1691,11 @@ int main(int argc, char **argv)
}
erase_block_size *= units;