LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to not rebuild NVIDIA drivers for each kernel? (https://www.linuxquestions.org/questions/linux-general-1/how-to-not-rebuild-nvidia-drivers-for-each-kernel-451064/)

juanbobo 06-02-2006 09:15 PM

How to not rebuild NVIDIA drivers for each kernel?
 
Is it possible to not rebuild the NVIDIA drivers for each kernel build, if not for different versions of the kernel at least for rebuilds of the same kernel?

doc.nice 06-03-2006 04:37 AM

yes, before doing make modules_install simply backup the old nvdia module and copy it back afterwards...
(works only for rebuild of the same kernel version)

Bruce Hill 06-03-2006 07:14 AM

Actually, there is a way. Here's the short steps:
Code:

1. Boot with the new kernel.
2. Then cd to the following directory : /lib/modules/OLDKERNELVERSION/kernel/drivers/video/
(replace OLDKERNELVERSION with your own specific version)
3. Make a copy of the old driver: "cp nvidia.(k)o nvidia.(k)o.old"
4. Run the Nvidia installer
(this will create the new driver in /lib/modules/CURRENTKERNELVERSION/kernel/drivers/video/)
5. In the same directory mentioned under 2 do a rename to the original name
"mv nvidia.(k)o.old nvidia.(k)o"

These 5 simple steps will give you the Nvidia module in both kernels,
and you can quite happily boot into either one without re-installing.

Evidence:
Code:

dave@matthews:~$ ls /lib/modules/2.4.32/kernel/drivers/video/
aty/              fbcon-cfb4.o.gz        hgafb.o.gz    nvidia.o      sis/
aty128fb.o.gz    fbcon-hga.o.gz        intel/        pm2fb.o.gz    sstfb.o.gz
clgenfb.o.gz      fbcon-mfb.o.gz        it8181fb.o.gz  pm3fb.o.gz    tdfxfb.o.gz
cyber2000fb.o.gz  fbcon-vga-planes.o.gz  matrox/        radeonfb.o.gz  tridentfb.o.gz
fbcon-cfb2.o.gz  fbgen.o.gz            neofb.o.gz    riva/          vga16fb.o.gz
dave@matthews:~$ ls /lib/modules/2.6.16.19/kernel/drivers/video/
nvidia.ko

I've had these instructions for a year or more, but just tried
them on a customer's box. I've done it, rebooted a few times, and
it's nice how they work. ;)

doc.nice 06-03-2006 07:31 AM

I think it's not the problem building two nvidia-modules for different kernels, but keeping the nvidia module when rebuilding the kernel... (what is solved with my idea)

Your method can be achieved much easier using NVIDIA-INSTALLER -N (see advanced installer options)

Bruce Hill 06-03-2006 07:48 AM

So now we know how to keep the Nvidia module for a rebuild
of the same kernel version, and how to keep if for a rebuild
of a different kernel version. Nice to work together, eh?

juanbobo 06-03-2006 06:42 PM

Thanks everyone for your help, this'll make things easier.

Bruce Hill 06-03-2006 07:03 PM

Looking at "man nvidia-installer" I see these:
Quote:

-n, --no-precompiled-interface
Disable use of precompiled kernel interfaces.

-N, --no-network
This option instructs the installer to not attempt to connect to the NVIDIA
ftp site (for updated precompiled kernel interfaces, for example).

-K, --kernel-module-only
Install a kernel module only, and do not uninstall the existing driver.
This is intended to be used to install kernel modules for additional ker-
nels (in cases where you might boot between several different kernels). To
use this option, you must already have a driver installed, and the version
of the installed driver must match the version of this kernel module.
doc.nice,

Don't forget that *nix commands are case sensitive. As for the -N switch, I always tell it NOT to go to the Nvidia FTP site, because it's just an unnecessary waste of time. When I first ran Slackware in 2003 I would let it try, but it never reached the site. Same with trying the "nvidia-installer --update" option. It can get there to tell me there's a new version, but it can't download it for me (never gets past 1%). Today it's hung here:
Code:

Downloading:
  ftp://download.nvidia.com/XFree86/Linux-x86/1.0-8762/NVIDIA-Linux-x86-1.0-8762-pkg1.run
____________________________________________________________________________________________
Downloading
                                            0%

;)

philippeP 07-12-2006 11:35 AM

Might wanna check this thread of mine.

See the "-K -k <kernel_number>" option, but only works with the "*pkg1.run" shell script, not with the "nvidia-installer" executable.

doc.nice 07-15-2006 07:56 AM

nice co-working here... :)

sorry for the confusion, of course I meant -K, not -N...

CMIIW:
you can add these parameters to the .run files an to the nvidia-installer script contained inside, as the .run script passes them on.

the download-problem seems specific to your system, as it works perfectly for me (and btw. also using a browser pointing to the address given by your output).


All times are GMT -5. The time now is 03:34 PM.