mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 10:08:59 +00:00
a4b86b292a
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>
24 lines
440 B
Diff
24 lines
440 B
Diff
--- a/src/mtd.c
|
|
+++ b/src/mtd.c
|
|
@@ -28,6 +28,7 @@
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
+#include <stddef.h>
|
|
#include <fcntl.h>
|
|
#include <ctype.h>
|
|
#include <errno.h>
|
|
--- a/src/mtd.h
|
|
+++ b/src/mtd.h
|
|
@@ -25,8 +25,10 @@
|
|
#ifndef MTD_H
|
|
#define MTD_H
|
|
|
|
+#define _GNU_SOURCE
|
|
#include <mtd/mtd-user.h>
|
|
#include <endian.h>
|
|
+#include <fcntl.h>
|
|
|
|
#include "BootControlBlocks.h"
|
|
#include "rom_nand_hamming_code_ecc.h"
|