Hello
For my Slackware64 13.31 system, now running on an ASUS
PBH67-V motherboard including a Nuvoton (formerly Winbond)
NCT6776F chip, I need to build module
w83627ehf.
The original 2.6.33.4 kernel does not support the core i3 processor now fitted so the kernel is 2.6.38.7, downloaded from
Slackware current and built in /home/c/src/linux-2.6.38.7 with the Slackware current config-generic-smp-2.6.38.7-smp (lightly modified to build ext3 and JFS into the kernel to avoid needing initramfs/initrd).
Unfortunately I am neither familiar with building extra modules nor with make files but it looks as if the w83627ehf Makefile assumes the kernel source is in system directories, not a user directory:
Code:
# For building for the current running version of Linux
TARGET := $(shell uname -r)
HOME=$(shell pwd)
# Or for a specific version
#TARGET := 2.6.33.5
KERNEL_MODULES := /lib/modules/$(TARGET)
# KERNEL_BUILD := $(KERNEL_MODULES)/build
KERNEL_BUILD := /usr/src/linux-headers-$(TARGET)
#SYSTEM_MAP := $(KERNEL_BUILD)/System.map
SYSTEM_MAP := /boot/System.map-$(TARGET)
DRIVER := w83627ehf
# Directory below /lib/modules/$(TARGET)/kernel into which to install
# the module:
MOD_SUBDIR = drivers/hwmon
obj-m := $(DRIVER).o
MAKEFLAGS += --no-print-directory
.PHONY: all install modules modules_install clean
all: modules
# Targets for running make directly in the external module directory:
modules clean:
@$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) $@
install: modules_install
modules_install:
cp $(DRIVER).ko $(KERNEL_MODULES)/kernel/$(MOD_SUBDIR)
depmod -a -F $(SYSTEM_MAP) $(TARGET)
What to do? Modify the Makefile? Move the build environment to system directories (I want to keep the standard 2.6.33.4 kernels intact)? Create symlinks from the system directories into the /home/c/src/linux-2.6.38.7 tree? Build a 2.6.39 kernel (includes the w83627ehf driver)?
Modifying the Makefile is favourite but would be non-trivial for me.
The README includes:
Code:
To build and install this driver, execute the following command sequence:
$ make
$ sudo make install
but where should the files (Makefile, lm75.h and w83627ehf.c) be unpacked?
Best
Charles