From 75006183d0a379a2b0fa844fc32b3e27d229f368 Mon Sep 17 00:00:00 2001 From: RaySlash Date: Mon, 2 Oct 2023 13:08:52 +1000 Subject: src: initial refactoring --- dkms/dkms.conf | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 dkms/dkms.conf (limited to 'dkms/dkms.conf') 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" -- cgit v1.3 From 4445da64240e9d5867dfdfefed6052586fb1148b Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 8 Oct 2023 20:36:41 +0300 Subject: dkms: fix file paths --- dkms/dkms-install.sh | 11 +++++++++-- dkms/dkms.conf | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'dkms/dkms.conf') diff --git a/dkms/dkms-install.sh b/dkms/dkms-install.sh index 16e3125..261bbe7 100755 --- a/dkms/dkms-install.sh +++ b/dkms/dkms-install.sh @@ -1,5 +1,8 @@ #!/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 @@ -10,8 +13,12 @@ TM_VER=0.8 DST="/usr/src/${TM_NAME}-${TM_VER}" mkdir -p "${DST}" -cp -r ../src/* "${DST}" -cp -r ../deps/* "${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}" diff --git a/dkms/dkms.conf b/dkms/dkms.conf index 25ef2ca..3863d31 100644 --- a/dkms/dkms.conf +++ b/dkms/dkms.conf @@ -12,7 +12,7 @@ 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/" +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" -- cgit v1.3