Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
FYI: nvidia-drivers-325.15 and gentoo-sources-3.11.0 patch
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
username234
Guru
Guru


Joined: 09 May 2007
Posts: 330

PostPosted: Wed Sep 04, 2013 3:06 am    Post subject: FYI: nvidia-drivers-325.15 and gentoo-sources-3.11.0 patch Reply with quote

In case you haven't guessed, there's a small compatibility issue with nvidia-drivers-325.15 and gentoo-sources-3.11.0

I got the drivers to compile by making the following change.

nvidia-drivers-linux-3.11.patch:
--- kernel/nv-linux.h   2013-09-03 22:46:51.397145404 -0400
+++ kernel/nv-linux.h   2013-09-03 22:53:45.112478362 -0400
@@ -956,11 +956,15 @@ static inline int nv_execute_on_all_cpus
         *(mutex) = __mutex;                        \
     }
 #endif
 
 #if !defined(NV_VMWARE)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0)
 #define NV_NUM_PHYSPAGES                num_physpages
+#else
+#define NV_NUM_PHYSPAGES                (get_num_physpages())
+#endif
 #define NV_GET_CURRENT_PROCESS()        current->tgid
 #define NV_IN_ATOMIC()                  in_atomic()
 #define NV_LOCAL_BH_DISABLE()           local_bh_disable()
 #define NV_LOCAL_BH_ENABLE()            local_bh_enable()
 #define NV_COPY_TO_USER(to, from, n)    copy_to_user(to, from, n)
No problems as of yet, but it's still early. If I encounter anything I'll post to this thread.

Thanks.
_________________
Creating usernames when you're
in a creative slump is a bad idea
because if you are when you do
then you end up with uninspiring
alphanumeric cocktails like the
one directly above.
Back to top
View user's profile Send private message
n00berry
n00b
n00b


Joined: 25 Feb 2013
Posts: 19

PostPosted: Wed Sep 04, 2013 8:59 am    Post subject: [Solved] Compiling nvidia-drivers-325.15 with kernel 3.11 Reply with quote

x11-drivers/nvidia-drivers-325.15 failed to emerge against sys-kernel/gentoo-sources-3.11.0.

There is a patch available on the nvidia forums:
https://devtalk.nvidia.com/default/topic/549532/linux/linux-3-10-solved-3-11-solved-incompatibility-in-function-lsquo-nv_i2c_del_adapter-rsquo-error/2/

The patch is on pastebin, here:
http://pastebin.com/qV30u23p

After applying the patch, x11-drivers/nvidia-drivers-325.15 emerges successfully.
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1194

PostPosted: Wed Sep 04, 2013 9:35 am    Post subject: Reply with quote

https://bugs.gentoo.org/show_bug.cgi?id=482168
_________________
fun2gen2
Back to top
View user's profile Send private message
Fred Krogh
l33t
l33t


Joined: 07 Feb 2005
Posts: 814
Location: Tujunga, CA

PostPosted: Wed Sep 04, 2013 1:26 pm    Post subject: Reply with quote

Note this patch should be stored in
Quote:
/etc/portage/patches/x11-drivers/nvidia-drivers-325.15/Linux-3.11.patch
and then emerge nvidia-drivers. Seems to be working for me too.
Back to top
View user's profile Send private message
Fred Krogh
l33t
l33t


Joined: 07 Feb 2005
Posts: 814
Location: Tujunga, CA

PostPosted: Wed Sep 04, 2013 2:15 pm    Post subject: Reply with quote

Whoops! I was assuming this patch was the same as the one I used. This one does not compile for me. The one I used is cited at http://forums.gentoo.org/viewtopic-t-969118.html.

Last edited by Fred Krogh on Wed Sep 04, 2013 3:43 pm; edited 2 times in total
Back to top
View user's profile Send private message
username234
Guru
Guru


Joined: 09 May 2007
Posts: 330

PostPosted: Wed Sep 04, 2013 3:39 pm    Post subject: Reply with quote

