2021-12-29 19:48:44 +00:00
|
|
|
pkgname=firmware-fairphone-fp4
|
2024-01-10 14:00:50 +00:00
|
|
|
pkgver=20231122
|
|
|
|
pkgrel=0
|
2021-12-29 19:48:44 +00:00
|
|
|
pkgdesc="Firmware for Fairphone 4"
|
|
|
|
subpackages="
|
|
|
|
$pkgname-adreno
|
|
|
|
$pkgname-adsp
|
2023-05-24 07:31:44 +00:00
|
|
|
$pkgname-bluetooth
|
2021-12-29 19:48:44 +00:00
|
|
|
$pkgname-cdsp
|
|
|
|
$pkgname-ipa
|
|
|
|
$pkgname-modem
|
|
|
|
$pkgname-venus
|
|
|
|
$pkgname-wlan
|
|
|
|
"
|
|
|
|
url="https://github.com/FairBlobs/FP4-firmware"
|
|
|
|
arch="aarch64"
|
|
|
|
license="proprietary"
|
2024-01-10 14:00:50 +00:00
|
|
|
makedepends="pil-squasher"
|
2021-12-29 19:48:44 +00:00
|
|
|
options="!check !strip !archcheck !tracedeps pmb:cross-native"
|
2024-01-10 14:00:50 +00:00
|
|
|
_commit="9bcb18012b18756e5f7adc4fcd41396e7f28199b"
|
2021-12-29 19:48:44 +00:00
|
|
|
source="https://github.com/FairBlobs/FP4-firmware/archive/$_commit/FP4-firmware-$_commit.tar.gz"
|
|
|
|
builddir="$srcdir/FP4-firmware-$_commit"
|
|
|
|
|
2024-01-10 14:00:50 +00:00
|
|
|
build() {
|
|
|
|
for i in *.mdt; do
|
|
|
|
pil-squasher "$(basename "$i" .mdt)".mbn "$i"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2021-12-29 19:48:44 +00:00
|
|
|
package() {
|
|
|
|
# parent package is empty
|
|
|
|
mkdir -p "$pkgdir"
|
|
|
|
}
|
|
|
|
|
|
|
|
adreno() {
|
|
|
|
pkgdesc="Fairphone 4 adreno firmware"
|
|
|
|
|
2024-01-10 14:00:50 +00:00
|
|
|
install -Dm644 "$builddir"/a619_gmu.bin -t \
|
2021-12-29 19:48:44 +00:00
|
|
|
"$subpkgdir/lib/firmware/qcom/"
|
2024-01-10 14:00:50 +00:00
|
|
|
install -Dm644 "$builddir"/a615_zap.mbn -t \
|
|
|
|
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
|
|
|
|
ln -s a615_zap.mbn "$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/a615_zap.mdt"
|
|
|
|
ln -s sm7225/fairphone4/a615_zap.mbn "$subpkgdir/lib/firmware/qcom/a615_zap.mdt"
|
2021-12-29 19:48:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
adsp() {
|
|
|
|
pkgdesc="Fairphone 4 adsp firmware"
|
|
|
|
|
2024-01-10 14:00:50 +00:00
|
|
|
install -Dm644 "$builddir"/adsp.mbn -t \
|
|
|
|
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
|
|
|
|
ln -s adsp.mbn "$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/adsp.mdt"
|
|
|
|
install -Dm644 "$builddir"/adsp*.jsn -t \
|
2021-12-29 19:48:44 +00:00
|
|
|
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
|
|
|
|
}
|
|
|
|
|
2023-05-24 07:31:44 +00:00
|
|
|
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/"
|
|
|
|
}
|
|
|
|
|
2021-12-29 19:48:44 +00:00
|
|
|
cdsp() {
|
|
|
|
pkgdesc="Fairphone 4 cdsp firmware"
|
|
|
|
|
2024-01-10 14:00:50 +00:00
|
|
|
install -Dm644 "$builddir"/cdsp.mbn -t \
|
|
|
|
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
|
|
|
|
ln -s cdsp.mbn "$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/cdsp.mdt"
|
|
|
|
install -Dm644 "$builddir"/cdsp*.jsn -t \
|
2021-12-29 19:48:44 +00:00
|
|
|
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
|
|
|
|
}
|
|
|
|
|
|
|
|
ipa() {
|
|
|
|
pkgdesc="Fairphone 4 ipa firmware"
|
|
|
|
|
|
|
|
cd "$builddir"
|
2024-01-10 14:00:50 +00:00
|
|
|
install -Dm644 "$builddir"/lagoon_ipa_fws.mbn \
|
|
|
|
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/ipa_fws.mbn"
|
|
|
|
ln -s ipa_fws.mbn "$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/ipa_fws.mdt"
|
2021-12-29 19:48:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
modem() {
|
|
|
|
pkgdesc="Fairphone 4 modem firmware"
|
|
|
|
|
2024-01-10 14:00:50 +00:00
|
|
|
install -Dm644 "$builddir"/modem.mbn -t \
|
|
|
|
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
|
|
|
|
ln -s modem.mbn "$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/modem.mdt"
|
|
|
|
install -Dm644 "$builddir"/modem*.jsn -t \
|
|
|
|
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
|
|
|
|
|
|
|
|
cp -r "$builddir"/modem_pr/ \
|
2021-12-29 19:48:44 +00:00
|
|
|
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
|
|
|
|
find "$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/" \
|
|
|
|
-type f -exec chmod 0644 {} \;
|
|
|
|
}
|
|
|
|
|
|
|
|
venus() {
|
|
|
|
pkgdesc="Fairphone 4 venus firmware"
|
|
|
|
|
2024-01-10 14:00:50 +00:00
|
|
|
install -Dm644 "$builddir"/venus.mbn -t \
|
2021-12-29 19:48:44 +00:00
|
|
|
"$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="
|
2024-01-10 14:00:50 +00:00
|
|
|
c579b1893a61e09f532e0858ddb90b83e663bf1489707ba8b0e524771504db73764233c2dfe3a4b97b40eab4ef88d50adbea33ab25c28c289d1890d7b0addd70 FP4-firmware-9bcb18012b18756e5f7adc4fcd41396e7f28199b.tar.gz
|
2021-12-29 19:48:44 +00:00
|
|
|
"
|