2020-06-08 13:25:14 +00:00
|
|
|
pkgname=firmware-qcom-db410c
|
2022-05-27 12:15:17 +00:00
|
|
|
pkgver=1036.1
|
2023-11-13 10:10:20 +00:00
|
|
|
pkgrel=1
|
2020-06-08 13:25:14 +00:00
|
|
|
pkgdesc="Firmware for DragonBoard 410c"
|
|
|
|
url="https://releases.linaro.org/96boards/dragonboard410c/qualcomm/firmware/"
|
2021-10-19 07:31:30 +00:00
|
|
|
subpackages="
|
|
|
|
$pkgname-doc
|
2022-05-27 12:15:17 +00:00
|
|
|
$pkgname-wcnss-nv:wcnss_nv
|
2021-10-19 07:31:30 +00:00
|
|
|
$pkgname-modem
|
|
|
|
$pkgname-venus
|
|
|
|
"
|
|
|
|
arch="aarch64 armv7"
|
2020-06-08 13:25:14 +00:00
|
|
|
license="custom"
|
|
|
|
options="!check !strip !archcheck !tracedeps pmb:cross-native"
|
2021-10-19 07:31:30 +00:00
|
|
|
makedepends="mtools pil-squasher"
|
2020-06-08 13:25:14 +00:00
|
|
|
source="https://releases.linaro.org/96boards/dragonboard410c/qualcomm/firmware/linux-board-support-package-r$pkgver.zip"
|
|
|
|
builddir="$srcdir/linux-board-support-package-r$pkgver"
|
|
|
|
|
2021-10-19 07:31:30 +00:00
|
|
|
# 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"
|
2020-06-08 13:25:14 +00:00
|
|
|
|
|
|
|
unpack() {
|
|
|
|
default_unpack
|
|
|
|
|
|
|
|
# Extract firmware files from FAT file system image
|
|
|
|
mcopy -i "$builddir"/bootloaders-linux/NON-HLOS.bin -p -m -v \
|
2022-05-27 12:15:17 +00:00
|
|
|
::image/mba.mbn ::image/modem.* "$builddir"
|
2021-10-19 07:31:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
pil-squasher modem.mbn modem.mdt
|
|
|
|
pil-squasher venus.mbn proprietary-linux/venus.mdt
|
2020-06-08 13:25:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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"
|
2021-10-19 07:31:30 +00:00
|
|
|
install -Dm644 "$builddir"/mba.mbn -t "$subpkgdir/$_fwdir"/apq8016/
|
|
|
|
install -Dm644 "$builddir"/modem.mbn -t "$subpkgdir/$_fwdir"/apq8016/
|
2020-06-08 13:25:14 +00:00
|
|
|
}
|
|
|
|
|
2022-05-27 12:15:17 +00:00
|
|
|
# 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.
|
2020-06-08 13:25:14 +00:00
|
|
|
|
|
|
|
wcnss_nv() {
|
|
|
|
pkgdesc="DragonBoard 410c WiFi/BT firmware configuration"
|
2021-10-19 07:31:30 +00:00
|
|
|
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
|
2023-11-13 10:10:20 +00:00
|
|
|
# file contents, so it is fine to link venus.mbn to venus.mdt
|
|
|
|
# Older kernels look for venus.mdt, newer ones directly for venus.mbn
|
|
|
|
install -Dm644 "$builddir"/venus.mbn "$subpkgdir/$_fwdir"/venus-1.8/venus.mbn
|
|
|
|
ln -s venus.mbn "$subpkgdir/$_fwdir"/venus-1.8/venus.mdt
|
2020-06-08 13:25:14 +00:00
|
|
|
}
|
|
|
|
|
2022-05-27 12:15:17 +00:00
|
|
|
sha512sums="
|
|
|
|
99316352669c488b26d93353e0408c0b761809f41b9e13630fdf4de393e36f72477847bd2f8e893e8c98bb94c82a615d3fc4a615db1055df7314269c514bae0e linux-board-support-package-r1036.1.zip
|
|
|
|
"
|