pmaports/device/testing/firmware-huawei-kiwi/APKBUILD
Minecrell 8833243e8b
firmware-<qcom-msm8916>: adjust for new venus firmware path (MR 4553)
Linux 6.7-rc1 looks for the venus (video) firmware in
qcom/venus-1.8/venus.mbn instead of qcom/venus-1.8/venus.mdt.

Let's install it in both places with a symlink so that the firmware
packages work for both older and newer Linux versions.

[ci:ignore-count]: lots of packages
[ci:skip-build] already built successfully in CI
2023-11-13 22:56:59 -08:00

45 lines
1.4 KiB
Text

pkgname=firmware-huawei-kiwi
pkgver=2
pkgrel=0
_name="Huawei Honor 5X / GR5 (2016)"
pkgdesc="Firmware for $_name"
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"
makedepends="pil-squasher"
_commit="2a4db2a026568abfaf342211e9f3d63ac044a9d9"
source="$pkgname-$_commit.tar.gz::$url/archive/$_commit.tar.gz"
builddir="$srcdir/$pkgname-$_commit"
_fwdir="/lib/firmware/postmarketos"
build() {
# venus.mbn exists already but seems a bit different
pil-squasher venus2.mbn venus.mdt
}
package() {
# parent package is empty
mkdir -p "$pkgdir"
}
venus() {
pkgdesc="$_name video firmware"
# Linux detects squashed (.mbn) vs non-squashed (.mdt + .b*) based on
# file contents, so it is fine to link venus.mbn to venus.mdt
# Older kernels look for venus.mdt, newer ones directly for venus.mbn
install -Dm644 "$builddir"/venus2.mbn "$subpkgdir/$_fwdir"/qcom/venus-1.8/venus.mbn
ln -s venus.mbn "$subpkgdir/$_fwdir"/qcom/venus-1.8/venus.mdt
}
wcnss_nv() {
pkgdesc="$_name 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
"