|
发表于 2006-10-11 11:30:45
|
显示全部楼层
Post by fiag
编译加载成功,多谢。
我的源是
deb http://debian.cn99.com/debian/ testing main contrib non-free
deb-src http://debian.cn99.com/debian/ testing main contrib non-free
deb http://mirrors.geekbone.org/debian/ testing main contrib non-free
deb-src http://mirrors.geekbone.org/debian/ testing main contrib non-free
deb http://security.debian.org/ testing/updates main
能找到这些包。
achaoge兄写的很简略。
这篇HOWTO很详全,介绍了好几种方法。
http://home.comcast.net/~andrex/Debian-nVidia/installation.html
我的步骤整理如下:
1.安装内核相对应的 kernel-headers
# apt-get install kernel-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
6.安装生成的deb包
# dpkg -i /usr/src/modules/nvidia-kernel-*.deb
7.安装NVIDIA glx
# apt-get install nvidia-glx
8.修改X配置
# editor /etc/X11/XF86Config-4
"Module" section
Load "glx"
删除"dri" "GLCore"模块的加载
"Device" section
Driver "nvidia"
9.添加video用户组
# addgroup --system video
# adduser $USER video
$USER 是用来看影视的用户名
系统似乎已经建立过video用户组了。
10.确保nvidia模块在内核启动时加载
# grep -q ^nvidia /etc/modules || echo nvidia >> /etc/modules
11. 重启内核或者X看效果。
救命!做到第5步编译模块时出错!错误如下
word' 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 |
|