diff mbox

iozone: new package

Message ID 1363195917-13185-1-git-send-email-gilles.talis@gmail.com
State Changes Requested
Headers show

Commit Message

Gilles Talis March 13, 2013, 5:31 p.m. UTC
Signed-off-by: Gilles Talis <gilles.talis@gmail.com>
---
 package/Config.in        |    1 +
 package/iozone/Config.in |   14 ++++++++++++++
 package/iozone/iozone.mk |   43 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 58 insertions(+), 0 deletions(-)
 create mode 100644 package/iozone/Config.in
 create mode 100644 package/iozone/iozone.mk

Comments

Thomas Petazzoni March 15, 2013, 10:11 a.m. UTC | #1
Dear Gilles Talis,

On Wed, 13 Mar 2013 10:31:57 -0700, Gilles Talis wrote:

> +IOZONE_MAJOR_VERSION = 3
> +IOZONE_MINOR_VERSION = 414
> +IOZONE_VERSION = $(IOZONE_MAJOR_VERSION)_$(IOZONE_MINOR_VERSION)

Any reason to split major and minor versions here? I only see
IOZONE_VERSION used below.

> +IOZONE_SOURCE = iozone$(IOZONE_VERSION).tar
> +IOZONE_SITE = http://www.iozone.org/src/current
> +IOZONE_LICENSE = IOzone license (NO DERIVED WORKS ALLOWED)
> +# IOzone license details can be found at:
> +# http://www.iozone.org/docs/Iozone_License.txt
> +
> +
> +ifeq ($(BR2_arm)$(BR2_armeb),y)
> +IOZONE_TARGET = linux-arm
> +else ifeq ($(BR2_x86_64),y)
> +IOZONE_TARGET = linux-ia64

This seems wrong IA64 is the Itanium architecture from Intel, and not
the x86-64 architecture.

> +else ifeq ($(BR2_powerpc),y)
> +IOZONE_TARGET = linux-powerpc
> +else ifeq ($(BR2_sparc),y)
> +IOZONE_TARGET = linux-sparc
> +else
> +IOZONE_TARGET = linux
> +endif

What happens for other architectures? Does it still build? What
are the differences between those per-architecture make targets?

Thanks,

Thomas
Gilles Talis March 15, 2013, 8:02 p.m. UTC | #2
Dear Thomas,

>> +IOZONE_VERSION = $(IOZONE_MAJOR_VERSION)_$(IOZONE_MINOR_VERSION)
>
> Any reason to split major and minor versions here? I only see
> IOZONE_VERSION used below.
No reason. I just felt it looked neater. But you're right, I'll just
use IOZONE_VERSION.


>> +else ifeq ($(BR2_x86_64),y)
>> +IOZONE_TARGET = linux-ia64
>
> This seems wrong IA64 is the Itanium architecture from Intel, and not
> the x86-64 architecture.
Alright. I think I have to do some homework here.


>> +else ifeq ($(BR2_powerpc),y)
>> +IOZONE_TARGET = linux-powerpc
>> +else ifeq ($(BR2_sparc),y)
>> +IOZONE_TARGET = linux-sparc
>> +else
>> +IOZONE_TARGET = linux
>> +endif
>
> What happens for other architectures? Does it still build? What
> are the differences between those per-architecture make targets?
Funnily enough, the only other targets I tested were i386 and PPC64
and it could build (target = linux)
Now, it fails to build for AVR32 and MIPS, as it can't find the async
IO header file from uClibc.
IOzone can be built without aio though, using a "generic" target. Will
see how to add this one in.

Also to answer your other question, the differences lie around file
operations flags and functions (e.g usage of O_DIRECT or pread()).

Thanks
Gilles.
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index a65054c..4d1aa67 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -22,6 +22,7 @@  source "package/cache-calibrator/Config.in"
 source "package/dhrystone/Config.in"
 source "package/dstat/Config.in"
 source "package/dmalloc/Config.in"
+source "package/iozone/Config.in"
 source "package/kexec/Config.in"
 source "package/latencytop/Config.in"
 source "package/lmbench/Config.in"
diff --git a/package/iozone/Config.in b/package/iozone/Config.in
new file mode 100644
index 0000000..f07e65c
--- /dev/null
+++ b/package/iozone/Config.in
@@ -0,0 +1,14 @@ 
+config BR2_PACKAGE_IOZONE
+	bool "IOzone"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_LARGEFILE
+	depends on BR2_USE_MMU # fork()
+	help
+	  IOzone is a filesystem benchmark tool.
+	  The benchmark generates and measures a variety of file operations
+
+	  http://www.iozone.org/
+
+comment "IOzone requires a toolchain with LARGEFILE and threads support"
+	depends on !(BR2_LARGEFILE && BR2_TOOLCHAIN_HAS_THREADS)
+
diff --git a/package/iozone/iozone.mk b/package/iozone/iozone.mk
new file mode 100644
index 0000000..2a046bc
--- /dev/null
+++ b/package/iozone/iozone.mk
@@ -0,0 +1,43 @@ 
+#############################################################
+#
+# IOZONE
+#
+#############################################################
+
+IOZONE_MAJOR_VERSION = 3
+IOZONE_MINOR_VERSION = 414
+IOZONE_VERSION = $(IOZONE_MAJOR_VERSION)_$(IOZONE_MINOR_VERSION)
+
+IOZONE_SOURCE = iozone$(IOZONE_VERSION).tar
+IOZONE_SITE = http://www.iozone.org/src/current
+IOZONE_LICENSE = IOzone license (NO DERIVED WORKS ALLOWED)
+# IOzone license details can be found at:
+# http://www.iozone.org/docs/Iozone_License.txt
+
+
+ifeq ($(BR2_arm)$(BR2_armeb),y)
+IOZONE_TARGET = linux-arm
+else ifeq ($(BR2_x86_64),y)
+IOZONE_TARGET = linux-ia64
+else ifeq ($(BR2_powerpc),y)
+IOZONE_TARGET = linux-powerpc
+else ifeq ($(BR2_sparc),y)
+IOZONE_TARGET = linux-sparc
+else
+IOZONE_TARGET = linux
+endif
+
+define IOZONE_BUILD_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) $(IOZONE_TARGET) -C $(@D)/src/current
+endef
+
+define IOZONE_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 755 $(@D)/src/current/iozone \
+		$(TARGET_DIR)/usr/bin/iozone
+endef
+
+define IOZONE_CLEAN_CMDS
+       $(MAKE) -C $(@D)/src/current clean
+endef
+
+$(eval $(generic-package))