Skip to contentSkip to conversation

New package: gpio9260

PATCH New J.C. Woltz 3 participants 7 messages Feb 6, 2012 – Feb 8, 2012

lore
Share & tools
lore

J.C. Woltz

author
#0 lore raw

PATCH 1/1 New package: gpio9260

From: "J.C. Woltz" <[email protected]>

gpio9260 is an utility used to read and set gpio states on the at91sam9260 and at91sam9g20 CPUs

---
 package/Config.in            |    1 +
 package/gpio9260/Config.in   |    5 +++++
 package/gpio9260/gpio9260.mk |   23 +++++++++++++++++++++++
 3 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 package/gpio9260/Config.in
 create mode 100644 package/gpio9260/gpio9260.mk
package/Config.in +1 -0
index 66ee266..c083bfc 100644
@@ -177,6 +177,7 @@ source "package/gadgetfs-test/Config.in"
 source "package/gdisk/Config.in"
 source "package/genext2fs/Config.in"
 source "package/genromfs/Config.in"
+source "package/gpio9260/Config.in"
 source "package/gpsd/Config.in"
 source "package/gvfs/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
package/gpio9260/Config.in new file +5 -0
new file mode 100644
index 0000000..088b11e
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_GPIO9260
+	bool "gpio9260"
+	help
+		gpio9260 is a program to interact with at91sam9260
+		and at91sam9g20 GPIOs. 
package/gpio9260/gpio9260.mk new file +23 -0
new file mode 100644
index 0000000..b9adb41
@@ -0,0 +1,23 @@
+#############################################################
+#
+# gpio9260
+#
+#############################################################
+GPIO9260_VERSION = 1.0
+GPIO9260_SOURCE = gpio9260-$(GPIO9260_VERSION).tar.gz
+GPIO9260_SITE = https://www.jcwoltz.com/e10
+GPIO9260_INSTALL_STAGING = YES
+
+define GPIO9260_BUILD_CMDS
+	$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D) all
+endef
+
+define GPIO9260_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/gpio9260 $(STAGING_DIR)/usr/bin
+endef
+
+define GPIO9260_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/gpio9260 $(TARGET_DIR)/usr/bin
+endef
+
+$(eval $(call GENTARGETS,package,gpio9260))
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 New package: gpio9260

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"J" == J C Woltz <[email protected]> writes:

J> From: "J.C. Woltz" <[email protected]>
J> gpio9260 is an utility used to read and set gpio states on J> the at91sam9260 and at91sam9g20 CPUs

What's the advantage of using this compared to normal /sys/class/gpio sysfs access?

J> index 0000000..b9adb41
J> --- /dev/null
J> +++ b/package/gpio9260/gpio9260.mk
J> @@ -0,0 +1,23 @@
J> +############################################################# J> +#
J> +# gpio9260
J> +#
J> +############################################################# J> +GPIO9260_VERSION = 1.0
J> +GPIO9260_SOURCE = gpio9260-$(GPIO9260_VERSION).tar.gz J> +GPIO9260_SITE = https://www.jcwoltz.com/e10
J> +GPIO9260_INSTALL_STAGING = YES

It's just a program (no headers/libraries), so why install into staging?

Signature · 1 line
Bye, Peter Korsgaard
author
#2 lore raw

PATCH 1/1 New package: gpio9260

J> From: "J.C. Woltz" <[email protected]>

Quoted 7 lines

J> gpio9260 is an utility used to read and set gpio states on J> the at91sam9260 and at91sam9g20 CPUs

What's the advantage of using this compared to normal /sys/class/gpio sysfs access?

I did not write this program. Its header states:

