mirror of
https://github.com/raspberrypi/rpi-eeprom.git
synced 2026-01-21 14:31:03 +08:00
Merge pull request #61 from timg236/tim/vcgencmd
vcgencmd: Use cpuinfo instead of otp_dump and add check for vcgencmd …
This commit is contained in:
@@ -224,17 +224,18 @@ getBootloaderUpdateVersion() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
checkDependencies() {
|
checkDependencies() {
|
||||||
if ! command -v vcgencmd > /dev/null; then
|
rev="$(sed -n '/^Revision/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo)"
|
||||||
die "vcgencmd not found. On Debian, try installing the libraspberrypi-bin package."
|
if [ $(((0x$rev >> 23) & 1)) -ne 0 ] && [ $(((0x$rev >> 12) & 15)) -eq 3 ]; then
|
||||||
fi
|
echo "BCM2711 detected"
|
||||||
|
else
|
||||||
CPU_VER="$(vcgencmd otp_dump | grep 30: | cut -c8)"
|
|
||||||
|
|
||||||
if [ "${CPU_VER}" != "3" ]; then
|
|
||||||
# Not a BCM2711, no EEPROMs to update.
|
# Not a BCM2711, no EEPROMs to update.
|
||||||
exit ${EXIT_SUCCESS}
|
exit ${EXIT_SUCCESS}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! command -v vcgencmd > /dev/null; then
|
||||||
|
die "vcgencmd not found. On Debian, try installing the libraspberrypi-bin package."
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d "${FIRMWARE_IMAGE_DIR}" ]; then
|
if [ ! -d "${FIRMWARE_IMAGE_DIR}" ]; then
|
||||||
die "EEPROM updates directory ${FIRMWARE_IMAGE_DIR} not found."
|
die "EEPROM updates directory ${FIRMWARE_IMAGE_DIR} not found."
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user