PDA

View Full Version : Help with a CNet Gigabit Lan Adapter


Damage
20-07-2005, 09:01 AM
I bought a CNet Gigabit Lan Adapter at Netstation because it had drivers for Linux.
But they dont make sence to me...

Please help me install this card..

Files on driver are:
Makefile
r8169.c

Readme is:
r8169.c -- RTL8169s/8110s Linux driver version 1.3 <2003-06-20>

1. This driver supports RealTek RTL8169s/8110s Gigabit Ethernet driver for Linux kernel 2.4.x.

2. Installation steps:
* (1)Compiling r8169.c using 'Makefile'.
"make"
* * *
* * *<NOTE>Please remember to ASSIGN "NEW_INCLUDE_PATH" in Makefile according to linux kernel.

* (2)Move r8169.o to the directory "/lib/modules/<kernel>/kernel/drivers/net".
* "cp r8169.o /lib/modules/<kernel>/kernel/drivers/net"
* * *where <kernel> represents the kernel version, say 2.4.18-3 in Red Hat 7.3

* (3)Insert module by
"insmod r8169"

* (4)Check driver status
"dmesg"

3. The media can be forced to one of the 5 modes as follows.
Cmd: "insmod r8169 media = SET_MEDIA"
For example:
* * * * "insmod r8169 media = 0x04" will force PHY to operate in 100Mpbs Half-duplex.

*SET_MEDIA can be:
* _10_Half = 0x01
* _10_Full = 0x02
* _100_Half = 0x04
* _100_Full = 0x08
* _1000_Full = 0x10

This is what is in the "Makefile"
# Makefile for a basic kernel module

CC=gcc
MODCFLAGS := -O6 -Wall -DMODULE -D__KERNEL__ -DLINUX
NEW_INCLUDE_PATH=-I /usr/src/linux-2.4.18-3/include/

r8169.o: r8169.c /usr/include/linux/version.h
*$(CC) $(MODCFLAGS) $(NEW_INCLUDE_PATH) -c r8169.c

And I am running Fedora Core 3 and it doesnt have "/lib/modules/<kernel>/kernel/drivers/net" this directory.

Thanks
Damage

MaJ
20-07-2005, 10:34 AM
Dude!, that is the most straight forward set of instructions I have ever read.

I cant make it any easier to explain than that, but I will try.

The r8169.c file is written in C & needs to be compiled using a GCC (General C Compiler).

Using the "makefile" command (as you see the gcc command in the makefile) compile the file.

make r8169.c

then copy the compiled driver to your device drivers

cp r8169.o /lib/modules/<kernel>/net/

the "insmod" **insert module** command will patch the driver to your kernel.

"insmod r8169"

then double check the driver loaded ok with

dmesg

dmesg will show any errors if they occured in the kernel.

In theory this should work, but I dont have a linux box infront of me to double check anything.

Damage
20-07-2005, 11:46 AM
Yeah have tried this....

I typed in konsole:
make r8169.c

It says:
make: Nothing to be done for 'r8169.c'.

Any ideas as it didnt make the r8169.o file

MaJ
20-07-2005, 12:36 PM
kk just try:

make

Damage
20-07-2005, 12:48 PM
In fedora core 3
It has this driver and the Cnet card has the Realtec 8169 chip.
Can I use this one & how would I do it

/lib/modules/2.6.6/kernel/drivers/net/r8169.ko

MaJ
20-07-2005, 02:22 PM
did you try the make command?

just make sure support is compiled into your kernel & you should be able to use the native driver.

Damage
20-07-2005, 07:53 PM
Make command says this....

Makefile:8: *** missing separator. Stop.

Man, I need some serious help...
Come on..

MaJ
20-07-2005, 09:36 PM
you saying im not seriously helping?

give me access and ill do it for you.

Damage
21-07-2005, 08:34 AM
Originally posted by MaJ@Jul 20 2005, 08:36 PM
you saying im not seriously helping?

give me access and ill do it for you.
86073


How do you want access..

I can do it with puTTY..

but that is all I know with remote.