PKGBUILDs/alarm/firmware-raspberrypi/PKGBUILD

64 lines
3 KiB
Bash
Raw Normal View History

# Maintainer: graysky <therealgraysky AT protonmail DOT com>
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
# Contributor: Ray Sherwin <sliick517d@gmail.com>
2017-09-10 16:06:48 +00:00
pkgname=firmware-raspberrypi
_firmcommit=6530f46881d338b7b8220aec4b51901d9985134e
_bluezcommit=a6d4105d0989103ea6384b65940c76add1914127
pkgver=20231006
pkgrel=1
2017-09-10 16:06:48 +00:00
pkgdesc="Additional firmware for Raspberry Pi"
2018-02-08 00:29:33 +00:00
arch=('any')
url="https://github.com/RPi-Distro/firmware-nonfree"
2017-09-10 16:06:48 +00:00
license=('custom')
makedepends=('git')
2017-09-10 16:06:48 +00:00
options=('!strip')
source=("git+https://github.com/RPi-Distro/firmware-nonfree.git#commit=$_firmcommit"
# support for which device?
"BCM4345C5.hcd::https://github.com/RPi-Distro/bluez-firmware/raw/$_bluezcommit/broadcom/BCM4345C5.hcd"
# bluetooth for RPi3+
"BCM43430A1.hcd::https://github.com/RPi-Distro/bluez-firmware/raw/$_bluezcommit/broadcom/BCM43430A1.hcd"
"BCM4345C0.hcd::https://github.com/RPi-Distro/bluez-firmware/raw/$_bluezcommit/broadcom/BCM4345C0.hcd"
# bluetooth for Zero 2 W
"BCM43430B0.hcd::https://github.com/RPi-Distro/bluez-firmware/raw/$_bluezcommit/broadcom/BCM43430B0.hcd"
2019-03-21 23:32:31 +00:00
'RPi-WM8804.conf')
sha256sums=('SKIP'
'fb9f4ec2df5301bd35f416384e103c012c5983024c49aa72fbbaf90177512caa'
'c096ad4a5c3f06ed7d69eba246bf89ada9acba64a5b6f51b1e9c12f99bb1e1a7'
'51c45e77ddad91a19e96dc8fb75295b2087c279940df2634b23baf71b6dea42c'
'338c2c6631131f516bfc7e64ef0872bd0402e1f98ef9d0c900eef0c814d90a25'
2019-03-21 23:32:31 +00:00
'f978fbc40db75ba3213a4472023496d0716706eb1a6f078f207ac027c5753f43')
2017-09-10 16:06:48 +00:00
package() {
_FWPATH=firmware-nonfree/debian/config/brcm80211
# https://github.com/RPi-Distro/firmware-nonfree/issues/26
unlink "$srcdir/$_FWPATH/brcm/brcmfmac43455-sdio.bin"
# install cypress dir and symlink cyfmac43455-sdio-standard.bin which debian
# packaging does, see README.txt in /cypress and comments in this commit:
# https://github.com/RPi-Distro/firmware-nonfree/commit/3b108c864428dda9f9833cf3346f438552d08cea
install -d "$srcdir/$_FWPATH/cypress" "$pkgdir"/usr/lib/firmware/updates/cypress/
install -m 0644 "$srcdir/$_FWPATH/cypress/"* "$pkgdir"/usr/lib/firmware/updates/cypress
cd "$pkgdir"/usr/lib/firmware/updates/cypress
# we can use either the -standard or -minimal files so use standard by default
ln -s cyfmac43455-sdio-standard.bin cyfmac43455-sdio.bin
cd "$srcdir"
install -d "$pkgdir"/usr/lib/firmware/updates/brcm "$pkgdir"/usr/share/alsa/cards/
install -m 0644 *.hcd "$pkgdir"/usr/lib/firmware/updates/brcm
install -m 0644 RPi-WM8804.conf "$pkgdir"/usr/share/alsa/cards/
cp -r "$srcdir/$_FWPATH/brcm/"* "$pkgdir"/usr/lib/firmware/updates/brcm
# make some symbolic links
cd "$pkgdir"/usr/lib/firmware/updates/brcm
ln -s brcmfmac43456-sdio.txt brcmfmac43456-sdio.pine64-pinephone-pro.txt
ln -s BCM43430B0.hcd BCM.hcd
# rpi5 symlink is broken
unlink "$pkgdir/usr/lib/firmware/updates/brcm/brcmfmac43455-sdio.raspberrypi,5-model-b.bin"
ln -s ../cypress/cyfmac43455-sdio.bin brcmfmac43455-sdio.raspberrypi,5-model-b.bin
2017-09-10 16:06:48 +00:00
}