LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 05-12-2007, 10:02 PM   #1
MailleMan
LQ Newbie
 
Registered: Jun 2004
Location: Colorado, USA
Distribution: LFS 6.2
Posts: 25

Rep: Reputation: 15
Question NIC Driver Installation Problems


Hi all,

I have a relatively clean build of LFS for which I'm working on installing some BLFS packages (I've done Emacs and Lynx so far...) I am trying to install drivers for my network card (a Realtek RTL8168/8111). When I attempt to do a "make modules" as described in the driver documentation, I get the following error and standard output:

Quote:
make -C src/ modules
make[1]: Entering directory `/usr/src/r1000_v1.05/src'
make -C /lib/modules/2.6.16.27/build SUBDIRS=/usr/src/r1000_v1.05/src modules
make[2]: Entering directory `/sources/linux-2.6.16.27'

WARNING: Symbol version dump /sources/linux-2.6.16.27/Module.symvers
is missing; modules will have no dependencies and modversions.

CC [M] /usr/src/r1000_v1.05/src/r1000_n.o
In file included from include/linux/module.h:10,
from /usr/src/r1000_v1.05/src/r1000.h:1,
from /usr/src/r1000_v1.05/src/r1000_n.c:5:
include/linux/sched.h:4:36: error: asm/param.h: No such file or directory
In file included from include/linux/types.h:15,
from include/linux/capability.h:16,
from include/linux/sched.h:7,
from include/linux/module.h:10,
from /usr/src/r1000_v1.05/src/r1000.h:1,
from /usr/src/r1000_v1.05/src/r1000_n.c:5:
include/linux/posix_types.h:47:29: error: asm/posix_types.h: No such file or directory
In file included from include/linux/capability.h:16,
from include/linux/sched.h:7,
from include/linux/module.h:10,
from /usr/src/r1000_v1.05/src/r1000.h:1,
from /usr/src/r1000_v1.05/src/r1000_n.c:5:
include/linux/types.h:16:23: error: asm/types.h: No such file or directory
In file included from include/linux/capability.h:16,
from include/linux/sched.h:7,
from include/linux/module.h:10,
from /usr/src/r1000_v1.05/src/r1000.h:1,
from /usr/src/r1000_v1.05/src/r1000_n.c:5:
include/linux/types.h:20: error: syntax error before '__kernel_dev_t'
include/linux/types.h:20: warning: type defaults to 'int' in declaration of '__kernel_dev_t'
include/linux/types.h:20: warning: data definition has no type or storage class
include/linux/types.h:23: error: syntax error before 'dev_t'
include/linux/types.h:23: warning: type defaults to 'int' in declaration of 'dev_t'
include/linux/types.h:23: warning: data definition has no type or storage class
include/linux/types.h:24: error: syntax error before 'ino_t'
include/linux/types.h:24: warning: type defaults to 'int' in declaration of 'ino_t'
include/linux/types.h:24: warning: data definition has no type or storage class
include/linux/types.h:25: error: syntax error before 'mode_t'
include/linux/types.h:25: warning: type defaults to 'int' in declaration of 'mode_t'
include/linux/types.h:25: warning: data definition has no type or storage class
include/linux/types.h:26: error: syntax error before 'nlink_t'
include/linux/types.h:26: warning: type defaults to 'int' in declaration of 'nlink_t'
include/linux/types.h:26: warning: data definition has no type or storage class
include/linux/types.h:27: error: syntax error before 'off_t'
include/linux/types.h:27: warning: type defaults to 'int' in declaration of 'off_t'

/usr/src/r1000_v1.05/src/r1000_n.c:1698: error: invalid type argument of '->'
/usr/src/r1000_v1.05/src/r1000_n.c:1698: error: 'TIF_NEED_RESCHED' undeclared (first use in this function)
/usr/src/r1000_v1.05/src/r1000_n.c:1698: warning: passing argument 1 of 'test_ti_thread_flag' makes pointer from integer without a cast
/usr/src/r1000_v1.05/src/r1000_n.c:1698: error: dereferencing pointer to incomplete type
/usr/src/r1000_v1.05/src/r1000_n.c: In function 'r1000_get_stats':
/usr/src/r1000_v1.05/src/r1000_n.c:1705: error: dereferencing pointer to incomplete type
/usr/src/r1000_v1.05/src/r1000_n.c:1707: error: dereferencing pointer to incomplete type

... (lots more stuff like that) ...

