summaryrefslogtreecommitdiff
path: root/yocto-poky/meta/recipes-devtools/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/recipes-devtools/mtd')
-rw-r--r--yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch29
-rw-r--r--yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch64
-rw-r--r--yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch24
-rw-r--r--yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb8
4 files changed, 58 insertions, 67 deletions
diff --git a/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch
new file mode 100644
index 000000000..305be5215
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch
@@ -0,0 +1,29 @@
+From e16fa28bc57c29923ab60af2ac343da83e1992d8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 6 Oct 2015 23:51:34 +0000
+Subject: [PATCH] Fix build with musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ mkfs.jffs2.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
+ recv_image.c | 1 -
+ serve_image.c | 1 -
+ 3 files changed, 42 insertions(+), 4 deletions(-)
+
+diff --git a/mkfs.jffs2.c b/mkfs.jffs2.c
+index f09c0b2..ed2dc43 100644
+--- a/mkfs.jffs2.c
++++ b/mkfs.jffs2.c
+@@ -72,6 +72,7 @@
+ #include <byteswap.h>
+ #include <crc32.h>
+ #include <inttypes.h>
++#include <limits.h>
+
+ #include "rbtree.h"
+ #include "common.h"
+--
+2.6.1
+
diff --git a/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
deleted file mode 100644
index 2d36158f5..000000000
--- a/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-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/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
new file mode 100644
index 000000000..7d783e7a5
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
@@ -0,0 +1,24 @@
+Replace rpmatch() usage with checking first character of line
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/include/common.h
++++ b/include/common.h
+@@ -122,10 +122,12 @@
+ }
+
+ if (strcmp("\n", line) != 0) {
+- switch (rpmatch(line)) {
+- case 0: ret = false; break;
+- case 1: ret = true; break;
+- case -1:
++ switch (line[0]) {
++ case 'N':
++ case 'n': ret = false; break;
++ case 'Y':
++ case 'y': ret = true; break;
++ default:
+ puts("unknown response; please try again");
+ continue;
+ }
diff --git a/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 17dca7760..cd9ae06ce 100644
--- a/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -7,16 +7,18 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
DEPENDS = "zlib lzo e2fsprogs util-linux"
-PV = "1.5.1+git${SRCPV}"
+PV = "1.5.2"
-SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b"
+SRCREV = "aea36417067dade75192bafa03af70b6eb2677b1"
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 \
+ file://0001-Fix-build-with-musl.patch \
"
+SRC_URI_append_libc-musl = " file://010-fix-rpmatch.patch "
+
S = "${WORKDIR}/git/"
# xattr support creates an additional compile-time dependency on acl because