Add DKMS support

This will add dkms support, and make installations easier. Especially
when upgrading the system from one kernel version to another. DKMS will
handle kernel upgrades automatically.
master
Jeff Palmer 2017-07-31 11:21:30 -04:00
parent 50357ad03c
commit d346d2ec33
3 changed files with 36 additions and 4 deletions

View File

@ -1,6 +1,18 @@
VERSION=0.0.1
obj-m+=panda.o
all:
make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) clean
link:
sudo dkms add `pwd`
build:
sudo dkms build panda/$(VERSION)
install:
sudo dkms install panda/$(VERSION)
all: build install
uninstall:
sudo dkms uninstall panda/$(VERSION)
sudo dkms remove panda/$(VERSION) --all

View File

@ -0,0 +1,14 @@
Installs the panda linux kernel driver using DKMS.
This will allow the panda to work with tools such as `can-utils`
installation:
- make link
- make all
- make install
uninstall:
- make uninstall

View File

@ -0,0 +1,6 @@
PACKAGE_NAME="panda"
PACKAGE_VERSION="0.0.1"
BUILT_MODULE_NAME[0]="panda"
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/panda/"
AUTOINSTALL="yes"