FW: [vortex] Re: 3c59x.c compilation errors.
Remko van der Vossen
remko.van.der.vossen@cmg.nl
Wed, 14 Mar 2001 11:22:35 +0100
On Tue, 13 Mar 2001, Donald Becker wrote:
>
> On Tue, 13 Mar 2001, Remko van der Vossen wrote:
>
> > please bear with me as I'm new to Linux and NIC drivers.. I'm
> > currently in the process of developing a TCP/IP stack (only
> > just starting the project), and I want to be able to test it.
>
> Will this be GPL code?
I don't think so, although I would like it to be, but I don't
think CMG will like it.
btw, let me fill you in on some more project details. It will
be a TCP/IP stack for embedded systems. Because of this a
couple of restrictions apply.
1. It has to be small and low on resources, so I will have to
optimize it heavily, and I will make it modular to allow
specific parts to be left out of the stack, eg UDP if it
isn't used, or IP forwarding if it is only a host, or IP
routing if it is on a dial-up line.
2. It has to be portable, so I will write it in ANSI C and
develop it with gcc, this way it is (at least we hope) usable
in just about all platforms we use here.
3. All OS and hardware dependencies have to be shielded from
the stack itself. To overcome some of these problems I will
use standards like POSIX, and for the rest I will make
standard interfaces so we can simply make different modules
for different OSs and platforms
> > I looked for another driver, and I found 3c59x.c so I tried
> > to compile it. first I needed the pci-scan and kern_compat
> > files so I downloaded them and tried again. now I got another
> > set of errors. These errors are some "`PAGE_OFFSET_RAW'
> > undeclared", and a whole lot of "dereferencing pointer to
> > incomplete type" on the netdevice type variables. I have no
> > idea where PAGE_OFFSET_RAW is declared or what it should be,
> > nor do I have any idea why netdevice is considered and
> > incomplete type.
> ...
> > Can anybody help me with this? I'm at a complete loss. FYI,
> I'm running
> > Redhat 7.0, the kernel version is 2.4.0.
>
> Read
> http://www.scyld.com/network/updates.html#redhat7.0
>
> If you have the original 7.0, you will need to update your glibc
> package, and add
> -I/usr/src/linux/include
> to the compile line.
Ok, I tried this but it doesn't work, I replaced gcc with
kgcc and included the -I option in the compile statement, but
I still get the errors, exactly the same errors to be precise.
I just tried some other stuff, I tried the rpm, and I got
exactly the same errors, I noticed the the Makefile was smart
enough to use kgcc when it was around, so I just renamed it
to a temporary name, and tried to compile it with the gcc
compiler instead. Now I do get other errors.
They are:
structure has no member named 'tbusy' (struct net_device)
structure has no member named 'interrupt' (struct net_device)
structure has no member named 'start' (struct net_device)
all of 'm are in pci-skeleton.c
when I try this:
gcc -DMODULE -Wall -Wstrict-prototypes -O6 -I/usr/include -c 3c59x.c
I get the same errors as above (the no member named ... ones)
with: gcc -DMODULE -Wall -Wstrict-prototypes -O6
-I/usr/i386-glibc21-linux/include -c 3c59x.c
I get all of the errors I got before, the 'PAGE_OFFSET_RAW'
undeclared and uncomplete type errors.
the same when I use kgcc
Last thing i tried is to modify the Makefile in
/usr/src/redhat/BUILD/netdrivers-2.1.6 to use the
/usr/i386-glibc21-linux dir, but that doesn't work either...
As I said, I'm new to Linux so I'm just trying whatever I
come up with.
Right now I'm downloading the newest kernel 2.4.2 and will
compile and install it with the help of someone else, and try
it again.. later today, if I succeed I will let you know.
As for my other questions, is there any documentation on the
interface? and will I be able to use the driver directly from
a user level program? can anybody answer these?
Thank you for all your troubles,
Remko van der Vossen
Consultant
CMG Eindhoven
Remko.van.der.Vossen@cmg.nl