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

From: Chris Evans (chris1_at_psyctc.org)
Date: 03/01/04

  • Next message: Alexis Huxley: "Re: a good mirror to download sarge"
    To: netdrivers@scyld.com, debian-user@lists.debian.org, debian-isp@lists.debian.org
    Date: Mon, 01 Mar 2004 10:22:58 -0000
    
    

    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
    working

    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
    driver.

    To do this you download from scyld:
            via-rhine.c
            pci-scan.c
            pci-scan.h
            kern-compat.h
    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>
    with
    #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
    absolute.)

    In via-rhine.c and pci-scan.c replace:
    #include <linux/version.h> wiith #include "version.h"
    and
    #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:
    "/usr/src/kernel-headers-2.4.18-bf2.4/include/linux/modversions.h"
    not to <linux/modversions.h>

    you compile with
    gcc -DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -Wall \
       -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:
    /kernel-headers-2.4.18-1/include
    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
            depmod
    and
            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
    expense.

    Chris
    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

    -- 
    To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Alexis Huxley: "Re: a good mirror to download sarge"

    Relevant Pages

    • Compiling the drivers for a ADSL Modem (IceData500)
      ... My modem model is IceData500 and the vendor says it is compatible with RH ... The unicorn driver is a standard Linux ... PPPoE, PPPoA or RFC2684 protocols, the kernel may need to be patched. ... To compile the drivers, ...
      (Fedora)
    • Re: Distributions
      ... Ubuntu is based on Debian, ... | general there are a lot of packages for people to use. ... kernel, have to run on a multitude of different systems, they tend to be larger ... and slower than if you compile those packages, ...
      (Debian-User)
    • ASUS A7N8X Deluxe Questions
      ... I was trying to get Debian working properly on my ... This was traced to an apparent need to compile a 2.4.22 kernel (I was ... with a Knoppix CD so I could write down my partition info. ...
      (Debian-User)
    • Re: modules load
      ... The Handbook is not so clear about what you must compile ... > kernel, ... modules (the nVidia graphics driver is a good example of the latter). ... system sources, you can just look at the source code for each driver ...
      (freebsd-questions)
    • Re: Xorg - nv - 8600GT blank screen problem.
      ... Or, if you want to be a bit risky, the nvidia driver from NVIDA's web site works well. ... The risk is that it is not installed "The Debian Way", and future Debian updates may break it, possibly causing a problem, or causing you to need to reinstall it. ... Also, it is finicky about which version of gcc used to compile the kernel interface. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
      (Debian-User)