i2SOM:Yocto:devtools: add flashbench tool from Linaro

This commit is contained in:
SteveChen
2018-07-01 21:13:09 +08:00
parent 7c4829523b
commit 68397c2fc3
3 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,33 @@
From 99fabbd9f6bd68eadadbb3e48120c38a599fa5ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20M=C3=BCller-Klieser?= <s.mueller-klieser@phytec.de>
Date: Mon, 20 Jun 2016 11:36:03 +0200
Subject: [PATCH] flashbench: fix Makefile
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Assign compiler defaults as conditional. This removes the requirement
to explicitly override those variables, e.g. for a cross-compile setup.
Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
---
Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index f83b220..45c59a3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
-CC := gcc
-CFLAGS := -O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -g2
-LDFLAGS := -lrt
+CC ?= gcc
+CFLAGS ?= -O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -g2
+LDFLAGS ?= -lrt
all: flashbench erase
--
1.9.1

View File

@ -0,0 +1,30 @@
# Copyright (C) 2016 Stefan Christ <s.christ@phytec.de>
# Released under the MIT license (see COPYING.MIT for the terms)
DESCRIPTION = "Tool for benchmarking and classifying flash memory drives"
HOMEPAGE = "https://git.linaro.org/people/arnd.bergmann/flashbench.git"
SECTION = "misc"
DEPENDS = ""
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
S = "${WORKDIR}/git"
SRC_URI = "git://git.linaro.org/people/arnd.bergmann/flashbench.git;protocol=https"
SRC_URI += "\
file://0001-flashbench-fix-Makefile.patch \
"
# There are no upstream tags/releases.
SRCREV = "2e30b1968a66147412f21002ea844122a0d5e2f0"
PR = "r0"
PV = "0.1+${SRCPV}"
# No configure/autotools. Only a simple Makefile.
do_configure[noexec] = "1"
do_install () {
install -Dm 755 ${B}/flashbench ${D}${bindir}/flashbench
install -Dm 755 ${B}/erase ${D}${bindir}/erase
}