diff --git a/pkgs/os-specific/linux/kernel/linux-2.6.31.nix b/pkgs/os-specific/linux/kernel/linux-2.6.31.nix new file mode 100644 index 000000000000..33eed2541eff --- /dev/null +++ b/pkgs/os-specific/linux/kernel/linux-2.6.31.nix @@ -0,0 +1,57 @@ +args @ {stdenv, fetchurl, userModeLinux ? false, oldI686 ? false, ...}: + +assert !userModeLinux; + +import ./generic.nix ( + + let + baseVersion = "2.6.31"; + in + + rec { + version = "2.6.31"; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v2.6/linux-${baseVersion}.tar.bz2"; + sha256 = "04im1rk53j1im1q8i6pl6qn75zd63dg51dxhq8cfxdsxp3vq7k8a"; + }; + + features = { + iwlwifi = true; + }; + + preConfigure = '' + killOption () { + sed -re 's/^('"$1"')=[ym]/# \1 is not set/' -i .config + } + setOptionMod () { + sed -re 's/^# ('"$1"') is not set/\1=m/' -i .config + sed -re "1i$1=m" -i .config + } + setOptionYes () { + sed -re 's/^# )'"$1"') is not set/\1=y/' -i .config + sed -re "1i$1=y" -i .config + } + + make allmodconfig + + killOption CONFIG_IMA + killOption 'CONFIG_.*_DEBUG.*' + killOption CONFIG_AUDIT_ARCH + + killOption CONFIG_KERNEL_BZIP2 + killOption CONFIG_KERNEL_LZMA + setOptionYes CONFIG_KERNEL_GZIP + + killOption CONFIG_TASKSTATS + killOption CONFIG_PREEMPT_NONE + setOptionYes CONFIG_PREEMPT_VOLUNTARY + + cp .config ${config} + ''; + + config = "./kernel-config"; + } + + // args +) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c23dc7965d76..1bc0cdd39f20 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5254,6 +5254,11 @@ let ]; }); + kernel_2_6_31 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.31.nix) { + inherit fetchurl stdenv perl mktemp module_init_tools; + kernelPatches = []; + }; + kernel_2_6_31_rc4 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.31-rc4.nix) { inherit fetchurl stdenv perl mktemp module_init_tools; kernelPatches = [ @@ -5432,6 +5437,7 @@ let kernelPackages_2_6_31_rc2 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_31_rc2); kernelPackages_2_6_31_rc2_old_i686 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_31_rc2_old_i686); kernelPackages_2_6_31_zen0 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_31_zen0); + kernelPackages_2_6_31 = recurseIntoAttrs (kernelPackagesFor kernel_2_6_31); # The current default kernel / kernel modules. kernelPackages = kernelPackages_2_6_28;