LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 07-19-2004, 07:48 PM   #1
Mal495
Member
 
Registered: Oct 2003
Location: New York
Posts: 72

Rep: Reputation: 15
How do I compile a source file?


How do I compile a source file to make an object file so I can install the driver for my NIC card?
The file name is rtl8139.c and it is for my DFE-530TX+ D-Link Ver 1.00 card.



ps...what is an "elf" file?



 
Old 07-19-2004, 08:12 PM   #2
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Hi Mr.,
Are you having problems with detection of this nic? The proper driver for it is 8139too. It's a very common chipset.
I did a google for your brand name + linux and found a "howto compile" it but it's for an old Red Hat 6.2 and 7.0. This is the link: http://support.dlink.com/faq/view.asp?prod_id=488
 
Old 07-19-2004, 08:19 PM   #3
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
I forgot your question about elf. It's Executable and Linking Format, the standard format for executables in linux. I found a pdf in google about it. http://www.skyfree.org/linux/references/ELF_Format.pdf

Have a nice reading!
 
Old 07-19-2004, 08:34 PM   #4
macondo
Senior Member
 
Registered: Jul 2003
Location: Central America
Distribution: Slackwre64-current Devuan
Posts: 1,034

Rep: Reputation: 62
As osvaldo said your driver is 8139too. At the terminal as root:

modconf

go down the list till you find:

kernel/drivers/net

press Enter

on the next screen choose:

8139too

press OK and Enter

install it, it will tell you if it was sucsessful
reboot

now your nic card should have its module/driver in the kernel.

Just to smooth things up in matters of detection:

#apt-get install discover mdetect read-edid x-window-system
#dpkg-reconfigure xserver-xfree86

Last edited by macondo; 07-19-2004 at 08:39 PM.
 
Old 07-20-2004, 05:28 AM   #5
Mal495
Member
 
Registered: Oct 2003
Location: New York
Posts: 72

Original Poster
Rep: Reputation: 15
Someone told me to do that once before. I tried modconf, and 8139too is not in the list. On the cd there is a folder callied Linux with 3 files inside. rtl8139.c is my source file. I will try to compile it into an object file.


thanx
 
Old 07-20-2004, 06:17 AM   #6
informix
LQ Newbie
 
Registered: Jul 2004
Location: ina bottle
Distribution: my own and Debian ... SuSE to tell dummies ...
Posts: 2

Rep: Reputation: 0
Compile Source to Object

Here is the syntax for compiling C sources:

$CC $FLAGS -o name.o name.c

$CC=gcc
$FLAGS=depends on Your system/installation paths
name.o=output-file
name.c=input file


name.o could be even an executable if You dont compile an object!

try this basic code (system.c):

#include <stdlib.h>
int main(int argc ) {
system("echo Hallo world");
}


Effect : the Linux-Command "echo",
will output, "Hallo world" .

see ya!

PS: Try my QuickMegaScript
PPS: from: fenner.info/pub/qs
 
Old 07-20-2004, 07:07 AM   #7
macondo
Senior Member
 
Registered: Jul 2003
Location: Central America
Distribution: Slackwre64-current Devuan
Posts: 1,034

Rep: Reputation: 62
"Someone told me to do that once before. I tried modconf, and 8139too is not in the list."

That's strange, it is in mine, and i installed from CD1, this particular driver is one of the most common ones.

Check 'kernel/drivers/net' and look for '8139too' (in the left column) at the top of the list.

Last edited by macondo; 07-20-2004 at 07:20 AM.
 
  


Reply



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
can't compile from source.... garyozzy Ubuntu 7 11-30-2005 04:00 PM
Can't compile C++ source file mohbana Programming 1 11-22-2004 09:05 AM
compile C++ source file huno Programming 3 10-04-2004 06:49 AM
Compile from source meodihia Debian 5 09-11-2004 12:29 PM
Compile from source? Gamezace Linux - Newbie 4 04-18-2004 01:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:32 PM.

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