!9 [sync] PR-8: 跟进上游版本,适配到 openEuler 23.03

From: @openeuler-sync-bot 
Reviewed-by: @jianminw 
Signed-off-by: @jianminw
This commit is contained in:
openeuler-ci-bot 2023-03-24 08:39:30 +00:00 committed by Gitee
commit d5aaa76948
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 21 additions and 8 deletions

View File

@ -1,11 +1,11 @@
%global _firmware_path /lib/firmware
%define url_version 2022.01.25-138a1
%define url_version 2023.01.11-138c0
%global debug_package %{nil}
Name: raspberrypi-eeprom
Version: 2022.01.25
Release: 2
Version: 2023.01.11
Release: 1
Summary: Raspberry Pi 4 EEPROM firmware
License: BSD-3-Clause and custom
URL: https://github.com/raspberrypi/rpi-eeprom
@ -63,6 +63,10 @@ cp -a firmware/default %{buildroot}%{_firmware_path}/raspberrypi/bootloader
%{_firmware_path}/raspberrypi
%changelog
* Sat Mar 18 2023 Yafen Fang <yafen@iscas.ac.cn> - 2023.01.11-1
- update upstream version to 2023.01.11-138c0
- update patch for rpi-eeprom-update: use 'tr' instead of 'strings'
* Fri Mar 25 2022 Yafen Fang <yafen@iscas.ac.cn> - 2022.01.25-2
- remove unused license: uIP
@ -74,4 +78,4 @@ cp -a firmware/default %{buildroot}%{_firmware_path}/raspberrypi/bootloader
- remove rpi-eeprom-update.service
* Sat Sep 25 2021 Yafen Fang <yafen@iscas.ac.cn> - 2021.04.29-1
- init package
- init package

View File

@ -1,17 +1,26 @@
diff --git a/rpi-eeprom-update b/rpi-eeprom-update
index 7b92a5e..78a5739 100755
index cb25316..431f24f 100755
--- a/rpi-eeprom-update
+++ b/rpi-eeprom-update
@@ -114,7 +114,7 @@ getBootloaderConfig() {
@@ -125,7 +125,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)
local blconfig_ofnode_link=$(find -L /sys/bus/nvmem -maxdepth 3 -samefile "${blconfig_ofnode_path}" 2>/dev/null)
if [ -e "${blconfig_ofnode_link}" ]; then
@@ -279,7 +279,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"
latest="$(find "${FIRMWARE_IMAGE_DIR}/" -maxdepth 1 -type f -size "${EEPROM_SIZE}c" -regex "${match}" | sort -r | head -n1)"
if [ -f "${latest}" ]; then