Linux Driver 8.5.1 using DMKS
Posted: Thu 19. Jul 2018, 12:37
Hi all,
It's a shame that the driver source doesn't automatically set up DKMS... I've been following the following process to set up DKMS for the peak driver 8.5.1 on Ubuntu 16.04 test boxes to save my sanity which I hope will be of use to others if I share it.
Make sure dkms and headers are installed :
Install and test build the driver :
Create a new dkms conf file e.g. using emacs :
Create the file with the following content :
Install and build the driver using DKMS :
If required, this can be manually removed via :
It'd be grand if the driver install Makefile could do something similar as well...!
~Pev
It's a shame that the driver source doesn't automatically set up DKMS... I've been following the following process to set up DKMS for the peak driver 8.5.1 on Ubuntu 16.04 test boxes to save my sanity which I hope will be of use to others if I share it.
Make sure dkms and headers are installed :
Code: Select all
sudo apt install -y dkms build-essential linux-headers-$(uname -r)
Code: Select all
# Must be root for all of this
sudo su -
# Get and unpack
cd /usr/src
wget http://www.peak-system.com/fileadmin/media/linux/files/peak-linux-driver-8.5.1.tar.gz
tar -xf peak-linux-driver-8.5.1.tar.gz
# Test build.
# We need to do this at least once as it automatically blacklists the
# standard kernel driver for us.
cd /usr/src/peak-linux-driver-8.5.1
make NET=NETDEV_SUPPORT
sudo make install
# Remove the installed module (not needed)
sudo rm -f /lib/modules/$(uname -r)/misc/pcan.ko
Code: Select all
emacs /usr/src/peak-linux-driver-8.5.1/dkms.conf
Code: Select all
PACKAGE_NAME="peak-linux-driver-dkms"
PACKAGE_VERSION="8.5.1"
CLEAN="make clean"
MAKE[0]="make NET=NETDEV_SUPPORT all VERSION=${kernelver} KERNEL_LOCATION=/usr/src/linux-headers-${kernelver}"
BUILT_MODULE_NAME[0]="pcan"
BUILT_MODULE_LOCATION[0]="driver/"
DEST_MODULE_LOCATION[0]="/extra"
AUTOINSTALL="yes"
Code: Select all
sudo dkms add peak-linux-driver/8.5.1
sudo dkms build peak-linux-driver/8.5.1
sudo dkms install peak-linux-driver/8.5.1
sudo dkms status | grep peak
modinfo pcan
Code: Select all
sudo dkms remove -m peak-linux-driver -v 8.5.1 --all
It'd be grand if the driver install Makefile could do something similar as well...!
~Pev