orangepi-xunlong / wiringOP

wiringPi for Orange Pi
GNU Lesser General Public License v3.0
410 stars 194 forks source link

orange pi 4 lts is not working #58

Closed pikodd closed 1 year ago

pikodd commented 1 year ago

Im using orange pi 4 LTS OS Debian bullseye 11.4 server kernel version 5.10.43 Rockchip RK3399 chip

I'v compiled using

chmod +x 
./build clean
./build

And after that I have this issue

 gpio readall
piBoardRev: Unable to determine board revision from /proc/cpuinfo
 -> No "Hardware" line
 ->  You may want to check:
 ->  http://www.lemaker.org/

/proc/cpuinfo is

cat /proc/cpuinfo
processor   : 0
BogoMIPS    : 48.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor   : 1
BogoMIPS    : 48.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor   : 2
BogoMIPS    : 48.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor   : 3
BogoMIPS    : 48.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor   : 4
BogoMIPS    : 48.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part    : 0xd08
CPU revision    : 2

processor   : 5
BogoMIPS    : 48.00
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part    : 0xd08
CPU revision    : 2

Serial      : <here is serial>

Strace

 strace gpio readall
execve("/usr/local/bin/gpio", ["gpio", "readall"], 0x7ff511c1e8 /* 23 vars */) = 0
brk(NULL)                               = 0x558fcc5000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=21158, ...}) = 0
mmap(NULL, 21158, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbda47000
close(3)                                = 0
openat(AT_FDCWD, "/usr/local/lib/libwiringPi.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\3003\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=82480, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbda45000
mmap(NULL, 149112, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fbd9fa000
mprotect(0x7fbda09000, 61440, PROT_NONE) = 0
mmap(0x7fbda18000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe000) = 0x7fbda18000
mmap(0x7fbda1a000, 18040, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fbda1a000
close(3)                                = 0
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\0q\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=160200, ...}) = 0
mmap(NULL, 197632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fbd9c9000
mprotect(0x7fbd9e5000, 61440, PROT_NONE) = 0
mmap(0x7fbd9f4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b000) = 0x7fbd9f4000
mmap(0x7fbd9f6000, 13312, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fbd9f6000
close(3)                                = 0
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0`C\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1458480, ...}) = 0
mmap(NULL, 1531032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fbd853000
mprotect(0x7fbd9b0000, 65536, PROT_NONE) = 0
mmap(0x7fbd9c0000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15d000) = 0x7fbd9c0000
mmap(0x7fbd9c6000, 11416, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fbd9c6000
close(3)                                = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbda43000
mprotect(0x7fbd9c0000, 12288, PROT_READ) = 0
mprotect(0x7fbd9f4000, 4096, PROT_READ) = 0
mprotect(0x7fbda18000, 4096, PROT_READ) = 0
mprotect(0x5571468000, 4096, PROT_READ) = 0
mprotect(0x7fbda50000, 4096, PROT_READ) = 0
munmap(0x7fbda47000, 21158)             = 0
set_tid_address(0x7fbda430e0)           = 2871
set_robust_list(0x7fbda430f0, 24)       = 0
rt_sigaction(SIGRTMIN, {sa_handler=0x7fbd9cfb74, sa_mask=[], sa_flags=SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {sa_handler=0x7fbd9cfc30, sa_mask=[], sa_flags=SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
geteuid()                               = 0
geteuid()                               = 0
brk(NULL)                               = 0x558fcc5000
brk(0x558fce6000)                       = 0x558fce6000
openat(AT_FDCWD, "/proc/cpuinfo", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(3, "processor\t: 0\nBogoMIPS\t: 48.00\nF"..., 1024) = 1024
read(3, "d\nCPU implementer\t: 0x41\nCPU arc"..., 1024) = 125
read(3, "", 1024)                       = 0
close(3)                                = 0
write(2, "piBoardRev: Unable to determine "..., 66piBoardRev: Unable to determine board revision from /proc/cpuinfo
) = 66
write(2, " -> No \"Hardware\" line\n", 23 -> No "Hardware" line
) = 23
write(2, " ->  You may want to check:\n", 28 ->  You may want to check:
) = 28
write(2, " ->  http://www.lemaker.org/\n", 29 ->  http://www.lemaker.org/
) = 29
exit_group(1)                           = ?
+++ exited with 1 +++

Could you please tell me, what I'm doing wrong? Thanks in advance.

pikodd commented 1 year ago

UPD: Its not reproducing on Ubuntu 20.04.4 LTS aarch64 kernel 5.10.43 may be it is a Debian only bug.

baiywt commented 1 year ago

works fine ! Orangepi4-lts_3.0.6_debian_bullseye_server_linux5.10.43.img QQ截图20230131173508