Last active
November 8, 2021 18:11
-
-
Save kazcw/b3ce0fc4095484d645a0414eaf097ded to your computer and use it in GitHub Desktop.
distinguish Raspberry Pi 4 steppings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Distinguishes B0 from C0. Likely won't distinguish C0 from whatever comes next. | |
SD=$(od -An -tx1 -w24 /proc/device-tree/emmc2bus/dma-ranges | tr -d ' ') | |
if [ $SD = 00000000c0000000000000000000000040000000 ]; then echo B0; exit; fi | |
if [ $SD = 00000000000000000000000000000000fc000000 ]; then echo C0; exit; fi | |
echo '??' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment