2021-12-29 19:48:44 +00:00
|
|
|
pkgname=firmware-fairphone-fp4
|
2024-05-23 11:41:36 +00:00
|
|
|
pkgver=20240313
|
2024-06-28 14:12:45 +00:00
|
|
|
pkgrel=1
|
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
|
2024-06-28 14:12:45 +00:00
|
|
|
$pkgname-hexagonfs
|
2021-12-29 19:48:44 +00:00
|
|
|
$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"
|
2024-06-28 14:12:45 +00:00
|
|
|
options="!check !strip !archcheck !tracedeps textrels pmb:cross-native"
|
|
|
|
_commit="222756885ff5eb24ee89684ef8cfe860a45a54ec"
|
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/"
|
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/"
|
|
|
|
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/"
|
|
|
|
install -Dm644 "$builddir"/cdsp*.jsn -t \
|
2021-12-29 19:48:44 +00:00
|
|
|
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
|
|
|
|
}
|
|
|
|
|
2024-06-28 14:12:45 +00:00
|
|
|
hexagonfs() {
|
|
|
|
pkgdesc="Fairphone 4 hexagonfs files"
|
|
|
|
|
|
|
|
mkdir -p "$subpkgdir"/usr/share/qcom/sm7225/Fairphone/
|
|
|
|
cp -r "$builddir"/hexagonfs/ \
|
|
|
|
"$subpkgdir"/usr/share/qcom/sm7225/Fairphone/fairphone4
|
|
|
|
|
|
|
|
# Remove files that we don't need - for now
|
|
|
|
rm -r "$subpkgdir"/usr/share/qcom/sm7225/Fairphone/fairphone4/acdb/
|
|
|
|
rm -r "$subpkgdir"/usr/share/qcom/sm7225/Fairphone/fairphone4/dsp/
|
|
|
|
|
|
|
|
find "$subpkgdir/usr/share/qcom/sm7225/Fairphone/fairphone4/" \
|
|
|
|
-type f -exec chmod 0644 {} \;
|
|
|
|
}
|
|
|
|
|
2021-12-29 19:48:44 +00:00
|
|
|
ipa() {
|
|
|
|
pkgdesc="Fairphone 4 ipa firmware"
|
|
|
|
|
2024-01-10 14:00:50 +00:00
|
|
|
install -Dm644 "$builddir"/lagoon_ipa_fws.mbn \
|
|
|
|
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/ipa_fws.mbn"
|
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/"
|
|
|
|
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-06-28 14:12:45 +00:00
|
|
|
b6836a8770c089615698ec26d397530c75086457c309d7220265da1203f2b06c4021d5a872244ad1e5a4a19d0d8192c13ae2051538e24d1df5292480daa6309d FP4-firmware-222756885ff5eb24ee89684ef8cfe860a45a54ec.tar.gz
|
2021-12-29 19:48:44 +00:00
|
|
|
"
|