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.
This commit is contained in:
Minecrell 2021-10-19 09:51:10 +02:00 committed by Clayton Craft
parent ae715e09fa
commit 3193027687
No known key found for this signature in database
GPG key ID: 7A3461CA187CEA54

View file

@ -1,5 +1,5 @@
pkgname=firmware-bq-picmt
pkgver=2
pkgver=3
pkgrel=0
_commit="04cced17ab21d84ea6145e58f0b12fd67ef640d0"
pkgdesc="Firmware for BQ Aquaris X5"
@ -8,10 +8,18 @@ subpackages="$pkgname-modem $pkgname-venus $pkgname-wcnss $pkgname-wcnss-nv:wcns
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"
@ -19,21 +27,24 @@ package() {
modem() {
pkgdesc="BQ Aquaris X5 modem firmware"
install -Dm644 "$srcdir"/modem.* -t "$subpkgdir/$_fwdir"
install -Dm644 "$srcdir"/mba.* -t "$subpkgdir/$_fwdir"
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"
install -Dm644 "$srcdir"/venus.mdt "$srcdir"/venus.b* \
-t "$subpkgdir/$_fwdir"/qcom/venus-1.8
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.* -t "$subpkgdir/$_fwdir"
install -Dm644 "$srcdir"/wcnss.mbn "$subpkgdir/$_fwdir"/wcnss.mdt
}
wcnss_nv() {