Sync from SUSE:SLFO:Main raspberrypi-eeprom revision 0e53d4c11d9bd41f440c229bef5215bd

This commit is contained in:
Adrian Schröter 2024-05-03 23:59:48 +02:00
commit 751ac9b65a
9 changed files with 377 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

19
_service Normal file
View File

@ -0,0 +1,19 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/raspberrypi/rpi-eeprom.git</param>
<param name="filename">raspberrypi-eeprom</param>
<param name="revision">bf7419c961e8b65854fd73ec29fbc515087539e8</param>
<param name="versionrewrite-pattern">v([0-9\.]{10}).*</param>
<param name="versionformat">@PARENT_TAG@</param>
<!--
<param name="versionformat">@PARENT_TAG@.@TAG_OFFSET@~g%h</param>
-->
</service>
<service name="set_version" mode="disabled"/>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
</services>

25
add-suse-config.patch Normal file
View File

@ -0,0 +1,25 @@
From d1d1945ef34cab5ff0d41eda2e08266f417be3dc Mon Sep 17 00:00:00 2001
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Date: Fri, 22 Jan 2021 16:54:49 +0100
Subject: [PATCH] Add suse config
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
---
rpi-eeprom-update-default | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rpi-eeprom-update-default b/rpi-eeprom-update-default
index f567b6a..7111176 100644
--- a/rpi-eeprom-update-default
+++ b/rpi-eeprom-update-default
@@ -3,6 +3,6 @@ FIRMWARE_ROOT=/lib/firmware/raspberrypi/bootloader
FIRMWARE_RELEASE_STATUS="critical"
FIRMWARE_IMAGE_DIR="${FIRMWARE_ROOT}/${FIRMWARE_RELEASE_STATUS}"
FIRMWARE_BACKUP_DIR="/var/lib/raspberrypi/bootloader/backup"
-BOOTFS=/boot
+BOOTFS=/boot/efi
USE_FLASHROM=0
EEPROM_CONFIG_HOOK=
--
2.30.0

23
dont-use-env.patch Normal file
View File

