Adding 2.6.31 kernel and trying to generate config for it without manual operations

svn path=/nixpkgs/trunk/; revision=17065
This commit is contained in:
Michael Raskin 2009-09-12 07:13:20 +00:00
parent 11de02585a
commit a5023cf381
2 changed files with 63 additions and 0 deletions

View File

@ -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
)

View File

@ -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;