mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-24 03:43:53 +03:00
* 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
|
||||
|
||||
|
||||
# Patch kconfig to print "###" after every question -
|
||||
# generate-config.pl expects this.
|
||||
# Patch kconfig to print "###" after every question so that
|
||||
# generate-config.pl can answer them.
|
||||
sed -e '/fflush(stdout);/i\printf("###");' -i scripts/kconfig/conf.c
|
||||
|
||||
# Create the config file.
|
||||
|
@ -18,12 +18,17 @@ $SIG{PIPE} = 'IGNORE';
|
||||
|
||||
# Read the answers.
|
||||
my %answers;
|
||||
my %requiredAnswers;
|
||||
open ANSWERS, "<$ENV{KERNEL_CONFIG}" or die;
|
||||
while (<ANSWERS>) {
|
||||
chomp;
|
||||
s/#.*//;
|
||||
my ($name, $value) = split / /;
|
||||
$answers{$name} = $value if $name;
|
||||
if (/^\s*([A-Za-z0-9_]+)(\?)?\s+(\S+)\s*$/) {
|
||||
$answers{$1} = $3;
|
||||
$requiredAnswers{$1} = 1 unless defined $2;
|
||||
} elsif (!/^\s*$/) {
|
||||
die "invalid config line: $_";
|
||||
}
|
||||
}
|
||||
close ANSWERS;
|
||||
|
||||
@ -123,8 +128,8 @@ while (<CONFIG>) {
|
||||
close CONFIG;
|
||||
|
||||
foreach my $name (sort (keys %answers)) {
|
||||
die "unused option: $name\n"
|
||||
unless defined $config{$name};
|
||||
die "option not set correctly: $name\n"
|
||||
my $f = $requiredAnswers{$name} ? sub { die @_; } : sub { warn @_; };
|
||||
&$f("unused option: $name\n") unless defined $config{$name};
|
||||
&$f("option not set correctly: $name\n")
|
||||
if $config{$name} && $config{$name} ne $answers{$name};
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ import ./generic.nix (
|
||||
# Disable some expensive (?) features.
|
||||
MARKERS n
|
||||
KPROBES n
|
||||
NUMA n
|
||||
NUMA? n
|
||||
PM_TRACE_RTC n
|
||||
|
||||
# Enable various subsystems.
|
||||
@ -78,9 +78,7 @@ import ./generic.nix (
|
||||
# Wireless networking.
|
||||
IPW2100_MONITOR y # support promiscuous mode
|
||||
IPW2200_MONITOR y # support promiscuous mode
|
||||
${stdenv.lib.optionalString (!userModeLinux) ''
|
||||
IWLWIFI_LEDS y
|
||||
''}
|
||||
IWLWIFI_LEDS? y
|
||||
IWLWIFI_RFKILL y
|
||||
IWLAGN_SPECTRUM_MEASUREMENT y
|
||||
IWLAGN_LEDS y
|
||||
@ -192,7 +190,7 @@ import ./generic.nix (
|
||||
BT_RFCOMM_TTY y # RFCOMM TTY support
|
||||
CPU_FREQ_DEBUG n
|
||||
CRASH_DUMP n
|
||||
DMAR n # experimental
|
||||
DMAR? n # experimental
|
||||
DVB_DYNAMIC_MINORS y # we use udev
|
||||
FUSION y # Fusion MPT device support
|
||||
IDE_GD_ATAPI y # ATAPI floppy support
|
||||
|
Loading…
Reference in New Issue
Block a user