-
Notifications
You must be signed in to change notification settings - Fork 287
Initial packages for gyroscope / accelerometer #2692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
giodotblue
wants to merge
10
commits into
ROCKNIX:next
Choose a base branch
from
giodotblue:dev/gio/odin3-gyro
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
20aa2a9
protobuf: add package
giodotblue 6267642
libprotobuf-c: add package
giodotblue f88261d
libqmi: add libqmi and libqrtr-glib packages
giodotblue 3e80707
libssc: add package
giodotblue 0f22e7b
libgudev: add package
giodotblue 7d31b33
inputplumber: build the SSC PR branch
giodotblue 7ff95a1
sensor-firmware: add package
giodotblue d57a3a4
qcom-fastrpc: new package (and dependencies)
giodotblue 078701e
qcom-fastrpc: add emulated /mnt/vendor
giodotblue 83a2d40
sm8750: add support for Qualcomm SSC gyro & accel
giodotblue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
...cts/ROCKNIX/devices/SM8750/filesystem/usr/share/inputplumber/capability_maps/ayn_imu.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/capability_map_v2.json | ||
| # Schema version number | ||
| version: 2 | ||
|
|
||
| # The type of configuration schema | ||
| kind: CapabilityMap | ||
|
|
||
| # Name for the device event map | ||
| name: Ayn IMU | ||
|
|
||
| # Unique identifier of the capability mapping | ||
| id: ayn_imu | ||
|
|
||
| # List of mapped events | ||
| mapping: | ||
| - name: Accelerometer | ||
| source_events: | ||
| - evdev: | ||
| event_type: ABS | ||
| event_code: ABS_X | ||
| value_type: imu_x | ||
| - evdev: | ||
| event_type: ABS | ||
| event_code: ABS_Y | ||
| value_type: imu_y | ||
| - evdev: | ||
| event_type: ABS | ||
| event_code: ABS_Z | ||
| value_type: imu_z | ||
| target_event: | ||
| gamepad: | ||
| accelerometer: | ||
| name: Accelerometer | ||
|
|
||
| - name: Gyro | ||
| source_events: | ||
| - evdev: | ||
| event_type: ABS | ||
| event_code: ABS_RX | ||
| value_type: imu_x | ||
| - evdev: | ||
| event_type: ABS | ||
| event_code: ABS_RY | ||
| value_type: imu_y | ||
| - evdev: | ||
| event_type: ABS | ||
| event_code: ABS_RZ | ||
| value_type: imu_z | ||
| target_event: | ||
| gamepad: | ||
| gyro: | ||
| name: Gyro |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # SPDX-License-Identifier: GPL-2.0 | ||
| # Copyright (C) 2026-present ROCKNIX (https://github.com/ROCKNIX) | ||
|
|
||
| PKG_NAME="libbsd" | ||
| PKG_VERSION="0.12.2" | ||
| PKG_LICENSE="BSD-3-Clause" | ||
| PKG_SITE="https://gitlab.freedesktop.org/libbsd/libbsd" | ||
| PKG_URL="https://libbsd.freedesktop.org/releases/libbsd-${PKG_VERSION}.tar.xz" | ||
| PKG_DEPENDS_TARGET="toolchain libmd" | ||
| PKG_LONGDESC="Utility functions from BSD systems" | ||
| PKG_TOOLCHAIN="configure" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # SPDX-License-Identifier: GPL-2.0-or-later | ||
| # Copyright (C) 2026 ROCKNIX (https://github.com/ROCKNIX) | ||
|
|
||
| PKG_NAME="libgudev" | ||
| PKG_VERSION="bd531e8622e2c98a1da3d28a0a6df59c844f25c0" | ||
| PKG_LICENSE="LGPL-2.1-or-later" | ||
| PKG_SITE="https://gitlab.gnome.org/GNOME/libgudev" | ||
| PKG_URL="${PKG_SITE}/-/archive/${PKG_VERSION}/libgudev-${PKG_VERSION}.tar.gz" | ||
| PKG_DEPENDS_TARGET="toolchain systemd ninja:host" | ||
| PKG_LONGDESC="Library providing GObject bindings for libudev" | ||
| PKG_TOOLCHAIN="meson" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # SPDX-License-Identifier: GPL-2.0 | ||
| # Copyright (C) 2026-present ROCKNIX (https://github.com/ROCKNIX) | ||
|
|
||
| PKG_NAME="libmd" | ||
| PKG_VERSION="1.2.0" | ||
| PKG_LICENSE="BSD-3-Clause" | ||
| PKG_SITE="https://www.hadrons.org/software/libmd/" | ||
| PKG_URL="https://libbsd.freedesktop.org/releases/libmd-${PKG_VERSION}.tar.xz" | ||
| PKG_DEPENDS_TARGET="toolchain" | ||
| PKG_LONGDESC="Provides message digest functions found on BSD systems" | ||
| PKG_TOOLCHAIN="autotools" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # SPDX-License-Identifier: GPL-2.0-or-later | ||
| # Copyright (C) 2026 ROCKNIX (https://github.com/ROCKNIX) | ||
|
|
||
| PKG_NAME="libprotobuf-c" | ||
| PKG_VERSION="4719fdd7760624388c2c5b9d6759eb6a47490626" | ||
| PKG_LICENSE="BSD-2-Clause" | ||
| PKG_SITE="https://github.com/protobuf-c/protobuf-c" | ||
| PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz" | ||
| PKG_DEPENDS_TARGET="toolchain protobuf" | ||
| PKG_DEPENDS_HOST="toolchain:host protobuf:host" | ||
| PKG_LONGDESC="C implementation of the Google Protocol Buffers data serialization format" | ||
| PKG_TOOLCHAIN="autotools" | ||
|
|
||
| post_makeinstall_target() { | ||
| rm -rf ${INSTALL}/usr/include | ||
| rm -rf ${INSTALL}/usr/bin | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # SPDX-License-Identifier: GPL-2.0-or-later | ||
| # Copyright (C) 2026 ROCKNIX (https://github.com/ROCKNIX) | ||
|
|
||
| PKG_NAME="libqmi" | ||
| PKG_VERSION="0536681a4ab46021e13c1cf8fa94b0b13b93b0c6" | ||
| PKG_LICENSE="LGPL-2.1-or-later" | ||
| PKG_SITE="https://github.com/linux-mobile-broadband/libqmi" | ||
| PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz" | ||
| PKG_DEPENDS_TARGET="toolchain libgudev glib libqrtr-glib ninja:host" | ||
| PKG_LONGDESC="libqmi is a glib-based library for talking to WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol." | ||
| PKG_TOOLCHAIN="meson" | ||
|
|
||
| pre_configure_target() { | ||
| PKG_MESON_OPTS_TARGET+=" -Dbash_completion=false \ | ||
| -Dmbim_qmux=false \ | ||
| -Dman=false \ | ||
| -Dintrospection=false" | ||
| } | ||
|
|
||
| post_makeinstall_target() { | ||
| rm -rf ${INSTALL}/usr/include | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # SPDX-License-Identifier: GPL-2.0-or-later | ||
| # Copyright (C) 2026 ROCKNIX (https://github.com/ROCKNIX) | ||
|
|
||
| PKG_NAME="libqrtr-glib" | ||
| PKG_VERSION="1689f8b96509314d569f06a05e986a887d6d6ce5" | ||
| PKG_LICENSE="LGPL-2.1-or-later" | ||
| PKG_SITE="https://github.com/linux-mobile-broadband/libqrtr-glib" | ||
| PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz" | ||
| PKG_DEPENDS_TARGET="toolchain glib" | ||
| PKG_DEPENDS_HOST="toolchain:host" | ||
| PKG_LONGDESC="libqrtr-glib is a glib-based library to use and manage the QRTR (Qualcomm IPC Router) bus." | ||
| PKG_TOOLCHAIN="meson" | ||
|
|
||
| pre_configure_target() { | ||
| PKG_MESON_OPTS_TARGET+=" -Dintrospection=false" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # SPDX-License-Identifier: GPL-2.0-or-later | ||
| # Copyright (C) 2026 ROCKNIX (https://github.com/ROCKNIX) | ||
|
|
||
| PKG_NAME="libssc" | ||
| PKG_VERSION="fea9c0d9ecb5b8aecdf26554b26c1df6286526df" | ||
| PKG_LICENSE="GPLv3" | ||
| PKG_SITE="https://codeberg.org/DylanVanAssche/libssc" | ||
| PKG_URL="https://codeberg.org/DylanVanAssche/libssc/archive/${PKG_VERSION}.tar.gz" | ||
| PKG_DEPENDS_TARGET="toolchain libprotobuf-c:host libprotobuf-c libqmi" | ||
| PKG_DEPENDS_HOST="toolchain:host" | ||
| PKG_LONGDESC="Library for exposing Qualcomm Sensor Core sensors to Linux." | ||
| PKG_TOOLCHAIN="meson" | ||
|
|
||
| post_makeinstall_target() { | ||
| rm -rf ${INSTALL}/usr/include | ||
| rm -rf ${INSTALL}/usr/lib/python* | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # SPDX-License-Identifier: GPL-2.0 | ||
| # Copyright (C) 2026-present ROCKNIX (https://github.com/ROCKNIX) | ||
|
|
||
| PKG_NAME="libyaml" | ||
| PKG_VERSION="0.2.5" | ||
| PKG_LICENSE="MIT" | ||
| PKG_SITE="https://github.com/yaml/libyaml" | ||
| PKG_URL="${PKG_SITE}/releases/download/${PKG_VERSION}/yaml-${PKG_VERSION}.tar.gz" | ||
| PKG_DEPENDS_TARGET="toolchain" | ||
| PKG_LONGDESC="A C library for parsing and emitting YAML" | ||
| PKG_TOOLCHAIN="autotools" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # SPDX-License-Identifier: GPL-2.0-or-later | ||
| # Copyright (C) 2026 ROCKNIX (https://github.com/ROCKNIX) | ||
|
|
||
| PKG_NAME="protobuf" | ||
| PKG_VERSION="33.6" | ||
| PKG_LICENSE="BSD" | ||
| PKG_SITE="https://github.com/protocolbuffers/protobuf" | ||
| PKG_URL="${PKG_SITE}/releases/download/v${PKG_VERSION}/protobuf-${PKG_VERSION}.tar.gz" | ||
| PKG_DEPENDS_TARGET="toolchain" | ||
| PKG_DEPENDS_HOST="toolchain:host" | ||
| PKG_LONGDESC="Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data" | ||
| PKG_TOOLCHAIN="cmake" | ||
|
|
||
| PKG_CMAKE_OPTS_TARGET=" -Dprotobuf_BUILD_TESTS=OFF \ | ||
| -Dprotobuf_BUILD_EXAMPLES=OFF \ | ||
| -Dprotobuf_BUILD_PROTOC_BINARIES=OFF \ | ||
| -DBUILD_SHARED_LIBS=OFF \ | ||
| -Dprotobuf_ALLOW_CCACHE=ON" | ||
|
|
||
| PKG_CMAKE_OPTS_HOST=${PKG_CMAKE_OPTS_TARGET} | ||
|
|
||
| post_makeinstall_target() { | ||
| rm -rf ${INSTALL}/usr/lib | ||
| rm -rf ${INSTALL}/usr/include | ||
| rm -rf ${INSTALL}/usr/bin | ||
| } |
18 changes: 18 additions & 0 deletions
18
projects/ROCKNIX/packages/linux-firmware/sensor-firmware/package.mk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # SPDX-License-Identifier: GPL-2.0 | ||
| # Copyright (C) 2026-present ROCKNIX (https://github.com/ROCKNIX) | ||
|
|
||
| PKG_NAME="sensor-firmware" | ||
| PKG_VERSION="ad572cb6627ee436cb1803bb7fc4ae86a9ea9003" | ||
| PKG_LICENSE="proprietary" | ||
| PKG_SITE="https://github.com/ROCKNIX/sensor-firmware" | ||
| PKG_URL="https://github.com/ROCKNIX/sensor-firmware/archive/${PKG_VERSION}.tar.gz" | ||
| PKG_LONGDESC="Extra kernel firmware needed for Qualcomm devices" | ||
| PKG_TOOLCHAIN="manual" | ||
|
|
||
| makeinstall_target() { | ||
| mkdir -p ${INSTALL}/usr/share/qcom | ||
|
|
||
| case "${DEVICE}" in | ||
| "SM8750") cp -ra devices/SM8750/* ${INSTALL}/usr/share/qcom ;; | ||
| esac | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # SPDX-License-Identifier: GPL-2.0 | ||
| # Copyright (C) 2026-present ROCKNIX (https://github.com/ROCKNIX) | ||
|
|
||
| PKG_NAME="qcom-fastrpc" | ||
| PKG_VERSION="1.0.5" | ||
| PKG_LICENSE="BSD-3-Clause" | ||
| PKG_SITE="https://github.com/qualcomm/fastrpc" | ||
| PKG_URL="${PKG_SITE}/archive/refs/tags/v${PKG_VERSION}.tar.gz" | ||
| PKG_DEPENDS_TARGET="toolchain libyaml libmd libbsd meson" | ||
| PKG_LONGDESC="Qualcomm's userspace library that facilitates efficient remote procedure calls between the CPU and DSP" | ||
| PKG_TOOLCHAIN="autotools" | ||
|
|
||
| PKG_CONFIGURE_OPTS_TARGET=" --with-config-base-dir=/usr/share/qcom \ | ||
| --with-systemdsystemunitdir=/usr/lib/systemd/system" | ||
|
|
||
| post_makeinstall_target() { | ||
| cp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin/ | ||
| } | ||
|
|
||
| post_install() { | ||
| enable_service adsprpcd-sensorspd.service | ||
| } |
54 changes: 54 additions & 0 deletions
54
projects/ROCKNIX/packages/tools/qcom-fastrpc/scripts/run-adsprpcd.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| #!/bin/bash | ||
|
|
||
| # SPDX-License-Identifier: GPL-2.0-or-later | ||
| # Copyright (C) 2026 ROCKNIX (https://github.com/ROCKNIX) | ||
|
|
||
| . /etc/profile | ||
|
|
||
| # The sensor data structure works like this: | ||
| # /usr/share/qcom/base | ||
| # /usr/share/qcom/overlays/<DEVICE NAME> | ||
|
|
||
| MOUNT_OUTPUT_DIR="/tmp/qcom-hexagon-fs" | ||
|
|
||
| SENSOR_DATA_BASE_DIR="/usr/share/qcom/base" | ||
| SENSOR_DATA_OVERLAY_DIR="/usr/share/qcom/overlays/${QUIRK_DEVICE}" | ||
| SENSOR_DATA_USER_DIR="/storage/.config/qcom-hexagon-fs" | ||
| SENSOR_DATA_WORK_DIR="/storage/.tmp/qcom-hexagon-fs-workdir" | ||
|
|
||
| # If the base dir doesn't exist, there's nothing we can do | ||
| if [ ! -d "$SENSOR_DATA_BASE_DIR" ]; then | ||
| echo "Sensor data base directory for chip ${HW_DEVICE} not found at ${SENSOR_DATA_BASE_DIR}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Create our user dir if it doesn't exist | ||
| mkdir -p "$SENSOR_DATA_USER_DIR" | ||
|
|
||
| # (Re)mount the sensor data using an overlayfs | ||
| mkdir -p "$MOUNT_OUTPUT_DIR" | ||
| umount "$MOUNT_OUTPUT_DIR" 2>/dev/null || true | ||
|
|
||
| mkdir -p "$SENSOR_DATA_WORK_DIR" | ||
|
|
||
| if [ -d "$SENSOR_DATA_OVERLAY_DIR" ]; then | ||
| echo "Mounting sensor data overlay (user dir, overlay dir, base dir)" | ||
| mount -t overlay overlay -o lowerdir="${SENSOR_DATA_OVERLAY_DIR}:${SENSOR_DATA_BASE_DIR}",upperdir="${SENSOR_DATA_USER_DIR}",workdir="${SENSOR_DATA_WORK_DIR}" $MOUNT_OUTPUT_DIR | ||
| else | ||
| echo "Mounting sensor data overlay (user dir, base dir)" | ||
| mount -t overlay overlay -o lowerdir="${SENSOR_DATA_BASE_DIR}",upperdir="${SENSOR_DATA_USER_DIR}",workdir="${SENSOR_DATA_WORK_DIR}" $MOUNT_OUTPUT_DIR | ||
| fi | ||
|
|
||
| # FastRPC is odd and wants directories all over the place | ||
| mkdir -p "$MOUNT_OUTPUT_DIR"/mnt | ||
| mkdir -p "$MOUNT_OUTPUT_DIR"/mnt/vendor | ||
|
|
||
| if [ -d "$MOUNT_OUTPUT_DIR"/vendor ]; then | ||
| # /vendor -> /mnt/vendor | ||
| echo "Mounting sensor data subpath: /vendor -> /mnt/vendor" | ||
| mount --rbind "$MOUNT_OUTPUT_DIR"/vendor "$MOUNT_OUTPUT_DIR"/mnt/vendor | ||
| fi | ||
|
|
||
| echo "Running adsprpcd! (sensor data dir = $MOUNT_OUTPUT_DIR)" | ||
| export ADSP_LIBRARY_PATH=$MOUNT_OUTPUT_DIR | ||
| adsprpcd sensorspd adsp |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep this in mind