raspberrypi-firmware/raspberrypi-firmware.spec

320 lines
10 KiB
RPMSpec

# the userspace libraries and devel files are now available in raspberrypi-userland
%define include_kernel 0
%define kernelver %(echo %version | cut -d. -f1-3)
%define gitdirver %(echo %version | cut -d. -f4-5)
Name: raspberrypi-firmware
Epoch: 1
Version: 5.15.30.1.20220328
Release: 1mamba
Summary: Boot firmware files (except kernel) for the Raspberry Pi
Group: System/Kernel and Hardware
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/raspberrypi/firmware
Source0: https://github.com/raspberrypi/firmware/archive/refs/tags/%{gitdirver}.zip
#Source0: git://github.com/raspberrypi/firmware.git/%{gitdirver}/firmware-%{version}.tar.bz2
Source1: raspberrypi-firmware-kernelconf.txt
Source2: raspberrypi-firmware-kernelcmdline.txt
Source10: raspberrypi-firmware-udev-vchiq-permissions
Source11: raspberrypi-firmware-ldconf
Source21: https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm80211/brcm/brcmfmac43430-sdio.txt
Source22: LICENSE.brcmfmac
Source24: brcmfmac43455-sdio.txt
License: GPL, LICENCE.broadcom
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
Requires: bluez-firmware >= 1.2.20210423git
Requires: pi-bluetooth
ExclusiveArch: arm aarch64
%systemd_requires
%description
%{summary}.
%package overlays
Group: System/Kernel and Hardware
Summary: Raspberry Pi firmware kernel overlays
Requires: raspberrypi-firmware = %{?epoch:%epoch:}%{version}-%{release}
%description overlays
Linux kernel v7 and modules for the Raspberry Pi.
%package -n kernel-raspberrypi
Group: System/Kernel and Hardware
Summary: Linux kernel files for the Raspberry Pi
Provides: raspberrypi-kernel = %{?epoch:%epoch:}%{version}-%{release}
Obsoletes: raspberrypi-kernel < 1:5.10.11.1.20210201
Provides: kernel-raspberrypi-modules
Obsoletes: kernel-raspberrypi-modules < 1:5.10.11.1.20210201
Requires: raspberrypi-firmware = %{?epoch:%epoch:}%{version}-%{release}
Requires: raspberrypi-firmware-overlays = %{?epoch:%epoch:}%{version}-%{release}
%description -n kernel-raspberrypi
Linux kernel files and modules for the Raspberry Pi.
%package -n kernel-raspberrypi-v7
Group: System/Kernel and Hardware
Summary: Linux kernel v7 and modules for the Raspberry Pi
Requires: raspberrypi-firmware = %{?epoch:%epoch:}%{version}-%{release}
Requires: raspberrypi-firmware-overlays = %{?epoch:%epoch:}%{version}-%{release}
%description -n kernel-raspberrypi-v7
Linux kernel v7 and modules for the Raspberry Pi.
%package -n kernel-raspberrypi-v7l
Group: System/Kernel and Hardware
Summary: Linux kernel v7l and modules for the Raspberry Pi
Requires: raspberrypi-firmware = %{?epoch:%epoch:}%{version}-%{release}
Requires: raspberrypi-firmware-overlays = %{?epoch:%epoch:}%{version}-%{release}
%description -n kernel-raspberrypi-v7l
Linux kernel v7l and modules for the Raspberry Pi.
%package -n kernel-raspberrypi-v8
Group: System/Kernel and Hardware
Summary: Linux kernel v8 and modules for the Raspberry Pi
Requires: raspberrypi-firmware = %{?epoch:%epoch:}%{version}-%{release}
Requires: raspberrypi-firmware-overlays = %{?epoch:%epoch:}%{version}-%{release}
%description -n kernel-raspberrypi-v8
Linux kernel v8 and modules for the Raspberry Pi.
%package -n kernel-raspberrypi-doc
Group: Documentation
Summary: Documentation for the Raspberry Pi Linux kernel
%description -n kernel-raspberrypi-doc
Documentation for the Raspberry Pi Linux kernel.
%prep
%setup -q -c
%define __os_install_post %{nil}
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
cd firmware-%{gitdirver}
# kernel + kernel modules + firmware
install -d %{buildroot}/boot
%if "%{include_kernel}" == "1"
install -d %{buildroot}/lib/modules
%ifarch aarch64
boot_klist="\
kernel8.img"
cp -R modules/%{kernelver}-v8+ %{buildroot}/lib/modules/
%endif
%ifarch arm
boot_klist="\
kernel.img
kernel7.img
kernel7l.img"
cp -R modules/%{kernelver}+ %{buildroot}/lib/modules/
cp -R modules/%{kernelver}-v7+ %{buildroot}/lib/modules/
cp -R modules/%{kernelver}-v7l+ %{buildroot}/lib/modules/
%endif
%endif
boot_flist="\
bootcode.bin
fixup*.dat
bcm*.dtb
LICENCE.broadcom
start*.elf"
for f in $boot_flist $boot_klist; do
install -m 644 boot/$f %{buildroot}/boot/
done
cp -a boot/overlays %{buildroot}/boot/overlays/
install -d %{buildroot}%{_datadir}/doc/raspberrypi-kernel
cp -R documentation/ilcomponents %{buildroot}%{_datadir}/doc/raspberrypi-kernel
install -d %{buildroot}/lib/firmware/brcm
install -D -m0644 %{SOURCE21} %{buildroot}/lib/firmware/brcm/brcmfmac43430-sdio.txt
install -D -m0644 %{SOURCE22} %{buildroot}/lib/firmware/LICENSE.brcmfmac
install -D -m0644 %{SOURCE24} %{buildroot}/lib/firmware/brcm/brcmfmac43455-sdio.txt
install %{S:1} %{buildroot}/boot/config.txt
install %{S:2} %{buildroot}/boot/cmdline.txt
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
%systemd_post brcm43438
:
%preun
%systemd_preun brcm43438
:
%postun
%systemd_postun brcm43438
:
%files
%defattr(-,root,root)
/boot/bootcode.bin
/boot/fixup*.dat
/boot/start*.elf
/boot/bcm2708-rpi-zero-w.dtb
/boot/bcm2708-rpi-zero.dtb
/boot/bcm2708-rpi-b.dtb
/boot/bcm2708-rpi-b-plus.dtb
/boot/bcm2708-rpi-b-rev1.dtb
/boot/bcm2708-rpi-cm.dtb
/boot/bcm2709-rpi-2-b.dtb
/boot/bcm2710-rpi-2-b.dtb
/boot/bcm2710-rpi-3-b.dtb
/boot/bcm2710-rpi-3-b-plus.dtb
/boot/bcm2710-rpi-cm3.dtb
/boot/bcm2710-rpi-zero-2-w.dtb
/boot/bcm2710-rpi-zero-2.dtb
/boot/bcm2711-rpi-4-b.dtb
/boot/bcm2711-rpi-cm4.dtb
/boot/bcm2711-rpi-cm4s.dtb
/boot/bcm2711-rpi-400.dtb
/boot/LICENCE.broadcom
%config(noreplace) /boot/config.txt
%config(noreplace) /boot/cmdline.txt
/lib/firmware/LICENSE.brcmfmac
/lib/firmware/brcm/brcmfmac43430-sdio.txt
/lib/firmware/brcm/brcmfmac43455-sdio.txt
%files overlays
%defattr(-,root,root)
%dir /boot/overlays
/boot/overlays/*.dtbo
/boot/overlays/overlay_map.dtb
/boot/overlays/README
%if "%{include_kernel}" == "1"
%ifarch arm
%files -n kernel-raspberrypi
%defattr(-,root,root)
/boot/kernel.img
%dir /lib/modules/%{kernelver}+
/lib/modules/%{kernelver}+/*
%files -n kernel-raspberrypi-v7
%defattr(-,root,root)
/boot/kernel7.img
%dir /lib/modules/%{kernelver}-v7+
/lib/modules/%{kernelver}-v7+/*
%files -n kernel-raspberrypi-v7l
%defattr(-,root,root)
/boot/kernel7l.img
%dir /lib/modules/%{kernelver}-v7l+
/lib/modules/%{kernelver}-v7l+/*
%endif
%ifarch aarch64
%files -n kernel-raspberrypi-v8
%defattr(-,root,root)
/boot/kernel8.img
%dir /lib/modules/%{kernelver}-v8+
/lib/modules/%{kernelver}-v8+/*
%endif
%endif
%files -n kernel-raspberrypi-doc
%defattr(-,root,root)
%{_datadir}/doc/raspberrypi-kernel
%changelog
* Sat Apr 02 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 5.15.30.1.20220328-1mamba
- update to 5.15.30.1.20220328
* Fri Apr 23 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 5.10.17.1.20210303-1mamba
- update to 5.10.17.1.20210303
- remove BCM43430A1.hcd but require recent bluez-firmware
- remove brcm43438 and requirement for hciattach-rpi but require pi-bluetooth
* Wed Mar 03 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 5.10.11.1.20210201-2mamba
- fix requirements for raspberrypi-firmware-overlays
* Wed Mar 03 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 5.10.11.1.20210201-1mamba
- update to 5.10.11.1.20210201
* Tue Nov 24 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 5.4.72.1.20201022-1mamba
- update to 5.4.72.1.20201022
* Thu Oct 01 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 5.4.1.20200902-1mamba
- update to 5.4.1.20200902
* Wed Mar 04 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 4.19.1.20200114-2mamba
- install brcmfmac43455-sdio.txt for rpi3/4 from raspbian
- use brcmfmac43430-sdio.bin from linux-firmware (to be checked)
* Sun Jan 26 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 4.19.1.20200114-1mamba
- update to 4.19.1.20200114
* Thu Jan 16 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 4.19.1.20190925-1mamba
- update to 4.19.1.20190925
* Fri Dec 07 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 4.14.1.20181112-1mamba
- update to 4.14.1.20181112
* Sun Jun 24 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.1.20180417-1mamba
- update to 4.4.1.20180417
* Thu Nov 10 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.1.20161020-2mamba
- modified config.txt to enable sound
* Thu Nov 10 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.1.20161020-1mamba
- update to 4.4.1.20161020
* Wed Jul 20 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.1.20160620-3mamba
- added bluetooth firmware, service script and requirement for rpi3
* Mon Jul 18 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.1.20160620-2mamba
- added wifi firmware brcmfmac43430 for rpi3
* Tue Jul 12 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.1.20160620-1mamba
- update to 4.4.1.20160620
* Sun Jul 10 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 1.20160620-1mamba
- update to 1.20160620
* Fri Feb 27 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 20150227git-1mamba
- update to 20150227git
- provide dtb devicetree files for rpi-b and rpi2-b plus overlays
* Sat Dec 06 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 20141206git-1mamba
- update to 20141206git
- don't include prebuilt kernel
* Mon Feb 17 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.6.11.20130425git-2mamba
- move boot firmware files to raspberrypi-firmware and require it in kernel-raspberrypi
* Thu Apr 25 2013 Davide Madrisan <davide.madrisan@gmail.com> 20130425git-1mamba
- update to 20130425git
* Tue Mar 05 2013 Davide Madrisan <davide.madrisan@gmail.com> 20130301git-3mamba
- rename the kernel subpackages to follow the openmamba schema
* Sun Mar 03 2013 Davide Madrisan <davide.madrisan@gmail.com> 20130301git-2mamba
- do not provide the userspace libraries by default; the source code is now available
* Fri Mar 01 2013 Davide Madrisan <davide.madrisan@gmail.com> 20130301git-1mamba
- update to 20130301git
* Sun Oct 28 2012 Davide Madrisan <davide.madrisan@gmail.com> 20121028git-1mamba
- updated from git
- remove raspberrypi-libs, raspberrypi-devel, and raspberrypi-utils
- new subpackage raspberrypi-kernel-doc
* Sat Oct 13 2012 Davide Madrisan <davide.madrisan@gmail.com> 20121013git-1mamba
- updated from git
* Fri Sep 21 2012 Davide Madrisan <davide.madrisan@gmail.com> 20120919git-2mamba
- add %{_sysconfdir}/udev/rules.d/10-vchiq-permissions.rules
* Wed Sep 19 2012 Davide Madrisan <davide.madrisan@gmail.com> 20120919git-1mamba
- package created by autospec