All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCHv2] spidev_test: new package
@ 2014-10-24 13:04 Gustavo Zacarias
  2014-10-24 14:01 ` Baruch Siach
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo Zacarias @ 2014-10-24 13:04 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/Config.in                  |  1 +
 package/spidev_test/Config.in      | 11 +++++++++++
 package/spidev_test/spidev_test.mk | 30 ++++++++++++++++++++++++++++++
 3 files changed, 42 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 b0d8a80..a5d4dc9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -85,6 +85,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..0fca030
--- /dev/null
+++ b/package/spidev_test/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_SPIDEV_TEST
+	bool "spidev_test"
+	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 suitable options enabled to allow a
+	  proper operation of 'spidev_test'.
+
+	  https://www.kernel.org/doc/Documentation/spi/spidev_test.c
diff --git a/package/spidev_test/spidev_test.mk b/package/spidev_test/spidev_test.mk
new file mode 100644
index 0000000..5662eb1
--- /dev/null
+++ b/package/spidev_test/spidev_test.mk
@@ -0,0 +1,30 @@
+################################################################################
+#
+# spidev_test
+#
+################################################################################
+
+# Newest version requires SPI_TX_QUAD/SPI_RX_QUAD to build
+# Pretty safe assumption that toolchain headers are <= runtime kernel version
+ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15),y)
+SPIDEV_TEST_VERSION = c2e78c34ef0bf4fa860b5fffc99c769d6ddaf52d
+else
+SPIDEV_TEST_VERSION = 925d16a209b40a3e7202a4f867991fb608834d36
+endif
+SPIDEV_TEST_SITE = http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/spi
+SPIDEV_TEST_SOURCE = spidev_test.c?id=$(SPIDEV_TEST_VERSION)
+
+# Downloaded file is C source
+SPIDEV_TEST_EXTRACT_CMDS =
+
+define SPIDEV_TEST_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CC) $(TARGET_CFLAGS) -x c \
+		-o $(@D)/spidev_test $(BR2_DL_DIR)/$(SPIDEV_TEST_SOURCE)
+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] 3+ messages in thread

* [Buildroot] [PATCHv2] spidev_test: new package
  2014-10-24 13:04 [Buildroot] [PATCHv2] spidev_test: new package Gustavo Zacarias
@ 2014-10-24 14:01 ` Baruch Siach
  2014-10-24 16:36   ` Gustavo Zacarias
  0 siblings, 1 reply; 3+ messages in thread
From: Baruch Siach @ 2014-10-24 14:01 UTC (permalink / raw)
  To: buildroot

Hi Gustavo,

On Fri, Oct 24, 2014 at 10:04:57AM -0300, Gustavo Zacarias wrote:
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
>  package/Config.in                  |  1 +
>  package/spidev_test/Config.in      | 11 +++++++++++
>  package/spidev_test/spidev_test.mk | 30 ++++++++++++++++++++++++++++++
>  3 files changed, 42 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 b0d8a80..a5d4dc9 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -85,6 +85,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..0fca030
> --- /dev/null
> +++ b/package/spidev_test/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_SPIDEV_TEST
> +	bool "spidev_test"
> +	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 suitable options enabled to allow a
> +	  proper operation of 'spidev_test'.
> +
> +	  https://www.kernel.org/doc/Documentation/spi/spidev_test.c
> diff --git a/package/spidev_test/spidev_test.mk b/package/spidev_test/spidev_test.mk
> new file mode 100644
> index 0000000..5662eb1
> --- /dev/null
> +++ b/package/spidev_test/spidev_test.mk
> @@ -0,0 +1,30 @@
> +################################################################################
> +#
> +# spidev_test
> +#
> +################################################################################
> +
> +# Newest version requires SPI_TX_QUAD/SPI_RX_QUAD to build

I'd add that SPI_TX_QUAD is also an ABI change to make the next line clearer.

> +# Pretty safe assumption that toolchain headers are <= runtime kernel version

This assumption should@least be documented in the help text, IMO.

> +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15),y)
> +SPIDEV_TEST_VERSION = c2e78c34ef0bf4fa860b5fffc99c769d6ddaf52d
> +else
> +SPIDEV_TEST_VERSION = 925d16a209b40a3e7202a4f867991fb608834d36

Why not use kernel version tags, v3.14 and v3.15?

> +endif
> +SPIDEV_TEST_SITE = http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/spi
> +SPIDEV_TEST_SOURCE = spidev_test.c?id=$(SPIDEV_TEST_VERSION)
> +
> +# Downloaded file is C source
> +SPIDEV_TEST_EXTRACT_CMDS =
> +
> +define SPIDEV_TEST_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(TARGET_CC) $(TARGET_CFLAGS) -x c \
> +		-o $(@D)/spidev_test $(BR2_DL_DIR)/$(SPIDEV_TEST_SOURCE)
> +endef
> +
> +define SPIDEV_TEST_INSTALL_TARGET_CMDS
> +	$(INSTALL) -D -m 755 $(@D)/spidev_test \
> +		$(TARGET_DIR)/usr/sbin/spidev_test
> +endef
> +
> +$(eval $(generic-package))

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] [PATCHv2] spidev_test: new package
  2014-10-24 14:01 ` Baruch Siach
@ 2014-10-24 16:36   ` Gustavo Zacarias
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo Zacarias @ 2014-10-24 16:36 UTC (permalink / raw)
  To: buildroot

On 10/24/2014 11:01 AM, Baruch Siach wrote:
>> +# Newest version requires SPI_TX_QUAD/SPI_RX_QUAD to build
> 
> I'd add that SPI_TX_QUAD is also an ABI change to make the next line clearer.
> 
>> +# Pretty safe assumption that toolchain headers are <= runtime kernel version
> 
> This assumption should at least be documented in the help text, IMO.

Hi Baruch.
Ok.

> Why not use kernel version tags, v3.14 and v3.15?

Force of habit, i'll switch to tags for clarity.
Regards.

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

end of thread, other threads:[~2014-10-24 16:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-24 13:04 [Buildroot] [PATCHv2] spidev_test: new package Gustavo Zacarias
2014-10-24 14:01 ` Baruch Siach
2014-10-24 16:36   ` Gustavo Zacarias

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.