Skip to content

Commit e4724b4

Browse files
authored
Merge pull request #500 from timg236/rpi-eeprom-update-ignore-dpkg-checksums
rpi-eeprom: Disable the dpkg checksum validation by default
2 parents b57586e + 1e5594c commit e4724b4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

rpi-eeprom-update

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ elif [ -d /lib/firmware/raspberrypi/bootloader ] || [ -d /lib/firmware/raspberry
1919
else
2020
# Work from local git checkout
2121
LOCAL_MODE=1
22+
IGNORE_DPKG_CHECKSUMS=1
2223
FIRMWARE_ROOT="${script_dir}/firmware"
2324
fi
2425

@@ -529,7 +530,6 @@ Options:
529530
Ignores the FREEZE_VERSION flag in bootloader and is intended for manual
530531
firmware updates.
531532
-h Display help text and exit
532-
-i Ignore package checksums - for rpi-eeprom developers.
533533
-j Write status information using JSON notation (requires -m option)
534534
-l Returns the full path to the latest available EEPROM image file according
535535
to the FIRMWARE_RELEASE_STATUS and FIRMWARE_IMAGE_DIR settings.
@@ -915,7 +915,8 @@ AUTO_UPDATE_VL805=0
915915
SILENT_UPDATE=0
916916
MACHINE_OUTPUT=""
917917
JSON_OUTPUT="no"
918-
IGNORE_DPKG_CHECKSUMS=${LOCAL_MODE}
918+
# Ignore dpkg checksums by default so that rpi-update can install new binaries into /lib/firmware
919+
IGNORE_DPKG_CHECKSUMS=${IGNORE_DPKG_CHECKSUMS:-1}
919920
PACKAGE_INFO_DIR="/var/lib/dpkg/info/"
920921
if [ ! -d "${PACKAGE_INFO_DIR}" ]; then
921922
IGNORE_DPKG_CHECKSUMS=1
@@ -945,7 +946,9 @@ while getopts A:abdhilf:m:ju:rs option; do
945946
;;
946947
f) BOOTLOADER_UPDATE_IMAGE="${OPTARG}"
947948
;;
948-
i) IGNORE_DPKG_CHECKSUMS=1
949+
i)
950+
# Script default is 1 but this could have been set to zero in the defaults file
951+
IGNORE_DPKG_CHECKSUMS=1
949952
;;
950953
j) JSON_OUTPUT="yes"
951954
;;

0 commit comments

Comments
 (0)