/*
* (C) Copyright 2004 Roman Avramenko <[email protected]> *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/

Calao and Synapse Wireless ship the gpio9260 to allow script and users easy access to (primarily) push buttons. It is used like:
/usr/bin/gpio9260 ?PB10
Then the return code lets you know the state of the input. Or it can be used to set outputs, but in that case the /sys/class/led or other makes sense.

Quoted 3 lines

It's just a program (no headers/libraries), so why install into staging?

That is my mistake. I will fix that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120206/37bae65c/attachment.html>

#3 lore raw

PATCH 1/1 New package: gpio9260

Quoted 35 lines · J.C. Woltz

J> From: "J.C. Woltz" <[email protected]>
J> gpio9260 is an utility used to read and set gpio states on J> the at91sam9260 and at91sam9g20 CPUs

What's the advantage of using this compared to normal /sys/class/gpio sysfs access?

I did not write this program. Its header states:
/*
* (C) Copyright 2004 Roman Avramenko <[email protected]> *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/

Calao and Synapse Wireless ship the gpio9260 to allow script and users easy access to (primarily) push buttons. It is used like:
/usr/bin/gpio9260 ?PB10
Then the return code lets you know the state of the input. Or it can be used to set outputs, but in that case the /sys/class/led or other makes sense.

Quoted 3 lines

It's just a program (no headers/libraries), so why install into staging?

That is my mistake. I will fix that.

For Calao platfrom this is depricated

Best Regards,
J.

#4 lore raw

PATCH 1/1 New package: gpio9260

In reply to J.C. Woltz
Quoted 4 lines · J.C. Woltz

From: "J.C. Woltz" <[email protected]>

gpio9260 is an utility used to read and set gpio states on the at91sam9260 and at91sam9g20 CPUs

why dont u use the kernel instead via sysfs

If this need kernel modification I don't think it will go mainline

Best Regards,
J.

Quoted 69 lines
---
 package/Config.in            |    1 +
 package/gpio9260/Config.in   |    5 +++++
 package/gpio9260/gpio9260.mk |   23 +++++++++++++++++++++++
 3 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 package/gpio9260/Config.in
 create mode 100644 package/gpio9260/gpio9260.mk
package/Config.in +1 -0
index 66ee266..c083bfc 100644
@@ -177,6 +177,7 @@ source "package/gadgetfs-test/Config.in"
 source "package/gdisk/Config.in"
 source "package/genext2fs/Config.in"
 source "package/genromfs/Config.in"
+source "package/gpio9260/Config.in"
 source "package/gpsd/Config.in"
 source "package/gvfs/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
package/gpio9260/Config.in new file +5 -0
new file mode 100644
index 0000000..088b11e
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_GPIO9260
+	bool "gpio9260"
+	help
+		gpio9260 is a program to interact with at91sam9260
+		and at91sam9g20 GPIOs. 
package/gpio9260/gpio9260.mk new file +23 -0
new file mode 100644
index 0000000..b9adb41
@@ -0,0 +1,23 @@
+#############################################################
+#
+# gpio9260
+#
+#############################################################
+GPIO9260_VERSION = 1.0
+GPIO9260_SOURCE = gpio9260-$(GPIO9260_VERSION).tar.gz
+GPIO9260_SITE = https://www.jcwoltz.com/e10
+GPIO9260_INSTALL_STAGING = YES
+
+define GPIO9260_BUILD_CMDS
+	$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D) all
+endef
+
+define GPIO9260_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/gpio9260 $(STAGING_DIR)/usr/bin
+endef
+
+define GPIO9260_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/gpio9260 $(TARGET_DIR)/usr/bin
+endef
+
+$(eval $(call GENTARGETS,package,gpio9260))
Signature · 6 lines
1.7.5.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
#5 lore raw

PATCH 1/1 New package: gpio9260

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Jean-Christophe" == Jean-Christophe PLAGNIOL-VILLARD <[email protected]> writes:

Quoted 4 lines · J.C. Woltz
Quoted 4 lines

From: "J.C. Woltz" <[email protected]>

gpio9260 is an utility used to read and set gpio states on the at91sam9260 and at91sam9g20 CPUs

Jean-Christophe> why dont u use the kernel instead via sysfs

My comment as well.

Jean-Christophe> If this need kernel modification I don't think it will go mainline

It's just a glorified devmem2 (E.G. using /dev/mem). It turns out it's from 2004, so from before gpiolib got added to the kernel.

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw

PATCH 1/1 New package: gpio9260

Quoted 9 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Jean-Christophe" == Jean-Christophe PLAGNIOL-VILLARD <[email protected]> writes:

Quoted 4 lines · J.C. Woltz
Quoted 4 lines

From: "J.C. Woltz" <[email protected]>

gpio9260 is an utility used to read and set gpio states on the at91sam9260 and at91sam9g20 CPUs

Jean-Christophe> why dont u use the kernel instead via sysfs

Quoted 7 lines

My comment as well.

Jean-Christophe> If this need kernel modification I don't think it will go mainline

It's just a glorified devmem2 (E.G. using /dev/mem). It turns out it's from 2004, so from before gpiolib got added to the kernel.

I read the source code of this package

it's a dangerous one, as it's play with the same register as done by the gpiolib.

So NACK

Best Regards,
J.