From 97a286cb62475a3dce30c2c69d1248f0b98288c4 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 13 Sep 2010 18:50:41 +0000 Subject: revert r23048 for now until Darwin compile issues have been sorted out (#7934) SVN-Revision: 23057 --- tools/mtd-utils/patches/100-optional_lzo.patch | 21 ++++++++++++---- .../mtd-utils/patches/101-ubifs-optional_lzo.patch | 29 +++++++++++----------- tools/mtd-utils/patches/120-cygwin_fixes.patch | 2 +- tools/mtd-utils/patches/130-lzma_jffs2.patch | 17 ++++++------- tools/mtd-utils/patches/131-fix_lib_compile.patch | 11 -------- 5 files changed, 40 insertions(+), 40 deletions(-) delete mode 100644 tools/mtd-utils/patches/131-fix_lib_compile.patch (limited to 'tools/mtd-utils/patches') diff --git a/tools/mtd-utils/patches/100-optional_lzo.patch b/tools/mtd-utils/patches/100-optional_lzo.patch index 5af0ae2..d9ebc3e 100644 --- a/tools/mtd-utils/patches/100-optional_lzo.patch +++ b/tools/mtd-utils/patches/100-optional_lzo.patch @@ -1,14 +1,15 @@ --- a/Makefile +++ b/Makefile -@@ -42,10 +42,15 @@ $(SYMLINKS): +@@ -36,10 +36,16 @@ $(SYMLINKS): ln -sf ../fs/jffs2/$@ $@ $(BUILDDIR)/mkfs.jffs2: $(addprefix $(BUILDDIR)/,\ -- compr_rtime.o mkfs.jffs2.o compr_zlib.o compr_lzo.o \ -+ compr_rtime.o mkfs.jffs2.o compr_zlib.o $(if $(NO_LZO),,compr_lzo.o) \ +- crc32.o compr_rtime.o mkfs.jffs2.o compr_zlib.o compr_lzo.o \ ++ crc32.o compr_rtime.o mkfs.jffs2.o compr_zlib.o $(if $(NO_LZO),,compr_lzo.o) \ compr.o rbtree.o) -LDFLAGS_mkfs.jffs2 = $(ZLIBLDFLAGS) $(LZOLDFLAGS) -LDLIBS_mkfs.jffs2 = -lz -llzo2 ++ +LDFLAGS_mkfs.jffs2 := $(ZLIBLDFLAGS) +LDLIBS_mkfs.jffs2 := -lz +ifndef NO_LZO @@ -17,5 +18,15 @@ +CPPFLAGS += -DCONFIG_JFFS2_LZO +endif - $(BUILDDIR)/jffs2reader: $(BUILDDIR)/jffs2reader.o - LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS) + $(BUILDDIR)/flash_eraseall: $(BUILDDIR)/crc32.o $(BUILDDIR)/flash_eraseall.o + +--- a/compr.h ++++ b/compr.h +@@ -18,7 +18,6 @@ + + #define CONFIG_JFFS2_ZLIB + #define CONFIG_JFFS2_RTIME +-#define CONFIG_JFFS2_LZO + + #define JFFS2_RUBINMIPS_PRIORITY 10 + #define JFFS2_DYNRUBIN_PRIORITY 20 diff --git a/tools/mtd-utils/patches/101-ubifs-optional_lzo.patch b/tools/mtd-utils/patches/101-ubifs-optional_lzo.patch index 9f797e0..d49c94b 100644 --- a/tools/mtd-utils/patches/101-ubifs-optional_lzo.patch +++ b/tools/mtd-utils/patches/101-ubifs-optional_lzo.patch @@ -2,47 +2,48 @@ 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] +@@ -5,7 +5,7 @@ ALL_SOURCES=*.[ch] hashtable/*.[ch] TARGETS = mkfs.ubifs --LDLIBS_mkfs.ubifs = -lz -llzo2 -lm -luuid -L$(BUILDDIR)/../ubi-utils/ -lubi -+LDLIBS_mkfs.ubifs = -lz $(if,$(NO_LZO),,-llzo2) -lm -luuid -L$(BUILDDIR)/../ubi-utils/ -lubi - LDLIBS_mkfs.ubifs += -L$(BUILDDIR)/../lib -lmtd -lcrc32 - LDLIBS_mkfs.ubifs += $(ZLIBLDFLAGS) $(LZOLDFLAGS) +-LDLIBS_mkfs.ubifs = -lz -llzo2 -lm -luuid -L../ubi-utils/ -lubi ++LDLIBS_mkfs.ubifs = -lz $(if,$(NO_LZO),,-llzo2) -lm -luuid -L../ubi-utils/ -lubi + + include ../common.mk 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 @@ - #include +@@ -25,7 +25,9 @@ #include #include + #include +#if CONFIG_UBIFS_LZO #include +#endif #include - #define crc32 __zlib_crc32 -@@ -85,6 +87,16 @@ static int zlib_deflate(void *in_buf, si + #include "compr.h" +@@ -83,6 +85,17 @@ static int zlib_deflate(void *in_buf, size_t in_len, void *out_buf, return 0; } +static int no_compress(void *in_buf, size_t in_len, void *out_buf, -+ size_t *out_len) ++ size_t *out_len) +{ + memcpy(out_buf, in_buf, in_len); + *out_len = in_len; + return 0; +} + ++ +#if CONFIG_UBIFS_LZO + 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 +@@ -101,14 +114,16 @@ static int lzo_compress(void *in_buf, size_t in_len, void *out_buf, return 0; } @@ -56,7 +57,7 @@ index e378c5d..0208f80 100644 - memcpy(out_buf, in_buf, in_len); - *out_len = in_len; - return 0; -+ return 1; ++ return -1; } +#endif @@ -64,7 +65,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 +@@ -195,9 +210,11 @@ int compress_data(void *in_buf, size_t in_len, void *out_buf, size_t *out_len, int init_compression(void) { @@ -76,7 +77,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) +@@ -211,7 +228,9 @@ int init_compression(void) void destroy_compression(void) { free(zlib_buf); diff --git a/tools/mtd-utils/patches/120-cygwin_fixes.patch b/tools/mtd-utils/patches/120-cygwin_fixes.patch index 116660a..61a6d5e 100644 --- a/tools/mtd-utils/patches/120-cygwin_fixes.patch +++ b/tools/mtd-utils/patches/120-cygwin_fixes.patch @@ -9,7 +9,7 @@ +endif + +ifneq ($(shell uname -o),Cygwin) - SUBDIRS = lib ubi-utils mkfs.ubifs + SUBDIRS = ubi-utils mkfs.ubifs TARGETS = ftl_format flash_erase flash_eraseall nanddump doc_loadbios \ @@ -17,6 +22,10 @@ TARGETS = ftl_format flash_erase flash_e diff --git a/tools/mtd-utils/patches/130-lzma_jffs2.patch b/tools/mtd-utils/patches/130-lzma_jffs2.patch index d75ad31..0f2b8af 100644 --- a/tools/mtd-utils/patches/130-lzma_jffs2.patch +++ b/tools/mtd-utils/patches/130-lzma_jffs2.patch @@ -1,5 +1,5 @@ --- a/Makefile -+++ b/Makefile ++++ b/Makefile @@ -1,7 +1,7 @@ # -*- sh -*- @@ -9,17 +9,17 @@ ifeq ($(WITHOUT_XATTR), 1) CPPFLAGS += -DWITHOUT_XATTR -@@ -51,7 +51,9 @@ $(SYMLINKS): +@@ -45,7 +45,9 @@ ln -sf ../fs/jffs2/$@ $@ $(BUILDDIR)/mkfs.jffs2: $(addprefix $(BUILDDIR)/,\ -- compr_rtime.o mkfs.jffs2.o compr_zlib.o $(if $(NO_LZO),,compr_lzo.o) \ -+ compr_rtime.o mkfs.jffs2.o compr_zlib.o \ +- crc32.o compr_rtime.o mkfs.jffs2.o compr_zlib.o $(if $(NO_LZO),,compr_lzo.o) \ ++ crc32.o compr_rtime.o mkfs.jffs2.o compr_zlib.o \ + $(if $(NO_LZO),,compr_lzo.o) \ -+ compr_lzma.o lzma/LzFind.o lzma/LzmaEnc.o lzma/LzmaDec.o \ ++ compr_lzma.o lzma/LzFind.o lzma/LzmaEnc.o lzma/LzmaDec.o\ 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 @@ @@ -43,11 +43,10 @@ } --- a/compr.h 2010-03-20 23:08:46.289595000 +0100 +++ b/compr.h 2010-03-20 23:51:41.953345921 +0100 -@@ -18,13 +18,14 @@ +@@ -18,12 +18,14 @@ #define CONFIG_JFFS2_ZLIB #define CONFIG_JFFS2_RTIME --#define CONFIG_JFFS2_LZO +#define CONFIG_JFFS2_LZMA #define JFFS2_RUBINMIPS_PRIORITY 10 @@ -61,7 +60,7 @@ #define JFFS2_COMPR_MODE_NONE 0 #define JFFS2_COMPR_MODE_PRIORITY 1 -@@ -115,5 +116,10 @@ void jffs2_rtime_exit(void); +@@ -114,5 +116,10 @@ int jffs2_lzo_init(void); void jffs2_lzo_exit(void); #endif diff --git a/tools/mtd-utils/patches/131-fix_lib_compile.patch b/tools/mtd-utils/patches/131-fix_lib_compile.patch deleted file mode 100644 index 288e0d4..0000000 --- a/tools/mtd-utils/patches/131-fix_lib_compile.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -67,8 +67,6 @@ $(BUILDDIR)/jffs2reader: $(BUILDDIR)/jff - LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS) - LDLIBS_jffs2reader = -lz -llzo2 - --$(BUILDDIR)/lib/libmtd.a: subdirs_lib_all ; -- - install:: ${TARGETS} - mkdir -p ${DESTDIR}/${SBINDIR} - install -m 0755 ${TARGETS} ${DESTDIR}/${SBINDIR}/ -- cgit v1.1