Building driver module with the Kernel

sharkey@superk.physics.sunysb.edu sharkey@superk.physics.sunysb.edu
Wed Feb 2 04:55:52 2000


 
> I have NIC which uses rtl8139 driver. I am in a process of building this driver
> with kernel and I am not good at this  domain. The  instructions for
> compiling the rtl8139 driver  is extracted from  Donald Backer's  rtl8139
> driver's source code and it is shown below:  I wonder  which compile command
> should I use and is  the command include double and single quotes and also brackets.
> 
> ____________________________________________________________________
> Local variables:
>  *  compile-command: "gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -c
>  rtl8139.c `[ -f /usr/include/linux/modversions.h ] && echo -DMODVERSIONS`"
>  *  SMP-compile-command: "gcc -D__SMP__ -DMODULE -D__KERNEL__ -Wall
> -Wstrict-prototypes -O6 -c rtl8139.c `[ -f /usr/include/linux/modversions.h ] &&
>  echo -DMODVERSIONS`"
>  *  cardbus-compile-command: "gcc -DCARDBUS -DMODULE -D__KERNEL__ -Wall
> -Wstrict-prototypes -O6 -c rtl8139.c -o realtek_cb.o
> -I/usr/src/pcmcia-cs-3.0.9/include/"
>  *  c-indent-level: 4 *  c-basic-offset: 4 *  tab-width: 4 * End: */

If you don't know which command is correct for your system, then the first
one is probably the correct one.  If your system is SMP, you would probably
know that.  Same for cardbus.  If it's a standard PCI card being put in a
computer with only one CPU, the first one is what you want.

Do not type the double quotes when you use the command.  Do type the single
quotes and brackets.

Make sure that your kernel sources are up to date.  If your distribution
does things properly, then it is probably better to substitute
/usr/src/linux/include/linux in place of /usr/include/linux.
Of course, the word "properly" is open to interpretation.

In many cases, it is not actually necessary to do any of this, though.  For
most people it is sufficient to use the driver which is distributed with
the kernel sources, or precompiled by your distributor.

Eric
 | To unsubscribe, send mail to Majordomo@cesdis.gsfc.nasa.gov, and within the
 |  body of the mail, include only the text:
 |   unsubscribe this-list-name youraddress@wherever.org
 | You will be unsubscribed as speedily as possible.