LinuxSir.cn,穿越时空的Linuxsir!

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

安装nvidia驱动出错

[复制链接]
发表于 2006-10-11 19:02:24 | 显示全部楼层 |阅读模式
按一下步骤安装nvidia驱动:
1.安装内核相对应的 kernel-headers
# apt-get install linux-headers-$(uname -r)

2,安装 nvidia-kernel-source,安装 nvidia-kernel-common
# apt-get install nvidia-kernel-source nvidia-kernel-common

3,进入/usr/src,将nvidia-kernel-source解压
# cd /usr/src
# tar xzf nvidia-kernel-source.tar.gz

4,设变量
# cd modules/nvidia-kernel
# export KVERS=$(uname -r)
# export KSRC=/usr/src/kernel-headers-$KVERS

5.编译模块
# cd /usr/src/modules/nvidia-kernel
# debian/rules binary_modules

到编译模块debian/rules binary_modules 这里出错了
错误如下:
nv.c:2351: warning: pointer targets in passing argument 2 of 'rm_read_registry_dword' differ in signedness
nv.c:2351: warning: pointer targets in passing argument 3 of 'rm_read_registry_dword' differ in signedness
nv.c:2351: warning: pointer targets in passing argument 4 of 'rm_read_registry_dword' differ in signedness
nv.c: In function 'nv_get_kern_phys_address':
nv.c:2637: error: 'CONFIG_PAGE_OFFSET' undeclared (first use in this function)
nv.c: In function 'nv_alloc_pages':
nv.c:2702: warning: pointer targets in passing argument 5 of 'KernAllocAGPPages' differ in signedness
nv.c:2732: warning: pointer targets in passing argument 6 of 'rm_alloc_agp_pages' differ in signedness
nv.c: In function 'nv_agp_init':
nv.c:3092: error: too few arguments to function 'agp_backend_acquire'
nv.c:3094: error: too few arguments to function 'agp_backend_release'
nv.c: In function 'nvos_count_devices':
nv.c:3232: warning: assignment makes pointer from integer without a cast
nv.c:3237: warning: assignment makes pointer from integer without a cast
make[1]: *** [nv.o] 错误 1
make[1]: Leaving directory `/usr/src/modules/nvidia-kernel/nv'
make: *** [build-stamp] 错误 2

我的内核是2.6.16-2-486
请问是什么原因?
发表于 2006-10-11 20:42:09 | 显示全部楼层
Not sure.

But one important thing you should bare in mind.  nvidia display driver is actually built as kernel module.  Therefore, the compiler being used to build the display driver must be same version of the compiler to build the kernel.
回复 支持 反对

使用道具 举报

发表于 2006-10-11 22:20:39 | 显示全部楼层
为什么不试一下
# apt-get install nvidia-kernel-legacy-$(uname -r)
呢~~
回复 支持 反对

使用道具 举报

发表于 2006-10-11 23:34:50 | 显示全部楼层
刚解决过这个问题

duhoobo.blogspot.com 上有些体会

这种编出错的情况我碰见过,我建议就是,确定你下的是最8774的nvidia-kernel-source, sid里的应该就是。然后先module-assistent prepare一下(保证内核header确实和内核一致),再设置KVERS和KSRC

然后再编nvidia-kernel-source..
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-10-12 18:57:22 | 显示全部楼层
Post by d00m3d
Not sure.

But one important thing you should bare in mind.  nvidia display driver is actually built as kernel module.  Therefore, the compiler being used to build the display driver must be same version of the compiler to build the kernel.

应该是gcc版本的问题,我的gcc是4.1,好像内核模块需要的是4.0
那么应该怎么办?
是升级内核还是删了gcc另装?
回复 支持 反对

使用道具 举报

发表于 2006-10-12 19:09:59 | 显示全部楼层
Did you compile your own kernel or installed via apt-get?  Which branch, i.e. stable/testing/unstable, are you using?  I guess unstable, right?

It is possible to install several versions of gcc in the same system.
回复 支持 反对

使用道具 举报

发表于 2006-10-18 01:16:20 | 显示全部楼层
应该怎么搞?和呵呵 !
回复 支持 反对

使用道具 举报

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

本版积分规则

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