View previous topic :: View next topic |
Author |
Message |
Javanni n00b
Joined: 14 May 2006 Posts: 2
|
Posted: Sun May 14, 2006 7:37 pm Post subject: Realtek 8168 NIC - can't compile module r8168 |
|
|
I'm having trouble compiling the module for my onboard Realtek 8168 network card.
I downloaded the drivers from Realtek website, latest version (1.02), but when I try to Make them I get:
Code: |
make -C src/ clean
make[1]: Entering directory `/root/r1000/src'
rm -f *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags
make[1]: Leaving directory `/root/r1000/src'
make -C src/ modules
make[1]: Entering directory `/root/r1000/src'
make -C /lib/modules/2.6.15-gentoo-r5/build SUBDIRS=/root/r1000/src modules
make: *** /lib/modules/2.6.15-gentoo-r5/build: No such file or directory. Stop.
make: Entering an unknown directorymake: Leaving an unknown directorymake[1]: *** [modules] Error 2
make[1]: Leaving directory `/root/r1000/src'
make: *** [modules] Error 2
|
What I'm supposed do to get them working?
Thanks in advance,
G.B. |
|
Back to top |
|
|
borsdel Apprentice
Joined: 01 Nov 2005 Posts: 289 Location: de
|
Posted: Sun May 14, 2006 11:09 pm Post subject: |
|
|
moin,
here a translation from a german forum
1. copy entire folder "r1000" from archive to /usr/src/linux
2. copy folder "src" from archive to /usr/src/linux/r1000
3. cd /usr/src/linux/r1000
4. follow readme:
"make clean modules"
"make install"
"depmod -a"
5. cd /usr/src/linux/r1000/src
6. modprobe r1000
7. modprobe -l | grep r1000
8. restart, try modprobe again
no garanty, but perhaps a little help
mfg borsdel |
|
Back to top |
|
|
Javanni n00b
Joined: 14 May 2006 Posts: 2
|
Posted: Mon May 15, 2006 11:33 pm Post subject: |
|
|
No way! |
|
Back to top |
|
|
superwutze Tux's lil' helper
Joined: 09 Dec 2004 Posts: 137 Location: Europe/Vienna
|
Posted: Fri Jul 07, 2006 3:10 pm Post subject: |
|
|
according to http://www.root-forum.org/showthread.php?p=4897 there are several problems at once in the r1000 driver (including a typo ).
i followed the howto in the first post and it works great!
translation:
become root
Code: | su -
***password*** |
unpack the archive of the 1.03 driver package
Code: | unzip linux-r1000(103).zip |
copy the r1000 folder into your kernel-source-tree
Code: | cp -a r1000 /usr/src/linux/ |
they copy the src directory contained inside the r1000 folder also to the kernel-sources, i did it with a symlink
Code: | ln -s /usr/src/linux/r1000/src /usr/src/linux/ |
now go to the r1000 folder (as root) and try to compile
Code: | cd /usr/src/linux/r1000
make clean modules |
if that works then you are on the lucky side (or using an old kernel-version )
now they give two options:
i386: edit line 46 in r1000/src/r1000_n.c:
Code: | from
MODULE_PARM (media, "1-" __MODULE_STRING(MAX_UNITS) "i");
to
MODULE_PARM_DESC (media, "1-" __MODULE_STRING(MAX_UNITS) "i"); |
now it should compile
amd64: edit line 1450 in r1000/src/r1000_n.c:
Code: | from
synchronize_irq (entdev->irq);
to
synchronize_irq (netdev->irq); |
that's a typo
now it should compile
as i am using amd64 linux i can approve that the amd64-fix works! _________________ bill who? micro what? |
|
Back to top |
|
|
dlewin n00b
Joined: 09 Jul 2006 Posts: 28
|
Posted: Sun Jul 09, 2006 9:23 pm Post subject: |
|
|
What I don't understand is that there is not any kernel source in /usr/src , where do you take it from ? |
|
Back to top |
|
|
superwutze Tux's lil' helper
Joined: 09 Dec 2004 Posts: 137 Location: Europe/Vienna
|
Posted: Thu Jul 13, 2006 11:45 am Post subject: |
|
|
if you installed gentoo according to the gentoo handbook the kernel source resides in /usr/src/linux-xx.yy-rz and /usr/src/linux is a symlink to that directory
if there is really nothing there try
Code: | emerge gentoo-sources |
_________________ bill who? micro what? |
|
Back to top |
|
|
superwutze Tux's lil' helper
Joined: 09 Dec 2004 Posts: 137 Location: Europe/Vienna
|
Posted: Tue Aug 01, 2006 8:22 pm Post subject: |
|
|
something to mention:
with 2.6.17 the compile fails because there is some old definition in the r1000_n.c code. there you have to replace
with
and it works _________________ bill who? micro what? |
|
Back to top |
|
|
dlewin n00b
Joined: 09 Jul 2006 Posts: 28
|
Posted: Thu Aug 03, 2006 11:03 am Post subject: |
|
|
that is exactly I was looking for, thanks. |
|
Back to top |
|
|
socksz Apprentice
Joined: 28 Aug 2006 Posts: 233
|
Posted: Mon Aug 28, 2006 4:07 pm Post subject: |
|
|
Yes but.. i'm on livecd and i have the same problem..
ls -l /usr/src report:
total 0.
:S how can i compile without kernel sources? my net is down. |
|
Back to top |
|
|
socksz Apprentice
Joined: 28 Aug 2006 Posts: 233
|
Posted: Mon Aug 28, 2006 5:37 pm Post subject: |
|
|
socksz wrote: | Yes but.. i'm on livecd and i have the same problem..
ls -l /usr/src report:
total 0.
:S how can i compile without kernel sources? my net is down. |
uhm.. if possible load drivers on LIVECD or not?
if yes, how? please.. |
|
Back to top |
|
|
superwutze Tux's lil' helper
Joined: 09 Dec 2004 Posts: 137 Location: Europe/Vienna
|
Posted: Mon Sep 18, 2006 4:40 pm Post subject: |
|
|
just upgraded to r1000 v 1.04, the typo is gone but the MODULE_PARM error stays. now it is 3 times (lines 51,52,53 afair). simply replace MODULE_PARM with MODULE_PARM_DESC and it works like a charm. v 1.03 worked for me and v 1.04 works also (so far). _________________ bill who? micro what? |
|
Back to top |
|
|
nader emami Tux's lil' helper
Joined: 14 Sep 2006 Posts: 88 Location: Netherlands
|
Posted: Wed Sep 20, 2006 6:28 am Post subject: |
|
|
borsdel wrote: | moin,
here a translation from a german forum
1. copy entire folder "r1000" from archive to /usr/src/linux
2. copy folder "src" from archive to /usr/src/linux/r1000 it is not clear what you mean of folder "src" and "archive"! Do you mean "src" which in folder "r1000" is?
3. cd /usr/src/linux/r1000
4. follow readme:
"make clean modules"
"make install"
"depmod -a"
5. cd /usr/src/linux/r1000/src
6. modprobe r1000
7. modprobe -l | grep r1000
8. restart, try modprobe again
no garanty, but perhaps a little help
mfg borsdel |
|
|
Back to top |
|
|
c0balt Guru
Joined: 04 Jul 2004 Posts: 441 Location: Germany
|
Posted: Sun Oct 08, 2006 2:04 pm Post subject: |
|
|
superwutze wrote: | just upgraded to r1000 v 1.04, the typo is gone but the MODULE_PARM error stays. now it is 3 times (lines 51,52,53 afair). simply replace MODULE_PARM with MODULE_PARM_DESC and it works like a charm. v 1.03 worked for me and v 1.04 works also (so far). |
It still refuses to compile for me
After I finally got gentoo-sources to emerge (had to download them on my desktop, put them on the notebook via windows boot, then copy them from win partition to /usr/portage/distfiles and it emerged^^)
but even with fixing "MODULE_PARM" I get an error
Code: | [...] Entering dircetory /lib/modules/2.6.17-gentoo-r7/build
[...] No rule to make target 'modules'. Stop. |
??? help |
|
Back to top |
|
|
superwutze Tux's lil' helper
Joined: 09 Dec 2004 Posts: 137 Location: Europe/Vienna
|
Posted: Mon Oct 09, 2006 6:58 am Post subject: |
|
|
you need to have kernel-sources with which your actual kernel was compiled. during compilation of your kernel several parts are built that are needed to compile modules. if your kernel sources were just clean emerged then there are several things missing.
also you need to do 'make modules_install' in /usr/src/linux before the r1000 module will compile, because in that step /lib/modules/{your_kernel_version} will be created.
where did your kernel come from? how did you get your kernel without having sources installed? _________________ bill who? micro what? |
|
Back to top |
|
|
c0balt Guru
Joined: 04 Jul 2004 Posts: 441 Location: Germany
|
Posted: Mon Oct 09, 2006 4:27 pm Post subject: |
|
|
Figured it out myself in the meantime (sry, wasnt able to post)
thx though! |
|
Back to top |
|
|
|