From 15a7b1b0d3f89e571245ae0157fd39c0b6ef483d Mon Sep 17 00:00:00 2001 From: Joel Selvaraj Date: Fri, 19 May 2023 18:48:33 -0500 Subject: [PATCH] device-oneplus-enchilada: start hexagonrpcd on boot and configure accelerometer (MR 4050) hexagonrpcd is necessary to provide access to the filesystem for the SDSP. Also, OP6 accelerometer is mounted differently than the screen, adjust it with a mount matrix. This way, screen rotations follow the actual screen rotation by the user. --- .../81-libssc-oneplus-enchilada.rules | 3 +++ .../community/device-oneplus-enchilada/APKBUILD | 17 +++++++++++++---- ...plus-enchilada-nonfree-firmware.post-install | 2 ++ ...plus-enchilada-nonfree-firmware.post-upgrade | 1 + 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 device/community/device-oneplus-enchilada/81-libssc-oneplus-enchilada.rules create mode 100644 device/community/device-oneplus-enchilada/device-oneplus-enchilada-nonfree-firmware.post-install create mode 120000 device/community/device-oneplus-enchilada/device-oneplus-enchilada-nonfree-firmware.post-upgrade diff --git a/device/community/device-oneplus-enchilada/81-libssc-oneplus-enchilada.rules b/device/community/device-oneplus-enchilada/81-libssc-oneplus-enchilada.rules new file mode 100644 index 000000000..2bad47308 --- /dev/null +++ b/device/community/device-oneplus-enchilada/81-libssc-oneplus-enchilada.rules @@ -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" diff --git a/device/community/device-oneplus-enchilada/APKBUILD b/device/community/device-oneplus-enchilada/APKBUILD index 04628b5d4..dbcf2ba82 100644 --- a/device/community/device-oneplus-enchilada/APKBUILD +++ b/device/community/device-oneplus-enchilada/APKBUILD @@ -3,8 +3,8 @@ pkgname=device-oneplus-enchilada pkgdesc="OnePlus 6" -pkgver=12 -pkgrel=1 +pkgver=13 +pkgrel=0 url="https://postmarketos.org" license="MIT" arch="aarch64" @@ -24,6 +24,7 @@ source=" deviceinfo modules-initfs q6voiced.conf + 81-libssc-oneplus-enchilada.rules " subpackages="$pkgname-nonfree-firmware:nonfree_firmware $pkgname-pmtest" @@ -40,11 +41,18 @@ package() { nonfree_firmware() { pkgdesc="Modem, WiFi and GPU Firmware, also needed for osk-sdl" - depends="firmware-oneplus-sdm845 firmware-oneplus-sdm845-initramfs - soc-qcom-sdm845-nonfree-firmware soc-qcom-sdm845-modem" + depends=" + firmware-oneplus-sdm845>=9 + firmware-oneplus-sdm845-initramfs + hexagonrpcd + soc-qcom-sdm845-nonfree-firmware + soc-qcom-sdm845-modem + " + install="$subpkgname.post-install $subpkgname.post-upgrade" mkdir "$subpkgdir" install -Dm644 q6voiced.conf "$subpkgdir"/etc/conf.d/q6voiced + install -Dm644 "$srcdir"/81-libssc-oneplus-enchilada.rules -t "$subpkgdir"/usr/lib/udev/rules.d/ } pmtest() { @@ -60,4 +68,5 @@ e957b7b0ed219eaa56be6c6b976b60886f73970703fdebf045800154ee652affee4e19654b3ac424 83fc698ebeda6245abc2a653eeff97b3b996d06dd7731386a07d102937f9b005c7277e0dece05ff359d9ff109a1d9ed7791fc510b146354df179804aadb5642c deviceinfo ea8709aa214cffaefb1d486c0c47044537446faebff16efb3b015623f043f730b7121e401c676e43aa8868bd6c630fc8a2d7dbf5fb082490e9b5493e0405b66d modules-initfs fe9871c325a38c0cadc9631870801ec15ab9f5b786ee854325b93eb3d23e7d8b1ac4f1075572ffcd225d8ec514dec09b986972ddff12a89260c0218af6de7887 q6voiced.conf +2c16ba75e0077b2b1eaefa4c73b287475505a1aeb291ec29316d41cc094277320f9d2aaabfd91eb1dc0f488ab2d61a94faef16e7afe0f1e226779113761b9a37 81-libssc-oneplus-enchilada.rules " diff --git a/device/community/device-oneplus-enchilada/device-oneplus-enchilada-nonfree-firmware.post-install b/device/community/device-oneplus-enchilada/device-oneplus-enchilada-nonfree-firmware.post-install new file mode 100644 index 000000000..5cf61f597 --- /dev/null +++ b/device/community/device-oneplus-enchilada/device-oneplus-enchilada-nonfree-firmware.post-install @@ -0,0 +1,2 @@ +#!/bin/sh +rc-update add hexagonrpcd-sdsp diff --git a/device/community/device-oneplus-enchilada/device-oneplus-enchilada-nonfree-firmware.post-upgrade b/device/community/device-oneplus-enchilada/device-oneplus-enchilada-nonfree-firmware.post-upgrade new file mode 120000 index 000000000..95e4e3d57 --- /dev/null +++ b/device/community/device-oneplus-enchilada/device-oneplus-enchilada-nonfree-firmware.post-upgrade @@ -0,0 +1 @@ +device-oneplus-enchilada-nonfree-firmware.post-install \ No newline at end of file