Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added NanoPi Duo support #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README-nanopiduo-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# README_npiduo.md
Lukas, 2019-12-04
# to use WiringNP with NanoPiDuo and armbian ubuntu 18.04
added nanopi duo board support due to error:
$gpio readall
piBoardRev: Unable to determine board revision from /proc/cpuinfo
-> Is not NanoPi based board.
-> You may want to check:
-> http://www.lemaker.org/
open /sys/class/sunxi_info/sys_info failed.

## WiringNP fix
https://forum.armbian.com/topic/11426-wiringpi-for-nanopi-neo-air/
1. copy sys_info to /etc
2. normally build the project
6 changes: 6 additions & 0 deletions sys_info
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sunxi_platform : Sun8iw7p1
sunxi_secure : normal
sunxi_chipid : 2c21020e786746240000540000000000
sunxi_chiptype : 00000042
sunxi_batchno : 1
sunxi_board_id : 4(0)
4 changes: 2 additions & 2 deletions wiringPi/boardtype_friendlyelec.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ static int getAllwinnerBoardID(char* boardId, int boardIdMaxLen )
FILE *f;
int ret = -1;

if (!(f = fopen("/sys/class/sunxi_info/sys_info", "r"))) {
LOGE("open /sys/class/sunxi_info/sys_info failed.");
if (!(f = fopen("/etc/sys_info", "r"))) {
LOGE("open /etc/sys_info failed.");
return -1;
}

Expand Down