65 lines
2.8 KiB
Bash
65 lines
2.8 KiB
Bash
# Template file for 'rpi-firmware'
|
|
pkgname=rpi-firmware
|
|
version=20240725
|
|
revision=1
|
|
_rpi_fw=571e78a2129578784e81a4312468bb92cc8d623d
|
|
_rpi_brcm=e7a3454d5d5983bdb7e9c7d02d8fc21ee8ff0d96
|
|
_rpi_bt=78d6a07730e2d20c035899521ab67726dc028e1c
|
|
create_wrksrc=yes
|
|
archs="aarch64* armv6l* armv7l*"
|
|
short_desc="Firmware files for the Raspberry Pi"
|
|
maintainer="classabbyamp <void@placeviolette.net>"
|
|
license="BSD-3-Clause, custom:Cypress"
|
|
homepage="https://github.com/raspberrypi/firmware"
|
|
distfiles="
|
|
https://github.com/raspberrypi/firmware/archive/${_rpi_fw}.tar.gz
|
|
https://github.com/RPi-Distro/firmware-nonfree/archive/${_rpi_brcm}.tar.gz
|
|
https://github.com/RPi-Distro/bluez-firmware/archive/${_rpi_bt}.tar.gz
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/LICENCE.cypress>LICENCE.cypress"
|
|
checksum="ba180b8508d79a5d4ca741bd1fc956eab664a82b2df422fced924e3324fe56c0
|
|
3652e9407baaf2617cf6f5e16f268ffe2848c7c46d2790f601ffb04a955ed953
|
|
56bcee9bac20720ceeef983949ba4d6b8d81c2f9602613232e642de547240841
|
|
ae0db6cc4db33941148df0f67de53e76a77b1b5a46b3165edb7040aa2750015f"
|
|
skip_extraction="LICENCE.cypress"
|
|
conf_files="/boot/cmdline.txt /boot/config.txt"
|
|
nostrip=yes
|
|
replaces="rpi-firmware-network>=0"
|
|
|
|
do_install() {
|
|
# bootloader
|
|
vlicense "firmware-${_rpi_fw}/boot/LICENCE.broadcom"
|
|
rm -rf "firmware-${_rpi_fw}/boot/"*.img \
|
|
"firmware-${_rpi_fw}/boot/overlays" \
|
|
"firmware-${_rpi_fw}/boot/"*.dtb \
|
|
"firmware-${_rpi_fw}/boot/COPYING.linux" \
|
|
"firmware-${_rpi_fw}/boot/LICENCE.broadcom"
|
|
|
|
vmkdir boot
|
|
vcopy "firmware-${_rpi_fw}/boot/*" boot
|
|
|
|
# Install configuration files.
|
|
vinstall "${FILESDIR}/cmdline.txt" 644 boot
|
|
vinstall "${FILESDIR}/config.txt" 644 boot
|
|
|
|
# firmware
|
|
# we can use either the -standard or -minimal 43455 file so use standard by default
|
|
ln -sfv cyfmac43455-sdio-standard.bin "firmware-nonfree-${_rpi_brcm}/debian/config/brcm80211/cypress/cyfmac43455-sdio.bin"
|
|
vlicense "${XBPS_SRCDISTDIR}/${pkgname}-${version}/LICENCE.cypress"
|
|
|
|
# add original Pi Foundation firmware files
|
|
# install deref's symlinks and copies a whole file, which makes rpi use duplicated variants specifically from downstream firmware
|
|
install -Dm644 \
|
|
"firmware-nonfree-${_rpi_brcm}/debian/config/brcm80211/brcm/"brcmfmac*raspberrypi* \
|
|
-t "${DESTDIR}/usr/lib/firmware/brcm"
|
|
|
|
# but 43436/43436s/43456 is not in linux-firmware, so copy it normally
|
|
vcopy "firmware-nonfree-${_rpi_brcm}/debian/config/brcm80211/brcm/brcmfmac43456"* usr/lib/firmware/brcm
|
|
vcopy "firmware-nonfree-${_rpi_brcm}/debian/config/brcm80211/brcm/brcmfmac43436"* usr/lib/firmware/brcm
|
|
|
|
vcopy "bluez-firmware-${_rpi_bt}/debian/firmware/broadcom/"*.hcd usr/lib/firmware/brcm
|
|
|
|
vmkdir usr/lib/firmware/synaptics
|
|
vcopy "bluez-firmware-${_rpi_bt}/debian/firmware/synaptics/"*.hcd usr/lib/firmware/synaptics
|
|
vlicense "bluez-firmware-${_rpi_bt}/debian/firmware/synaptics/LICENSE.synaptics"
|
|
}
|