aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/streamline_config.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/streamline_config.pl')
-rw-r--r--scripts/kconfig/streamline_config.pl22
1 files changed, 19 insertions, 3 deletions
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index a4fe923c0131..ec7afce4c88d 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -43,6 +43,7 @@
43# make oldconfig 43# make oldconfig
44# 44#
45use strict; 45use strict;
46use Getopt::Long;
46 47
47my $config = ".config"; 48my $config = ".config";
48 49
@@ -112,10 +113,17 @@ sub find_config {
112 113
113find_config; 114find_config;
114 115
116# Parse options
117my $localmodconfig = 0;
118my $localyesconfig = 0;
119
120GetOptions("localmodconfig" => \$localmodconfig,
121 "localyesconfig" => \$localyesconfig);
122
115# Get the build source and top level Kconfig file (passed in) 123# Get the build source and top level Kconfig file (passed in)
116my $ksource = $ARGV[0]; 124my $ksource = $ARGV[0];
117my $kconfig = $ARGV[1]; 125my $kconfig = $ARGV[1];
118my $lsmod_file = $ARGV[2]; 126my $lsmod_file = $ENV{'LSMOD'};
119 127
120my @makefiles = `find $ksource -name Makefile 2>/dev/null`; 128my @makefiles = `find $ksource -name Makefile 2>/dev/null`;
121chomp @makefiles; 129chomp @makefiles;
@@ -296,7 +304,11 @@ my %modules;
296 304
297if (defined($lsmod_file)) { 305if (defined($lsmod_file)) {
298 if ( ! -f $lsmod_file) { 306 if ( ! -f $lsmod_file) {
299 die "$lsmod_file not found"; 307 if ( -f $ENV{'objtree'}."/".$lsmod_file) {
308 $lsmod_file = $ENV{'objtree'}."/".$lsmod_file;
309 } else {
310 die "$lsmod_file not found";
311 }
300 } 312 }
301 if ( -x $lsmod_file) { 313 if ( -x $lsmod_file) {
302 # the file is executable, run it 314 # the file is executable, run it
@@ -421,7 +433,11 @@ while(<CIN>) {
421 433
422 if (/^(CONFIG.*)=(m|y)/) { 434 if (/^(CONFIG.*)=(m|y)/) {
423 if (defined($configs{$1})) { 435 if (defined($configs{$1})) {
424 $setconfigs{$1} = $2; 436 if ($localyesconfig) {
437 $setconfigs{$1} = 'y';
438 } else {
439 $setconfigs{$1} = $2;
440 }
425 } elsif ($2 eq "m") { 441 } elsif ($2 eq "m") {
426 print "# $1 is not set\n"; 442 print "# $1 is not set\n";
427 next; 443 next;