diff --git a/raspberrypi-eeprom-0.0~2020.09.03.65~gb9c255d.obscpio b/raspberrypi-eeprom-0.0~2020.09.03.65~gb9c255d.obscpio deleted file mode 100644 index b872bcf..0000000 --- a/raspberrypi-eeprom-0.0~2020.09.03.65~gb9c255d.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6b862eae9266d8dff666e5eb8942394a3a130b77df65538076deda0ab883180d -size 26358797 diff --git a/raspberrypi-eeprom-0.0~2020.09.03.75~g3129546.obscpio b/raspberrypi-eeprom-0.0~2020.09.03.75~g3129546.obscpio new file mode 100644 index 0000000..15cfab6 --- /dev/null +++ b/raspberrypi-eeprom-0.0~2020.09.03.75~g3129546.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:734f7f1f282a6c585b6b24bd3f7121ed8d2e42f66c4a810c790781a1740ab6c3 +size 26459661 diff --git a/raspberrypi-eeprom.changes b/raspberrypi-eeprom.changes index 778a0ff..177d7d2 100644 --- a/raspberrypi-eeprom.changes +++ b/raspberrypi-eeprom.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Feb 19 10:07:06 UTC 2021 - Nicolas Patricio Saenz Julienne + +- Add 'pciutils' as a requirement. 'rpi-eeprom-update' uses lspci. + (bsc#1182437) +- Update to version 0.0~2020.09.03.65~gb9c255d: Simplifies code by removing + legacy functions. +- Add patch: "rpi-eeprom-update-Use-tr-instead-of-strings.patch" to avoid the + dependency with binutils. (bsc#1182437) + ------------------------------------------------------------------- Thu Feb 4 14:17:12 UTC 2021 - Nicolas Patricio Saenz Julienne diff --git a/raspberrypi-eeprom.obsinfo b/raspberrypi-eeprom.obsinfo index db70d26..16cbc44 100644 --- a/raspberrypi-eeprom.obsinfo +++ b/raspberrypi-eeprom.obsinfo @@ -1,5 +1,5 @@ name: raspberrypi-eeprom -version: 0.0~2020.09.03.65~gb9c255d -mtime: 1611663989 -commit: b9c255df582b2c33a9af58d1973e83b3e8998f8f +version: 0.0~2020.09.03.75~g3129546 +mtime: 1613487491 +commit: 3129546271da09dde04da5c9715db909b8e1e417 diff --git a/raspberrypi-eeprom.spec b/raspberrypi-eeprom.spec index 876c68a..cb5cb2e 100644 --- a/raspberrypi-eeprom.spec +++ b/raspberrypi-eeprom.spec @@ -15,12 +15,13 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # + %if 0%{?suse_version} < 1550 %define _firmwaredir /lib/firmware %endif Name: raspberrypi-eeprom -Version: 0.0~2020.09.03.65~gb9c255d +Version: 0.0~2020.09.03.75~g3129546 Release: 0 Summary: Raspberry Pi 4 EEPROM firmware License: SUSE-Firmware @@ -29,12 +30,14 @@ URL: https://github.com/raspberrypi/rpi-eeprom Source0: %{name}-%{version}.tar.xz Patch0: add-suse-config.patch Patch1: dont-use-env.patch +Patch2: rpi-eeprom-update-Use-tr-instead-of-strings.patch Provides: rpi-eeprom Supplements: modalias(of:N*T*Cbrcm%2Cbcm2711*C*) Requires: raspberrypi-firmware >= 2021.01.21 Requires: raspberrypi-firmware-dt >= 2020.12.07 Provides: rpi-eeprom-config = %{version} Obsoletes: rpi-eeprom-config < %{version} +Requires: pciutils Requires: raspberrypi-eeprom-firmware BuildArch: noarch @@ -43,7 +46,6 @@ First stage bootloader packages for Raspberry Pi 4 %package firmware Summary: Raspberry Pi 4 EEPROM firmware blobs -License: SUSE-Firmware Group: System/Boot Provides: raspberrypi-firmware-eeprom = %{version} Obsoletes: raspberrypi-firmware-eeprom < %{version} diff --git a/rpi-eeprom-update-Use-tr-instead-of-strings.patch b/rpi-eeprom-update-Use-tr-instead-of-strings.patch new file mode 100644 index 0000000..c5835e7 --- /dev/null +++ b/rpi-eeprom-update-Use-tr-instead-of-strings.patch @@ -0,0 +1,46 @@ +From b760758c5eee3ff26d6705491ed3630f3079fff6 Mon Sep 17 00:00:00 2001 +From: Nicolas Saenz Julienne +Date: Thu, 18 Feb 2021 17:49:46 +0100 +Subject: [PATCH] rpi-eeprom-update: Use 'tr' instead of 'strings' + +The 'strings' utility is installed by binutils whereas 'tr' belongs with +coreutils. Minimal systems will only contain the latter, due to binutils' +size (20-50 MB). So, convert all uses of 'strings' to 'tr' so as to +avoid the package dependency. + +The second 'tr' usage converts non-ASCII characters into newlines so as +to isolate the "BUILD_TIMESTAMP=1234567890" statement (similar to what +'strings' does). There is no need for this in the first one: non-ASCII +characters are simply discarded as DT aliases have a fixed one line +format. + +Signed-off-by: Nicolas Saenz Julienne +--- + rpi-eeprom-update | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/rpi-eeprom-update b/rpi-eeprom-update +index 332d39c..e4df232 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"$(strings "${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=$(strings "${latest}" | grep BUILD_TIMESTAMP | sed 's/.*=//g') ++ BOOTLOADER_UPDATE_VERSION=$(tr -c [:print:] "\n" < "${latest}" | sed '/^BUILD_TIMESTAMP=/s/.*=//p;d') + BOOTLOADER_UPDATE_IMAGE="${latest}" + fi + } +-- +2.30.1 +