Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: User

Building the nvidia and ati proprietary drivers against the latest kernel.git

 

 

Gentoo user RSS feed   Index | Next | Previous | View Threaded


w41ter at gmail

Apr 8, 2012, 5:30 PM

Post #1 of 9 (240 views)
Permalink
Building the nvidia and ati proprietary drivers against the latest kernel.git

For many years I've been testing kernels from Linus's git repository
and I find that about twice a year the kernel devs do something evil
that breaks proprietary video drivers. (I suspect they do it on purpose
but I can't prove it ;)

I have no idea how many of you like to test bleeding edge kernels but
I thought I'd ask. I have some seriously ugly hacks for building the
nvidia (and very recently) the ati proprietary drivers against git
kernels, but I won't spend time explaining them here if no one is
interested.


lists at xunil

Apr 16, 2012, 9:42 AM

Post #2 of 9 (209 views)
Permalink
Re: Building the nvidia and ati proprietary drivers against the latest kernel.git [In reply to]

Am 09.04.2012 02:30, schrieb walt:
> For many years I've been testing kernels from Linus's git repository
> and I find that about twice a year the kernel devs do something evil
> that breaks proprietary video drivers. (I suspect they do it on purpose
> but I can't prove it ;)
>
> I have no idea how many of you like to test bleeding edge kernels but
> I thought I'd ask. I have some seriously ugly hacks for building the
> nvidia (and very recently) the ati proprietary drivers against git
> kernels, but I won't spend time explaining them here if no one is
> interested.

Tried git-sources-3.4-rc3 on my thinkpad today, on my main rig it
wouldn't work because of the nvidia-drivers ...

if it ain't too ugly I'd like to know ;-) just being curious

Stefan


lists at xunil

Apr 17, 2012, 1:05 PM

Post #3 of 9 (214 views)
Permalink
Re: Building the nvidia and ati proprietary drivers against the latest kernel.git [In reply to]

Am 2012-04-09 02:30, schrieb walt:
> For many years I've been testing kernels from Linus's git repository
> and I find that about twice a year the kernel devs do something evil
> that breaks proprietary video drivers. (I suspect they do it on purpose
> but I can't prove it ;)
>
> I have no idea how many of you like to test bleeding edge kernels but
> I thought I'd ask. I have some seriously ugly hacks for building the
> nvidia (and very recently) the ati proprietary drivers against git
> kernels, but I won't spend time explaining them here if no one is
> interested.

walt, would you mind sharing your nvidia-stuff as well?

seems you missed my on-list reply yesterday ;-)

thanks in advance, Stefan


w41ter at gmail

Apr 17, 2012, 6:47 PM

Post #4 of 9 (215 views)
Permalink
Re: Building the nvidia and ati proprietary drivers against the latest kernel.git [In reply to]

On 04/17/2012 01:05 PM, Stefan G. Weichinger wrote:
> Am 2012-04-09 02:30, schrieb walt:

>> I have some seriously ugly hacks for building the
>> nvidia (and very recently) the ati proprietary drivers against git
>> kernels, but I won't spend time explaining them here if no one is
>> interested.
>
> walt, would you mind sharing your nvidia-stuff as well?

Now there are at least three of us who just can't wait to feel the
sweet sorrow of booting tomorrow's broken kernel :p

If you build kernels frequently you don't need to install the entire
nvidia-drivers package each time. You need only recompile the code
for the nvidia kernel module, so we extract (and save) just that one
part of the code from the source tarball like this:

#cd /usr/src
#sh /usr/portage/distfiles/NVIDIA-Linux-x86_64-295.40.run -x
#mv NVIDIA-Linux-x86_64-295.40/kernel/ . <--- notice the dot
#rm -rf NVIDIA-Linux-x86_64-295.40/

(the next step is optional, but it will help you next week ;)
#mv kernel nvidia

A normal person would now do the following:

#cd nvidia
#make module install //Done!

But you are not a normal person, are we? :p *You* will get an error
message that your kernel is from another planet and the build will die.

No worries. The important thing is that the binary blob (nv-kernel.o)
from nvidia.com still works perfectly with today's git kernel.

Confession: I know this *only* because I convinced the nvidia installer
code that I know more than than the nvidia.com devs know.

Obviously a lie most foul, but it worked again! (This time.)

[.I'm falling asleep at the keyboard now and I don't want to give you
bogus information, so I'll be back tomorrow with the rest of it.]


pandu at poluan

Apr 17, 2012, 7:16 PM

Post #5 of 9 (207 views)
Permalink
Re: Re: Building the nvidia and ati proprietary drivers against the latest kernel.git [In reply to]

On Apr 18, 2012 8:51 AM, "walt" <w41ter [at] gmail> wrote:
>
> On 04/17/2012 01:05 PM, Stefan G. Weichinger wrote:
> > Am 2012-04-09 02:30, schrieb walt:
>
> >> I have some seriously ugly hacks for building the
> >> nvidia (and very recently) the ati proprietary drivers against git
> >> kernels, but I won't spend time explaining them here if no one is
> >> interested.
> >
> > walt, would you mind sharing your nvidia-stuff as well?
>
> Now there are at least three of us who just can't wait to feel the
> sweet sorrow of booting tomorrow's broken kernel :p
>
> If you build kernels frequently you don't need to install the entire
> nvidia-drivers package each time. You need only recompile the code
> for the nvidia kernel module, so we extract (and save) just that one
> part of the code from the source tarball like this:
>
> #cd /usr/src
> #sh /usr/portage/distfiles/NVIDIA-Linux-x86_64-295.40.run -x
> #mv NVIDIA-Linux-x86_64-295.40/kernel/ . <--- notice the dot
> #rm -rf NVIDIA-Linux-x86_64-295.40/
>
> (the next step is optional, but it will help you next week ;)
> #mv kernel nvidia
>
> A normal person would now do the following:
>
> #cd nvidia
> #make module install //Done!
>
> But you are not a normal person, are we? :p *You* will get an error
> message that your kernel is from another planet and the build will die.
>
> No worries. The important thing is that the binary blob (nv-kernel.o)
> from nvidia.com still works perfectly with today's git kernel.
>
> Confession: I know this *only* because I convinced the nvidia installer
> code that I know more than than the nvidia.com devs know.
>
> Obviously a lie most foul, but it worked again! (This time.)
>
> [.I'm falling asleep at the keyboard now and I don't want to give you
> bogus information, so I'll be back tomorrow with the rest of it.]
>
>

Bah! A cliffhanger!

*twiddles thumb waiting for Walt to wake up*

Rgds,


lists at xunil

Apr 18, 2012, 3:08 AM

Post #6 of 9 (204 views)
Permalink
Re: Re: Building the nvidia and ati proprietary drivers against the latest kernel.git [In reply to]

Am 18.04.2012 04:16, schrieb Pandu Poluan:

>> [.I'm falling asleep at the keyboard now and I don't want to give you
>> bogus information, so I'll be back tomorrow with the rest of it.]
>>
>>
>
> Bah! A cliffhanger!
>
> *twiddles thumb waiting for Walt to wake up*

Ah, yeah, looking forward as well ;-)

Greets, Stefan


lists at xunil

Apr 18, 2012, 3:46 AM

Post #7 of 9 (206 views)
Permalink
Re: Re: Building the nvidia and ati proprietary drivers against the latest kernel.git [In reply to]

Am 18.04.2012 12:08, schrieb Stefan G. Weichinger:
> Am 18.04.2012 04:16, schrieb Pandu Poluan:
>
>>> [.I'm falling asleep at the keyboard now and I don't want to give you
>>> bogus information, so I'll be back tomorrow with the rest of it.]
>>>
>>>
>>
>> Bah! A cliffhanger!
>>
>> *twiddles thumb waiting for Walt to wake up*
>
> Ah, yeah, looking forward as well ;-)

I don't want to spoil .... but I got it working already :-P

Still looking forward, Stefan


w41ter at gmail

Apr 18, 2012, 6:25 AM

Post #8 of 9 (219 views)
Permalink
Re: Building the nvidia and ati proprietary drivers against the latest kernel.git [In reply to]

On 04/18/2012 03:46 AM, Stefan G. Weichinger wrote:
> Am 18.04.2012 12:08, schrieb Stefan G. Weichinger:
>> Am 18.04.2012 04:16, schrieb Pandu Poluan:
>>
>>>> [.I'm falling asleep at the keyboard now and I don't want to give you
>>>> bogus information, so I'll be back tomorrow with the rest of it.]
>>>>
>>>>
>>>
>>> Bah! A cliffhanger!
>>>
>>> *twiddles thumb waiting for Walt to wake up*

I'm back. Why do I feel just as crappy now as I did last night? Must
be the cheap wine, I guess.

>> Ah, yeah, looking forward as well ;-)
>
> I don't want to spoil .... but I got it working already :-P

Oh, go ahead and spoil. I'll forgive you eventually.

Hey, I just pulled from Linus again and emerged nvidia-drivers and I see
that the test for kernel version no longer fails. The rest of the fix is
trivial now:

diff -ur kernel/nv-linux.h nvidia/nv-linux.h
--- kernel/nv-linux.h 2012-04-05 21:37:05.000000000 -0700
+++ nvidia/nv-linux.h 2012-04-12 06:58:31.000000000 -0700
@@ -111,7 +111,6 @@
#include <linux/timer.h>

#include <asm/div64.h> /* do_div() */
-#include <asm/system.h> /* cli, sli, save_flags */
#include <asm/io.h> /* ioremap, virt_to_phys */
#include <asm/uaccess.h> /* access_ok */
#include <asm/page.h> /* PAGE_OFFSET */
@@ -1204,7 +1203,6 @@
#endif

#if !defined(KERNEL_2_4) && !defined(NV_PM_MESSAGE_T_PRESENT)
-typedef u32 pm_message_t;
#endif

#if defined(KERNEL_2_4) && (defined(CONFIG_APM) || defined(CONFIG_APM_MODULE))

This works because a recent kernel commit removed system.h completely and now
the #include system.h is not needed. Also, any time you see a "previously
defined" error you can try to work around it by deleting the #include that
introduced the "previous definition" in the first place. May work, may not,
but it's always worth trying. This time it worked :)

Hope I didn't forget anything...


lists at xunil

Apr 18, 2012, 11:50 AM

Post #9 of 9 (222 views)
Permalink
Re: Re: Building the nvidia and ati proprietary drivers against the latest kernel.git [In reply to]

Am 2012-04-18 15:25, schrieb walt:

> Hey, I just pulled from Linus again and emerged nvidia-drivers and I see
> that the test for kernel version no longer fails. The rest of the fix is
> trivial now:
>
> diff -ur kernel/nv-linux.h nvidia/nv-linux.h
> --- kernel/nv-linux.h 2012-04-05 21:37:05.000000000 -0700
> +++ nvidia/nv-linux.h 2012-04-12 06:58:31.000000000 -0700
> @@ -111,7 +111,6 @@
> #include <linux/timer.h>
>
> #include <asm/div64.h> /* do_div() */
> -#include <asm/system.h> /* cli, sli, save_flags */
> #include <asm/io.h> /* ioremap, virt_to_phys */
> #include <asm/uaccess.h> /* access_ok */
> #include <asm/page.h> /* PAGE_OFFSET */
> @@ -1204,7 +1203,6 @@
> #endif
>
> #if !defined(KERNEL_2_4) && !defined(NV_PM_MESSAGE_T_PRESENT)
> -typedef u32 pm_message_t;
> #endif
>
> #if defined(KERNEL_2_4) && (defined(CONFIG_APM) || defined(CONFIG_APM_MODULE))
>
> This works because a recent kernel commit removed system.h completely and now
> the #include system.h is not needed. Also, any time you see a "previously
> defined" error you can try to work around it by deleting the #include that
> introduced the "previous definition" in the first place. May work, may not,
> but it's always worth trying. This time it worked :)

Yes, my fix was nearly the same.

I removed the same include as you in nv-linux.h, additionally one in
conftest.sh (also including system.h).

Worked ok on my ~amd64 with git-sources-3.4.0-rc3

now for the vmware-modules ;-)

Stefan

Gentoo user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.