LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 08-24-2006, 07:50 PM   #1
Jukas
Member
 
Registered: Mar 2005
Posts: 139

Rep: Reputation: 15
Realtek 8111B Nic under Debian 3.1 Testing


I must have the worst luck with onboard Nic's possible. Apparently even the testing version of Debian 3.1 doesn't see the Realtek 8111B 10/100/1000 nic built into the Gigabyte GA-945GM-S2 Motherboard I have.

Here's the output of a lspci

Quote:
$ lspci
00:00.0 Host bridge: Intel Corporation 945G/GZ/P/PL Express Memory Controller Hub (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 945G/GZ Express Integrated Graphics Controller (rev 02)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controller IDE (rev 01)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Unknown device 8168 (rev 01)
If I understand lspci correctly, the only thing that the kernel isn't recognizing correctly is the eth0. It appears to be seeing the north and south bridge chipsets and controllers.

I went to the realtek site and downloaded the linux drivers for the 8168 RTL8111B chipset. I uncompressed the tarball and checked out the readme, which states

Quote:
<Linux device driver for Realtek Ethernet controllers>

This is the Linux device driver released for RealTek Ethernet controllers, which are listed as following.
1. RTL8169S/SB/SC (Gigabit Ethernet with PCI interface)
2. RTL8168B (Gigabit Ethernet with PCI-Express interface)
3. RTL8101E (Fast Ethernet with PCI-Express interface)

<Requirements>

- kernel source tree (supported versions 2.4.x or 2.6.x)
- compiler/binutils for kernel compilation



<Quick install with proper kernel settings>

Unpack the tarball :
tar vzxf r1000_vX.YZ.tgz

Change to the directory:
cd r1000_vX.YZ

If you are running the target kernel, then you should be
able to do :

make clean modules (as root or with sudo)
make install
depmod -a




<Force Link Status>

1. Force the link status when insert the driver.
If the user is in the path ~/r1000, the link status can be forced to one of the 5 modes as following command.

#insmod ./src/r1000.ko speed=SPEED_MODE duplex=DUPLEX_MODE autoneg=NWAY_OPTION

,where
SPEED_MODE = 1000 for 1000Mbps
= 100 for 100Mbps
= 10 for 10Mbps
DUPLEX_MODE = 0 for half-duplex
= 1 for full-duplex
NWAY_OPTION = 0 for auto-negotiation off
= 1 for auto-negotiation on
For example:
#insmod ./src/r1000.ko speed=100 duplex=0 autoneg=0
will force PHY to operate in 100Mpbs Half-duplex.

2. Force the link status by using ethtool.
a. Insert the driver first.
b. Make sure that ethtool exists in /sbin.
c. Force the link status as the following command.

#ethtool -s eth? speed SPEED_MODE duplex DUPLEX_MODE autoneg NWAY_OPTION

,where
SPEED_MODE = 1000 for 1000Mbps
= 100 for 100Mbps
= 10 for 10Mbps
DUPLEX_MODE = half for half-duplex
= full for full-duplex
NWAY_OPTION = off for auto-negotiation off
= on for auto-negotiation on

<Advanced feature>

- Supports Jumbo Frame
- Hardware Tx/Rx flow control
I checked to be sure I was running the kernel I wanted to be

Quote:
$ uname -a
Linux mailin-01 2.6.16-2-686-smp #1 SMP Sat Jul 15 22:33:00 UTC 2006 i686 GNU/Linux
and then went to do a make clean modules at which point it spit out the following error

Quote:
$ make clean modules
make -C src/ clean
make[1]: Entering directory `/downloads/r1000_v1.04/src'
rm -f *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags
make[1]: Leaving directory `/downloads/r1000_v1.04/src'
make -C src/ modules
make[1]: Entering directory `/downloads/r1000_v1.04/src'
make -C /lib/modules/2.6.16-2-686-smp/build SUBDIRS=/downloads/r1000_v1.04/src modules
make: Entering an unknown directory
make: *** /lib/modules/2.6.16-2-686-smp/build: No such file or directory. Stop.
make: Leaving an unknown directory
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/downloads/r1000_v1.04/src'
make: *** [modules] Error 2
I checked and indeed the /lib/modules/2.6.16-2-686-smp/build directory doesn't exist but simply creating it doesn't fix the issue either.

Any idea what I did wrong?
 
Old 08-24-2006, 07:56 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 264Reputation: 264Reputation: 264
Did you install the kernel source tree (i.e. aptitude install linux-source-2.6.16)?
 
Old 08-24-2006, 08:11 PM   #3
Jukas
Member
 
Registered: Mar 2005
Posts: 139

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pljvaldez
Did you install the kernel source tree (i.e. aptitude install linux-source-2.6.16)?

Yup, I sure did.

Quote:
ls -lh
total 111M
-rw-r--r-- 1 root root 34M 2006-07-15 01:24 kernel-source-2.6.8.tar.bz2
lrwxrwxrwx 1 root src 19 2006-08-24 18:10 linux -> linux-source-2.6.16
drwxr-xr-x 19 root root 4.0K 2006-07-15 08:32 linux-source-2.6.16
-rw-r--r-- 1 root src 39M 2006-08-24 14:16 linux-source-2.6.16_2.6.16-17_all.deb
-rw-r--r-- 1 root root 39M 2006-07-15 11:01 linux-source-2.6.16.tar.bz2
/usr/src# apt-get install linux-source-2.6.16
Reading package lists... Done
Building dependency tree... Done
linux-source-2.6.16 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
 
Old 08-25-2006, 04:23 PM   #4
Jukas
Member
 
Registered: Mar 2005
Posts: 139

Original Poster
Rep: Reputation: 15
Now I'm really baffled. I thought maybe I'd just compile a new kernel from source.. but during make menuconfig I get the following error.

Quote:
scripts/kconfig/mconf.c:91: error: static declaration of ācurrent_menuā follows non-static declaration
scripts/kconfig/lkc.h:63: error: previous declaration of ācurrent_menuā was here
make[1]: *** [scripts/kconfig/mconf.o] Error 1
make: *** [menuconfig] Error 2
I've had no problems compiling a kernel on other systems, and I ran the ver_linux script included with teh source to make sure I had compatible software.

What the heck is going on here?
 
Old 08-25-2006, 04:32 PM   #5
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 264Reputation: 264Reputation: 264
Do you have to have an ncurses library installed to do make menuconfig?
 
Old 08-25-2006, 04:50 PM   #6
Jukas
Member
 
Registered: Mar 2005
Posts: 139

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pljvaldez
Do you have to have an ncurses library installed to do make menuconfig?
I have libncurses5-dev installed. Afaik the ncurses library is included in it.
 
Old 08-25-2006, 04:53 PM   #7
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 57
Also you need the kernel header package not the source this will work for building most modules, install the module-assistant package and run m-a prepare it should download and install the proper headers then create the link needed for building.
 
Old 08-29-2006, 12:28 PM   #8
Jukas
Member
 
Registered: Mar 2005
Posts: 139

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by HappyTux
Also you need the kernel header package not the source this will work for building most modules, install the module-assistant package and run m-a prepare it should download and install the proper headers then create the link needed for building.
I have the module-assistant package and did run m-a prepare. Here is the my /usr/src directory

[quote]
mailin-01:/downloads/r1000_v1.04# ls -lh /usr/src
total 40M
lrwxrwxrwx 1 root src 39 2006-08-29 10:24 linux -> /usr/src/linux-headers-2.6.16-2-686-smp
drwxr-xr-x 5 root root 4.0K 2006-08-29 10:21 linux-headers-2.6.16-2-686-smp
lrwxrwxrwx 1 root src 19 2006-08-29 10:09 linux-OLDVERSION.1156872082 -> linux-source-2.6.16
lrwxrwxrwx 1 root src 30 2006-08-29 10:21 linux-OLDVERSION.1156872278 -> linux-headers-2.6.16-2-686-smp
drwxr-xr-x 19 root root 4.0K 2006-08-29 10:11 linux-source-2.6.16
-rw-r--r-- 1 root root 40M 2006-08-18 14:59 linux-source-2.6.16.tar.bz2
drwxr-sr-x 4 jukas src 4.0K 2006-08-29 10:20 modass
[quote]

# uname -a
Linux mailin-01 2.6.16-2-686-smp #1 SMP Fri Aug 18 19:25:21 UTC 2006 i686 GNU/Linux

But when I run 'make clean modules' in the driver dir I get a new error

Quote:
mailin-01:/downloads/r1000_v1.04# make clean modules
make -C src/ clean
make[1]: Entering directory `/downloads/r1000_v1.04/src'
rm -f *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags
make[1]: Leaving directory `/downloads/r1000_v1.04/src'
make -C src/ modules
make[1]: Entering directory `/downloads/r1000_v1.04/src'
make -C /lib/modules/2.6.16-2-686-smp/build SUBDIRS=/downloads/r1000_v1.04/src modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.16-2-686-smp'
make[2]: Makefile: No such file or directory
make[2]: *** No rule to make target `Makefile'. Stop.
make[2]: Leaving directory `/usr/src/linux-headers-2.6.16-2-686-smp'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/downloads/r1000_v1.04/src'
make: *** [modules] Error 2
mailin-01:/downloads/r1000_v1.04#
I've never had these kind of problems when installing stuff from source. What in the blazes am I doing wrong here?
 
Old 08-29-2006, 01:03 PM   #9
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 57
Quote:
Originally Posted by Jukas
I have the module-assistant package and did run m-a prepare. Here is the my /usr/src directory
Quote:
mailin-01:/downloads/r1000_v1.04# ls -lh /usr/src
total 40M
lrwxrwxrwx 1 root src 39 2006-08-29 10:24 linux -> /usr/src/linux-headers-2.6.16-2-686-smp
drwxr-xr-x 5 root root 4.0K 2006-08-29 10:21 linux-headers-2.6.16-2-686-smp
lrwxrwxrwx 1 root src 19 2006-08-29 10:09 linux-OLDVERSION.1156872082 -> linux-source-2.6.16
lrwxrwxrwx 1 root src 30 2006-08-29 10:21 linux-OLDVERSION.1156872278 -> linux-headers-2.6.16-2-686-smp
drwxr-xr-x 19 root root 4.0K 2006-08-29 10:11 linux-source-2.6.16
-rw-r--r-- 1 root root 40M 2006-08-18 14:59 linux-source-2.6.16.tar.bz2
drwxr-sr-x 4 jukas src 4.0K 2006-08-29 10:20 modass
Quote:

# uname -a
Linux mailin-01 2.6.16-2-686-smp #1 SMP Fri Aug 18 19:25:21 UTC 2006 i686 GNU/Linux

But when I run 'make clean modules' in the driver dir I get a new error



I've never had these kind of problems when installing stuff from source. What in the blazes am I doing wrong here?

That is strange it is looking for the Makefile that should be in kernel headers directory.

Code:
>$ ll /usr/src/linux-headers-2.6.17-ck1-smp/Makefile
-rw-r--r-- 1 root root 44K 2006-06-18 10:50 /usr/src/linux-headers-2.6.17-ck1-smp/Makefile
Try this for the file I modified the one in my 2.6.16 tree to hopefully get the EXTRAVERSION = correctly which is what it would be looking for anyways as the Makefile contents is pretty generic save it with the same permissions as you see with my 2.6.17 one above.
 
Old 08-29-2006, 01:20 PM   #10
Jukas
Member
 
Registered: Mar 2005
Posts: 139

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by HappyTux
That is strange it is looking for the Makefile that should be in kernel headers directory.

Code:
>$ ll /usr/src/linux-headers-2.6.17-ck1-smp/Makefile
-rw-r--r-- 1 root root 44K 2006-06-18 10:50 /usr/src/linux-headers-2.6.17-ck1-smp/Makefile
Try this for the file I modified the one in my 2.6.16 tree to hopefully get the EXTRAVERSION = correctly which is what it would be looking for anyways as the Makefile contents is pretty generic save it with the same permissions as you see with my 2.6.17 one above.
This is baffling.. the Makefiles that are in the linux-headers dirs are symlinked all to hell and back.

Initally I saw

Code:
mailin-01:/usr/src/linux-headers-2.6.16-2-686-smp# ls -l Makefile
lrwxrwxrwx 1 root root 34 2006-08-29 10:21 Makefile -> ../linux-headers-2.6.16-2/Makefile
So I removed the symlink and placed your Makefile there, and then it started spitting out:

Code:
mailin-01:/downloads/r1000_v1.04# make clean modules
make -C src/ clean
make[1]: Entering directory `/downloads/r1000_v1.04/src'
rm -f *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags
make[1]: Leaving directory `/downloads/r1000_v1.04/src'
make -C src/ modules
make[1]: Entering directory `/downloads/r1000_v1.04/src'
make -C /lib/modules/2.6.16-2-686-smp/build SUBDIRS=/downloads/r1000_v1.04/src modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.16-2-686-smp'
Makefile:524: /usr/src/linux-headers-2.6.16-2-686-smp/arch/i386/Makefile: No such file or directory
make[2]: *** No rule to make target `/usr/src/linux-headers-2.6.16-2-686-smp/arch/i386/Makefile'.  Stop.
Code:
ls -l /usr/src/linux-headers-2.6.16-2-686-smp/arch/i386/Makefile
lrwxrwxrwx 1 root root 50 2006-08-29 10:21 /usr/src/linux-headers-2.6.16-2-686-smp/arch/i386/Makefile -> ../../../linux-headers-2.6.16-2/arch/i386/Makefile
I cannot put the regular Makefile in the /usr/src/linux-headers-2.6.16-2-686-smp/arch/i386 directory, and if I change the symlink to the /usr/src/linux-headers-2.6.16-2-686-smp/Makefile it throws it into a never ending loop when I do make clean modules
 
Old 08-29-2006, 01:43 PM   #11
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 57
Here is the make file from the 386 in my 2.6.16 tree, boy you have something weird going on here I would almost say that is a bad build of the headers package. I don't have the headers for the 2.6.16 but I get nothing like that when looking at the files from my self built headers in 2.6.17.

Code:
>$ ll /usr/src/linux-headers-2.6.17-ck1-smp/arch/i386/Makefile
-rw-r--r-- 1 root root 4.6K 2006-06-17 22:49 /usr/src/linux-headers-2.6.17-ck1-smp/arch/i386/Makefile
 
Old 08-29-2006, 02:12 PM   #12
Jukas
Member
 
Registered: Mar 2005
Posts: 139

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by HappyTux
Here is the make file from the 386 in my 2.6.16 tree, boy you have something weird going on here I would almost say that is a bad build of the headers package. I don't have the headers for the 2.6.16 but I get nothing like that when looking at the files from my self built headers in 2.6.17.

Code:
>$ ll /usr/src/linux-headers-2.6.17-ck1-smp/arch/i386/Makefile
-rw-r--r-- 1 root root 4.6K 2006-06-17 22:49 /usr/src/linux-headers-2.6.17-ck1-smp/arch/i386/Makefile
I agree that something is wrong with that kernel-headers but I've uninstalled and reinstalled it from apt already and still see the same result. Using your -386 it got farther, but now hangs on Makefile.cpu in the /arch/i386/ directory which is another bogus symlink. =(
 
Old 08-29-2006, 02:24 PM   #13
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 57
Quote:
Originally Posted by Jukas
I agree that something is wrong with that kernel-headers but I've uninstalled and reinstalled it from apt already and still see the same result. Using your -386 it got farther, but now hangs on Makefile.cpu in the /arch/i386/ directory which is another bogus symlink. =(
Well I'd say it almost time to compile your own kernel then you will have a fully configured source tree and not even need headers for building.
 
Old 09-01-2006, 12:13 AM   #14
Jukas
Member
 
Registered: Mar 2005
Posts: 139

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by HappyTux
Well I'd say it almost time to compile your own kernel then you will have a fully configured source tree and not even need headers for building.
I got so fed up with it I ended up wiping the box clean. Fortunately I hadn't done anything major on that box so it was only an hour or so to get it up and running again. Wish a fresh install and compiling my own kernel I was able to get the onboard nic working despite Realtek's non-intuitive instructions.

Thanks for the help all, especially Happy Tux.
 
Old 09-01-2006, 12:20 AM   #15
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 57
Quote:
Originally Posted by Jukas
I got so fed up with it I ended up wiping the box clean. Fortunately I hadn't done anything major on that box so it was only an hour or so to get it up and running again. Wish a fresh install and compiling my own kernel I was able to get the onboard nic working despite Realtek's non-intuitive instructions.

Thanks for the help all, especially Happy Tux.
Your welcome and good to hear you got it going.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian not seeing my Realtek 8169 nic teh_zero Linux - Networking 7 05-05-2007 06:32 PM
Realtek NIC powadha Linux - Hardware 1 10-29-2004 02:20 PM
Setup as getting debian testing files from ftp - will it stay with testing BrianHenderson Debian 2 09-02-2004 06:06 PM
Realtek NIC GiveItAShot Linux - Hardware 9 03-14-2003 02:25 PM
Realtek NIC qsilver Linux - Networking 0 07-18-2001 07:15 PM


All times are GMT -5. The time now is 02:15 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration