b r a y d e n . o r g / Random

/ LinuxNetworkSetup? / LinuxDlinkNICDriver

This Web


WebHome  
Topic List  
Web Statistics 

All Webs


Books
Main
Random
Software
TWiki  

brayden.org


Home
Monthly Digest
Today's Links
Resumé
Reading List
Books RSS
Random RSS
Software RSS

Other


Dale's Blog

currently-reading
TextDrive

D-Link DFE-530TX PCI Adapter Driver for Linux

Actually, this is all good information, but the actual card I have is the DFE-530TX+, which uses the rtl8139 driver. See LinuxDlink530TXPlus for details.



Installing Individual Drivers

Drivers may be updated individually by following the directions in http://scyld.com/expert/modules.html. You will need to build both the driver.o and pci-scan.o modules using the following source files from ftp://ftp.scyld.com/pub/network/

the driver source file 
pci-scan.c 
pci-scan.h and 
kern_compat.h 
In the instructions below driver.c refers to the name of the driver source file for your device e.g. 3c59x.c, and driver.o refers to the compiled driver binary module.

Copy the driver source files to a convenient directory. I usually use /usr/src/modules/. Compile both the driver file and pci-scan.c using the compile-command at the bottom of the source files. If a compile-command is not there use the following compile command:

gcc -DMODULE -D__KERNEL__ -O6 -c driver.c
gcc -DMODULE -D__KERNEL__ -O6 -c pci-scan.c
With some distributions, especially those based on the 2.4 kernel, you may need to add the following options to the compile command

-I/usr/src/linux/include -include /usr/src/linux/include/linux/modversions.h

As 'root', test the module by doing

  insmod pci-scan.o
  insmod driver.o

Install the modules in the proper location for your distribution. This is usually /lib/modules/kernel-version/net/driver.o. The command to do this is

    install -m 644 pci-scan.o driver.o /lib/modules/`uname -r`/net/
The uname -r command expands to the current kernel version name.

Special instructions for Red Hat 7.0

Red Hat 7.0 has a flawed configuration with their default install. The symptom is a variety of errors when trying to compile the driver update source RPM. The easiest work-around is to use a precompiled RPM for Red Hat 7.0 running the x86 uniprocessor kernel from ftp://ftp.scyld.com/pub/network/netdrivers-rh70.i386.rpm

Red Hat 7.0 uses the header files from an unreleased 2.3.99 kernel, rather than installing the header files from the kernel that is actually running. This was an attempt to make user-level binaries independent of the specific kernel version, but it makes it impossible to automatically build kernel modules.

A second problem is that 7.0 provides an experimental version of gcc that was not intended for public release. The stable version of gcc needed to correctly compile the kernel has been renamed to kgcc.

The work-around is to substitute kgcc for gcc and to add -I/usr/src/linux/include on the compile command line when compiling by hand. The Makefile in the tar file and RPM automatically include this compile flag, however they cannot automatically use 'kgcc'.

To repeat: this is a flaw that was introduced with Red Hat 7.0. It is a Red Hat configuration problem, not a driver update distribution bug. The symptom of this bug is compile error messages such as

tulip.c: In function `tulip_open':
tulip.c:1437: structure has no member named `tbusy'
tulip.c:1438: structure has no member named `start'
...

Building updated drivers into the kernel

The updated drivers may be also be linked into the kernel, rather than being used as a module that is linked later. Replace the drivers in drivers/net/* with the updated driver list.

Most kernel versions do not natively support the pci-scan.c layer. You will have to explicitly add pci-scan.o to the L_OBJS entry in drivers/net/Makefile.

 L_TARGET := net.a
-L_OBJS   := auto_irq.o
+L_OBJS   := auto_irq.o pci-scan.o
-M_OBJS   :=
+M_OBJS   := pci-scan.o
 MOD_LIST_NAME := NET_MODULES

Note that the 2.4 kernel is supported only as an experimental system. We do not recommend using 2.4 kernels on production systems.

 
 
Current Rev: r1.1 - 03 Dec 2005 - 16:37 GMT - DaleBrayden, Revision History:Diffs | r1.1
© 2003-2011 by the contributing authors.