Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] spidev_test: new package
@ 2014-10-14 15:45 Gustavo Zacarias
  2014-10-14 17:29 ` Thomas De Schampheleire
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Gustavo Zacarias @ 2014-10-14 15:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/Config.in                  |  1 +
 package/spidev_test/Config.in      | 15 +++++++++++++++
 package/spidev_test/spidev_test.mk | 22 ++++++++++++++++++++++
 3 files changed, 38 insertions(+)
 create mode 100644 package/spidev_test/Config.in
 create mode 100644 package/spidev_test/spidev_test.mk

diff --git a/package/Config.in b/package/Config.in
index dda7716..fb8e93d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -84,6 +84,7 @@ endif
 	source "package/ramsmp/Config.in"
 	source "package/ramspeed/Config.in"
 	source "package/rt-tests/Config.in"
+	source "package/spidev_test/Config.in"
 	source "package/strace/Config.in"
 	source "package/stress/Config.in"
 	source "package/sysprof/Config.in"
diff --git a/package/spidev_test/Config.in b/package/spidev_test/Config.in
new file mode 100644
index 0000000..c0ed9ef
--- /dev/null
+++ b/package/spidev_test/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_SPIDEV_TEST
+	bool "spidev_test"
+	depends on BR2_LINUX_KERNEL
+	help
+	  SPI testing utility (using spidev driver).
+
+	  This package builds and installs the userspace 'spidev_test'
+	  command. It is up to the user to ensure that the kernel
+	  configuration has all the suitable options enabled to allow a
+	  proper operation of 'spidev_test'.
+
+	  https://www.kernel.org/doc/Documentation/spi/spidev_test.c
+
+comment "spidev_test needs Linux kernel to be built"
+	depends on !BR2_LINUX_KERNEL
diff --git a/package/spidev_test/spidev_test.mk b/package/spidev_test/spidev_test.mk
new file mode 100644
index 0000000..24c0f89
--- /dev/null
+++ b/package/spidev_test/spidev_test.mk
@@ -0,0 +1,22 @@
+################################################################################
+#
+# spidev_test
+#
+################################################################################
+
+# Source taken from the Linux kernel tree
+SPIDEV_TEST_SOURCE =
+SPIDEV_TEST_VERSION = $(call qstrip,$(BR2_LINUX_KERNEL_VERSION))
+SPIDEV_TEST_DEPENDENCIES = linux
+
+define SPIDEV_TEST_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CC) $(TARGET_CFLAGS) -o $(@D)/spidev_test \
+		$(LINUX_DIR)/Documentation/spi/spidev_test.c
+endef
+
+define SPIDEV_TEST_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 755 $(@D)/spidev_test \
+		$(TARGET_DIR)/usr/sbin/spidev_test
+endef
+
+$(eval $(generic-package))
-- 
2.0.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-10-18 20:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-14 15:45 [Buildroot] [PATCH] spidev_test: new package Gustavo Zacarias
2014-10-14 17:29 ` Thomas De Schampheleire
2014-10-14 17:34   ` Gustavo Zacarias
2014-10-14 17:57 ` Ryan Barnett
2014-10-14 19:54 ` Baruch Siach
2014-10-14 19:56   ` Gustavo Zacarias
2014-10-14 20:09     ` Baruch Siach
2014-10-14 20:14   ` Thomas De Schampheleire
2014-10-14 20:18     ` Gustavo Zacarias
2014-10-14 20:19     ` Baruch Siach
2014-10-17 21:55   ` Yann E. MORIN
2014-10-18 20:08     ` Baruch Siach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox