add DKMS support
tbh i have no idea what i'm doing lmao
This commit is contained in:
parent
02e9ad57eb
commit
cb152fdada
2 changed files with 7 additions and 2 deletions
5
Makefile
5
Makefile
|
@ -1,3 +1,4 @@
|
||||||
|
KERNELRELEASE ?= $(shell uname -r)
|
||||||
|
|
||||||
DEBUG ?= n
|
DEBUG ?= n
|
||||||
ifeq ($(DEBUG),y)
|
ifeq ($(DEBUG),y)
|
||||||
|
@ -15,10 +16,10 @@ keymash-sources = src/keymash.c
|
||||||
keymash-objs = $(keymash-sources:.c=.o)
|
keymash-objs = $(keymash-sources:.c=.o)
|
||||||
|
|
||||||
keymash.ko:
|
keymash.ko:
|
||||||
make -C "/lib/modules/$(shell uname -r)/build" M="$(PWD)" modules
|
make -C "/lib/modules/$(KERNELRELEASE)/build" M="$(PWD)" modules
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
make -C "/lib/modules/$(shell uname -r)/build" M="$(PWD)" clean
|
make -C "/lib/modules/$(KERNELRELEASE)/build" M="$(PWD)" clean
|
||||||
|
|
||||||
all: keymash.ko
|
all: keymash.ko
|
||||||
|
|
||||||
|
|
4
dkms.conf
Normal file
4
dkms.conf
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
PACKAGE_NAME="keymash"
|
||||||
|
PACKAGE_VERSION="0.1.0"
|
||||||
|
BUILT_MODULE_NAME[0]=keymash
|
||||||
|
DEST_MODULE_LOCATION[0]="/kernel/drivers/char/"
|
Loading…
Reference in a new issue