aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/kobs-ng/patches/001-fix-mtd-defines.patch
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2016-09-01 07:45:37 -0700
committerFelix Fietkau <nbd@nbd.name>2016-09-04 13:36:09 +0200
commita4b86b292a0bce95b9874d6c757a709c5a5269b4 (patch)
tree7922e9c3677adc852b5812519866586fd9fb2c80 /package/boot/kobs-ng/patches/001-fix-mtd-defines.patch
parentf8c7e935ef8060b8ab2f5ca52832ef8dfea361bc (diff)
downloadupstream-a4b86b292a0bce95b9874d6c757a709c5a5269b4.tar.gz
upstream-a4b86b292a0bce95b9874d6c757a709c5a5269b4.tar.bz2
upstream-a4b86b292a0bce95b9874d6c757a709c5a5269b4.zip
boot: kobs-ng: update kobs-ng for newer kernels
This allows kobs-ng to flash the SPL successfully on the 4.4 kernel used by the Gateworks IMX boards supporting NAND. The previous version of kobs-ng worked with the 3.14 kernel but will brick a board making its SPL unbootable for the 4.4 kernel. See http://trac.gateworks.com/wiki/ventana/bootloader#nandspl for instructions on updating the SPL from Linux. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Diffstat (limited to 'package/boot/kobs-ng/patches/001-fix-mtd-defines.patch')
-rw-r--r--package/boot/kobs-ng/patches/001-fix-mtd-defines.patch76
1 files changed, 0 insertions, 76 deletions
diff --git a/package/boot/kobs-ng/patches/001-fix-mtd-defines.patch b/package/boot/kobs-ng/patches/001-fix-mtd-defines.patch
deleted file mode 100644
index 6fdc735e06..0000000000
--- a/package/boot/kobs-ng/patches/001-fix-mtd-defines.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From: Paul B. Henson <henson@acm.org>
-
-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>
----
-
-http://git.buildroot.net/buildroot/plain/package/kobs-ng/kobs-ng-fix-mtd-defines.patch
-
---- 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
- 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
- }
- 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
- 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
- mp->oobinfochanged = 1;
- } else
- mp->oobinfochanged = 2;
-+#endif
- }
-
- mp->ecc = ecc;
---- 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?