diff --git a/device/testing/device-huawei-kiwi/APKBUILD b/device/testing/device-huawei-kiwi/APKBUILD index 875794f61..089f9d3d1 100644 --- a/device/testing/device-huawei-kiwi/APKBUILD +++ b/device/testing/device-huawei-kiwi/APKBUILD @@ -14,7 +14,8 @@ subpackages="$pkgname-nonfree-firmware:nonfree_firmware" nonfree_firmware() { pkgdesc="Modem/GPU/WiFi/BT/Video firmware" - depends="linux-firmware-qcom firmware-huawei-kiwi firmware-qcom-adreno-a420" + depends="firmware-qcom-adreno-a420 msm-firmware-loader + firmware-huawei-kiwi-venus firmware-huawei-kiwi-wcnss-nv" mkdir "$subpkgdir" } diff --git a/device/testing/firmware-huawei-kiwi/APKBUILD b/device/testing/firmware-huawei-kiwi/APKBUILD index e53abd81b..4667f6545 100644 --- a/device/testing/firmware-huawei-kiwi/APKBUILD +++ b/device/testing/firmware-huawei-kiwi/APKBUILD @@ -1,30 +1,42 @@ pkgname=firmware-huawei-kiwi pkgver=1 -pkgrel=0 +pkgrel=1 pkgdesc="Firmware for Huawei Honor 5X" url="https://git.sr.ht/~bo41/firmware-huawei-kiwi" +subpackages="$pkgname-venus $pkgname-wcnss-nv:wcnss_nv" arch="aarch64" license="proprietary" options="!check !strip !archcheck !tracedeps pmb:cross-native" -# Sources +makedepends="pil-squasher" _commit="2a4db2a026568abfaf342211e9f3d63ac044a9d9" source="$pkgname-$_commit.tar.gz::$url/archive/$_commit.tar.gz" +builddir="$srcdir/$pkgname-$_commit" _fwdir="/lib/firmware/postmarketos" -builddir="$srcdir/$pkgname-$_commit" + +build() { + # venus.mbn exists already but seems a bit different + pil-squasher venus2.mbn venus.mdt +} package() { # parent package is empty mkdir -p "$pkgdir" - - pkgdesc="Huawei Kiwi Modem/GPU/WiFi/BT/Video firmware" - install -Dm644 mba.mbn -t "$pkgdir/$_fwdir" - install -Dm644 modem.* -t "$pkgdir/$_fwdir" - - install -Dm644 venus.* -t "$pkgdir/$_fwdir"/qcom/venus-1.8 - - install -Dm644 wcnss.* -t "$pkgdir/$_fwdir" - install -Dm644 WCNSS_* -t "$pkgdir/$_fwdir"/wlan/prima } -sha512sums="a5aa89b37ff2e6ac5e8808cf6be97d7850e0d52c7654abf6c044de54c42c737a0b4242c439856dd56c4c5f2721b79941b604ac5a42506aec8020283c446301d4 firmware-huawei-kiwi-2a4db2a026568abfaf342211e9f3d63ac044a9d9.tar.gz" +venus() { + pkgdesc="Huawei Honor 5X video firmware" + + # 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 +} + +wcnss_nv() { + pkgdesc="Huawei Honor 5X WiFi/BT firmware configuration" + install -Dm644 "$builddir"/WCNSS_qcom_wlan_nv.bin -t "$subpkgdir/$_fwdir"/wlan/prima +} + +sha512sums=" +a5aa89b37ff2e6ac5e8808cf6be97d7850e0d52c7654abf6c044de54c42c737a0b4242c439856dd56c4c5f2721b79941b604ac5a42506aec8020283c446301d4 firmware-huawei-kiwi-2a4db2a026568abfaf342211e9f3d63ac044a9d9.tar.gz +"