Skip to content

Commit

Permalink
rpi-eeprom-update: Upstream kernel fix
Browse files Browse the repository at this point in the history
Upstream kernels do not list the board revision in /proc/cpuinfo. Get it
from the device tree instead.
  • Loading branch information
hvenev committed Aug 20, 2020
1 parent 1a44b13 commit eea80bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpi-eeprom-update
Expand Up @@ -268,7 +268,7 @@ getBootloaderUpdateVersion() {
}

checkDependencies() {
BOARD_INFO="$(sed -n '/^Revision/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo)"
BOARD_INFO="$(hexdump -e '1/1 "%02x"' /sys/firmware/devicetree/base/system/linux,revision)"
if [ $(((0x$BOARD_INFO >> 23) & 1)) -ne 0 ] && [ $(((0x$BOARD_INFO >> 12) & 15)) -eq 3 ]; then
echo "BCM2711 detected"
else
Expand Down

0 comments on commit eea80bc

Please sign in to comment.