pmaports/device/testing/firmware-fairphone-fp5/APKBUILD
Luca Weiss 568cac3585
firmware-fairphone-fp5: upgrade to 20240417 (MR 5169)
[ci:skip-build]: already built successfully in CI
2024-05-25 08:38:38 +02:00

115 lines
3.2 KiB
Text

pkgname=firmware-fairphone-fp5
pkgver=20240417
pkgrel=0
pkgdesc="Firmware for Fairphone 5"
subpackages="
$pkgname-adreno
$pkgname-adsp
$pkgname-bluetooth
$pkgname-cdsp
$pkgname-ipa
$pkgname-modem
$pkgname-venus
$pkgname-wpss
"
url="https://github.com/FairBlobs/FP5-firmware"
arch="aarch64"
license="proprietary"
makedepends="pil-squasher"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
_commit="73b1f5451539063c161f805efd1717d6e8ee4070"
source="https://github.com/FairBlobs/FP5-firmware/archive/$_commit/FP5-firmware-$_commit.tar.gz"
builddir="$srcdir/FP5-firmware-$_commit"
build() {
for i in *.mdt; do
pil-squasher "$(basename "$i" .mdt)".mbn "$i"
done
}
package() {
# parent package is empty
mkdir -p "$pkgdir"
}
adreno() {
pkgdesc="Fairphone 5 adreno firmware"
install -Dm644 "$builddir"/a660_zap.mbn -t \
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
ln -s a660_zap.mbn "$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/a660_zap.mdt"
}
adsp() {
pkgdesc="Fairphone 5 adsp firmware"
install -Dm644 "$builddir"/adsp.mbn -t \
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
ln -s adsp.mbn "$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/adsp.mdt"
install -Dm644 "$builddir"/adsp*.jsn -t \
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
install -Dm644 "$builddir"/battmgr.jsn -t \
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
}
bluetooth() {
pkgdesc="Fairphone 5 bluetooth firmware"
install -Dm644 "$builddir"/msbtfw11.mbn -t \
"$subpkgdir/lib/firmware/qca/"
install -Dm644 "$builddir"/msnv11.bin -t \
"$subpkgdir/lib/firmware/qca/"
}
cdsp() {
pkgdesc="Fairphone 5 cdsp firmware"
install -Dm644 "$builddir"/cdsp.mbn -t \
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
ln -s cdsp.mbn "$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/cdsp.mdt"
install -Dm644 "$builddir"/cdsp*.jsn -t \
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
}
ipa() {
pkgdesc="Fairphone 5 ipa firmware"
cd "$builddir"
install -Dm644 "$builddir"/yupik_ipa_fws.mbn \
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/ipa_fws.mbn"
ln -s ipa_fws.mbn "$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/ipa_fws.mdt"
}
modem() {
pkgdesc="Fairphone 5 modem firmware"
install -Dm644 "$builddir"/modem.mbn -t \
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
ln -s modem.mbn "$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/modem.mdt"
install -Dm644 "$builddir"/modem*.jsn -t \
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
cp -r "$builddir"/modem_pr/ \
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
find "$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/" \
-type f -exec chmod 0644 {} \;
}
venus() {
pkgdesc="Fairphone 5 venus firmware"
install -Dm644 "$builddir"/vpu20_1v.mbn \
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/venus.mbn"
}
wpss() {
pkgdesc="Fairphone 5 wpss firmware"
install -Dm644 "$builddir"/wpss.mbn -t \
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
ln -s wpss.mbn "$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/wpss.mdt"
}
sha512sums="
7c21f8ba33e34167555769ded52debb472552e421608b54c33f244edc9f1ff633400ae2bf21bfe8df00e6a138d8ed53b9edf5d6aa5c0cdd63308854881077f7e FP5-firmware-73b1f5451539063c161f805efd1717d6e8ee4070.tar.gz
"