From eea80bc4ab45821319265662c23cf4f33180eda4 Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Thu, 20 Aug 2020 13:15:32 +0300 Subject: [PATCH] rpi-eeprom-update: Upstream kernel fix Upstream kernels do not list the board revision in /proc/cpuinfo. Get it from the device tree instead. --- rpi-eeprom-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpi-eeprom-update b/rpi-eeprom-update index 6a936fa..37befdb 100755 --- a/rpi-eeprom-update +++ b/rpi-eeprom-update @@ -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