-   Linux - Newbie (
-   -   Building lan driver help (

exallon 03-17-2007 03:02 AM

Building lan driver help

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

exallon 03-17-2007 03:42 AM

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.
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?

Junior Hacker 03-17-2007 04:58 AM

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.

exallon 03-18-2007 05:11 AM


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

uname -r

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

Junior Hacker 03-18-2007 06:24 AM

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 , these are for Windows, you should check for "ndiswrapper" from Centos which will allow you to use part of the Windows driver.

All times are GMT -5. The time now is 10:29 AM.