HELP!! Compiling Driver for LAN Card

Status
Not open for further replies.
Me Linux newbie.

I have got Ubuntu 5.something and a Realtek RTL8139 PCI Ethernet Card. The driver has these instructions:

*www.realtek.com.tw/downloads/downloads1-.aspx?lineid=1&famid=3&series=16&Software=True

Linux drivers can be downloaded from here. I am stuck at the complining the c file part. I dunno how to

I am giving free info domain to whoever helps me out!
 

JGuru

Wise Old Owl
You don't need to compile the source of drivers to connect to the Net!!!
Now listen up, & do what I say:
Open the Terminal Window & type:
$ gksu network-admin
This will open the 'Network Settings' dialog box.
Here , click on 'Connection' tab , select 'Ethernet Connection',
Click on 'Properties' That opens up the 'Interface Properties' dialog
Make sure 'Enable this Connection' is enabled.(selected)
In the Connection Settings : DHCP
Click 'OK', again 'OK'.
To test whether you are able to connect to the Net, from the Terminal Window type:
$ ping www.yahoo.com
(This will display the statistics like bytes transferred, IP address, time taken)
If you are getting these statistics, that means your Net connection is working!!
So open FireFox browser and type any URL and see it.
By the way I also use Realtek Ethernet card. No need to install any drivers in Ubuntu!!
 

shashank4u

Youngling
i cant help uout ,but what makes me reply to this thread is
i also have the same ethernet adapder Realtek RTL8139 same prob occur to me about one month ago , i had made dual boot system but when i see that
there r no inbuilt drivers and becoz of it i m not able to use the net , one more prob. was there not even able to install real one player in ubuntu(given by digit).so while experimenting my ubuntu got currupted and i had to format my drives, now i m looking for fc5 but not able to find out anywhere .
one request if u r able to compile the driver plz do inform me .
may be then i ll give ubuntu a second try.

jguru
i dont remember exactly , but when i was installing ubuntu , during the
set up phase , when network details r to be filled , ubuntu was not able
to detect the ethernet adapter ,what u have to say in this case. i think
the ethernet adapter must be detected first before chekcing other things.
right.
 
Last edited:
OP
U

Ultimate Z Fighter

Broken In
^^ YESSS

The same thing happened to me ... Netwrok card wasn't detected...

Here's the readme file with the drivers:

8139too.c release note
2001/10/31 by ShuChen Shao

1.This driver was originally based on 8139too.c version "0.9.15".

2.It has been enhanced to support RTL8139C+ PCI ethernet controller.

3.RTL8139C+ PCI ethernet chips is set to support C+ mode by default.
If FORCE_C_Mode below is enabled, the RTL8139C+ chip will be forced to support C mode
after reboot.


4.This program can be compiled using the attached Makefile.
Please remember to SPECIFY "NEW_INCLUDE_PATH" in Makefile according to your linux environment.
The object file named 8139too.o should be moved to the directory
/lib/modules/<linux-version>/kernel/drivers/net/
The driver could be brought up by the following steps:
'insmod 8139too'
'ifconfig eth0 up'

5.It can support Auto-Negotiation ability,that is
10-half 0x01
10-full 0x02
100-half 0x04
100-full 0x08
If 10-half mode is expected, it can be achieved by the following steps:
#ifconfig eth0 down
#rmmod 8139too
#insmod 8139too media=0x01

6.If the "Install Type", selected during the Linux install procedure, is "laptop",
this driver can work normally for CardBus application without any modification.
Otherwise, reinstall Linux and select "Install Type" as "laptop".
Then this driver can also work.

---------------------------------------------------------------------------------------
8139too.c version 1.5.0 release note
2003/3/4 by ShuChen Shao

1.Add flag in Makefile to specify access type to operation register on PCI
ethernet chips.

Here's teh driver:

ftp://152.104.238.194/cn/nic/rtl8139abcd8130810xseries/linux24x-8139cp(160).zip
 

shashank4u

Youngling
this is the same that is given in the driver cd :
*************************************************
** Silan SC92031 PCI Fast Ethernet Adapter **
** **
** LINUX driver **
*************************************************

Introduction:
=============

The instructions are for linux driver installation. You must
compile the source code to generate sc92031.o and use insmod command to
insert sc92031.o as module.

Contents of the Subdirectory:
=============================

readme.txt This file.
sc92031.c The linux core driver source code file
Makefile Makefile for generating driver object file

Kernel Supported
================
This driver support linux kernel version 2.4.x/2.5.x now.

Installation
============
1) Create a temporary directory:
# mkdir /temp

2) Change to the temporary directory:
#cd /temp

3) Copy driver (sl_linux.tgz) from CD-ROM to the temporary directory, and follow the commands:
# mount -t iso9660 /dev/cdrom /mnt
# cp /mnt/sl_linux.tgz /temp

4) untar the archive file:
# tar xzvf sl_linux.tgz
# cd sc92031

5) Compile the driver source files and it will generate sc92031.o, and
copy it to correct driver installation path (The installation directory
is different in different kernel versions. In 2.4.x kernel, the path is
/lib/modules/KERNEL_VERSION/kernel/drivers/net/, and in 2.2.x kernel,
the path is /lib/modules/KERNEL_VERSION/net/)
# make install

6) Check configuration file (/etc/modules.conf or /etc/conf.modules,it
depend on your Linux distribution) for loading kernel modules. Make sure
there is the following content in the configuration file, where # is
interface number :
alias eth# sc92031

