diff options
author | Bernhard Walle <walle@corscience.de> | 2012-03-15 14:06:33 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2012-03-16 11:49:23 +0100 |
commit | dfcf060370c1ee252764a3476900e98b8acdf5c8 (patch) | |
tree | 648ec38e8b7572df8e02c3090577e46ca2d1ca2a /rules/flashbench.make | |
parent | 81e66e3e12ea2e8af61a4b1cf2196c53ce66e702 (diff) | |
download | ptxdist-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/flashbench.make')
-rw-r--r-- | rules/flashbench.make | 68 |
1 files changed, 68 insertions, 0 deletions
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 |