diff --git a/README.md b/README.md index 91f00a6..dc721a6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # rpi-eeprom +Raspberry Pi4 boot EEPROM updater. + diff --git a/rpi-eeprom-0.20200209git-rpi-eprom-update.patch b/rpi-eeprom-0.20200209git-rpi-eprom-update.patch new file mode 100644 index 0000000..2eaf7cb --- /dev/null +++ b/rpi-eeprom-0.20200209git-rpi-eprom-update.patch @@ -0,0 +1,8 @@ +--- rpi-eeprom-update.clean 2019-11-23 06:15:37.986151577 +0000 ++++ rpi-eeprom-update 2019-11-23 06:15:45.906017778 +0000 +@@ -1,4 +1,5 @@ + #!/bin/sh ++PATH="$PATH:/opt/vc/bin" + + # Raspberry Pi4 boot EEPROM updater. + diff --git a/rpi-eeprom.spec b/rpi-eeprom.spec new file mode 100644 index 0000000..cc123a0 --- /dev/null +++ b/rpi-eeprom.spec @@ -0,0 +1,66 @@ +Name: rpi-eeprom +Version: 0.20200209git +Release: 1mamba +Summary: Raspberry Pi4 boot EEPROM updater +Group: System/Kernel and Hardware +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://rpf.io/eeprom +## GITSOURCE https://github.com/raspberrypi/rpi-eeprom.git master +Source: https://github.com/raspberrypi/rpi-eeprom.git/master/rpi-eeprom-%{version}.tar.bz2 +Patch0: rpi-eeprom-0.20200209git-rpi-eprom-update.patch +License: BSD +## AUTOBUILDREQ-BEGIN +## AUTOBUILDREQ-END +ExclusiveArch: arm +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Raspberry Pi4 boot EEPROM updater. + +%prep +%setup -q +## Patch /opt/vc/bin into PATH in script due to weird install location of raspberrypi-firmware +%patch0 -p0 + +%build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +install -D -m 755 firmware/vl805 %{buildroot}%{_bindir}/vl805 +install -D -m 755 rpi-eeprom-config %{buildroot}%{_bindir}/rpi-eeprom-config +install -D -m 755 rpi-eeprom-update %{buildroot}%{_bindir}/rpi-eeprom-update + +# Copy all the firmware and files to the right place +install -d -m 755 %{buildroot}%{_prefix}/lib/firmware/raspberrypi/bootloader +cp -a firmware/* %{buildroot}%{_prefix}/lib/firmware/raspberrypi/bootloader + +# Copy the override in place +install -d -m 755 %{buildroot}%{_sysconfdir}/default +install -D -m 644 rpi-eeprom-update-default %{buildroot}%{_sysconfdir}/default/rpi-eeprom-update + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/default/rpi-eeprom-update +%{_bindir}/rpi-eeprom-config +%{_bindir}/rpi-eeprom-update +%{_bindir}/vl805 +%dir %{_prefix}/lib/firmware/raspberrypi +%dir %{_prefix}/lib/firmware/raspberrypi/bootloader +%dir %{_prefix}/lib/firmware/raspberrypi/bootloader/beta +%{_prefix}/lib/firmware/raspberrypi/bootloader/beta/*.bin +%dir %{_prefix}/lib/firmware/raspberrypi/bootloader/critical +%{_prefix}/lib/firmware/raspberrypi/bootloader/critical/*.bin +%{_prefix}/lib/firmware/raspberrypi/bootloader/raspberry_pi4_network_boot_beta.md +%{_prefix}/lib/firmware/raspberrypi/bootloader/release-notes.md +%{_prefix}/lib/firmware/raspberrypi/bootloader/vl805 +%doc LICENSE + +%changelog +* Sun Feb 09 2020 Silvan Calarco 0.20200209git-1mamba +- package created using the webbuild interface