安裝好opensuse 42.3之後,安裝wiringPi庫。php
因爲/proc/cpuinfo文件缺乏「Hardware」信息,致使出現以下錯誤:linux
Oops: Unable to determine board revision from /proc/cpuinfo -> No "Hardware" line -> You'd best google the error to find out why.
所以,咱們須要自制一個cpuinfo文件,替換wiringPi/wiringPi.c和wiringPi/build 兩個文件中全部「/proc/cpuinfo"。(/proc/cpuinfo替換爲/root/Downloads/wiringPi/cpuinfo)centos
自制cpuinfo文件內容以下:ui
linux:~ # cat /root/Downloads/wiringPi/cpuinfo processor : 0 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4 processor : 1 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4 processor : 2 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4 processor : 3 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4 Hardware : BCM2709 Revision : a22082 Serial : 00000000fcc1f2f9
經過此次的折騰,發現另一個問題,openSUSE 15中GPIO不能正常工做。參考以下google
https://bugs.centos.org/view.php?id=13734spa
暫時不知道怎麼解決這個問題,目前只能在4.4內核使用GPIO,不然會出現以下錯誤:code
wiringPiSetup: mmap (GPIO) failed: Operation not permittedit