2009-09-12 08:13:20 +01:00
|
|
|
args @ {stdenv, fetchurl, userModeLinux ? false, oldI686 ? false, ...}:
|
|
|
|
|
|
|
|
assert !userModeLinux;
|
|
|
|
|
|
|
|
import ./generic.nix (
|
|
|
|
|
|
|
|
rec {
|
2010-08-12 17:33:19 +01:00
|
|
|
version = "2.6.31.14";
|
2009-09-12 08:13:20 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2010-08-12 17:33:19 +01:00
|
|
|
url = "mirror://kernel/linux/kernel/v2.6/linux-${version}.tar.bz2";
|
|
|
|
sha256 = "1c6ivcjgns4gbx04mhnhndqikm3prqhhfm2a5zrb1mfyvvishqpp";
|
2009-09-12 08:13:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
features = {
|
|
|
|
iwlwifi = true;
|
|
|
|
};
|
2009-11-01 17:17:40 +00:00
|
|
|
|
2009-11-08 00:32:12 +00:00
|
|
|
preConfigure = if (stdenv.system != "armv5tel-linux") then ''
|
2009-09-12 08:13:20 +01:00
|
|
|
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 () {
|
2009-09-12 08:33:55 +01:00
|
|
|
sed -re 's/^# ('"$1"') is not set/\1=y/' -i .config
|
2009-09-12 08:13:20 +01:00
|
|
|
sed -re "1i$1=y" -i .config
|
|
|
|
}
|
|
|
|
|
|
|
|
make allmodconfig
|
|
|
|
|
2009-09-13 17:24:44 +01:00
|
|
|
killOption CONFIG_CMDLINE_OVERRIDE
|
|
|
|
|
2009-09-12 08:13:20 +01:00
|
|
|
killOption CONFIG_IMA
|
|
|
|
killOption 'CONFIG_.*_DEBUG.*'
|
2009-09-13 21:10:19 +01:00
|
|
|
killOption 'CONFIG_DEBUG.*'
|
2009-09-12 08:13:20 +01:00
|
|
|
killOption CONFIG_AUDIT_ARCH
|
2009-09-13 21:22:37 +01:00
|
|
|
killOption CONFIG_PERF_COUNTERS
|
|
|
|
killOption 'CONFIG_GCOV.*'
|
|
|
|
killOption 'CONFIG_KGDB.*'
|
|
|
|
killOption 'CONFIG_.*_TEST'
|
2009-12-03 07:08:51 +00:00
|
|
|
|
|
|
|
killOption 'CONFIG_USB_OTG_BLACKLIST_HUB'
|
|
|
|
|
2009-09-12 08:13:20 +01:00
|
|
|
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}
|
2009-11-08 00:32:12 +00:00
|
|
|
'' else "";
|
2009-09-12 08:13:20 +01:00
|
|
|
|
2009-11-08 00:32:12 +00:00
|
|
|
config = if (stdenv.system == "armv5tel-linux") then
|
|
|
|
(./config-2.6.31-armv5tel) else "./kernel-config";
|
2009-09-12 08:13:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// args
|
|
|
|
)
|