diff --git a/firmware/critical/recovery.bin b/firmware/critical/recovery.bin index 50717cd..6d0378e 100644 Binary files a/firmware/critical/recovery.bin and b/firmware/critical/recovery.bin differ diff --git a/firmware/critical/vl805-000137ab.bin b/firmware/critical/vl805-000137ab.bin new file mode 100644 index 0000000..8874e54 Binary files /dev/null and b/firmware/critical/vl805-000137ab.bin differ diff --git a/firmware/critical/vl805.latest b/firmware/critical/vl805.latest new file mode 100644 index 0000000..00b6cc4 --- /dev/null +++ b/firmware/critical/vl805.latest @@ -0,0 +1 @@ +000137ab diff --git a/rpi-eeprom-update b/rpi-eeprom-update index 6dad164..49f39b6 100755 --- a/rpi-eeprom-update +++ b/rpi-eeprom-update @@ -139,8 +139,20 @@ applyRecoveryUpdate() } applyUpdate() { + checksums_file="/var/lib/dpkg/info/rpi-eeprom-images.md5sums" + [ "$(id -u)" = "0" ] || die "* Must be run as root - try 'sudo rpi-eeprom-update'" + if [ "${IGNORE_DPKG_CHECKSUMS}" = 0 ] && [ -f "${checksums_file}" ]; then + ( + cd / + if ! md5sum -c "${checksums_file}" > /dev/null 2>&1; then + md5sum -c "${checksums_file}" + die "rpi-eeprom-images checksums failed - try reinstalling this package" + fi + ) + fi + if [ "${USE_FLASHROM}" = 0 ]; then applyRecoveryUpdate return @@ -283,8 +295,10 @@ rpi-eeprom-update [options]... [FILE] WARNING: This command should only be run from console mode in order to avoid conflicts/deadlock with dtoverlay/dtparam settings. -h Display help text and exit + -i Ignore package checksums - for rpi-eeprom developers. -j Write status information using JSON notation -m Write status information to the given file when run without -a or -f + -r Removes temporary EEPROM update files from the boot partition. -u Install the specified VL805 (USB EEPROM) image file. To extract the configuration file from an EEPROM image: @@ -394,6 +408,7 @@ lookupVersionInfo() checkAndApply() { lookupVersionInfo + removePreviousUpdates # Restrict the automatic updates to the EEPROM types selected by the -A option. if [ "${AUTO_UPDATE_VL805}" != 1 ]; then @@ -417,6 +432,7 @@ checkAndApply() fileUpdate() { + removePreviousUpdates echo "*** INSTALLING ${BOOTLOADER_UPDATE_IMAGE} ${VL805_UPDATE_IMAGE} ***" if [ -n "${BOOTLOADER_UPDATE_IMAGE}" ]; then @@ -454,12 +470,12 @@ checkVersion() if [ "${BOOTLOADER_UPDATE_VERSION}" -gt "${BOOTLOADER_CURRENT_VERSION}" ]; then echo "*** UPDATE REQUIRED ***" printVersions - write_status_info "${EXIT_UPDATE_REQUIRED}" + write_status_info "EXIT_UPDATE_REQUIRED" exit ${EXIT_UPDATE_REQUIRED} else echo "Bootloader EEPROM is up to date" printVersions - write_status_info "${EXIT_SUCCESS}" + write_status_info "EXIT_SUCCESS" exit ${EXIT_SUCCESS} fi } @@ -469,8 +485,8 @@ write_status_info() [ -z "${MACHINE_OUTPUT}" ] && return 0 exit_code="${1:-EXIT_FAILED}" - bootloader_cur="${BOOTLOADER_CURRENT_VERSION}" - bootloader_new="${BOOTLOADER_UPDATE_VERSION}" + bootloader_cur="${BOOTLOADER_CURRENT_VERSION:-0}" + bootloader_new="${BOOTLOADER_UPDATE_VERSION:-0}" vl805_cur="${VL805_CURRENT_VERSION}" vl805_new="${VL805_UPDATE_VERSION}" @@ -485,9 +501,9 @@ EOF else cat > "${MACHINE_OUTPUT}" <