LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-24-2005, 11:25 AM   #1
jhoya
LQ Newbie
 
Registered: Aug 2005
Posts: 1

Rep: Reputation: 0
Talking Porting driver to kernel 2.6


Hello,
I've just bought an FXO card (winmodem like) to use with Asterisk, but the drivers only complie with Kernel 2.4. I

Attempts to complie this on FC3 (kernel 2.6) of course produce loads of errors like "modversions.h not found". Googlin says something about kbuild (!?)

I am no expert in compiling stuff, so here goes the original Makefile in case somebody can give me a hand on the changes to make this work.

Thank for reading.


#edit these settings
ZAPTEL_SOURCE=/usr/src/zaptel
KERNEL_SOURCE=/usr/src/linux-2.4

#these shouldn't be changed
MODULE=wcfxo2-helper.o
MODULE_CORE=wcfxo2-core.o
MODULE_MAIN=wcfxo2-module.o
DRIVER=wcfxo2.o

all: $(MODULE) $(DRIVER) install

install:
install -D -m 644 $(MODULE) /lib/modules/`uname -r`/misc/$(MODULE) ;
install -D -m 644 $(DRIVER) /lib/modules/`uname -r`/misc/$(DRIVER) ;
/sbin/depmod -a
clean:
rm -f $(MODULE_MAIN) $(MODULE) $(DRIVER)

$(MODULE): wcfxo2-module.c
gcc -O6 -DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -Wall -I. -Wstrict-prototypes -fomit-frame-pointer -I$(KERNEL_SOURCE)/include -DMODVERSIONS -include $(KERNEL_SOURCE)/include/linux/modversions.h -c wcfxo2-module.c
ld -r $(MODULE_CORE) $(MODULE_MAIN) -o $(MODULE)
$(DRIVER): wcfxo2.c
gcc -I/usr/src/linux-2.4/include -O6 -DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -I/usr/src/linux/drivers/net -Wall -I. -Wstrict-prototypes -fomit-frame-pointer -I/usr/src/linux/drivers/net/wan -I/usr/src/linux/include -I/usr/src/linux/include/net -DMODVERSIONS -include /usr/src/linux-2.4/include/linux/modversions.h -I$(ZAPTEL_SOURCE) -DSTANDALONE_ZAPATA -c wcfxo2.c
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
porting driver from linux to vxworks r9379 Linux - Software 0 08-23-2005 02:46 AM
Porting driver to 2.6.9 kernel. Stuck with i2c not using /proc fs anymore rschnall Linux - Software 2 08-14-2005 05:06 AM
driver porting to 64-bit-linux yogeshwar_s Programming 0 07-19-2005 09:18 AM
Driver won't compile on Kernel 2.6 - works fine on Kernel 2.4 c@sey Linux - Software 4 01-08-2005 01:01 PM
Driver porting dafri Linux - Hardware 2 06-07-2003 11:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:11 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