From 8f40636ae69c71ab64260bf3cfe62b3235a26d2b8b8d6ee645561a9a2114eedc Mon Sep 17 00:00:00 2001 From: Guillaume GARDET Date: Mon, 25 Jan 2021 10:13:01 +0000 Subject: [PATCH] Accepting request 866520 from home:nsaenzjulienne:branches:hardware:boot - Update to latest version, and delete 'get-config-from-dt.patch' since it's now upstream - Address Guillaume's comments about python OBS-URL: https://build.opensuse.org/request/show/866520 OBS-URL: https://build.opensuse.org/package/show/hardware:boot/raspberrypi-eeprom?expand=0&rev=1 --- .gitattributes | 23 ++++++ .gitignore | 1 + add-suse-config.patch | 25 +++++++ dont-use-env.patch | 23 ++++++ get-from-git.sh | 31 ++++++++ raspberrypi-eeprom-2021.01.21.tar.bz2 | 3 + raspberrypi-eeprom.changes | 4 + raspberrypi-eeprom.spec | 104 ++++++++++++++++++++++++++ 8 files changed, 214 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 add-suse-config.patch create mode 100644 dont-use-env.patch create mode 100644 get-from-git.sh create mode 100644 raspberrypi-eeprom-2021.01.21.tar.bz2 create mode 100644 raspberrypi-eeprom.changes create mode 100644 raspberrypi-eeprom.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/add-suse-config.patch b/add-suse-config.patch new file mode 100644 index 0000000..878d77f --- /dev/null +++ b/add-suse-config.patch @@ -0,0 +1,25 @@ +From d1d1945ef34cab5ff0d41eda2e08266f417be3dc Mon Sep 17 00:00:00 2001 +From: Nicolas Saenz Julienne +Date: Fri, 22 Jan 2021 16:54:49 +0100 +Subject: [PATCH] Add suse config + +Signed-off-by: Nicolas Saenz Julienne +--- + 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 + diff --git a/dont-use-env.patch b/dont-use-env.patch new file mode 100644 index 0000000..8890f37 --- /dev/null +++ b/dont-use-env.patch @@ -0,0 +1,23 @@ +From e28936a8fa34346727b229e7366960e508545cf0 Mon Sep 17 00:00:00 2001 +From: Nicolas Saenz Julienne +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 +--- + 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 python ++#!/usr/bin/python3 + + """ + rpi-eeprom-config +-- +2.30.0 + diff --git a/get-from-git.sh b/get-from-git.sh new file mode 100644 index 0000000..c9bb89c --- /dev/null +++ b/get-from-git.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# this is a huge hunk of stuff, so reuse the local repo if possible +if [ -d rpi-eeprom/.git ]; then + cd rpi-eeprom + git pull + cd .. +else + set -e + git clone --depth 1 https://github.com/raspberrypi/rpi-eeprom.git + set +e +fi + +TOPDIR=$(pwd) +SOURCES="rpi-eeprom-* firmware LICENSE" +cd rpi-eeprom +LINE=$(git log --format=format:"%h %ai" -- ${SOURCES}|head -n 1) +set -- $LINE +REV=$1 +DATE=$2 +VER=${DATE//-/.} +set -e +git archive --prefix=raspberrypi-eeprom-$VER/ -o $TOPDIR/raspberrypi-eeprom-${VER}.tar master -- ${SOURCES} +cd $TOPDIR +osc rm -f raspberrypi-eeprom-*.tar.bz2 || true +bzip2 --force raspberrypi-eeprom-${VER}.tar +osc add raspberrypi-eeprom-${VER}.tar.bz2 +sed -i "s/^Version:.*/Version: $VER/" raspberrypi-eeprom.spec +osc vc raspberrypi-eeprom -m "Update to $REV ($DATE)" +osc service localrun format_spec_file + diff --git a/raspberrypi-eeprom-2021.01.21.tar.bz2 b/raspberrypi-eeprom-2021.01.21.tar.bz2 new file mode 100644 index 0000000..1519071 --- /dev/null +++ b/raspberrypi-eeprom-2021.01.21.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a8fb2c186dd92a52b6a9a255c75fc0ccea6fbc5be5e5393e4b307bbe6ddee5 +size 5210072 diff --git a/raspberrypi-eeprom.changes b/raspberrypi-eeprom.changes new file mode 100644 index 0000000..864451a --- /dev/null +++ b/raspberrypi-eeprom.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Fri Jan 22 14:15:38 UTC 2021 - Nicolas Patricio Saenz Julienne + +- First commit diff --git a/raspberrypi-eeprom.spec b/raspberrypi-eeprom.spec new file mode 100644 index 0000000..cebc11d --- /dev/null +++ b/raspberrypi-eeprom.spec @@ -0,0 +1,104 @@ +# +# spec file for package raspberrypi-eeprom +# +# Copyright (c) 2021 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/ +# + + +Name: raspberrypi-eeprom +Version: 2021.01.21 +Release: 0 +Summary: Raspberry Pi 4 EEPROM firmware +License: SUSE-Firmware +Group: System/Boot +URL: https://github.com/raspberrypi/rpi-eeprom +Source0: raspberrypi-eeprom-%{version}.tar.bz2 +Source1: get-from-git.sh +Patch0: add-suse-config.patch +Patch1: dont-use-env.patch +Provides: rpi-eeprom +Supplements: modalias(of:N*T*Cbrcm,bcm2711*C*) +Requires: raspberrypi-eeprom-tools +Requires: raspberrypi-firmware >= 2021.01.21 +Requires: raspberrypi-firmware-dt >= 2020.12.07 +BuildArch: noarch + +%description +First stage bootloader packages for Raspberry Pi 4 + +%package tools +Summary: Raspberry Pi 4 EEPROM firmware update and configuration tools +License: BSD-3-Clause +Group: System/Boot +Provides: rpi-eeprom-config = %{version} +Obsoletes: rpi-eeprom-config < %{version} +Requires: raspberrypi-eeprom +Requires: raspberrypi-eeprom-firmware + +%description tools +First stage bootloader fimware upgrade and configuration for Raspberry Pi 4 + +%package firmware +Summary: Raspberry Pi 4 EEPROM firmware blobs +License: SUSE-Firmware +Group: System/Boot +Provides: raspberrypi-firmware-eeprom = %{version} +Obsoletes: raspberrypi-firmware-eeprom < %{version} +Requires: raspberrypi-eeprom +Requires: raspberrypi-eeprom-tools +BuildRequires: fdupes + +%description firmware +First stage bootloader fimware blobs for Raspberry Pi 4 + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 + +%build + +%install +mkdir -p %{buildroot}%{_bindir} +install -m 0755 rpi-eeprom-config %{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}/lib/firmware/raspberrypi/bootloader +mv firmware/beta %{buildroot}/lib/firmware/raspberrypi/bootloader +mv firmware/critical %{buildroot}/lib/firmware/raspberrypi/bootloader +mv firmware/stable %{buildroot}/lib/firmware/raspberrypi/bootloader +cp -a firmware/latest %{buildroot}/lib/firmware/raspberrypi/bootloader +cp -a firmware/default %{buildroot}/lib/firmware/raspberrypi/bootloader +%fdupes -s %{buildroot}/lib/firmware/raspberrypi/bootloader + +%files +%license LICENSE + +%files tools +%{_bindir}/rpi-eeprom-config +%{_bindir}/rpi-eeprom-update +%config /etc/default/rpi-eeprom-update + +%files firmware +/lib/firmware/ +/lib/firmware/raspberrypi +/lib/firmware/raspberrypi/bootloader/beta +/lib/firmware/raspberrypi/bootloader/critical +/lib/firmware/raspberrypi/bootloader/stable +/lib/firmware/raspberrypi/bootloader/latest +/lib/firmware/raspberrypi/bootloader/default + +%changelog