motorola-osprey: use device-specific WCNSS_qcom_wlan_nv.bin (MR 3746)

motorola-osprey can generally use the firmware from motorola-harpia
(which is a bit newer). However, the WCNSS_qcom_wlan_nv.bin is usually
device specific (it contains some kind of calibration values for
WiFi/BT).

The file packaged in firmware-motorola-osprey-wcnss-nv is identical to
the file in firmware-motorola-harpia-wcnss-nv. However, It looks a bit
like this might be a mistake in the source repository
(https://github.com/pmsourcedump/firmware-motorola-osprey). The
wlan/prima folder there is completely identical to the one used for
motorola-harpia, but the stock ROM and LineageOS use different files.

Fix this by packaging the file from TheMuppets. Also modernize the
firmware-motorola-osprey package by applying pil-squasher to the
venus/video firmware.
This commit is contained in:
Minecrell 2022-12-17 15:02:31 +01:00 committed by Oliver Smith
parent 047a8ba6dc
commit 2f315e3b72
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 23 additions and 12 deletions

View file

@ -27,9 +27,9 @@ package() {
nonfree_firmware() {
pkgdesc="GPU/WiFi/BT/Modem/Video firmware"
# osprey's wcnss-nv + venus firmware seems identical to harpia's :>
# osprey can use newer venus firmware from harpia
depends="firmware-qcom-adreno-a300 msm-firmware-loader
firmware-motorola-harpia-wcnss-nv firmware-motorola-harpia-venus"
firmware-motorola-osprey-wcnss-nv firmware-motorola-harpia-venus"
mkdir "$subpkgdir"
}

View file

@ -1,6 +1,6 @@
# Maintainer: Martijn Braam <martijn@brixit.nl>
pkgname=firmware-motorola-osprey
pkgver=2
pkgver=3
pkgrel=0
pkgdesc="Firmware for Motorola Moto G 2015"
url="https://github.com/pmsourcedump/firmware-motorola-osprey"
@ -8,28 +8,39 @@ subpackages="$pkgname-wcnss-nv:wcnss_nv $pkgname-venus"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
makedepends="pil-squasher"
_commit="a47c5a1c2dd806226c61305c9c97135f2734d0c7"
source="$pkgname-$_commit.tar.gz::https://github.com/pmsourcedump/firmware-motorola-osprey/archive/$_commit.tar.gz"
_muppets_commit="d2ff868a61c42ab84e85597600fe9e1064802c7b"
source="$pkgname-$_commit.tar.gz::https://github.com/pmsourcedump/firmware-motorola-osprey/archive/$_commit.tar.gz
WCNSS_qcom_wlan_nv_osprey.bin::https://github.com/TheMuppets/proprietary_vendor_motorola/raw/$_muppets_commit/osprey/proprietary/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin"
builddir="$srcdir/firmware-motorola-osprey-$_commit"
_fwdir="/lib/firmware/postmarketos"
build() {
# venus.mbn exists already but seems a bit different
pil-squasher venus2.mbn venus.mdt
}
package() {
mkdir -p "$pkgdir"
}
wcnss_nv() {
pkgdesc="Motorola Moto G 2015 Wi-Fi/Bluetooth firmware configuration"
replaces="firmware-motorola-osprey-wcnss"
cd "$srcdir/firmware-motorola-osprey-$_commit"
install -Dm644 wlan/prima/WCNSS_qcom_wlan_nv.bin -t "$subpkgdir/$_fwdir/wlan/prima"
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
}
venus() {
pkgdesc="Motorola Moto G 2015 video firmware"
cd "$srcdir/firmware-motorola-osprey-$_commit"
install -Dm644 venus.b* -t "$subpkgdir/$_fwdir/qcom/venus-1.8"
install -Dm644 venus.mdt -t "$subpkgdir/$_fwdir/qcom/venus-1.8"
# 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 "$builddir"/venus2.mbn "$subpkgdir/$_fwdir"/qcom/venus-1.8/venus.mdt
}
sha512sums="7e8d02baa8864c50b4a8be1f9af830e8b5440eee61a012725ed114d93012f0fb19ec005908832d3c96e0ba54b51a5ec7bcf137bfcc64c63594212f2497604629 firmware-motorola-osprey-a47c5a1c2dd806226c61305c9c97135f2734d0c7.tar.gz"
sha512sums="
7e8d02baa8864c50b4a8be1f9af830e8b5440eee61a012725ed114d93012f0fb19ec005908832d3c96e0ba54b51a5ec7bcf137bfcc64c63594212f2497604629 firmware-motorola-osprey-a47c5a1c2dd806226c61305c9c97135f2734d0c7.tar.gz
1ee2e4f6eb3662b0f6b6034313d30a81d48dab78680ccd5f3c84ca023719e2c6021b2dbec79468719dc01e27b53b76e1097c9ed5edc476b601c4fd1d80373a7a WCNSS_qcom_wlan_nv_osprey.bin
"