void-packages/srcpkgs/rpi-firmware/template

83 lines
3.1 KiB
Bash

# Template file for 'rpi-firmware'
_githash="62efc6a69d4e717bf2833c649d622c8298a37e9c"
_gitshort="${_githash:0:7}"
pkgname=rpi-firmware
version=20220823
revision=2
archs="armv6l* armv7l* aarch64*"
provides="linux-firmware-broadcom-${version}_${revision}"
replaces="linux-firmware-broadcom>=0"
short_desc="Firmware files for the Raspberry Pi (git ${_gitshort})"
maintainer="Piraty <piraty1@inbox.ru>"
license="BSD-3-Clause, custom:Cypress"
homepage="https://github.com/raspberrypi/firmware"
distfiles="https://github.com/raspberrypi/firmware/archive/${_githash}.tar.gz"
checksum=3fc5ab7155bde7221245f439971217558300dcbc988ade861cfef4e737de9909
conf_files="/boot/cmdline.txt /boot/config.txt"
nostrip=yes
do_install() {
rm -f boot/*.img
rm -rf boot/overlays
rm -f boot/*.dtb
rm -f boot/COPYING.linux
vlicense boot/LICENCE.broadcom
rm -f boot/LICENCE.broadcom
vmkdir boot
cp -R boot/* ${DESTDIR}/boot
# Install configuration files.
vinstall ${FILESDIR}/cmdline.txt 644 boot
vinstall ${FILESDIR}/config.txt 644 boot
$XBPS_FETCH_CMD https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/buster/LICENCE.cypress
vlicense LICENCE.cypress
# Firmware for rpi3 b and zero wifi chip
for f in bin txt; do
$XBPS_FETCH_CMD https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/buster/brcm/brcmfmac43430-sdio.${f}
vinstall brcmfmac43430-sdio.${f} 0644 usr/lib/firmware/brcm
done
# Firmware for rpi3 b and zero bluetooth chip
$XBPS_FETCH_CMD https://raw.githubusercontent.com/RPi-Distro/bluez-firmware/master/broadcom/BCM43430A1.hcd
vinstall BCM43430A1.hcd 0644 usr/lib/firmware/brcm
# Firmware for rpi3 b+ wifi chip
for f in bin txt clm_blob; do
$XBPS_FETCH_CMD https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/buster/brcm/brcmfmac43455-sdio.${f}
vinstall brcmfmac43455-sdio.${f} 0644 usr/lib/firmware/brcm
done
# Firmware for rpi3 b+ bluetooth chip
$XBPS_FETCH_CMD https://raw.githubusercontent.com/RPi-Distro/bluez-firmware/master/broadcom/BCM4345C0.hcd
vinstall BCM4345C0.hcd 0644 usr/lib/firmware/brcm
# Firmware for rpi zero 2w wifi chip
for f in bin txt clm_blob; do
$XBPS_FETCH_CMD https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/buster/brcm/brcmfmac43436-sdio.${f}
vinstall brcmfmac43436-sdio.${f} 0644 usr/lib/firmware/brcm
done
for f in bin txt; do
$XBPS_FETCH_CMD https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/buster/brcm/brcmfmac43436s-sdio.${f}
vinstall brcmfmac43436s-sdio.${f} 0644 usr/lib/firmware/brcm
done
# Firmware for rpi4/rpi400 wifi chip
for f in bin txt clm_blob; do
$XBPS_FETCH_CMD https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/buster/brcm/brcmfmac43456-sdio.${f}
vinstall brcmfmac43456-sdio.${f} 0644 usr/lib/firmware/brcm
done
# Firmware for rpi4/rpi400 bluetooth chip
$XBPS_FETCH_CMD https://raw.githubusercontent.com/RPi-Distro/bluez-firmware/master/broadcom/BCM4345C5.hcd
vinstall BCM4345C5.hcd 0644 usr/lib/firmware/brcm
$XBPS_FETCH_CMD https://raw.githubusercontent.com/RPi-Distro/bluez-firmware/master/broadcom/BCM43430B0.hcd
vinstall BCM43430B0.hcd 0644 usr/lib/firmware/brcm
}