1 |
2015-06-18 13:03 GMT+02:00 Jacques Montier <jmontier@×××××.com>: |
2 |
|
3 |
> Hi all, |
4 |
> |
5 |
> Because of an old graphic card, i have to compile nvidia-drivers-340.76. |
6 |
> nvidia-drivers-340.76 does not compile with the new 4.0.5 kernel. |
7 |
> Here is the output error : |
8 |
> /var/tmp/portage/x11-drivers/nvidia-drivers-340.76/work/kernel/nv-pat.o] |
9 |
> Error 1 |
10 |
> |
11 |
> I saw a topic about that problem on Gentoo forum : |
12 |
> https://forums.gentoo.org/viewtopic-p-7754020.html?sid=3b9fed3069c0b6644c1a41e839455b85 |
13 |
> I tried to apply the patch |
14 |
> /etc/portage/patches/x11-drivers/nvidia-drivers/nvidia-drivers-340.76.patch |
15 |
> |
16 |
> *--- a/kernel/nv-pat.c.orig * |
17 |
> *+++ b/kernel/nv-pat.c * |
18 |
> *@@ -35,8 +35,13 @@ * |
19 |
> * unsigned long cr0 = read_cr0(); * |
20 |
> * write_cr0(((cr0 & (0xdfffffff)) | 0x40000000)); * |
21 |
> * wbinvd(); * |
22 |
> *+if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0) * |
23 |
> * *cr4 = read_cr4(); * |
24 |
> * if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80); * |
25 |
> *+else * |
26 |
> *+ *cr4 = __read_cr4(); * |
27 |
> *+ if (*cr4 & 0x80) __write_cr4(*cr4 & ~0x80); * |
28 |
> *+endif * |
29 |
> * __flush_tlb(); * |
30 |
> * } * |
31 |
> |
32 |
> *@@ -46,7 +51,11 @@ * |
33 |
> * wbinvd(); * |
34 |
> * __flush_tlb(); * |
35 |
> * write_cr0((cr0 & 0x9fffffff)); * |
36 |
> *+if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0) * |
37 |
> * if (cr4 & 0x80) write_cr4(cr4); * |
38 |
> *+else * |
39 |
> *+ if (cr4 & 0x80) __write_cr4(cr4); * |
40 |
> *+endif * |
41 |
> * } * |
42 |
> |
43 |
> * static int nv_determine_pat_mode(void)* |
44 |
> |
45 |
> This patch does not work ; i get the error |
46 |
> |
47 |
> * Failed Patch: nvidia-drivers-340.76.patch ! |
48 |
> * ( |
49 |
> /etc/portage/patches//x11-drivers/nvidia-drivers/nvidia-drivers-340.76.patch |
50 |
> ) |
51 |
> |
52 |
> |
53 |
> Any idea ? |
54 |
> |
55 |
> Thanks a lot, |
56 |
> |
57 |
> |
58 |
> Cheers, |
59 |
> |
60 |
> |
61 |
> |
62 |
> |
63 |
> |
64 |
> |
65 |
> *--* |
66 |
> *Jacques* |
67 |
> |
68 |
|
69 |
|
70 |
|
71 |
Hello again, |
72 |
|
73 |
I think there were some typo in the patch line. |
74 |
I downloaded a tar.gz patch archive from gentoo forum : |
75 |
http://dev.gentoo.org/~gienah/unsupported/etc-portage-patches-x11-drivers-nvidia-drivers-340.76-for-kernel-gt-3.14.tar.gz |
76 |
Now nvidia-drivers compiles fine and everything is ok. |
77 |
|
78 |
Sorry for the noise, |
79 |
|
80 |
Cheers, |
81 |
|
82 |
|
83 |
|
84 |
|
85 |
*--* |
86 |
*Jacques* |