[PATCH 1/5] package: add greybus_loopback_test package

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The loopback_test utility allows various different types of bandwidth and
latency tests to be performed against a greybus loopback Interface. This
utility is available in the kernel tree as loopback_test, this package is
called greybus_loopback_test here to fit in with the other package names in
the greybus overlay.

Once built this package will build the utility in
drivers/staging/greybus/tools and install it to /usr/sbin/loopback_test in
the target buildroot filesystem.

Signed-off-by: Bryan O'Donoghue <pure.logic@xxxxxxxxxxxxxxxxx>
---
 Config.in                                          |  1 +
 package/greybus_loopback_test/Config.in            |  6 ++++++
 .../greybus_loopback_test/greybus_loopback_test.mk | 25 ++++++++++++++++++++++
 3 files changed, 32 insertions(+)
 create mode 100644 package/greybus_loopback_test/Config.in
 create mode 100644 package/greybus_loopback_test/greybus_loopback_test.mk

diff --git a/Config.in b/Config.in
index aea494c..dbde37a 100644
--- a/Config.in
+++ b/Config.in
@@ -2,3 +2,4 @@ source "$BR2_EXTERNAL_ARA_PATH/package/greybus/Config.in"
 source "$BR2_EXTERNAL_ARA_PATH/package/gbsim/Config.in"
 source "$BR2_EXTERNAL_ARA_PATH/package/libusbg/Config.in"
 source "$BR2_EXTERNAL_ARA_PATH/package/gbutils/Config.in"
+source "$BR2_EXTERNAL_ARA_PATH/package/greybus_loopback_test/Config.in"
diff --git a/package/greybus_loopback_test/Config.in b/package/greybus_loopback_test/Config.in
new file mode 100644
index 0000000..74bedc5
--- /dev/null
+++ b/package/greybus_loopback_test/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_GREYBUS_LOOPBACK_TEST
+	bool "greybus loopback test"
+	depends on BR2_LINUX_KERNEL
+	help
+          Greybus loopback test tool is used to run performance test
+          across greybus to loopback enabled Interfaces.
diff --git a/package/greybus_loopback_test/greybus_loopback_test.mk b/package/greybus_loopback_test/greybus_loopback_test.mk
new file mode 100644
index 0000000..5e1bd60
--- /dev/null
+++ b/package/greybus_loopback_test/greybus_loopback_test.mk
@@ -0,0 +1,25 @@
+################################################################################
+#
+# greybus_loopback_test
+#
+################################################################################
+
+GREYBUS_LOOPBACK_DIR_STAGING = $(LINUX_DIR)/drivers/staging/greybus
+GREYBUS_LOOPBACK_TEST_INSTALL_TARGET = YES
+
+define GREYBUS_LOOPBACK_TEST_BUILD_CMDS
+	$(Q)if test ! -f $(GREYBUS_LOOPBACK_DIR_STAGING)/tools/Makefile ; then \
+		echo "Your kernel version is too old and does not have the greybus loopback tool." ; \
+		echo "At least kernel 4.8 must be used." ; \
+		exit 1 ; \
+	fi
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(GREYBUS_LOOPBACK_DIR_STAGING)/tools \
+		loopback_test
+endef
+
+define GREYBUS_LOOPBACK_TEST_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 755 $(GREYBUS_LOOPBACK_DIR_STAGING)/tools/loopback_test \
+		$(TARGET_DIR)/usr/sbin
+endef
+
+$(eval $(generic-package))
-- 
2.7.4

_______________________________________________
greybus-dev mailing list
greybus-dev@xxxxxxxxxxxxxxxx
https://lists.linaro.org/mailman/listinfo/greybus-dev




[Index of Archives]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]     [Asterisk Books]

  Powered by Linux