!7 [sync] PR-3: 跟进上游版本,适配到 openEuler 22.03 LTS
From: @openeuler-sync-bot Reviewed-by: @jianminw Signed-off-by: @jianminw
This commit is contained in:
commit
b2e4c4816b
@ -1,23 +1,10 @@
|
|||||||
From e28936a8fa34346727b229e7366960e508545cf0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
|
||||||
Date: Fri, 22 Jan 2021 17:08:46 +0100
|
|
||||||
Subject: [PATCH] Avoid using env so rpm catches the python dependency
|
|
||||||
|
|
||||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
|
||||||
---
|
|
||||||
rpi-eeprom-config | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/rpi-eeprom-config b/rpi-eeprom-config
|
diff --git a/rpi-eeprom-config b/rpi-eeprom-config
|
||||||
index 0a6ce5e..943d0dd 100755
|
index 2eaf252..fe72da5 100755
|
||||||
--- a/rpi-eeprom-config
|
--- a/rpi-eeprom-config
|
||||||
+++ b/rpi-eeprom-config
|
+++ b/rpi-eeprom-config
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
-#!/usr/bin/env python
|
-#!/usr/bin/env python3
|
||||||
+#!/usr/bin/python3
|
+#!/usr/bin/python3
|
||||||
|
|
||||||
"""
|
"""
|
||||||
rpi-eeprom-config
|
rpi-eeprom-config
|
||||||
--
|
|
||||||
2.30.0
|
|
||||||
|
|
||||||
|
|||||||
@ -1,17 +1,18 @@
|
|||||||
%global _firmware_path /lib/firmware
|
%global _firmware_path /lib/firmware
|
||||||
%define url_version 2021.04.29-138a1
|
%define url_version 2022.01.25-138a1
|
||||||
|
|
||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
|
|
||||||
Name: raspberrypi-eeprom
|
Name: raspberrypi-eeprom
|
||||||
Version: 2021.04.29
|
Version: 2022.01.25
|
||||||
Release: 2
|
Release: 2
|
||||||
Summary: Raspberry Pi 4 boot EEPROM firmware
|
Summary: Raspberry Pi 4 EEPROM firmware
|
||||||
License: BSD-3-Clause and custom
|
License: BSD-3-Clause and custom
|
||||||
URL: https://github.com/raspberrypi/rpi-eeprom
|
URL: https://github.com/raspberrypi/rpi-eeprom
|
||||||
Source0: https://github.com/raspberrypi/rpi-eeprom/archive/v%{url_version}/rpi-eeprom-%{version}.tar.gz
|
Source0: https://github.com/raspberrypi/rpi-eeprom/archive/v%{url_version}/rpi-eeprom-%{version}.tar.gz
|
||||||
|
|
||||||
Patch0000: python3_env.patch
|
Patch0000: python3_env.patch
|
||||||
|
Patch0001: tr-instead-of-string-in-rpi-eeprom-update.patch
|
||||||
|
|
||||||
AutoReq: no
|
AutoReq: no
|
||||||
AutoProv: yes
|
AutoProv: yes
|
||||||
@ -20,6 +21,7 @@ Provides: rpi-eeprom
|
|||||||
Requires: raspberrypi-firmware libraspberrypi-bin python3 binutils pciutils
|
Requires: raspberrypi-firmware libraspberrypi-bin python3 binutils pciutils
|
||||||
Provides: rpi-eeprom-config = %{version}
|
Provides: rpi-eeprom-config = %{version}
|
||||||
Obsoletes: rpi-eeprom-config < %{version}
|
Obsoletes: rpi-eeprom-config < %{version}
|
||||||
|
BuildRequires: fdupes
|
||||||
ExclusiveArch: aarch64
|
ExclusiveArch: aarch64
|
||||||
ExclusiveOS: Linux
|
ExclusiveOS: Linux
|
||||||
|
|
||||||
@ -31,6 +33,7 @@ Installation scripts and binaries for the closed sourced Raspberry Pi 4 EEPROMs.
|
|||||||
mv rpi-eeprom-%{url_version} %{name}-%{version}
|
mv rpi-eeprom-%{url_version} %{name}-%{version}
|
||||||
cd %{name}-%{version}
|
cd %{name}-%{version}
|
||||||
%patch0000 -p1
|
%patch0000 -p1
|
||||||
|
%patch0001 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -38,27 +41,35 @@ cd %{name}-%{version}
|
|||||||
cd %{name}-%{version}
|
cd %{name}-%{version}
|
||||||
mkdir -p %{buildroot}%{_bindir}
|
mkdir -p %{buildroot}%{_bindir}
|
||||||
install -m 0755 rpi-eeprom-config %{buildroot}%{_bindir}
|
install -m 0755 rpi-eeprom-config %{buildroot}%{_bindir}
|
||||||
|
install -m 0755 rpi-eeprom-digest %{buildroot}%{_bindir}
|
||||||
install -m 0755 rpi-eeprom-update %{buildroot}%{_bindir}
|
install -m 0755 rpi-eeprom-update %{buildroot}%{_bindir}
|
||||||
mkdir -p %{buildroot}/etc/default
|
mkdir -p %{buildroot}/etc/default
|
||||||
install -m 644 rpi-eeprom-update-default %{buildroot}/etc/default/rpi-eeprom-update
|
install -m 644 rpi-eeprom-update-default %{buildroot}/etc/default/rpi-eeprom-update
|
||||||
mkdir -p %{buildroot}%{_firmware_path}/raspberrypi/bootloader
|
mkdir -p %{buildroot}%{_firmware_path}/raspberrypi/bootloader
|
||||||
install -m 644 releases.md %{buildroot}%{_firmware_path}/raspberrypi/bootloader/
|
install -m 644 firmware/release-notes.md %{buildroot}%{_firmware_path}/raspberrypi/bootloader/
|
||||||
cp -a firmware/beta %{buildroot}%{_firmware_path}/raspberrypi/bootloader
|
mv firmware/beta %{buildroot}%{_firmware_path}/raspberrypi/bootloader
|
||||||
cp -a firmware/critical %{buildroot}%{_firmware_path}/raspberrypi/bootloader
|
mv firmware/critical %{buildroot}%{_firmware_path}/raspberrypi/bootloader
|
||||||
cp -a firmware/stable %{buildroot}%{_firmware_path}/raspberrypi/bootloader
|
mv firmware/stable %{buildroot}%{_firmware_path}/raspberrypi/bootloader
|
||||||
cd %{buildroot}%{_firmware_path}/raspberrypi/bootloader
|
cp -a firmware/latest %{buildroot}%{_firmware_path}/raspberrypi/bootloader
|
||||||
ln -s stable latest
|
cp -a firmware/default %{buildroot}%{_firmware_path}/raspberrypi/bootloader
|
||||||
ln -s critical default
|
%fdupes -s %{buildroot}%{_firmware_path}/raspberrypi/bootloader
|
||||||
cd -
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license %{name}-%{version}/LICENSE
|
%license %{name}-%{version}/LICENSE
|
||||||
%{_bindir}/rpi-eeprom-config
|
%{_bindir}/rpi-eeprom-config
|
||||||
|
%{_bindir}/rpi-eeprom-digest
|
||||||
%{_bindir}/rpi-eeprom-update
|
%{_bindir}/rpi-eeprom-update
|
||||||
%config /etc/default/rpi-eeprom-update
|
%config /etc/default/rpi-eeprom-update
|
||||||
%{_firmware_path}/raspberrypi
|
%{_firmware_path}/raspberrypi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Mar 25 2022 Yafen Fang <yafen@iscas.ac.cn> - 2022.01.25-2
|
||||||
|
- remove unused license: uIP
|
||||||
|
|
||||||
|
* Tue Mar 22 2022 Yafen Fang <yafen@iscas.ac.cn> - 2022.01.25-1
|
||||||
|
- update upstream version to 2022.01.25-138a1
|
||||||
|
- fix for openEuler after following up upstream
|
||||||
|
|
||||||
* Sun Sep 26 2021 Yafen Fang <yafen@iscas.ac.cn> - 2021.04.29-2
|
* Sun Sep 26 2021 Yafen Fang <yafen@iscas.ac.cn> - 2021.04.29-2
|
||||||
- remove rpi-eeprom-update.service
|
- remove rpi-eeprom-update.service
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
22
tr-instead-of-string-in-rpi-eeprom-update.patch
Normal file
22
tr-instead-of-string-in-rpi-eeprom-update.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/rpi-eeprom-update b/rpi-eeprom-update
|
||||||
|
index 7b92a5e..78a5739 100755
|
||||||
|
--- a/rpi-eeprom-update
|
||||||
|
+++ b/rpi-eeprom-update
|
||||||
|
@@ -114,7 +114,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
|
||||||
|
@@ -279,7 +279,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
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user