2020-04-08 10:32:40 +00:00
|
|
|
pkgname=firmware-bq-picmt
|
2021-10-19 07:51:10 +00:00
|
|
|
pkgver=3
|
2022-10-30 12:50:01 +00:00
|
|
|
pkgrel=1
|
2020-06-08 20:25:00 +00:00
|
|
|
_commit="04cced17ab21d84ea6145e58f0b12fd67ef640d0"
|
2020-04-15 07:57:10 +00:00
|
|
|
pkgdesc="Firmware for BQ Aquaris X5"
|
2020-04-08 10:32:40 +00:00
|
|
|
url="https://github.com/JonnyMe/picmt-firmware"
|
2020-06-08 20:25:00 +00:00
|
|
|
subpackages="$pkgname-modem $pkgname-venus $pkgname-wcnss $pkgname-wcnss-nv:wcnss_nv"
|
2020-04-15 07:57:10 +00:00
|
|
|
arch="aarch64 armv7"
|
2020-04-08 10:32:40 +00:00
|
|
|
license="proprietary"
|
2020-06-08 20:25:00 +00:00
|
|
|
options="!check !strip !archcheck !tracedeps pmb:cross-native"
|
2021-10-19 07:51:10 +00:00
|
|
|
makedepends="pil-squasher"
|
2020-06-08 20:25:00 +00:00
|
|
|
source="https://github.com/JonnyMe/picmt-firmware/raw/$_commit/picmt_firmware_files.tar.xz"
|
2020-04-08 10:32:40 +00:00
|
|
|
|
|
|
|
_fwdir="/lib/firmware/postmarketos"
|
|
|
|
|
2021-10-19 07:51:10 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2020-04-08 10:32:40 +00:00
|
|
|
package() {
|
2020-04-15 07:57:10 +00:00
|
|
|
# parent package is empty
|
2020-04-08 10:32:40 +00:00
|
|
|
mkdir -p "$pkgdir"
|
|
|
|
}
|
|
|
|
|
|
|
|
modem() {
|
2020-04-15 07:57:10 +00:00
|
|
|
pkgdesc="BQ Aquaris X5 modem firmware"
|
2021-10-19 07:51:10 +00:00
|
|
|
install -Dm644 "$srcdir"/modem.mbn "$subpkgdir/$_fwdir"/modem.mdt
|
|
|
|
install -Dm644 "$srcdir"/mba.mbn "$subpkgdir/$_fwdir"/mba.mbn
|
2020-04-08 10:32:40 +00:00
|
|
|
}
|
|
|
|
|
2020-04-15 07:57:10 +00:00
|
|
|
venus() {
|
|
|
|
pkgdesc="BQ Aquaris X5 video firmware"
|
2022-10-30 12:50:01 +00:00
|
|
|
provides="firmware-qcom-msm8916-venus=$pkgver-r$pkgrel"
|
2021-10-19 07:51:10 +00:00
|
|
|
|
|
|
|
# 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
|
2020-04-08 10:32:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
wcnss() {
|
2020-04-15 07:57:10 +00:00
|
|
|
pkgdesc="BQ Aquaris X5 WiFi/BT firmware"
|
2022-10-30 12:50:01 +00:00
|
|
|
provides="firmware-qcom-msm8916-wcnss=$pkgver-r$pkgrel"
|
2020-06-08 20:25:00 +00:00
|
|
|
|
2021-10-19 07:51:10 +00:00
|
|
|
install -Dm644 "$srcdir"/wcnss.mbn "$subpkgdir/$_fwdir"/wcnss.mdt
|
2020-06-08 20:25:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
2020-04-08 10:32:40 +00:00
|
|
|
}
|
|
|
|
|
2020-04-15 07:57:10 +00:00
|
|
|
sha512sums="7f426e5fdb20319ed22c16be1ce13d069532bdfb8dc754a735c2a019342758b1f0210614dfeaa1d850802083a550ec8a6931d3572d203267cae8ec59f6613d82 picmt_firmware_files.tar.xz"
|