All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] kconfig/streamline_config.pl: directly access LSMOD from the environment
@ 2011-08-16  5:23 Arnaud Lacombe
  2011-08-16  5:23 ` [PATCH 2/3] kconfig/streamline_config.pl: use options to determine operating mode Arnaud Lacombe
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Arnaud Lacombe @ 2011-08-16  5:23 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Arnaud Lacombe, Steven Rostedt

Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
---
 scripts/kconfig/Makefile             |   12 ++----------
 scripts/kconfig/streamline_config.pl |    8 ++++++--
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 82d2eb2..bd41ab2 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -33,17 +33,9 @@ silentoldconfig: $(obj)/conf
 	$(Q)mkdir -p include/generated
 	$< --$@ $(Kconfig)
 
-# if no path is given, then use src directory to find file
-ifdef LSMOD
-LSMOD_F := $(LSMOD)
-ifeq ($(findstring /,$(LSMOD)),)
-  LSMOD_F := $(objtree)/$(LSMOD)
-endif
-endif
-
 localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
 	$(Q)mkdir -p include/generated
-	$(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config
+	$(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
 	$(Q)if [ -f .config ]; then 					\
 			cmp -s .tmp.config .config ||			\
 			(mv -f .config .config.old.1;			\
@@ -58,7 +50,7 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
 
 localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
 	$(Q)mkdir -p include/generated
-	$(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config
+	$(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
 	$(Q)sed -i s/=m/=y/ .tmp.config
 	$(Q)if [ -f .config ]; then					\
 			cmp -s .tmp.config .config ||			\
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index a4fe923..ae34d20 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -115,7 +115,7 @@ find_config;
 # Get the build source and top level Kconfig file (passed in)
 my $ksource = $ARGV[0];
 my $kconfig = $ARGV[1];
-my $lsmod_file = $ARGV[2];
+my $lsmod_file = $ENV{'LSMOD'};
 
 my @makefiles = `find $ksource -name Makefile 2>/dev/null`;
 chomp @makefiles;
@@ -296,7 +296,11 @@ my %modules;
 
 if (defined($lsmod_file)) {
     if ( ! -f $lsmod_file) {
-	die "$lsmod_file not found";
+	if ( -f $ENV{'objtree'}."/".$lsmod_file) {
+	    $lsmod_file = $ENV{'objtree'}."/".$lsmod_file;
+	} else {
+		die "$lsmod_file not found";
+	}
     }
     if ( -x $lsmod_file) {
 	# the file is executable, run it
-- 
1.7.6.153.g78432


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] kconfig/streamline_config.pl: use options to determine operating mode
  2011-08-16  5:23 [PATCH 1/3] kconfig/streamline_config.pl: directly access LSMOD from the environment Arnaud Lacombe
@ 2011-08-16  5:23 ` Arnaud Lacombe
  2011-08-16  5:23 ` [PATCH 3/3] kconfig/streamline_config.pl: merge local{mod,yes}config Arnaud Lacombe
  2011-08-16 15:31 ` [PATCH 1/3] kconfig/streamline_config.pl: directly access LSMOD from the environment Steven Rostedt
  2 siblings, 0 replies; 8+ messages in thread
From: Arnaud Lacombe @ 2011-08-16  5:23 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Arnaud Lacombe, Steven Rostedt

The options introduced are --localmodconfig (default) and --localyesconfig.
They match the Makefile target behavior.

Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
---
 scripts/kconfig/Makefile             |    4 ++--
 scripts/kconfig/streamline_config.pl |   14 +++++++++++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index bd41ab2..4de8973 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -35,7 +35,7 @@ silentoldconfig: $(obj)/conf
 
 localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
 	$(Q)mkdir -p include/generated
