Compiling NIC drivers

Compiling NIC drivers

Post by Eric Lengveni » Tue, 25 Jul 2000 04:00:00



Greetings,
I recently bought a new system, one of those barebones jobs. It came with a
10/100 NIC integrated into the motherboard. Davicom dm9102. The motherboard
actually came with linux sound and nic drivers. But, I can't seem to compile
the NIC driver.

In the driver itself, it lists a whole lot of includes such as
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
.
.
When I try to compile it, it says it can't find the include files. I am
compiling from the directory in which the driver is. I know the files it is
looking for are in /usr/src/linux/include/linux/* but I don't know how to
convey that to the driver.

Can anyone help me? This is my first module compile. I have compiled little
things before. I really want to get this going because this is the first
time I have ever had two computers. A friend gave me a hub and I just gotta
get it going.

Thanks in advance

Eric not so newbie, but still a little green.

 
 
 

Compiling NIC drivers

Post by David . » Tue, 25 Jul 2000 04:00:00



> Greetings,
> I recently bought a new system, one of those barebones jobs. It came with a
> 10/100 NIC integrated into the motherboard. Davicom dm9102. The motherboard
> actually came with linux sound and nic drivers. But, I can't seem to compile
> the NIC driver.

> In the driver itself, it lists a whole lot of includes such as
> #include <linux/module.h>
> #include <linux/kernel.h>
> #include <linux/sched.h>
> .
> .
> When I try to compile it, it says it can't find the include files. I am
> compiling from the directory in which the driver is. I know the files it is
> looking for are in /usr/src/linux/include/linux/* but I don't know how to
> convey that to the driver.

> Can anyone help me? This is my first module compile. I have compiled little
> things before. I really want to get this going because this is the first
> time I have ever had two computers. A friend gave me a hub and I just gotta
> get it going.

gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net/inet -Wall
-Wstrict-prototypes -O6 -c tulip.c `[ -f
/usr/include/linux/modversions.h ] && echo -DMODVERSIONS`

The section that says "-I/usr/src/linux/net/inet" should be the path to
the file to be compiled.

The "-f /usr/include/linux/modversions.h" section is where you would
where you set the path to the include files.

The above command is for a tulip module.

--
Confucius say: He who play in root, eventually kill tree.
Registered with the Linux Counter.  http://counter.li.org
ID # 123538

 
 
 

Compiling NIC drivers

Post by gnum.. » Wed, 26 Jul 2000 04:00:00



Quote:> Greetings,
> I recently bought a new system, one of those barebones jobs. It came with a
> 10/100 NIC integrated into the motherboard. Davicom dm9102. The motherboard
> actually came with linux sound and nic drivers. But, I can't seem to compile
> the NIC driver.
> In the driver itself, it lists a whole lot of includes such as
> #include <linux/module.h>
> #include <linux/kernel.h>
> #include <linux/sched.h>
> .
> .
> When I try to compile it, it says it can't find the include files. I am
> compiling from the directory in which the driver is. I know the files it is
> looking for are in /usr/src/linux/include/linux/* but I don't know how to
> convey that to the driver.

There are two ways that you can get around this. . .
1) you can copy the includes to the source directory of the driver.
2) you can edit the Makefile and add '-I /usr/src/linux/include/linux/'
   at the end of the line that has similar entries (usually "-I.
   -I..") in it.  I recomend that you save the original Makefile as
   Makefile.old, or some such in case you make a mistake here.  This will
   point the compiler to that directory to look for include files.

The second option is the recomended method. . .

--
Sanjay

Windows has detected that a gnat has farted near your computer.
                            Press any key to reboot.

 
 
 

1. Compiling NIC Driver

I'm having trouble getting the 3c59x driver to compile.

I have an older system (2.0.24) with a hardware device that won't work
with a new kernel (2.2.6). When I installed the new kernel the device
failed. When I try to compile the 3c59x driver, I get a long list of
errors that I can't see (I could actually redirect the errors to a file
but the list is VERY long).

I used:
    gcc -o 3c59x.o 3c59x.c

but I'm getting a little lost.

Anyone have any suggestions?

--

Thomas/Shurflo

2. R5, beige G3 and printer - HELP

3. Compile NIC driver?

4. g460 / XF86Config

5. Can Anyone Tell Me How To Compile My NIC Driver?

6. RedHat 4.0 Sparc, runs on a 4c?

7. Compiling new NIC driver

8. where is the zic source file for TZ=US/Eastern?

9. NIC Help - Driver won't compile

10. trouble compiling 8139too NIC driver for kernel 2.4

11. Tulip.c NIC Driver Compiling Problems

12. Problem Compiling driver for NIC.

13. gcc compile of nic driver problem