|
前提:
我安装的linux是这个版本:
MagicLinux-2.0beta3-1.iso
我的主板是映泰U8598:(请看下面的地址)
http://www.biostar.cn/products/ProductDetail.asp?vID=163
网卡是集成的:
VIA PCI 10/100Mb Fast Ethernet Adapter
本身的网卡驱动支持如下:
Kernel Supported
================
This driver support linux kernel version 2.2.x and 2.4.x (2.4.1-2.4.6) now.
我安装的MagicLinux-2.0beta3-1.iso kernel v 2.2.6
我尝试着用这个驱动的说明安装 如下:
Installation
============
Please enter the following commands at the UNIX prompt. Remember, UNIX is
case sensitive.
1) Create a temporary directory:
mkdir /temp
2) Change to the temporary directory:
cd /temp
2) Copy driver (linuxfet.tar) from DOS disk, (mcopy below is one tool in
mtools, if you didn't install mtools, you can type
'mount -t msdos /dev/fd0 /mnt' and use 'cp /mnt/linuxfet.tar /temp'
command to copy the driver to the temporary directory):
mcopy a:linuxfet.tar .
3) untar the archive file:
tar xvf linuxfet.tar
4) Compile the driver source files and it will generate linuxfet.o, and
copy it to correct driver installation path (The installation directory
is different in different kernel versions. In 2.4.x kernel, the path is
/lib/modules/KERNEL_VERSION/kernel/drivers/net/, and in 2.2.x kernel,
the path is /lib/modules/KERNEL_VERSION/net/, the KERNEL_VERSION (see
above) means the kernel version of your Linux distribution. If you don't
know your kernel version , please run 'uname -r' command in command
line. The kernel version will look like '2.2.16', '2.4.2-2smp' etc.) :
make install
5) Check configuration file (/etc/modules.conf or /etc/conf.modules,it
depend on your Linux distribution) for loading kernel modules. Make sure
there is the following content in the configuration file, where # is
interface number (eg: alias eth0 linuxfet):
alias eth# linuxfet
6) Reboot now:
shutdown -r now
7) Install your driver module (If the driver module is in the wrong place,
an error message will appear, and say that can't find the driver
module):
insmod linuxfet
Use ifconfig command to assign the IP address, where # is network
interface number:
ifconfig eth# <IP>
9) Check the interface works:
ping <remote_host_IP>
第3)后要编译
然后我就这么做:如下
[root@andy temp]# ls
gcc-3.3.2-5.aix5.3.ppc.rpm linuxfet.h linux.txt
linuxfet.c linuxfet.tar Makefile
[root@andy temp]# make
*** Clean up older object files ***
rm -f core *.o *~
***** Compile the driver source files to generate linuxfet.o
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -DMODULE -DMODVERSION -c linuxfet.c
In file included from /usr/src/linux/include/asm/irq.h:16,
from /usr/src/linux/include/linux/irq.h:21,
from /usr/src/linux/include/asm/hardirq.h:6,
from /usr/src/linux/include/linux/hardirq.h:6,
from /usr/src/linux/include/linux/interrupt.h:11,
from /usr/src/linux/include/asm/highmem.h:24,
from /usr/src/linux/include/linux/highmem.h:12,
from /usr/src/linux/include/linux/skbuff.h:27,
from /usr/src/linux/include/linux/if_ether.h:107,
from /usr/src/linux/include/linux/netdevice.h:29,
from linuxfet.h:30,
from linuxfet.c:19:
/usr/src/linux/include/asm/irq_vectors.h:87:32: irq_vectors_limits.h: 没有那个文件或目录
In file included from /usr/src/linux/include/asm/hardirq.h:6,
from /usr/src/linux/include/linux/hardirq.h:6,
from /usr/src/linux/include/linux/interrupt.h:11,
from /usr/src/linux/include/asm/highmem.h:24,
from /usr/src/linux/include/linux/highmem.h:12,
from /usr/src/linux/include/linux/skbuff.h:27,
from /usr/src/linux/include/linux/if_ether.h:107,
from /usr/src/linux/include/linux/netdevice.h:29,
from linuxfet.h:30,
from linuxfet.c:19:
/usr/src/linux/include/linux/irq.h:72: error: `NR_IRQS' undeclared here (not in a function)
In file included from /usr/src/linux/include/linux/irq.h:74,
from /usr/src/linux/include/asm/hardirq.h:6,
from /usr/src/linux/include/linux/hardirq.h:6,
from /usr/src/linux/include/linux/interrupt.h:11,
from /usr/src/linux/include/asm/highmem.h:24,
from /usr/src/linux/include/linux/highmem.h:12,
from /usr/src/linux/include/linux/skbuff.h:27,
from /usr/src/linux/include/linux/if_ether.h:107,
from /usr/src/linux/include/linux/netdevice.h:29,
from linuxfet.h:30,
from linuxfet.c:19:
/usr/src/linux/include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared here (not in a function)
In file included from linuxfet.c:19:
linuxfet.h:38:26: linux/malloc.h: 没有那个文件或目录
linuxfet.c: In function `pci_drv_register':
linuxfet.c:211: warning: implicit declaration of function `pci_find_class'
linuxfet.c:211: warning: assignment makes pointer from integer without a cast
linuxfet.c:298: error: `MOD_INC_USE_COUNT' undeclared (first use in this function)
linuxfet.c:298: error: (Each undeclared identifier is reported only once
linuxfet.c:298: error: for each function it appears in.)
linuxfet.c: In function `pci_drv_unregister':
linuxfet.c:427: error: `MOD_DEC_USE_COUNT' undeclared (first use in this function)
linuxfet.c: In function `via_probe1':
linuxfet.c:553: warning: implicit declaration of function `init_etherdev'
linuxfet.c:553: warning: assignment makes pointer from integer without a cast
linuxfet.c: In function `netdev_open':
linuxfet.c:1130: error: `MOD_INC_USE_COUNT' undeclared (first use in this function)
linuxfet.c:1132: warning: passing arg 2 of `request_irq' from incompatible pointer type
linuxfet.c:1134: error: `MOD_DEC_USE_COUNT' undeclared (first use in this function)
linuxfet.c: In function `set_rx_mode':
linuxfet.c:2588: warning: passing arg 2 of `set_bit' from incompatible pointer type
linuxfet.c: In function `netdev_close':
linuxfet.c:2739: error: `MOD_DEC_USE_COUNT' undeclared (first use in this function)
[root@andy temp]# make install
*** Clean up older object files ***
rm -f core *.o *~
***** Compile the driver source files to generate linuxfet.o
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -DMODULE -DMODVERSION -c linuxfet.c
In file included from /usr/src/linux/include/asm/irq.h:16,
from /usr/src/linux/include/linux/irq.h:21,
from /usr/src/linux/include/asm/hardirq.h:6,
from /usr/src/linux/include/linux/hardirq.h:6,
from /usr/src/linux/include/linux/interrupt.h:11,
from /usr/src/linux/include/asm/highmem.h:24,
from /usr/src/linux/include/linux/highmem.h:12,
from /usr/src/linux/include/linux/skbuff.h:27,
from /usr/src/linux/include/linux/if_ether.h:107,
from /usr/src/linux/include/linux/netdevice.h:29,
from linuxfet.h:30,
from linuxfet.c:19:
/usr/src/linux/include/asm/irq_vectors.h:87:32: irq_vectors_limits.h: 没有那个文件或目录
In file included from /usr/src/linux/include/asm/hardirq.h:6,
from /usr/src/linux/include/linux/hardirq.h:6,
from /usr/src/linux/include/linux/interrupt.h:11,
from /usr/src/linux/include/asm/highmem.h:24,
from /usr/src/linux/include/linux/highmem.h:12,
from /usr/src/linux/include/linux/skbuff.h:27,
from /usr/src/linux/include/linux/if_ether.h:107,
from /usr/src/linux/include/linux/netdevice.h:29,
from linuxfet.h:30,
from linuxfet.c:19:
/usr/src/linux/include/linux/irq.h:72: error: `NR_IRQS' undeclared here (not in a function)
In file included from /usr/src/linux/include/linux/irq.h:74,
from /usr/src/linux/include/asm/hardirq.h:6,
from /usr/src/linux/include/linux/hardirq.h:6,
from /usr/src/linux/include/linux/interrupt.h:11,
from /usr/src/linux/include/asm/highmem.h:24,
from /usr/src/linux/include/linux/highmem.h:12,
from /usr/src/linux/include/linux/skbuff.h:27,
from /usr/src/linux/include/linux/if_ether.h:107,
from /usr/src/linux/include/linux/netdevice.h:29,
from linuxfet.h:30,
from linuxfet.c:19:
/usr/src/linux/include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared here (not in a function)
In file included from linuxfet.c:19:
linuxfet.h:38:26: linux/malloc.h: 没有那个文件或目录
linuxfet.c: In function `pci_drv_register':
linuxfet.c:211: warning: implicit declaration of function `pci_find_class'
linuxfet.c:211: warning: assignment makes pointer from integer without a cast
linuxfet.c:298: error: `MOD_INC_USE_COUNT' undeclared (first use in this function)
linuxfet.c:298: error: (Each undeclared identifier is reported only once
linuxfet.c:298: error: for each function it appears in.)
linuxfet.c: In function `pci_drv_unregister':
linuxfet.c:427: error: `MOD_DEC_USE_COUNT' undeclared (first use in this function)
linuxfet.c: In function `via_probe1':
linuxfet.c:553: warning: implicit declaration of function `init_etherdev'
linuxfet.c:553: warning: assignment makes pointer from integer without a cast
linuxfet.c: In function `netdev_open':
linuxfet.c:1130: error: `MOD_INC_USE_COUNT' undeclared (first use in this function)
linuxfet.c:1132: warning: passing arg 2 of `request_irq' from incompatible pointer type
linuxfet.c:1134: error: `MOD_DEC_USE_COUNT' undeclared (first use in this function)
linuxfet.c: In function `set_rx_mode':
linuxfet.c:2588: warning: passing arg 2 of `set_bit' from incompatible pointer type
linuxfet.c: In function `netdev_close':
linuxfet.c:2739: error: `MOD_DEC_USE_COUNT' undeclared (first use in this function)
[root@andy temp]#
里面的文件.h找不到 我就不知道该怎么办了
我尝试过查找最新的支持linux的驱动 但是找不到~!
希望哪个大大可以9我与水火之中...感激 qq:441979144 期待你的建议 |
|