mirror of https://github.com/hak5/openwrt.git
revert r23048 for now until Darwin compile issues have been sorted out (#7934)
SVN-Revision: 23057lede-17.01
parent
7ec18378a7
commit
97a286cb62
|
@ -7,14 +7,14 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=mtd
|
PKG_NAME:=mtd
|
||||||
PKG_VERSION:=20100912
|
PKG_VERSION:=20090505
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=git://git.infradead.org/mtd-utils.git
|
PKG_SOURCE_URL:=git://git.infradead.org/mtd-utils.git
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_VERSION:=e5a8bd7061921a9a787ffbb2c47a5af8f439d342
|
PKG_SOURCE_VERSION:=d021e049efaff50de33819b8cd2835d4b79bcfa8
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_MD5SUM:=1ad3e00b0f59d796ad76f18f15240b39
|
PKG_MD5SUM:=1f42c2cae08eb9e7b52d0c188f8d6338
|
||||||
PKG_CAT:=zcat
|
PKG_CAT:=zcat
|
||||||
|
|
||||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
|
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
@ -36,10 +36,6 @@ define Host/Compile
|
||||||
$(MAKE) -C $(HOST_BUILD_DIR) \
|
$(MAKE) -C $(HOST_BUILD_DIR) \
|
||||||
$(MTD_MAKEOPTS) \
|
$(MTD_MAKEOPTS) \
|
||||||
TARGETS=mkfs.jffs2
|
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 \
|
$(MAKE) -C $(HOST_BUILD_DIR)/ubi-utils \
|
||||||
$(MTD_MAKEOPTS) \
|
$(MTD_MAKEOPTS) \
|
||||||
TARGETS=ubinize
|
TARGETS=ubinize
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -42,10 +42,15 @@ $(SYMLINKS):
|
@@ -36,10 +36,16 @@ $(SYMLINKS):
|
||||||
ln -sf ../fs/jffs2/$@ $@
|
ln -sf ../fs/jffs2/$@ $@
|
||||||
|
|
||||||
$(BUILDDIR)/mkfs.jffs2: $(addprefix $(BUILDDIR)/,\
|
$(BUILDDIR)/mkfs.jffs2: $(addprefix $(BUILDDIR)/,\
|
||||||
- compr_rtime.o mkfs.jffs2.o compr_zlib.o compr_lzo.o \
|
- crc32.o 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 $(if $(NO_LZO),,compr_lzo.o) \
|
||||||
compr.o rbtree.o)
|
compr.o rbtree.o)
|
||||||
-LDFLAGS_mkfs.jffs2 = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
|
-LDFLAGS_mkfs.jffs2 = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
|
||||||
-LDLIBS_mkfs.jffs2 = -lz -llzo2
|
-LDLIBS_mkfs.jffs2 = -lz -llzo2
|
||||||
|
+
|
||||||
+LDFLAGS_mkfs.jffs2 := $(ZLIBLDFLAGS)
|
+LDFLAGS_mkfs.jffs2 := $(ZLIBLDFLAGS)
|
||||||
+LDLIBS_mkfs.jffs2 := -lz
|
+LDLIBS_mkfs.jffs2 := -lz
|
||||||
+ifndef NO_LZO
|
+ifndef NO_LZO
|
||||||
|
@ -17,5 +18,15 @@
|
||||||
+CPPFLAGS += -DCONFIG_JFFS2_LZO
|
+CPPFLAGS += -DCONFIG_JFFS2_LZO
|
||||||
+endif
|
+endif
|
||||||
|
|
||||||
$(BUILDDIR)/jffs2reader: $(BUILDDIR)/jffs2reader.o
|
$(BUILDDIR)/flash_eraseall: $(BUILDDIR)/crc32.o $(BUILDDIR)/flash_eraseall.o
|
||||||
LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
|
|
||||||
|
--- 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
|
||||||
|
|
|
@ -2,30 +2,30 @@ diff --git a/mkfs.ubifs/Makefile b/mkfs.ubifs/Makefile
|
||||||
index a678b0a..919ce89 100644
|
index a678b0a..919ce89 100644
|
||||||
--- a/mkfs.ubifs/Makefile
|
--- a/mkfs.ubifs/Makefile
|
||||||
+++ b/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
|
TARGETS = mkfs.ubifs
|
||||||
|
|
||||||
-LDLIBS_mkfs.ubifs = -lz -llzo2 -lm -luuid -L$(BUILDDIR)/../ubi-utils/ -lubi
|
-LDLIBS_mkfs.ubifs = -lz -llzo2 -lm -luuid -L../ubi-utils/ -lubi
|
||||||
+LDLIBS_mkfs.ubifs = -lz $(if,$(NO_LZO),,-llzo2) -lm -luuid -L$(BUILDDIR)/../ubi-utils/ -lubi
|
+LDLIBS_mkfs.ubifs = -lz $(if,$(NO_LZO),,-llzo2) -lm -luuid -L../ubi-utils/ -lubi
|
||||||
LDLIBS_mkfs.ubifs += -L$(BUILDDIR)/../lib -lmtd -lcrc32
|
|
||||||
LDLIBS_mkfs.ubifs += $(ZLIBLDFLAGS) $(LZOLDFLAGS)
|
include ../common.mk
|
||||||
|
|
||||||
diff --git a/mkfs.ubifs/compr.c b/mkfs.ubifs/compr.c
|
diff --git a/mkfs.ubifs/compr.c b/mkfs.ubifs/compr.c
|
||||||
index e378c5d..0208f80 100644
|
index e378c5d..0208f80 100644
|
||||||
--- a/mkfs.ubifs/compr.c
|
--- a/mkfs.ubifs/compr.c
|
||||||
+++ b/mkfs.ubifs/compr.c
|
+++ b/mkfs.ubifs/compr.c
|
||||||
@@ -24,7 +24,9 @@
|
@@ -25,7 +25,9 @@
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <zlib.h>
|
||||||
+#if CONFIG_UBIFS_LZO
|
+#if CONFIG_UBIFS_LZO
|
||||||
#include <lzo/lzo1x.h>
|
#include <lzo/lzo1x.h>
|
||||||
+#endif
|
+#endif
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
|
|
||||||
#define crc32 __zlib_crc32
|
#include "compr.h"
|
||||||
@@ -85,6 +87,16 @@ static int zlib_deflate(void *in_buf, si
|
@@ -83,6 +85,17 @@ static int zlib_deflate(void *in_buf, size_t in_len, void *out_buf,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,12 +37,13 @@ index e378c5d..0208f80 100644
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
+
|
||||||
+#if CONFIG_UBIFS_LZO
|
+#if CONFIG_UBIFS_LZO
|
||||||
+
|
+
|
||||||
static int lzo_compress(void *in_buf, size_t in_len, void *out_buf,
|
static int lzo_compress(void *in_buf, size_t in_len, void *out_buf,
|
||||||
size_t *out_len)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +57,7 @@ index e378c5d..0208f80 100644
|
||||||
- memcpy(out_buf, in_buf, in_len);
|
- memcpy(out_buf, in_buf, in_len);
|
||||||
- *out_len = in_len;
|
- *out_len = in_len;
|
||||||
- return 0;
|
- return 0;
|
||||||
+ return 1;
|
+ return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
+#endif
|
+#endif
|
||||||
|
@ -64,7 +65,7 @@ index e378c5d..0208f80 100644
|
||||||
static char *zlib_buf;
|
static char *zlib_buf;
|
||||||
|
|
||||||
static int favor_lzo_compress(void *in_buf, size_t in_len, void *out_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)
|
int init_compression(void)
|
||||||
{
|
{
|
||||||
|
@ -76,7 +77,7 @@ index e378c5d..0208f80 100644
|
||||||
|
|
||||||
zlib_buf = malloc(UBIFS_BLOCK_SIZE * WORST_COMPR_FACTOR);
|
zlib_buf = malloc(UBIFS_BLOCK_SIZE * WORST_COMPR_FACTOR);
|
||||||
if (!zlib_buf) {
|
if (!zlib_buf) {
|
||||||
@@ -213,7 +229,9 @@ int init_compression(void)
|
@@ -211,7 +228,9 @@ int init_compression(void)
|
||||||
void destroy_compression(void)
|
void destroy_compression(void)
|
||||||
{
|
{
|
||||||
free(zlib_buf);
|
free(zlib_buf);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
+endif
|
+endif
|
||||||
+
|
+
|
||||||
+ifneq ($(shell uname -o),Cygwin)
|
+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 \
|
TARGETS = ftl_format flash_erase flash_eraseall nanddump doc_loadbios \
|
||||||
@@ -17,6 +22,10 @@ TARGETS = ftl_format flash_erase flash_e
|
@@ -17,6 +22,10 @@ TARGETS = ftl_format flash_erase flash_e
|
||||||
|
|
|
@ -9,17 +9,17 @@
|
||||||
|
|
||||||
ifeq ($(WITHOUT_XATTR), 1)
|
ifeq ($(WITHOUT_XATTR), 1)
|
||||||
CPPFLAGS += -DWITHOUT_XATTR
|
CPPFLAGS += -DWITHOUT_XATTR
|
||||||
@@ -51,7 +51,9 @@ $(SYMLINKS):
|
@@ -45,7 +45,9 @@
|
||||||
ln -sf ../fs/jffs2/$@ $@
|
ln -sf ../fs/jffs2/$@ $@
|
||||||
|
|
||||||
$(BUILDDIR)/mkfs.jffs2: $(addprefix $(BUILDDIR)/,\
|
$(BUILDDIR)/mkfs.jffs2: $(addprefix $(BUILDDIR)/,\
|
||||||
- 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_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) \
|
+ $(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)
|
compr.o rbtree.o)
|
||||||
|
|
||||||
LDFLAGS_mkfs.jffs2 := $(ZLIBLDFLAGS)
|
LDFLAGS_mkfs.jffs2 := $(ZLIBLDFLAGS)
|
||||||
LDLIBS_mkfs.jffs2 := -lz
|
|
||||||
--- a/compr.c 2009-06-05 16:59:08.000000000 +0200
|
--- a/compr.c 2009-06-05 16:59:08.000000000 +0200
|
||||||
+++ b/compr.c 2010-03-20 23:16:14.556367000 +0100
|
+++ b/compr.c 2010-03-20 23:16:14.556367000 +0100
|
||||||
@@ -520,6 +520,9 @@
|
@@ -520,6 +520,9 @@
|
||||||
|
@ -43,11 +43,10 @@
|
||||||
}
|
}
|
||||||
--- a/compr.h 2010-03-20 23:08:46.289595000 +0100
|
--- a/compr.h 2010-03-20 23:08:46.289595000 +0100
|
||||||
+++ b/compr.h 2010-03-20 23:51:41.953345921 +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_ZLIB
|
||||||
#define CONFIG_JFFS2_RTIME
|
#define CONFIG_JFFS2_RTIME
|
||||||
-#define CONFIG_JFFS2_LZO
|
|
||||||
+#define CONFIG_JFFS2_LZMA
|
+#define CONFIG_JFFS2_LZMA
|
||||||
|
|
||||||
#define JFFS2_RUBINMIPS_PRIORITY 10
|
#define JFFS2_RUBINMIPS_PRIORITY 10
|
||||||
|
@ -61,7 +60,7 @@
|
||||||
|
|
||||||
#define JFFS2_COMPR_MODE_NONE 0
|
#define JFFS2_COMPR_MODE_NONE 0
|
||||||
#define JFFS2_COMPR_MODE_PRIORITY 1
|
#define JFFS2_COMPR_MODE_PRIORITY 1
|
||||||
@@ -115,5 +116,10 @@ void jffs2_rtime_exit(void);
|
@@ -114,5 +116,10 @@
|
||||||
int jffs2_lzo_init(void);
|
int jffs2_lzo_init(void);
|
||||||
void jffs2_lzo_exit(void);
|
void jffs2_lzo_exit(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -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}/
|
|
Loading…
Reference in New Issue