[realtek] Compiling errors with rtl8139.c

Donald Becker becker@scyld.com
Wed Feb 19 22:51:01 2003

On Wed, 19 Feb 2003, Rival wrote:

> On Mon, 17 Feb 2003 12:27:36 -0500 (EST), Donald Becker <becker@scyld.com> 
> > On Wed, 12 Feb 2003, Rival wrote:
> >> fix it? The command I use is:
> >> gcc -DCARDBUS -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -c 
> >> rtl8139.c -o fethcb_cb.o -Iusr/include/pcmcia
> >> which is pretty standard I think..
> >
> > Not at all standard!
> > Where did you get the driver source code, and that compile command?
> both from my manufacturer, actually the command was at the bottom of the 
> source.

It looks as if they modified the source code.  This is often done to put
their name in place of the original names.

>  Anyway I downloaded and run netdrivers.tgz, at first they didn't 
> work but at least they told me what was wrong.. kernel source. How am I 
> supposed to know I need that!

You don't actually need all of the kernel source, just the proper header

Red Hat has lead the way in confusion here: with their system the
headers used to be in the "kernel-headers" package.  But that package
now has the library headers, with the kernel headers in a new package

> From my perspective the kernel sources are 
> just 133mbs of junk (no offence).

Yup, you are right.  The kernel source is pointlessly huge, and you
don't need 99% of it.

What you need is the just header files for the kernel that was
installed, along with the configuration from that exact kernel.

> cardmgr[48]: socket 0: Dynalink L100CLV
> cardmgr[48]: executing: 'modprobe cb_enabler'
> cardmgr[48]: executing: 'modprobe rtl8139'
> pci-scan.c:v1.11 8/31/2002 Donald Becker <becker@scyld.com> 
> http://www.scyld.com/linux/drivers.html
> rtl8139.c:v1.22 11/17/2002 Donald Becker, becker@scyld.com. 
> http://www.scyld.com/network/rtl8139.html
> PCI device 'Realtek RTL8139C Fast Ethernet' was not assigned an IRQ.
> It will not be activated.

OK, you need the 'cb_shim' module here.   See the end of

Donald Becker				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Scyld Beowulf cluster system
Annapolis MD 21403			410-990-9993