View previous topic :: View next topic |
Author |
Message |
username234 Guru
Joined: 09 May 2007 Posts: 332
|
Posted: Wed Sep 04, 2013 3:06 am Post subject: FYI: nvidia-drivers-325.15 and gentoo-sources-3.11.0 patch |
|
|
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 |
|
|
n00berry n00b
Joined: 25 Feb 2013 Posts: 19
|
|
Back to top |
|
|
ulenrich Veteran
Joined: 10 Oct 2010 Posts: 1480
|
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Wed Sep 04, 2013 1:26 pm Post subject: |
|
|
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 |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Wed Sep 04, 2013 2:15 pm Post subject: |
|
|
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 https://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 |
|
|
username234 Guru
Joined: 09 May 2007 Posts: 332
|
Posted: Wed Sep 04, 2013 3:39 pm Post subject: |
|
|
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.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 |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Wed Sep 04, 2013 3:42 pm Post subject: |
|
|
Sorry, I fixed the link, it had a "." at the end. |
|
Back to top |
|
|
Xywa Veteran
Joined: 23 Jul 2005 Posts: 1631 Location: /mnt/Gentoo/Europe
|
Posted: Sat Sep 14, 2013 10:49 am Post subject: Re: [Solved] Compiling nvidia-drivers-325.15 with kernel 3.1 |
|
|
How to apply this patch? |
|
Back to top |
|
|
enkil Tux's lil' helper
Joined: 27 Apr 2004 Posts: 115 Location: Bern, Switzerland
|
Posted: Sat Sep 14, 2013 11:57 am Post subject: Re: [Solved] Compiling nvidia-drivers-325.15 with kernel 3.1 |
|
|
Xywa wrote: | How to apply this patch? |
Put it in /etc/portage/patches/x11-drivers/nvidia-drivers-325.15 |
|
Back to top |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Sun Sep 15, 2013 6:36 pm Post subject: |
|
|
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
[31;01m*[0m ERROR: x11-drivers/nvidia-drivers-325.15::gentoo failed (compile phase):
[31;01m*[0m emake failed
[31;01m*[0m
[31;01m*[0m If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-325.15::gentoo'`,
[31;01m*[0m the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-325.15::gentoo'`.
[31;01m*[0m The complete build log is located at '/var/log/portage/x11-drivers:nvidia-drivers-325.15:20130915-180650.log'.
[31;01m*[0m For convenience, a symlink to the build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/temp/build.log'.
[31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/temp/environment'.
[31;01m*[0m Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-325.15/work/kernel'
[31;01m*[0m 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 |
|
|
DawgG l33t
Joined: 17 Sep 2003 Posts: 866
|
Posted: Mon Sep 16, 2013 10:16 am Post subject: patch works with 3.11.1 too |
|
|
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 |
|
|
ulenrich Veteran
Joined: 10 Oct 2010 Posts: 1480
|
|
Back to top |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Mon Sep 16, 2013 5:34 pm Post subject: |
|
|
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 |
|
|
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
|
Back to top |
|
|
|