mirror of
https://github.com/Fred78290/nct6687d
synced 2024-11-16 07:48:04 +01:00
Added DKMS Support
This commit is contained in:
parent
3ecd1f64f0
commit
953476b271
4 changed files with 1266 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -28,7 +28,7 @@ dkms/install:
|
|||
rm -rf ${curpwd}/dkms
|
||||
mkdir -p ${curpwd}/dkms
|
||||
cp ${curpwd}/dkms.conf ${curpwd}/Makefile ${curpwd}/nct6687.c ${curpwd}/dkms
|
||||
[ -d /usr/src/nct6687d-1 ] && sudo rm -rf /usr/src/nct6687d-1
|
||||
sudo rm -rf /usr/src/nct6687d-1
|
||||
sudo cp -rT dkms /usr/src/nct6687d-1
|
||||
sudo dkms install nct6687d/1
|
||||
sudo modprobe nct6687
|
||||
|
|
52
dkms/Makefile
Normal file
52
dkms/Makefile
Normal file
|
@ -0,0 +1,52 @@
|
|||
obj-m += nct6687.o
|
||||
|
||||
curpwd := $(shell pwd)
|
||||
kver := $(shell uname -r)
|
||||
|
||||
build:
|
||||
rm -rf ${curpwd}/${kver}
|
||||
mkdir -p ${curpwd}/${kver}
|
||||
cp ${curpwd}/Makefile ${curpwd}/nct6687.c ${curpwd}/${kver}
|
||||
cd ${curpwd}/${kver}
|
||||
make -C /lib/modules/${kver}/build M=${curpwd}/${kver} modules
|
||||
|
||||
install: build
|
||||
sudo cp ${curpwd}/${kver}/nct6687.ko /lib/modules/${kver}/kernel/drivers/hwmon/
|
||||
sudo depmod
|
||||
sudo modprobe nct6687
|
||||
|
||||
clean:
|
||||
[ -d "${curpwd}/${kver}" ] && make -C /lib/modules/${kver}/build M=${curpwd}/${kver} clean
|
||||
|
||||
|
||||
|
||||
dkms/build:
|
||||
echo ">>> ${curpwd}"
|
||||
make -C /lib/modules/${kver}/build M=${curpwd} modules
|
||||
|
||||
dkms/install:
|
||||
rm -rf ${curpwd}/dkms
|
||||
mkdir -p ${curpwd}/dkms
|
||||
cp ${curpwd}/dkms.conf ${curpwd}/Makefile ${curpwd}/nct6687.c ${curpwd}/dkms
|
||||
sudo rm -rf /usr/src/nct6687d-1
|
||||
sudo cp -rT dkms /usr/src/nct6687d-1
|
||||
sudo dkms install nct6687d/1
|
||||
sudo modprobe nct6687
|
||||
|
||||
dkms/clean:
|
||||
sudo dkms remove nct6687d/1
|
||||
make -C /lib/modules/${kver}/build M=${curpwd} clean
|
||||
|
||||
|
||||
|
||||
debian/changelog: FORCE
|
||||
git --no-pager log \
|
||||
--format='nct6687d-dkms (%ad) unstable; urgency=low%n%n * %s%n%n -- %aN <%aE> %aD%n' \
|
||||
--date='format:%Y%m%d-%H%M%S' \
|
||||
> $@
|
||||
|
||||
deb: debian/changelog
|
||||
dpkg-buildpackage -b -rfakeroot -us -uc
|
||||
|
||||
.PHONY: FORCE
|
||||
FORCE:
|
7
dkms/dkms.conf
Normal file
7
dkms/dkms.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
PACKAGE_NAME="nct6687d"
|
||||
PACKAGE_VERSION="1"
|
||||
MAKE[0]="make dkms/build"
|
||||
BUILT_MODULE_NAME[0]="nct6687"
|
||||
DEST_MODULE_LOCATION[0]="/kernel/drivers/hwmon/"
|
||||
AUTOINSTALL="yes"
|
||||
REMAKE_INITRD=no
|
1206
dkms/nct6687.c
Normal file
1206
dkms/nct6687.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue