Gentoo Archives: gentoo-user

From: Jacques Montier <jmontier@×××××.com>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: [gentoo-user] nvidia-drivers-340.76 failed with gentoo-sources-4.0.5
Date: Thu, 18 Jun 2015 11:03:54
Message-Id: CAHVEG0A3FM_zNNSG_wxHHj_erk0wSNyXTE2cax_SKrJyDjdbgA@mail.gmail.com
1 Hi all,
2
3 Because of an old graphic card, i have to compile nvidia-drivers-340.76.
4 nvidia-drivers-340.76 does not compile with the new 4.0.5 kernel.
5 Here is the output error :
6 /var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel/nv-pat.o]
7 Error 1
8
9 I saw a topic about that problem on Gentoo forum :
10 https://forums.gentoo.org/viewtopic-p-7754020.html?sid=3b9fed3069c0b6644c1a41e839455b85
11 I tried to apply the patch
12 /etc/portage/patches/x11-drivers/nvidia-drivers/nvidia-drivers-340.76.patch
13
14 *--- a/kernel/nv-pat.c.orig *
15 *+++ b/kernel/nv-pat.c *
16 *@@ -35,8 +35,13 @@ *
17 * unsigned long cr0 = read_cr0(); *
18 * write_cr0(((cr0 & (0xdfffffff)) | 0x40000000)); *
19 * wbinvd(); *
20 *+if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0) *
21 * *cr4 = read_cr4(); *
22 * if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80); *
23 *+else *
24 *+ *cr4 = __read_cr4(); *
25 *+ if (*cr4 & 0x80) __write_cr4(*cr4 & ~0x80); *
26 *+endif *
27 * __flush_tlb(); *
28 * } *
29
30 *@@ -46,7 +51,11 @@ *
31 * wbinvd(); *
32 * __flush_tlb(); *
33 * write_cr0((cr0 & 0x9fffffff)); *
34 *+if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0) *
35 * if (cr4 & 0x80) write_cr4(cr4); *
36 *+else *
37 *+ if (cr4 & 0x80) __write_cr4(cr4); *
38 *+endif *
39 * } *
40
41 * static int nv_determine_pat_mode(void)*
42
43 This patch does not work ; i get the error
44
45 * Failed Patch: nvidia-drivers-340.76.patch !
46 * (
47 /etc/portage/patches//x11-drivers/nvidia-drivers/nvidia-drivers-340.76.patch
48 )
49
50
51 Any idea ?
52
53 Thanks a lot,
54
55
56 Cheers,
57
58
59
60
61
62
63 *--*
64 *Jacques*