summaryrefslogtreecommitdiffstats
path: root/rules
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 /rules
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 'rules')
-rw-r--r--rules/flashbench.in31
-rw-r--r--rules/flashbench.make68
2 files changed, 99 insertions, 0 deletions
diff --git a/rules/flashbench.in b/rules/flashbench.in
new file mode 100644
index 000000000..e8f09ef17
--- /dev/null
+++ b/rules/flashbench.in
@@ -0,0 +1,31 @@
+## SECTION=test_suites
+
+menuconfig FLASHBENCH
+ tristate
+ prompt "flashbench "
+ help
+ Identify characteristics of flash media
+
+ This is the tool used to identify the properties of
+ SD cards and other media for the Linaro flash memory
+ survey at [1]. The latest version should be available
+ at [2]. Please also check out the article on lwn.net [3].
+
+ [1] https://wiki.linaro.org/WorkingGroups/KernelConsolidation/Projects/FlashCardSurvey
+ [2] git clone git://git.linaro.org/people/arnd/flashbench.git
+ [3] http://lwn.net/Articles/428584/
+
+if FLASHBENCH
+
+config FLASHBENCH_MAX_BUFSIZE
+ string
+ prompt "Maximum flashbench buffer size in megabytes"
+ default 64
+ help
+ This is the maximum buffer size flashbench uses during operationg.
+ The buffer gets allocated 4 times, so take that into account when
+ choosing a buffer. The default is 64 MiB.
+
+endif
+
+# vim: set ft=kconfig:
diff --git a/rules/flashbench.make b/rules/flashbench.make
new file mode 100644
index 000000000..fcb669ef9
--- /dev/null
+++ b/rules/flashbench.make
@@ -0,0 +1,68 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Bernhard Walle <walle@corscience.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_FLASHBENCH) += flashbench
+
+#
+# Paths and names
+#
+FLASHBENCH_VERSION := 20120222
+FLASHBENCH_MD5 := 3d99608022b50e891e5f66d7c637d8b1
+FLASHBENCH := flashbench-$(FLASHBENCH_VERSION)
+FLASHBENCH_SUFFIX := tar.gz
+FLASHBENCH_URL := http://bwalle.de/programme/$(FLASHBENCH).$(FLASHBENCH_SUFFIX)
+FLASHBENCH_SOURCE := $(SRCDIR)/$(FLASHBENCH).$(FLASHBENCH_SUFFIX)
+FLASHBENCH_DIR := $(BUILDDIR)/$(FLASHBENCH)
+FLASHBENCH_LICENSE := GPL v2
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+FLASHBENCH_CONF_TOOL := NO
+FLASHBENCH_MAKE_ENV := $(CROSS_ENV)
+FLASHBENCH_MAKE_OPT := CC=$(CROSS_CC) \
+ EXTRA_CFLAGS=-DMAX_BUFSIZE=$(shell expr 1024 \* 1024 \* $(PTXCONF_FLASHBENCH_MAX_BUFSIZE))
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/flashbench.install:
+ @$(call targetinfo)
+ install -d $(FLASHBENCH_PKGDIR)/usr/sbin/
+ install -m0755 $(FLASHBENCH_DIR)/flashbench $(FLASHBENCH_PKGDIR)/usr/sbin
+ install -m0755 $(FLASHBENCH_DIR)/erase $(FLASHBENCH_PKGDIR)/usr/sbin
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/flashbench.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, flashbench)
+ @$(call install_fixup, flashbench,PRIORITY,optional)
+ @$(call install_fixup, flashbench,SECTION,base)
+ @$(call install_fixup, flashbench,AUTHOR,"Bernhard Walle <walle@corscience.de>")
+ @$(call install_fixup, flashbench,DESCRIPTION,missing)
+
+ @$(call install_copy, flashbench, 0, 0, 0755, -, /usr/sbin/flashbench)
+ @$(call install_copy, flashbench, 0, 0, 0755, -, /usr/sbin/erase)
+
+ @$(call install_finish, flashbench)
+
+ @$(call touch)
+
+# vim: syntax=make