Xiangbuilder 发表于 2003-3-31 11:53:26

怎样编译生成网卡的驱动模块?

Friends use English, please go to the fifth post,
there are three picture. the errors' information are on them.
买网卡时带的软盘中LINUX文件夹下共有六个文件:
kern_compat.h,Makefile,pci-scan.c,pci-scan.h,RTK8189C.c,Readme.txt。
RADTEK RTK8189C Based Fast Ethernet Card
Linux 2.4.X Driver Installation Guide
这是帮助文件:
Installation Procedure
1. Make network adapter driver modules
touch *
make clean
make
*Under some distribution, such as SuSe 7.2 and BluePoint 2.0, there is no version.h.
You have to run "make config" or "make menuconfig" at /usr/src/linux to create it.
**If you are using Mandrake 8.0 and you have problems when insmod the dirver, please
remove "-DMODVERSIONS" option from makefile.
***On SMP system, the driver may NOT work well. The bug will be fixed in the future.
***On SMP system, the driver may NOT work well. The bug will be fixed in the future.
2. Insert network adapter driver modules
insmod pciscan.o
insmod RTK8189C.o
我的操作:
#gcc -DMODVERSIONS -DMODULE -D__KERNEL__ -Wall
-Wstrict-prototypes -O6 -c pciscan.o时:
出错.应该怎么办?
谢谢.

wxk 发表于 2003-3-31 22:00:17

Readme文件上已经说得很清楚了,按着步骤走不就可以了, 用make命令去调用Makefile就行了。为什么用gcc呢

Xiangbuilder 发表于 2003-3-31 22:19:34

谢谢.
关于"用make命令去调用Makefile就行了"
当我 make clean时,
make:***No rule to make 'clean'.Stop.
当我 make时,
make:***No targets specified and no makefile found. Stop.
我已把驱动程序中的六个文件:
kern_compat.h,Makefile,pci-scan.c,pci-scan.h,RTK8189C.c,Readme.txt。
使用右键单击的方式全部复制到了TMP文件夹.
关于"为什么用gcc呢 "
我用gcc是想根据pciscan.c 编译生成pciscan.o,
倘若不存在pciscan.o,INSMOD命令从何谈起呢?

wxk 发表于 2003-3-31 22:54:26

如果你就在软盘上编译试试呢?

Xiangbuilder 发表于 2003-4-1 10:44:33

Why the errors occur after I u

软盘上编译,报错的情况相同.
不过从硬盘上执行MAKE MAKE CLEAN时报错的问题,
刚才倒是解决了一部分.
现在MAKE时出现了新的问题,
并不能生成insmod pciscan.o,
insmod RTK8189C.o
请看下图.
After I used "make" command, the errors occur.
Please see the pictures below:

llc 发表于 2003-4-1 12:20:44

2.4.x系列内核自带了8139驱动,驱动模块为8139too

Xiangbuilder 发表于 2003-4-1 16:59:28

你说的RTL瑞昱网卡吧?
我这网卡是台湾一家公司的产品,好象是PRO-LINK,
不是RTL系列.
页: [1]
查看完整版本: 怎样编译生成网卡的驱动模块?