[SOLVED] /proc/cpuinfo missing information in aarch64

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

[SOLVED] /proc/cpuinfo missing information in aarch64

Postby mafes » Sun Nov 08, 2020 12:42 am

Hi,
I've got a Raspberry Pi 4B in which I am using Arch Linux ARMv8. I realized I have some information related to hardware missing in /proc/cpuinfo, so I cannot make Python RPi.GPIO (both AUR package and PiPy one) recognize my device:

$this->bbcode_second_pass_code('', '$ python
Python 3.8.6 (default, Oct 6 2020, 22:56:58)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import RPi.GPIO
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.8/site-packages/RPi/GPIO/__init__.py", line 23, in <module>
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
>>> import RPi.GPIO as GPIO
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.8/site-packages/RPi/GPIO/__init__.py", line 23, in <module>
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!')

My /proc/cpuinfo is as follows:
$this->bbcode_second_pass_code('', 'processor : 0
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

processor : 1
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

processor : 2
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

processor : 3
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3
')

Compared to Raspbian (https://www.raspberrypi.org/forums/viewtopic.php?t=243882), in the bottom of the file there are a Hardware, Serial Number and Revision entries. Creating a copy in my home directory, adding the lacking information from the directory /proc/cpuinfo, and therefore editing the source code of the RPi.GPIO release to look into this new file I managed to make the package work, but I would like to know if it is possible to permanently add these fields into /proc/cpuinfo file, or at least there is a proper way to get the package working.

My "fake" ~/cpuinfo:
$this->bbcode_second_pass_code('', '
processor : 0
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

processor : 1
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

processor : 2
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

processor : 3
BogoMIPS : 108.00
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

Hardware : BCM2711
Serial : XXXXXXXXXXX
Model : Raspberry Pi 4 Model B
Revision : c03111
')

Thanks,
Last edited by mafes on Sun Nov 08, 2020 4:05 pm, edited 1 time in total.
mafes
 
Posts: 3
Joined: Sat Nov 07, 2020 5:18 pm

Re: /proc/cpuinfo missing information in aarch64

Postby lategoodbye » Sun Nov 08, 2020 10:51 am

The "missing" information in aarch64 is expected, because the mainline kernel doesn't contain these information and the arm64 kernel developer will never integrate them. The real problem is the fact, that RPI.GPIO relies on a vendor kernel.

Either you contact the author of RPI.GPIO to fix this issue or switch to a better GPIO library.
lategoodbye
 
Posts: 124
Joined: Sat Dec 29, 2018 1:24 am

Re: /proc/cpuinfo missing information in aarch64

Postby mafes » Sun Nov 08, 2020 4:01 pm

Thank you very much for your answer. I managed to install the RPi.GPIO2 library both through pip and compiling without any problem.
mafes
 
Posts: 3
Joined: Sat Nov 07, 2020 5:18 pm


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 3 guests