make[3]: *** [/usr/src/r1000_v1.05/src/r1000_n.o] Error 1
make[2]: *** [_module_/usr/src/r1000_v1.05/src] Error 2
make[2]: Leaving directory `/sources/linux-2.6.16.27'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/r1000_v1.05/src'
make: *** [modules] Error 2
Looking around at other mentions of files like param.h, it looks like my kernel headers might not be installed correctly. Does this sound right, and if so, how can I go about repairing this? Thanks in advance.
 
Old 05-12-2007, 11:10 PM   #2
MailleMan
LQ Newbie
 
Registered: Jun 2004
Location: Colorado, USA
Distribution: LFS 6.2
Posts: 25

Original Poster
Rep: Reputation: 15
As a follow-up to this, I tried patching and re-copying the kernel headers package according to the directions in the book, but I still get the same errors... Any ideas? :-/
 
Old 05-12-2007, 11:19 PM   #3
hollywoodb
Member
 
Registered: Aug 2003
Location: Minnesota, U.S.A.
Distribution: Debian, openSUSE
Posts: 400

Rep: Reputation: 30
There's an in-kernel driver for that card, why not just compile your kernel with that either built as a module or built in? Does the externally provided Realtek driver offer some additional functionality?
 
Old 05-12-2007, 11:29 PM   #4
MailleMan
LQ Newbie
 
Registered: Jun 2004
Location: Colorado, USA
Distribution: LFS 6.2
Posts: 25

Original Poster
Rep: Reputation: 15
Hmmm, well the answer to your "why not" question is ... I'm a Linux noob, lol. O.o I didn't realize it was supported by the kernel. So, I can just re-enable it in the kernel config and recompile the kernel? If that's the case, why would Realtek offer this driver at all? Thanks in advance...

PS: Even tho it may not be necessary, I'd be curious as to why this is failing; I would imagine other third-party software will encounter these problems if my kernel headers aren't accessible, unless the driver makefile is just poorly written...
 
Old 05-13-2007, 12:48 AM   #5
MailleMan
LQ Newbie
 
Registered: Jun 2004
Location: Colorado, USA
Distribution: LFS 6.2
Posts: 25

Original Poster
Rep: Reputation: 15
I tried re-compiling the kernel with the appropriate driver, and unless I did something wrong there, it still seems to not recognize the card (it's compiled in directly, not as a module). I put in PCI Utils and did an lspci, and I see the card on that list, so at least that's a good sign...any other ideas? I saw somewhere that the kernel support might only work for this card after 2.6.19 kernels or so (and I'm running 2.6.17); I assume in that case I'd have to install the drivers straight from Realtek, which would bring us back to the previous problem. Any ideas? Thanks in advance.
 
Old 05-13-2007, 12:51 AM   #6
MailleMan
LQ Newbie
 
Registered: Jun 2004
Location: Colorado, USA
Distribution: LFS 6.2
Posts: 25

Original Poster
Rep: Reputation: 15
If I'm reading it properly, this seems to suggest support wasn't in until at least 2.6.19...

https://bugs.launchpad.net/ubuntu/+s....17/+bug/63314
 
Old 05-14-2007, 11:09 AM   #7
MailleMan
LQ Newbie
 
Registered: Jun 2004
Location: Colorado, USA
Distribution: LFS 6.2
Posts: 25

Original Poster
Rep: Reputation: 15
So I've messed around with this quite a bit; did a *lot* of kernel upgrades (and downgrades) and worked through some issues where my hard drive wasn't getting recognized during boot (apparently because of the new "libsata" package or whatnot). Anyway...I'm currently at 2.6.22-rc1 and 2.6.21.1, and in both these cases my network card *is* recognized, but it always says "r8169: eth0: link down", and it looks like others have had similar problems with this NIC. I haven't seen mention of anyone fixing this problem while using the in-kernel drivers, but it looks like the ones from Realtek should work, so I'd be especially thankful if anyone could explain to me why the installation described above fails. If I can install the Realtek drivers then I can probably even just go back to the old kernel if I like, but in either case it sounds like the built-in driver is not reliable (at least for the RTL8168). Thanks very much in advance!

*edit* Here's the page where I saw mention of the Realtek driver fixing the problem...
http://linux-on-laptops.com/forum/showthread.php?t=265

Last edited by MailleMan; 05-14-2007 at 11:13 AM.
 
Old 05-16-2007, 07:49 AM   #8
MailleMan
LQ Newbie
 
Registered: Jun 2004
Location: Colorado, USA
Distribution: LFS 6.2
Posts: 25

Original Poster
Rep: Reputation: 15
So thanks to the LFS support list, I was informed that I'm simply missing my kernel source tree. After making it available and fixing a problem with the driver source code, I got it compiled and the kernel recognizes my card. However, it seems that I can't receive packets or that the connection isn't recognized (DHCP times out). Here is my output from "ifconfig eth0":

eth0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:1180 (1.1 Kb)
Interrupt:18 Base address:0x3000

Anyone have any ideas as to what could be wrong? Thanks in advance.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
installation of a nic driver IonMarais Linux - Newbie 3 10-05-2006 03:03 AM
Post-installation problems - X server and NIC do not function J_K9 Slackware 6 02-28-2006 09:20 AM
_very_ strange problems with r8169 nic driver outwardlymobile Linux - Hardware 3 11-24-2004 03:41 PM
NIC Driver for NVidia NForce onboard NIC. rajjpajj Linux - Software 9 09-28-2004 03:54 PM
NIC driver installation help fillerbunny Linux - Hardware 6 07-25-2002 10:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 12:33 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration