FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 04-09-2012, 12:30 AM
walt
 
Default 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.
 
Old 04-16-2012, 04:42 PM
"Stefan G. Weichinger"
 
Default Building the nvidia and ati proprietary drivers against the latest kernel.git

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
 
Old 04-17-2012, 08:05 PM
"Stefan G. Weichinger"
 
Default Building the nvidia and ati proprietary drivers against the latest kernel.git

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
 
Old 04-18-2012, 01:47 AM
walt
 
Default Building the nvidia and ati proprietary drivers against the latest kernel.git

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

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? *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.]
 
Old 04-18-2012, 02:16 AM
Pandu Poluan
 
Default Building the nvidia and ati proprietary drivers against the latest kernel.git

On Apr 18, 2012 8:51 AM, "walt" <w41ter@gmail.com> 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

>

> 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? **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,
 
Old 04-18-2012, 10:08 AM
"Stefan G. Weichinger"
 
Default Building the nvidia and ati proprietary drivers against the latest kernel.git

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
 
Old 04-18-2012, 10:46 AM
"Stefan G. Weichinger"
 
Default Building the nvidia and ati proprietary drivers against the latest kernel.git

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
 
Old 04-18-2012, 01:25 PM
walt
 
Default Building the nvidia and ati proprietary drivers against the latest kernel.git

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...
 
Old 04-18-2012, 06:50 PM
"Stefan G. Weichinger"
 
Default Building the nvidia and ati proprietary drivers against the latest kernel.git

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
 

Thread Tools




All times are GMT. The time now is 04:02 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org