Discussion Locked

Trouble compiling network card driver

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm using SUSE Linux 7.1 (kernel 2.2.18). I picked up a Netgear NIC (FA311). It comes with source code for the driver and a makefile. I haven't been able to compile it. And have similar problems with another new NIC by D-Link. Since the error I get are the same with either card, I'm sure I'm doing something wrong or trying to compile in the wrong directory. The errors I get are mostly variants of:
(1) "Dereferencing pointer from incomplete type"
(2) "/usr/include/linux/irq.h:53: requested alignment is not a constant"
(3) "/usr/include/asm/hardirq.h:16: 'CONFIG_X86_L1_CACHE_SHIFT' undeclare here - not in a function"

Three screens of this. Should I bet compiling the source in any particular directory? I'm doing it in the directory where the compiled modules are located: /usr/modules/2.2.18/net/

I never end up with an fa311.o. Netgear advertises Linux on the box, but they support only Windows on the phone.

The MAKEFILE may hold the key, but entering 'MAKEFILE' at the prompt does nothing.

I'd appreciate any suggestions.

3 replies

by mickeyd

As a general rule, you should copy the file
to your home directory to work on it along
with the makefile.

Makefile is a text file used by make to infer
how to build the object file. You should be
able to cat the file, or edit the file to
look at the rules and variables.

You would compile the file with a command
make (it will read the Makefile to figure out
what to make, where resources are, and how to
compile) however, having said that, it is
unusual to just get a makefile andthe source
code for a file. Usually the authors wrap
the source code and make file with other
scripts (like autoconf) to insure you don't
have any troubles.

If the tarball expanded into many files
and/or directories, you should look for a
configure script. If it is there then run
"./configure" then "make", then "make install"

If you only got the source code then make
won't know about the correct compiler
options. The compiler options should be
located near the bottom of the source file as
a comment, and you should type it in exactly
in order to compile the program. Use cat
soucefile.c to list the file and find the
compile instructions.

This discussion is closed to new replies.