Made the kernel generate-config "build as modules as you can" an option.
Sepcifically, a nixpkgs "platform" option. So, for PC all remained the same as it was. svn path=/nixpkgs/trunk/; revision=20059
This commit is contained in:
parent
b07babb810
commit
c86da889cc
@ -30,7 +30,8 @@ configurePhase() {
|
|||||||
# Create the config file.
|
# Create the config file.
|
||||||
echo "generating kernel configuration..."
|
echo "generating kernel configuration..."
|
||||||
echo "$kernelConfig" > kernel-config
|
echo "$kernelConfig" > kernel-config
|
||||||
DEBUG=1 ARCH=$arch KERNEL_CONFIG=kernel-config perl -w $generateConfig
|
DEBUG=1 ARCH=$arch KERNEL_CONFIG=kernel-config AUTO_MODULES=$autoModules \
|
||||||
|
perl -w $generateConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ use strict;
|
|||||||
use IPC::Open2;
|
use IPC::Open2;
|
||||||
|
|
||||||
my $debug = $ENV{'DEBUG'};
|
my $debug = $ENV{'DEBUG'};
|
||||||
|
my $autoModules = $ENV{'AUTO_MODULES'};
|
||||||
|
|
||||||
$SIG{PIPE} = 'IGNORE';
|
$SIG{PIPE} = 'IGNORE';
|
||||||
|
|
||||||
@ -69,7 +70,7 @@ sub runConfig {
|
|||||||
my $question = $1; my $name = $2; my $alts = $3;
|
my $question = $1; my $name = $2; my $alts = $3;
|
||||||
my $answer = "";
|
my $answer = "";
|
||||||
# Build everything as a module if possible.
|
# Build everything as a module if possible.
|
||||||
$answer = "m" if $alts =~ /\/m/;
|
$answer = "m" if $autoModules && $alts =~ /\/m/;
|
||||||
$answer = $answers{$name} if defined $answers{$name};
|
$answer = $answers{$name} if defined $answers{$name};
|
||||||
print STDERR "QUESTION: $question, NAME: $name, ALTS: $alts, ANSWER: $answer\n" if $debug;
|
print STDERR "QUESTION: $question, NAME: $name, ALTS: $alts, ANSWER: $answer\n" if $debug;
|
||||||
print OUT "$answer\n";
|
print OUT "$answer\n";
|
||||||
|
@ -33,7 +33,12 @@
|
|||||||
|
|
||||||
, preConfigure ? ""
|
, preConfigure ? ""
|
||||||
, extraMeta ? {}
|
, extraMeta ? {}
|
||||||
, platform ? { name = "pc"; uboot = null; kernelBaseConfig = "defconfig"; }
|
, platform ? {
|
||||||
|
name = "pc";
|
||||||
|
uboot = null;
|
||||||
|
kernelBaseConfig = "defconfig";
|
||||||
|
kernelAutoModules = true;
|
||||||
|
}
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -64,6 +69,7 @@ stdenv.mkDerivation {
|
|||||||
generateConfig = ./generate-config.pl;
|
generateConfig = ./generate-config.pl;
|
||||||
|
|
||||||
inherit preConfigure src module_init_tools localVersion;
|
inherit preConfigure src module_init_tools localVersion;
|
||||||
|
autoModules = platform.kernelAutoModules;
|
||||||
|
|
||||||
patches = map (p: p.patch) kernelPatches;
|
patches = map (p: p.patch) kernelPatches;
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@ with pkgs;
|
|||||||
name = "pc";
|
name = "pc";
|
||||||
uboot = null;
|
uboot = null;
|
||||||
kernelBaseConfig = "defconfig";
|
kernelBaseConfig = "defconfig";
|
||||||
|
# Build whatever possible as a module, if not stated in the extra config.
|
||||||
|
kernelAutoModules = true;
|
||||||
kernelExtraConfig =
|
kernelExtraConfig =
|
||||||
''
|
''
|
||||||
# Virtualisation (KVM, Xen...).
|
# Virtualisation (KVM, Xen...).
|
||||||
@ -23,6 +25,7 @@ with pkgs;
|
|||||||
name = "sheevaplug";
|
name = "sheevaplug";
|
||||||
kernelBaseConfig = "kirkwood_defconfig";
|
kernelBaseConfig = "kirkwood_defconfig";
|
||||||
kernelArch = "arm";
|
kernelArch = "arm";
|
||||||
|
kernelAutoModules = false;
|
||||||
kernelExtraConfig =
|
kernelExtraConfig =
|
||||||
''
|
''
|
||||||
BLK_DEV_RAM y
|
BLK_DEV_RAM y
|
||||||
@ -51,6 +54,7 @@ with pkgs;
|
|||||||
name = "versatileARM";
|
name = "versatileARM";
|
||||||
kernelBaseConfig = "versatile_defconfig";
|
kernelBaseConfig = "versatile_defconfig";
|
||||||
kernelArch = "arm";
|
kernelArch = "arm";
|
||||||
|
kernelAutoModules = false;
|
||||||
uboot = null;
|
uboot = null;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user