linux网卡驱动程序的编译与安装
一般来说,目前新版的 Linux 预设可以支持的网络卡芯片组数量已经很完备了,很多网络卡芯片都已经被支持,例如RLT 8139 芯片 ( RealTek 8139 ) 的网络卡所以使用者可以很轻易的设定好他们的网络卡。不过,如果万一不幸核心没有支持该网络卡的话,那么可以透过重新编译核心或者编译网络卡驱动模块 ( Modules ),并且加载该模块,今天就是这么巧,碰到一个D-Link 的DFE-530TX,没法,只有手动安装网络卡驱动程序了.可以用命令:
# dmesg | grep eth
来查看系统启动信息,显示出 eth0 或者 eth1 的信息,如果eth1没找到正确的信息,那就表示 Linux 无法找到该硬件, eth0是8139的,已经显示正常,例如:
[root@kindgeorge root]# dmesg | grep eth
eth0: RealTek RTL8139 Fast Ethernet at 0xf0160000, 00:0a:a6:30:0d:0e, IRQ 11
eth0: Identified 8139 chip type 'RTL-8139C'
eth0: Setting 10mbps full-duplex based on auto-negotiated partner ability 4061.
一. 查看自己系统的内核版本.
[root@kindgeorge root]# uname -r
2.4.18-3
我这里是redhat7.3的,内核2.4.18-3 ,一般来说,这个内核驱动程序的模块会放在 /lib/modules/2.4.18-3/kernel/drivers/net
二.确定系统是否已经安装下面包
1.由于编译需要用到内核的源代码包和编译程序gcc.所以如果没有的话,要先装.查看:
[root@kindgeorge root]# rpm -qa|grep kernel
kernel-2.4.18-3
kernel-source-2.4.18-3
[root@kindgeorge root]# rpm -qa|grep gcc (gcc是编译用)
gcc-2.96-110
gcc-g77-2.96-110
gcc-c++-2.96-110
一般装了内核源包的话,都会在出现/usr/src/linux-2.4,同路径下会有linux-2.4.18-3的文件实际目录.
2.如果没有的话,就用原来安装盘上的文件安装,会去下载个相同内核源包安装吧rpm -ivh kernel-source-2.4.18-3.i386.rpm
三. 取得驱
相关文档:
【1. linux applications 有两种形式】
i)可执行的文件: 可由计算机直接运行,相当于windows的.exe文件
ii)Script: collections of instructions for another program. 相当于windows的.bat .cmd文件
【2. PATH】
在Linux中,当输入程序名(如Firefox)时,系统会在名为PATH的Shell变量所给 ......
// Linux Device Driver Template/Skeleton with mmap
// Kernel Module
#include <linux/module.h>
#include <linux/init.h>
#include <linux/version.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#inclu ......
Get Redhat Enterprise 3.0 from:
Your local RedHat rep�
Get Veritas’ VCS and VM products from:
ftp://ftp.veritas.com/pub/products/fst_ha.lxrt2.2.redhatlinux.tar.gz
ftp://ftp.veritas.com/pub/products/fst_ha.lxrt2.2MP1.redhatlinux.tar.gz
You will need a temporary key to complete this ......
本来想用 kernel-module-ntfs-2.6.18-53.el5-2.1.27-0.rr.10.11.i686这种格式的包,但发现系统内核 2.6.18-164.2.1.el5.plus
根本找不到对应的文件,所以只好使用 ntfs-3g.
安装很简单,直接从http://www.ntfs-3g.org/index.html 下载最新的文件,
#wget http://www.ntfs-3g.org/ntfs-3g-2009.4.4.tgz
# ......
转自 http://blog.china-pub.com/more.asp?name=uniware&id=35478
在Linux下产生并调试core文件
先看看我用的是个什么机器:
$ uname -a
Linux dev 2.4.21-9.30AXsmp #1 SMP Wed May 26 23:37:09 EDT 2004 i686 i686 i386 GNU/Linux
再看看默认的一些参数,注意core file size是个0,程序 ......