LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-20-2003, 11:06 PM   #1
MadMonky
LQ Newbie
 
Registered: Jun 2003
Location: Miami
Distribution: Mandrake 9.1
Posts: 3

Rep: Reputation: 0
Compiling drivers for lan adapter


I just installed Mandrake Linux 9.1 a few days ago, and everything went fine except that the lan driver does not work, and thus leaves me out of my home network and internet connection. Its an onboard lan card, and so i went to the mobo manufacturer, Chaintech in my case, to try to find some updated drivers. Indeed i found some linux drivers. The readme gave me a procedure of how i should go about installing it. Everything was going fine until it told me to compile the driver. Since i am pretty new to linux, it took me a while to figure out how i was supposed to do that Eventually i got it open in GNU Emacs and ran the compile command. It brought up an error stating that "Sorry, the Kernel Header Files Path /usr/src/linux/include doesn't exist. We cant compile this driver succesfully without it. Please install kernel header files before you compile this driver." Ive dealt with basic coding before, and managed to discern where the problem is occurring. I started scouring the internet looking to find where the kernel header files are located. I saw some references to /usr/include/asm, and decided to replace /usr/src/linux/include with /usr/include/asm. When i tried compiling that, i got a lot of errors. However, GNU Emac seemed to be making a big deal of a particular error, about how glibc now uses kernel header files from a well-defined working kernel version instead of the latest, running kernel version. Sure enough, after some more scouring of the net i found a memo of sorts from Linus Torvalds about a symlink that should be eliminated http://www.linuxfocus.org/common/src...0/erratum.html The most pertinent piece of information i got from there was "the header files should match the library you link against, not the kernel you run on." However, not knowing much about linux, i have no idea what that means. Help would be greatly appreciated, since it would mean i wouldnt need my brothers computer for the internet anymore
 
Old 06-20-2003, 11:14 PM   #2
MadMonky
LQ Newbie
 
Registered: Jun 2003
Location: Miami
Distribution: Mandrake 9.1
Posts: 3

Original Poster
Rep: Reputation: 0
P.S. I forgot to mention that GNU Emacs gives me a solution of sorts, though i dont know what to do with it. To build a kernel module, i need to have the kernel sources installed. (The makefile makes reference to a source file, which i have, though i dont know what it means to have it "installed"). I must then make sure that the symbolic link /lib/modules/'uname -r'/build exists and points to the matching kernel source directory (No idea what that means). Then copy /boot/vmlinuz.version.h to /lib/modules/'uname -r'/build/include/linux/version.h Then, when compiling make sure to use compiler option
-I/lib/modules/'uname -r'/build/include instead of
-I/usr/include/linux
 
Old 06-21-2003, 01:46 AM   #3
Thetargos
Senior Member
 
Registered: Mar 2003
Location: Mexico City
Distribution: Fedora, Ubuntu & Mint
Posts: 1,679

Rep: Reputation: 45
Ok, in short... or as close to short as possible:

1. Make sure you have a directory named /usr/src/linux-2.4.<xx>-<yy>, where the number must be the result of the command
Code:
$ uname -r
In the case of Mandrake 9.1 I think it is /usr/src/linux-2.4.21-1 (do not remember exactly). This directory name must correspond to the numerical number of the directory /lib/modules/2.4.<xx>-<yy> also correspondig to the result of uname -r (this will tell you the actual running version of the Linux Kernel.

2. In case you do not have them installed the sources in the directory said above (/usr/src/...), you will need to install them. Grab your installation CD's and (if memory serves me right) they should be in the second disk. Insert your cdrom, go to the directory where are sotred the RPMS (prefferably from a console) and look for a package named something like this: kernel-sources-<version number>.mdk.i386.rpm.

3. To install them, in a console type this, as root:
Code:
# rpm -ivh /mnt/cdrom/<path to rpms>/kernel-sources*
This command will install the sources in the correct place and place the build symlink in the /lib/modules/<kernel version>/ directory and the symlink to /usr/src/linux-2.4 in the source directory. Now try to compile your driver.

I hope this helps you. Pleas post what happened anyways.

Edit: Another dependency may arise relating to the glibc kernel headers, look for the package glibc-kernheaders* and install it.

Last edited by Thetargos; 06-21-2003 at 01:48 AM.
 
  


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
Internet sharing with one lan adapter mlin Linux - Networking 5 05-07-2009 03:10 AM
More problems with USB wireless Lan adapter! oudent Linux - Wireless Networking 6 01-25-2004 03:44 PM
Compiling Atmel W-Lan Drivers for Belkin solex Linux - Hardware 1 12-04-2003 08:45 AM
Netgear FA120 USB->LAN adapter DFossmeister Linux - Hardware 0 01-14-2003 08:04 PM
How to detect my onboard LAN adapter? Janus Linux - General 1 08-15-2002 07:11 PM


All times are GMT -5. The time now is 09:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration