device-fairphone-fp4: add sensor support (MR 5290)

Add the required dependencies and config for both hexagonrpcd and
libssc so that sensors start working.

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Luca Weiss 2024-06-28 15:19:32 +02:00 committed by jane400
parent 86fa840915
commit f1767d7dbd
No known key found for this signature in database
GPG key ID: 9901C7B82A702241
4 changed files with 20 additions and 2 deletions

View file

@ -0,0 +1,3 @@
# iio-sensor-proxy with libssc: accelerometer mount matrix
SUBSYSTEM=="misc", KERNEL=="fastrpc-*", ENV{ACCEL_MOUNT_MATRIX}+="-1, 0, 0; 0, -1, 0; 0, 0, -1"

View file

@ -2,8 +2,8 @@
# Maintainer: Luca Weiss <luca@lucaweiss.eu> # Maintainer: Luca Weiss <luca@lucaweiss.eu>
pkgname=device-fairphone-fp4 pkgname=device-fairphone-fp4
pkgdesc="Fairphone 4" pkgdesc="Fairphone 4"
pkgver=2 pkgver=3
pkgrel=5 pkgrel=0
url="https://postmarketos.org" url="https://postmarketos.org"
license="MIT" license="MIT"
arch="aarch64" arch="aarch64"
@ -14,10 +14,13 @@ depends="
firmware-fairphone-fp4-adsp firmware-fairphone-fp4-adsp
firmware-fairphone-fp4-bluetooth firmware-fairphone-fp4-bluetooth
firmware-fairphone-fp4-cdsp firmware-fairphone-fp4-cdsp
firmware-fairphone-fp4-hexagonfs
firmware-fairphone-fp4-ipa firmware-fairphone-fp4-ipa
firmware-fairphone-fp4-modem firmware-fairphone-fp4-modem
firmware-fairphone-fp4-wlan firmware-fairphone-fp4-wlan
firmware-qcom-adreno-a630 firmware-qcom-adreno-a630
hexagonrpcd
hexagonrpcd-openrc
linux-firmware-ath10k linux-firmware-ath10k
linux-postmarketos-qcom-sm6350 linux-postmarketos-qcom-sm6350
make-dynpart-mappings make-dynpart-mappings
@ -35,10 +38,13 @@ depends="
tqftpserv-openrc tqftpserv-openrc
" "
makedepends="devicepkg-dev" makedepends="devicepkg-dev"
replaces="hexagonrpcd-openrc"
install="$pkgname.post-install $pkgname.post-upgrade" install="$pkgname.post-install $pkgname.post-upgrade"
source=" source="
81-libssc-fairphone-fp4.rules
90-feedbackd-aw8695.rules 90-feedbackd-aw8695.rules
deviceinfo deviceinfo
hexagonrpcd.confd
modules-initfs modules-initfs
" "
@ -49,12 +55,18 @@ build() {
package() { package() {
devicepkg_package $startdir $pkgname devicepkg_package $startdir $pkgname
install -Dm644 "$srcdir"/81-libssc-fairphone-fp4.rules \
"$pkgdir"/usr/lib/udev/rules.d/81-libssc-fairphone-fp4.rules
install -Dm644 "$srcdir"/90-feedbackd-aw8695.rules \ install -Dm644 "$srcdir"/90-feedbackd-aw8695.rules \
"$pkgdir"/usr/lib/udev/rules.d/90-feedbackd-aw8695.rules "$pkgdir"/usr/lib/udev/rules.d/90-feedbackd-aw8695.rules
install -Dm644 "$srcdir"/hexagonrpcd.confd \
"$pkgdir"/etc/conf.d/hexagonrpcd-adsp-sensorspd
} }
sha512sums=" sha512sums="
2c16ba75e0077b2b1eaefa4c73b287475505a1aeb291ec29316d41cc094277320f9d2aaabfd91eb1dc0f488ab2d61a94faef16e7afe0f1e226779113761b9a37 81-libssc-fairphone-fp4.rules
2974ccc172bf1299daeb0bc746879b3a1db1fbc3a2b163a02a6554fed6ed9f733144bcf976cd2441c5664d496dcce3ae943f4314c653470dc07dda0de5ad632b 90-feedbackd-aw8695.rules 2974ccc172bf1299daeb0bc746879b3a1db1fbc3a2b163a02a6554fed6ed9f733144bcf976cd2441c5664d496dcce3ae943f4314c653470dc07dda0de5ad632b 90-feedbackd-aw8695.rules
9549f105f865d230e7b67819c96b7e06a5ed4d5808f083099a408934ffbacdb412984b861f6756fa4fde94b51e6a268b8d2ce9fed6f13ee3e8041bb96492310a deviceinfo 9549f105f865d230e7b67819c96b7e06a5ed4d5808f083099a408934ffbacdb412984b861f6756fa4fde94b51e6a268b8d2ce9fed6f13ee3e8041bb96492310a deviceinfo
6a3d620f2cc60308a62ff651ffb00a5ee1f092131cca9d33b6afd61c8a372a3fd7d46540162213593107e0943b33f3f0119d003d43dcd06dbde757390a6c1729 hexagonrpcd.confd
52bb7ed829caa4dcff9728bd6e3cdf118b3c7ee7dfe90df0d4e6422dd67bf3258ae2a4d2dc7599da4182fbd8eb47a0e1d20c58198dc17f2bf178b8f01a8887f7 modules-initfs 52bb7ed829caa4dcff9728bd6e3cdf118b3c7ee7dfe90df0d4e6422dd67bf3258ae2a4d2dc7599da4182fbd8eb47a0e1d20c58198dc17f2bf178b8f01a8887f7 modules-initfs
" "

View file

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
rc-update add hexagonrpcd-adsp-sensorspd default
rc-update add pd-mapper boot rc-update add pd-mapper boot
rc-update add qbootctl default rc-update add qbootctl default
rc-update add tqftpserv boot rc-update add tqftpserv boot

View file

@ -0,0 +1,2 @@
# Fairphone 4 specific hexagonrpcd firmware directory
hexagonrpcd_fw_dir="/usr/share/qcom/sm7225/Fairphone/fairphone4"