Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
114a22c00e
!19 [sync] PR-17: 跟进上游版本2024.11.12-2712
From: @openeuler-sync-bot 
Reviewed-by: @jianminw 
Signed-off-by: @jianminw
2024-12-09 23:34:03 +00:00
Yafen
ffe7d44c0b update source version to 2024.11.12-2712
(cherry picked from commit 6f3e16339e77e204728af69c5700c90c965cc8b9)
2024-12-10 07:24:34 +08:00
openeuler-ci-bot
95e3b9aa2a
!16 [sync] PR-14: 跟进上游版本2024.09.23-2712
From: @openeuler-sync-bot 
Reviewed-by: @jianminw 
Signed-off-by: @jianminw
2024-11-07 03:25:49 +00:00
Yafen
28ec55997d update source version to 2024.09.23-2712
(cherry picked from commit 04869a8e5e02f50b4e0e611e57a5ce0151658963)
2024-11-06 14:30:07 +08:00
openeuler-ci-bot
a5ea90e5d6
!13 [sync] PR-11: 跟进上游版本2024.04.20-2712
From: @openeuler-sync-bot 
Reviewed-by: @jianminw 
Signed-off-by: @jianminw
2024-04-25 00:18:55 +00:00
yafen
5b25b6c1d4 update source version to 2024.04.20-2712
(cherry picked from commit 3f303694bb1ccd38ae172feae1e71da58608eea7)
2024-04-25 08:17:59 +08:00
openeuler-ci-bot
ab8b6e105b
!10 [sync] PR-8: 跟进上游版本,适配到 openEuler 23.03
From: @openeuler-sync-bot 
Reviewed-by: @jianminw 
Signed-off-by: @jianminw
2023-03-24 08:38:50 +00:00
yafen
270bd642da update source version to 2023.01.11-138c0
(cherry picked from commit dfb310c4506c42516a55c983449cb3ef8b0d1fb6)
2023-03-20 18:48:10 +08:00
openeuler-ci-bot
5e46ad1fb8
!6 [sync] PR-3: 跟进上游版本,适配到 openEuler 22.03 LTS
From: @openeuler-sync-bot 
Reviewed-by: @jianminw 
Signed-off-by: @jianminw
2022-04-12 13:58:29 +00:00
yafen
8db4646e6a remove unused license: uIP
(cherry picked from commit d75a09fbc704b8b4a2f37e35dd5f133b50f26170)
2022-04-12 17:29:44 +08:00
4 changed files with 44 additions and 40 deletions

View File

