Accepting request 1062017 from hardware:boot
OBS-URL: https://build.opensuse.org/request/show/1062017 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/raspberrypi-eeprom?expand=0&rev=8
This commit is contained in:
commit
4b1e785083
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jan 29 14:42:22 UTC 2023 - Tobias Klausmann <tobias.klausmann@freenet.de>
|
||||||
|
|
||||||
|
- Refresh patch rpi-eeprom-update-Use-tr-instead-of-strings.patch
|
||||||
|
Replace the third source for "strings" as well
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Jan 22 20:32:45 UTC 2023 - Tobias Klausmann <tobias.klausmann@freenet.de>
|
Sun Jan 22 20:32:45 UTC 2023 - Tobias Klausmann <tobias.klausmann@freenet.de>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From b760758c5eee3ff26d6705491ed3630f3079fff6 Mon Sep 17 00:00:00 2001
|
From 462564a95da99016969128dedc6b14ea66b12b17 Mon Sep 17 00:00:00 2001
|
||||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||||
Date: Thu, 18 Feb 2021 17:49:46 +0100
|
Date: Thu, 18 Feb 2021 17:49:46 +0100
|
||||||
Subject: [PATCH] rpi-eeprom-update: Use 'tr' instead of 'strings'
|
Subject: [PATCH] rpi-eeprom-update: Use 'tr' instead of 'strings'
|
||||||
@ -8,22 +8,25 @@ 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
|
size (20-50 MB). So, convert all uses of 'strings' to 'tr' so as to
|
||||||
avoid the package dependency.
|
avoid the package dependency.
|
||||||
|
|
||||||
The second 'tr' usage converts non-ASCII characters into newlines so as
|
The second and third 'tr' usage converts non-ASCII characters into newlines
|
||||||
to isolate the "BUILD_TIMESTAMP=1234567890" statement (similar to what
|
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
|
'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
|
characters are simply discarded as DT aliases have a fixed one line
|
||||||
format.
|
format.
|
||||||
|
|
||||||
|
[tobijk]: Add hunk for third string replacement
|
||||||
|
|
||||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||||
|
Signed-off-by: Tobias Klausmann <tobias.klausmann@freenet.de>
|
||||||
---
|
---
|
||||||
rpi-eeprom-update | 4 ++--
|
rpi-eeprom-update | 6 +++---
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/rpi-eeprom-update b/rpi-eeprom-update
|
diff --git a/rpi-eeprom-update b/rpi-eeprom-update
|
||||||
index 332d39c..e4df232 100755
|
index cb25316..431f24f 100755
|
||||||
--- a/rpi-eeprom-update
|
--- a/rpi-eeprom-update
|
||||||
+++ b/rpi-eeprom-update
|
+++ b/rpi-eeprom-update
|
||||||
@@ -113,7 +113,7 @@ getBootloaderConfig() {
|
@@ -125,7 +125,7 @@ getBootloaderConfig() {
|
||||||
local blconfig_nvmem_path=""
|
local blconfig_nvmem_path=""
|
||||||
|
|
||||||
if [ -f "${blconfig_alias}" ]; then
|
if [ -f "${blconfig_alias}" ]; then
|
||||||
@ -32,7 +35,16 @@ index 332d39c..e4df232 100755
|
|||||||
local blconfig_ofnode_link=$(find -L /sys/bus/nvmem -maxdepth 3 -samefile "${blconfig_ofnode_path}" 2>/dev/null)
|
local blconfig_ofnode_link=$(find -L /sys/bus/nvmem -maxdepth 3 -samefile "${blconfig_ofnode_path}" 2>/dev/null)
|
||||||
|
|
||||||
if [ -e "${blconfig_ofnode_link}" ]; then
|
if [ -e "${blconfig_ofnode_link}" ]; then
|
||||||
@@ -288,7 +288,7 @@ getBootloaderUpdateVersion() {
|
@@ -185,7 +185,7 @@ applyRecoveryUpdate()
|
||||||
|
[ -n "${BOOTLOADER_UPDATE_IMAGE}" ] || [ -n "${VL805_UPDATE_IMAGE}" ] || die "No update images specified"
|
||||||
|
|
||||||
|
getBootloaderCurrentVersion
|
||||||
|
- BOOTLOADER_UPDATE_VERSION=$(strings "${BOOTLOADER_UPDATE_IMAGE}" | grep BUILD_TIMESTAMP | sed 's/.*=//g')
|
||||||
|
+ BOOTLOADER_UPDATE_VERSION=$(tr -c [:print:] "\n" < "${BOOTLOADER_UPDATE_IMAGE}" | sed '/^BUILD_TIMESTAMP=/s/.*=//p;d')
|
||||||
|
if [ "${BOOTLOADER_CURRENT_VERSION}" -gt "${BOOTLOADER_UPDATE_VERSION}" ]; then
|
||||||
|
echo " WARNING: Installing an older bootloader version."
|
||||||
|
echo " Update the rpi-eeprom package to fetch the latest bootloader images."
|
||||||
|
@@ -310,7 +310,7 @@ getBootloaderUpdateVersion() {
|
||||||
match=".*/pieeprom-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].bin"
|
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)"
|
latest="$(find "${FIRMWARE_IMAGE_DIR}/" -maxdepth 1 -type f -size "${EEPROM_SIZE}c" -regex "${match}" | sort -r | head -n1)"
|
||||||
if [ -f "${latest}" ]; then
|
if [ -f "${latest}" ]; then
|
||||||
@ -42,5 +54,5 @@ index 332d39c..e4df232 100755
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.30.1
|
2.39.1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user