Building nv modules for diferents kernels
Lat
Status: Interested
Joined: 11 Apr 2008
Posts: 29
Reply Quote
hi everyone. I was bored to install the driver for every kernel so this time I added -K to the binary installer. These are the steps I used:

    sgfxi -n # To eleminate the debian non-free driver and kernel modules
    sgfxi -Ac # To install the driver
    /usr/src/NVIDIA-Linux-x86-177.80-pkg0.run -s -K -k$(uname -r)


After that, I substituted $(uname -r) with the rest of my kernes and now I can boot in all of them with rendering.

I propose to add -K in the installer argument
:: Code ::
--- /usr/local/bin/sgfxi 2008-11-10 00:38:18.000000000 -0500
+++ sgfxi   2008-11-11 13:44:03.000000000 -0500
@@ -2327,7 +2327,7 @@
       else
        installerArgs="-s -N"
       fi
-      installerArgs="$installerArgs -k $KERNEL_VERSION"
+      installerArgs="$installerArgs -k $KERNEL_VERSION -K"
       ./$installer $installerArgs 1>> $LOG_FILE 2>> $LOG_FILE || installError="$?"
       # reverting the patched stuff before anything else happens
       apply_module_patch post
@@ -3592,4 +3592,4 @@

 x_start_stop_master start

-###**EOF**###
\ No newline at end of file
+###**EOF**###


Also, I'd like to have some testers because I don't know if the driver will brake after the usual dist-upgrade, or if it will work as modules like the debian non-free drivers.
Back to top
Lat
Status: Interested
Joined: 11 Apr 2008
Posts: 29
Reply Quote
For the time being, maybe this patch can be added so we can test it

:: Code ::
--- /usr/local/bin/sgfxi        2008-11-10 00:38:18.000000000 -0500
+++ sgfxi       2008-11-11 14:02:37.000000000 -0500
@@ -73,6 +73,7 @@
 KERNEL_THIRD='' # like: 19, for math use
 IS_SIDUX_KERNEL=''
 IS_XEN=''
+EXTRA_ARG='' #user argument to be added to the non-free installer (nvidia ftm)

 # check for 64 bit first
 if [ -n "$( uname -m | grep -o 'x86_64' )" ]
@@ -2327,7 +2328,7 @@
                        else
                                installerArgs="-s -N"
                        fi
-                       installerArgs="$installerArgs -k $KERNEL_VERSION"
+                       installerArgs="$installerArgs -k $KERNEL_VERSION $EXTRA_ARG"
                        ./$installer $installerArgs 1>> $LOG_FILE 2>> $LOG_FILE || installError="$?"
                        # reverting the patched stuff before anything else happens
                        apply_module_patch post
@@ -3330,6 +3331,11 @@
 while getopts AbcCdDeEFhj:K:nN:o:pP:QrRsStTUvWXxZ opt
 do
        case $opt in
+               a) EXTRA_ARG="$OPTARG"
+                  # Comment the line above and uncomment the below one to make it easier for us
+                  #EXTRA_ARG="-K"
+                       START_OPTIONS_PRINT=$START_OPTIONS_PRINT"  -a - You are adding the following argument to the non-free driver installer: ${C}$EXTRA_ARG${S}\n"
+                       ;;
                A) AUTORUN='true'
                        START_OPTIONS=$START_OPTIONS'A'
                        START_OPTIONS_PRINT=$START_OPTIONS_PRINT"  -A - Autorun is selected\n"
@@ -3592,4 +3598,4 @@

 x_start_stop_master start

-###**EOF**###
\ No newline at end of file
+###**EOF**###
In this way we can use sgfix -ca"-K" until we have this tested throughly
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4034
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
Interesting idea, however, I can propose something cleaner, just using the testing flag to trigger the testing behavior.

So -K makes the driver not need to be reinstalled?

That sounds cool.

On techpatterns.com/forums/about1133.html inxi script, I just implemented a nice testing trigger that's global, I use -! <optarg> to trigger a variety of testing behaviors.

I like this method, and will move sgfxi, svmi, and smxi to using it.

By the way, if you haven't yet checked out inxi, do it, it's like infobash on steroids. Features now full line by line display switches, plus the standard -v <number> verbosity switches, and much much more.
Back to top
Lat
Status: Interested
Joined: 11 Apr 2008
Posts: 29
Reply Quote
Last dist-upgrade brought xserver-xorg-core and sadly that killed the show.

The driver module stayed, but not the driver. The binary installer needs to be run again to install the driver. Doing so defeat the propose of my idea and I'm dropping it. I'm back again with the non-free Debian drivers.

At least we know how to make the non-free binary to stay in all the kernels in case the non-free Debian get broken

Sorry
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4034
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
This is simply another datapoint, and confirms my initial suspicion that basically how this will need to work is by setting, in /etc/smxi.conf, which sgfxi already uses to record apt-get/aptitude choice, a data string like this:

module-rebuild=2.6.27@1.4xxxx <ie, kernel main + full xorg version string>

Then, when the option is called, it only runs if the stored data type is equal to the newly calculated one.

I'm not suggesting this is as a final fix, just as a direction to look in long term.

But xorg does update quite a bit.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours