pmaports/device/community/firmware-fairphone-fp4/APKBUILD

110 lines
2.7 KiB
Text
Raw Normal View History

pkgname=firmware-fairphone-fp4
pkgver=20240313
pkgrel=0
pkgdesc="Firmware for Fairphone 4"
subpackages="
$pkgname-adreno
$pkgname-adsp
$pkgname-bluetooth
$pkgname-cdsp
$pkgname-ipa
$pkgname-modem
$pkgname-venus
$pkgname-wlan
"
url="https://github.com/FairBlobs/FP4-firmware"
arch="aarch64"
license="proprietary"
makedepends="pil-squasher"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
_commit="d95bd920afa9084cefe0f69be931a5421e544154"
source="https://github.com/FairBlobs/FP4-firmware/archive/$_commit/FP4-firmware-$_commit.tar.gz"
builddir="$srcdir/FP4-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 4 adreno firmware"
install -Dm644 "$builddir"/a619_gmu.bin -t \
"$subpkgdir/lib/firmware/qcom/"
install -Dm644 "$builddir"/a615_zap.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
}
adsp() {
pkgdesc="Fairphone 4 adsp firmware"
install -Dm644 "$builddir"/adsp.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
install -Dm644 "$builddir"/adsp*.jsn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
}
bluetooth() {
pkgdesc="Fairphone 4 bluetooth firmware"
install -Dm644 "$builddir"/apbtfw11.tlv -t \
"$subpkgdir/lib/firmware/qca/"
install -Dm644 "$builddir"/apnv11.bin -t \
"$subpkgdir/lib/firmware/qca/"
}
cdsp() {
pkgdesc="Fairphone 4 cdsp firmware"
install -Dm644 "$builddir"/cdsp.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
install -Dm644 "$builddir"/cdsp*.jsn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
}
ipa() {
pkgdesc="Fairphone 4 ipa firmware"
cd "$builddir"
install -Dm644 "$builddir"/lagoon_ipa_fws.mbn \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/ipa_fws.mbn"
}
modem() {
pkgdesc="Fairphone 4 modem firmware"
install -Dm644 "$builddir"/modem.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
install -Dm644 "$builddir"/modem*.jsn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
cp -r "$builddir"/modem_pr/ \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
find "$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/" \
-type f -exec chmod 0644 {} \;
}
venus() {
pkgdesc="Fairphone 4 venus firmware"
install -Dm644 "$builddir"/venus.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
}
wlan() {
pkgdesc="Fairphone 4 wlan firmware"
install -Dm644 "$builddir"/wlanmdsp.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
}
sha512sums="
3839431922c6250fa76c563183387edbc1370f34d833d5d7c6c08f0d921c0498c93ff376af5d43fecf78d4ac6aff3b90e41345310181826b0a21507dbfba778c FP4-firmware-d95bd920afa9084cefe0f69be931a5421e544154.tar.gz
"