* [PATCH] tiobench: add recipe
@ 2011-05-26 15:25 Ludovic Desroches
2011-05-27 22:21 ` Paul Menzel
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Desroches @ 2011-05-26 15:25 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
---
recipes/tiobench/files/tiobench-makefile.patch | 42 ++++++++++++++++++++++++
recipes/tiobench/tiobench_0.3.3.bb | 27 +++++++++++++++
2 files changed, 69 insertions(+), 0 deletions(-)
create mode 100644 recipes/tiobench/files/tiobench-makefile.patch
create mode 100644 recipes/tiobench/tiobench_0.3.3.bb
diff --git a/recipes/tiobench/files/tiobench-makefile.patch b/recipes/tiobench/files/tiobench-makefile.patch
new file mode 100644
index 0000000..23e7a43
--- /dev/null
+++ b/recipes/tiobench/files/tiobench-makefile.patch
@@ -0,0 +1,42 @@
+--- a/Makefile 2011-05-26 07:48:46.341400974 +0200
++++ b/Makefile 2011-05-26 10:54:48.631400818 +0200
+@@ -1,8 +1,10 @@
+ # Makefile for tiotest
+
+-CC=gcc
++CROSS_COMPILE?=
++CC=$(CROSS_COMPILE)gcc
+ #CFLAGS=-O3 -fomit-frame-pointer -Wall
+ CFLAGS=-O2 -Wall
++LDFLAGS?=
+
+ #DEFINES=-DUSE_MMAP
+ #-DUSE_MADVISE
+@@ -14,16 +16,15 @@
+
+ #DEFINES=
+
+-LINK=gcc
+ EXE=tiotest
+ PROJECT=tiobench
+ # do it once instead of each time referenced
+ VERSION=$(shell egrep "tiotest v[0-9]+.[0-9]+" tiotest.c | cut -d " " -f 7 | sed "s/v//g")
+ DISTNAME=$(PROJECT)-$(VERSION)
+ INSTALL=install
+-PREFIX=/usr/local
++PREFIX?=/usr/local
+ BINDIR=$(PREFIX)/bin
+-DOCDIR=/usr/local/doc/$(DISTNAME)
++DOCDIR=$(PREFIX)/doc/$(DISTNAME)
+
+ all: $(EXE)
+
+@@ -34,7 +35,7 @@
+ $(CC) -c $(CFLAGS) $(DEFINES) tiotest.c -o tiotest.o
+
+ $(EXE): tiotest.o crc32.o
+- $(LINK) -o $(EXE) tiotest.o crc32.o -lpthread
++ $(CC) -o $(EXE) tiotest.o crc32.o -lpthread $(LDFLAGS)
+ @echo
+ @echo "./tiobench.pl --help for usage options"
+ @echo
diff --git a/recipes/tiobench/tiobench_0.3.3.bb b/recipes/tiobench/tiobench_0.3.3.bb
new file mode 100644
index 0000000..829373f
--- /dev/null
+++ b/recipes/tiobench/tiobench_0.3.3.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "Threaded I/O tester"
+HOMEPAGE = "http://sourceforge.net/projects/tiobench/"
+PROVIDES = "tiobench"
+LICENSE = "GPL"
+RDEPENDS = "\
+ perl \
+ perl-module-strict \
+ perl-module-getopt-long \
+ perl-module-overload \
+ perl-module-exporter-heavy \
+ "
+PR = "r0"
+
+SRC_URI = "\
+ http://sourceforge.net/projects/tiobench/files/tiobench/0.3.3/tiobench-0.3.3.tar.gz \
+ file://tiobench-makefile.patch \
+ "
+SRC_URI[md5sum] = "bf485bf820e693c79e6bd2a38702a128"
+SRC_URI[sha256sum] = "8ad011059a35ac70cdb5e3d3999ceee44a8e8e9078926844b0685b7ea9db2bcc"
+
+do_compile() {
+ make CROSS_COMPILE=${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}
+}
+
+do_install() {
+ make install PREFIX=${D}
+}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tiobench: add recipe
2011-05-26 15:25 [PATCH] tiobench: add recipe Ludovic Desroches
@ 2011-05-27 22:21 ` Paul Menzel
2011-05-30 6:47 ` Ludovic Desroches
0 siblings, 1 reply; 3+ messages in thread
From: Paul Menzel @ 2011-05-27 22:21 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 3728 bytes --]
Dear Ludovic,
thank you for your contribution.
Am Donnerstag, den 26.05.2011, 17:25 +0200 schrieb Ludovic Desroches:
please add the version of the program you are adding to the commit
summary next time.
What build configuration did you use for testing?
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> ---
> recipes/tiobench/files/tiobench-makefile.patch | 42 ++++++++++++++++++++++++
> recipes/tiobench/tiobench_0.3.3.bb | 27 +++++++++++++++
> 2 files changed, 69 insertions(+), 0 deletions(-)
> create mode 100644 recipes/tiobench/files/tiobench-makefile.patch
> create mode 100644 recipes/tiobench/tiobench_0.3.3.bb
>
> diff --git a/recipes/tiobench/files/tiobench-makefile.patch b/recipes/tiobench/files/tiobench-makefile.patch
> new file mode 100644
> index 0000000..23e7a43
> --- /dev/null
> +++ b/recipes/tiobench/files/tiobench-makefile.patch
Please add a header to the patch, if it has been sent upstream.
> @@ -0,0 +1,42 @@
> +--- a/Makefile 2011-05-26 07:48:46.341400974 +0200
> ++++ b/Makefile 2011-05-26 10:54:48.631400818 +0200
> +@@ -1,8 +1,10 @@
> + # Makefile for tiotest
> +
> +-CC=gcc
> ++CROSS_COMPILE?=
> ++CC=$(CROSS_COMPILE)gcc
Would `CC?=gcc` not work too?
> + #CFLAGS=-O3 -fomit-frame-pointer -Wall
> + CFLAGS=-O2 -Wall
> ++LDFLAGS?=
> +
> + #DEFINES=-DUSE_MMAP
> + #-DUSE_MADVISE
> +@@ -14,16 +16,15 @@
> +
> + #DEFINES=
> +
> +-LINK=gcc
Just use `LINK?=$(CC)`?
> + EXE=tiotest
> + PROJECT=tiobench
> + # do it once instead of each time referenced
> + VERSION=$(shell egrep "tiotest v[0-9]+.[0-9]+" tiotest.c | cut -d " " -f 7 | sed "s/v//g")
> + DISTNAME=$(PROJECT)-$(VERSION)
> + INSTALL=install
> +-PREFIX=/usr/local
> ++PREFIX?=/usr/local
> + BINDIR=$(PREFIX)/bin
> +-DOCDIR=/usr/local/doc/$(DISTNAME)
> ++DOCDIR=$(PREFIX)/doc/$(DISTNAME)
> +
> + all: $(EXE)
> +
> +@@ -34,7 +35,7 @@
> + $(CC) -c $(CFLAGS) $(DEFINES) tiotest.c -o tiotest.o
> +
> + $(EXE): tiotest.o crc32.o
> +- $(LINK) -o $(EXE) tiotest.o crc32.o -lpthread
> ++ $(CC) -o $(EXE) tiotest.o crc32.o -lpthread $(LDFLAGS)
> + @echo
> + @echo "./tiobench.pl --help for usage options"
> + @echo
> diff --git a/recipes/tiobench/tiobench_0.3.3.bb b/recipes/tiobench/tiobench_0.3.3.bb
> new file mode 100644
> index 0000000..829373f
> --- /dev/null
> +++ b/recipes/tiobench/tiobench_0.3.3.bb
> @@ -0,0 +1,27 @@
> +DESCRIPTION = "Threaded I/O tester"
> +HOMEPAGE = "http://sourceforge.net/projects/tiobench/"
> +PROVIDES = "tiobench"
> +LICENSE = "GPL"
> +RDEPENDS = "\
> + perl \
> + perl-module-strict \
> + perl-module-getopt-long \
> + perl-module-overload \
> + perl-module-exporter-heavy \
> + "
There is unneeded white space at the end. `git diff --check` is your
friend before a commit.
Please sort the above variable according to the style guide [1].
> +PR = "r0"
> +
> +SRC_URI = "\
> + http://sourceforge.net/projects/tiobench/files/tiobench/0.3.3/tiobench-0.3.3.tar.gz \
> + file://tiobench-makefile.patch \
> + "
> +SRC_URI[md5sum] = "bf485bf820e693c79e6bd2a38702a128"
> +SRC_URI[sha256sum] = "8ad011059a35ac70cdb5e3d3999ceee44a8e8e9078926844b0685b7ea9db2bcc"
> +
> +do_compile() {
> + make CROSS_COMPILE=${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}
> +}
Is `oe_runmake` and passing the available?
> +
> +do_install() {
> + make install PREFIX=${D}
> +}
Is not that the default? If you need to pass options you can add those
to `EXTRA_OEMAKE`. If this does not work, you should still try to use
`oe_runmake` if it is available.
Thanks,
Paul
[1] http://openembedded.org/index.php/Styleguide
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tiobench: add recipe
2011-05-27 22:21 ` Paul Menzel
@ 2011-05-30 6:47 ` Ludovic Desroches
0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Desroches @ 2011-05-30 6:47 UTC (permalink / raw)
To: openembedded-devel
Hello,
On 5/28/2011 12:21 AM, Paul Menzel wrote:
> Dear Ludovic,
>
>
> thank you for your contribution.
>
> Am Donnerstag, den 26.05.2011, 17:25 +0200 schrieb Ludovic Desroches:
>
> please add the version of the program you are adding to the commit
> summary next time.
>
> What build configuration did you use for testing?
I was using a simple task-base image with the tiobench package on atmel
boards.
>> Signed-off-by: Ludovic Desroches<ludovic.desroches@atmel.com>
>> ---
>> recipes/tiobench/files/tiobench-makefile.patch | 42 ++++++++++++++++++++++++
>> recipes/tiobench/tiobench_0.3.3.bb | 27 +++++++++++++++
>> 2 files changed, 69 insertions(+), 0 deletions(-)
>> create mode 100644 recipes/tiobench/files/tiobench-makefile.patch
>> create mode 100644 recipes/tiobench/tiobench_0.3.3.bb
>>
>> diff --git a/recipes/tiobench/files/tiobench-makefile.patch b/recipes/tiobench/files/tiobench-makefile.patch
>> new file mode 100644
>> index 0000000..23e7a43
>> --- /dev/null
>> +++ b/recipes/tiobench/files/tiobench-makefile.patch
> Please add a header to the patch, if it has been sent upstream.
Ok I will do that.
>> @@ -0,0 +1,42 @@
>> +--- a/Makefile 2011-05-26 07:48:46.341400974 +0200
>> ++++ b/Makefile 2011-05-26 10:54:48.631400818 +0200
>> +@@ -1,8 +1,10 @@
>> + # Makefile for tiotest
>> +
>> +-CC=gcc
>> ++CROSS_COMPILE?=
>> ++CC=$(CROSS_COMPILE)gcc
> Would `CC?=gcc` not work too?
I will try.
>> + #CFLAGS=-O3 -fomit-frame-pointer -Wall
>> + CFLAGS=-O2 -Wall
>> ++LDFLAGS?=
>> +
>> + #DEFINES=-DUSE_MMAP
>> + #-DUSE_MADVISE
>> +@@ -14,16 +16,15 @@
>> +
>> + #DEFINES=
>> +
>> +-LINK=gcc
> Just use `LINK?=$(CC)`?
Same as previous one.
>> + EXE=tiotest
>> + PROJECT=tiobench
>> + # do it once instead of each time referenced
>> + VERSION=$(shell egrep "tiotest v[0-9]+.[0-9]+" tiotest.c | cut -d " " -f 7 | sed "s/v//g")
>> + DISTNAME=$(PROJECT)-$(VERSION)
>> + INSTALL=install
>> +-PREFIX=/usr/local
>> ++PREFIX?=/usr/local
>> + BINDIR=$(PREFIX)/bin
>> +-DOCDIR=/usr/local/doc/$(DISTNAME)
>> ++DOCDIR=$(PREFIX)/doc/$(DISTNAME)
>> +
>> + all: $(EXE)
>> +
>> +@@ -34,7 +35,7 @@
>> + $(CC) -c $(CFLAGS) $(DEFINES) tiotest.c -o tiotest.o
>> +
>> + $(EXE): tiotest.o crc32.o
>> +- $(LINK) -o $(EXE) tiotest.o crc32.o -lpthread
>> ++ $(CC) -o $(EXE) tiotest.o crc32.o -lpthread $(LDFLAGS)
>> + @echo
>> + @echo "./tiobench.pl --help for usage options"
>> + @echo
>> diff --git a/recipes/tiobench/tiobench_0.3.3.bb b/recipes/tiobench/tiobench_0.3.3.bb
>> new file mode 100644
>> index 0000000..829373f
>> --- /dev/null
>> +++ b/recipes/tiobench/tiobench_0.3.3.bb
>> @@ -0,0 +1,27 @@
>> +DESCRIPTION = "Threaded I/O tester"
>> +HOMEPAGE = "http://sourceforge.net/projects/tiobench/"
>> +PROVIDES = "tiobench"
>> +LICENSE = "GPL"
>> +RDEPENDS = "\
>> + perl \
>> + perl-module-strict \
>> + perl-module-getopt-long \
>> + perl-module-overload \
>> + perl-module-exporter-heavy \
>> + "
> There is unneeded white space at the end. `git diff --check` is your
> friend before a commit.
>
> Please sort the above variable according to the style guide [1].
Ok.
>> +PR = "r0"
>> +
>> +SRC_URI = "\
>> + http://sourceforge.net/projects/tiobench/files/tiobench/0.3.3/tiobench-0.3.3.tar.gz \
>> + file://tiobench-makefile.patch \
>> + "
>> +SRC_URI[md5sum] = "bf485bf820e693c79e6bd2a38702a128"
>> +SRC_URI[sha256sum] = "8ad011059a35ac70cdb5e3d3999ceee44a8e8e9078926844b0685b7ea9db2bcc"
>> +
>> +do_compile() {
>> + make CROSS_COMPILE=${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}
>> +}
> Is `oe_runmake` and passing the available?
>
>> +
>> +do_install() {
>> + make install PREFIX=${D}
>> +}
> Is not that the default? If you need to pass options you can add those
> to `EXTRA_OEMAKE`. If this does not work, you should still try to use
> `oe_runmake` if it is available.
Thanks for these tips, I will try to apply all your advices and I will
send you a new version.
Regards
Ludovic
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-30 6:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26 15:25 [PATCH] tiobench: add recipe Ludovic Desroches
2011-05-27 22:21 ` Paul Menzel
2011-05-30 6:47 ` Ludovic Desroches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox