* Allow options to be ignored if they don't exist by marking them with
a "?". svn path=/nixpkgs/branches/kernel-config/; revision=18931
This commit is contained in:
parent
71ed6194e1
commit
15c6ede144
@ -21,8 +21,8 @@ configurePhase() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Patch kconfig to print "###" after every question -
|
# Patch kconfig to print "###" after every question so that
|
||||||
# generate-config.pl expects this.
|
# generate-config.pl can answer them.
|
||||||
sed -e '/fflush(stdout);/i\printf("###");' -i scripts/kconfig/conf.c
|
sed -e '/fflush(stdout);/i\printf("###");' -i scripts/kconfig/conf.c
|
||||||
|
|
||||||
# Create the config file.
|
# Create the config file.
|
||||||
|
@ -18,12 +18,17 @@ $SIG{PIPE} = 'IGNORE';
|
|||||||
|
|
||||||
# Read the answers.
|
# Read the answers.
|
||||||
my %answers;
|
my %answers;
|
||||||
|
my %requiredAnswers;
|
||||||
open ANSWERS, "<$ENV{KERNEL_CONFIG}" or die;
|
open ANSWERS, "<$ENV{KERNEL_CONFIG}" or die;
|
||||||
while (<ANSWERS>) {
|
while (<ANSWERS>) {
|
||||||
chomp;
|
chomp;
|
||||||
s/#.*//;
|
s/#.*//;
|
||||||
my ($name, $value) = split / /;
|
if (/^\s*([A-Za-z0-9_]+)(\?)?\s+(\S+)\s*$/) {
|
||||||
$answers{$name} = $value if $name;
|
$answers{$1} = $3;
|
||||||
|
$requiredAnswers{$1} = 1 unless defined $2;
|
||||||
|
} elsif (!/^\s*$/) {
|
||||||
|
die "invalid config line: $_";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
close ANSWERS;
|
close ANSWERS;
|
||||||
|
|
||||||
@ -123,8 +128,8 @@ while (<CONFIG>) {
|
|||||||
close CONFIG;
|
close CONFIG;
|
||||||
|
|
||||||
foreach my $name (sort (keys %answers)) {
|
foreach my $name (sort (keys %answers)) {
|
||||||
die "unused option: $name\n"
|
my $f = $requiredAnswers{$name} ? sub { die @_; } : sub { warn @_; };
|
||||||
unless defined $config{$name};
|
&$f("unused option: $name\n") unless defined $config{$name};
|
||||||
die "option not set correctly: $name\n"
|
&$f("option not set correctly: $name\n")
|
||||||
if $config{$name} && $config{$name} ne $answers{$name};
|
if $config{$name} && $config{$name} ne $answers{$name};
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ import ./generic.nix (
|
|||||||
# Disable some expensive (?) features.
|
# Disable some expensive (?) features.
|
||||||
MARKERS n
|
MARKERS n
|
||||||
KPROBES n
|
KPROBES n
|
||||||
NUMA n
|
NUMA? n
|
||||||
PM_TRACE_RTC n
|
PM_TRACE_RTC n
|
||||||
|
|
||||||
# Enable various subsystems.
|
# Enable various subsystems.
|
||||||
@ -78,9 +78,7 @@ import ./generic.nix (
|
|||||||
# Wireless networking.
|
# Wireless networking.
|
||||||
IPW2100_MONITOR y # support promiscuous mode
|
IPW2100_MONITOR y # support promiscuous mode
|
||||||
IPW2200_MONITOR y # support promiscuous mode
|
IPW2200_MONITOR y # support promiscuous mode
|
||||||
${stdenv.lib.optionalString (!userModeLinux) ''
|
IWLWIFI_LEDS? y
|
||||||
IWLWIFI_LEDS y
|
|
||||||
''}
|
|
||||||
IWLWIFI_RFKILL y
|
IWLWIFI_RFKILL y
|
||||||
IWLAGN_SPECTRUM_MEASUREMENT y
|
IWLAGN_SPECTRUM_MEASUREMENT y
|
||||||
IWLAGN_LEDS y
|
IWLAGN_LEDS y
|
||||||
@ -192,7 +190,7 @@ import ./generic.nix (
|
|||||||
BT_RFCOMM_TTY y # RFCOMM TTY support
|
BT_RFCOMM_TTY y # RFCOMM TTY support
|
||||||
CPU_FREQ_DEBUG n
|
CPU_FREQ_DEBUG n
|
||||||
CRASH_DUMP n
|
CRASH_DUMP n
|
||||||
DMAR n # experimental
|
DMAR? n # experimental
|
||||||
DVB_DYNAMIC_MINORS y # we use udev
|
DVB_DYNAMIC_MINORS y # we use udev
|
||||||
FUSION y # Fusion MPT device support
|
FUSION y # Fusion MPT device support
|
||||||
IDE_GD_ATAPI y # ATAPI floppy support
|
IDE_GD_ATAPI y # ATAPI floppy support
|
||||||
|
Loading…
x
Reference in New Issue
Block a user