[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

module via-rhine for woody (3.0) using both onboard LANs on a VIA-EPIA mini-ITX CL1000 motherboard

This is just a report for the archives, skip unless you've been 
watching this saga.

As members of netdrivers, debian-users and debian-isp know, I was 
failing to get the three ethernet ports I need to use a VIA EPIA 
CL1000 working as a replacement home firewall.  Since it is an 
internet-facing firewall, I wanted to stay with Debian stable, 
preferably not even going for a backports.org kernel upgrade so as to 
be sure that debian security upgrades would keep working for me.  
Thanks to a lot of people, ultimately Nick Jacobs, I have this 

I'm documenting this for all three list archives as I suspect I won't 
be the last to have difficulties here and as the solution is fairly 
easy in the end, but hell to find if you can't see what's wrong, and 
the final product is nice to have.

First thing: you must have the LANs switched on in the BIOS (not the 
LAN ROM: that attempts DHCP from the BIOS).

Next: the driver for the dual port VT6103/6105 ethernet controller 
that is on this motherboard needs the via-rhine driver available from 
Scyld at http://www.scyld.com/network/updates.html#pci-scan thanks to 
Donald Becker.  The via-rhine driver is in all the kernel images for 
woody.  I started with the bf24 install, i.e. kernel 2.4.18-bf2.4.  
However, none of the woody kernels (except possibly the 2.4.19 which 
is only in the distro as source as far as I can see) are sufficiently 
recent to detect both LAN ports.  So you have to compile your own new 

To do this you download from scyld:
or contact me and I'll send you slightly hacked ones (see below).

Now (thanks Nick) you copy your kernel header module.h and version.h 
to wherever you're compiling your new driver and you edit them: 
Change the 1st line of version.h in your local copy to #define 
UTS_RELEASE "2.4.18-bf2.4"   (replacing "2.4.18")

n module.h, replace the line
#include <linux/version.h>
#include "version.h"
(So that it will use the local copy: for those who've never touched C 
hashed lines aren't comments, they're handled precompilation, 
references in angle brackets are sought relative to the include 
location the compiler is using and those just in quotes are 

In via-rhine.c and pci-scan.c replace:
#include <linux/version.h> wiith  #include "version.h"
#include <linux/module.h> with #include "module.h"
(again so that it will use the local copies).  In addition, I found 
that I now needed to hard code the location of modversions.h so lines 
that had called that now refer to:
not to <linux/modversions.h>

you compile with
   -Wstrict-prototypes -O6 -c pci-scan.c \
   -I /usr/src/kernel-headers-2.4.18-1/include
gcc -DMODULE -Wall -Wstrict-prototypes -O6 -c via-rhine.c \
   -I /usr/src/kernel-headers-2.4.18-1/include/
(I've used the backslashes to indicate line continuation)

You get a warning both times:
In file included from module.h:297,
                 from pci-scan.c:56:
/usr/include/linux/version.h:1: warning: `UTS_RELEASE' redefined
version.h:1: warning: this is the location of the previous definition

but the via-rhine.o and pci-scan.o that you get are good and can be 
copied to where they need to be:
cp *.o /lib/modules/2.4.18-bf2.4/kernel/drivers/net/

and then 
	modprobe via-rhine 
should show things working fine and you can put via-rhine in 
/etc/modules to get it loaded at boot

Clearly if you're using a different kernel, you'll have to modify 
some of the header locations above but this should work.

Now to sort out booting from a software RAID-1 array of two drives 
and install shorewall and a few other things from the old machine and 
I'll have the robust, near silent, firewall I want!

Thanks again to everyone who helped and to everyone who offered 
advice on multiport LAN cards: for now I think I can avoid that extra 

PSYCTC: Psychotherapy, Psychology, Psychiatry, Counselling
   and Therapeutic Communities; practice, research, 
   teaching and consultancy.
Chris Evans & Jo-anne Carlyle
http://psyctc.org/ Email: chris@psyctc.org

Reply to: