summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-06-14 20:42:23 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-06-14 20:42:23 +0000
commita2b97a26e36c5d178f5d6a2e170082a7faa10d18 (patch)
tree45bd60b47c290d2304529f92272ed4b4d950d09a /tools
parent4bc008142ce10980e3d4e21fd4c6cd99f4d1484f (diff)
downloadmtk-20170518-a2b97a26e36c5d178f5d6a2e170082a7faa10d18.zip
mtk-20170518-a2b97a26e36c5d178f5d6a2e170082a7faa10d18.tar.gz
mtk-20170518-a2b97a26e36c5d178f5d6a2e170082a7faa10d18.tar.bz2
add ubinize to the mtd-utils build
SVN-Revision: 16457
Diffstat (limited to 'tools')
-rw-r--r--tools/mtd-utils/Makefile8
-rw-r--r--tools/mtd-utils/patches/110-portability.patch48
2 files changed, 25 insertions, 31 deletions
diff --git a/tools/mtd-utils/Makefile b/tools/mtd-utils/Makefile
index a74c941..06be6c7 100644
--- a/tools/mtd-utils/Makefile
+++ b/tools/mtd-utils/Makefile
@@ -36,10 +36,16 @@ define Host/Compile
$(MAKE) -C $(HOST_BUILD_DIR) \
$(MTD_MAKEOPTS) \
TARGETS=mkfs.jffs2
+ $(MAKE) -C $(HOST_BUILD_DIR)/ubi-utils \
+ $(MTD_MAKEOPTS) \
+ TARGETS=ubinize
endef
define Host/Install
- $(CP) $(HOST_BUILD_DIR)/mkfs.jffs2 $(STAGING_DIR_HOST)/bin/
+ $(CP) \
+ $(HOST_BUILD_DIR)/mkfs.jffs2 \
+ $(HOST_BUILD_DIR)/ubinize \
+ $(STAGING_DIR_HOST)/bin/
endef
define Host/Clean
diff --git a/tools/mtd-utils/patches/110-portability.patch b/tools/mtd-utils/patches/110-portability.patch
index 487aec7..4ef27d1 100644
--- a/tools/mtd-utils/patches/110-portability.patch
+++ b/tools/mtd-utils/patches/110-portability.patch
@@ -18,36 +18,6 @@
#include <linux/jffs2.h>
#include "compr.h"
---- a/mkfs.jffs2.c
-+++ b/mkfs.jffs2.c
-@@ -1100,6 +1100,7 @@ static struct {
- { 0, NULL, 0 }
- };
-
-+#ifndef NO_ACL_SUPPORT
- static void formalize_posix_acl(void *xvalue, int *value_len)
- {
- struct posix_acl_xattr_header *pacl_header;
-@@ -1151,6 +1152,7 @@ static void formalize_posix_acl(void *xv
- memcpy(xvalue, buffer, offset);
- *value_len = offset;
- }
-+#endif
-
- static xattr_entry_t *create_xattr_entry(int xprefix, char *xname, char *xvalue, int value_len)
- {
-@@ -1205,9 +1207,11 @@ static xattr_entry_t *find_xattr_entry(i
- if (!xentry_hash)
- xentry_hash = xcalloc(1, sizeof(xe) * XATTRENTRY_HASHSIZE);
-
-+#ifndef NO_ACL_SUPPORT
- if (xprefix == JFFS2_XPREFIX_ACL_ACCESS
- || xprefix == JFFS2_XPREFIX_ACL_DEFAULT)
- formalize_posix_acl(xvalue, &value_len);
-+#endif
-
- name_len = strlen(xname);
- index = (crc32(0, xname, name_len) ^ crc32(0, xvalue, value_len)) % XATTRENTRY_HASHSIZE;
--- a/rbtree.h
+++ b/rbtree.h
@@ -94,8 +94,7 @@ static inline struct page * rb_insert_pa
@@ -70,3 +40,21 @@
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
+--- a/include/mtd/ubi-media.h
++++ b/include/mtd/ubi-media.h
+@@ -30,7 +30,15 @@
+ #ifndef __UBI_MEDIA_H__
+ #define __UBI_MEDIA_H__
+
++#ifdef __linux__
+ #include <asm/byteorder.h>
++#else
++#include <stdint.h>
++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