From f130e0027e6f7630c27a90293fa204f5da0fd061 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Mon, 3 Jul 2017 11:57:40 -0400 Subject: [PATCH] linux: Add 4.12 --- .../linux/kernel/common-config.nix | 2 +- pkgs/os-specific/linux/kernel/linux-4.12.nix | 19 +++++++++++++++++ pkgs/top-level/all-packages.nix | 21 +++++++++++++++++-- 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 pkgs/os-specific/linux/kernel/linux-4.12.nix diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index c46ee1b9331b..912fb8dcee49 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -499,7 +499,7 @@ with stdenv.lib; KVM_APIC_ARCHITECTURE y ''} KVM_ASYNC_PF y - ${optionalString (versionAtLeast version "4.0") '' + ${optionalString ((versionAtLeast version "4.0") && (versionOlder version "4.12")) '' KVM_COMPAT? y ''} ${optionalString (versionOlder version "4.12") '' diff --git a/pkgs/os-specific/linux/kernel/linux-4.12.nix b/pkgs/os-specific/linux/kernel/linux-4.12.nix new file mode 100644 index 000000000000..d4861e1de555 --- /dev/null +++ b/pkgs/os-specific/linux/kernel/linux-4.12.nix @@ -0,0 +1,19 @@ +{ stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: + +import ./generic.nix (args // rec { + version = "4.12"; + modDirVersion = "4.12.0"; + extraMeta.branch = "4.12"; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; + sha256 = "1asq73lq0f81qwv21agcrpc3694fs14sja26q48y936hskn3np54"; + }; + + kernelPatches = args.kernelPatches; + + features.iwlwifi = true; + features.efiBootStub = true; + features.needsCifsUtils = true; + features.netfilterRPFilter = true; +} // (args.argsOverride or {})) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 56bd308b6bd7..b9a55eb84cf5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11983,6 +11983,22 @@ with pkgs; ]; }; + linux_4_12 = callPackage ../os-specific/linux/kernel/linux-4.12.nix { + kernelPatches = + [ kernelPatches.bridge_stp_helper + kernelPatches.p9_fixes + # See pkgs/os-specific/linux/kernel/cpu-cgroup-v2-patches/README.md + # when adding a new linux version + kernelPatches.cpu-cgroup-v2."4.11" + kernelPatches.modinst_arg_list_too_long + ] + ++ lib.optionals ((platform.kernelArch or null) == "mips") + [ kernelPatches.mips_fpureg_emu + kernelPatches.mips_fpu_sigill + kernelPatches.mips_ext3_n32 + ]; + }; + linux_testing = callPackage ../os-specific/linux/kernel/linux-testing.nix { kernelPatches = [ kernelPatches.bridge_stp_helper @@ -12153,7 +12169,7 @@ with pkgs; linux = linuxPackages.kernel; # Update this when adding the newest kernel major version! - linuxPackages_latest = linuxPackages_4_11; + linuxPackages_latest = linuxPackages_4_12; linux_latest = linuxPackages_latest.kernel; # Build the kernel modules for the some of the kernels. @@ -12164,6 +12180,7 @@ with pkgs; linuxPackages_4_4 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_4); linuxPackages_4_9 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_9); linuxPackages_4_11 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_11); + linuxPackages_4_12 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_12); # Don't forget to update linuxPackages_latest! # Intentionally lacks recurseIntoAttrs, as -rc kernels will quite likely break out-of-tree modules and cause failed Hydra builds. @@ -12179,7 +12196,7 @@ with pkgs; linuxPackages_latest_xen_dom0 = recurseIntoAttrs (linuxPackagesFor (pkgs.linux_latest.override { features.xen_dom0=true; })); # Hardened linux - linux_hardened = let linux = pkgs.linux_4_11; in linux.override { + linux_hardened = let linux = pkgs.linuxPackages_latest.kernel; in linux.override { extraConfig = import ../os-specific/linux/kernel/hardened-config.nix { inherit stdenv; inherit (linux) version;