2009-09-11 15:16:18 +02:00
|
|
|
a :
|
|
|
|
let
|
|
|
|
s = import ./src-for-2.6.31-zen0.nix;
|
|
|
|
in
|
|
|
|
(import ../kernel/generic.nix) (rec {
|
|
|
|
inherit (a) stdenv fetchurl perl mktemp module_init_tools;
|
|
|
|
|
|
|
|
src = a.builderDefs.fetchGitFromSrcInfo s;
|
|
|
|
version = "2.6.31-zen0";
|
|
|
|
config = "./kernel-config";
|
|
|
|
features = {
|
|
|
|
iwlwifi = true;
|
|
|
|
zen = true;
|
2009-09-15 11:16:29 +02:00
|
|
|
fbConDecor = true;
|
2009-09-11 15:16:18 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extraMeta = {
|
|
|
|
maintainers = [
|
|
|
|
a.lib.maintainers.raskin
|
|
|
|
];
|
|
|
|
platforms = with a.lib.platforms;
|
|
|
|
linux;
|
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
2009-09-11 15:50:40 +02:00
|
|
|
killOption () {
|
2009-09-12 08:59:44 +02:00
|
|
|
sed -re 's/^('"$1"')=[ym]/# \1 is not set/' -i .config
|
2009-09-11 15:50:40 +02:00
|
|
|
}
|
|
|
|
setOptionMod () {
|
2009-09-12 08:59:44 +02:00
|
|
|
sed -re 's/^# ('"$1"') is not set/\1=m/' -i .config
|
|
|
|
sed -re "1i$1=m" -i .config
|
2009-09-11 15:50:40 +02:00
|
|
|
}
|
|
|
|
setOptionYes () {
|
2009-09-12 09:33:55 +02:00
|
|
|
sed -re 's/^# ('"$1"') is not set/\1=y/' -i .config
|
2009-09-12 08:59:44 +02:00
|
|
|
sed -re "1i$1=y" -i .config
|
2009-09-11 15:50:40 +02:00
|
|
|
}
|
2009-09-15 11:16:29 +02:00
|
|
|
setOptionVal () {
|
|
|
|
sed -re 's/^('"$1"')=.*/\1='"$2"'/' -i .config
|
|
|
|
sed -re "1i$1=$2" -i .config
|
|
|
|
}
|
2009-09-11 15:50:40 +02:00
|
|
|
|
2009-09-11 15:16:18 +02:00
|
|
|
make allmodconfig
|
|
|
|
|
2009-09-13 18:37:17 +02:00
|
|
|
killOption CONFIG_CMDLINE_OVERRIDE
|
|
|
|
|
2009-09-11 15:50:40 +02:00
|
|
|
killOption CONFIG_IMA
|
2009-09-12 08:59:44 +02:00
|
|
|
killOption 'CONFIG_.*_DEBUG.*'
|
2009-09-13 22:10:19 +02:00
|
|
|
killOption 'CONFIG_DEBUG.*'
|
2009-09-12 08:59:44 +02:00
|
|
|
killOption CONFIG_AUDIT_ARCH
|
2009-09-13 22:22:37 +02:00
|
|
|
killOption CONFIG_PERF_COUNTERS
|
|
|
|
killOption 'CONFIG_GCOV.*'
|
|
|
|
killOption 'CONFIG_KGDB.*'
|
|
|
|
killOption 'CONFIG_.*_TEST'
|
2009-09-12 08:59:44 +02:00
|
|
|
|
|
|
|
killOption CONFIG_KERNEL_BZIP2
|
|
|
|
killOption CONFIG_KERNEL_LZMA
|
|
|
|
setOptionYes CONFIG_KERNEL_GZIP
|
|
|
|
|
|
|
|
killOption CONFIG_TASKSTATS
|
|
|
|
killOption CONFIG_PREEMPT_NONE
|
|
|
|
setOptionYes CONFIG_PREEMPT_VOLUNTARY
|
2009-09-11 15:50:40 +02:00
|
|
|
|
2009-09-13 18:37:17 +02:00
|
|
|
killOption CONFIG_SLQB
|
|
|
|
killOption CONFIG_SLQB_ALLOCATOR
|
|
|
|
setOptionYes CONFIG_SLUB_ALLOCATOR
|
|
|
|
setOptionYes CONFIG_SLUB
|
|
|
|
killOption CONFIG_ACPI_CUSTOM_DSDT_INITRD
|
|
|
|
killOption CONFIG_DEVTMPFS
|
|
|
|
killOption CONFIG_DEVTMPFS_MOUNT
|
2009-09-14 23:56:31 +02:00
|
|
|
'' +
|
|
|
|
(if a.lib.attrByPath ["ckSched"] false a then ''
|
|
|
|
killOption CONFIG_CPU_CFS
|
|
|
|
setOptionYes CONFIG_CPU_BFS
|
2009-09-15 11:16:29 +02:00
|
|
|
killOption CONFIG_NO_HZ
|
|
|
|
killOption CONFIG_HZ_1000
|
|
|
|
setOptionYes CONFIG_HZ_250
|
|
|
|
setOptionVal CONFIG_HZ 250
|
2009-09-14 23:56:31 +02:00
|
|
|
''else "") +
|
|
|
|
''
|
2009-09-11 15:16:18 +02:00
|
|
|
cp .config ${config}
|
|
|
|
'';
|
|
|
|
})
|