pmaports/device/community/firmware-qcom-adreno/APKBUILD
Minecrell d90dc7d4b3
community/firmware-qcom-adreno: new aport (MR 2625)
Add a new firmware-qcom-adreno APKBUILD that packages the GPU firmware
from upstream linux-firmware as separate packages. It is basically
a minimal replacement for linux-firmware-qcom that allows saving rootfs
space by installing only the firmware that is really relevant for the
device.

[ci:skip-build] already built successfully in CI
2021-10-23 14:32:53 -07:00

41 lines
1.4 KiB
Text

pkgname=firmware-qcom-adreno
pkgver=20210919
pkgrel=0
pkgdesc="Qualcomm Adreno GPU firmware from linux-firmware"
url="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/"
arch="aarch64 armv7"
license="custom"
subpackages="$pkgname-doc"
source="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-$pkgver.tar.gz"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
builddir="$srcdir/linux-firmware-$pkgver"
# This package is a replacement for linux-firmware-qcom (packaging all GPU firmware
# in separate subpackages), so it's packaged in /qcom, not /postmarketos.
replaces="linux-firmware-qcom"
_fwdir="/lib/firmware/qcom"
_gpus="a300 a530 a630 a650 a660"
for gpu in $_gpus; do
subpackages="$subpackages $pkgname-$gpu:_gpu"
done
package() {
install -Dm644 LICENSE.qcom "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
install -Dm644 qcom/NOTICE.txt "$pkgdir"/usr/share/licenses/$pkgname/NOTICE
}
_gpu() {
local gpu=${subpkgname##$pkgname-}
pkgdesc="$pkgdesc ($gpu)"
install -Dm644 "$builddir"/qcom/$gpu* -t "$subpkgdir/$_fwdir"/
# Drop _zap shader firmware because that is typically signed
# and therefore device-specific.
rm -f "$subpkgdir/$_fwdir/$gpu"_zap*
}
sha512sums="
94628158011e65dd65225e687823fc3611b2b2d431b3484a66108959c7fafbcdc0a7be73b7b9e1d1a2d62d40cb7bd81e33d96d822a7b159adc15894607a76a31 linux-firmware-20210919.tar.gz
"