aboutsummaryrefslogtreecommitdiff
path: root/dkms
diff options
context:
space:
mode:
Diffstat (limited to 'dkms')
-rwxr-xr-xdkms/dkms-install.sh27
-rw-r--r--dkms/dkms.conf18
2 files changed, 45 insertions, 0 deletions
diff --git a/dkms/dkms-install.sh b/dkms/dkms-install.sh
new file mode 100755
index 0000000..261bbe7
--- /dev/null
+++ b/dkms/dkms-install.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# script assumes it is being run from root, i.e.
+# sudo ./dkms/dkms-install.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}"
+
+# copy dkms.conf specifically to be in root dir or build area
+cp dkms/dkms.conf "${DST}"
+
+cd dkms
+
+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..3863d31
--- /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="deps/hid-tminit/"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/hid"
+BUILT_MODULE_NAME[1]="hid-tmff-new"
+DEST_MODULE_LOCATION[1]="/kernel/drivers/hid"