Fred Krogh wrote:
Note this patch should be stored in
Quote:
/etc/portage/patches/x11-drivers/nvidia-drivers-325.15/Linux-3.11.patch
and then emerge nvidia-drivers. Seems to be working for me too.
Interesting. I didn't test that method, but I thought it would have worked from there, too. I'll have to take a look at my local repository and see where I put the epatch line in the ebuild.
Fred Krogh wrote:
Whoops! I was assuming this patch was the same as the one I used. This one does not compile for me. The one I used is cited at http://forums.gentoo.org/viewtopic-t-969118.html.
I didn't find any patches when I looked around yesterday, that's why I posted here. I also get a 404 error when I click the link.
_________________
Creating usernames when you're
in a creative slump is a bad idea
because if you are when you do
then you end up with uninspiring
alphanumeric cocktails like the
one directly above.
Back to top
View user's profile Send private message
Fred Krogh
l33t
l33t


Joined: 07 Feb 2005
Posts: 814
Location: Tujunga, CA

PostPosted: Wed Sep 04, 2013 3:42 pm    Post subject: Reply with quote

Sorry, I fixed the link, it had a "." at the end.
Back to top
View user's profile Send private message
Xywa
l33t
l33t


Joined: 23 Jul 2005
Posts: 857
Location: /mnt/Gentoo/

PostPosted: Sat Sep 14, 2013 10:49 am    Post subject: Re: [Solved] Compiling nvidia-drivers-325.15 with kernel 3.1 Reply with quote

n00berry wrote:
x11-drivers/nvidia-drivers-325.15 failed to emerge against sys-kernel/gentoo-sources-3.11.0.

There is a patch available on the nvidia forums:
https://devtalk.nvidia.com/default/topic/549532/linux/linux-3-10-solved-3-11-solved-incompatibility-in-function-lsquo-nv_i2c_del_adapter-rsquo-error/2/

The patch is on pastebin, here:
http://pastebin.com/qV30u23p

After applying the patch, x11-drivers/nvidia-drivers-325.15 emerges successfully.


How to apply this patch?
Back to top
View user's profile Send private message
enkil
Tux's lil' helper
Tux's lil' helper


Joined: 27 Apr 2004
Posts: 115
Location: Bern, Switzerland

PostPosted: Sat Sep 14, 2013 11:57 am    Post subject: Re: [Solved] Compiling nvidia-drivers-325.15 with kernel 3.1 Reply with quote

Xywa wrote:
How to apply this patch?

Put it in /etc/portage/patches/x11-drivers/nvidia-drivers-325.15
Back to top
View user's profile Send private message
gerard82
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2232
Location: Netherlands

PostPosted: Sun Sep 15, 2013 6:36 pm    Post subject: Reply with quote

I upgraded gentoo-sources from 3.10.5-gentoo-r1 to 3.11.1.
I can't get nvidia-325-15 to emerge.
Tried the patch in Xywa's post and uhlenrich's.
Here's the last part of /var/log/portage/x11-drivers/nvidia-drivers-325-15
Code:

In file included from /usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/uaccess.h:539:0,
                 from /usr/src/linux-3.11.1-gentoo/include/linux/poll.h:11,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/nv-linux.h:97,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/os-interface.c:15:
/usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/uaccess_64.h: In function 'copy_from_user':
/usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/uaccess_64.h:62:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  x86_64-pc-linux-gnu-gcc -Wp,-MD,/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/.os-usermap.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/include -I/usr/src/linux-3.11.1-gentoo/arch/x86/include -Iarch/x86/include/generated  -I/usr/src/linux-3.11.1-gentoo/include -Iinclude -I/usr/src/linux-3.11.1-gentoo/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-3.11.1-gentoo/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-3.11.1-gentoo/include/linux/kconfig.h   -I/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized -m64 -march=k8 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO   -I/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel -Wall -MD -Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"325.15\" -Wno-unused-function -Wuninitialized -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG -D__linux__  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(os_usermap)"  -D"KBUILD_MODNAME=KBUILD_STR(nvidia)" -c -o /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/os-usermap.o /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/os-usermap.c
In file included from /usr/src/linux-3.11.1-gentoo/include/linux/kernel.h:10:0,
                 from /usr/src/linux-3.11.1-gentoo/include/linux/sched.h:15,
                 from /usr/src/linux-3.11.1-gentoo/include/linux/utsname.h:5,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/nv-linux.h:44,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/os-usermap.c:15:
/usr/src/linux-3.11.1-gentoo/include/linux/bitops.h: In function 'hweight_long':
/usr/src/linux-3.11.1-gentoo/include/linux/bitops.h:66:41: warning: signed and unsigned type in conditional expression [-Wsign-compare]
In file included from /usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/uaccess.h:539:0,
                 from /usr/src/linux-3.11.1-gentoo/include/linux/poll.h:11,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/nv-linux.h:97,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/os-registry.c:15:
/usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/uaccess_64.h: In function 'copy_from_user':
/usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/uaccess_64.h:62:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
In file included from /usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/uaccess.h:539:0,
                 from /usr/src/linux-3.11.1-gentoo/include/linux/poll.h:11,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/nv-linux.h:97,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/os-smp.c:15:
/usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/uaccess_64.h: In function 'copy_from_user':
/usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/uaccess_64.h:62:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/os-interface.c: In function 'os_get_system_memory_size':
/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/os-interface.c:244:21: error: 'num_physpages' undeclared (first use in this function)
/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/os-interface.c:244:21: note: each undeclared identifier is reported only once for each function it appears in
In file included from /usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/cpumask.h:4:0,
                 from /usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/msr.h:10,
                 from /usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/processor.h:20,
                 from /usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/thread_info.h:22,
                 from /usr/src/linux-3.11.1-gentoo/include/linux/thread_info.h:54,
                 from /usr/src/linux-3.11.1-gentoo/include/linux/preempt.h:9,
                 from /usr/src/linux-3.11.1-gentoo/include/linux/spinlock.h:50,
                 from /usr/src/linux-3.11.1-gentoo/include/linux/seqlock.h:29,
                 from /usr/src/linux-3.11.1-gentoo/include/linux/time.h:5,
                 from /usr/src/linux-3.11.1-gentoo/include/uapi/linux/timex.h:56,
                 from /usr/src/linux-3.11.1-gentoo/include/linux/timex.h:56,
                 from /usr/src/linux-3.11.1-gentoo/include/linux/sched.h:17,
                 from /usr/src/linux-3.11.1-gentoo/include/linux/utsname.h:5,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/nv-linux.h:44,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/os-usermap.c:15:
/usr/src/linux-3.11.1-gentoo/include/linux/cpumask.h: In function 'cpumask_parse':
/usr/src/linux-3.11.1-gentoo/include/linux/cpumask.h:603:26: warning: signed and unsigned type in conditional expression [-Wsign-compare]
/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/os-interface.c:245:1: warning: control reaches end of non-void function [-Wreturn-type]
make[3]: *** [/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/os-interface.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from /usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/uaccess.h:539:0,
                 from /usr/src/linux-3.11.1-gentoo/include/linux/poll.h:11,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/nv-linux.h:97,
                 from /var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel/os-usermap.c:15:
/usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/uaccess_64.h: In function 'copy_from_user':
/usr/src/linux-3.11.1-gentoo/arch/x86/include/asm/uaccess_64.h:62:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
make[2]: *** [_module_/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/usr/src/linux-3.11.1-gentoo'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [module] Error 1
 * ERROR: x11-drivers/nvidia-drivers-325.15::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-325.15::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-325.15::gentoo'`.
 * The complete build log is located at '/var/log/portage/x11-drivers:nvidia-drivers-325.15:20130915-180650.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel'
 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/'

Looks to me like 3.11.1 has somthing different in the source.
Any help will be greatly appreciated.
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 607

PostPosted: Mon Sep 16, 2013 10:16 am    Post subject: patch works with 3.11.1 too Reply with quote

you just have to patch the patch :wink:
since it is just one character i think it's not necessary to write a patch for that.

for 3.11.0 there is one line in the patch it that reads:
Code:
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)


i changed the line to
Code:
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 1)

and nvidia-drivers emerged successfully on 3.11.1 on my box.
GOOD LUCK!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1194

PostPosted: Mon Sep 16, 2013 10:44 am    Post subject: please refer to other thread - see link Reply with quote

There is a slightly better patch than my own
which works well with minor linux-3.10 also:

http://forums.gentoo.org/viewtopic-t-969332-start-0-postdays-0-postorder-asc-highlight-.html
_________________
fun2gen2
Back to top
View user's profile Send private message
gerard82
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2232
Location: Netherlands

PostPosted: Mon Sep 16, 2013 5:34 pm    Post subject: Reply with quote

Thanks for the replies.
Problem has been solved.
What happened was I forgot to put the .patch extension on the files.
This part of portage doc should mention that patch files should have the .patch extension.
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3&chap=6#doc_chap6
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
tomk
Administrator
Administrator


Joined: 23 Sep 2003
Posts: 7219
Location: Sat in front of my computer

PostPosted: Fri Sep 20, 2013 10:45 pm    Post subject: Reply with quote

Merged from here.
_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum