pmaports/device/community/firmware-bq-picmt/APKBUILD
Minecrell 3193027687
community/firmware-bq-picmt: squash firmware blobs (MR 2619)
Strictly speaking firmware-bq-picmt is not needed anymore because
the msm-firmware-loader can be used to load the picmt firmware from
the firmware partitions. However, this package contains quite recent,
largely unmodified firmware from Qualcomm so it still seems useful
to keep if someone wants to test more recent firmware on some other
device (provided that their device does not verify firmware signatures).

To make this firmware package consistent with firmware-qcom-db410c,
squash the firmware blobs using pil-squasher so only one file needs
to be loaded rather than many small ones.
2021-10-23 14:41:29 -07:00

62 lines
1.8 KiB
Text

pkgname=firmware-bq-picmt
pkgver=3
pkgrel=0
_commit="04cced17ab21d84ea6145e58f0b12fd67ef640d0"
pkgdesc="Firmware for BQ Aquaris X5"
url="https://github.com/JonnyMe/picmt-firmware"
subpackages="$pkgname-modem $pkgname-venus $pkgname-wcnss $pkgname-wcnss-nv:wcnss_nv"
arch="aarch64 armv7"
license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
makedepends="pil-squasher"
source="https://github.com/JonnyMe/picmt-firmware/raw/$_commit/picmt_firmware_files.tar.xz"
_fwdir="/lib/firmware/postmarketos"
build() {
pil-squasher wcnss.mbn wcnss.mdt
pil-squasher modem.mbn modem.mdt
# venus.mbn exists already but seems a bit different
pil-squasher venus2.mbn venus.mdt
}
package() {
# parent package is empty
mkdir -p "$pkgdir"
}
modem() {
pkgdesc="BQ Aquaris X5 modem firmware"
install -Dm644 "$srcdir"/modem.mbn "$subpkgdir/$_fwdir"/modem.mdt
install -Dm644 "$srcdir"/mba.mbn "$subpkgdir/$_fwdir"/mba.mbn
}
venus() {
pkgdesc="BQ Aquaris X5 video firmware"
provides="firmware-qcom-msm8916-venus"
# 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 "$srcdir"/venus2.mbn "$subpkgdir/$_fwdir"/qcom/venus-1.8/venus.mdt
}
wcnss() {
pkgdesc="BQ Aquaris X5 WiFi/BT firmware"
provides="firmware-qcom-msm8916-wcnss"
install -Dm644 "$srcdir"/wcnss.mbn "$subpkgdir/$_fwdir"/wcnss.mdt
}
wcnss_nv() {
pkgdesc="BQ Aquaris X5 WiFi/BT firmware configuration"
case "$CARCH" in
# WCNSS_cfg.dat etc are only needed on downstream (armv7)
armv7) files="WCNSS_*" ;;
*) files="WCNSS_qcom_wlan_nv.bin" ;;
esac
install -Dm644 "$srcdir"/$files -t "$subpkgdir/$_fwdir"/wlan/prima
}
sha512sums="7f426e5fdb20319ed22c16be1ce13d069532bdfb8dc754a735c2a019342758b1f0210614dfeaa1d850802083a550ec8a6931d3572d203267cae8ec59f6613d82 picmt_firmware_files.tar.xz"