linux: add kernelPreferBuiltin platform option

This allows to use kernelAutoModules but still compile in any options that are set so in template config.
It's helpful for ARM and maybe other platforms where defaul configurations are useful because they compile in
modules that we and udev cannot autodetect now.
This commit is contained in:
Nikolay Amiantov
2017-04-09 22:46:07 +03:00
committed by Tuomas Tynkkynen
parent 1b94c30beb
commit c0e77dba0e
2 changed files with 4 additions and 2 deletions
@@ -17,6 +17,7 @@ my $wd = getcwd;
my $debug = $ENV{'DEBUG'};
my $autoModules = $ENV{'AUTO_MODULES'};
my $preferBuiltin = $ENV{'PREFER_BUILTIN'};
$SIG{PIPE} = 'IGNORE';
@@ -73,7 +74,7 @@ sub runConfig {
my $question = $1; my $name = $2; my $alts = $3;
my $answer = "";
# Build everything as a module if possible.
$answer = "m" if $autoModules && $alts =~ /\/m/;
$answer = "m" if $autoModules && $alts =~ /\/m/ && !($preferBuiltin && $alts =~ /Y/);
$answer = $answers{$name} if defined $answers{$name};
print STDERR "QUESTION: $question, NAME: $name, ALTS: $alts, ANSWER: $answer\n" if $debug;
print OUT "$answer\n";