From a554034c1d441a2b3cc53b517bc9745b06f732a2 Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Thu, 24 Sep 2020 14:57:39 +0100 Subject: [PATCH] rpi-eeprom-update: Add -l option to resolve the latest bootloader image Add the -l option to return the latest bootloader EEPROM image. This will be used by rpi-eeprom-config to provide a more convenient mechanism for quick config changes. --- rpi-eeprom-update | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rpi-eeprom-update b/rpi-eeprom-update index 34e180b..1221b92 100755 --- a/rpi-eeprom-update +++ b/rpi-eeprom-update @@ -394,6 +394,8 @@ Options: -h Display help text and exit -i Ignore package checksums - for rpi-eeprom developers. -j Write status information using JSON notation + -l Returns the full path to the latest available EEPROM image file according + to the FIRMWARE_RELEASE_STATUS and FIRMWARE_IMAGE_DIR settings. -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. @@ -694,7 +696,7 @@ MACHINE_OUTPUT="" JSON_OUTPUT="no" IGNORE_DPKG_CHECKSUMS=$LOCAL_MODE -while getopts A:adhif:m:ju:r option; do +while getopts A:adhilf:m:ju:r option; do case "${option}" in A) if [ "${OPTARG}" = "bootloader" ]; then @@ -716,6 +718,11 @@ while getopts A:adhif:m:ju:r option; do ;; j) JSON_OUTPUT="yes" ;; + l) + getBootloaderUpdateVersion + echo "${BOOTLOADER_UPDATE_IMAGE}" + exit 0 + ;; m) MACHINE_OUTPUT="${OPTARG}" ;; h) usage