A lot of SoC boards come with integrated SATA it would be nice to be
able to use fio to test performance of those boards.

-- 
Home Based Linux SW-Engr Jobs @
http://codeminutia.com
From 23b64e372654ac7592e597fcc559df38fa1ee31b Mon Sep 17 00:00:00 2001
From: Dragan Stancevic <d...@codeminutia.com>
Date: Sun, 13 May 2018 13:36:58 -0500
Subject: [PATCH] Add support for Flexible I/O Tester

A lot of SoC boards come with integrated SATA,
this adds fio to the build so performance can
be tested.

Signed-off-by: Dragan Stancevic <d...@codeminutia.com>
---
 package/utils/fio/Makefile | 86 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)
 create mode 100644 package/utils/fio/Makefile

diff --git a/package/utils/fio/Makefile b/package/utils/fio/Makefile
new file mode 100644
index 0000000..1f54b5b
--- /dev/null
+++ b/package/utils/fio/Makefile
@@ -0,0 +1,86 @@
+#
+# Copyright (C) 2018 - Dragan Stancevic <d...@codeminutia.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fio
+PKG_VERSION:=3.6
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/axboe/fio.git
+PKG_SOURCE_VERSION:=c5477c6a3b3e0042b1f74414071429ca66d94c2f
+PKG_SOURCE_DATE:=2018-04-16
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_MIRROR_HASH:=eecd190a100ccf803575a7f0027c111fb3ff322b05b98b83f01ad88039b33741
+
+PKG_MAINTAINER:=Dragan Stancevic <d...@codeminutia.com>
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_DEPENDS:= +zlib
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/fio
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Flexible I/O Tester
+  URL:=https://github.com/axboe/fio/
+  DEPENDS:= +zlib
+endef
+
+define Package/fio/description
+ Flexible I/O Tester
+
+ Fio was originally written to save me the hassle of writing special test case
+ programs when I wanted to test a specific workload, either for performance
+ reasons or to find/reproduce a bug. The process of writing such a test app can
+ be tiresome, especially if you have to do it often.  Hence I needed a tool that
+ would be able to simulate a given I/O workload without resorting to writing a
+ tailored test case again and again.
+
+ A test work load is difficult to define, though. There can be any number of
+ processes or threads involved, and they can each be using their own way of
+ generating I/O. You could have someone dirtying large amounts of memory in an
+ memory mapped file, or maybe several threads issuing reads using asynchronous
+ I/O. fio needed to be flexible enough to simulate both of these cases, and many
+ more.
+
+ Fio spawns a number of threads or processes doing a particular type of I/O
+ action as specified by the user. fio takes a number of global parameters, each
+ inherited by the thread unless otherwise parameters given to them overriding
+ that setting is given.  The typical use of fio is to write a job file matching
+ the I/O load one wants to simulate.
+
+ Author: Jens Axboe <ax...@kernel.dk>
+ Package Maintainer: <d...@codeminutia.com> http://codeminutia.com/
+
+endef
+
+# Remove quotes from CONFIG_CPU_TYPE
+CONFIG_CPU_TYPE_NQ:= $(patsubst "%",%,$(CONFIG_CPU_TYPE))
+# get CPU type so we can pass it to fio configure script
+CONF_CPU:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE_NQ)))
+
+CONFIGURE_ARGS = --prefix="$(PKG_INSTALL_DIR)" --cpu="$(CONF_CPU)" --cc="$(TARGET_CC)" --extra-cflags="$(TARGET_CFLAGS)"
+
+define Build/Compile
+	$(MAKE) -C $(PKG_BUILD_DIR)
+	$(MAKE) -C $(PKG_BUILD_DIR) INSTALL_PREFIX="$(PKG_INSTALL_DIR)" install
+endef
+
+define Package/fio/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,fio, +zlib))
-- 
2.7.4

_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to