Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am having a hard time getting my RTL8168 network card installed on Debian (Sarge, 2.4.27-2-386) I downloaded the drivers from the realtek website (the Linux driver for kernel 2.4.x and 2.6.x one)
I unpacked the files to my /usr/src folder then followed the readme and then ran 'make clean modules' as instructed in the readme. I know there are other threads on this in other places, but I haven't found one that has the same problem that I am getting. The output from 'make clean modules' is as follows:
Code:
make -C src/ clean
make[1]: Entering directory `/usr/src/r1000v1.05/src'
rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_version
s
make[1]: Leaving directory `/usr/src/r1000v1.05/src'
make -C src/ modules
make[1]: Entering directory `/usr/src/r1000v1.05/src'
make -f Makefile_linux24x
make[2]: Entering directory `/usr/src/r1000v1.05/src'
gcc -DLINUX -D__KERNEL__ -DMODULE -O2 -pipe -Wall -I/lib/modules/2.4.27-2-386/bu
ild/include -I. -DMODVERSIONS -DEXPORT_SYMTAB -include /lib/modules/2.4.27-2-386
/build/include/linux/modversions.h -c r1000_n.c -o r1000_n.o
In file included from /lib/modules/2.4.27-2-386/build/include/linux/spinlock.h:6
,
from /lib/modules/2.4.27-2-386/build/include/linux/module.h:12,
from r1000.h:1,
from r1000_n.c:5:
/lib/modules/2.4.27-2-386/build/include/asm/system.h: In function `__set_64bit_v
ar':
/lib/modules/2.4.27-2-386/build/include/asm/system.h:190: warning: dereferencing
type-punned pointer will break strict-aliasing rules
/lib/modules/2.4.27-2-386/build/include/asm/system.h:190: warning: dereferencing
type-punned pointer will break strict-aliasing rules
r1000_n.c:106:1: warning: "IRQ_NONE" redefined
In file included from /lib/modules/2.4.27-2-386/build/include/linux/netdevice.h:
481,
from r1000.h:3,
from r1000_n.c:5:
/lib/modules/2.4.27-2-386/build/include/linux/interrupt.h:18:1: warning: this is the location of the previous definition
r1000_n.c:107:1: warning: "IRQ_HANDLED" redefined
/lib/modules/2.4.27-2-386/build/include/linux/interrupt.h:19:1: warning: this is the location of the previous definition
r1000_n.c: At top level:
r1000_n.c:1296: error: syntax error before "r1000_tx_action"
r1000_n.c:1296: warning: return type defaults to `int'
r1000_n.c:1296: error: conflicting types for `r1000_tx_action'
r1000_n.c:1295: error: previous declaration of `r1000_tx_action'
r1000_n.c:1345: error: syntax error before "r1000_rx_action"
r1000_n.c:1345: warning: return type defaults to `int'
r1000_n.c:1345: error: conflicting types for `r1000_rx_action'
r1000_n.c:1344: error: previous declaration of `r1000_rx_action'
r1000_n.c: In function `r1000_interrupt':
r1000_n.c:1479: warning: `return' with a value, in function returning void
r1000_n.c:1483: warning: `return' with a value, in function returning void
make[2]: *** [r1000_n.o] Error 1
make[2]: Leaving directory `/usr/src/r1000v1.05/src'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/r1000v1.05/src'
make: *** [modules] Error 2
debian:/usr/src/r1000v1.05#
The first line that it has a problem with is the second line below:
When I view the code 'FASTCALL' appears blue, but 'fastcall' doesn't. I tried deleting the 'fastcall' between 'void' and 'r1000..' and it managed to build. Does this mean I am missing some libraries or something?
Don't know about your compiling problem, but I downloaded this same driver (the R1000 one) to get my onboard RTL8168/8111B NIC going. I did get it compiled and installed, but I had endless problems actually getting it to work...
Personally I consider the R1000 driver broken for Linux. I eventually gave up and got myself a normal PCI RTL8139 (which is solidly supported under Linux) NIC and my network setup is working perfectly now.
These old 8139 based NICs are really cheap - why not just disable the other NIC in your BIOS and try an 8139 based one? IF you have an onboard NIC, that is...
Why you want a 100 Mb NIC while the NIC you have is a 1 Gb for PCI Express slots. If you have an open standard PCI slot, the Realtek 8169 NIC works just fine. If you do not have any open PCI slot, look into an 100 Mb USB NIC from Linksys model (USB100TX). It is possible that Linksys USB200M can work. Other brands for USB NIC could work too.
The latest kernel version 2.6.19 is very different than 2.6.8 which majority of manufactures program for. it is the same for kernel version 2.4.x. I suggest compile the software with 2.4.26/2.6.8 or lower. The compiler that you should use is 3.3 or 2.95.
I tried deleting the lines 136/137 and then moving the ones with FASTCALL to where the original ones were as you said, but it didn't work. Here is the output from "make clean modules".
Code:
make -f Makefile_linux24x
make[1]: Entering directory `/home/simon/r1000_v1.05/src'
gcc -DLINUX -D__KERNEL__ -DMODULE -O2 -pipe -Wall -I/lib/modules/2.4.27-2-386/bu
ild/include -I. -DMODVERSIONS -DEXPORT_SYMTAB -include /lib/modules/2.4.27-2-386
/build/include/linux/modversions.h -c r1000_n.c -o r1000_n.o
In file included from /lib/modules/2.4.27-2-386/build/include/linux/spinlock.h:6
,
from /lib/modules/2.4.27-2-386/build/include/linux/module.h:12,
from r1000.h:1,
from r1000_n.c:5:
/lib/modules/2.4.27-2-386/build/include/asm/system.h: In function `__set_64bit_v
ar':
/lib/modules/2.4.27-2-386/build/include/asm/system.h:190: warning: dereferencing
type-punned pointer will break strict-aliasing rules
/lib/modules/2.4.27-2-386/build/include/asm/system.h:190: warning: dereferencing
type-punned pointer will break strict-aliasing rules
r1000_n.c:106:1: warning: "IRQ_NONE" redefined
In file included from /lib/modules/2.4.27-2-386/build/include/linux/netdevice.h:
481,
from r1000.h:3,
from r1000_n.c:5:
/lib/modules/2.4.27-2-386/build/include/linux/interrupt.h:18:1: warning: this is the location of the previous definition
r1000_n.c:107:1: warning: "IRQ_HANDLED" redefined
/lib/modules/2.4.27-2-386/build/include/linux/interrupt.h:19:1: warning: this is the location of the previous definition
r1000_n.c: At top level:
r1000_n.c:1296: error: syntax error before "r1000_tx_action"
r1000_n.c:1296: warning: return type defaults to `int'
r1000_n.c:1296: error: conflicting types for `r1000_tx_action'
r1000_n.c:136: error: previous declaration of `r1000_tx_action'
r1000_n.c:1345: error: syntax error before "r1000_rx_action"
r1000_n.c:1345: warning: return type defaults to `int'
r1000_n.c:1345: error: conflicting types for `r1000_rx_action'
r1000_n.c:137: error: previous declaration of `r1000_rx_action'
r1000_n.c: In function `r1000_interrupt':
r1000_n.c:1479: warning: `return' with a value, in function returning void
r1000_n.c:1483: warning: `return' with a value, in function returning void
make[1]: *** [r1000_n.o] Error 1
make[1]: Leaving directory `/home/simon/r1000_v1.05/src'
make: *** [modules] Error 2
Since originally posting this topic I found an old network card that was in my house, so I can use the internet on Debian at the moment, but I wouldn't mind still getting this problem sorted out.
I might try updating to a newer kernel version at some point, but I don't really want to do that at the moment, because I haven't really got time to sort everything out if it gets messed up like last time I tried.
comment out first declaration that does not have fastcall macro and move the second declaration that does have the fastcall macro up.
Quote:
Originally Posted by swil232
Hi,
Thanks for the replies.
I tried deleting the lines 136/137 and then moving the ones with FASTCALL to where the original ones were as you said, but it didn't work. Here is the output from "make clean modules".
Code:
make -f Makefile_linux24x
make[1]: Entering directory `/home/simon/r1000_v1.05/src'
gcc -DLINUX -D__KERNEL__ -DMODULE -O2 -pipe -Wall -I/lib/modules/2.4.27-2-386/bu
ild/include -I. -DMODVERSIONS -DEXPORT_SYMTAB -include /lib/modules/2.4.27-2-386
/build/include/linux/modversions.h -c r1000_n.c -o r1000_n.o
In file included from /lib/modules/2.4.27-2-386/build/include/linux/spinlock.h:6
,
from /lib/modules/2.4.27-2-386/build/include/linux/module.h:12,
from r1000.h:1,
from r1000_n.c:5:
/lib/modules/2.4.27-2-386/build/include/asm/system.h: In function `__set_64bit_v
ar':
/lib/modules/2.4.27-2-386/build/include/asm/system.h:190: warning: dereferencing
type-punned pointer will break strict-aliasing rules
/lib/modules/2.4.27-2-386/build/include/asm/system.h:190: warning: dereferencing
type-punned pointer will break strict-aliasing rules
r1000_n.c:106:1: warning: "IRQ_NONE" redefined
In file included from /lib/modules/2.4.27-2-386/build/include/linux/netdevice.h:
481,
from r1000.h:3,
from r1000_n.c:5:
/lib/modules/2.4.27-2-386/build/include/linux/interrupt.h:18:1: warning: this is the location of the previous definition
r1000_n.c:107:1: warning: "IRQ_HANDLED" redefined
/lib/modules/2.4.27-2-386/build/include/linux/interrupt.h:19:1: warning: this is the location of the previous definition
r1000_n.c: At top level:
r1000_n.c:1296: error: syntax error before "r1000_tx_action"
r1000_n.c:1296: warning: return type defaults to `int'
r1000_n.c:1296: error: conflicting types for `r1000_tx_action'
r1000_n.c:136: error: previous declaration of `r1000_tx_action'
r1000_n.c:1345: error: syntax error before "r1000_rx_action"
r1000_n.c:1345: warning: return type defaults to `int'
r1000_n.c:1345: error: conflicting types for `r1000_rx_action'
r1000_n.c:137: error: previous declaration of `r1000_rx_action'
r1000_n.c: In function `r1000_interrupt':
r1000_n.c:1479: warning: `return' with a value, in function returning void
r1000_n.c:1483: warning: `return' with a value, in function returning void
make[1]: *** [r1000_n.o] Error 1
make[1]: Leaving directory `/home/simon/r1000_v1.05/src'
make: *** [modules] Error 2
Since originally posting this topic I found an old network card that was in my house, so I can use the internet on Debian at the moment, but I wouldn't mind still getting this problem sorted out.
I might try updating to a newer kernel version at some point, but I don't really want to do that at the moment, because I haven't really got time to sort everything out if it gets messed up like last time I tried.
I don't know what's happening. I can only confirm that I have one of those Realtek 8111/8168 NICs and the driver compiled without a problem on both Debian and Fedora. I'll have a look at the error messages again later again this evening.
Edit: I see you're still using Sarge. I nearly killed myself over that one. Tried everything for a month and gave up. Thank God for Etch.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.