Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Realtek 8168 NIC - can't compile module r8168
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Javanni
n00b
n00b


Joined: 14 May 2006
Posts: 2

PostPosted: Sun May 14, 2006 7:37 pm    Post subject: Realtek 8168 NIC - can't compile module r8168 Reply with quote

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
View user's profile Send private message
borsdel
Apprentice
Apprentice


Joined: 01 Nov 2005
Posts: 289
Location: de

PostPosted: Sun May 14, 2006 11:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
Javanni
n00b
n00b


Joined: 14 May 2006
Posts: 2

PostPosted: Mon May 15, 2006 11:33 pm    Post subject: Reply with quote

No way! :(
Back to top
View user's profile Send private message
superwutze
Tux's lil' helper
Tux's lil' helper


Joined: 09 Dec 2004
Posts: 137
Location: Europe/Vienna

PostPosted: Fri Jul 07, 2006 3:10 pm    Post subject: Reply with quote

according to http://www.root-forum.org/showthread.php?p=4897 there are several problems at once in the r1000 driver (including a typo 8O ).

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 :D )
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 8O

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
View user's profile Send private message
dlewin
n00b
n00b


Joined: 09 Jul 2006
Posts: 28

PostPosted: Sun Jul 09, 2006 9:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
superwutze
Tux's lil' helper
Tux's lil' helper


Joined: 09 Dec 2004
Posts: 137
Location: Europe/Vienna

PostPosted: Thu Jul 13, 2006 11:45 am    Post subject: Reply with quote

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
View user's profile Send private message
superwutze
Tux's lil' helper
Tux's lil' helper


Joined: 09 Dec 2004
Posts: 137
Location: Europe/Vienna

PostPosted: Tue Aug 01, 2006 8:22 pm    Post subject: Reply with quote

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

Code:
MODULE_PARM

with
Code:
MODULE_PARM_DESC

and it works
_________________
bill who? micro what?
Back to top
View user's profile Send private message
dlewin
n00b
n00b


Joined: 09 Jul 2006
Posts: 28

PostPosted: Thu Aug 03, 2006 11:03 am    Post subject: Reply with quote

that is exactly I was looking for, thanks.
Back to top
View user's profile Send private message
socksz
Apprentice
Apprentice


Joined: 28 Aug 2006
Posts: 233

PostPosted: Mon Aug 28, 2006 4:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
socksz
Apprentice
Apprentice


Joined: 28 Aug 2006
Posts: 233

PostPosted: Mon Aug 28, 2006 5:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
superwutze
Tux's lil' helper
Tux's lil' helper


Joined: 09 Dec 2004
Posts: 137
Location: Europe/Vienna

PostPosted: Mon Sep 18, 2006 4:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
nader emami
Tux's lil' helper
Tux's lil' helper


Joined: 14 Sep 2006
Posts: 88
Location: Netherlands

PostPosted: Wed Sep 20, 2006 6:28 am    Post subject: Reply with quote

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
View user's profile Send private message
c0balt
Guru
Guru


Joined: 04 Jul 2004
Posts: 441
Location: Germany

PostPosted: Sun Oct 08, 2006 2:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
superwutze
Tux's lil' helper
Tux's lil' helper


Joined: 09 Dec 2004
Posts: 137
Location: Europe/Vienna

PostPosted: Mon Oct 09, 2006 6:58 am    Post subject: Reply with quote

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
View user's profile Send private message
c0balt
Guru
Guru


Joined: 04 Jul 2004
Posts: 441
Location: Germany

PostPosted: Mon Oct 09, 2006 4:27 pm    Post subject: Reply with quote

Figured it out myself in the meantime (sry, wasnt able to post)

thx though!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum