diff options
Diffstat (limited to 'scripts/kconfig/streamline_config.pl')
-rw-r--r-- | scripts/kconfig/streamline_config.pl | 22 |
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 | # |
45 | use strict; | 45 | use strict; |
46 | use Getopt::Long; | ||
46 | 47 | ||
47 | my $config = ".config"; | 48 | my $config = ".config"; |
48 | 49 | ||
@@ -112,10 +113,17 @@ sub find_config { | |||
112 | 113 | ||
113 | find_config; | 114 | find_config; |
114 | 115 | ||
116 | # Parse options | ||
117 | my $localmodconfig = 0; | ||
118 | my $localyesconfig = 0; | ||
119 | |||
120 | GetOptions("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) |
116 | my $ksource = $ARGV[0]; | 124 | my $ksource = $ARGV[0]; |
117 | my $kconfig = $ARGV[1]; | 125 | my $kconfig = $ARGV[1]; |
118 | my $lsmod_file = $ARGV[2]; | 126 | my $lsmod_file = $ENV{'LSMOD'}; |
119 | 127 | ||
120 | my @makefiles = `find $ksource -name Makefile 2>/dev/null`; | 128 | my @makefiles = `find $ksource -name Makefile 2>/dev/null`; |
121 | chomp @makefiles; | 129 | chomp @makefiles; |
@@ -296,7 +304,11 @@ my %modules; | |||
296 | 304 | ||
297 | if (defined($lsmod_file)) { | 305 | if (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; |