-	$(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
+	$(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
 	$(Q)if [ -f .config ]; then 					\
 			cmp -s .tmp.config .config ||			\
 			(mv -f .config .config.old.1;			\
@@ -50,7 +50,7 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
 
 localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
 	$(Q)mkdir -p include/generated
-	$(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
+	$(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
 	$(Q)sed -i s/=m/=y/ .tmp.config
 	$(Q)if [ -f .config ]; then					\
 			cmp -s .tmp.config .config ||			\
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index ae34d20..ec7afce 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -43,6 +43,7 @@
 #    make oldconfig
 #
 use strict;
+use Getopt::Long;
 
 my $config = ".config";
 
@@ -112,6 +113,13 @@ sub find_config {
 
 find_config;
 
+# Parse options
+my $localmodconfig = 0;
+my $localyesconfig = 0;
+
+GetOptions("localmodconfig" => \$localmodconfig,
+	   "localyesconfig" => \$localyesconfig);
+
 # Get the build source and top level Kconfig file (passed in)
 my $ksource = $ARGV[0];
 my $kconfig = $ARGV[1];
@@ -425,7 +433,11 @@ while(<CIN>) {
 
     if (/^(CONFIG.*)=(m|y)/) {
 	if (defined($configs{$1})) {
-	    $setconfigs{$1} = $2;
+	    if ($localyesconfig) {
+	        $setconfigs{$1} = 'y';
+	    } else {
+	        $setconfigs{$1} = $2;
+	    }
 	} elsif ($2 eq "m") {
 	    print "# $1 is not set\n";
 	    next;
-- 
1.7.6.153.g78432


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] kconfig/streamline_config.pl: merge local{mod,yes}config
  2011-08-16  5:23 [PATCH 1/3] kconfig/streamline_config.pl: directly access LSMOD from the environment Arnaud Lacombe
  2011-08-16  5:23 ` [PATCH 2/3] kconfig/streamline_config.pl: use options to determine operating mode Arnaud Lacombe
@ 2011-08-16  5:23 ` Arnaud Lacombe
  2011-08-16 15:31 ` [PATCH 1/3] kconfig/streamline_config.pl: directly access LSMOD from the environment Steven Rostedt
  2 siblings, 0 replies; 8+ messages in thread
From: Arnaud Lacombe @ 2011-08-16  5:23 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Arnaud Lacombe, Steven Rostedt

The two targets `localmodconfig' and `localyesconfig' only differs from the
sed(1) ran on the result of `streamline_config.pl' to convert symbols set to
`modules' to `yes'. This conversion can be made directly from the perl script,
and thus avoid duplicating the command to generate the configuration.

Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
---
 scripts/kconfig/Makefile |   18 +-----------------
 1 files changed, 1 insertions(+), 17 deletions(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 4de8973..ba573fe 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -33,7 +33,7 @@ silentoldconfig: $(obj)/conf
 	$(Q)mkdir -p include/generated
 	$< --$@ $(Kconfig)
 
-localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
+localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
 	$(Q)mkdir -p include/generated
 	$(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
 	$(Q)if [ -f .config ]; then 					\
@@ -48,22 +48,6 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
 	fi
 	$(Q)rm -f .tmp.config
 
-localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
-	$(Q)mkdir -p include/generated
-	$(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
-	$(Q)sed -i s/=m/=y/ .tmp.config
-	$(Q)if [ -f .config ]; then					\
-			cmp -s .tmp.config .config ||			\
-			(mv -f .config .config.old.1;			\
-			 mv -f .tmp.config .config;			\
-			 $(obj)/conf --silentoldconfig $(Kconfig);	\
-			 mv -f .config.old.1 .config.old)		\
-	else								\
-			mv -f .tmp.config .config;			\
-			$(obj)/conf --silentoldconfig $(Kconfig);	\
-	fi
-	$(Q)rm -f .tmp.config
-
 # Create new linux.pot file
 # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
 # The symlink is used to repair a deficiency in arch/um
-- 
1.7.6.153.g78432


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] kconfig/streamline_config.pl: directly access LSMOD from the environment
  2011-08-16  5:23 [PATCH 1/3] kconfig/streamline_config.pl: directly access LSMOD from the environment Arnaud Lacombe
  2011-08-16  5:23 ` [PATCH 2/3] kconfig/streamline_config.pl: use options to determine operating mode Arnaud Lacombe
  2011-08-16  5:23 ` [PATCH 3/3] kconfig/streamline_config.pl: merge local{mod,yes}config Arnaud Lacombe
@ 2011-08-16 15:31 ` Steven Rostedt
  2011-08-16 15:44   ` Arnaud Lacombe
  2 siblings, 1 reply; 8+ messages in thread
From: Steven Rostedt @ 2011-08-16 15:31 UTC (permalink / raw)
  To: Arnaud Lacombe; +Cc: linux-kbuild

On Tue, 2011-08-16 at 01:23 -0400, Arnaud Lacombe wrote:
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
> ---
>  scripts/kconfig/Makefile             |   12 ++----------
>  scripts/kconfig/streamline_config.pl |    8 ++++++--
>  2 files changed, 8 insertions(+), 12 deletions(-)

Hi Arnaud,

I like these versions better. Yeah, using the LSMOD environment is the
better way to go.

I'll do some tests on them and then push them up.

Thanks!

-- Steve



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] kconfig/streamline_config.pl: directly access LSMOD from the environment
  2011-08-16 15:31 ` [PATCH 1/3] kconfig/streamline_config.pl: directly access LSMOD from the environment Steven Rostedt
@ 2011-08-16 15:44   ` Arnaud Lacombe
  2011-08-16 20:16     ` Steven Rostedt
  0 siblings, 1 reply; 8+ messages in thread
From: Arnaud Lacombe @ 2011-08-16 15:44 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kbuild, Michal Marek

Hi,

On Tue, Aug 16, 2011 at 11:31 AM, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Tue, 2011-08-16 at 01:23 -0400, Arnaud Lacombe wrote:
>> Cc: Steven Rostedt <rostedt@goodmis.org>
>> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
>> ---
>>  scripts/kconfig/Makefile             |   12 ++----------
>>  scripts/kconfig/streamline_config.pl |    8 ++++++--
>>  2 files changed, 8 insertions(+), 12 deletions(-)
>
> Hi Arnaud,
>
> I like these versions better. Yeah, using the LSMOD environment is the
> better way to go.
>
> I'll do some tests on them and then push them up.
>
If you ACK them, I think this would be better if they go through the
kconfig tree. I have other patches pending touching
`scripts/kconfig/Makefile' which might create conflicts.

Thanks,
 - Arnaud

> Thanks!
>
> -- Steve
>
>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] kconfig/streamline_config.pl: directly access LSMOD from the environment
  2011-08-16 15:44   ` Arnaud Lacombe
@ 2011-08-16 20:16     ` Steven Rostedt
  2011-08-17 23:48       ` Arnaud Lacombe
  0 siblings, 1 reply; 8+ messages in thread
From: Steven Rostedt @ 2011-08-16 20:16 UTC (permalink / raw)
  To: Arnaud Lacombe; +Cc: linux-kbuild, Michal Marek

On Tue, 2011-08-16 at 11:44 -0400, Arnaud Lacombe wrote:
> Hi,
> 
> On Tue, Aug 16, 2011 at 11:31 AM, Steven Rostedt <rostedt@goodmis.org> wrote:
> > On Tue, 2011-08-16 at 01:23 -0400, Arnaud Lacombe wrote:
> >> Cc: Steven Rostedt <rostedt@goodmis.org>
> >> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
> >> ---
> >>  scripts/kconfig/Makefile             |   12 ++----------
> >>  scripts/kconfig/streamline_config.pl |    8 ++++++--
> >>  2 files changed, 8 insertions(+), 12 deletions(-)
> >
> > Hi Arnaud,
> >
> > I like these versions better. Yeah, using the LSMOD environment is the
> > better way to go.
> >
> > I'll do some tests on them and then push them up.
> >
> If you ACK them, I think this would be better if they go through the
> kconfig tree. I have other patches pending touching
> `scripts/kconfig/Makefile' which might create conflicts.

Fine with me. You can add my:

Acked-by: Steven Rostedt <rostedt@goodmis.org>

on all three patches.

-- Steve



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] kconfig/streamline_config.pl: directly access LSMOD from the environment
  2011-08-16 20:16     ` Steven Rostedt
@ 2011-08-17 23:48       ` Arnaud Lacombe
  2011-08-19 14:07         ` Michal Marek
  0 siblings, 1 reply; 8+ messages in thread
From: Arnaud Lacombe @ 2011-08-17 23:48 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kbuild, Steven Rostedt

Hi Michal,

On Tue, Aug 16, 2011 at 4:16 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Tue, 2011-08-16 at 11:44 -0400, Arnaud Lacombe wrote:
>> Hi,
>>
>> On Tue, Aug 16, 2011 at 11:31 AM, Steven Rostedt <rostedt@goodmis.org> wrote:
>> > On Tue, 2011-08-16 at 01:23 -0400, Arnaud Lacombe wrote:
>> >> Cc: Steven Rostedt <rostedt@goodmis.org>
>> >> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
>> >> ---
>> >>  scripts/kconfig/Makefile             |   12 ++----------
>> >>  scripts/kconfig/streamline_config.pl |    8 ++++++--
>> >>  2 files changed, 8 insertions(+), 12 deletions(-)
>> >
>> > Hi Arnaud,
>> >
>> > I like these versions better. Yeah, using the LSMOD environment is the
>> > better way to go.
>> >
>> > I'll do some tests on them and then push them up.
>> >
>> If you ACK them, I think this would be better if they go through the
>> kconfig tree. I have other patches pending touching
>> `scripts/kconfig/Makefile' which might create conflicts.
>
> Fine with me. You can add my:
>
> Acked-by: Steven Rostedt <rostedt@goodmis.org>
>
> on all three patches.
>
If you want, you can directly pull the patches from the git repository at:

 git@github.com:lacombar/linux-2.6.git master/kconfig-localmodconfig

Thanks
 - Arnaud

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] kconfig/streamline_config.pl: directly access LSMOD from the environment
  2011-08-17 23:48       ` Arnaud Lacombe
@ 2011-08-19 14:07         ` Michal Marek
  0 siblings, 0 replies; 8+ messages in thread
From: Michal Marek @ 2011-08-19 14:07 UTC (permalink / raw)
  To: Arnaud Lacombe; +Cc: linux-kbuild, Steven Rostedt

On 18.8.2011 01:48, Arnaud Lacombe wrote:
>>> If you ACK them, I think this would be better if they go through the
>>> kconfig tree. I have other patches pending touching
>>> `scripts/kconfig/Makefile' which might create conflicts.
>>
>> Fine with me. You can add my:
>>
>> Acked-by: Steven Rostedt <rostedt@goodmis.org>
>>
>> on all three patches.
>>
> If you want, you can directly pull the patches from the git repository at:
> 
>  git@github.com:lacombar/linux-2.6.git master/kconfig-localmodconfig

Pulled, thanks.

Michal

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-08-19 14:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-16  5:23 [PATCH 1/3] kconfig/streamline_config.pl: directly access LSMOD from the environment Arnaud Lacombe
2011-08-16  5:23 ` [PATCH 2/3] kconfig/streamline_config.pl: use options to determine operating mode Arnaud Lacombe
2011-08-16  5:23 ` [PATCH 3/3] kconfig/streamline_config.pl: merge local{mod,yes}config Arnaud Lacombe
2011-08-16 15:31 ` [PATCH 1/3] kconfig/streamline_config.pl: directly access LSMOD from the environment Steven Rostedt
2011-08-16 15:44   ` Arnaud Lacombe
2011-08-16 20:16     ` Steven Rostedt
2011-08-17 23:48       ` Arnaud Lacombe
2011-08-19 14:07         ` Michal Marek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.