@ -1,24 +1,22 @@
%global _firmware_path /lib/firmware
%define url_version 2022.01.25-138a1
%define url_version 2024.11.12-2712
%global debug_package %{nil}
Name: raspberrypi-eeprom
Version: 2022.01.25
Version: 2024.11.12
Release: 1
Summary: Raspberry Pi 4 EEPROM firmware
License: BSD-3-Clause and uIP and custom
Summary: Raspberry Pi 4 and Pi 5 EEPROM firmware
License: BSD-3-Clause and MIT and uIP and custom
URL: https://github.com/raspberrypi/rpi-eeprom
Source0: https://github.com/raspberrypi/rpi-eeprom/archive/v%{url_version}/rpi-eeprom-%{version}.tar.gz
Patch0000: python3_env.patch
Patch0001: tr-instead-of-string-in-rpi-eeprom-update.patch
AutoReq: no
AutoProv: yes
Provides: rpi-eeprom
Requires: raspberrypi-firmware libraspberrypi-bin python3 binutils pciutils
Requires: raspberrypi-firmware python3 binutils pciutils
Provides: rpi-eeprom-config = %{version}
Obsoletes: rpi-eeprom-config < %{version}
BuildRequires: fdupes
@ -26,14 +24,13 @@ ExclusiveArch: aarch64
ExclusiveOS: Linux
%description
Installation scripts and binaries for the closed sourced Raspberry Pi 4 EEPROMs.
Installation scripts and binaries for the Raspberry Pi 4 and Raspberry Pi 5 bootloader EEPROMs.
%prep
%setup -q -n %{name}-%{version} -c
mv rpi-eeprom-%{url_version} %{name}-%{version}
cd %{name}-%{version}
%patch0000 -p1
%patch0001 -p1
%build
@ -45,24 +42,53 @@ install -m 0755 rpi-eeprom-digest %{buildroot}%{_bindir}
install -m 0755 rpi-eeprom-update %{buildroot}%{_bindir}
mkdir -p %{buildroot}/etc/default
install -m 644 rpi-eeprom-update-default %{buildroot}/etc/default/rpi-eeprom-update
mkdir -p %{buildroot}%{_firmware_path}/raspberrypi/bootloader
install -m 644 firmware/release-notes.md %{buildroot}%{_firmware_path}/raspberrypi/bootloader/
mv firmware/beta %{buildroot}%{_firmware_path}/raspberrypi/bootloader
mv firmware/critical %{buildroot}%{_firmware_path}/raspberrypi/bootloader
mv firmware/stable %{buildroot}%{_firmware_path}/raspberrypi/bootloader
cp -a firmware/latest %{buildroot}%{_firmware_path}/raspberrypi/bootloader
cp -a firmware/default %{buildroot}%{_firmware_path}/raspberrypi/bootloader
%fdupes -s %{buildroot}%{_firmware_path}/raspberrypi/bootloader
install -m 0755 tools/rpi-bootloader-key-convert %{buildroot}%{_bindir}
install -m 0755 tools/rpi-otp-private-key %{buildroot}%{_bindir}
install -m 0755 tools/rpi-sign-bootcode %{buildroot}%{_bindir}
for model in 2711 2712; do
mkdir -p %{buildroot}%{_firmware_path}/raspberrypi/bootloader-$model
install -m 644 firmware-$model/release-notes.md %{buildroot}%{_firmware_path}/raspberrypi/bootloader-$model/
mv firmware-$model/beta %{buildroot}%{_firmware_path}/raspberrypi/bootloader-$model
mv firmware-$model/critical %{buildroot}%{_firmware_path}/raspberrypi/bootloader-$model
mv firmware-$model/stable %{buildroot}%{_firmware_path}/raspberrypi/bootloader-$model
cp -a firmware-$model/latest %{buildroot}%{_firmware_path}/raspberrypi/bootloader-$model
cp -a firmware-$model/default %{buildroot}%{_firmware_path}/raspberrypi/bootloader-$model
%fdupes -s %{buildroot}%{_firmware_path}/raspberrypi/bootloader-$model
done
%files
%license %{name}-%{version}/LICENSE
%{_bindir}/rpi-eeprom-config
%{_bindir}/rpi-eeprom-digest
%{_bindir}/rpi-eeprom-update
%{_bindir}/rpi-bootloader-key-convert
%{_bindir}/rpi-otp-private-key
%{_bindir}/rpi-sign-bootcode
%config /etc/default/rpi-eeprom-update
%{_firmware_path}/raspberrypi
%changelog
* Mon Dec 9 2024 Yafen Fang <yafen@iscas.ac.cn> - 2024.11.12-1
- update upstream version to 2024.11.12-2712
* Mon Nov 4 2024 Yafen Fang <yafen@iscas.ac.cn> - 2024.09.23-1
- update upstream version to 2024.09.23-2712
- remove requires: libraspberrypi-bin
* Mon Apr 22 2024 Yafen Fang <yafen@iscas.ac.cn> - 2024.04.20-1
- update upstream version to 2024.04.20-2712
- add Raspberry Pi 5 bootloader EEPROMs
- add rpi-bootloader-key-convert, rpi-otp-private-key, rpi-sign-bootcode
- remove patch for rpi-eeprom-update: use 'tr' instead of 'strings'
* 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
* 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
@ -71,4 +97,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

Binary file not shown.

Binary file not shown.

View File

@ -1,22 +0,0 @@
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
}