From ade8f1154feea499c3743ab14e9ced6783812316 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 22 Mar 2014 16:27:13 +0100 Subject: a bunch of microblaze fixes --- tools/mtd-utils/patches/darwin.patch | 261 +++++++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 tools/mtd-utils/patches/darwin.patch (limited to 'tools/mtd-utils') diff --git a/tools/mtd-utils/patches/darwin.patch b/tools/mtd-utils/patches/darwin.patch new file mode 100644 index 000000000..1df2ccba2 --- /dev/null +++ b/tools/mtd-utils/patches/darwin.patch @@ -0,0 +1,261 @@ +diff -Nur mtd-utils-1.5.0.orig/common.mk mtd-utils-1.5.0/common.mk +--- mtd-utils-1.5.0.orig/common.mk 2012-05-07 09:19:39.000000000 +0200 ++++ mtd-utils-1.5.0/common.mk 2014-03-22 11:25:31.000000000 +0100 +@@ -13,8 +13,6 @@ + $(call cc-option,-Wwrite-strings) \ + $(call cc-option,-Wno-sign-compare) + CFLAGS += $(WFLAGS) +-SECTION_CFLAGS := $(call cc-option,-ffunction-sections -fdata-sections -Wl$(comma)--gc-sections) +-CFLAGS += $(SECTION_CFLAGS) + + ifneq ($(WITHOUT_LARGEFILE), 1) + CPPFLAGS += -D_FILE_OFFSET_BITS=64 +diff -Nur mtd-utils-1.5.0.orig/compr_lzo.c mtd-utils-1.5.0/compr_lzo.c +--- mtd-utils-1.5.0.orig/compr_lzo.c 2012-05-07 09:19:39.000000000 +0200 ++++ mtd-utils-1.5.0/compr_lzo.c 2014-03-22 11:12:06.000000000 +0100 +@@ -26,7 +26,6 @@ + #include + + #ifndef WITHOUT_LZO +-#include + #include + #include + #include "compr.h" +diff -Nur mtd-utils-1.5.0.orig/compr_zlib.c mtd-utils-1.5.0/compr_zlib.c +--- mtd-utils-1.5.0.orig/compr_zlib.c 2012-05-07 09:19:39.000000000 +0200 ++++ mtd-utils-1.5.0/compr_zlib.c 2014-03-22 11:11:57.000000000 +0100 +@@ -39,7 +39,6 @@ + #include + #undef crc32 + #include +-#include + #include + #include "common.h" + #include "compr.h" +diff -Nur mtd-utils-1.5.0.orig/include/byteswap.h mtd-utils-1.5.0/include/byteswap.h +--- mtd-utils-1.5.0.orig/include/byteswap.h 1970-01-01 01:00:00.000000000 +0100 ++++ mtd-utils-1.5.0/include/byteswap.h 2014-03-22 10:52:15.000000000 +0100 +@@ -0,0 +1,25 @@ ++#ifndef _BYTESWAP_H ++#define _BYTESWAP_H ++ ++#include ++ ++static __inline uint16_t __bswap_16(uint16_t __x) ++{ ++ return __x<<8 | __x>>8; ++} ++ ++static __inline uint32_t __bswap_32(uint32_t __x) ++{ ++ return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24; ++} ++ ++static __inline uint64_t __bswap_64(uint64_t __x) ++{ ++ return __bswap_32(__x)+0ULL<<32 | __bswap_32(__x>>32); ++} ++ ++#define bswap_16(x) __bswap_16(x) ++#define bswap_32(x) __bswap_32(x) ++#define bswap_64(x) __bswap_64(x) ++ ++#endif +diff -Nur mtd-utils-1.5.0.orig/include/endian.h mtd-utils-1.5.0/include/endian.h +--- mtd-utils-1.5.0.orig/include/endian.h 1970-01-01 01:00:00.000000000 +0100 ++++ mtd-utils-1.5.0/include/endian.h 2014-03-22 11:09:57.000000000 +0100 +@@ -0,0 +1,20 @@ ++#ifndef _ENDIAN_H ++#define _ENDIAN_H ++ ++#ifndef __BIG_ENDIAN ++#define __BIG_ENDIAN 4321 ++#endif ++ ++ #ifndef __LITTLE_ENDIAN ++ #define __LITTLE_ENDIAN 1234 ++ #endif ++ ++#ifndef __BYTE_ORDER ++#define __BYTE_ORDER __LITTLE_ENDIAN ++#endif ++ ++#ifndef BYTE_ORDER ++#define BYTE_ORDER __LITTLE_ENDIAN ++#endif ++ ++#endif +diff -Nur mtd-utils-1.5.0.orig/include/linux/types.h mtd-utils-1.5.0/include/linux/types.h +--- mtd-utils-1.5.0.orig/include/linux/types.h 1970-01-01 01:00:00.000000000 +0100 ++++ mtd-utils-1.5.0/include/linux/types.h 2014-03-22 11:17:12.000000000 +0100 +@@ -0,0 +1,18 @@ ++#ifndef _LINUX_TYPES_H ++#define _LINUX_TYPES_H ++ ++#include ++ ++typedef uint16_t __u16; ++typedef uint32_t __u32; ++typedef uint64_t __u64; ++ ++typedef __u16 __le16; ++typedef __u32 __le32; ++typedef __u64 __le64; ++typedef __u64 off64_t; ++ ++typedef __u16 __sum16; ++typedef __u32 __wsum; ++ ++#endif /* _LINUX_TYPES_H */ +diff -Nur mtd-utils-1.5.0.orig/include/mtd/jffs2-user.h mtd-utils-1.5.0/include/mtd/jffs2-user.h +--- mtd-utils-1.5.0.orig/include/mtd/jffs2-user.h 2012-05-07 09:19:39.000000000 +0200 ++++ mtd-utils-1.5.0/include/mtd/jffs2-user.h 2014-03-22 11:01:37.000000000 +0100 +@@ -9,8 +9,13 @@ + + /* This file is blessed for inclusion by userspace */ + #include ++#if defined(__APPLE__) ++#include "endian.h" ++#include "byteswap.h" ++#else + #include + #include ++#endif + + #undef cpu_to_je16 + #undef cpu_to_je32 +diff -Nur mtd-utils-1.5.0.orig/include/mtd/mtd-abi.h mtd-utils-1.5.0/include/mtd/mtd-abi.h +--- mtd-utils-1.5.0.orig/include/mtd/mtd-abi.h 2012-05-07 09:19:39.000000000 +0200 ++++ mtd-utils-1.5.0/include/mtd/mtd-abi.h 2014-03-22 11:21:06.000000000 +0100 +@@ -171,9 +171,9 @@ + /* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */ + #define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo) + /* Check if an eraseblock is bad */ +-#define MEMGETBADBLOCK _IOW('M', 11, __kernel_loff_t) ++#define MEMGETBADBLOCK _IOW('M', 11, off_t) + /* Mark an eraseblock as bad */ +-#define MEMSETBADBLOCK _IOW('M', 12, __kernel_loff_t) ++#define MEMSETBADBLOCK _IOW('M', 12, off_t) + /* Set OTP (One-Time Programmable) mode (factory vs. user) */ + #define OTPSELECT _IOR('M', 13, int) + /* Get number of OTP (One-Time Programmable) regions */ +diff -Nur mtd-utils-1.5.0.orig/include/mtd/ubi-media.h mtd-utils-1.5.0/include/mtd/ubi-media.h +--- mtd-utils-1.5.0.orig/include/mtd/ubi-media.h 2012-05-07 09:19:39.000000000 +0200 ++++ mtd-utils-1.5.0/include/mtd/ubi-media.h 2014-03-22 11:18:03.000000000 +0100 +@@ -30,7 +30,15 @@ + #ifndef __UBI_MEDIA_H__ + #define __UBI_MEDIA_H__ + ++#ifdef __linux__ + #include ++#else ++#include ++typedef uint8_t __u8; ++typedef uint16_t __be16; ++typedef uint32_t __be32; ++typedef uint64_t __be64; ++#endif + + /* The version of UBI images supported by this implementation */ + #define UBI_VERSION 1 +diff -Nur mtd-utils-1.5.0.orig/lib/libfec.c mtd-utils-1.5.0/lib/libfec.c +--- mtd-utils-1.5.0.orig/lib/libfec.c 2012-05-07 09:19:39.000000000 +0200 ++++ mtd-utils-1.5.0/lib/libfec.c 2014-03-22 11:24:15.000000000 +0100 +@@ -61,8 +61,6 @@ + }; + #define gettimeofday(x, dummy) { (x)->ticks = clock() ; } + #define DIFF_T(a,b) (1+ 1000000*(a.ticks - b.ticks) / CLOCKS_PER_SEC ) +-typedef unsigned long u_long ; +-typedef unsigned short u_short ; + #else /* typically, unix systems */ + #include + #define DIFF_T(a,b) \ +@@ -625,7 +623,7 @@ + #define FEC_MAGIC 0xFECC0DEC + + struct fec_parms { +- u_long magic ; ++ unsigned long magic ; + int k, n ; /* parameters of the code */ + gf *enc_matrix ; + } ; +diff -Nur mtd-utils-1.5.0.orig/lib/libmtd.c mtd-utils-1.5.0/lib/libmtd.c +--- mtd-utils-1.5.0.orig/lib/libmtd.c 2012-05-07 09:19:39.000000000 +0200 ++++ mtd-utils-1.5.0/lib/libmtd.c 2014-03-22 11:15:49.000000000 +0100 +@@ -1006,7 +1006,7 @@ + int mtd_is_bad(const struct mtd_dev_info *mtd, int fd, int eb) + { + int ret; +- loff_t seek; ++ off_t seek; + + ret = mtd_valid_erase_block(mtd, eb); + if (ret) +@@ -1015,7 +1015,7 @@ + if (!mtd->bb_allowed) + return 0; + +- seek = (loff_t)eb * mtd->eb_size; ++ seek = (off_t)eb * mtd->eb_size; + ret = ioctl(fd, MEMGETBADBLOCK, &seek); + if (ret == -1) + return mtd_ioctl_error(mtd, eb, "MEMGETBADBLOCK"); +@@ -1025,7 +1025,7 @@ + int mtd_mark_bad(const struct mtd_dev_info *mtd, int fd, int eb) + { + int ret; +- loff_t seek; ++ off_t seek; + + if (!mtd->bb_allowed) { + errno = EINVAL; +@@ -1036,7 +1036,7 @@ + if (ret) + return ret; + +- seek = (loff_t)eb * mtd->eb_size; ++ seek = (off_t)eb * mtd->eb_size; + ret = ioctl(fd, MEMSETBADBLOCK, &seek); + if (ret == -1) + return mtd_ioctl_error(mtd, eb, "MEMSETBADBLOCK"); +diff -Nur mtd-utils-1.5.0.orig/lib/libmtd_legacy.c mtd-utils-1.5.0/lib/libmtd_legacy.c +--- mtd-utils-1.5.0.orig/lib/libmtd_legacy.c 2012-05-07 09:19:39.000000000 +0200 ++++ mtd-utils-1.5.0/lib/libmtd_legacy.c 2014-03-22 11:22:18.000000000 +0100 +@@ -234,7 +234,7 @@ + struct stat st; + struct mtd_info_user ui; + int fd, ret; +- loff_t offs = 0; ++ off_t offs = 0; + struct proc_parse_info pi; + + if (stat(node, &st)) { +diff -Nur mtd-utils-1.5.0.orig/mkfs.jffs2.c mtd-utils-1.5.0/mkfs.jffs2.c +--- mtd-utils-1.5.0.orig/mkfs.jffs2.c 2012-05-07 09:19:39.000000000 +0200 ++++ mtd-utils-1.5.0/mkfs.jffs2.c 2014-03-22 11:11:15.000000000 +0100 +@@ -70,7 +70,12 @@ + #include + #include + #endif ++#if defined(__APPLE__) ++#include "endian.h" ++#include "byteswap.h" ++#else + #include ++#endif + #include + #include + +diff -Nur mtd-utils-1.5.0.orig/rbtree.h mtd-utils-1.5.0/rbtree.h +--- mtd-utils-1.5.0.orig/rbtree.h 2012-05-07 09:19:39.000000000 +0200 ++++ mtd-utils-1.5.0/rbtree.h 2014-03-22 11:07:58.000000000 +0100 +@@ -94,8 +94,7 @@ + #ifndef _LINUX_RBTREE_H + #define _LINUX_RBTREE_H + +-#include +-#include ++#include + + struct rb_node + { -- cgit v1.2.3 From 8aed1fcd443b550c15a21ddbf1b1d3899803120a Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 30 Mar 2014 15:55:20 +0200 Subject: rework hosttools building, add tools into package stuff --- tools/mtd-utils/Makefile | 24 ---- tools/mtd-utils/patches/darwin.patch | 261 ----------------------------------- tools/mtd-utils/patches/lzo.patch | 88 ------------ 3 files changed, 373 deletions(-) delete mode 100644 tools/mtd-utils/Makefile delete mode 100644 tools/mtd-utils/patches/darwin.patch delete mode 100644 tools/mtd-utils/patches/lzo.patch (limited to 'tools/mtd-utils') diff --git a/tools/mtd-utils/Makefile b/tools/mtd-utils/Makefile deleted file mode 100644 index 0152a41ac..000000000 --- a/tools/mtd-utils/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# This file is part of the OpenADK project. OpenADK is copyrighted -# material, please see the LICENCE file in the top-level directory. - -include $(TOPDIR)/rules.mk - -PKG_NAME:= mtd-utils -PKG_VERSION:= 1.5.0 -PKG_RELEASE:= 1 -PKG_MD5SUM:= a4df1ad29684be79b0fa699bdae01faf -PKG_SITES:= http://openadk.org/distfiles/ - -include ../rules.mk - -install: ${STAGING_HOST_DIR}/usr/bin/mkfs.jffs2 - -$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared - ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}' CPPFLAGS='-DWITHOUT_XATTR=1 -I./include' - touch $@ - -${STAGING_HOST_DIR}/usr/bin/mkfs.jffs2: $(WRKBUILD)/.compiled - $(INSTALL_BIN) $(WRKBUILD)/mkfs.jffs2 \ - ${STAGING_HOST_DIR}/usr/bin - -include $(TOPDIR)/mk/tools.mk diff --git a/tools/mtd-utils/patches/darwin.patch b/tools/mtd-utils/patches/darwin.patch deleted file mode 100644 index 1df2ccba2..000000000 --- a/tools/mtd-utils/patches/darwin.patch +++ /dev/null @@ -1,261 +0,0 @@ -diff -Nur mtd-utils-1.5.0.orig/common.mk mtd-utils-1.5.0/common.mk ---- mtd-utils-1.5.0.orig/common.mk 2012-05-07 09:19:39.000000000 +0200 -+++ mtd-utils-1.5.0/common.mk 2014-03-22 11:25:31.000000000 +0100 -@@ -13,8 +13,6 @@ - $(call cc-option,-Wwrite-strings) \ - $(call cc-option,-Wno-sign-compare) - CFLAGS += $(WFLAGS) --SECTION_CFLAGS := $(call cc-option,-ffunction-sections -fdata-sections -Wl$(comma)--gc-sections) --CFLAGS += $(SECTION_CFLAGS) - - ifneq ($(WITHOUT_LARGEFILE), 1) - CPPFLAGS += -D_FILE_OFFSET_BITS=64 -diff -Nur mtd-utils-1.5.0.orig/compr_lzo.c mtd-utils-1.5.0/compr_lzo.c ---- mtd-utils-1.5.0.orig/compr_lzo.c 2012-05-07 09:19:39.000000000 +0200 -+++ mtd-utils-1.5.0/compr_lzo.c 2014-03-22 11:12:06.000000000 +0100 -@@ -26,7 +26,6 @@ - #include - - #ifndef WITHOUT_LZO --#include - #include - #include - #include "compr.h" -diff -Nur mtd-utils-1.5.0.orig/compr_zlib.c mtd-utils-1.5.0/compr_zlib.c ---- mtd-utils-1.5.0.orig/compr_zlib.c 2012-05-07 09:19:39.000000000 +0200 -+++ mtd-utils-1.5.0/compr_zlib.c 2014-03-22 11:11:57.000000000 +0100 -@@ -39,7 +39,6 @@ - #include - #undef crc32 - #include --#include - #include - #include "common.h" - #include "compr.h" -diff -Nur mtd-utils-1.5.0.orig/include/byteswap.h mtd-utils-1.5.0/include/byteswap.h ---- mtd-utils-1.5.0.orig/include/byteswap.h 1970-01-01 01:00:00.000000000 +0100 -+++ mtd-utils-1.5.0/include/byteswap.h 2014-03-22 10:52:15.000000000 +0100 -@@ -0,0 +1,25 @@ -+#ifndef _BYTESWAP_H -+#define _BYTESWAP_H -+ -+#include -+ -+static __inline uint16_t __bswap_16(uint16_t __x) -+{ -+ return __x<<8 | __x>>8; -+} -+ -+static __inline uint32_t __bswap_32(uint32_t __x) -+{ -+ return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24; -+} -+ -+static __inline uint64_t __bswap_64(uint64_t __x) -+{ -+ return __bswap_32(__x)+0ULL<<32 | __bswap_32(__x>>32); -+} -+ -+#define bswap_16(x) __bswap_16(x) -+#define bswap_32(x) __bswap_32(x) -+#define bswap_64(x) __bswap_64(x) -+ -+#endif -diff -Nur mtd-utils-1.5.0.orig/include/endian.h mtd-utils-1.5.0/include/endian.h ---- mtd-utils-1.5.0.orig/include/endian.h 1970-01-01 01:00:00.000000000 +0100 -+++ mtd-utils-1.5.0/include/endian.h 2014-03-22 11:09:57.000000000 +0100 -@@ -0,0 +1,20 @@ -+#ifndef _ENDIAN_H -+#define _ENDIAN_H -+ -+#ifndef __BIG_ENDIAN -+#define __BIG_ENDIAN 4321 -+#endif -+ -+ #ifndef __LITTLE_ENDIAN -+ #define __LITTLE_ENDIAN 1234 -+ #endif -+ -+#ifndef __BYTE_ORDER -+#define __BYTE_ORDER __LITTLE_ENDIAN -+#endif -+ -+#ifndef BYTE_ORDER -+#define BYTE_ORDER __LITTLE_ENDIAN -+#endif -+ -+#endif -diff -Nur mtd-utils-1.5.0.orig/include/linux/types.h mtd-utils-1.5.0/include/linux/types.h ---- mtd-utils-1.5.0.orig/include/linux/types.h 1970-01-01 01:00:00.000000000 +0100 -+++ mtd-utils-1.5.0/include/linux/types.h 2014-03-22 11:17:12.000000000 +0100 -@@ -0,0 +1,18 @@ -+#ifndef _LINUX_TYPES_H -+#define _LINUX_TYPES_H -+ -+#include -+ -+typedef uint16_t __u16; -+typedef uint32_t __u32; -+typedef uint64_t __u64; -+ -+typedef __u16 __le16; -+typedef __u32 __le32; -+typedef __u64 __le64; -+typedef __u64 off64_t; -+ -+typedef __u16 __sum16; -+typedef __u32 __wsum; -+ -+#endif /* _LINUX_TYPES_H */ -diff -Nur mtd-utils-1.5.0.orig/include/mtd/jffs2-user.h mtd-utils-1.5.0/include/mtd/jffs2-user.h ---- mtd-utils-1.5.0.orig/include/mtd/jffs2-user.h 2012-05-07 09:19:39.000000000 +0200 -+++ mtd-utils-1.5.0/include/mtd/jffs2-user.h 2014-03-22 11:01:37.000000000 +0100 -@@ -9,8 +9,13 @@ - - /* This file is blessed for inclusion by userspace */ - #include -+#if defined(__APPLE__) -+#include "endian.h" -+#include "byteswap.h" -+#else - #include - #include -+#endif - - #undef cpu_to_je16 - #undef cpu_to_je32 -diff -Nur mtd-utils-1.5.0.orig/include/mtd/mtd-abi.h mtd-utils-1.5.0/include/mtd/mtd-abi.h ---- mtd-utils-1.5.0.orig/include/mtd/mtd-abi.h 2012-05-07 09:19:39.000000000 +0200 -+++ mtd-utils-1.5.0/include/mtd/mtd-abi.h 2014-03-22 11:21:06.000000000 +0100 -@@ -171,9 +171,9 @@ - /* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */ - #define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo) - /* Check if an eraseblock is bad */ --#define MEMGETBADBLOCK _IOW('M', 11, __kernel_loff_t) -+#define MEMGETBADBLOCK _IOW('M', 11, off_t) - /* Mark an eraseblock as bad */ --#define MEMSETBADBLOCK _IOW('M', 12, __kernel_loff_t) -+#define MEMSETBADBLOCK _IOW('M', 12, off_t) - /* Set OTP (One-Time Programmable) mode (factory vs. user) */ - #define OTPSELECT _IOR('M', 13, int) - /* Get number of OTP (One-Time Programmable) regions */ -diff -Nur mtd-utils-1.5.0.orig/include/mtd/ubi-media.h mtd-utils-1.5.0/include/mtd/ubi-media.h ---- mtd-utils-1.5.0.orig/include/mtd/ubi-media.h 2012-05-07 09:19:39.000000000 +0200 -+++ mtd-utils-1.5.0/include/mtd/ubi-media.h 2014-03-22 11:18:03.000000000 +0100 -@@ -30,7 +30,15 @@ - #ifndef __UBI_MEDIA_H__ - #define __UBI_MEDIA_H__ - -+#ifdef __linux__ - #include -+#else -+#include -+typedef uint8_t __u8; -+typedef uint16_t __be16; -+typedef uint32_t __be32; -+typedef uint64_t __be64; -+#endif - - /* The version of UBI images supported by this implementation */ - #define UBI_VERSION 1 -diff -Nur mtd-utils-1.5.0.orig/lib/libfec.c mtd-utils-1.5.0/lib/libfec.c ---- mtd-utils-1.5.0.orig/lib/libfec.c 2012-05-07 09:19:39.000000000 +0200 -+++ mtd-utils-1.5.0/lib/libfec.c 2014-03-22 11:24:15.000000000 +0100 -@@ -61,8 +61,6 @@ - }; - #define gettimeofday(x, dummy) { (x)->ticks = clock() ; } - #define DIFF_T(a,b) (1+ 1000000*(a.ticks - b.ticks) / CLOCKS_PER_SEC ) --typedef unsigned long u_long ; --typedef unsigned short u_short ; - #else /* typically, unix systems */ - #include - #define DIFF_T(a,b) \ -@@ -625,7 +623,7 @@ - #define FEC_MAGIC 0xFECC0DEC - - struct fec_parms { -- u_long magic ; -+ unsigned long magic ; - int k, n ; /* parameters of the code */ - gf *enc_matrix ; - } ; -diff -Nur mtd-utils-1.5.0.orig/lib/libmtd.c mtd-utils-1.5.0/lib/libmtd.c ---- mtd-utils-1.5.0.orig/lib/libmtd.c 2012-05-07 09:19:39.000000000 +0200 -+++ mtd-utils-1.5.0/lib/libmtd.c 2014-03-22 11:15:49.000000000 +0100 -@@ -1006,7 +1006,7 @@ - int mtd_is_bad(const struct mtd_dev_info *mtd, int fd, int eb) - { - int ret; -- loff_t seek; -+ off_t seek; - - ret = mtd_valid_erase_block(mtd, eb); - if (ret) -@@ -1015,7 +1015,7 @@ - if (!mtd->bb_allowed) - return 0; - -- seek = (loff_t)eb * mtd->eb_size; -+ seek = (off_t)eb * mtd->eb_size; - ret = ioctl(fd, MEMGETBADBLOCK, &seek); - if (ret == -1) - return mtd_ioctl_error(mtd, eb, "MEMGETBADBLOCK"); -@@ -1025,7 +1025,7 @@ - int mtd_mark_bad(const struct mtd_dev_info *mtd, int fd, int eb) - { - int ret; -- loff_t seek; -+ off_t seek; - - if (!mtd->bb_allowed) { - errno = EINVAL; -@@ -1036,7 +1036,7 @@ - if (ret) - return ret; - -- seek = (loff_t)eb * mtd->eb_size; -+ seek = (off_t)eb * mtd->eb_size; - ret = ioctl(fd, MEMSETBADBLOCK, &seek); - if (ret == -1) - return mtd_ioctl_error(mtd, eb, "MEMSETBADBLOCK"); -diff -Nur mtd-utils-1.5.0.orig/lib/libmtd_legacy.c mtd-utils-1.5.0/lib/libmtd_legacy.c ---- mtd-utils-1.5.0.orig/lib/libmtd_legacy.c 2012-05-07 09:19:39.000000000 +0200 -+++ mtd-utils-1.5.0/lib/libmtd_legacy.c 2014-03-22 11:22:18.000000000 +0100 -@@ -234,7 +234,7 @@ - struct stat st; - struct mtd_info_user ui; - int fd, ret; -- loff_t offs = 0; -+ off_t offs = 0; - struct proc_parse_info pi; - - if (stat(node, &st)) { -diff -Nur mtd-utils-1.5.0.orig/mkfs.jffs2.c mtd-utils-1.5.0/mkfs.jffs2.c ---- mtd-utils-1.5.0.orig/mkfs.jffs2.c 2012-05-07 09:19:39.000000000 +0200 -+++ mtd-utils-1.5.0/mkfs.jffs2.c 2014-03-22 11:11:15.000000000 +0100 -@@ -70,7 +70,12 @@ - #include - #include - #endif -+#if defined(__APPLE__) -+#include "endian.h" -+#include "byteswap.h" -+#else - #include -+#endif - #include - #include - -diff -Nur mtd-utils-1.5.0.orig/rbtree.h mtd-utils-1.5.0/rbtree.h ---- mtd-utils-1.5.0.orig/rbtree.h 2012-05-07 09:19:39.000000000 +0200 -+++ mtd-utils-1.5.0/rbtree.h 2014-03-22 11:07:58.000000000 +0100 -@@ -94,8 +94,7 @@ - #ifndef _LINUX_RBTREE_H - #define _LINUX_RBTREE_H - --#include --#include -+#include - - struct rb_node - { diff --git a/tools/mtd-utils/patches/lzo.patch b/tools/mtd-utils/patches/lzo.patch deleted file mode 100644 index 52f16146c..000000000 --- a/tools/mtd-utils/patches/lzo.patch +++ /dev/null @@ -1,88 +0,0 @@ -diff -Nur mtd-utils-1.5.0.orig/compr.c mtd-utils-1.5.0/compr.c ---- mtd-utils-1.5.0.orig/compr.c 2012-05-07 09:19:39.000000000 +0200 -+++ mtd-utils-1.5.0/compr.c 2014-02-25 21:05:20.000000000 +0100 -@@ -517,9 +517,6 @@ - #ifdef CONFIG_JFFS2_RTIME - jffs2_rtime_init(); - #endif --#ifdef CONFIG_JFFS2_LZO -- jffs2_lzo_init(); --#endif - return 0; - } - -@@ -531,8 +528,5 @@ - #ifdef CONFIG_JFFS2_ZLIB - jffs2_zlib_exit(); - #endif --#ifdef CONFIG_JFFS2_LZO -- jffs2_lzo_exit(); --#endif - return 0; - } -diff -Nur mtd-utils-1.5.0.orig/Makefile mtd-utils-1.5.0/Makefile ---- mtd-utils-1.5.0.orig/Makefile 2012-05-07 09:19:39.000000000 +0200 -+++ mtd-utils-1.5.0/Makefile 2014-02-25 21:13:03.000000000 +0100 -@@ -16,27 +16,13 @@ - - TESTS = tests - --MTD_BINS = \ -- ftl_format flash_erase nanddump doc_loadbios \ -- ftl_check mkfs.jffs2 flash_lock flash_unlock \ -- flash_otp_info flash_otp_dump mtd_debug flashcp nandwrite nandtest \ -- jffs2dump \ -- nftldump nftl_format docfdisk \ -- rfddump rfdformat \ -- serve_image recv_image \ -- sumtool jffs2reader --UBI_BINS = \ -- ubiupdatevol ubimkvol ubirmvol ubicrc32 ubinfo ubiattach \ -- ubidetach ubinize ubiformat ubirename mtdinfo ubirsvol -+MTD_BINS = mkfs.jffs2 - - BINS = $(MTD_BINS) --BINS += mkfs.ubifs/mkfs.ubifs --BINS += $(addprefix ubi-utils/,$(UBI_BINS)) - SCRIPTS = flash_eraseall - - TARGETS = $(BINS) - TARGETS += lib/libmtd.a --TARGETS += ubi-utils/libubi.a - - OBJDEPS = $(BUILDDIR)/include/version.h - -@@ -83,12 +69,12 @@ - # - # Utils in top level - # --obj-mkfs.jffs2 = compr_rtime.o compr_zlib.o compr_lzo.o compr.o rbtree.o --LDFLAGS_mkfs.jffs2 = $(ZLIBLDFLAGS) $(LZOLDFLAGS) --LDLIBS_mkfs.jffs2 = -lz $(LZOLDLIBS) -+obj-mkfs.jffs2 = compr_rtime.o compr_zlib.o compr.o rbtree.o -+LDFLAGS_mkfs.jffs2 = $(ZLIBLDFLAGS) -+LDLIBS_mkfs.jffs2 = -lz - --LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS) --LDLIBS_jffs2reader = -lz $(LZOLDLIBS) -+LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) -+LDLIBS_jffs2reader = -lz - - $(foreach v,$(MTD_BINS),$(eval $(call mkdep,,$(v)))) - -@@ -103,7 +89,7 @@ - # - obj-mkfs.ubifs = crc16.o lpt.o compr.o devtable.o \ - hashtable/hashtable.o hashtable/hashtable_itr.o --LDLIBS_mkfs.ubifs = -lz -llzo2 -lm -luuid -+LDLIBS_mkfs.ubifs = -lz -lm -luuid - $(call mkdep,mkfs.ubifs/,mkfs.ubifs,,ubi-utils/libubi.a) - - # -@@ -117,6 +103,3 @@ - obj-mtdinfo = libubigen.a - obj-ubinize = libubigen.a libiniparser.a - obj-ubiformat = libubigen.a libscan.a -- --$(foreach v,libubi.a libubigen.a libiniparser.a libscan.a,$(eval $(call _mkdep,ubi-utils/,$(v)))) --$(foreach v,$(UBI_BINS),$(eval $(call mkdep,ubi-utils/,$(v),libubi.a ubiutils-common.o))) -- cgit v1.2.3