firmware-motorola-osprey: package wcnss firmware for harpia (MR 3746)

The WCNSS firwmare used for motorola-harpia seems to have weird issues
that prevent using WiFi properly except for a few limited channels. It
is not clear why this happens, it seems to be some peculiar firmware
difference (perhaps the channels need to be enabled with some
non-standard command).

Since Motorola uses the same signing keys for all their MSM8916
devices, it is possible to use the firmware from other devices instead.
Initial testing shows promising results when using the older WCNSS
firmware from motorola-osprey instead, it does not seem to have this
issue.

It's not clear yet if this has any negative effects. The WCNSS firmware
should not be device-specific, but theoretically it could be (if
Motorola made some weird changes inside it).

For now just package it in firmware-motorola-osprey-wcnss. This package
can be easily installed on harpia devices for testing (using apk add)
and will then take precendence over the default firmware from the
firmware partition (via msm-firmware-loader).

Move firmware-motorola-osprey from testing to community so that the
package is preserved for motorola-harpia users (testing is deleted in
stable branches).

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Minecrell 2022-12-17 15:08:57 +01:00 committed by Oliver Smith
parent 2f315e3b72
commit 04c166cdde
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -4,7 +4,7 @@ pkgver=3
pkgrel=0 pkgrel=0
pkgdesc="Firmware for Motorola Moto G 2015" pkgdesc="Firmware for Motorola Moto G 2015"
url="https://github.com/pmsourcedump/firmware-motorola-osprey" url="https://github.com/pmsourcedump/firmware-motorola-osprey"
subpackages="$pkgname-wcnss-nv:wcnss_nv $pkgname-venus" subpackages="$pkgname-wcnss $pkgname-wcnss-nv:wcnss_nv $pkgname-venus"
arch="aarch64" arch="aarch64"
license="proprietary" license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native" options="!check !strip !archcheck !tracedeps pmb:cross-native"
@ -19,6 +19,7 @@ builddir="$srcdir/firmware-motorola-osprey-$_commit"
_fwdir="/lib/firmware/postmarketos" _fwdir="/lib/firmware/postmarketos"
build() { build() {
pil-squasher wcnss.mbn wcnss.mdt
# venus.mbn exists already but seems a bit different # venus.mbn exists already but seems a bit different
pil-squasher venus2.mbn venus.mdt pil-squasher venus2.mbn venus.mdt
} }
@ -27,6 +28,14 @@ package() {
mkdir -p "$pkgdir" mkdir -p "$pkgdir"
} }
wcnss() {
pkgdesc="Motorola Moto G 2015 WiFi/BT firmware"
# Linux detects squashed (.mbn) vs non-squashed (.mdt + .b*) based on
# file contents, so it is fine to install wcnss.mbn to wcnss.mdt
install -Dm644 "$builddir"/wcnss.mbn "$subpkgdir/$_fwdir"/wcnss.mdt
}
wcnss_nv() { wcnss_nv() {
pkgdesc="Motorola Moto G 2015 WiFi/BT firmware configuration" pkgdesc="Motorola Moto G 2015 WiFi/BT firmware configuration"
install -Dm644 "$srcdir"/WCNSS_qcom_wlan_nv_osprey.bin "$subpkgdir/$_fwdir"/wlan/prima/WCNSS_qcom_wlan_nv.bin install -Dm644 "$srcdir"/WCNSS_qcom_wlan_nv_osprey.bin "$subpkgdir/$_fwdir"/wlan/prima/WCNSS_qcom_wlan_nv.bin