Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Support Raspberry Pi 2 with MoOde 9
#11
Yar, I can simulate the codes but I can't confirm the old models report out the codes the tables say they do. "Trust but verify" Smile

As an aside, I was surprised to see how much the documentation of RPi hardware/firmware has improved. I really should look at it more often. Tons of info on boot modes I hadn't seen before.

Regards,
Kent
Reply
#12
I just tested a different old Raspberry Pi (Model A Rev 2).

Code:
cat /proc/cpuinfo | awk -F': ' '/Revision/ {print $2}'
0008


Code:
# Without 0x17 mask it works
/var/www/util/pirev.py 

0x8    A    2.0    256MB    Sony UK    ?


Code:
# With 0x17 mask the script even crashes, as 0x08 'and'-combined with 0x17 becomes to non existing revison code 0X00.

/var/www/util/pirev.py
Traceback (most recent call last):
 File "/var/www/util/pirev.py", line 185, in <module>
   main()
 File "/var/www/util/pirev.py", line 165, in main
   rev_info = decode_new_style_code(code)
 File "/var/www/util/pirev.py", line 133, in decode_new_style_code
   old_rev = OLD_REVISION_CODES[code&0x17]
KeyError: 0
Thanks for fixing.
Reply
#13
(09-16-2024, 06:59 AM)Prince Wrote: I just tested a different old Raspberry Pi (Model A Rev 2).

Code:
cat /proc/cpuinfo | awk -F': ' '/Revision/ {print $2}'
0008


Code:
# Without 0x17 mask it works
/var/www/util/pirev.py 

0x8    A    2.0    256MB    Sony UK    ?


Code:
# With 0x17 mask the script even crashes, as 0x08 'and'-combined with 0x17 becomes to non existing revison code 0X00.

/var/www/util/pirev.py
Traceback (most recent call last):
 File "/var/www/util/pirev.py", line 185, in <module>
   main()
 File "/var/www/util/pirev.py", line 165, in main
   rev_info = decode_new_style_code(code)
 File "/var/www/util/pirev.py", line 133, in decode_new_style_code
   old_rev = OLD_REVISION_CODES[code&0x17]
KeyError: 0
Thanks for fixing.

It's fixed for upcoming 9.1.0
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: