From 69f30432ddd89f0eb163eb3096d52e3443fce38a Mon Sep 17 00:00:00 2001 From: Jaka Hudoklin Date: Wed, 25 Sep 2013 12:49:49 +0200 Subject: [PATCH] kernel: add linux 3.12-rc2 --- pkgs/os-specific/linux/kernel/common-config.nix | 3 +++ pkgs/os-specific/linux/kernel/linux-3.12.nix | 16 ++++++++++++++++ pkgs/top-level/all-packages.nix | 14 ++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 pkgs/os-specific/linux/kernel/linux-3.12.nix diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index d4f7c4e6718..a62e661cbe9 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -169,6 +169,9 @@ with stdenv.lib; SECURITY_SELINUX_BOOTPARAM_VALUE 0 # Disable SELinux by default DEVKMEM n # Disable /dev/kmem CC_STACKPROTECTOR y # Detect buffer overflows on the stack + ${optionalString (versionAtLeast version "3.12") '' + USER_NS y # Support for user namespaces + ''} # Misc. options. 8139TOO_8129 y diff --git a/pkgs/os-specific/linux/kernel/linux-3.12.nix b/pkgs/os-specific/linux/kernel/linux-3.12.nix new file mode 100644 index 00000000000..dc77c55696a --- /dev/null +++ b/pkgs/os-specific/linux/kernel/linux-3.12.nix @@ -0,0 +1,16 @@ +{ stdenv, fetchurl, ... } @ args: + +import ./generic.nix (args // rec { + version = "3.12-rc2"; + + src = fetchurl { + url = "https://www.kernel.org/pub/linux/kernel/v3.0/testing/linux-${version}.tar.gz"; + sha256 = "1m24fh3cwmkb1scn3sl7gbc50jl53v357kjpgda9avi3ljxmyq5z"; + }; + + features.iwlwifi = true; + features.efiBootStub = true; + features.needsCifsUtils = true; + features.canDisableNetfilterConntrackHelpers = true; + features.netfilterRPFilter = true; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fd791972a0c..86f94090b23 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6554,6 +6554,19 @@ let ]; }; + linux_3_12 = makeOverridable (import ../os-specific/linux/kernel/linux-3.12.nix) { + inherit fetchurl stdenv perl mktemp bc kmod ubootChooser; + kernelPatches = + [ + kernelPatches.sec_perm_2_6_24 + ] ++ lib.optionals (platform.kernelArch == "mips") + [ kernelPatches.mips_fpureg_emu + kernelPatches.mips_fpu_sigill + kernelPatches.mips_ext3_n32 + ]; + }; + + /* Linux kernel modules are inherently tied to a specific kernel. So rather than provide specific instances of those packages for a specific kernel, we have a function that builds those packages @@ -6676,6 +6689,7 @@ let linuxPackages_3_9 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_9 linuxPackages_3_9); linuxPackages_3_10 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_10 linuxPackages_3_10); linuxPackages_3_11 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_11 linuxPackages_3_11); + linuxPackages_3_12 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_12 linuxPackages_3_12); # Update this when adding a new version! linuxPackages_latest = pkgs.linuxPackages_3_11;