aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/kconfig/Makefile12
-rw-r--r--scripts/kconfig/streamline_config.pl8
2 files changed, 8 insertions, 12 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 82d2eb285b70..bd41ab29e680 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -33,17 +33,9 @@ silentoldconfig: $(obj)/conf
33 $(Q)mkdir -p include/generated 33 $(Q)mkdir -p include/generated
34 $< --$@ $(Kconfig) 34 $< --$@ $(Kconfig)
35 35
36# if no path is given, then use src directory to find file
37ifdef LSMOD
38LSMOD_F := $(LSMOD)
39ifeq ($(findstring /,$(LSMOD)),)
40 LSMOD_F := $(objtree)/$(LSMOD)
41endif
42endif
43
44localmodconfig: $(obj)/streamline_config.pl $(obj)/conf 36localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
45 $(Q)mkdir -p include/generated 37 $(Q)mkdir -p include/generated
46 $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config 38 $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
47 $(Q)if [ -f .config ]; then \ 39 $(Q)if [ -f .config ]; then \
48 cmp -s .tmp.config .config || \ 40 cmp -s .tmp.config .config || \
49 (mv -f .config .config.old.1; \ 41 (mv -f .config .config.old.1; \
@@ -58,7 +50,7 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
58 50
59localyesconfig: $(obj)/streamline_config.pl $(obj)/conf 51localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
60 $(Q)mkdir -p include/generated 52 $(Q)mkdir -p include/generated
61 $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config 53 $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
62 $(Q)sed -i s/=m/=y/ .tmp.config 54 $(Q)sed -i s/=m/=y/ .tmp.config
63 $(Q)if [ -f .config ]; then \ 55 $(Q)if [ -f .config ]; then \
64 cmp -s .tmp.config .config || \ 56 cmp -s .tmp.config .config || \
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index a4fe923c0131..ae34d2007f57 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -115,7 +115,7 @@ find_config;
115# Get the build source and top level Kconfig file (passed in) 115# Get the build source and top level Kconfig file (passed in)
116my $ksource = $ARGV[0]; 116my $ksource = $ARGV[0];
117my $kconfig = $ARGV[1]; 117my $kconfig = $ARGV[1];
118my $lsmod_file = $ARGV[2]; 118my $lsmod_file = $ENV{'LSMOD'};
119 119
120my @makefiles = `find $ksource -name Makefile 2>/dev/null`; 120my @makefiles = `find $ksource -name Makefile 2>/dev/null`;
121chomp @makefiles; 121chomp @makefiles;
@@ -296,7 +296,11 @@ my %modules;
296 296
297if (defined($lsmod_file)) { 297if (defined($lsmod_file)) {
298 if ( ! -f $lsmod_file) { 298 if ( ! -f $lsmod_file) {
299 die "$lsmod_file not found"; 299 if ( -f $ENV{'objtree'}."/".$lsmod_file) {
300 $lsmod_file = $ENV{'objtree'}."/".$lsmod_file;
301 } else {
302 die "$lsmod_file not found";
303 }
300 } 304 }
301 if ( -x $lsmod_file) { 305 if ( -x $lsmod_file) {
302 # the file is executable, run it 306 # the file is executable, run it