From c7afc7d3f1aed699bc236ea4b85aff21aa2f467d Mon Sep 17 00:00:00 2001 From: Kimplul Date: Tue, 8 Jun 2021 21:13:12 +0300 Subject: Merge dkms into master --- README.md | 10 ++++++++++ dkms-install.sh | 19 +++++++++++++++++++ dkms.conf | 17 +++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100755 dkms-install.sh create mode 100644 dkms.conf diff --git a/README.md b/README.md index 9348125..aed55df 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ With that in mind, ## Installation +### Manual + + Unplug wheel from computer + `git clone --recurse-submodules https://github.com/Kimplul/hid-tmff2.git` + `make` @@ -26,6 +28,14 @@ With that in mind, Done! +### DKMS + ++ Unplug wheel from computer ++ `sudo ./dkms-install.sh` ++ Plug wheel back in ++ reboot (not strictly necessary, but definitely recommended) + +Done! > :warning: Warning: There have been reports that this driver does not work if the wheel's firmware version is any other than v. 31. To update the firmware, you will have to fire up a Windows installation and update the firmware using the official Thrustmaster tools. ## Additional tidbits diff --git a/dkms-install.sh b/dkms-install.sh new file mode 100755 index 0000000..6e77e80 --- /dev/null +++ b/dkms-install.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +if ! [ $(id -u) = 0 ]; then + echo "You must run this script as root!" + exit 1 +fi + +TM_NAME=hid-tmff2 +TM_VER=0.8 +DST="/usr/src/${TM_NAME}-${TM_VER}" + +mkdir -p "${DST}" +cp -r ./* "${DST}" + +dkms add -m "${TM_NAME}" -v "${TM_VER}" +dkms build -m "${TM_NAME}" -v "${TM_VER}" +dkms install -m "${TM_NAME}" -v "${TM_VER}" + +exit $? diff --git a/dkms.conf b/dkms.conf new file mode 100644 index 0000000..d69a100 --- /dev/null +++ b/dkms.conf @@ -0,0 +1,17 @@ +PACKAGE_NAME="hid-tmff2" +PACKAGE_VERSION="0.8" +AUTOINSTALL="yes" + +# By default, DKMS will add KERNELRELEASE to the make command line; however, +# this will cause the kernel module build to infer that it was invoked via +# Kbuild directly instead of DKMS. The dkms(8) manual page recommends quoting +# the 'make' command name to suppress this behavior. +MAKE[0]="'make'" + +# The list of kernel modules. +#__DKMS_MODULES +BUILT_MODULE_NAME[0]="hid-tminit" +BUILT_MODULE_LOCATION="hid-tminit/" +DEST_MODULE_LOCATION[0]="/kernel/drivers/hid" +BUILT_MODULE_NAME[1]="hid-tmt300rs" +DEST_MODULE_LOCATION[1]="/kernel/drivers/hid" -- cgit v1.3