diff --git a/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch b/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
new file mode 100644
index 0000000..2d36158
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
@@ -0,0 +1,64 @@
+From b856ff35c20124ceae40bbc4d32584df47618c96 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 25 Feb 2015 09:28:26 +0000
+Subject: [PATCH] hashtable: Remove duplicate hashtable_iterator_value/hashtable_iterator_key
+
+gcc5 is defaulting to gnu11 instead of gnu89 like previous versions
+as a result the semantics of 'extern inline' changes where in gnu89 for 'extern inline' no external
+visible function is generated,in c99 'external inline' generates externally visible function
+there is no equivalent in c99+ because redefinitions arent allowed
+but 'static inline' remains same for for c89 and c99+, thats why we change the semantics
+so we make the functions static inline, and achieve the same effect
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: pending
+
+---
+ mkfs.ubifs/hashtable/hashtable_itr.c | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+Index: git/mkfs.ubifs/hashtable/hashtable_itr.h
+===================================================================
+--- git.orig/mkfs.ubifs/hashtable/hashtable_itr.h
++++ git/mkfs.ubifs/hashtable/hashtable_itr.h
+@@ -28,7 +28,7 @@ hashtable_iterator(struct hashtable *h);
+ /* hashtable_iterator_key
+  * - return the value of the (key,value) pair at the current position */
+ 
+-extern inline void *
++static inline void *
+ hashtable_iterator_key(struct hashtable_itr *i)
+ {
+     return i->e->k;
+@@ -37,7 +37,7 @@ hashtable_iterator_key(struct hashtable_
+ /*****************************************************************************/
+ /* value - return the value of the (key,value) pair at the current position */
+ 
+-extern inline void *
++static inline void *
+ hashtable_iterator_value(struct hashtable_itr *i)
+ {
+     return i->e->v;
+Index: git/mkfs.ubifs/hashtable/hashtable_itr.c
+===================================================================
+--- git.orig/mkfs.ubifs/hashtable/hashtable_itr.c
++++ git/mkfs.ubifs/hashtable/hashtable_itr.c
+@@ -35,18 +35,6 @@ hashtable_iterator(struct hashtable *h)
+ }
+ 
+ /*****************************************************************************/
+-/* key      - return the key of the (key,value) pair at the current position */
+-/* value    - return the value of the (key,value) pair at the current position */
+-
+-void *
+-hashtable_iterator_key(struct hashtable_itr *i)
+-{ return i->e->k; }
+-
+-void *
+-hashtable_iterator_value(struct hashtable_itr *i)
+-{ return i->e->v; }
+-
+-/*****************************************************************************/
+ /* advance - advance the iterator to the next element
+  *           returns zero if advanced to end of table */
+ 
diff --git a/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch b/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
new file mode 100644
index 0000000..57d6a30
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git-2.patch
@@ -0,0 +1,103 @@
+Upstream-Status: Pending
+
+--- /tmp/mkfs.jffs2.c	2009-01-11 15:28:41.000000000 +0100
++++ git/mkfs.jffs2.c	2009-01-11 15:59:29.000000000 +0100
+@@ -100,6 +100,11 @@
+ 	struct rb_node hardlink_rb;
+ };
+ 
++struct ignorepath_entry {
++	struct ignorepath_entry* next;  /* Points to the next ignorepath element */
++	char name[PATH_MAX];        /* Name of the entry */
++};
++static struct ignorepath_entry* ignorepath = 0;
+ struct rb_root hardlinks;
+ static int out_fd = -1;
+ static int in_fd = -1;
+@@ -408,7 +413,7 @@
+ 	char *hpath, *tpath;
+ 	struct dirent *dp, **namelist;
+ 	struct filesystem_entry *entry;
+-
++	struct ignorepath_entry* element = ignorepath;
+ 
+ 	if (lstat(hostpath, &sb)) {
+ 		perror_msg_and_die("%s", hostpath);
+@@ -417,6 +422,15 @@
+ 	entry = add_host_filesystem_entry(targetpath, hostpath,
+ 			sb.st_uid, sb.st_gid, sb.st_mode, 0, parent);
+ 
++	while ( element ) {
++		if ( strcmp( element->name, targetpath ) == 0 ) {
++			printf( "Note: ignoring directories below '%s'\n", targetpath );
++			return entry;
++			break;
++		}
++		element = element->next;
++	}
++
+ 	n = scandir(hostpath, &namelist, 0, alphasort);
+ 	if (n < 0) {
+ 		perror_msg_and_die("opening directory %s", hostpath);
+@@ -1453,6 +1467,7 @@
+ 	{"root", 1, NULL, 'r'},
+ 	{"pagesize", 1, NULL, 's'},
+ 	{"eraseblock", 1, NULL, 'e'},
++	{"ignore", 1, NULL, 'I'},
+ 	{"output", 1, NULL, 'o'},
+ 	{"help", 0, NULL, 'h'},
+ 	{"verbose", 0, NULL, 'v'},
+@@ -1500,6 +1515,7 @@
+ "  -L, --list-compressors  Show the list of the avaiable compressors\n"
+ "  -t, --test-compression  Call decompress and compare with the original (for test)\n"
+ "  -n, --no-cleanmarkers   Don't add a cleanmarker to every eraseblock\n"
++"  -I, --ignore=PATH       Ignore sub directory and file tree below PATH when recursing over the file system\n"
+ "  -o, --output=FILE       Output to FILE (default: stdout)\n"
+ "  -l, --little-endian     Create a little-endian filesystem\n"
+ "  -b, --big-endian        Create a big-endian filesystem\n"
+@@ -1666,6 +1682,7 @@
+ 	char *compr_name = NULL;
+ 	int compr_prior  = -1;
+ 	int warn_page_size = 0;
++	struct ignorepath_entry* element = ignorepath;
+ 
+ 	page_size = sysconf(_SC_PAGESIZE);
+ 	if (page_size < 0) /* System doesn't know so ... */
+@@ -1676,7 +1693,7 @@
+ 	jffs2_compressors_init();
+ 
+ 	while ((opt = getopt_long(argc, argv,
+-					"D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
++					"D:d:r:s:I:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
+ 	{
+ 		switch (opt) {
+ 			case 'D':
+@@ -1700,6 +1717,28 @@
+ 				warn_page_size = 0; /* set by user, so don't need to warn */
+ 				break;
+ 
++			case 'I':
++				printf( "Note: Adding '%s' to ignore Path\n", optarg );
++				element = ignorepath;
++				if ( !ignorepath ) {
++					ignorepath = xmalloc( sizeof( struct ignorepath_entry ) );
++					ignorepath->next = 0;
++					strcpy( &ignorepath->name[0], optarg );
++				} else {
++					while ( element->next ) element = element->next;
++					element->next = xmalloc( sizeof( struct ignorepath_entry ) );
++ 					element->next->next = 0;
++					strcpy( &element->next->name[0], optarg );
++				}
++				printf( "--------- Dumping ignore path list ----------------\n" );
++				element = ignorepath;
++				while ( element ) {
++					printf( "  * '%s'\n", &element->name[0] );
++					element = element->next;
++				}
++				printf( "---------------------------------------------------\n" );
++				break;
++
+ 			case 'o':
+ 				if (out_fd != -1) {
+ 					error_msg_and_die("output filename specified more than once");
diff --git a/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch b/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
new file mode 100644
index 0000000..05f1629
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/fix-armv7-neon-alignment.patch
@@ -0,0 +1,44 @@
+Upstream-Status: Pending
+
+NEON instruction VLD1.64 was used to copy 64 bits data after type
+casting, and they will trigger alignment trap.
+This patch uses memcpy to avoid alignment problem.
+
+Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com>
+
+diff --git a/mkfs.ubifs/key.h b/mkfs.ubifs/key.h
+index d3a02d4..e7e9218 100644
+--- a/mkfs.ubifs/key.h
++++ b/mkfs.ubifs/key.h
+@@ -141,10 +141,12 @@ static inline void data_key_init(union ubifs_key *key, ino_t inum,
+  */
+ static inline void key_write(const union ubifs_key *from, void *to)
+ {
+-	union ubifs_key *t = to;
++	__le32 x[2];
+ 
+-	t->j32[0] = cpu_to_le32(from->u32[0]);
+-	t->j32[1] = cpu_to_le32(from->u32[1]);
++	x[0] = cpu_to_le32(from->u32[0]);
++	x[1] = cpu_to_le32(from->u32[1]);
++
++	memcpy(to, &x, 8);
+ 	memset(to + 8, 0, UBIFS_MAX_KEY_LEN - 8);
+ }
+ 
+@@ -156,10 +158,12 @@ static inline void key_write(const union ubifs_key *from, void *to)
+  */
+ static inline void key_write_idx(const union ubifs_key *from, void *to)
+ {
+-	union ubifs_key *t = to;
++	__le32 x[2];
++
++	x[0] = cpu_to_le32(from->u32[0]);
++	x[1] = cpu_to_le32(from->u32[1]);
+ 
+-	t->j32[0] = cpu_to_le32(from->u32[0]);
+-	t->j32[1] = cpu_to_le32(from->u32[1]);
++	memcpy(to, &x, 8);
+ }
+ 
+ /**
diff --git a/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch b/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch
new file mode 100644
index 0000000..7207cfc
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch
@@ -0,0 +1,137 @@
+Upstream-Status: Pending
+From patchwork Mon Aug  8 08:16:43 2011
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: mtd-utils: fix corrupt cleanmarker with flash_erase -j command
+Date: Sun, 07 Aug 2011 22:16:43 -0000
+From: b35362@freescale.com
+X-Patchwork-Id: 108873
+Message-Id: <1312791403-13473-1-git-send-email-b35362@freescale.com>
+To: <dwmw2@infradead.org>
+Cc: Liu Shuo <b35362@freescale.com>, Artem.Bityutskiy@nokia.com,
+ Li Yang <leoli@freescale.com>, linux-mtd@lists.infradead.org
+
+From: Liu Shuo <b35362@freescale.com>
+
+Flash_erase -j should fill discrete freeoob areas with required bytes
+of JFFS2 cleanmarker in jffs2_check_nand_cleanmarker(). Not just fill
+the first freeoob area.
+
+The below is the result without this workaround:
+
+JFFS2: Erase block at 0x00000000 is not formatted. It will be erased
+JFFS2: Erase block at 0x00004000 is not formatted. It will be erased
+JFFS2: Erase block at 0x00008000 is not formatted. It will be erased
+JFFS2: Erase block at 0x0000c000 is not formatted. It will be erased
+JFFS2: Erase block at 0x00010000 is not formatted. It will be erased
+JFFS2: Erase block at 0x00014000 is not formatted. It will be erased
+JFFS2: Erase block at 0x00018000 is not formatted. It will be erased
+JFFS2: Erase block at 0x0001c000 is not formatted. It will be erased
+JFFS2: Erase block at 0x00020000 is not formatted. It will be erased
+JFFS2: Erase block at 0x00024000 is not formatted. It will be erased
+JFFS2: Erase block at 0x00028000 is not formatted. It will be erased
+...
+
+Signed-off-by: Liu Shuo <b35362@freescale.com>
+Signed-off-by: Li Yang <leoli@freescale.com>
+
+Updated for the new version
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+---
+v2 : get length of availble freeoob bytes from oobinfo information,
+      not use the ioctl ECCGETLAYOUT which is being deprecated.
+
+ flash_erase.c |   46 +++++++++++++++++++++++++++++++++++++++-------
+ 1 files changed, 39 insertions(+), 7 deletions(-)
+
+diff --git a/flash_erase.c b/flash_erase.c
+index 933373a..4b9d84b 100644
+--- a/flash_erase.c
++++ b/flash_erase.c
+@@ -99,6 +99,7 @@ int main(int argc, char *argv[])
+ 	bool isNAND;
+ 	int error = 0;
+ 	off_t offset = 0;
++	void *oob_data = NULL;
+ 
+ 	/*
+ 	 * Process user arguments
+@@ -201,15 +202,43 @@ int main(int argc, char *argv[])
+ 			if (ioctl(fd, MEMGETOOBSEL, &oobinfo) != 0)
+ 				return sys_errmsg("%s: unable to get NAND oobinfo", mtd_device);
+ 
++			cleanmarker.totlen = cpu_to_je32(8);
+ 			/* Check for autoplacement */
+ 			if (oobinfo.useecc == MTD_NANDECC_AUTOPLACE) {
+-				/* Get the position of the free bytes */
+-				if (!oobinfo.oobfree[0][1])
++				struct nand_ecclayout_user ecclayout;
++				int i, oobavail;
++
++				for (i = 0, oobavail = 0; oobinfo.oobfree[i][1]; i++)
++					oobavail += oobinfo.oobfree[i][1];
++
++				if (!oobavail)
+ 					return errmsg(" Eeep. Autoplacement selected and no empty space in oob");
++
++				/* Get the position of the free bytes */
+ 				clmpos = oobinfo.oobfree[0][0];
+-				clmlen = oobinfo.oobfree[0][1];
+-				if (clmlen > 8)
+-					clmlen = 8;
++				clmlen = MIN(oobavail, 8);
++
++				if (oobinfo.oobfree[0][1] < 8 && oobavail >= 8) {
++					int left, n, last = 0;
++					void *cm;
++
++					oob_data = malloc(mtd.oob_size);
++					if (!oob_data)
++						return -ENOMEM;
++
++					memset(oob_data, 0xff, mtd.oob_size);
++					cm = &cleanmarker;
++					for (i = 0, left = clmlen; left ; i++) {
++						n = MIN(left, oobinfo.oobfree[i][1]);
++						memcpy(oob_data + oobinfo.oobfree[i][0],
++								cm, n);
++						left -= n;
++						cm   += n;
++						last = oobinfo.oobfree[i][0] + n;
++					}
++
++					clmlen = last - clmpos;
++				}
+ 			} else {
+ 				/* Legacy mode */
+ 				switch (mtd.oob_size) {
+@@ -227,7 +256,6 @@ int main(int argc, char *argv[])
+ 						break;
+ 				}
+ 			}
+-			cleanmarker.totlen = cpu_to_je32(8);
+ 		}
+ 		cleanmarker.hdr_crc = cpu_to_je32(mtd_crc32(0, &cleanmarker, sizeof(cleanmarker) - 4));
+ 	}
+@@ -276,7 +304,8 @@ int main(int argc, char *argv[])
+ 
+ 		/* write cleanmarker */
+ 		if (isNAND) {
+-			if (mtd_write_oob(mtd_desc, &mtd, fd, (uint64_t)offset + clmpos, clmlen, &cleanmarker) != 0) {
++			void *data = oob_data ? oob_data + clmpos : &cleanmarker;
++			if (mtd_write_oob(mtd_desc, &mtd, fd, (uint64_t)offset + clmpos, clmlen, data) != 0) {
+ 				sys_errmsg("%s: MTD writeoob failure", mtd_device);
+ 				continue;
+ 			}
+@@ -291,5 +320,8 @@ int main(int argc, char *argv[])
+ 	show_progress(&mtd, offset, eb, eb_start, eb_cnt);
+ 	bareverbose(!quiet, "\n");
+ 
++	if (oob_data)
++		free(oob_data);
++
+ 	return 0;
+ }
diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb b/meta/recipes-devtools/mtd/mtd-utils_git.bb
new file mode 100644
index 0000000..17dca77
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -0,0 +1,44 @@
+SUMMARY = "Tools for managing memory technology devices"
+HOMEPAGE = "http://www.linux-mtd.infradead.org/"
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+                    file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
+
+DEPENDS = "zlib lzo e2fsprogs util-linux"
+
+PV = "1.5.1+git${SRCPV}"
+
+SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b"
+SRC_URI = "git://git.infradead.org/mtd-utils.git \
+           file://add-exclusion-to-mkfs-jffs2-git-2.patch \
+           file://fix-armv7-neon-alignment.patch \
+           file://0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch \
+           file://mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch \
+"
+
+S = "${WORKDIR}/git/"
+
+# xattr support creates an additional compile-time dependency on acl because
+# the sys/acl.h header is needed. libacl is not needed and thus enabling xattr
+# regardless whether acl is enabled or disabled in the distro should be okay.
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)}"
+PACKAGECONFIG[xattr] = ",,acl,"
+
+EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'"
+
+do_install () {
+	oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
+}
+
+PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc"
+
+FILES_mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool"
+FILES_mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
+FILES_mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
+
+BBCLASSEXTEND = "native"
+
+# git/.compr.c.dep:46: warning: NUL character seen; rest of line ignored
+# git/.compr.c.dep:47: *** missing separator.  Stop.
+PARALLEL_MAKE = ""
