CentOS4-5光盘中没有提供源码,只要头文件,当需要编译驱动时就会提示没有安装源码,可以通过如下方式获取:
1、yum install rpm-build RedHat-rpm-config unifdef2、rpm -i http://mirror.centos.org/centos/5/updates/SRPMS/kernel-2.6.18-238.19.1.el5.src.rpm 2>&1 | grep -v mockb
3、cd ~/rpmbuild/SPECS
4、rpmbuild -bp –target=`uname -m` kernel-2.6.spec 2> prep-err.log | tee prep-out.log
最后源码就在~/rpmbuild/BUILD/下