1d923c2aeb
Unfortunately, at the moment MSM8916 devices always have to install all of linux-firmware-qcom (~ 60 MiB) when they actually just use ~ 0.008 MiB of GPU firmware in there. Everything else is just big firmware blobs for other SoCs that are never going to be useful. It's much more efficient to package the necessary firmware separately to save rootfs space. The DB410c linux-board-support-package contains all the firmware from linux-firmware as well, so we can easily package it as part of the firmware-qcom-db410c package. This commit makes the following changes to firmware-qcom-db410c: 1. Package venus() firmware that was previously installed from linux-firmware-qcom. GPU firmware is packaged in firmware-qcom-adreno. 2. Use new firmware paths for DB410c that were applied upstream 3. "Squash" the firmware blobs to a single file using pil-squasher
81 lines
2.7 KiB
Text
81 lines
2.7 KiB
Text
pkgname=firmware-qcom-db410c
|
|
pkgver=1034.2.1
|
|
pkgrel=2
|
|
pkgdesc="Firmware for DragonBoard 410c"
|
|
url="https://releases.linaro.org/96boards/dragonboard410c/qualcomm/firmware/"
|
|
subpackages="
|
|
$pkgname-doc
|
|
$pkgname-wcnss $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.* ::image/wcnss.* "$builddir"
|
|
}
|
|
|
|
build() {
|
|
pil-squasher wcnss.mbn wcnss.mdt
|
|
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/
|
|
}
|
|
|
|
wcnss() {
|
|
pkgdesc="DragonBoard 410c WiFi/BT firmware"
|
|
|
|
# Use this firmware by default for devices that can use unsigned firmware
|
|
provides="firmware-qcom-msm8916-wcnss"
|
|
provider_priority=100
|
|
|
|
install -Dm644 "$builddir"/wcnss.mbn -t "$subpkgdir/$_fwdir"/apq8016/
|
|
|
|
# Still link to old location in case this is installed on other devices
|
|
mkdir -p "$subpkgdir"/lib/firmware/postmarketos
|
|
ln -s "$_fwdir"/apq8016/wcnss.mbn "$subpkgdir"/lib/firmware/postmarketos/wcnss.mdt
|
|
}
|
|
|
|
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="4b5d0250552ff3b0a55af9395e62064299a1240f22a5f50383de95723db964351412fa2b38f24fe73fdeb613366e0eb6b3c335600c238546db783ca84647e2d2 linux-board-support-package-r1034.2.1.zip"
|