aboutsummaryrefslogtreecommitdiff
path: root/dkms
diff options
context:
space:
mode:
authorRaySlash <stevemathewjoy@gmail.com>2023-10-02 13:08:52 +1000
committerRaySlash <stevemathewjoy@gmail.com>2023-10-02 22:14:57 +1000
commit75006183d0a379a2b0fa844fc32b3e27d229f368 (patch)
treee69dcd71c1071fb973ea61c5f41f22d48c7b5d9b /dkms
parentb2872a893afd0f9cd0bfd4644348f3b8645edbed (diff)
downloadhid-tmff2-75006183d0a379a2b0fa844fc32b3e27d229f368.tar.gz
hid-tmff2-75006183d0a379a2b0fa844fc32b3e27d229f368.zip
src: initial refactoring
Diffstat (limited to 'dkms')
-rwxr-xr-xdkms/dkms-install.sh19
-rw-r--r--dkms/dkms.conf18
2 files changed, 37 insertions, 0 deletions
diff --git a/dkms/dkms-install.sh b/dkms/dkms-install.sh
new file mode 100755
index 0000000..f77eec4
--- /dev/null
+++ b/dkms/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 ../src/* "${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/dkms.conf b/dkms/dkms.conf
new file mode 100644
index 0000000..25ef2ca
--- /dev/null
+++ b/dkms/dkms.conf
@@ -0,0 +1,18 @@
+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' KDIR=\"$kernel_source_dir\""
+CLEAN[0]="'make' KDIR=\"$kernel_source_dir\" clean"
+
+# 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-tmff-new"
+DEST_MODULE_LOCATION[1]="/kernel/drivers/hid"