LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-17-2007, 02:02 AM   #1
exallon
LQ Newbie
 
Registered: Feb 2007
Posts: 17

Rep: Reputation: 0
Building lan driver help


Hi

using centos 4.92 (same error with centos 4.4)

I have downloaded the rtl8111b driver for my motherboard (asrock, conroe945g-dvi)

following the instructions in the README

make clean modules
make -C src/ clean
make[1]: Entering directory `/root/tmp/r1000_v1.05/src'
rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_versions
make[1]: Leaving directory `/root/tmp/r1000_v1.05/src'
make -C src/ modules
make[1]: Entering directory `/root/tmp/r1000_v1.05/src'
make -C /lib/modules/2.6.18-1.2747.el5xen/build SUBDIRS=/root/tmp/r1000_v1.05/src modules
make: Entering an unknown directory
make: *** /lib/modules/2.6.18-1.2747.el5xen/build: No such file or directory. Stop.
make: Leaving an unknown directory
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/root/tmp/r1000_v1.05/src'
make: *** [modules] Error 2

I am sure this is a very simple problem to solve
Thanks for you help
 
Old 03-17-2007, 02:42 AM   #2
exallon
LQ Newbie
 
Registered: Feb 2007
Posts: 17

Original Poster
Rep: Reputation: 0
seems like there is an incorrect symlink in the build directory.

this fixes it ln -sf /usr/src/kernels/2.6.18-1.2747.el5-x86_64/ /lib/modules/2.6.18-1.2747.el5xen/build

But another problem occurs after the build

make clean modules
make -C src/ clean
make[1]: Entering directory `/root/tmp/r1000_v1.05/src'
rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_version s
make[1]: Leaving directory `/root/tmp/r1000_v1.05/src'
make -C src/ modules
make[1]: Entering directory `/root/tmp/r1000_v1.05/src'
make -C /lib/modules/2.6.18-1.2747.el5xen/build SUBDIRS=/root/tmp/r1000_v1.05/sr c modules
make[2]: Entering directory `/usr/src/kernels/2.6.18-1.2747.el5-x86_64'
CC [M] /root/tmp/r1000_v1.05/src/r1000_n.o
CC [M] /root/tmp/r1000_v1.05/src/r1000_ioctl.o
LD [M] /root/tmp/r1000_v1.05/src/r1000.o
Building modules, stage 2.
MODPOST
CC /root/tmp/r1000_v1.05/src/r1000.mod.o
LD [M] /root/tmp/r1000_v1.05/src/r1000.ko
make[2]: Leaving directory `/usr/src/kernels/2.6.18-1.2747.el5-x86_64'
strip --strip-debug r1000.ko
make[1]: Leaving directory `/root/tmp/r1000_v1.05/src'
[root@megahooked r1000_v1.05]# vim README
[root@megahooked r1000_v1.05]# make install
make -C src/ install
make[1]: Entering directory `/root/tmp/r1000_v1.05/src'
install -m 644 -c r1000.ko /lib/modules/2.6.18-1.2747.el5xen/kernel/drivers/net/
make[1]: Leaving directory `/root/tmp/r1000_v1.05/src'


modprobe r1000
FATAL: Error inserting r1000 (/lib/modules/2.6.18-1.2747.el5xen/kernel/drivers/net/r1000.ko): Invalid module format

any ideas?
 
Old 03-17-2007, 03:58 AM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
It appears you installed xen kernel-source/headers, but the actual running kernel is "usr/src/kernels/2.6.18-1.2747.el5-x86_64". Notice there is no "xen" in that line. What is the results of command"

uname -r

That is the kernel-source that should be installed.
 
Old 03-18-2007, 04:11 AM   #4
exallon
LQ Newbie
 
Registered: Feb 2007
Posts: 17

Original Poster
Rep: Reputation: 0
Hi

This is the information that I can think of that would be needed.

uname -r
2.6.18-1.2747.el5xen

ll /lib/modules/2.6.18-1.2747.el5xen/kernel/drivers/net/r1000.ko

-rw-r--r-- 1 root root 65920 Mar 17 08:58 /lib/modules/2.6.18-1.2747.el5xen/kernel/drivers/net/r1000.ko

ll /lib/modules/
total 12
drwxr-xr-x 6 root root 4096 Mar 17 08:53 2.6.18-1.2747.el5
drwxr-xr-x 6 root root 4096 Mar 17 08:35 2.6.18-1.2747.el5xen
 
Old 03-18-2007, 05:24 AM   #5
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
That's puzzleing,
I don't know if it will make a difference, but I noticed the installer did not run "depmod -a", it probably would not hurt to run that command from anywhere as root.
I also noticed you issued command: "vim README", although it's not relevant, if all you wanted to do was read it, you should use command "less README", less will show you the file one page at a time, hitting the space bar to read the next screen page. Some people use "cat", but cat flashes the whole thing till it hits the end, you have to be a fast reader, some use both cat & less together but there is no need. Vim is an editor and involves a couple moves to exit where less will return your prompt.
As of this moment, "depmod -a" is the only thing I can come up with. The only reason I can think of that would give an "invalid module format" error is either using the wrong kernel-source, which is not the case. Second would be using the wrong rtl811b driver source. You should spend some time Googling that part as I've come across many articles trying to help someone else regarding ethernet module problems where people mention there are quite a few different versions of that source and not to many work.
If you got the driver source from http://www.asrock.com/mb/download.as...ConRoe945G-DVI , these are for Windows, you should check for "ndiswrapper" from Centos which will allow you to use part of the Windows driver.

Last edited by Junior Hacker; 03-18-2007 at 05:26 AM.
 
  


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
new forum: driver building mcconnaughey LQ Suggestions & Feedback 3 07-15-2005 04:22 PM
Building an ATI driver module Elomis Linux - Software 2 01-12-2005 01:50 PM
building nvidia driver xemophora Linux - Hardware 4 05-09-2004 12:10 AM
Building a driver diskette jacobmross Linux - Hardware 1 01-13-2004 01:49 AM
Crystal LAN CS8920 LAN Driver for Red Hat 8.0 potlamurali Linux - Networking 3 02-07-2003 12:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:11 PM.

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