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:
parent
1b94c30beb
commit
c0e77dba0e
@ -17,6 +17,7 @@ my $wd = getcwd;
|
|||||||
|
|
||||||
my $debug = $ENV{'DEBUG'};
|
my $debug = $ENV{'DEBUG'};
|
||||||
my $autoModules = $ENV{'AUTO_MODULES'};
|
my $autoModules = $ENV{'AUTO_MODULES'};
|
||||||
|
my $preferBuiltin = $ENV{'PREFER_BUILTIN'};
|
||||||
|
|
||||||
$SIG{PIPE} = 'IGNORE';
|
$SIG{PIPE} = 'IGNORE';
|
||||||
|
|
||||||
@ -73,7 +74,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 $autoModules && $alts =~ /\/m/;
|
$answer = "m" if $autoModules && $alts =~ /\/m/ && !($preferBuiltin && $alts =~ /Y/);
|
||||||
$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";
|
||||||
|
@ -55,6 +55,7 @@ let
|
|||||||
kernelBaseConfig = stdenv.platform.kernelBaseConfig;
|
kernelBaseConfig = stdenv.platform.kernelBaseConfig;
|
||||||
kernelTarget = stdenv.platform.kernelTarget;
|
kernelTarget = stdenv.platform.kernelTarget;
|
||||||
autoModules = stdenv.platform.kernelAutoModules;
|
autoModules = stdenv.platform.kernelAutoModules;
|
||||||
|
preferBuiltin = stdenv.platform.kernelPreferBuiltin or false;
|
||||||
arch = stdenv.platform.kernelArch;
|
arch = stdenv.platform.kernelArch;
|
||||||
|
|
||||||
crossAttrs = let
|
crossAttrs = let
|
||||||
@ -92,7 +93,7 @@ let
|
|||||||
echo "generating kernel configuration..."
|
echo "generating kernel configuration..."
|
||||||
echo "$kernelConfig" > kernel-config
|
echo "$kernelConfig" > kernel-config
|
||||||
DEBUG=1 ARCH=$arch KERNEL_CONFIG=kernel-config AUTO_MODULES=$autoModules \
|
DEBUG=1 ARCH=$arch KERNEL_CONFIG=kernel-config AUTO_MODULES=$autoModules \
|
||||||
SRC=../$sourceRoot perl -w $generateConfig
|
PREFER_BUILTIN=$preferBuiltin SRC=../$sourceRoot perl -w $generateConfig
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = "mv .config $out";
|
installPhase = "mv .config $out";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user