meta-digi-arm: integrate kobs-ng version 3.0.35-4.1.0
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
a137f4f190
commit
bbebf6acf8
|
|
@ -0,0 +1,29 @@
|
|||
From: Javier Viguera <javier.viguera@digi.com>
|
||||
Date: Fri, 11 Oct 2013 18:56:04 +0200
|
||||
Subject: [PATCH] makefile.am
|
||||
|
||||
Yocto build system does not use the makefile.in directly. Instead it
|
||||
uses autotools to regenerate it using the source makefile.am.
|
||||
|
||||
But the makefile.in distributed in the package has some rules changed
|
||||
that are not generated from the makefile.am, so adapt the makefile.am to
|
||||
generate an equivalent makefile.in.
|
||||
|
||||
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
|
||||
---
|
||||
include/Makefile.am | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/include/Makefile.am b/include/Makefile.am
|
||||
index 17d4d2c..dc3a466 100644
|
||||
--- a/include/Makefile.am
|
||||
+++ b/include/Makefile.am
|
||||
@@ -1,5 +1,8 @@
|
||||
noinst_HEADERS=version.h
|
||||
|
||||
+all-local:
|
||||
+ echo "const char *git_sha = \""`git rev-parse HEAD`"\";" > ../include/autoversion.h
|
||||
+
|
||||
version.h: stamp-vh
|
||||
@:
|
||||
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
From: "Paul B. Henson" <henson@acm.org>
|
||||
Date: Fri, 11 Oct 2013 17:23:44 +0200
|
||||
Subject: [PATCH] fix-mtd-defines
|
||||
|
||||
Newer kernel headers renamed mtd mode defines and no longer support
|
||||
MEMSETOOBSEL. Allow code to work with both older and newer kernel
|
||||
versions.
|
||||
|
||||
Signed-off-by: Paul B. Henson <henson@acm.org>
|
||||
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
|
||||
---
|
||||
src/mtd.c | 9 +++++++++
|
||||
src/mtd.h | 8 ++++++++
|
||||
2 files changed, 17 insertions(+)
|
||||
|
||||
diff --git a/src/mtd.c b/src/mtd.c
|
||||
index 2974814..f9e60a3 100644
|
||||
--- a/src/mtd.c
|
||||
+++ b/src/mtd.c
|
||||
@@ -852,8 +852,11 @@ void mtd_close(struct mtd_data *md)
|
||||
mp = &md->part[i];
|
||||
|
||||
if (mp->fd != -1) {
|
||||
+/* Newer kernels dropped MEMSETOOBSEL */
|
||||
+#ifdef MEMSETOOBSEL
|
||||
(void)ioctl(mp->fd, MEMSETOOBSEL,
|
||||
&mp->old_oobinfo);
|
||||
+#endif
|
||||
close(mp->fd);
|
||||
}
|
||||
|
||||
@@ -896,6 +899,8 @@ int mtd_set_ecc_mode(struct mtd_data *md, int ecc)
|
||||
continue;
|
||||
}
|
||||
|
||||
+/* Newer kernels dropped MEMSETOOBSEL */
|
||||
+#ifdef MEMSETOOBSEL
|
||||
if (r == -ENOTTY) {
|
||||
r = ioctl(mp->fd, MEMSETOOBSEL, &mp->old_oobinfo);
|
||||
if (r != 0) {
|
||||
@@ -904,6 +909,7 @@ int mtd_set_ecc_mode(struct mtd_data *md, int ecc)
|
||||
}
|
||||
mp->oobinfochanged = 0;
|
||||
}
|
||||
+#endif
|
||||
} else {
|
||||
r = ioctl(mp->fd, MTDFILEMODE, (void *)MTD_MODE_RAW);
|
||||
if (r != 0 && r != -ENOTTY) {
|
||||
@@ -911,6 +917,8 @@ int mtd_set_ecc_mode(struct mtd_data *md, int ecc)
|
||||
continue;
|
||||
}
|
||||
|
||||
+/* Newer kernels dropped MEMSETOOBSEL */
|
||||
+#ifdef MEMSETOOBSEL
|
||||
if (r == -ENOTTY) {
|
||||
r = ioctl(mp->fd, MEMSETOOBSEL, &none_oobinfo);
|
||||
if (r != 0) {
|
||||
@@ -920,6 +928,7 @@ int mtd_set_ecc_mode(struct mtd_data *md, int ecc)
|
||||
mp->oobinfochanged = 1;
|
||||
} else
|
||||
mp->oobinfochanged = 2;
|
||||
+#endif
|
||||
}
|
||||
|
||||
mp->ecc = ecc;
|
||||
diff --git a/src/mtd.h b/src/mtd.h
|
||||
index 99d7887..bf6e53d 100644
|
||||
--- a/src/mtd.h
|
||||
+++ b/src/mtd.h
|
||||
@@ -31,6 +31,14 @@
|
||||
#include "BootControlBlocks.h"
|
||||
#include "rom_nand_hamming_code_ecc.h"
|
||||
|
||||
+// Newer kernel headers renamed define
|
||||
+#ifndef MTD_MODE_NORMAL
|
||||
+#define MTD_MODE_NORMAL MTD_FILE_MODE_NORMAL
|
||||
+#endif
|
||||
+#ifndef MTD_MODE_RAW
|
||||
+#define MTD_MODE_RAW MTD_FILE_MODE_RAW
|
||||
+#endif
|
||||
+
|
||||
//------------------------------------------------------------------------------
|
||||
// Re-definitions of true and false, because the standard ones aren't good
|
||||
// enough?
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
# Copyright 2013 Digi International. All rights reserved.
|
||||
|
||||
SUMMARY = "Freescale's mxs nand update utility"
|
||||
SECTION = "base"
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
|
||||
|
||||
PR = "${DISTRO}.r0"
|
||||
|
||||
inherit autotools
|
||||
|
||||
SRC_URI = " \
|
||||
${DIGI_MIRROR}/${PN}-${PV}.tar.gz \
|
||||
file://0001-makefile.am.patch \
|
||||
file://0002-fix-mtd-defines.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "2a0e55b5063605b2664fd67c95a6c686"
|
||||
SRC_URI[sha256sum] = "92d2f23add8c5d3102c77f241cae26ca55871ccc613a7af833bebbbac7afb8ea"
|
||||
|
||||
COMPATIBLE_MACHINE = "mxs"
|
||||
Loading…
Reference in New Issue