From 04c166cdded1cb9c4b2f17c8be0ba73e552364be Mon Sep 17 00:00:00 2001 From: Minecrell Date: Sat, 17 Dec 2022 15:08:57 +0100 Subject: [PATCH] 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 --- .../firmware-motorola-osprey/APKBUILD | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) rename device/{testing => community}/firmware-motorola-osprey/APKBUILD (82%) diff --git a/device/testing/firmware-motorola-osprey/APKBUILD b/device/community/firmware-motorola-osprey/APKBUILD similarity index 82% rename from device/testing/firmware-motorola-osprey/APKBUILD rename to device/community/firmware-motorola-osprey/APKBUILD index 227662ad1..c3cb2b9fc 100644 --- a/device/testing/firmware-motorola-osprey/APKBUILD +++ b/device/community/firmware-motorola-osprey/APKBUILD @@ -4,7 +4,7 @@ pkgver=3 pkgrel=0 pkgdesc="Firmware for Motorola Moto G 2015" 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" license="proprietary" options="!check !strip !archcheck !tracedeps pmb:cross-native" @@ -19,6 +19,7 @@ builddir="$srcdir/firmware-motorola-osprey-$_commit" _fwdir="/lib/firmware/postmarketos" build() { + pil-squasher wcnss.mbn wcnss.mdt # venus.mbn exists already but seems a bit different pil-squasher venus2.mbn venus.mdt } @@ -27,6 +28,14 @@ package() { 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() { 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