[oe-commits] Jeremy Lainé : librfid: add patch for SPI device support

GIT User account git at amethyst.openembedded.net
Thu Dec 18 07:52:00 UTC 2008


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 20638390447dbb4b7ce334976adaec3ffa5f7138
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=20638390447dbb4b7ce334976adaec3ffa5f7138

Author: Jeremy Lainé <jeremy.laine at m4x.org>
Date:   Thu Dec 18 08:50:07 2008 +0100

librfid: add patch for SPI device support

---

 packages/librfid/files/spidev.patch |   24 ++++++++++++++++++++++++
 packages/librfid/librfid_svn.bb     |    6 ++++--
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/packages/librfid/files/spidev.patch b/packages/librfid/files/spidev.patch
new file mode 100644
index 0000000..29c3a17
--- /dev/null
+++ b/packages/librfid/files/spidev.patch
@@ -0,0 +1,24 @@
+Index: librfid-0.2.0/utils/common.c
+===================================================================
+--- librfid-0.2.0.orig/utils/common.c
++++ librfid-0.2.0/utils/common.c
+@@ -72,15 +72,11 @@ struct rfid_protocol_handle *ph;
+ 
+ int reader_init(void) 
+ {
+-	printf("opening reader handle OpenPCD, CM5x21\n");
+-	rh = rfid_reader_open(NULL, RFID_READER_OPENPCD);
++	printf("opening reader handle SPIDEV\n");
++	rh = rfid_reader_open("/dev/spidev", RFID_READER_SPIDEV);
+ 	if (!rh) {
+-		fprintf(stderr, "No OpenPCD found\n");
+-		rh = rfid_reader_open(NULL, RFID_READER_CM5121);
+-		if (!rh) {
+-			fprintf(stderr, "No Omnikey Cardman 5x21 found\n");
+-			return -1;
+-		}
++		fprintf(stderr, "No spidev RFID found\n");
++		return -1;
+ 	}
+ 	return 0;
+ }
diff --git a/packages/librfid/librfid_svn.bb b/packages/librfid/librfid_svn.bb
index 0bf7924..8cfa4c8 100644
--- a/packages/librfid/librfid_svn.bb
+++ b/packages/librfid/librfid_svn.bb
@@ -6,11 +6,13 @@ DEPENDS = "libusb"
 SRCNAME = "librfid"
 
 PV = "0.2.0+svnr${SRCREV}"
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "svn://svn.gnumonks.org/trunk;module=${SRCNAME};proto=http \
-           file://mifare_ul_timeout.patch;patch=1"
+           file://mifare_ul_timeout.patch;patch=1 \
+          "
 
+SRC_URI_append_boc01 = "file://spidev.patch;patch=1"
 PACKAGE_ARCH_boc01 = "boc01"
 EXTRA_OECONF_boc01 += "--enable-spidev"
 





More information about the Openembedded-commits mailing list