From 2901afd38daeb7d4d2b07f9a19ef29fb1efacfa4 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Sat, 12 Mar 2016 18:04:02 +0200 Subject: [PATCH] f3: add recipe --- recipes/f3/f3_git.bb | 27 ++++++++++++ ...-allow-users-to-specify-linker-flags.patch | 43 +++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 recipes/f3/f3_git.bb create mode 100644 recipes/f3/files/0001-allow-users-to-specify-linker-flags.patch diff --git a/recipes/f3/f3_git.bb b/recipes/f3/f3_git.bb new file mode 100644 index 0000000..7ae0922 --- /dev/null +++ b/recipes/f3/f3_git.bb @@ -0,0 +1,27 @@ +DESCRIPTION = "F3 - Fight Flash Fraud - test real flash memory capacity" +LICENSE = "GPLv3" + +PR = "r0" +PR_append = "+gitr${SRCPV}" + +SRC_URI = " \ + git://github.com/AltraMayor/f3.git;protocol=git;branch=master \ + file://0001-allow-users-to-specify-linker-flags.patch;patch=1 \ +" + +SRCREV = "cbe8d6167a214ceec516b9ff7f0b5e1bdeb06079" + +S = "${WORKDIR}/git" + +do_compile() { + oe_runmake +} + +do_install() { + install -d ${D}${bindir}/ + install -m 0755 f3write ${D}${bindir}/ + install -m 0755 f3read ${D}${bindir}/ + install -d ${D}${mandir}/ + install -m 0644 f3read.1 ${D}${mandir}/ + ln -fs f3read.1 ${D}${mandir}/f3write.1 +} diff --git a/recipes/f3/files/0001-allow-users-to-specify-linker-flags.patch b/recipes/f3/files/0001-allow-users-to-specify-linker-flags.patch new file mode 100644 index 0000000..5be2530 --- /dev/null +++ b/recipes/f3/files/0001-allow-users-to-specify-linker-flags.patch @@ -0,0 +1,43 @@ +From 70962dcfaa41ca390f6f077cc64312fb879b7eb4 Mon Sep 17 00:00:00 2001 +From: Grazvydas Ignotas +Date: Sat, 12 Mar 2016 17:39:05 +0200 +Subject: [PATCH] allow users to specify linker flags + +Traditionally LDFLAGS is used for this, it's what I've tried first +but it wasn't accepted. +--- + Makefile | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/Makefile b/Makefile +index 404bc17..46853f5 100644 +--- a/Makefile ++++ b/Makefile +@@ -23,19 +23,19 @@ install-experimental: experimental + $(INSTALL) -oroot -groot -m755 $(EXPERIMENTAL_TARGETS) $(PREFIX)/bin + + f3write: utils.o f3write.o +- $(CC) -o $@ $^ -lm ++ $(CC) -o $@ $^ $(LDFLAGS) -lm + + f3read: utils.o f3read.o +- $(CC) -o $@ $^ ++ $(CC) -o $@ $^ $(LDFLAGS) + + f3probe: libutils.o libdevs.o libprobe.o f3probe.o +- $(CC) -o $@ $^ -lm -ludev ++ $(CC) -o $@ $^ $(LDFLAGS) -lm -ludev + + f3brew: libutils.o libdevs.o f3brew.o +- $(CC) -o $@ $^ -lm -ludev ++ $(CC) -o $@ $^ $(LDFLAGS) -lm -ludev + + f3fix: libutils.o f3fix.o +- $(CC) -o $@ $^ -lparted ++ $(CC) -o $@ $^ $(LDFLAGS) -lparted + + -include *.d + +-- +2.7.0 + -- 2.39.2