rpi-eeprom-update: Upstream kernel fix

Upstream kernels do not list the board revision in /proc/cpuinfo. Get it
from the device tree instead.
This commit is contained in:
Hristo Venev
2020-08-20 13:15:32 +03:00
parent 1a44b13308
commit eea80bc4ab

View File

@@ -268,7 +268,7 @@ getBootloaderUpdateVersion() {
} }
checkDependencies() { 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 if [ $(((0x$BOARD_INFO >> 23) & 1)) -ne 0 ] && [ $(((0x$BOARD_INFO >> 12) & 15)) -eq 3 ]; then
echo "BCM2711 detected" echo "BCM2711 detected"
else else