diff --git a/Makefile b/Makefile index 661ef8c3..b275e16d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,6 @@ -ifneq ($(KERNELRELEASE),) obj-m := hid-kye.o hid-uclogic.o hid-polostar.o -else -KDIR := /lib/modules/$(shell uname -r)/build +KVERSION := $(shell uname -r) +KDIR := /lib/modules/$(KVERSION)/build PWD := $(shell pwd) UDEV_RULES := /lib/udev/rules.d/90-hid-rebind.rules DEPMOD_CONF := /etc/depmod.d/digimend.conf @@ -21,4 +20,3 @@ uninstall: /lib/modules/*/extra/hid-uclogic.ko udevadm control --reload depmod -a -endif diff --git a/dkms.conf b/dkms.conf new file mode 100644 index 00000000..779aecc9 --- /dev/null +++ b/dkms.conf @@ -0,0 +1,10 @@ +PACKAGE_NAME="digimend" +PACKAGE_VERSION="6" +AUTOINSTALL="yes" +MAKE[0]="make KVERSION=$kernelver" +BUILT_MODULE_NAME[0]="hid-kye" +BUILT_MODULE_NAME[1]="hid-uclogic" +BUILT_MODULE_NAME[2]="hid-polostar" +DEST_MODULE_LOCATION[0]="/extra" +DEST_MODULE_LOCATION[1]="/extra" +DEST_MODULE_LOCATION[2]="/extra" diff --git a/hid-rebind b/hid-rebind index 41c9e556..4e3f7798 100755 --- a/hid-rebind +++ b/hid-rebind @@ -51,11 +51,12 @@ write_ignore_enodev() { cur_driver="" fi - # Choose a matching module installed under .../extra/ + # Choose a matching module installed under /extra or /updates new_module=$( modprobe -R "$MODALIAS" | tr - _ | while read -r m; do - if modinfo -F filename "$m" | grep -q /extra/; then + if modinfo -F filename "$m" | + grep -q '/extra/\|/updates/'; then echo "$m" break fi