nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Bug in installation skript of nvidia-driver-295.33 (http://www.nvnews.net/vbulletin/showthread.php?t=176872)

Platinumviper 03-23-12 09:38 AM

Bug in installation skript of nvidia-driver-295.33
 
Hi,

the script kernel/conftest.sh is looking for generated files in the $SOURCE tree instead of the $OUTPUT tree. This affects all 3.3 kernels, compiled with the O= parameter or $KBUILD_OUTPUT variable.

Code:

--- kernel/conftest.sh.orig        2012-03-17 22:56:28.000000000 +0100
+++ kernel/conftest.sh        2012-03-23 14:18:41.000000000 +0100
@@ -126,9 +126,9 @@
    CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS"
 
    if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
-        CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$SOURCES/arch/x86/include/generated"
+        CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$OUTPUT/arch/x86/include/generated"
    elif [ "$ARCH" = "ARMv7" ]; then
-        CFLAGS="$CFLAGS -I$SOURCES/arch/arm/include -I$SOURCES/arch/arm/include/generated"
+        CFLAGS="$CFLAGS -I$SOURCES/arch/arm/include -I$OUTPUT/arch/arm/include/generated"
    fi
    if [ -n "$BUILD_PARAMS" ]; then
        CFLAGS="$CFLAGS -D$BUILD_PARAMS"

Regards
Platinumviper

danix 03-23-12 12:10 PM

Re: Bug in installation skript of nvidia-driver-295.33
 
Thanks, the generated header files will be picked up from $OUTPUT instead of $SOURCES in the next release.

jdmcdaniel3 03-24-12 05:11 PM

Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3
 
Quote:

Originally Posted by danix (Post 2539358)
Thanks, the generated header files will be picked up from $OUTPUT instead of $SOURCES in the next release.

Seems like you had said that when 295.20 was the current release, so perhaps we do not know in which version this will be fixed. To add to what Platinumviper said. I have come up with this procedure, for complete details of how to apply the patch.

If we can assume you have compiled or in some way installed kernel 3.3 and only need to load it from grub, here is what you would do first. You need to have the application called patch installed. You can use the terminal command "patch --help" to see if it is installed. These patches were kindly supplied by Larry Finger, one the kernel developers. Thanks for your help Larry.

This example is for nVIDIA driver 295.33:

1. Open the Link: http://www.lwfinger.com/nvidia_patch...33_for_3.3_err (or http://www.lwfinger.com/nvidia_patch...20_for_3.3_err for 295.20)

2. Select all of the text and do a Edit/Copy. Open up kwrite of other Text editor and do an Edit/Paste

3. Save the Text file as the file ~/Downloads/NVIDIA-Linux-x86_64-295.33.patch

4. Download the NVIDIA-Linux-x86_64-295.33.run driver file to your ~/Downloads Folder from their Web Site.

5. Open a terminal session and run the commands:

Code:

cd ~/Downloads
sh ./NVIDIA-Linux-x86_64-295.33.run --extract-only --target "$HOME/Downloads/NVIDIA-295.33"
cd "$HOME/Downloads/NVIDIA-295.33/Kernel"
patch -b ./conftest.sh ~/Downloads/NVIDIA-Linux-x86-295.33.patch

Now your nVIDIA driver script has been patched. To intstall this with the patched script,

6. Restart your Linux version, loading kernel 3.3 into run level 3 as normal and log in as root.

7. Change to the nVIDIA Installer folder like this:

Code:

cd /home/username/Downloads/NVIDIA-295.33
8. Run The installer in the default folder.

Code:

./nvidia-installer
The Installation should operate normally with the kernel 3.3 source files present and installed. Let me know if you have any questions on this procedure. If you have any corrections or additions to this procedure, please take time to let us know what they are.

Thank You,

poltsy 03-25-12 11:38 AM

Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3
 
Or perhaps you might just want to use the wonderful --apply-patch option in the installer.

jdmcdaniel3 03-25-12 12:17 PM

Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3
 
Quote:

Originally Posted by poltsy (Post 2539843)
Or perhaps you might just want to use the wonderful --apply-patch option in the installer.

Thanks for the info. I shall give that a try.

Thank You,

jdmcdaniel3 03-29-12 08:43 PM

Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3
 
Quote:

Originally Posted by poltsy (Post 2539843)
Or perhaps you might just want to use the wonderful --apply-patch option in the installer.

Seems like the option --apply-patch does not work. Here is what I get:

Code:

./nvidia-installer: unrecognized option: "--apply-patch"
Perhaps there is more to know to use this command or the command you suggest does not exist?

Thank You,

leigh123linux 03-30-12 02:37 AM

Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3
 
Quote:

Originally Posted by jdmcdaniel3 (Post 2541278)
Seems like the option --apply-patch does not work. Here is what I get:

Code:

./nvidia-installer: unrecognized option: "--apply-patch"
Perhaps there is more to know to use this command or the command you suggest does not exist?

Thank You,


It exists here

Code:

./NVIDIA-Linux-x86_64-295.33.run --apply-patch
ERROR: --apply-patch: no patch file specified.


To use it

Code:

./NVIDIA-Linux-x86_64-295.33.run --apply-patch nvidia_295_33_for_3.3_err

siddly 03-30-12 03:43 PM

Re: Bug in installation skript of nvidia-driver-295.33
 
There is another problem with later 3.3 kernels where asm/system.h does not exist but it's included in nv-linux.h

jdmcdaniel3 03-30-12 05:32 PM

Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3
 
Quote:

Originally Posted by leigh123linux (Post 2541338)
It exists here

Code:

./NVIDIA-Linux-x86_64-295.33.run --apply-patch
ERROR: --apply-patch: no patch file specified.


To use it

Code:

./NVIDIA-Linux-x86_64-295.33.run --apply-patch nvidia_295_33_for_3.3_err

So, if you do a list of commands, the --apply-patch it is not there. I did not get the installer to accept the patch file when I try the command:

Code:

sh ./NVIDIA-Linux-x86_64-295.33.run --apply-patch NVIDIA-295.33.patch
I got the following error message:

Code:

can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: NVIDIA-Linux-x86-295.33/kernel/conftest.sh
|===================================================================
|--- NVIDIA-Linux-x86-295.33.orig/kernel/conftest.sh
|+++ NVIDIA-Linux-x86-295.33/kernel/conftest.sh

Now if you use this text file with the patch command it works fine, but you have to extract all of the files from the nVIDIA archive into separate files. How can you use this valid patch file to patch an internal file of the nVIDIA driver and still have an installable all in one single file, just like the original? First off, I appreciate your help, but need exact instructions from someone that actually made it work.

Thank You,

leigh123linux 03-30-12 11:34 PM

Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3
 
Quote:

Originally Posted by jdmcdaniel3 (Post 2541454)
So, if you do a list of commands, the --apply-patch it is not there. I did not get the installer to accept the patch file when I try the command:

Code:

sh ./NVIDIA-Linux-x86_64-295.33.run --apply-patch NVIDIA-295.33.patch
I got the following error message:

Code:

can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: NVIDIA-Linux-x86-295.33/kernel/conftest.sh
|===================================================================
|--- NVIDIA-Linux-x86-295.33.orig/kernel/conftest.sh
|+++ NVIDIA-Linux-x86-295.33/kernel/conftest.sh

Now if you use this text file with the patch command it works fine, but you have to extract all of the files from the nVIDIA archive into separate files. How can you use this valid patch file to patch an internal file of the nVIDIA driver and still have an installable all in one single file, just like the original? First off, I appreciate your help, but need exact instructions from someone that actually made it work.

Thank You,

The patch needed a small edit

http://leigh123linux.fedorapeople.or..._3.3_err.patch


Code:

curl http://leigh123linux.fedorapeople.org/pub/patches/nvidia_295_33_for_3.3_err.patch -o nvidia_295_33_for_3.3_err.patch
./NVIDIA-Linux-x86_64-295.33.run --apply-patch nvidia_295_33_for_3.3_err.patch


jdmcdaniel3 03-31-12 07:59 PM

Re: Bug in installation skript of nvidia-driver-295.33 for install with kernel 3.3
 
Quote:

Originally Posted by leigh123linux (Post 2541535)
The patch needed a small edit

http://leigh123linux.fedorapeople.or..._3.3_err.patch


Code:

curl http://leigh123linux.fedorapeople.org/pub/patches/nvidia_295_33_for_3.3_err.patch -o nvidia_295_33_for_3.3_err.patch
./NVIDIA-Linux-x86_64-295.33.run --apply-patch nvidia_295_33_for_3.3_err.patch


Thanks for your help. I will give it a try. I just got a copy of kernel 3.4-rc1, and none of the fixes seem to work with it, so back to square one again.

Thank You,

rockob 04-01-12 01:41 AM

Re: Bug in installation skript of nvidia-driver-295.33
 
And when fixing nvidia for the 3.3 kernel, it might be worth adding a fix for the 3.4 kernel. They have removed asm/system.h so nvidia needs to use asm/switch_to.h instead in both nv-linux.h and conftest.sh.


All times are GMT -5. The time now is 04:55 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.