Skip to content

Instantly share code, notes, and snippets.

@mennucc
Forked from greenbigfrog/Makefile
Last active February 20, 2023 07:52
Show Gist options
  • Save mennucc/2a322744612a7e21debfa001e987c15a to your computer and use it in GitHub Desktop.
Save mennucc/2a322744612a7e21debfa001e987c15a to your computer and use it in GitHub Desktop.
Brief instructions to (re)compile nct6775 kernel module using DKMS
PACKAGE_NAME=nct6775
PACKAGE_VERSION=wim
BUILT_MODULE_NAME[0]="nct6775-core"
DEST_MODULE_LOCATION[0]="/kernel/drivers/hwmon"
BUILT_MODULE_NAME[1]="nct6775"
DEST_MODULE_LOCATION[1]="/kernel/drivers/hwmon"
AUTOINSTALL=yes
# currently no patch is shipped/applied
#PATCH[0]="nct6775-wim.patch"
obj-m := nct6775-core.o
nct6775-objs := nct6775-platform.o
obj-$(CONFIG_SENSORS_NCT6775) += nct6775.o
## this is not currently compiled
#obj-$(CONFIG_SENSORS_NCT6775_I2C) += nct6775-i2c.o
wget https://github.com/torvalds/linux/raw/master/drivers/hwmon/lm75.h
wget https://github.com/torvalds/linux/raw/master/drivers/hwmon/nct6775.h
wget https://github.com/torvalds/linux/raw/master/drivers/hwmon/nct6775-core.c
wget https://github.com/torvalds/linux/raw/master/drivers/hwmon/nct6775-platform.c
wget https://github.com/torvalds/linux/raw/master/drivers/hwmon/nct6775-i2c.c
# tell DKMS where this source stuff it
sudo ln -s `realpath .` /usr/src/nct6775-wim
# compile files above
sudo dkms install nct6775/wim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment