summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-04-10 11:17:52 +0200
committerVladimír Čunát <vcunat@gmail.com>2016-04-10 11:17:52 +0200
commit30f14243c33f1b386273d08a4776aa679c42143d (patch)
treebd123d5c2ab4fef012ae7de6a225c092f8d611b8 /pkgs/os-specific
parent50fccad5828fb459760fd7578951bb961a18c0fc (diff)
parent2463e0917318581da94e7ba92703b63128c40424 (diff)
downloadnixpkgs-30f14243c33f1b386273d08a4776aa679c42143d.tar
nixpkgs-30f14243c33f1b386273d08a4776aa679c42143d.tar.gz
nixpkgs-30f14243c33f1b386273d08a4776aa679c42143d.tar.bz2
nixpkgs-30f14243c33f1b386273d08a4776aa679c42143d.tar.lz
nixpkgs-30f14243c33f1b386273d08a4776aa679c42143d.tar.xz
nixpkgs-30f14243c33f1b386273d08a4776aa679c42143d.tar.zst
nixpkgs-30f14243c33f1b386273d08a4776aa679c42143d.zip
Merge branch 'master' into closure-size
Comparison to master evaluations on Hydra:
  - 1255515 for nixos
  - 1255502 for nixpkgs
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/kernel-headers/default.nix2
-rw-r--r--pkgs/os-specific/linux/kernel/common-config.nix8
-rw-r--r--pkgs/os-specific/linux/kernel/gcc5-link-apm.patch29
-rw-r--r--pkgs/os-specific/linux/kernel/gcc5-link-lguest.patch46
-rw-r--r--pkgs/os-specific/linux/kernel/linux-testing.nix6
-rw-r--r--pkgs/os-specific/linux/kernel/manual-config.nix9
-rw-r--r--pkgs/os-specific/linux/kernel/patches.nix10
-rwxr-xr-xpkgs/os-specific/linux/nvidia-x11/builder.sh21
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/default.nix6
-rw-r--r--pkgs/os-specific/linux/s6-linux-utils/default.nix4
10 files changed, 114 insertions, 27 deletions
diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix
index e4ce1945705..a33d24fc847 100644
--- a/pkgs/os-specific/linux/kernel-headers/default.nix
+++ b/pkgs/os-specific/linux/kernel-headers/default.nix
@@ -22,4 +22,6 @@ in stdenv.mkDerivation {
 
   # Headers shouldn't reference anything else
   allowedReferences = [];
+
+  meta.platforms = stdenv.lib.platforms.linux;
 }
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix
index e7e81f4877f..6ba1234673b 100644
--- a/pkgs/os-specific/linux/kernel/common-config.nix
+++ b/pkgs/os-specific/linux/kernel/common-config.nix
@@ -118,6 +118,10 @@ with stdenv.lib;
   ${optionalString (stdenv.system == "x86_64-linux") ''
     BPF_JIT y
   ''}
+  ${optionalString (versionAtLeast version "4.4") ''
+    NET_CLS_BPF m
+    NET_ACT_BPF m
+  ''}
 
   # Wireless networking.
   CFG80211_WEXT? y # Without it, ipw2200 drivers don't build
@@ -398,6 +402,10 @@ with stdenv.lib;
   ${optionalString (versionAtLeast version "3.10") ''
     UPROBE_EVENT y
   ''}
+  ${optionalString (versionAtLeast version "4.4") ''
+    BPF_SYSCALL y
+    BPF_EVENTS y
+  ''}
   FUNCTION_PROFILER y
   RING_BUFFER_BENCHMARK n
 
diff --git a/pkgs/os-specific/linux/kernel/gcc5-link-apm.patch b/pkgs/os-specific/linux/kernel/gcc5-link-apm.patch
new file mode 100644
index 00000000000..e415c2d9f2b
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel/gcc5-link-apm.patch
@@ -0,0 +1,29 @@
+From 54c2f3fdb941204cad136024c7b854b7ad112ab6 Mon Sep 17 00:00:00 2001
+From: Andi Kleen <ak@linux.intel.com>
+Date: Mon, 5 Aug 2013 15:02:45 -0700
+Subject: x86, asmlinkage, apm: Make APM data structure used from assembler
+ visible
+
+Signed-off-by: Andi Kleen <ak@linux.intel.com>
+Link: http://lkml.kernel.org/r/1375740170-7446-12-git-send-email-andi@firstfloor.org
+Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
+---
+ arch/x86/kernel/apm_32.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
+index 53a4e27..3ab0343 100644
+--- a/arch/x86/kernel/apm_32.c
++++ b/arch/x86/kernel/apm_32.c
+@@ -392,7 +392,7 @@ static struct cpuidle_device apm_cpuidle_device;
+ /*
+  * Local variables
+  */
+-static struct {
++__visible struct {
+ 	unsigned long	offset;
+ 	unsigned short	segment;
+ } apm_bios_entry;
+-- 
+cgit v0.12
+
diff --git a/pkgs/os-specific/linux/kernel/gcc5-link-lguest.patch b/pkgs/os-specific/linux/kernel/gcc5-link-lguest.patch
new file mode 100644
index 00000000000..b2474f572ae
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel/gcc5-link-lguest.patch
@@ -0,0 +1,46 @@
+From cdd77e87eae52b7251acc5990207a1c4500a84ce Mon Sep 17 00:00:00 2001
+From: Andi Kleen <ak@linux.intel.com>
+Date: Tue, 5 Nov 2013 21:22:28 +1030
+Subject: x86, asmlinkage, lguest: Pass in globals into assembler statement
+
+Tell the compiler that the inline assembler statement
+references lguest_entry.
+
+This fixes compile problems with LTO where the variable
+and the assembler code may end up in different files.
+
+Cc: x86@kernel.org
+Cc: rusty@rustcorp.com.au
+Signed-off-by: Andi Kleen <ak@linux.intel.com>
+Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
+---
+ drivers/lguest/x86/core.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c
+index 5169239..922a1ac 100644
+--- a/drivers/lguest/x86/core.c
++++ b/drivers/lguest/x86/core.c
+@@ -157,7 +157,7 @@ static void run_guest_once(struct lg_cpu *cpu, struct lguest_pages *pages)
+ 	 * stack, then the address of this call.  This stack layout happens to
+ 	 * exactly match the stack layout created by an interrupt...
+ 	 */
+-	asm volatile("pushf; lcall *lguest_entry"
++	asm volatile("pushf; lcall *%4"
+ 		     /*
+ 		      * This is how we tell GCC that %eax ("a") and %ebx ("b")
+ 		      * are changed by this routine.  The "=" means output.
+@@ -169,7 +169,9 @@ static void run_guest_once(struct lg_cpu *cpu, struct lguest_pages *pages)
+ 		      * physical address of the Guest's top-level page
+ 		      * directory.
+ 		      */
+-		     : "0"(pages), "1"(__pa(cpu->lg->pgdirs[cpu->cpu_pgd].pgdir))
++		     : "0"(pages), 
++		       "1"(__pa(cpu->lg->pgdirs[cpu->cpu_pgd].pgdir)),
++		       "m"(lguest_entry)
+ 		     /*
+ 		      * We tell gcc that all these registers could change,
+ 		      * which means we don't have to save and restore them in
+-- 
+cgit v0.12
+
diff --git a/pkgs/os-specific/linux/kernel/linux-testing.nix b/pkgs/os-specific/linux/kernel/linux-testing.nix
index e58230712a9..e3edaa43b8c 100644
--- a/pkgs/os-specific/linux/kernel/linux-testing.nix
+++ b/pkgs/os-specific/linux/kernel/linux-testing.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, perl, buildLinux, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "4.6-rc1";
-  modDirVersion = "4.6.0-rc1";
+  version = "4.6-rc2";
+  modDirVersion = "4.6.0-rc2";
   extraMeta.branch = "4.6";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v4.x/testing/linux-${version}.tar.xz";
-    sha256 = "1y73sjd7i48d1c8x52z59imx8g8d00wy67r5666cvwqrq8d407h0";
+    sha256 = "0zihk9s1rkgmn0ghiz9xkg0w88w524af5mmad45rbxhm5751nxcr";
   };
 
   features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix
index cc98430a843..ffe09cc2fee 100644
--- a/pkgs/os-specific/linux/kernel/manual-config.nix
+++ b/pkgs/os-specific/linux/kernel/manual-config.nix
@@ -190,15 +190,6 @@ let
           $installFlags "''${installFlagsArray[@]}"
       '');
 
-      # !!! This leaves references to gcc in $dev
-      # that we might be able to avoid
-      postFixup = if isModular then ''
-        # !!! Should this be part of stdenv? Also patchELF should take an argument...
-        prefix=$dev
-        patchELF
-        prefix=$out
-      '' else null;
-
       meta = {
         description =
           "The Linux kernel" +
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 67f6ad9c94a..a8fb1598af7 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -35,6 +35,16 @@ in
 
 rec {
 
+  link_lguest =
+    { name = "gcc5-link-lguest";
+      patch = ./gcc5-link-lguest.patch;
+    };
+
+  link_apm =
+    { name = "gcc5-link-apm";
+      patch = ./gcc5-link-apm.patch;
+    };
+
   bridge_stp_helper =
     { name = "bridge-stp-helper";
       patch = ./bridge-stp-helper.patch;
diff --git a/pkgs/os-specific/linux/nvidia-x11/builder.sh b/pkgs/os-specific/linux/nvidia-x11/builder.sh
index c1f165c45dd..1f4671a7615 100755
--- a/pkgs/os-specific/linux/nvidia-x11/builder.sh
+++ b/pkgs/os-specific/linux/nvidia-x11/builder.sh
@@ -34,6 +34,8 @@ installPhase() {
     cp -prd *.so.* tls "$out/lib/"
     rm "$out"/lib/lib{glx,nvidia-wfb}.so.* # handled separately
 
+    rm $out/lib/libGL.so.1.* # GLVND
+
     if test -z "$libsOnly"; then
         # Install the X drivers.
         mkdir -p $out/lib/xorg/modules
@@ -60,16 +62,18 @@ installPhase() {
 
       libname_short=`echo -n "$libname" | sed 's/so\..*/so/'`
 
-      # nvidia's EGL stack seems to expect libGLESv2.so.2 to be available
-      if [ $(basename "$libname_short") == "libGLESv2.so" ]; then
-          ln -srnf "$libname" "$libname_short.2"
-      fi
-
       if [[ "$libname" != "$libname_short" ]]; then
         ln -srnf "$libname" "$libname_short"
       fi
-      if [[ "$libname" != "$libname_short.1" ]]; then
-        ln -srnf "$libname" "$libname_short.1"
+
+      if [[ $libname_short =~ libEGL.so || $libname_short =~ libEGL_nvidia.so ]]; then
+          major=0
+      else
+          major=1
+      fi
+
+      if [[ "$libname" != "$libname_short.$major" ]]; then
+        ln -srnf "$libname" "$libname_short.$major"
       fi
     done
 
@@ -119,9 +123,6 @@ installPhase() {
     # For simplicity and dependency reduction, don't support the gtk3 interface.
     rm $out/lib/libnvidia-gtk3.*
 
-    # We distribute these separately in `libvdpau`
-    rm "$out"/lib/libvdpau{.*,_trace.*}
-
     # Move VDPAU libraries to their place
     mkdir "$out"/lib/vdpau
     mv "$out"/lib/libvdpau* "$out"/lib/vdpau
diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix
index fff1135d311..e67df53c9ed 100644
--- a/pkgs/os-specific/linux/nvidia-x11/default.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/default.nix
@@ -12,7 +12,7 @@ assert (!libsOnly) -> kernel != null;
 
 let
 
-  versionNumber = "358.16";
+  versionNumber = "361.42";
 
   # Policy: use the highest stable version as the default (on our master).
   inherit (stdenv.lib) makeLibraryPath;
@@ -28,12 +28,12 @@ stdenv.mkDerivation {
     if stdenv.system == "i686-linux" then
       fetchurl {
         url = "http://download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}.run";
-        sha256 = "1cc0zsri92nz2mznabfd6pqckm9mlbszmysqqqh3w5mipwn898nk";
+        sha256 = "10jfdrmjcddgp7kg9l3dwxjh4b7sdrg86nwaf6zalfnsc9zh8bg3";
       }
     else if stdenv.system == "x86_64-linux" then
       fetchurl {
         url = "http://download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-no-compat32.run";
-        sha256 = "1xr16faam2zsx8ajwm9g9302m6qjzyjh1zd56g8jhc8jxg8h43sg";
+        sha256 = "04yyrzk4xzq1i386mdxfwg4dqiclvj1fm195qsqy0r79zmpc3kq4";
       }
     else throw "nvidia-x11 does not support platform ${stdenv.system}";
 
diff --git a/pkgs/os-specific/linux/s6-linux-utils/default.nix b/pkgs/os-specific/linux/s6-linux-utils/default.nix
index faf5106c67e..c6065dbfca2 100644
--- a/pkgs/os-specific/linux/s6-linux-utils/default.nix
+++ b/pkgs/os-specific/linux/s6-linux-utils/default.nix
@@ -2,7 +2,7 @@
 
 let
 
-  version = "2.0.2.0";
+  version = "2.0.2.3";
 
 in stdenv.mkDerivation rec {
 
@@ -10,7 +10,7 @@ in stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://www.skarnet.org/software/s6-linux-utils/${name}.tar.gz";
-    sha256 = "0y6dq4wb5v1c6ps6a7jyq08r2pjksrvz6n3dnfa9c91gzm4m1dxb";
+    sha256 = "1hwc3dmqh4cyhx9b4gd48yvjrwmfkz968rncpqc511krpfwzyngr";
   };
 
   dontDisableStatic = true;