summaryrefslogtreecommitdiffstats
path: root/patches/flashbench-20120222
diff options
context:
space:
mode:
authorBernhard Walle <walle@corscience.de>2012-03-15 14:06:33 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2012-03-16 11:49:23 +0100
commitdfcf060370c1ee252764a3476900e98b8acdf5c8 (patch)
tree648ec38e8b7572df8e02c3090577e46ca2d1ca2a /patches/flashbench-20120222
parent81e66e3e12ea2e8af61a4b1cf2196c53ce66e702 (diff)
downloadptxdist-dfcf060370c1ee252764a3476900e98b8acdf5c8.tar.gz
ptxdist-dfcf060370c1ee252764a3476900e98b8acdf5c8.tar.xz
Add flashbench tool
This patch adds the flashbench tool from Linaro Project git://git.linaro.org/people/arnd/flashbench.git. See also http://lwn.net/Articles/428584/. Because there is no tarball, I exported the current git repo and put it on my server. The default maximum buffer size of 64 MiB (the buffer is allocated 4 times) was too large for my device, so I patched the tool and added an option in the ptxdist menu. Tested with a custom OMAP3 board which is similar to the Devkit8000. Signed-off-by: Bernhard Walle <walle@corscience.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches/flashbench-20120222')
-rw-r--r--patches/flashbench-20120222/0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch37
-rw-r--r--patches/flashbench-20120222/series4
2 files changed, 41 insertions, 0 deletions
diff --git a/patches/flashbench-20120222/0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch b/patches/flashbench-20120222/0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch
new file mode 100644
index 000000000..cc9505b94
--- /dev/null
+++ b/patches/flashbench-20120222/0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch
@@ -0,0 +1,37 @@
+From: Bernhard Walle <walle@corscience.de>
+Date: Wed, 14 Mar 2012 16:52:47 +0100
+Subject: [PATCH] Allow to specify MAX_BUFSIZE during compile time
+
+The default value of 64 MiB is too large for small embedded systems.
+
+Signed-off-by: Bernhard Walle <walle@corscience.de>
+---
+ Makefile | 2 +-
+ dev.c | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 8fbd119..01771b0 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+ CC := gcc
+-CFLAGS := -O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -g2
++CFLAGS := -O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -g2 $(EXTRA_CFLAGS)
+ LDFLAGS := -lrt
+
+ all: flashbench erase
+diff --git a/dev.c b/dev.c
+index f1718be..73a9b3f 100644
+--- a/dev.c
++++ b/dev.c
+@@ -22,7 +22,9 @@
+
+ #include "dev.h"
+
++#ifndef MAX_BUFSIZE
+ #define MAX_BUFSIZE (64 * 1024 * 1024)
++#endif
+
+ static inline long long time_to_ns(struct timespec *ts)
+ {
diff --git a/patches/flashbench-20120222/series b/patches/flashbench-20120222/series
new file mode 100644
index 000000000..8ac1f1984
--- /dev/null
+++ b/patches/flashbench-20120222/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Allow-to-specify-MAX_BUFSIZE-during-compile-time.patch
+# 2284485069f201f5dd31c217b70f51e0 - git-ptx-patches magic