Pi board checks now take account of warranty bits.

This commit is contained in:
spl 2016-02-09 15:08:25 +00:00 committed by Serge Schneider
parent be9b771788
commit 5ef7e7cbd7

View File

@ -11,7 +11,7 @@ CONFIG=/boot/config.txt
is_pione() {
if grep -q "^Revision\s*:\s*00[0-9a-fA-F][0-9a-fA-F]$" /proc/cpuinfo; then
return 0
elif grep -q "^Revision\s*:\s*[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[0-36][0-9a-fA-F]" /proc/cpuinfo ; then
elif grep -q "^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[0-36][0-9a-fA-F]$" /proc/cpuinfo ; then
return 0
else
return 1
@ -19,12 +19,12 @@ is_pione() {
}
is_pitwo() {
grep -q "^Revision\s*:\s*[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]04[0-9a-fA-F]" /proc/cpuinfo
grep -q "^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]04[0-9a-fA-F]$" /proc/cpuinfo
return $?
}
is_pizero() {
grep -q "^Revision\s*:\s*[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]09[0-9a-fA-F]" /proc/cpuinfo
grep -q "^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]09[0-9a-fA-F]$" /proc/cpuinfo
return $?
}