problem installing nv kernel for RH kernel 2.4.18_19
I have a problem with my GeForce4 Ti4600 kernel driver for red hat 8. I'm running kernel 2.4.18-19.0 First, I tried to install the rpm (NVIDIA_kernel-1.0-4191.rh80up_2.4.18_18.8.0.i686.rpm). I got this error:
[modprobe: can't locate module nvidia. Failed to install nvidia.o]
Thus, I figured out It might have been that I needed a specific rpm, a rh80up-2.4.18-19.0 that matches my kernel version, which doesn't exist. So, I tried to install by SRPM (NVIDIA_kernel-1.0-4191.src.rpm). However, I got the following error:
[install: can't stat 'nvidia.o': no such file or directory]
So finally, I tired to install by the tar file (NVIDIA_kernel-1.0-4191.tar.gz). I got so many compilation errors in nv.c!!! The error message was:
[errors in nv.c
make: ***[nv.o] Error1]
Which makes me think may be it has to do with the compiler version. May be I should use the same exact compiler version used to compile my rh kernel to compile the nv drivers!!!
Can any one give me an insight of what is the problem? I've followed the instructions in the nvidia documentation; not very helpful unfortunately
Usually this is because the kernel source is not installed, or at least not installed properly.
First, what I would do is find the kernel-source*.rpm package at Redhat's FTP site. Attempt to reinstall the nVidia kernel source rpm's afterwards.
I had to reinstall the kernel source manually after running the Redhat 8.0 update agent for the first time.
The errors you have posted are the result of other errors. i.e., we can see that there was an error in nv.c which prevented nv.o from being built, which caused an "error 1" in make. But without seeing exactly what those errors were, there is no way to find out how to fix them, I'm sure that makes sense.
The problem is very likely that you don't have kernel-source installed or have it installed but not configured. But there's really no way to know for sure without the full error output of make.
Well, there were about 2000 errors in that nv.c file!!!! My guessing is that the functions in the file might be dependent on libraries in the kernel that does not exist for some reason!
What is the kernel source? I have the rh kernel it self installed. Why do I need the source? How would I configure the kernel source and configure it to do what?
Thx in advance folks.
If you're getting about 2000 errors, then you almost assuredly don't have kernel-source installed. And incidentally, it's not libraries in the kernel (the kernel doesn't even have libraries as such), it's the definition of various internal-to-the-kernel functions that the nVidia drivers need to be able to get the declarations for. To do this, they need the header files from a configured kernel-source package that matches (version-wise and configuration-wise) the running kernel.
kernel-source should be somewhere on RedHat's FTP site. Get the -19.8.0 version. Once you install it, it will very likely create a /usr/src/linux directory (actually, linux will be a symlink to linux-2.4.18-19.8.0, but that's not important), so cd to that directory. Then, do a cd configs/, and see what's there. Copy the config file that matches your hardware to .., then cd .. and run make mrproper oldconfig dep to do the configuration. It should be all automatic. When you get a shell prompt back, go to the nVidia kernel directory and do a make clean NVdriver, then if that works, do a make install as root.
Kernel source gives zillions of warnings
Well, I'm following the advice and trying to install the kernel source rpm. I simply used:
rpmbuild --rebuild kernel-2.4.18-19.8.0.src.rpm
I got about zillions of warnings from the compiler + it took too long that I had to kill the process ( i had to go to bed at some point). Many of the warnings were for declared but never used variables, ...etc. I would imagine something like a kernel source is written by pros, and that you shouldn't even see one warning!!! Did I do something wrong or is this normal?
What does rpm -qa | grep source tell you? Anything?
uhh kernel source is the rpm named something like
can't make clean NVdriver!!!
Ok, so I follwed bwkaz's instructions and every thing went smooth until the part where I need to go to the nVidia kernel directory and do a make clean NVdriver. Make displays the command on the screen (rm -f nv.o os-agp.o .......... nvidia.o). Then, make displays this error message:
make: No rules to make target 'NVdriver'. Stop.
Just in case you want to make sure I did cd to the correct dir, that was:
Oh, yeah. You're using the newer driver. Do a make clean nvidia.o instead; that should work.
So i did cd to the nVidia kernel directory /usr/src/redhat/BUILD/NVIDIA_kernel***
and typed: make clean nvidia.o
Here's what I got:
In file included from nv-linux.h:24,
/usr/include/linux/modversions.h:1:2: #error Modules should never use kernel-headers system headers,
/usr/include/linux/modversions.h:2:2: #error but rather headers from an appropriate kernel-source package.
/usr/include/linux/modversions.h:3:2: #error Change -I/usr/src/linux/include (or similar) to
/usr/include/linux/modversions.h:4:2: #error -I/lib/modules/$(uname -r)/build/in clude
/usr/include/linux/modversions.h:5:2: #error to build against the currently-running kernel.
In file included from nv-linux.h:83,
/lib/modules/2.4.18-19.8.0/build/include/linux/highmem.h: In function `bh_kmap':
/lib/modules/2.4.18-19.8.0/build/include/linux/highmem.h:20: warning: pointer of type `void *' used in arithmetic
make: *** [nv.o] Error 1
You still haven't installed the kernel-source-$(uname -r) package, have you.
You NEED this package installed before the NVIDIA_kernel package will compile!
If you have, then for some reason, there is no build symlink in /lib/modules/$(uname -r), and there is no /usr/src/linux symlink either. You'll need one of those, and it's going to have to point at wherever the kernel sources have been installed to (usually /usr/src/linux-<version>). If that directory doesn't exist, then you haven't installed kernel-source.
|All times are GMT -5. The time now is 06:53 AM.|
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©1998 - 2013, nV News.