LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-02-2011, 05:05 AM   #1
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
How to build module w83627ehf?


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
 
Old 12-02-2011, 05:44 AM   #2
vulcan59
Member
 
Registered: Sep 2007
Location: UK
Distribution: Slackware 14.2 & Current
Posts: 96

Rep: Reputation: 30
I am assuming you are running your new 2.6.38.7 kernel. Unpack the archive you downloaded and it should create a directory containing all of the files. You can do this in your home directory or anywhere you have write permissions. I think you need to make a change to the makefile. Uncomment line 7 (the first KERNEL_BUILD line) and comment out line 8 (the second KERNEL_BUILD line). then run make followed by make install (as root). It worked for me.
 
1 members found this post helpful.
Old 12-02-2011, 05:58 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578

Original Poster
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Thanks vulcan59

That worked
 
Old 12-02-2011, 06:55 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578

Original Poster
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
But it may be that w83627ehf is not the right module (clashes with ACPI) and asus_atk0110 should be used instead but not yet able to get lm_sensors working with it. Investigating ...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I build a module for Slax...? Alexvader Slackware 8 04-24-2010 01:15 PM
How to build kernel module arbis Linux - Software 2 11-13-2008 12:28 PM
Using the w83627ehf in VMware robel Linux - Hardware 2 10-21-2008 01:01 AM
Can't locate Module/Build.pm in @INC i.you Linux - Software 1 10-04-2007 03:11 AM
[Error] Kernel Module : No kernel module build environment saman007uk Debian 7 09-09-2006 06:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration