PDA

View Full Version : Building NVIDIA_kernel-1.0-3123.rh73up.i686.rpm to patch nv.c


camel
10-29-02, 05:52 AM
After a lot of hassle and wasting tonnes of hours that I don't have, I have got the nvidia drivers to work in a Dell Inspiron 8200 running RH7.3. I am able to run X at various resolutions between 800x600 up to 1600x1200.

The nvidia rpms I have installed (as recommended by nvchooser.sh) to get things to work are:

NVIDIA_kernel-1.0-3123.rh73up.i686.rpm
NVIDIA_GLX-1.0-3123.i386.rpm

'uname -a' gives me the following:

Linux localhost.localdomain 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 unknown

I need to change an nvidia kernel driver source file called nv.c, because other users have said this is what stops my apm suspend form working. If there is an easier way then please tell me?

I have downloaded the nvidia source rpm corresponding with the above kernel binary rpm. The file is:

NVIDIA_kernel-1.0-3123.src.rpm

After installing it and going to the relevant directory, trying to build it results in compilation failure due to the linux header files installed on my system not being right for my running linux kernel, they are just for the gcc version I have installed, not the kernel.
I presume this is the cause from reading a previous post on this group.

My question is how do I know what Linux source kernel rpm to install? My kernel source is not installed. I looked on the 3 redhat 7.3 distribution cds and I found a file called (on cd 2)

kernel-source-2.4.18-3.i386.rpm (approx. 26 mb in size)

I am not sure this is the right source? Why is it specific for i386? My architecture is i686 according to 'uname -a', my processor is P4 2.0Ghz. Are you sure this is the right package? Maybe they mean i386 as in Intel x86 as opposed to Sparc, Mips etc. It is a bit confusing, when nvidia driver filenames imply different drivers are needed for each x86 generation.

Say I install this source package, then go to the nvidia kernel source directory, to build, do I just type make there, or do I need to give an a path argument on the command line with SYSINCLUDE?

I would also like to know if anybody knows how to change X server screen resolution on the fly, without, hacking XF86Config-4 exiting the server and then restarting?

I thought it could be done with alt- or alt+ as long as there are several resolutions set up in the XF86Config-4.

bwkaz
10-29-02, 08:15 AM
If you really want to make sure you have the right kernel-source installed, download one from www.kernel.org and build and install it.

But, normally, it will suffice to install that kernel-source that's on your RH CD. It's i386 to indicate that it can be installed on any Intel architecture. It's just source code, so it doesn't care which processor you're running. Yeah, it's slightly confusing, but if nVidia didn't distribute precompiled RPMs, then they wouldn't have to worry about architecture, so it wouldn't be in the file name (most likely), so you wouldn't have been confused. It's all because they want to distribute them in binary form. :p Whatever.

Anyway, once you get that kernel-source installed, cd /usr/src/linux/config (or it might be /usr/src/linux/configs), and look for a file that describes which kernel configuration you have. Stuff like -smp for dual processors, -secure for the "secured" kernels, and the actual architecture (P4, or i686). Copy that file up a level: cp config-smp-i686 ../.config (or whatever config file you need, rather than config-smp-i686). Then cd .. and make mrproper oldconfig dep

Once you've done that, try to build the nVidia source again. You shouldn't need to use SYSINCLUDE.