潜龙勿用,见龙在田
全部博文(540)
分类: LINUX
2009-03-02 17:34:00
Check kernel header files (not found) [ failed ]按照提示一步步安装,到后提示找不到kernel header,因为找不到/usr/src目录下有kernel相关的文件夹。我看了下install.sh这个脚本,安装这个驱动是要去找内核目录下的相关头文件(应该是在include目录)。于是在REDHAT官方下载了kernel source:kernel-2.6.18-92.el5.src.rpm,当然你也可以到kernel.org去下载linux-2.6.18.tar.gz。
Kernel header not found. Please install the linux header files
development package or create a symbolic link from the
/usr/src/KERNEL_VERSION directory to linux
Example: ln -s /usr/src/KERNEL_VERSION /usr/src/linux
The kernel's modpost utility is not available. As the source code
for the utility is available in your current installed linux kernel
source tree, you can compile the utility for your own.
To do so, please follow the description below:
(Please read the next lines before you execute them!)
[1] Change to /usr/src/linux
[2] Call make (this begins to create a new linux kernel)
[3] Take a look at the output: After a few seconds the modpost utility
will be compiled
[4] Now interrupt the make process by pressing ctrl-c
The modpost utility now is created. You can check this by taking a look
at /usr/src/linux/scripts/mod. Here you should find a file modpost now.
If you are finished recall install.sh again. That's it.
按照提示说是要编译内核才行啊,晕倒。要是每个驱动都要编译内核,谁还有耐心使用linux啊,编译一次内核整个流程跑完下来有可能比重新安装一次Linux的时间还多些,要不是我原系统上安装了不少应用,我才不干安装这个驱动这事儿呢。还好这里不需要跑整个流程,意思一下就行,即当看到modpost这个工具出现时就可以ctrl-c停止继续编译了。 Linux驱动安装这方面真的还需要大力改进啊。(感叹一番,呵呵!)
没办法,只能编译内核了:
224 cd /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686/
230 make
编译过程中看到出现有modpost出现则可以按ctrl-c停止编译了
ln -s /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686/ /usr/src/linux
./install.sh
根据提示:
modprobe sk98lin
建议reboot后检验一下:
lsmod |grep sk98lin
lspci查看一下网卡信息:
02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 12)
03:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 12)
[root@localhost ~]# dmesg |grep eth
eth0: Marvell Yukon 88E8056 Gigabit Ethernet Controller
eth1: Marvell Yukon 88E8056 Gigabit Ethernet Controller
...
如果uname -r的结果是一样,可以将这个.ko文件直接cp到其他系统中去,然后
mkdir /lib/modules/`uname -r`/kernel/drivers/net/sk98lin
cp sk98lin.ko /lib/modules/`uname -r`/kernel/drivers/net/sk98lin
insmod sk98lin
正常插入模块后会显示网卡厂商等相关信息
modprobe sk98lin
正常的话没有任何显示,表示安装成功了
---------------
另外一种安装方法:
现在下载的该驱动sk98lin.tar.gz内带一个安装shell脚本install.sh,你只需要提供系统对应kernel的源码目录(说明:/usr/src/kernel/`uname -r`是默认的,但该驱动去访问的源码目录则为/usr/src/linux,安装过程中会提示你建立一个软链接)以及kernel-header和gcc编译器。
kernel-devel
按照脚本提示和推荐的安装就能搞定了。最后安装成功的话会提示你运行modprobe sk98lin,然后你应该reboot使网卡驱动加载运行。