LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-13-2008, 09:24 PM   #1
rhauff
LQ Newbie
 
Registered: Nov 2003
Location: Minnesota, USA
Distribution: VectorLinux, Xubuntu
Posts: 25

Rep: Reputation: 15
Problems compiling crrcsim parallel port kernel module CONFIG_MODVERSION ????


Hi,
I'm getting a few compile errors then failure, starting with
" warning: "CONFIG_MODVERSION" is not defined"

I'm running Xubuntu 7.10 and have not compiled anything on this system before (all installs done by synaptic). I now installed linux-source for my kernel and build-essential.

I am trying to compile the kernel module for a parallel port RC Simulator interface for crrcsim (model airplane simulator). This particular module isn't highly supported, but does have a rudimentary makefile for the 2.6 kernel. I'v copied it here:

KSRC=/lib/modules/2.6.22-14-generic/build

obj-m = rctran2.o

build:
make -C $(KSRC) SUBDIRS=`pwd` modules

install:
@# completely broken ATM - removes the whole dir
@#make -C $(KSRC) SUBDIRS=`pwd` modules_install
@echo "Install it yourself ..."

clean:
@# kbuild can't handle this (yet ?)
@#make -C $(KSRC) SUBDIRS=`pwd` clean
rm -f *.o *.ko *.mod.o *.mod.c .*.{cmd,flags}
rm -rf config.status config.log autom4te*.cache


I am compiling with the following command:
make -f Makefile

The following is my list of errors:

make -C /lib/modules/2.6.22-14-generic/build SUBDIRS=`pwd` modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.22-14-generic'
CC [M] /home/roland/Downloads/crrcsim-0.9.8-2/interface_rctran2/kernel_module/rctran2.o
/home/roland/Downloads/crrcsim-0.9.8-2/interface_rctran2/kernel_module/rctran2.c:15:5: warning: "CONFIG_MODVERSION" is not defined
/home/roland/Downloads/crrcsim-0.9.8-2/interface_rctran2/kernel_module/rctran2.c:42: error: expected ‘)’ before string constant
/home/roland/Downloads/crrcsim-0.9.8-2/interface_rctran2/kernel_module/rctran2.c:46: error: expected ‘)’ before string constant
/home/roland/Downloads/crrcsim-0.9.8-2/interface_rctran2/kernel_module/rctran2.c: In function ‘rctran_init’:
/home/roland/Downloads/crrcsim-0.9.8-2/interface_rctran2/kernel_module/rctran2.c:154: warning: ‘deprecated_irq_flag’ is deprecated (declared at include/linux/interrupt.h:66)
/home/roland/Downloads/crrcsim-0.9.8-2/interface_rctran2/kernel_module/rctran2.c:154: warning: passing argument 2 of ‘request_irq’ from incompatible pointer type
make[2]: *** [/home/roland/Downloads/crrcsim-0.9.8-2/interface_rctran2/kernel_module/rctran2.o] Error 1
make[1]: *** [_module_/home/roland/Downloads/crrcsim-0.9.8-2/interface_rctran2/kernel_module] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.22-14-generic'
make: *** [build] Error 2


Any ideas???
Thanks!
 
Old 04-15-2008, 02:16 AM   #2
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 492

Rep: Reputation: 50
Hello,

I think you have to install the "kernel development" package with synaptic to have some build results needed by your module compilation. It's works this way on fedora, I think it's the same on ubuntu...
 
Old 04-15-2008, 08:53 PM   #3
rhauff
LQ Newbie
 
Registered: Nov 2003
Location: Minnesota, USA
Distribution: VectorLinux, Xubuntu
Posts: 25

Original Poster
Rep: Reputation: 15
There isn't a kernel development package, other than kernel headers which I already had also.
 
Old 04-16-2008, 01:54 AM   #4
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 492

Rep: Reputation: 50
OK, in fact problem is your kernel was compiled without the "Modules versioning support".
Three solutions:
-you can recompile your kernel by just changing this option (in menu "Enable loadable module support")
-understand why the driver need the modules versioning, and if it's not so important just shortcut it
-editing "/lib/modules/2.6.22-14-generic/build/.config" file and changing the line "#CONFIG_MODVERSIONS is not set" with "CONFIG_MODVERSIONS=y", but be careful, module then kernel then your whole system could crash...
 
Old 04-17-2008, 06:53 AM   #5
rhauff
LQ Newbie
 
Registered: Nov 2003
Location: Minnesota, USA
Distribution: VectorLinux, Xubuntu
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks for your help, I got past the CONFIG_MODVERSIONS problem by commenting out that section in the driver code, then ran into many other problems.

I ended up switching to an audio Line1 input which works perfectly for this.
 
  


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
Parallel port interrupt in 2.6 kernel FastCatch Linux - Hardware 0 11-02-2006 02:50 PM
Problems compiling promise sx4000 kernel module i_like_penguins Linux - Newbie 3 09-18-2004 07:08 PM
How to get Parallel Port Joysticks (eg SNES pad) working in linux 2.6.4 kernel Tyco Linux - Hardware 1 06-06-2004 02:59 PM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 05:31 PM
Install from parallel port CD problems... utabintarbo Slackware 0 05-22-2002 09:31 AM


All times are GMT -5. The time now is 11:13 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration