Skip to content

Commit da0cecb

Browse files
authored
feat: Add bmi260 kmod, used for gyro input on various handheld PCs (#110)
1 parent 9c84627 commit da0cecb

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

Containerfile.common

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \
4141
/tmp/build-kmod-openrgb.sh && \
4242
/tmp/build-kmod-steamdeck.sh \
4343
; fi && \
44+
/tmp/build-kmod-bmi260.sh && \
4445
/tmp/build-kmod-gasket.sh && \
4546
/tmp/build-kmod-gcadapter_oc.sh && \
4647
/tmp/build-kmod-nct6687d.sh && \

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Feel free to PR more kmod build scripts into this repo!
1212
- ublue-os-nvidia-addons - installs extra repos enabling our nvidia support
1313
- [nvidia container selinux policy](https://github.com/NVIDIA/dgx-selinux/tree/master/src/nvidia-container-selinux) - uses RHEL9 policy as the closest match
1414
- [nvidia-container-tookkit repo](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#installing-with-yum-or-dnf) - version 1.14 (and newer) provide CDI for podman use of nvidia gpus
15+
- [bmi260](https://github.com/hhd-dev/bmi260) - kernel module driver for the Bosch BMI260 IMU (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))
1516
- [evdi](www.displaylink.com) - kernel module required for use of displaylink (akmod from [negativo17 multimedia repo](https://negativo17.org/multimedia/)
1617
- [gasket/apex](https://github.com/google/gasket-driver) - kernel module for Coral Gasket Driver, allowing usage of the Coral EdgeTPU on Linux systems (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))
1718
- [gcadapter_oc](https://github.com/hannesmann/gcadapter-oc-kmod) - kernel module for overclocking the Nintendo Wii U/Mayflash GameCube adapter (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))

build-kmod-bmi260.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
set -oeux pipefail
4+
5+
cp /tmp/ublue-os-akmods-addons/rpmbuild/SOURCES/_copr_ublue-os-akmods.repo /etc/yum.repos.d/
6+
7+
ARCH="$(rpm -E '%_arch')"
8+
KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')"
9+
RELEASE="$(rpm -E '%fedora')"
10+
11+
rpm-ostree install \
12+
akmod-bmi260-*.fc${RELEASE}.${ARCH}
13+
akmods --force --kernels "${KERNEL}" --kmod bmi260
14+
modinfo /usr/lib/modules/${KERNEL}/extra/bmi260/bmi260_{core,i2c}.ko.xz > /dev/null \
15+
|| (find /var/cache/akmods/bmi260/ -name \*.log -print -exec cat {} \; && exit 1)
16+
17+
rm -f /etc/yum.repos.d/_copr_ublue-os-akmods.repo

0 commit comments

Comments
 (0)