Chinaunix首页 | 论坛 | 博客
  • 博客访问: 94993
  • 博文数量: 17
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 230
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-24 17:41
文章分类

全部博文(17)

文章存档

2008年(17)

我的朋友

分类: LINUX

2008-07-25 14:29:41

在FC5中,没有对RTL8168/8111网卡的支持,安装步骤如下:
一、下载FC5内核源码包:
      

   
下载RTL8168/8111驱动(r8168-8.006.00.tar.bz2): 
   
  

    (
        4&DownTypeID=3&GetDown=false#RTL8111B/RTL8168B/RTL8111/RTL8168/RTL8111C)
   
内核开发工具kernel-devel-2.6.15-1.2054-FC5.i686.rpm 在FC5安装光盘有直接安装

二、 编译内核
        
#rpm -uch kernel-2.6.15-1.2054_FC5.src.rpm
           
#cd /usr/src/redhat/SPECS
            #rpmbuild -bp
--target=i686 kernel-2.6.spec   
        
#cd /usr/src
            #mkdir kernels
            #cd kernels/
           
#ls -l /lib/modules/2.6.15-1.2054_FC5/
           
在显示结果中有两个符号链接文件是无效的

            build->../../../usr/src/kernels/2.6.15-1.2054_FC5-smp-i686
            source->build

               下面就要构造这两个指向内核源码树的连接
            #ln -s ../redhat/BUILD/kernel-2.6.15/linux-2.6.15.i686 2.6.15-1.2054-FC5-smp-i686
            #cd 2.6.15-1.2054_FC5-smp-i686
            #cp configs/kernel-2.6.15-i686.config .config
            #cd /usr/src/kernels/2.6.15-1.2054_FC5-i686
            #vi Makefile  //Makefile中的EXTRAVERSION = -prep换成EXTRAVERSION = -1.2054_FC5
            #make mrproper //创建新的.o文件及依赖关系
            #make oldconfig
            #make modules_install

三、 安装驱动
       按照readme安装即可:
       Unpack the tarball :
        # tar vjxf r8168-8.aaa.bb.tar.bz2

    Change to the directory:
        # cd r8168-8.aaa.bb

    If you are running the target kernel, then you should be able to do :

        # make clean modules    (as root or with sudo)
        # make install
        # depmod -a
        # insmod ./src/r8168.ko (or r8168.o in linux kernel 2.4.x)

    You can check whether the driver is loaded by using following commands.

        # lsmod | grep r8168
        # ifconfig -a

    If there is a device name, ethX, shown on the monitor, the linux
    driver is loaded. Then, you can use the following command to activate
    the ethX.

        # ifconfig ethX up

        ,where X=0,1,2,...


阅读(2290) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2011-07-24 10:18:06

啊。又要接触编程吗?我很头大的。还有那个内核码包链接MS打不开吧