[PlanetCCRMA] nForce / NVIDIA with planet kernel

jfm3 jfm3@ouroboros-complex.org
Fri Aug 29 15:12:01 2003


As I noted before on this list, I've made a kernel that compiles support
for the nForce agp device. Basically, I nabbed the patch from
http://nvidia.com and put it into the spec file as patch 30000. This
seems to work. When X starts up, it claims to use dri. Latency is
acceptable, around 3ms. There are some spikes in the latencytest output,
but I think I can get rid of them if I give some attention to the PCI
bus settings.

Now I would like to use my NVIDIA graphics card with this kernel. I put
up drivers using NVIDIA-Linux-x86-1.0-4496-pkg2.run from nvidia's web
site, and changed the driver in Xfree86 from "nv" to "nvidia". I make
sure agpgart and nvidia kernel modules are loaded. When X starts it
seems to make the screen all black, and then hangs.

I then went and got the NVIDIA*.src.rpm files. They're older versions of
the software, but I figured it was worth a shot. I try to build
NVIDIA_kernel and get this error:


[root@localhost SPECS]# rpmbuild -ba NVIDIA_kernel.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.13467
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ cd /usr/src/redhat/BUILD
+ rm -rf NVIDIA_kernel-1.0-3123
+ /usr/bin/gzip -dc
/usr/src/redhat/SOURCES/NVIDIA_kernel-1.0-3123.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd NVIDIA_kernel-1.0-3123
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.13467
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd NVIDIA_kernel-1.0-3123
+ LANG=C
+ export LANG
+ set +e
++ rpm -q --queryformat '%{VERSION}' rpm
+ RPMVERSION=4.2
++ echo 4.2
++ awk -F . '{print $1;}'
+ RPMMAJOR=4
++ echo 4.2
++ awk -F . '{print $2;}'
+ RPMMINOR=2
++ echo 4.2
++ awk -F . '{print $3;}'
+ RPMPATCH=
+ '[' 4 -le 3 -a 2 -le 0 -a -lt 4 ']'
/var/tmp/rpm-tmp.13467: line 35: [: too many arguments
+ make NVdriver
echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -1`\" > nv_compiler.h
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts
-Wparentheses -Wpointer-arith -Wcast-qual -Wno-multichar  -O -MD
-D__KERNEL__ -DMODULE
-D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -DRM_HEAPMGR
-D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE  -DNV_MAJOR_VERSION=1
-DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=3123  -DNV_UNIX   -DNV_LINUX  
-DNVCPU_X86       -I. -I/lib/modules/2.4.20-18.1.caps.jfm3/build/include
-Wno-cast-qual nv.c
nv.c: In function `nv_kern_mmap':
nv.c:1305: warning: passing arg 1 of `remap_page_range_Rdfc40ab3' makes
pointer
from integer without a cast
nv.c:1305: incompatible type for argument 4 of
`remap_page_range_Rdfc40ab3'
nv.c:1305: too few arguments to function `remap_page_range_Rdfc40ab3'
nv.c:1322: warning: passing arg 1 of `remap_page_range_Rdfc40ab3' makes
pointer
from integer without a cast
nv.c:1322: incompatible type for argument 4 of
`remap_page_range_Rdfc40ab3'
nv.c:1322: too few arguments to function `remap_page_range_Rdfc40ab3'
nv.c:1353: warning: passing arg 1 of `remap_page_range_Rdfc40ab3' makes
pointer
from integer without a cast
nv.c:1353: incompatible type for argument 4 of
`remap_page_range_Rdfc40ab3'
nv.c:1353: too few arguments to function `remap_page_range_Rdfc40ab3'
nv.c: In function `nv_get_phys_address':
nv.c:2182: warning: implicit declaration of function `pte_offset'
nv.c:2182: invalid type argument of `unary *'
make: *** [nv.o] Error 1
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.27216
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd NVIDIA_kernel-1.0-3123
+ LANG=C
+ export LANG
+ rm -f /tmp/files.lst
+ '[' -z '' ']'
++ uname -r
+ export TARGET_KERNEL=2.4.20-18.1.caps.jfm3
+ TARGET_KERNEL=2.4.20-18.1.caps.jfm3
+ '[' -d /lib/modules/2.4.20-18.1.caps.jfm3/kernel ']'
+ INSTALLPATH=/lib/modules/2.4.20-18.1.caps.jfm3/kernel/drivers/video
+ mkdir -p
/var/tmp/NVIDIA_kernel-1.0//lib/modules/2.4.20-18.1.caps.jfm3/kernel/drivers/video
+ install -m 0444 NVdriver
/var/tmp/NVIDIA_kernel-1.0//lib/modules/2.4.20-18.1.caps.jfm3/kernel/drivers/video
install: cannot stat `NVdriver': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.27216 (%install)
 
 
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.27216 (%install)

Now, I am continuing to crank away at trying to figure this out. I have
the feeling that I have some kernel headers wrong. But these days kernel
headers come from some glibc package. I tried making /usr/include/linux
a symbolic link into the actual kernel sources, but I got the same
compile error from the above build attempt. Another avenue I may pursue
is making packages of more recent NVIDIA drivers. 

Any ideas are welcome. Especially if someone has already made more
recent versions of the NVIDIA drivers.

Also, it would be useful to know how close Planet CCRMA is to moving
over to the new 2.4.22 stable kernel.

Thanks much. 

-- 
(jfm3  2838 BCBA 93BA 3058 ED95  A42C 37DB 66D1 B43C 9FD0)