2023-08-25 13:40:17 +00:00
|
|
|
pkgname=firmware-fairphone-fp5
|
2024-05-23 12:04:27 +00:00
|
|
|
pkgver=20240417
|
2024-07-03 13:24:22 +00:00
|
|
|
pkgrel=1
|
2023-08-25 13:40:17 +00:00
|
|
|
pkgdesc="Firmware for Fairphone 5"
|
|
|
|
subpackages="
|
2023-09-22 07:33:13 +00:00
|
|
|
$pkgname-adreno
|
2023-08-25 13:40:17 +00:00
|
|
|
$pkgname-adsp
|
|
|
|
$pkgname-bluetooth
|
|
|
|
$pkgname-cdsp
|
2024-07-03 13:24:22 +00:00
|
|
|
$pkgname-hexagonfs
|
2023-08-25 13:40:17 +00:00
|
|
|
$pkgname-ipa
|
|
|
|
$pkgname-modem
|
|
|
|
$pkgname-venus
|
|
|
|
$pkgname-wpss
|
|
|
|
"
|
|
|
|
url="https://github.com/FairBlobs/FP5-firmware"
|
|
|
|
arch="aarch64"
|
|
|
|
license="proprietary"
|
2023-12-13 15:36:10 +00:00
|
|
|
makedepends="pil-squasher"
|
2023-08-25 13:40:17 +00:00
|
|
|
options="!check !strip !archcheck !tracedeps pmb:cross-native"
|
2024-07-03 13:24:22 +00:00
|
|
|
_commit="798524050d9f4802450cd4f1bf46ddd105b6ae4f"
|
2023-08-25 13:40:17 +00:00
|
|
|
source="https://github.com/FairBlobs/FP5-firmware/archive/$_commit/FP5-firmware-$_commit.tar.gz"
|
|
|
|
builddir="$srcdir/FP5-firmware-$_commit"
|
|
|
|
|
2023-12-13 15:36:10 +00:00
|
|
|
build() {
|
|
|
|
for i in *.mdt; do
|
|
|
|
pil-squasher "$(basename "$i" .mdt)".mbn "$i"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2023-08-25 13:40:17 +00:00
|
|
|
package() {
|
|
|
|
# parent package is empty
|
|
|
|
mkdir -p "$pkgdir"
|
|
|
|
}
|
|
|
|
|
2023-09-22 07:33:13 +00:00
|
|
|
adreno() {
|
|
|
|
pkgdesc="Fairphone 5 adreno firmware"
|
|
|
|
|
2023-12-13 15:36:10 +00:00
|
|
|
install -Dm644 "$builddir"/a660_zap.mbn -t \
|
2023-09-22 07:33:13 +00:00
|
|
|
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
|
2023-12-13 15:36:10 +00:00
|
|
|
ln -s a660_zap.mbn "$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/a660_zap.mdt"
|
2023-09-22 07:33:13 +00:00
|
|
|
}
|
|
|
|
|
2023-08-25 13:40:17 +00:00
|
|
|
adsp() {
|
|
|
|
pkgdesc="Fairphone 5 adsp firmware"
|
|
|
|
|
2023-12-13 15:36:10 +00:00
|
|
|
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 \
|
2023-08-25 13:40:17 +00:00
|
|
|
"$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"
|
|
|
|
|
2023-12-13 15:36:10 +00:00
|
|
|
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 \
|
2023-08-25 13:40:17 +00:00
|
|
|
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
|
|
|
|
}
|
|
|
|
|
2024-07-03 13:24:22 +00:00
|
|
|
hexagonfs() {
|
|
|
|
pkgdesc="Fairphone 5 hexagonfs files"
|
|
|
|
|
|
|
|
mkdir -p "$subpkgdir"/usr/share/qcom/qcm6490/Fairphone/
|
|
|
|
cp -r "$builddir"/hexagonfs/ \
|
|
|
|
"$subpkgdir"/usr/share/qcom/qcm6490/Fairphone/fairphone5
|
|
|
|
|
|
|
|
# Remove files that we don't need - for now
|
|
|
|
rm -r "$subpkgdir"/usr/share/qcom/qcm6490/Fairphone/fairphone5/acdb/
|
|
|
|
rm -r "$subpkgdir"/usr/share/qcom/qcm6490/Fairphone/fairphone5/dsp/
|
|
|
|
|
|
|
|
find "$subpkgdir/usr/share/qcom/qcm6490/Fairphone/fairphone5/" \
|
|
|
|
-type f -exec chmod 0644 {} \;
|
|
|
|
}
|
|
|
|
|
2023-08-25 13:40:17 +00:00
|
|
|
ipa() {
|
|
|
|
pkgdesc="Fairphone 5 ipa firmware"
|
|
|
|
|
2023-12-13 15:36:10 +00:00
|
|
|
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"
|
2023-08-25 13:40:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
modem() {
|
|
|
|
pkgdesc="Fairphone 5 modem firmware"
|
|
|
|
|
2023-12-13 15:36:10 +00:00
|
|
|
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/ \
|
2023-08-25 13:40:17 +00:00
|
|
|
"$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"
|
|
|
|
|
2023-12-13 15:36:10 +00:00
|
|
|
install -Dm644 "$builddir"/wpss.mbn -t \
|
2023-08-25 13:40:17 +00:00
|
|
|
"$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/"
|
2023-12-13 15:36:10 +00:00
|
|
|
ln -s wpss.mbn "$subpkgdir/lib/firmware/qcom/qcm6490/fairphone5/wpss.mdt"
|
2023-08-25 13:40:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sha512sums="
|
2024-07-03 13:24:22 +00:00
|
|
|
b952aeb6dc953a66514aea00a32cc766c2554e59c9dbbdab723dbf65d5e5e5deeefdc80e88ec59214fdf89d2ffdd6e632e42304ef510431fb4ecc0374f81ba06 FP5-firmware-798524050d9f4802450cd4f1bf46ddd105b6ae4f.tar.gz
|
2023-08-25 13:40:17 +00:00
|
|
|
"
|