pmaports/device/community/firmware-qcom-db410c/APKBUILD
Minecrell ac86b5e760
community/firmware-qcom-db410c: upgrade to 1036.1 (except -wcnss) (MR 3163)
While the newer "Linux board support package" has newer versions for
the "modem" and "venus" firmware, the "wcnss" firmware is actually
older than the one in the previous 1034.2.1 release. To avoid
downgrading it, it is still packaged from the old release in a separate
APKBUILD. (It is probably also better tested than the new release...)

[ci:skip-vercheck]: non-zero pkgrel is intended to match old package
[ci:skip-build] already built successfully in CI
2022-06-01 21:12:32 -07:00

71 lines
2.3 KiB
Text

pkgname=firmware-qcom-db410c
pkgver=1036.1
pkgrel=0
pkgdesc="Firmware for DragonBoard 410c"
url="https://releases.linaro.org/96boards/dragonboard410c/qualcomm/firmware/"
subpackages="
$pkgname-doc
$pkgname-wcnss-nv:wcnss_nv
$pkgname-modem
$pkgname-venus
"
arch="aarch64 armv7"
license="custom"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
makedepends="mtools pil-squasher"
source="https://releases.linaro.org/96boards/dragonboard410c/qualcomm/firmware/linux-board-support-package-r$pkgver.zip"
builddir="$srcdir/linux-board-support-package-r$pkgver"
# This package is a replacement for linux-firmware-qcom (packaging only necessary
# firmware plus some missing ones), so it's packaged in /qcom, not /postmarketos.
replaces="linux-firmware-qcom"
_fwdir="/lib/firmware/qcom"
unpack() {
default_unpack
# Extract firmware files from FAT file system image
mcopy -i "$builddir"/bootloaders-linux/NON-HLOS.bin -p -m -v \
::image/mba.mbn ::image/modem.* "$builddir"
}
build() {
pil-squasher modem.mbn modem.mdt
pil-squasher venus.mbn proprietary-linux/venus.mdt
}
package() {
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
install -Dm644 NOTICE.txt "$pkgdir"/usr/share/licenses/$pkgname/NOTICE
}
modem() {
pkgdesc="DragonBoard 410c modem firmware"
install -Dm644 "$builddir"/mba.mbn -t "$subpkgdir/$_fwdir"/apq8016/
install -Dm644 "$builddir"/modem.mbn -t "$subpkgdir/$_fwdir"/apq8016/
}
# For some reason the wcnss firmware in r1036.1 is actually older than the one
# in r1034.2.1, so firmware-qcom-db410c-wcnss is packaged separately.
wcnss_nv() {
pkgdesc="DragonBoard 410c WiFi/BT firmware configuration"
install -Dm644 "$builddir"/proprietary-linux/wlan/prima/WCNSS_qcom_wlan_nv.bin \
"$subpkgdir/$_fwdir"/apq8016/WCNSS_qcom_wlan_nv_sbc.bin
}
venus() {
pkgdesc="DragonBoard 410c video firmware"
# Use this firmware by default for devices that can use unsigned firmware
provides="firmware-qcom-msm8916-venus"
provider_priority=100
# Linux detects squashed (.mbn) vs non-squashed (.mdt + .b*) based on
# file contents, so it is fine to install venus.mbn to venus.mdt
install -Dm644 "$builddir"/venus.mbn "$subpkgdir/$_fwdir"/venus-1.8/venus.mdt
}
sha512sums="
99316352669c488b26d93353e0408c0b761809f41b9e13630fdf4de393e36f72477847bd2f8e893e8c98bb94c82a615d3fc4a615db1055df7314269c514bae0e linux-board-support-package-r1036.1.zip
"