mac21
Posts: 1
Joined: Fri Jul 30, 2021 10:08 pm

No revision info in /proc/cpuinfo

Fri Jul 30, 2021 10:19 pm

Hi @all,

I recently bought a new Pi4 8GB, the revision should be 1.4, correct?
My problem is that I can't locate the revision code because it's not contained in /proc/cpuinfo.

There are information about the 4 CPU cores but the last paragraph (which I know from my Pi4 4GB (revision 1.2, if I remember correctly).

because of that I cannot run python-scripts (2.7 and 3) with "RPi.GPIO" or "gpiozero".
Both scripts output an error "unable to locate pi revision in /proc/cpuinfo".
Correct, because it's not in there.

I found that topic telling me that cpuinfo does not work with arm64 but only with arm32:
https://github.com/raspberrypi/linux/issues/2110

Does this mean I can throw my Pi4 into the trash can?
the latest version of both gpio-packages (see above) are up2date but both do rely on cpuinfo, which does not support arm64.

is there any user-friendly solution for my problem?
As a software developer that just startet with debian (no, I don't run raspbian) I surely how to make changes in source code but I'm not very experienced with raspberry/linux.

Please have mercy with me, dumb windows user haha.

Thanks a lot
Mac21

User avatar
B.Goode
Posts: 12973
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: No revision info in /proc/cpuinfo

Sat Jul 31, 2021 7:31 am

{ Possibly incorrect advice removed }
Last edited by B.Goode on Sat Jul 31, 2021 7:47 am, edited 1 time in total.

fruitoftheloom
Posts: 27226
Joined: Tue Mar 25, 2014 12:40 pm

Re: No revision info in /proc/cpuinfo

Sat Jul 31, 2021 7:41 am

mac21 wrote:
Fri Jul 30, 2021 10:19 pm
Hi @all,

I recently bought a new Pi4 8GB, the revision should be 1.4, correct?
My problem is that I can't locate the revision code because it's not contained in /proc/cpuinfo.

There are information about the 4 CPU cores but the last paragraph (which I know from my Pi4 4GB (revision 1.2, if I remember correctly).

because of that I cannot run python-scripts (2.7 and 3) with "RPi.GPIO" or "gpiozero".
Both scripts output an error "unable to locate pi revision in /proc/cpuinfo".
Correct, because it's not in there.

I found that topic telling me that cpuinfo does not work with arm64 but only with arm32:
https://github.com/raspberrypi/linux/issues/2110

Does this mean I can throw my Pi4 into the trash can?
the latest version of both gpio-packages (see above) are up2date but both do rely on cpuinfo, which does not support arm64.

is there any user-friendly solution for my problem?
As a software developer that just startet with debian (no, I don't run raspbian) I surely how to make changes in source code but I'm not very experienced with raspberry/linux.

Please have mercy with me, dumb windows user haha.

Thanks a lot
Mac21

/proc/cpuinfo is out of date for newer RPi models, see:

https://www.raspberrypi.org/documentati ... /README.md


There are no guarantees you will get revision 1.4 4B, it is whatever you get sent from the Re-Seller....


The GitHub link is 4 years old and pre-dates the 4B by 2 years and I believe it relates to 64bit Kernel with 32bit Userland.


Raspberry Pi offer a full 64bit Kernel / 64bit Userland Operating System based of Debian Buster ARM64 which though Beta Testing Status is very stable:

Lite
https://downloads.raspberrypi.org/raspi ... 021-05-28/

Full
https://downloads.raspberrypi.org/raspi ... 021-05-28/



Last but not least Python 2 is no longer supported and going forward it is not advised to use:

https://www.python.org/doc/sunset-python-2

.
Take what I advise as advice not the utopian holy grail, and it is gratis !!

User avatar
jahboater
Posts: 7371
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: No revision info in /proc/cpuinfo

Sat Jul 31, 2021 10:05 am

mac21 wrote:
Fri Jul 30, 2021 10:19 pm
I found that topic telling me that cpuinfo does not work with arm64 but only with arm32:
https://github.com/raspberrypi/linux/issues/2110

Does this mean I can throw my Pi4 into the trash can?
Nonsense!
In 64-bit mode, /proc/cpuinfo reports:

Code: Select all

Hardware        : BCM2835
Revision        : d03114
Serial          : 10000000855a25a7
Model           : Raspberry Pi 4 Model B Rev 1.4
Yes, you should have Rev1.4 for the 8GB Pi4 model.

See also /proc/device-tree/model

User avatar
B.Goode
Posts: 12973
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: No revision info in /proc/cpuinfo

Sat Jul 31, 2021 10:12 am

jahboater wrote:
Sat Jul 31, 2021 10:05 am
mac21 wrote:
Fri Jul 30, 2021 10:19 pm
I found that topic telling me that cpuinfo does not work with arm64 but only with arm32:
https://github.com/raspberrypi/linux/issues/2110

Does this mean I can throw my Pi4 into the trash can?
Nonsense!
In 64-bit mode /proc/cpuinfo reports:

Code: Select all

Hardware        : BCM2835
Revision        : d03114
Serial          : 10000000855a25a7
Model           : Raspberry Pi 4 Model B Rev 1.4
Yes, you should have Rev1.4 for the 8GB Pi4 model.

See also /proc/device-tree/model


Is this Operating System dependent?


Note that @mac21 says -
As a software developer that just startet with debian (no, I don't run raspbian)


(In my reconsidered and deleted previous post I had made the radical suggestion of using the Raspberry Pi Operating System as a 'benchmark'.)

User avatar
jahboater
Posts: 7371
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: No revision info in /proc/cpuinfo

Sat Jul 31, 2021 10:15 am

B.Goode wrote:
Sat Jul 31, 2021 10:12 am
Is this Operating System dependent?

Note that @mac21 says -
As a software developer that just startet with debian (no, I don't run raspbian)
Ah yes, very likely. Though /proc is created by the kernel.
I only ever use Raspberry Pi OS on Pi's so I cant verify that.

User avatar
DougieLawson
Posts: 41759
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: No revision info in /proc/cpuinfo

Sun Aug 01, 2021 2:08 pm

Why aren't folks using the more reliable cat /sys/firmware/devicetree/base/model;echo which is easier than decoding the /proc/cpuinfo Revision string.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Twitter/LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

trejan
Posts: 3714
Joined: Tue Jul 02, 2019 2:28 pm

Re: No revision info in /proc/cpuinfo

Sun Aug 01, 2021 2:21 pm

The stock Linux arm64 kernel doesn't display revision, serial or model in /proc/cpuinfo. The RPT kernel has a patch applied that adds it. OP isn't using RPi OS so their kernel presumably doesn't have it.

User avatar
DougieLawson
Posts: 41759
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: No revision info in /proc/cpuinfo

Sun Aug 01, 2021 5:38 pm

trejan wrote:
Sun Aug 01, 2021 2:21 pm
The stock Linux arm64 kernel doesn't display revision, serial or model in /proc/cpuinfo. The RPT kernel has a patch applied that adds it. OP isn't using RPi OS so their kernel presumably doesn't have it.
So replace the kernel with the RPF/RPTL version. It's easy enough to grab that from https://github.com/hexxeh/rpi-firmware (which is where rpi-update gets it from).
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Twitter/LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

User avatar
jahboater
Posts: 7371
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: No revision info in /proc/cpuinfo

Sun Aug 01, 2021 5:58 pm

DougieLawson wrote:
Sun Aug 01, 2021 2:08 pm
Why aren't folks using the more reliable cat /sys/firmware/devicetree/base/model;echo which is easier than decoding the /proc/cpuinfo Revision string.
Also

Code: Select all

cat /proc/device-tree/model;echo

Return to “General discussion”