Skip to content

Commit

Permalink
Merge pull request commaai#35 from commaai/realdevel
Browse files Browse the repository at this point in the history
Merge in DKMS support.
  • Loading branch information
geohot authored Aug 23, 2017
2 parents 5db091d + e900a30 commit 65795f7
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
20 changes: 16 additions & 4 deletions drivers/linux/Makefile
Original file line number Diff line number Diff line change
@@ -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

16 changes: 16 additions & 0 deletions drivers/linux/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Installs the panda linux kernel driver using DKMS.

This will allow the panda to work with tools such as `can-utils`

prerequisites:
- apt-get install dkms gcc linux-headers-$(uname -r) make sudo

installation:
- make link (only needed the first time. It will report an error on subsequent attempts to link)
- make all
- make install

uninstall:
- make uninstall


6 changes: 6 additions & 0 deletions drivers/linux/dkms.conf
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 65795f7

Please sign in to comment.