summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-09-13 18:50:41 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-09-13 18:50:41 +0000
commitcd1651cc853b14056b1308a607af128026c1d4ce (patch)
treea91105480b03a86595358def43f2bfa52235792c /tools
parent2fdfa5601bce01a5fe2645ffed6f3e46c2b2c956 (diff)
[package] revert r23048 for now until Darwin compile issues have been sorted out (#7934)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23057 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools')
-rw-r--r--tools/mtd-utils/Makefile10
-rw-r--r--tools/mtd-utils/patches/100-optional_lzo.patch21
-rw-r--r--tools/mtd-utils/patches/101-ubifs-optional_lzo.patch29
-rw-r--r--tools/mtd-utils/patches/120-cygwin_fixes.patch2
-rw-r--r--tools/mtd-utils/patches/130-lzma_jffs2.patch17
-rw-r--r--tools/mtd-utils/patches/131-fix_lib_compile.patch11
6 files changed, 43 insertions, 47 deletions
diff --git a/tools/mtd-utils/Makefile b/tools/mtd-utils/Makefile
index e298e42d7..45bceaf83 100644
--- a/tools/mtd-utils/Makefile
+++ b/tools/mtd-utils/Makefile
@@ -7,14 +7,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mtd
-PKG_VERSION:=20100912
+PKG_VERSION:=20090505
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=git://git.infradead.org/mtd-utils.git
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=e5a8bd7061921a9a787ffbb2c47a5af8f439d342
+PKG_SOURCE_VERSION:=d021e049efaff50de33819b8cd2835d4b79bcfa8
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_MD5SUM:=1ad3e00b0f59d796ad76f18f15240b39
+PKG_MD5SUM:=1f42c2cae08eb9e7b52d0c188f8d6338
PKG_CAT:=zcat
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
@@ -36,10 +36,6 @@ define Host/Compile
$(MAKE) -C $(HOST_BUILD_DIR) \
$(MTD_MAKEOPTS) \
TARGETS=mkfs.jffs2
- $(MAKE) -C $(HOST_BUILD_DIR)/lib \
- $(MTD_MAKEOPTS) \
- TARGETS="libmtd.a libcrc32.a" \
- LIBS="libmtd libcrc32"
$(MAKE) -C $(HOST_BUILD_DIR)/ubi-utils \
$(MTD_MAKEOPTS) \
TARGETS=ubinize
diff --git a/tools/mtd-utils/patches/100-optional_lzo.patch b/tools/mtd-utils/patches/100-optional_lzo.patch
index 5af0ae23e..d9ebc3e9b 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 9f797e01b..d49c94bb2 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 <stdio.h>
+@@ -25,7 +25,9 @@
#include <stdint.h>
#include <string.h>
+ #include <zlib.h>
+#if CONFIG_UBIFS_LZO
#include <lzo/lzo1x.h>
+#endif
#include <linux/types.h>
- #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 116660acb..61a6d5ef2 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 d75ad3139..0f2b8af56 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 288e0d45e..000000000
--- 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}/