diff options
author | Ctibor Brančík <ctibor@brancik.cz> | 2018-07-30 20:21:48 +0200 |
---|---|---|
committer | Ctibor Brančík <ctibor@brancik.cz> | 2018-07-30 20:21:48 +0200 |
commit | 0941ad3a8e32ef29a2bee344c597dc509e81b51d (patch) | |
tree | 6ac91ffa21e1d5ee02070a9f145f33894a086ad0 /dev-libs/wiringPi/files | |
parent | c64bf95222e34af572964bbcb57c21d394ca1e50 (diff) | |
download | brancik-overlay-0941ad3a8e32ef29a2bee344c597dc509e81b51d.tar.gz brancik-overlay-0941ad3a8e32ef29a2bee344c597dc509e81b51d.tar.bz2 |
Update wiringPi, taken from https://github.com/sakaki-/rpi3-overlay
Diffstat (limited to 'dev-libs/wiringPi/files')
-rw-r--r-- | dev-libs/wiringPi/files/2.44-pseudo-cpuinfo.patch | 35 | ||||
-rw-r--r-- | dev-libs/wiringPi/files/cpuinfo-1 | 5 |
2 files changed, 40 insertions, 0 deletions
diff --git a/dev-libs/wiringPi/files/2.44-pseudo-cpuinfo.patch b/dev-libs/wiringPi/files/2.44-pseudo-cpuinfo.patch new file mode 100644 index 0000000..888afe4 --- /dev/null +++ b/dev-libs/wiringPi/files/2.44-pseudo-cpuinfo.patch @@ -0,0 +1,35 @@ +diff --git a/wiringPi/wiringPi.c b/wiringPi/wiringPi.c +index a8f5963..73bee7b 100644 +--- a/wiringPi/wiringPi.c ++++ b/wiringPi/wiringPi.c +@@ -678,7 +678,7 @@ int wiringPiFailure (int fatal, const char *message, ...) + + static void piGpioLayoutOops (const char *why) + { +- fprintf (stderr, "Oops: Unable to determine board revision from /proc/cpuinfo\n") ; ++ fprintf (stderr, "Oops: Unable to determine board revision from /etc/wiringpi/cpuinfo\n") ; + fprintf (stderr, " -> %s\n", why) ; + fprintf (stderr, " -> You'd best google the error to find out why.\n") ; + //fprintf (stderr, " -> http://www.raspberrypi.org/phpBB3/viewtopic.php?p=184410#p184410\n") ; +@@ -695,8 +695,8 @@ int piGpioLayout (void) + if (gpioLayout != -1) // No point checking twice + return gpioLayout ; + +- if ((cpuFd = fopen ("/proc/cpuinfo", "r")) == NULL) +- piGpioLayoutOops ("Unable to open /proc/cpuinfo") ; ++ if ((cpuFd = fopen ("/etc/wiringpi/cpuinfo", "r")) == NULL) ++ piGpioLayoutOops ("Unable to open /etc/wiringpi/cpuinfo") ; + + // Start by looking for the Architecture to make sure we're really running + // on a Pi. I'm getting fed-up with people whinging at me because +@@ -891,8 +891,8 @@ void piBoardId (int *model, int *rev, int *mem, int *maker, int *warranty) + + (void)piGpioLayout () ; // Call this first to make sure all's OK. Don't care about the result. + +- if ((cpuFd = fopen ("/proc/cpuinfo", "r")) == NULL) +- piGpioLayoutOops ("Unable to open /proc/cpuinfo") ; ++ if ((cpuFd = fopen ("/etc/wiringpi/cpuinfo", "r")) == NULL) ++ piGpioLayoutOops ("Unable to open /etc/wiringpi/cpuinfo") ; + + while (fgets (line, 120, cpuFd) != NULL) + if (strncmp (line, "Revision", 8) == 0) diff --git a/dev-libs/wiringPi/files/cpuinfo-1 b/dev-libs/wiringPi/files/cpuinfo-1 new file mode 100644 index 0000000..ac37271 --- /dev/null +++ b/dev-libs/wiringPi/files/cpuinfo-1 @@ -0,0 +1,5 @@ +# Adjust this to match your desired /proc/cpuinfo output +# The RPi3 has fields missing when running in 64-bit mode, hence this file +# You only need the missing snippets, for wiringPi to read +Hardware : BCM2709 +Revision : a02082 |