@ -0,0 +1,23 @@
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
index 0a6ce5e..943d0dd 100755
--- a/rpi-eeprom-config
+++ b/rpi-eeprom-config
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
"""
rpi-eeprom-config
--
2.30.0

BIN
raspberrypi-eeprom-2023.01.11.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

127
raspberrypi-eeprom.changes Normal file
View File

@ -0,0 +1,127 @@
-------------------------------------------------------------------
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>
- Packaging changes:
* Compress archive to tar.xz to save space (~43M -> ~3.4M)
* Refresh rpi-eeprom-update-Use-tr-instead-of-strings.patch
- 2023-01-11-vl805-000138c0:
- Interesting changes since the last release:-
* Update VL805 to 138C0 - fix for handling of split transactions
raspberrypi/linux#5262
* Fix HID error handling with network install #458
- 2022-11-25-vl805-000138a1:
- Interesting changes since the last release:-
* Add [tryboot] conditional statement to autoboot.txt + tryboot_a_b mode
* Support custom OTP mac addresses
* Increase TFTP_MAX_BLOCK_SIZE
* Stop NVMe cleanly
* Fixes for NETCONSOLE parsing and initialisation.
* Long filename support for start_file / fixup_file.
* Secure boot and display debug info on the diagnostics screen.
- 2022-04-26-vl805-000138a1:
- Interesting changes since the last default release:
* Implement network install
* Add support for BOOT_ORDER_HTTP
* Enable the boot partition number to be specified as an EEPROM config
property.
-------------------------------------------------------------------
Tue Mar 8 12:28:21 UTC 2022 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- 2022-01-25-vl805-000138a1:
- Interesting changes since the last default release:
* Support and bug fixes for all Compute Module variants.
* NVMe interoperability fixes
* FAT/GPT fixes and file-system performance improvements.
* Added secure-boot support for industrial applications
* Added ramdisk / boot.img - for RPIBOOT and secure-boot.
- Package rpi-eeprom-digest
- Refresh patch:
* dont-use-env.patch
-------------------------------------------------------------------
Wed Jun 30 12:19:25 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>
- Use upstream version schema (year.month.day) instead of arbitrary 0.0
- Update to version 2021.04.29
* Add support for NVMe to the bootloader with a new NVMe boot mode
* Add support for [cm4] and [pi400] config conditionals filters.
* TFTP - reply to duplicate ACKS
* Skip rendering of HDMI diagnostics display for the first 8 seconds
unless an error occurs.
* Add support for the BCM2711 XHCI controller - BOOT_ORDER 0x5
* XHCI protocol layer fixes for non-VLI controllers
* Avoid USB MSD timeout of there is only one device
* Fix recovery.bin error handler so that the LED error pattern
is still displayed even if HDMI or SDRAM fail.
* Fix GPIO expander reset issue on some Pi4B 1.1 to 1.3 boards
* Fix regression for GPIO expander reset change which caused PMIC
reset to get card out of 1V8 mode to be missed.
* Timeout USB MSD commands and move to the next boot mode if a device
stops responding.
* Add support for booting from the BCM2711 XHCI controller which is
the USB-C socket on Pi 4B / Pi 400 and the type A sockets on Compute
Module 4 IO board.
* Validate SDRAM in recovery mode.
- Fixes bsc#1194950.
-------------------------------------------------------------------
Fri Feb 19 10:07:06 UTC 2021 - Nicolas Patricio Saenz Julienne <nsaenzjulienne@suse.com>
- 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 <nsaenzjulienne@suse.com>
- Fix 'Supplements:' in spec file, as per
https://doc.opensuse.org/projects/libzypp/HEAD/zypp-modalias.html commas are
special charactes that should be replaced with '%2C'
-------------------------------------------------------------------
Thu Jan 28 16:05:58 UTC 2021 - Nicolas Patricio Saenz Julienne <nsaenzjulienne@suse.com>
- Remove VL805 firmware version from package version as it prevents it from
incresing monotonically.
-------------------------------------------------------------------
Thu Jan 28 13:55:46 UTC 2021 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Prefix version with 0.0~
-------------------------------------------------------------------
Wed Jan 27 12:22:39 UTC 2021 - Nicolas Patricio Saenz Julienne <nsaenzjulienne@suse.com>
- Define _firmwaredir when relevant
-------------------------------------------------------------------
Tue Jan 26 12:31:38 UTC 2021 - Nicolas Patricio Saenz Julienne <nsaenzjulienne@suse.com>
- Update to b9c255d:
* rpi-eeprom-config: Properly decode sysfs binary files
-------------------------------------------------------------------
Mon Jan 25 18:29:06 UTC 2021 - Nicolas Patricio Saenz Julienne <nsaenzjulienne@suse.com>
- Introduce _service file.
-------------------------------------------------------------------
Mon Jan 25 12:55:26 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- Ditch unnecessarily split package.
-------------------------------------------------------------------
Fri Jan 22 14:15:38 UTC 2021 - Nicolas Patricio Saenz Julienne <nsaenzjulienne@suse.com>
- First commit
- Introduce patches: 'add-suse-config.patch' and 'don't-use-env.patch'.

View File

@ -0,0 +1,4 @@
name: raspberrypi-eeprom
version: 2023.01.11
mtime: 1674059670
commit: bf7419c961e8b65854fd73ec29fbc515087539e8

95
raspberrypi-eeprom.spec Normal file
View File

@ -0,0 +1,95 @@
#
# spec file for package raspberrypi-eeprom
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if 0%{?suse_version} < 1550
%define _firmwaredir /lib/firmware
%endif
Name: raspberrypi-eeprom
Version: 2023.01.11
Release: 0
Summary: Raspberry Pi 4 EEPROM firmware
License: SUSE-Firmware
Group: System/Boot
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.03.03
Requires: raspberrypi-firmware-dt >= 2021.03.03
Provides: rpi-eeprom-config = %{version}
Obsoletes: rpi-eeprom-config < %{version}
Requires: pciutils
Requires: raspberrypi-eeprom-firmware
BuildArch: noarch
%description
First stage bootloader packages for Raspberry Pi 4
%package firmware
Summary: Raspberry Pi 4 EEPROM firmware blobs
Group: System/Boot
Provides: raspberrypi-firmware-eeprom = %{version}
Obsoletes: raspberrypi-firmware-eeprom < %{version}
Requires: raspberrypi-eeprom
BuildRequires: fdupes
%description firmware
First stage bootloader fimware blobs for Raspberry Pi 4
%prep
%autosetup -p1
%build
%install
mkdir -p %{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}
mkdir -p %{buildroot}/etc/default
install -m 644 rpi-eeprom-update-default %{buildroot}/etc/default/rpi-eeprom-update
mkdir -p %{buildroot}/%{_firmwaredir}/raspberrypi/bootloader
mv firmware/beta %{buildroot}/%{_firmwaredir}/raspberrypi/bootloader
mv firmware/critical %{buildroot}/%{_firmwaredir}/raspberrypi/bootloader
mv firmware/stable %{buildroot}/%{_firmwaredir}/raspberrypi/bootloader
cp -a firmware/latest %{buildroot}/%{_firmwaredir}/raspberrypi/bootloader
cp -a firmware/default %{buildroot}/%{_firmwaredir}/raspberrypi/bootloader
%fdupes -s %{buildroot}/%{_firmwaredir}/raspberrypi/bootloader
%files
%license LICENSE
%{_bindir}/rpi-eeprom-config
%{_bindir}/rpi-eeprom-digest
%{_bindir}/rpi-eeprom-update
%config /etc/default/rpi-eeprom-update
%files firmware
%{_firmwaredir}
%{_firmwaredir}/raspberrypi
%{_firmwaredir}/raspberrypi/bootloader/beta
%{_firmwaredir}/raspberrypi/bootloader/critical
%{_firmwaredir}/raspberrypi/bootloader/stable
%{_firmwaredir}/raspberrypi/bootloader/latest
%{_firmwaredir}/raspberrypi/bootloader/default
%changelog

View File

@ -0,0 +1,58 @@
From 462564a95da99016969128dedc6b14ea66b12b17 Mon Sep 17 00:00:00 2001
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
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 and third '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.
[tobijk]: Add hunk for third string replacement
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Tobias Klausmann <tobias.klausmann@freenet.de>
---
rpi-eeprom-update | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/rpi-eeprom-update b/rpi-eeprom-update
index cb25316..431f24f 100755
--- a/rpi-eeprom-update
+++ b/rpi-eeprom-update
@@ -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 -maxdepth 3 -samefile "${blconfig_ofnode_path}" 2>/dev/null)
if [ -e "${blconfig_ofnode_link}" ]; then
@@ -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
- 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.39.1