LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 3370|回复: 30

请教各位我安的是fc6 能识别我的网卡但激活不了如何解决

[复制链接]
发表于 2006-11-23 16:18:31 | 显示全部楼层 |阅读模式
我的网卡制造商是  realtek semiconductor corp .
    网卡 realtek rtl8169/8110 family gigabit ethernet nic
我光盘里的linux驱动是makefile文件形式的怎样安装编译
弄了好几天了真实头疼呀
请高手解决~!~
 楼主| 发表于 2006-11-27 13:52:48 | 显示全部楼层
晕呀
怎么没人回帖呀
我都等好几天了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-27 13:53:43 | 显示全部楼层
有没有高手帮我解决呀~!~
我顶顶顶
回复 支持 反对

使用道具 举报

发表于 2006-11-27 15:20:18 | 显示全部楼层
顶什么啊?
“我光盘里的linux驱动是makefile文件形式的怎样安装编译”
这不就是问题吗?
驱动是压缩包形式的吧?
先解压缩,进入目录,看readme文件。
不过通常是
tar -zxvf filename.tar.gz
cd filename
make
make install
insmod filename
具体看看你的readme文件吧。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-28 22:54:26 | 显示全部楼层
不是的光盘里的linux 驱动就是 makefile 文件形式的还有一个8169.h的编译时抱错
不过也谢谢了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-28 22:54:47 | 显示全部楼层
不是的光盘里的linux 驱动就是 makefile 文件形式的还有一个8169.h的编译是抱错
不过也谢谢了
回复 支持 反对

使用道具 举报

发表于 2006-11-28 23:33:51 | 显示全部楼层
需要对内核源中的r8169.c打补丁, 重新编译得到新的内核:
具体步骤:
01) download
http://mirrors.kernel.org/fedora ... -1.2798.fc6.src.rpm
02) rpm -ivh kernel-2.6.18-1.2798.fc6.src.rpm
03) cd /usr/src/redhat/SOURCES; cp linux-2.6-r8169-update.patch .
04) cd /usr/src/redhat/SPECS
05) cp kernel-spec.patch . ; patch -p0 < kernel-spec.patch
06) rpmbuild -ba kernel-2.6.spec
07) cd /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i386/
08) make
09) make modules_install
10) make install
11) reboot
注:
1) 8169的补丁由此下载
http://www.redhat.com/archives/f ... r/bz2cn5ViWMCwG.bz2, 存盘解开后的文件名改名为linux-2.6-r8169-update.patch
2) kernel-spec.patch 内容如下, 将以下内容copy下来存为kernel-spec.patch
*** kernel-2.6.spec.orig        2006-11-02 01:44:41.000000000 +0100
--- kernel-2.6.spec        2006-11-02 02:03:47.000000000 +0100
*************** Summary: The Linux kernel (the core of t
*** 5,11 ****
  
  %define buildup 1
  # Only used on archs without run-time support (ie ppc, sparc64)
! %define buildsmp 0
  %define buildpae 0
  # Whether to apply the Xen patches, leave this enabled.
  %define includexen 1
--- 5,11 ----
  
  %define buildup 1
  # Only used on archs without run-time support (ie ppc, sparc64)
! %define buildsmp 1
  %define buildpae 0
  # Whether to apply the Xen patches, leave this enabled.
  %define includexen 1
*************** Patch4: git-agpgart.patch
*** 306,311 ****
--- 306,312 ----
  
  # Patches 10 through 99 are for things that are going upstream really soon.
  Patch10: linux-2.6-utrace.patch
+ Patch11: linux-2.6-r8169-update.patch
  
  # enable sysrq-c on all kernels, not only kexec
  Patch20: linux-2.6-sysrq-c.patch
*************** cd linux-%{kversion}.%{_target_cpu}
*** 817,822 ****
--- 818,824 ----
  
  # Rolands utrace ptrace replacement.
  %patch10 -p1
+ %patch11 -p0
  
  # sysrq works always
  %patch20 -p1
回复 支持 反对

使用道具 举报

发表于 2006-11-28 23:34:33 | 显示全部楼层
需要对内核源中的r8169.c打补丁, 重新编译得到新的内核:
具体步骤:
01) download
http://mirrors.kernel.org/fedora ... -1.2798.fc6.src.rpm
02) rpm -ivh kernel-2.6.18-1.2798.fc6.src.rpm
03) cd /usr/src/redhat/SOURCES; cp linux-2.6-r8169-update.patch .
04) cd /usr/src/redhat/SPECS
05) cp kernel-spec.patch . ; patch -p0 < kernel-spec.patch
06) rpmbuild -ba kernel-2.6.spec
07) cd /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i386/
08) make
09) make modules_install
10) make install
11) reboot
注:
1) 8169的补丁由此下载
http://www.redhat.com/archives/f ... r/bz2cn5ViWMCwG.bz2, 存盘解开后的文件名改名为linux-2.6-r8169-update.patch
2) kernel-spec.patch 内容如下, 将以下内容copy下来存为kernel-spec.patch
*** kernel-2.6.spec.orig        2006-11-02 01:44:41.000000000 +0100
--- kernel-2.6.spec        2006-11-02 02:03:47.000000000 +0100
*************** Summary: The Linux kernel (the core of t
*** 5,11 ****
  
  %define buildup 1
  # Only used on archs without run-time support (ie ppc, sparc64)
! %define buildsmp 0
  %define buildpae 0
  # Whether to apply the Xen patches, leave this enabled.
  %define includexen 1
--- 5,11 ----
  
  %define buildup 1
  # Only used on archs without run-time support (ie ppc, sparc64)
! %define buildsmp 1
  %define buildpae 0
  # Whether to apply the Xen patches, leave this enabled.
  %define includexen 1
*************** Patch4: git-agpgart.patch
*** 306,311 ****
--- 306,312 ----
  
  # Patches 10 through 99 are for things that are going upstream really soon.
  Patch10: linux-2.6-utrace.patch
+ Patch11: linux-2.6-r8169-update.patch
  
  # enable sysrq-c on all kernels, not only kexec
  Patch20: linux-2.6-sysrq-c.patch
*************** cd linux-%{kversion}.%{_target_cpu}
*** 817,822 ****
--- 818,824 ----
  
  # Rolands utrace ptrace replacement.
  %patch10 -p1
+ %patch11 -p0
  
  # sysrq works always
  %patch20 -p1
回复 支持 反对

使用道具 举报

发表于 2006-12-4 22:43:10 | 显示全部楼层
请问:
执行patch -p0 < kernel-spec.patch后,提醒%define buildup 1有错误,到底是为什么了?请高手指点!
回复 支持 反对

使用道具 举报

发表于 2006-12-4 23:30:40 | 显示全部楼层
奇怪, 应该不会出现这个错误的.
我也研究过了, 即使不patch kernel-spec.patch也行,
最好先touch /etc/beehive-root (否则编译完的kernel带一个令人不舒服的.root后缀)
进cd /usr/src/redhat/SPECS
rpmbuild -ba kernel-2.6.spec
然后你要进到/usr/src/redhat/SOURCES目录, 找到r8169.c文件, 把linux-2.6-r8169-update.patch这个文件放到r8169.c所在的目录, 执行
patch -p0 < linux-2.6-r8169-update.patch, 只要内核版本>2.6.18, 应该没有问题.
然后
cd /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i386/
1) make
2) make modules_install
3) make install
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表