summary refs log tree commit diff
path: root/pkgs/os-specific/linux/nvidia-x11
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-08-13 14:08:01 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-08-13 14:11:06 +0200
commite2e21ef3208fc1fae6139985304f4e46492ac99a (patch)
tree34dc0d05ba54c8e0ceb2dcaa1a05c1a1037d6d83 /pkgs/os-specific/linux/nvidia-x11
parentbf37974165cd2ab01f4aa4e48f7cbceb4a651d4a (diff)
downloadnixpkgs-e2e21ef3208fc1fae6139985304f4e46492ac99a.tar
nixpkgs-e2e21ef3208fc1fae6139985304f4e46492ac99a.tar.gz
nixpkgs-e2e21ef3208fc1fae6139985304f4e46492ac99a.tar.bz2
nixpkgs-e2e21ef3208fc1fae6139985304f4e46492ac99a.tar.lz
nixpkgs-e2e21ef3208fc1fae6139985304f4e46492ac99a.tar.xz
nixpkgs-e2e21ef3208fc1fae6139985304f4e46492ac99a.tar.zst
nixpkgs-e2e21ef3208fc1fae6139985304f4e46492ac99a.zip
nvidia-x11-legacy{340,304}: fix build with linux-3.18
Close #9218.
It's our default kernel (now and for the upcoming release).
- 304 won't build with 4.1,
- 173 didn't even build with 3.14 due to other issues (3.12 is OK ATM)
- all legacy drivers are up-to-date with upstream releases.
Diffstat (limited to 'pkgs/os-specific/linux/nvidia-x11')
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/legacy304.nix2
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch4
2 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/nvidia-x11/legacy304.nix b/pkgs/os-specific/linux/nvidia-x11/legacy304.nix
index d5e350a0302..7f13b6795d4 100644
--- a/pkgs/os-specific/linux/nvidia-x11/legacy304.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/legacy304.nix
@@ -15,6 +15,8 @@ stdenv.mkDerivation {
 
   builder = ./builder-legacy304.sh;
 
+  patches = [ ./nvidia-340.76-kernel-4.0.patch ];
+
   src =
     if stdenv.system == "i686-linux" then
       fetchurl {
diff --git a/pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch b/pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch
index c959190023b..5fdc1fed727 100644
--- a/pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch
+++ b/pkgs/os-specific/linux/nvidia-x11/nvidia-340.76-kernel-4.0.patch
@@ -4,7 +4,7 @@
      unsigned long cr0 = read_cr0();
      write_cr0(((cr0 & (0xdfffffff)) | 0x40000000));
      wbinvd();
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
      *cr4 = read_cr4();
      if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80);
 +#else
@@ -18,7 +18,7 @@
      wbinvd();
      __flush_tlb();
      write_cr0((cr0 & 0x9fffffff));
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
      if (cr4 & 0x80) write_cr4(cr4);
 +#else
 +    if (cr4 & 0x80) __write_cr4(cr4);