7) Reboot now:
shutdown -r now

8) Install your driver module (If the driver module is in the wrong place,
an error message will appear, and say that can't find the driver
module):
insmod sc92031.o

8) Use ifconfig command to assign the IP address, where # is network
interface number:
ifconfig eth# <IP>

9) Check the interface works:
ping <remote_host_IP>

Uninstallation
==============
Please enter the following commands to uninstall your driver:
# make uninstall

Module Parameter:
=================
The following parameters can be set when we install the driver module. You can add this parameters when
you execute 'insmod' command to install the driver
# insmod sc92031.o work_node =0x00

work_mode
work_mode is used for setting the speed and duplex mode of NIC.Value is as followed:
Autoselect 0x00
M10-half 0x01
M10-full 0x02
M100-half 0x04
M100-full 0x08

If you want to use other modes,it can be changed by the following steps:
# ifdown eth0
# rmmod sc92031
# insmod sc92031.o work_mode= ****
 

JGuru

Wise Old Owl
shashank4u said:
jguru,
i dont remember exactly , but when i was installing ubuntu , during the
set up phase , when network details r to be filled , ubuntu was not able
to detect the ethernet adapter ,what u have to say in this case. i think
the ethernet adapter must be detected first before chekcing other things.
right.

@Shashan4u,
There are times when Ubuntu is not able to detect your Ethernet card.
In that case, you can download the Linux driver source & compile & install the drivers.
Always use the latest version of Linux, use Ubuntu 6.06 (Dapper Drake). Chances
of your Ethernet card getting detected are high!! This also happens with other
devices like Graphics Card. So use the latest version of Ubuntu.
 

mehulved

18 Till I Die............
Oops this means make isn't installed on your system yet. You will need to get make and gcc from packages.ubuntu.com and it's dependancies if any.
But, this is certainly strange. As far as I can remember, Ubuntu 6.06 detects my Realtek 8139C card. I can't boot into ubuntu and check for now as I am out of space there.
 

JGuru

Wise Old Owl
Ultimate Z Fighter said:
Me Linux newbie.
I have got Ubuntu 5 something and a Realtek RTL8139 PCI Ethernet Card.

@Tech_your_future, this guy is running a pretty old Ubuntu (4.04 I think!!).
That's why RealTek Ethernet card is not detected!! I have already told him to
use the latest Ubuntu 6.06 (Dapper Drake). By the way, I'm also using RealTek
Ethernet card, and everything works perfectly.
 

mehulved

18 Till I Die............
Well he's saying, it's 5 something. My card worked in 5.10, so I guess maybe it's 5.04 and and your 4.04 is a typo :D. If the card doesn't work in that version, IMO best would be to get 6.06 too. Becuase after connecting to the net too he'll have 1000's of updates, also I guess they've stopped updates for it. So, not much sense using it for now.
 
OP
U

Ultimate Z Fighter

Broken In
Venom said:
My card is the same and worked on 5.04 and 5.10 too.

Does it get automatically detected while installation??

Anyways, I tried compiling with gcc and it was givin me errors that included files not found etc etc...

Can some1 compile and give me the driver c source...??
 

Venom

Journeyman
Err, yeah while installing itself it asked me to configure the network details and used DHCP to connect to net too.
 

mehulved

18 Till I Die............
Firstly did you configure your network settings right? Since it seems others having the same card are saying, it's been detected. Maybe your connection settings isn't proper.
And this driver is based on kernel 2.4.x whereas Ubuntu uses kernel 2.6.x so it may not work, AFAIK.
All right, which kernel have you got? If you don't know, give the output of
Code:
uname -a
. And which connection are you using and how are you trying to connect? Maybe if you are going wrong somewhere, someone will be able to point out.
 

mehulved

18 Till I Die............
I am sure you don't need to compile the driver. And also your version of ubuntu is 5.10 or 6.06. This should detect and work fine with your LAN card. How can you say your LAN card is not detected?
It seems you are messing up somewhere in configuring the connection. It's not a problem with LAN card or it's drivers.
BTW, the drivers you have got are for kernel 2.4.x so they won't work on 2.6.x.
 
OP
U

Ultimate Z Fighter

Broken In
Yeah, My Ubuntu version is breezy 5.10.

The card works fine under Windows
Let's start it over:

I got a driver cd with the LAN Card and had to install the drivers for Windows. There is a zip file in the cd with c file, Makefile, Readme file. The readme file says that you need to compile the c file using Makefile and put the object file somewhere.

Contents of the Subdirectory:
=============================

readme.txt This file.
sc92031.c The linux core driver source code file
Makefile Makefile for generating driver object file



5) Compile the driver source files and it will generate sc92031.o, and
copy it to correct driver installation path (The installation directory
is different in different kernel versions. In 2.4.x kernel, the path is
/lib/modules/KERNEL_VERSION/kernel/drivers/net/, and in 2.2.x kernel,
the path is /lib/modules/KERNEL_VERSION/net/)
# make install

Thing is that the command make install doesn't work and an error is issued:

bash : make : command not found (something)

helphelphelphelp
 

mehulved

18 Till I Die............
Ugh
Did you first try to get your connection working? Or did you just try to install these drivers?
Your connection should work without this drivers. Did you fill up the required information under System => Administration => Networking ?
If yes, do you get any error message? What happens?
 
Status
Not open for further replies.
Top Bottom