From 73c91317ca2f232e8ef6be6aa59891b63d34d3f9 Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Wed, 24 Feb 2021 12:59:53 +0100 Subject: [PATCH 1/6] rpi-eeprom-update: Surround [:print:] with quotes It seems that [:print:] could be substituted by rogue shells[1], so surround it with quotes to make sure it doesn't happen. Use single quotes as they are the most constraining kind. All in all, this change should be harmless. Signed-off-by: Nicolas Saenz Julienne [1] https://github.com/raspberrypi/rpi-eeprom/pull/298#issuecomment-784542905 --- rpi-eeprom-update | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpi-eeprom-update b/rpi-eeprom-update index e4df232..654fe9f 100755 --- a/rpi-eeprom-update +++ b/rpi-eeprom-update @@ -113,7 +113,7 @@ getBootloaderConfig() { local blconfig_nvmem_path="" if [ -f "${blconfig_alias}" ]; then - local blconfig_ofnode_path="/sys/firmware/devicetree/base"$(tr -cd [:print:] < "${blconfig_alias}")"" + local blconfig_ofnode_path="/sys/firmware/devicetree/base"$(tr -cd '[:print:]' < "${blconfig_alias}")"" local blconfig_ofnode_link=$(find -L /sys/bus/nvmem -samefile "${blconfig_ofnode_path}" 2>/dev/null) if [ -e "${blconfig_ofnode_link}" ]; then @@ -288,7 +288,7 @@ getBootloaderUpdateVersion() { match=".*/pieeprom-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].bin" latest="$(find "${FIRMWARE_IMAGE_DIR}/" -maxdepth 1 -type f -size "${EEPROM_SIZE}c" -regex "${match}" | sort -r | head -n1)" if [ -f "${latest}" ]; then - BOOTLOADER_UPDATE_VERSION=$(tr -c [:print:] "\n" < "${latest}" | sed '/^BUILD_TIMESTAMP=/s/.*=//p;d') + BOOTLOADER_UPDATE_VERSION=$(tr -c '[:print:]' "\n" < "${latest}" | sed '/^BUILD_TIMESTAMP=/s/.*=//p;d') BOOTLOADER_UPDATE_IMAGE="${latest}" fi } From 6265c773e7e06d131c5e25c7443e426a032a79f0 Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Wed, 24 Feb 2021 14:03:15 +0000 Subject: [PATCH 2/6] Remove SPI_SPEED variable now that flashrom has been removed. --- rpi-eeprom-update | 2 -- 1 file changed, 2 deletions(-) diff --git a/rpi-eeprom-update b/rpi-eeprom-update index 654fe9f..682f42f 100755 --- a/rpi-eeprom-update +++ b/rpi-eeprom-update @@ -44,8 +44,6 @@ EXIT_EEPROM_FROZEN=3 # EXIT_PREVIOUS_UPDATE_FAILED=4 OVERWRITE_CONFIG=0 -# Maximum safe SPI speed for EEPROM access 16000, slower is ok. -SPI_SPEED=16000 # Timestamp for first release which doesn't have a timestamp field BOOTLOADER_FIRST_VERSION=1557513636 EEPROM_SIZE=524288 From 3b91c0d31bba7c8014e4d45a39873c6519d85a53 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Fri, 26 Feb 2021 13:11:52 +0000 Subject: [PATCH 3/6] Revert "Remove binutils dependency" This reverts commit 3b34f6a6e591a124aef3b7a8d937c95d0cdd6cac. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 2c09c6f..e4dc861 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Vcs-Git: https://github.com/raspberrypi/rpi-eeprom.git Package: rpi-eeprom Architecture: armhf arm64 Depends: ${shlibs:Depends}, ${misc:Depends}, libraspberrypi-bin, python3, - raspberrypi-bootloader (>= 1.20190819), pciutils + binutils, raspberrypi-bootloader (>= 1.20190819), pciutils Breaks: rpi-eeprom-images (<<7.2) Replaces: rpi-eeprom-images (<<7.2) Recommends: flashrom From dcd114f8fde347b6e829376cd025d40954e3bcf8 Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Fri, 26 Feb 2021 12:54:02 +0000 Subject: [PATCH 4/6] Revert "rpi-eeprom-update: Surround [:print:] with quotes" This reverts commit f14fc0f8f6974129ffccc0d5b85e04a1ec96399b. --- rpi-eeprom-update | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpi-eeprom-update b/rpi-eeprom-update index 682f42f..6069912 100755 --- a/rpi-eeprom-update +++ b/rpi-eeprom-update @@ -111,7 +111,7 @@ getBootloaderConfig() { local blconfig_nvmem_path="" if [ -f "${blconfig_alias}" ]; then - local blconfig_ofnode_path="/sys/firmware/devicetree/base"$(tr -cd '[:print:]' < "${blconfig_alias}")"" + local blconfig_ofnode_path="/sys/firmware/devicetree/base"$(tr -cd [:print:] < "${blconfig_alias}")"" local blconfig_ofnode_link=$(find -L /sys/bus/nvmem -samefile "${blconfig_ofnode_path}" 2>/dev/null) if [ -e "${blconfig_ofnode_link}" ]; then @@ -286,7 +286,7 @@ getBootloaderUpdateVersion() { match=".*/pieeprom-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].bin" latest="$(find "${FIRMWARE_IMAGE_DIR}/" -maxdepth 1 -type f -size "${EEPROM_SIZE}c" -regex "${match}" | sort -r | head -n1)" if [ -f "${latest}" ]; then - BOOTLOADER_UPDATE_VERSION=$(tr -c '[:print:]' "\n" < "${latest}" | sed '/^BUILD_TIMESTAMP=/s/.*=//p;d') + BOOTLOADER_UPDATE_VERSION=$(tr -c [:print:] "\n" < "${latest}" | sed '/^BUILD_TIMESTAMP=/s/.*=//p;d') BOOTLOADER_UPDATE_IMAGE="${latest}" fi } From 8c9c14526dbb7966ed2bef3f8ccadff6facddca6 Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Fri, 26 Feb 2021 12:54:16 +0000 Subject: [PATCH 5/6] Revert "rpi-eeprom-update: Use 'tr' instead of 'strings'" This reverts commit 9a2aede8034aab0bfb050b481d422fddb5c25683. --- rpi-eeprom-update | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpi-eeprom-update b/rpi-eeprom-update index 6069912..cab65b9 100755 --- a/rpi-eeprom-update +++ b/rpi-eeprom-update @@ -111,7 +111,7 @@ getBootloaderConfig() { local blconfig_nvmem_path="" if [ -f "${blconfig_alias}" ]; then - local blconfig_ofnode_path="/sys/firmware/devicetree/base"$(tr -cd [:print:] < "${blconfig_alias}")"" + local blconfig_ofnode_path="/sys/firmware/devicetree/base"$(strings "${blconfig_alias}")"" local blconfig_ofnode_link=$(find -L /sys/bus/nvmem -samefile "${blconfig_ofnode_path}" 2>/dev/null) if [ -e "${blconfig_ofnode_link}" ]; then @@ -286,7 +286,7 @@ getBootloaderUpdateVersion() { match=".*/pieeprom-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].bin" latest="$(find "${FIRMWARE_IMAGE_DIR}/" -maxdepth 1 -type f -size "${EEPROM_SIZE}c" -regex "${match}" | sort -r | head -n1)" if [ -f "${latest}" ]; then - BOOTLOADER_UPDATE_VERSION=$(tr -c [:print:] "\n" < "${latest}" | sed '/^BUILD_TIMESTAMP=/s/.*=//p;d') + BOOTLOADER_UPDATE_VERSION=$(strings "${latest}" | grep BUILD_TIMESTAMP | sed 's/.*=//g') BOOTLOADER_UPDATE_IMAGE="${latest}" fi } From 66f7d195433610db95ba4422b559b64281863c6b Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Fri, 26 Feb 2021 14:16:57 +0000 Subject: [PATCH 6/6] 11.9-1 release --- debian/changelog | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/debian/changelog b/debian/changelog index a886f5f..b00f216 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +rpi-eeprom (11.9-1) buster; urgency=medium + + [ Nicolas Saenz Julienne ] + * rpi-eeprom-update: Surround [:print:] with quotes + + [ Tim Gover ] + * Remove SPI_SPEED variable now that flashrom has been removed. + + [ Serge Schneider ] + * Revert "Remove binutils dependency" + + [ Tim Gover ] + * Revert "rpi-eeprom-update: Surround [:print:] with quotes" + * Revert "rpi-eeprom-update: Use 'tr' instead of 'strings'" + + -- Serge Schneider Fri, 26 Feb 2021 14:16:55 +0000 + rpi-eeprom (11.8-1) buster; urgency=medium [ Nicolas Saenz Julienne ]