All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] kconfig: more featured minimum module configs
@ 2009-04-30 18:50 Steven Rostedt
  2009-04-30 18:50 ` [PATCH 1/7] kconfig: streamline_config.pl do not stop with no depends Steven Rostedt
                   ` (7 more replies)
  0 siblings, 8 replies; 25+ messages in thread
From: Steven Rostedt @ 2009-04-30 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, Theodore Tso, Arnaldo Carvalho de Melo, zippel,
	linux-kbuild, Sam Ravnborg

This set of patches adds on top of my previous post.

It fixes CONFIG_IKCONFIG when CONFIG_IKCONFIG_PROC is not set.
 (gcc optimizes the config out!)

As a request from Ingo, it now enables IKCONFIG and will also
use various locations to find a config to base against.

Have fun,

-- Steve


The following patches are in:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git

    branch: kconfig


Steven Rostedt (7):
      kconfig: streamline_config.pl do not stop with no depends
      kconfig: do not warn about modules built in
      kconfig: enable CONFIG_IKCONFIG from streamline_config.pl
      kconfig: add check if end exists in extract-ikconfig
      kconfig: have extract-ikconfig read ELF files
      kconfig: keep config.gz around even if CONFIG_IKCONFIG_PROC is not set
      kconfig: search for a config to base the local(mod|yes)config on

----
 kernel/Makefile                      |    2 +-
 scripts/extract-ikconfig             |   14 +++++
 scripts/kconfig/streamline_config.pl |  102 +++++++++++++++++++++++++++++-----
 3 files changed, 103 insertions(+), 15 deletions(-)
-- 

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

* [PATCH 1/7] kconfig: streamline_config.pl do not stop with no depends
  2009-04-30 18:50 [PATCH 0/7] kconfig: more featured minimum module configs Steven Rostedt
@ 2009-04-30 18:50 ` Steven Rostedt
  2009-04-30 18:50 ` [PATCH 2/7] kconfig: do not warn about modules built in Steven Rostedt
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Steven Rostedt @ 2009-04-30 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, Theodore Tso, Arnaldo Carvalho de Melo, zippel,
	linux-kbuild, Sam Ravnborg

[-- Attachment #1: 0001-kconfig-streamline_config.pl-do-not-stop-with-no-de.patch --]
[-- Type: text/plain, Size: 1670 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

If a config is does not have a prompt, it must be selected.
streamline_config.pl keeps track of all configs that select other configs.
If a config that does not have a prompt needs to be set to enable a
current module, it will add include all configs that select it.
Note, streamline_config.pl does not enable modules that are not already
enabled. It only keeps enabled those that were enabled and might be
needed to compile the current modules.

The code to find the selects of a config is after the code that
adds the depends. But if a config needed selects but had no dependencies,
it would not be set. Because the code would stop before getting to
the select.

[ Impact: fix to enable configs that need to be selected ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 scripts/kconfig/streamline_config.pl |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index 79d8557..1774905 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -237,13 +237,11 @@ while ($repeat) {
     foreach my $config (keys %configs) {
 	$config =~ s/^CONFIG_//;
 
-	if (!defined($depends{$config})) {
-	    next;
+	if (defined($depends{$config})) {
+	    # This config has dependencies. Make sure they are also included
+	    parse_config_dep_select $depends{$config};
 	}
 
-	# This config has dependencies. Make sure they are also included
-	parse_config_dep_select $depends{$config};
-
 	if (defined($prompt{$config}) || !defined($selects{$config})) {
 	    next;
 	}
-- 
1.6.2.1

-- 

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

* [PATCH 2/7] kconfig: do not warn about modules built in
  2009-04-30 18:50 [PATCH 0/7] kconfig: more featured minimum module configs Steven Rostedt
  2009-04-30 18:50 ` [PATCH 1/7] kconfig: streamline_config.pl do not stop with no depends Steven Rostedt
@ 2009-04-30 18:50 ` Steven Rostedt
  2009-04-30 18:50 ` [PATCH 3/7] kconfig: enable CONFIG_IKCONFIG from streamline_config.pl Steven Rostedt
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Steven Rostedt @ 2009-04-30 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, Theodore Tso, Arnaldo Carvalho de Melo, zippel,
	linux-kbuild, Sam Ravnborg

[-- Attachment #1: 0002-kconfig-do-not-warn-about-modules-built-in.patch --]
[-- Type: text/plain, Size: 1342 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

The streamline_config.pl finds all the configs that are needed to
compile the currently loaded modules. After it creates the .config
file, it tests to make sure all the configs that are needed were
set.

It only looks at the configs that are modules, it does not look
at the builtin configs. This causes unnecessary warnings about modules
not being covered.

[ Impact: stops false warnings about modules not configured ]

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 scripts/kconfig/streamline_config.pl |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index 1774905..caac952 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -256,12 +256,14 @@ my %setconfigs;
 # Finally, read the .config file and turn off any module enabled that
 # we could not find a reason to keep enabled.
 while(<CIN>) {
-	if (/^(CONFIG.*)=m/) {
+	if (/^(CONFIG.*)=(m|y)/) {
 		if (defined($configs{$1})) {
-		    $setconfigs{$1} = 1;
+		    $setconfigs{$1} = $2;
 		    print;
-		} else {
+		} elsif ($2 eq "m") {
 		    print "# $1 is not set\n";
+		} else {
+		    print;
 		}
 	} else {
 		print;
-- 
1.6.2.1

-- 

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

* [PATCH 3/7] kconfig: enable CONFIG_IKCONFIG from streamline_config.pl
  2009-04-30 18:50 [PATCH 0/7] kconfig: more featured minimum module configs Steven Rostedt
  2009-04-30 18:50 ` [PATCH 1/7] kconfig: streamline_config.pl do not stop with no depends Steven Rostedt
  2009-04-30 18:50 ` [PATCH 2/7] kconfig: do not warn about modules built in Steven Rostedt
@ 2009-04-30 18:50 ` Steven Rostedt
  2009-04-30 21:51     ` Alan Jenkins
  2009-04-30 18:50 ` [PATCH 4/7] kconfig: add check if end exists in extract-ikconfig Steven Rostedt
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: Steven Rostedt @ 2009-04-30 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, Theodore Tso, Arnaldo Carvalho de Melo, zippel,
	linux-kbuild, Sam Ravnborg

[-- Attachment #1: 0003-kconfig-enable-CONFIG_IKCONFIG-from-streamline_conf.patch --]
[-- Type: text/plain, Size: 1760 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

Ingo Molnar suggested that the streamline_config.pl should enable
CONFIG_IKCONFIG to keep the current config in the kernel.
Then we can use scripts/extract-ikconfig to find the current
modules.

This patch changes streamline_config.pl to check if CONFIG_IKCONFIG
is not set, and if it is not, it enables it to be a module.

[ Impact: make current config options easier to find ]

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 scripts/kconfig/streamline_config.pl |   33 +++++++++++++++++++++++----------
 1 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index caac952..2334641 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -256,18 +256,31 @@ my %setconfigs;
 # Finally, read the .config file and turn off any module enabled that
 # we could not find a reason to keep enabled.
 while(<CIN>) {
-	if (/^(CONFIG.*)=(m|y)/) {
-		if (defined($configs{$1})) {
-		    $setconfigs{$1} = $2;
-		    print;
-		} elsif ($2 eq "m") {
-		    print "# $1 is not set\n";
-		} else {
-		    print;
-		}
+
+    if (/CONFIG_IKCONFIG/) {
+	if (/# CONFIG_IKCONFIG is not set/) {
+	    # enable IKCONFIG at least as a module
+	    print "CONFIG_IKCONFIG=m\n";
+	    # don't ask about PROC
+	    print "# CONFIG_IKCONFIG is not set\n";
+	} else {
+	    print;
+	}
+	next;
+    }
+
+    if (/^(CONFIG.*)=(m|y)/) {
+	if (defined($configs{$1})) {
+	    $setconfigs{$1} = $2;
+	    print;
+	} elsif ($2 eq "m") {
+	    print "# $1 is not set\n";
 	} else {
-		print;
+	    print;
 	}
+    } else {
+	print;
+    }
 }
 close(CIN);
 
-- 
1.6.2.1

-- 

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

* [PATCH 4/7] kconfig: add check if end exists in extract-ikconfig
  2009-04-30 18:50 [PATCH 0/7] kconfig: more featured minimum module configs Steven Rostedt
                   ` (2 preceding siblings ...)
  2009-04-30 18:50 ` [PATCH 3/7] kconfig: enable CONFIG_IKCONFIG from streamline_config.pl Steven Rostedt
@ 2009-04-30 18:50 ` Steven Rostedt
  2009-04-30 18:50 ` [PATCH 5/7] kconfig: have extract-ikconfig read ELF files Steven Rostedt
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Steven Rostedt @ 2009-04-30 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, Theodore Tso, Arnaldo Carvalho de Melo, zippel,
	linux-kbuild, Sam Ravnborg

[-- Attachment #1: 0004-kconfig-add-check-if-end-exists-in-extract-ikconfig.patch --]
[-- Type: text/plain, Size: 765 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

Both start and end should be tested for existence before continuing
to parse the config.gz file.

[ Impact: better integrity checks in finding config.gz

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 scripts/extract-ikconfig |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig
index 72997c3..42d6bce 100755
--- a/scripts/extract-ikconfig
+++ b/scripts/extract-ikconfig
@@ -17,6 +17,10 @@ dump_config() {
 	return
     fi
     end=`$binoffset $file $IKCFG_ED 2>/dev/null`
+    [ "$?" != "0" ] && end="-1"
+    if [ "$end" -eq "-1" ]; then
+	return
+    fi
 
     start=`expr $start + 8`
     size=`expr $end - $start`
-- 
1.6.2.1

-- 

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

* [PATCH 5/7] kconfig: have extract-ikconfig read ELF files
  2009-04-30 18:50 [PATCH 0/7] kconfig: more featured minimum module configs Steven Rostedt
                   ` (3 preceding siblings ...)
  2009-04-30 18:50 ` [PATCH 4/7] kconfig: add check if end exists in extract-ikconfig Steven Rostedt
@ 2009-04-30 18:50 ` Steven Rostedt
  2009-04-30 18:50 ` [PATCH 6/7] kconfig: keep config.gz around even if CONFIG_IKCONFIG_PROC is not set Steven Rostedt
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 25+ messages in thread
From: Steven Rostedt @ 2009-04-30 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, Theodore Tso, Arnaldo Carvalho de Melo, zippel,
	linux-kbuild, Sam Ravnborg

[-- Attachment #1: 0005-kconfig-have-extract-ikconfig-read-ELF-files.patch --]
[-- Type: text/plain, Size: 1290 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

It would be nice to use extract-ikconfig to find the congfig.gz
in either vmlinux (not vmlinuz) or configs.ko.

This patch changes the script to also be able to read ELF files directly.

[ Impact: find config.gz in vmlinux and configs.ko ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 scripts/extract-ikconfig |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig
index 42d6bce..de233ff 100755
--- a/scripts/extract-ikconfig
+++ b/scripts/extract-ikconfig
@@ -59,6 +59,8 @@ dump_config "$image"
 GZHDR1="0x1f 0x8b 0x08 0x00"
 GZHDR2="0x1f 0x8b 0x08 0x08"
 
+ELFHDR="0x7f 0x45 0x4c 0x46"
+
 # vmlinux.gz: Check for a compressed images
 off=`$binoffset "$image" $GZHDR1 2>/dev/null`
 [ "$?" != "0" ] && off="-1"
@@ -73,6 +75,14 @@ elif [ "$off" -ne "-1" ]; then
 	(dd ibs="$off" skip=1 count=0 && dd bs=512k) <"$image" 2>/dev/null | \
 		zcat >"$TMPFILE"
 	dump_config "$TMPFILE"
+
+# check if this is simply an ELF file
+else
+	off=`$binoffset "$image" $ELFHDR 2>/dev/null`
+	[ "$?" != "0" ] && off="-1"
+	if [ "$off" -eq "0" ]; then
+		dump_config "$image"
+	fi
 fi
 
 echo "ERROR: Unable to extract kernel configuration information."
-- 
1.6.2.1

-- 

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

* [PATCH 6/7] kconfig: keep config.gz around even if CONFIG_IKCONFIG_PROC is not set
  2009-04-30 18:50 [PATCH 0/7] kconfig: more featured minimum module configs Steven Rostedt
                   ` (4 preceding siblings ...)
  2009-04-30 18:50 ` [PATCH 5/7] kconfig: have extract-ikconfig read ELF files Steven Rostedt
@ 2009-04-30 18:50 ` Steven Rostedt
  2009-04-30 18:50 ` [PATCH 7/7] kconfig: search for a config to base the local(mod|yes)config on Steven Rostedt
  2009-04-30 19:10 ` [PATCH 0/7] kconfig: more featured minimum module configs Ingo Molnar
  7 siblings, 0 replies; 25+ messages in thread
From: Steven Rostedt @ 2009-04-30 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, Theodore Tso, Arnaldo Carvalho de Melo, zippel,
	linux-kbuild, Sam Ravnborg

[-- Attachment #1: 0006-kconfig-keep-config.gz-around-even-if-CONFIG_IKCONF.patch --]
[-- Type: text/plain, Size: 1120 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

If CONFIG_IKCONFIG is set but CONFIG_IKCONFIG_PROC is not, then
gcc will optibize the config.gz out, because nobody uses it.

This patch adds "__used" to the config.gz data to keep it around so that
code like extract-ikconfig can still find it.

[ Impact: allow extract-ikconfig to find config.gz ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/Makefile b/kernel/Makefile
index 4242366..f10c7c7 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -114,7 +114,7 @@ $(obj)/config_data.gz: .config FORCE
 	$(call if_changed,gzip)
 
 quiet_cmd_ikconfiggz = IKCFG   $@
-      cmd_ikconfiggz = (echo "static const char kernel_config_data[] = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;") > $@
+      cmd_ikconfiggz = (echo "static const char kernel_config_data[] __used = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;") > $@
 targets += config_data.h
 $(obj)/config_data.h: $(obj)/config_data.gz FORCE
 	$(call if_changed,ikconfiggz)
-- 
1.6.2.1

-- 

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

* [PATCH 7/7] kconfig: search for a config to base the local(mod|yes)config on
  2009-04-30 18:50 [PATCH 0/7] kconfig: more featured minimum module configs Steven Rostedt
                   ` (5 preceding siblings ...)
  2009-04-30 18:50 ` [PATCH 6/7] kconfig: keep config.gz around even if CONFIG_IKCONFIG_PROC is not set Steven Rostedt
@ 2009-04-30 18:50 ` Steven Rostedt
  2009-04-30 22:04     ` Alan Jenkins
  2009-05-04 12:15   ` Andi Kleen
  2009-04-30 19:10 ` [PATCH 0/7] kconfig: more featured minimum module configs Ingo Molnar
  7 siblings, 2 replies; 25+ messages in thread
From: Steven Rostedt @ 2009-04-30 18:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, Theodore Tso, Arnaldo Carvalho de Melo, zippel,
	linux-kbuild, Sam Ravnborg

[-- Attachment #1: 0007-kconfig-search-for-a-config-to-base-the-local-mod-y.patch --]
[-- Type: text/plain, Size: 2567 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

Instead of using the .config in the local directory. This patch
changes streamline_config.pl to search various locations for a config.

Here's the list and order of search:

  /proc/config.gz
  /boot/vmlinuz-`uname -r`
  vmlinux  # local to the directory
  /lib/modules/`uname -r`/kernel/kernel/configs.ko
  kernel/configs.ko
  kernel/configs.o
  .config

Once it finds a file that contains a config (it checks if the binary
objects have configs first) it then uses it to create the .config
with minimum modules needed.

[ Impact: use mostly the current config ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 scripts/kconfig/streamline_config.pl |   63 +++++++++++++++++++++++++++++++++-
 1 files changed, 62 insertions(+), 1 deletions(-)

diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index 2334641..9fa3f81 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -45,7 +45,68 @@
 my $config = ".config";
 my $linuxpath = ".";
 
-open(CIN,$config) || die "Can't open current config file: $config";
+my $uname = `uname -r`;
+chomp $uname;
+
+my @searchconfigs = (
+	{
+	    "file" => "/proc/config.gz",
+	    "exec" => "zcat",
+	},
+	{
+	    "file" => "/boot/vmlinuz-$uname",
+	    "exec" => "scripts/extract-ikconfig",
+	    "test" => "scripts/extract-ikconfig",
+	},
+	{
+	    "file" => "vmlinux",
+	    "exec" => "scripts/extract-ikconfig",
+	    "test" => "scripts/extract-ikconfig",
+	},
+	{
+	    "file" => "/lib/modules/$uname/kernel/kernel/configs.ko",
+	    "exec" => "scripts/extract-ikconfig",
+	    "test" => "scripts/extract-ikconfig",
+	},
+	{
+	    "file" => "kernel/configs.ko",
+	    "exec" => "scripts/extract-ikconfig",
+	    "test" => "scripts/extract-ikconfig",
+	},
+	{
+	    "file" => "kernel/configs.o",
+	    "exec" => "scripts/extract-ikconfig",
+	    "test" => "scripts/extract-ikconfig",
+	},
+	{
+	    "file" => ".config",
+	    "exec" => "cat",
+	},
+);
+
+sub find_config {
+    foreach my $conf (@searchconfigs) {
+	my $file = $conf->{"file"};
+
+	next if ( ! -f "$file");
+
+	if (defined($conf->{"test"})) {
+	    `$conf->{"test"} $conf->{"file"} 2>/dev/null`;
+	    next if ($?);
+	}
+
+	my $exec = $conf->{"exec"};
+
+	print STDERR "using config: '$file'\n";
+
+	open(CIN, "$exec $file |") || die "Failed to run $exec $file";
+	return;
+    }
+    die "No config file found";
+}
+
+find_config;
+
 my @makefiles = `find $linuxpath -name Makefile`;
 my %depends;
 my %selects;
-- 
1.6.2.1

-- 

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

* Re: [PATCH 0/7] kconfig: more featured minimum module configs
  2009-04-30 18:50 [PATCH 0/7] kconfig: more featured minimum module configs Steven Rostedt
                   ` (6 preceding siblings ...)
  2009-04-30 18:50 ` [PATCH 7/7] kconfig: search for a config to base the local(mod|yes)config on Steven Rostedt
@ 2009-04-30 19:10 ` Ingo Molnar
  2009-04-30 22:55   ` Steven Rostedt
  7 siblings, 1 reply; 25+ messages in thread
From: Ingo Molnar @ 2009-04-30 19:10 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, Andrew Morton, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, Theodore Tso, Arnaldo Carvalho de Melo, zippel,
	linux-kbuild, Sam Ravnborg


* Steven Rostedt <rostedt@goodmis.org> wrote:

> This set of patches adds on top of my previous post.
> 
> It fixes CONFIG_IKCONFIG when CONFIG_IKCONFIG_PROC is not set.
>  (gcc optimizes the config out!)
> 
> As a request from Ingo, it now enables IKCONFIG and will also use 
> various locations to find a config to base against.

hm, now 'make localyesconfig' done on a Fedora distro kernel 
produces something very close to an allyesconfig:

 -rw-rw-r-- 1 mingo mingo 91930 2009-04-30 20:03 .config
 aldebaran:~/linux/linux> grep =y .config | wc -l
 3398

is that expected?

	Ingo

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

* Re: [PATCH 3/7] kconfig: enable CONFIG_IKCONFIG from  streamline_config.pl
  2009-04-30 18:50 ` [PATCH 3/7] kconfig: enable CONFIG_IKCONFIG from streamline_config.pl Steven Rostedt
@ 2009-04-30 21:51     ` Alan Jenkins
  0 siblings, 0 replies; 25+ messages in thread
From: Alan Jenkins @ 2009-04-30 21:51 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, Ingo Molnar, Andrew Morton, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Theodore Tso,
	Arnaldo Carvalho de Melo, zippel, linux-kbuild, Sam Ravnborg

On 4/30/09, Steven Rostedt <rostedt@goodmis.org> wrote:
> From: Steven Rostedt <srostedt@redhat.com>
>
> Ingo Molnar suggested that the streamline_config.pl should enable
> CONFIG_IKCONFIG to keep the current config in the kernel.
> Then we can use scripts/extract-ikconfig to find the current
> modules.
>
> This patch changes streamline_config.pl to check if CONFIG_IKCONFIG
> is not set, and if it is not, it enables it to be a module.
>
> [ Impact: make current config options easier to find ]
>
> Reported-by: Ingo Molnar <mingo@elte.hu>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> ---
>  scripts/kconfig/streamline_config.pl |   33
> +++++++++++++++++++++++----------
>  1 files changed, 23 insertions(+), 10 deletions(-)
>
> diff --git a/scripts/kconfig/streamline_config.pl
> b/scripts/kconfig/streamline_config.pl
> index caac952..2334641 100644
> --- a/scripts/kconfig/streamline_config.pl
> +++ b/scripts/kconfig/streamline_config.pl
> @@ -256,18 +256,31 @@ my %setconfigs;
>  # Finally, read the .config file and turn off any module enabled that
>  # we could not find a reason to keep enabled.
>  while(<CIN>) {
> -	if (/^(CONFIG.*)=(m|y)/) {
> -		if (defined($configs{$1})) {
> -		    $setconfigs{$1} = $2;
> -		    print;
> -		} elsif ($2 eq "m") {
> -		    print "# $1 is not set\n";
> -		} else {
> -		    print;
> -		}
> +
> +    if (/CONFIG_IKCONFIG/) {
> +	if (/# CONFIG_IKCONFIG is not set/) {
> +	    # enable IKCONFIG at least as a module
> +	    print "CONFIG_IKCONFIG=m\n";
> +	    # don't ask about PROC
> +	    print "# CONFIG_IKCONFIG is not set\n";

I assume the second one should be CONFIG_IKCONFIG_PROC :-).

> +	} else {
> +	    print;
> +	}
> +	next;
> +    }
> +
> +    if (/^(CONFIG.*)=(m|y)/) {
> +	if (defined($configs{$1})) {
> +	    $setconfigs{$1} = $2;
> +	    print;
> +	} elsif ($2 eq "m") {
> +	    print "# $1 is not set\n";
>  	} else {
> -		print;
> +	    print;
>  	}

> +    } else {
> +	print;
> +    }


Maybe it would be cleaner make the two "if" blocks the same; i.e. do
this instead:

+	next;
+    }
+
+	print;


>  }
>  close(CIN);
>

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

* Re: [PATCH 3/7] kconfig: enable CONFIG_IKCONFIG from streamline_config.pl
@ 2009-04-30 21:51     ` Alan Jenkins
  0 siblings, 0 replies; 25+ messages in thread
From: Alan Jenkins @ 2009-04-30 21:51 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, Ingo Molnar, Andrew Morton, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Theodore Tso,
	Arnaldo Carvalho de Melo, zippel, linux-kbuild, Sam Ravnborg

On 4/30/09, Steven Rostedt <rostedt@goodmis.org> wrote:
> From: Steven Rostedt <srostedt@redhat.com>
>
> Ingo Molnar suggested that the streamline_config.pl should enable
> CONFIG_IKCONFIG to keep the current config in the kernel.
> Then we can use scripts/extract-ikconfig to find the current
> modules.
>
> This patch changes streamline_config.pl to check if CONFIG_IKCONFIG
> is not set, and if it is not, it enables it to be a module.
>
> [ Impact: make current config options easier to find ]
>
> Reported-by: Ingo Molnar <mingo@elte.hu>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> ---
>  scripts/kconfig/streamline_config.pl |   33
> +++++++++++++++++++++++----------
>  1 files changed, 23 insertions(+), 10 deletions(-)
>
> diff --git a/scripts/kconfig/streamline_config.pl
> b/scripts/kconfig/streamline_config.pl
> index caac952..2334641 100644
> --- a/scripts/kconfig/streamline_config.pl
> +++ b/scripts/kconfig/streamline_config.pl
> @@ -256,18 +256,31 @@ my %setconfigs;
>  # Finally, read the .config file and turn off any module enabled that
>  # we could not find a reason to keep enabled.
>  while(<CIN>) {
> -	if (/^(CONFIG.*)=(m|y)/) {
> -		if (defined($configs{$1})) {
> -		    $setconfigs{$1} = $2;
> -		    print;
> -		} elsif ($2 eq "m") {
> -		    print "# $1 is not set\n";
> -		} else {
> -		    print;
> -		}
> +
> +    if (/CONFIG_IKCONFIG/) {
> +	if (/# CONFIG_IKCONFIG is not set/) {
> +	    # enable IKCONFIG at least as a module
> +	    print "CONFIG_IKCONFIG=m\n";
> +	    # don't ask about PROC
> +	    print "# CONFIG_IKCONFIG is not set\n";

I assume the second one should be CONFIG_IKCONFIG_PROC :-).

> +	} else {
> +	    print;
> +	}
> +	next;
> +    }
> +
> +    if (/^(CONFIG.*)=(m|y)/) {
> +	if (defined($configs{$1})) {
> +	    $setconfigs{$1} = $2;
> +	    print;
> +	} elsif ($2 eq "m") {
> +	    print "# $1 is not set\n";
>  	} else {
> -		print;
> +	    print;
>  	}

> +    } else {
> +	print;
> +    }


Maybe it would be cleaner make the two "if" blocks the same; i.e. do
this instead:

+	next;
+    }
+
+	print;


>  }
>  close(CIN);
>

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

* Re: [PATCH 7/7] kconfig: search for a config to base the  local(mod|yes)config on
  2009-04-30 18:50 ` [PATCH 7/7] kconfig: search for a config to base the local(mod|yes)config on Steven Rostedt
@ 2009-04-30 22:04     ` Alan Jenkins
  2009-05-04 12:15   ` Andi Kleen
  1 sibling, 0 replies; 25+ messages in thread
From: Alan Jenkins @ 2009-04-30 22:04 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, Ingo Molnar, Andrew Morton, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Theodore Tso,
	Arnaldo Carvalho de Melo, zippel, linux-kbuild, Sam Ravnborg

On 4/30/09, Steven Rostedt <rostedt@goodmis.org> wrote:
> From: Steven Rostedt <srostedt@redhat.com>
>
> Instead of using the .config in the local directory. This patch
> changes streamline_config.pl to search various locations for a config.
>
> Here's the list and order of search:
>
>   /proc/config.gz
>   /boot/vmlinuz-`uname -r`
>   vmlinux  # local to the directory
>   /lib/modules/`uname -r`/kernel/kernel/configs.ko
>   kernel/configs.ko
>   kernel/configs.o
>   .config
>
> Once it finds a file that contains a config (it checks if the binary
> objects have configs first) it then uses it to create the .config
> with minimum modules needed.

Maybe this has already been discussed, but is there some reason for
omitting /boot/config-`uname -r`?  My understanding as a user of a
specific distribution was that kernel packages provide these files,
and therefore do not feel the need to enable CONFIG_IKCONFIG.

Regards
Alan

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

* Re: [PATCH 7/7] kconfig: search for a config to base the local(mod|yes)config on
@ 2009-04-30 22:04     ` Alan Jenkins
  0 siblings, 0 replies; 25+ messages in thread
From: Alan Jenkins @ 2009-04-30 22:04 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, Ingo Molnar, Andrew Morton, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Theodore Tso,
	Arnaldo Carvalho de Melo, zippel, linux-kbuild, Sam Ravnborg

On 4/30/09, Steven Rostedt <rostedt@goodmis.org> wrote:
> From: Steven Rostedt <srostedt@redhat.com>
>
> Instead of using the .config in the local directory. This patch
> changes streamline_config.pl to search various locations for a config.
>
> Here's the list and order of search:
>
>   /proc/config.gz
>   /boot/vmlinuz-`uname -r`
>   vmlinux  # local to the directory
>   /lib/modules/`uname -r`/kernel/kernel/configs.ko
>   kernel/configs.ko
>   kernel/configs.o
>   .config
>
> Once it finds a file that contains a config (it checks if the binary
> objects have configs first) it then uses it to create the .config
> with minimum modules needed.

Maybe this has already been discussed, but is there some reason for
omitting /boot/config-`uname -r`?  My understanding as a user of a
specific distribution was that kernel packages provide these files,
and therefore do not feel the need to enable CONFIG_IKCONFIG.

Regards
Alan

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

* Re: [PATCH 3/7] kconfig: enable CONFIG_IKCONFIG from  streamline_config.pl
  2009-04-30 21:51     ` Alan Jenkins
@ 2009-04-30 22:53       ` Steven Rostedt
  -1 siblings, 0 replies; 25+ messages in thread
From: Steven Rostedt @ 2009-04-30 22:53 UTC (permalink / raw)
  To: Alan Jenkins
  Cc: linux-kernel, Ingo Molnar, Andrew Morton, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Theodore Tso,
	Arnaldo Carvalho de Melo, zippel, linux-kbuild, Sam Ravnborg


On Thu, 30 Apr 2009, Alan Jenkins wrote:
> > +
> > +    if (/CONFIG_IKCONFIG/) {
> > +	if (/# CONFIG_IKCONFIG is not set/) {
> > +	    # enable IKCONFIG at least as a module
> > +	    print "CONFIG_IKCONFIG=m\n";
> > +	    # don't ask about PROC
> > +	    print "# CONFIG_IKCONFIG is not set\n";
> 
> I assume the second one should be CONFIG_IKCONFIG_PROC :-).

Ag! Thanks!

> 
> > +	} else {
> > +	    print;
> > +	}
> > +	next;
> > +    }
> > +
> > +    if (/^(CONFIG.*)=(m|y)/) {
> > +	if (defined($configs{$1})) {
> > +	    $setconfigs{$1} = $2;
> > +	    print;
> > +	} elsif ($2 eq "m") {
> > +	    print "# $1 is not set\n";
> >  	} else {
> > -		print;
> > +	    print;
> >  	}
> 
> > +    } else {
> > +	print;
> > +    }
> 
> 
> Maybe it would be cleaner make the two "if" blocks the same; i.e. do
> this instead:

Yeah, that does look cleaner.

-- Steve

> 
> +	next;
> +    }
> +
> +	print;
> 
> 
> >  }
> >  close(CIN);
> >
> 

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

* Re: [PATCH 3/7] kconfig: enable CONFIG_IKCONFIG from streamline_config.pl
@ 2009-04-30 22:53       ` Steven Rostedt
  0 siblings, 0 replies; 25+ messages in thread
From: Steven Rostedt @ 2009-04-30 22:53 UTC (permalink / raw)
  To: Alan Jenkins
  Cc: linux-kernel, Ingo Molnar, Andrew Morton, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Theodore Tso,
	Arnaldo Carvalho de Melo, zippel, linux-kbuild, Sam Ravnborg


On Thu, 30 Apr 2009, Alan Jenkins wrote:
> > +
> > +    if (/CONFIG_IKCONFIG/) {
> > +	if (/# CONFIG_IKCONFIG is not set/) {
> > +	    # enable IKCONFIG at least as a module
> > +	    print "CONFIG_IKCONFIG=m\n";
> > +	    # don't ask about PROC
> > +	    print "# CONFIG_IKCONFIG is not set\n";
> 
> I assume the second one should be CONFIG_IKCONFIG_PROC :-).

Ag! Thanks!

> 
> > +	} else {
> > +	    print;
> > +	}
> > +	next;
> > +    }
> > +
> > +    if (/^(CONFIG.*)=(m|y)/) {
> > +	if (defined($configs{$1})) {
> > +	    $setconfigs{$1} = $2;
> > +	    print;
> > +	} elsif ($2 eq "m") {
> > +	    print "# $1 is not set\n";
> >  	} else {
> > -		print;
> > +	    print;
> >  	}
> 
> > +    } else {
> > +	print;
> > +    }
> 
> 
> Maybe it would be cleaner make the two "if" blocks the same; i.e. do
> this instead:

Yeah, that does look cleaner.

-- Steve

> 
> +	next;
> +    }
> +
> +	print;
> 
> 
> >  }
> >  close(CIN);
> >
> 

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

* Re: [PATCH 7/7] kconfig: search for a config to base the  local(mod|yes)config on
  2009-04-30 22:04     ` Alan Jenkins
@ 2009-04-30 22:54       ` Steven Rostedt
  -1 siblings, 0 replies; 25+ messages in thread
From: Steven Rostedt @ 2009-04-30 22:54 UTC (permalink / raw)
  To: Alan Jenkins
  Cc: linux-kernel, Ingo Molnar, Andrew Morton, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Theodore Tso,
	Arnaldo Carvalho de Melo, zippel, linux-kbuild, Sam Ravnborg


On Thu, 30 Apr 2009, Alan Jenkins wrote:

> On 4/30/09, Steven Rostedt <rostedt@goodmis.org> wrote:
> > From: Steven Rostedt <srostedt@redhat.com>
> >
> > Instead of using the .config in the local directory. This patch
> > changes streamline_config.pl to search various locations for a config.
> >
> > Here's the list and order of search:
> >
> >   /proc/config.gz
> >   /boot/vmlinuz-`uname -r`
> >   vmlinux  # local to the directory
> >   /lib/modules/`uname -r`/kernel/kernel/configs.ko
> >   kernel/configs.ko
> >   kernel/configs.o
> >   .config
> >
> > Once it finds a file that contains a config (it checks if the binary
> > objects have configs first) it then uses it to create the .config
> > with minimum modules needed.
> 
> Maybe this has already been discussed, but is there some reason for
> omitting /boot/config-`uname -r`?  My understanding as a user of a
> specific distribution was that kernel packages provide these files,
> and therefore do not feel the need to enable CONFIG_IKCONFIG.

You know, I did not even think about that :-/

I'll update that.

Thanks,

-- Steve


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

* Re: [PATCH 7/7] kconfig: search for a config to base the local(mod|yes)config on
@ 2009-04-30 22:54       ` Steven Rostedt
  0 siblings, 0 replies; 25+ messages in thread
From: Steven Rostedt @ 2009-04-30 22:54 UTC (permalink / raw)
  To: Alan Jenkins
  Cc: linux-kernel, Ingo Molnar, Andrew Morton, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Theodore Tso,
	Arnaldo Carvalho de Melo, zippel, linux-kbuild, Sam Ravnborg


On Thu, 30 Apr 2009, Alan Jenkins wrote:

> On 4/30/09, Steven Rostedt <rostedt@goodmis.org> wrote:
> > From: Steven Rostedt <srostedt@redhat.com>
> >
> > Instead of using the .config in the local directory. This patch
> > changes streamline_config.pl to search various locations for a config.
> >
> > Here's the list and order of search:
> >
> >   /proc/config.gz
> >   /boot/vmlinuz-`uname -r`
> >   vmlinux  # local to the directory
> >   /lib/modules/`uname -r`/kernel/kernel/configs.ko
> >   kernel/configs.ko
> >   kernel/configs.o
> >   .config
> >
> > Once it finds a file that contains a config (it checks if the binary
> > objects have configs first) it then uses it to create the .config
> > with minimum modules needed.
> 
> Maybe this has already been discussed, but is there some reason for
> omitting /boot/config-`uname -r`?  My understanding as a user of a
> specific distribution was that kernel packages provide these files,
> and therefore do not feel the need to enable CONFIG_IKCONFIG.

You know, I did not even think about that :-/

I'll update that.

Thanks,

-- Steve


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

* Re: [PATCH 0/7] kconfig: more featured minimum module configs
  2009-04-30 19:10 ` [PATCH 0/7] kconfig: more featured minimum module configs Ingo Molnar
@ 2009-04-30 22:55   ` Steven Rostedt
  2009-05-01 12:01     ` Ingo Molnar
  0 siblings, 1 reply; 25+ messages in thread
From: Steven Rostedt @ 2009-04-30 22:55 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Andrew Morton, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, Theodore Tso, Arnaldo Carvalho de Melo, zippel,
	linux-kbuild, Sam Ravnborg




On Thu, 30 Apr 2009, Ingo Molnar wrote:

> 
> * Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > This set of patches adds on top of my previous post.
> > 
> > It fixes CONFIG_IKCONFIG when CONFIG_IKCONFIG_PROC is not set.
> >  (gcc optimizes the config out!)
> > 
> > As a request from Ingo, it now enables IKCONFIG and will also use 
> > various locations to find a config to base against.
> 
> hm, now 'make localyesconfig' done on a Fedora distro kernel 
> produces something very close to an allyesconfig:
> 
>  -rw-rw-r-- 1 mingo mingo 91930 2009-04-30 20:03 .config
>  aldebaran:~/linux/linux> grep =y .config | wc -l
>  3398
> 
> is that expected?

What config did it use? If it uses an allyesconfig that was already made 
then it will not disable anything.

-- Steve


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

* Re: [PATCH 0/7] kconfig: more featured minimum module configs
  2009-04-30 22:55   ` Steven Rostedt
@ 2009-05-01 12:01     ` Ingo Molnar
  2009-05-01 23:27       ` Steven Rostedt
  0 siblings, 1 reply; 25+ messages in thread
From: Ingo Molnar @ 2009-05-01 12:01 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, Andrew Morton, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, Theodore Tso, Arnaldo Carvalho de Melo, zippel,
	linux-kbuild, Sam Ravnborg


* Steven Rostedt <rostedt@goodmis.org> wrote:

> On Thu, 30 Apr 2009, Ingo Molnar wrote:
> 
> > * Steven Rostedt <rostedt@goodmis.org> wrote:
> > 
> > > This set of patches adds on top of my previous post.
> > > 
> > > It fixes CONFIG_IKCONFIG when CONFIG_IKCONFIG_PROC is not set.
> > >  (gcc optimizes the config out!)
> > > 
> > > As a request from Ingo, it now enables IKCONFIG and will also use 
> > > various locations to find a config to base against.
> > 
> > hm, now 'make localyesconfig' done on a Fedora distro kernel 
> > produces something very close to an allyesconfig:
> > 
> >  -rw-rw-r-- 1 mingo mingo 91930 2009-04-30 20:03 .config
> >  aldebaran:~/linux/linux> grep =y .config | wc -l
> >  3398
> > 
> > is that expected?
> 
> What config did it use? If it uses an allyesconfig that was 
> already made then it will not disable anything.

i used a regular config - then i also tried an allnoconfig - but no 
change in the result, bloated .config.

	Ingo

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

* Re: [PATCH 0/7] kconfig: more featured minimum module configs
  2009-05-01 12:01     ` Ingo Molnar
@ 2009-05-01 23:27       ` Steven Rostedt
  2009-05-06 12:15         ` Ingo Molnar
  0 siblings, 1 reply; 25+ messages in thread
From: Steven Rostedt @ 2009-05-01 23:27 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Andrew Morton, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, Theodore Tso, Arnaldo Carvalho de Melo, zippel,
	linux-kbuild, Sam Ravnborg



On Fri, 1 May 2009, Ingo Molnar wrote:

> 
> * Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > On Thu, 30 Apr 2009, Ingo Molnar wrote:
> > 
> > > * Steven Rostedt <rostedt@goodmis.org> wrote:
> > > 
> > > > This set of patches adds on top of my previous post.
> > > > 
> > > > It fixes CONFIG_IKCONFIG when CONFIG_IKCONFIG_PROC is not set.
> > > >  (gcc optimizes the config out!)
> > > > 
> > > > As a request from Ingo, it now enables IKCONFIG and will also use 
> > > > various locations to find a config to base against.
> > > 
> > > hm, now 'make localyesconfig' done on a Fedora distro kernel 
> > > produces something very close to an allyesconfig:
> > > 
> > >  -rw-rw-r-- 1 mingo mingo 91930 2009-04-30 20:03 .config
> > >  aldebaran:~/linux/linux> grep =y .config | wc -l
> > >  3398
> > > 
> > > is that expected?
> > 
> > What config did it use? If it uses an allyesconfig that was 
> > already made then it will not disable anything.
> 
> i used a regular config - then i also tried an allnoconfig - but no 
> change in the result, bloated .config.

Could you send me the config it used (it should print out which one it 
used) and the output of lsmod. Then I can test it locally.

Thanks,

-- Steve


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

* Re: [PATCH 7/7] kconfig: search for a config to base the local(mod|yes)config on
  2009-04-30 18:50 ` [PATCH 7/7] kconfig: search for a config to base the local(mod|yes)config on Steven Rostedt
  2009-04-30 22:04     ` Alan Jenkins
@ 2009-05-04 12:15   ` Andi Kleen
  2009-05-04 12:28     ` Peter Zijlstra
  1 sibling, 1 reply; 25+ messages in thread
From: Andi Kleen @ 2009-05-04 12:15 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, Ingo Molnar, Andrew Morton, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Theodore Tso,
	Arnaldo Carvalho de Melo, zippel, linux-kbuild, Sam Ravnborg

Steven Rostedt <rostedt@goodmis.org> writes:

> Here's the list and order of search:
>
>   /proc/config.gz
>   /boot/vmlinuz-`uname -r`
>   vmlinux  # local to the directory
>   /lib/modules/`uname -r`/kernel/kernel/configs.ko
>   kernel/configs.ko
>   kernel/configs.o
>   .config


That seems like the wrong order. ./.config should always be first for
compatibility. 

That order would completely wreck all my build scripts, and I suspect
others too.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

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

* Re: [PATCH 7/7] kconfig: search for a config to base the local(mod|yes)config on
  2009-05-04 12:15   ` Andi Kleen
@ 2009-05-04 12:28     ` Peter Zijlstra
  2009-05-04 14:46       ` Steven Rostedt
  2009-05-04 14:59       ` Andi Kleen
  0 siblings, 2 replies; 25+ messages in thread
From: Peter Zijlstra @ 2009-05-04 12:28 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Steven Rostedt, linux-kernel, Ingo Molnar, Andrew Morton,
	Linus Torvalds, Thomas Gleixner, Theodore Tso,
	Arnaldo Carvalho de Melo, zippel, linux-kbuild, Sam Ravnborg

On Mon, 2009-05-04 at 14:15 +0200, Andi Kleen wrote:
> Steven Rostedt <rostedt@goodmis.org> writes:
> 
> > Here's the list and order of search:
> >
> >   /proc/config.gz
> >   /boot/vmlinuz-`uname -r`
> >   vmlinux  # local to the directory
> >   /lib/modules/`uname -r`/kernel/kernel/configs.ko
> >   kernel/configs.ko
> >   kernel/configs.o
> >   .config
> 
> 
> That seems like the wrong order. ./.config should always be first for
> compatibility. 
> 
> That order would completely wreck all my build scripts, and I suspect
> others too.

Quite, except that I hardly ever have a ./.config since I make extensive
use of O=foo

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

* Re: [PATCH 7/7] kconfig: search for a config to base the local(mod|yes)config on
  2009-05-04 12:28     ` Peter Zijlstra
@ 2009-05-04 14:46       ` Steven Rostedt
  2009-05-04 14:59       ` Andi Kleen
  1 sibling, 0 replies; 25+ messages in thread
From: Steven Rostedt @ 2009-05-04 14:46 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Andi Kleen, linux-kernel, Ingo Molnar, Andrew Morton,
	Linus Torvalds, Thomas Gleixner, Theodore Tso,
	Arnaldo Carvalho de Melo, zippel, linux-kbuild, Sam Ravnborg


On Mon, 4 May 2009, Peter Zijlstra wrote:

> On Mon, 2009-05-04 at 14:15 +0200, Andi Kleen wrote:
> > Steven Rostedt <rostedt@goodmis.org> writes:
> > 
> > > Here's the list and order of search:
> > >
> > >   /proc/config.gz
> > >   /boot/vmlinuz-`uname -r`
> > >   vmlinux  # local to the directory
> > >   /lib/modules/`uname -r`/kernel/kernel/configs.ko
> > >   kernel/configs.ko
> > >   kernel/configs.o
> > >   .config
> > 
> > 
> > That seems like the wrong order. ./.config should always be first for
> > compatibility. 
> > 
> > That order would completely wreck all my build scripts, and I suspect
> > others too.
> 
> Quite, except that I hardly ever have a ./.config since I make extensive
> use of O=foo

I'm fine with using .config as first choice (that is what the script 
originally did) but I wanted to make it as easy for non developers as 
possible. Taking from /proc or /boot was most likely the best to give a 
minimal boot environment.

But I can see why .config is probably the best choice for having the most 
power with the tool. It is how you can always force it to do something you 
want, and is the most logical place to expect the script to read from.

I'll update it.

Thanks,

-- Steve


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

* Re: [PATCH 7/7] kconfig: search for a config to base the local(mod|yes)config on
  2009-05-04 12:28     ` Peter Zijlstra
  2009-05-04 14:46       ` Steven Rostedt
@ 2009-05-04 14:59       ` Andi Kleen
  1 sibling, 0 replies; 25+ messages in thread
From: Andi Kleen @ 2009-05-04 14:59 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Andi Kleen, Steven Rostedt, linux-kernel, Ingo Molnar,
	Andrew Morton, Linus Torvalds, Thomas Gleixner, Theodore Tso,
	Arnaldo Carvalho de Melo, zippel, linux-kbuild, Sam Ravnborg

On Mon, May 04, 2009 at 02:28:06PM +0200, Peter Zijlstra wrote:
> On Mon, 2009-05-04 at 14:15 +0200, Andi Kleen wrote:
> > Steven Rostedt <rostedt@goodmis.org> writes:
> > 
> > > Here's the list and order of search:
> > >
> > >   /proc/config.gz
> > >   /boot/vmlinuz-`uname -r`
> > >   vmlinux  # local to the directory
> > >   /lib/modules/`uname -r`/kernel/kernel/configs.ko
> > >   kernel/configs.ko
> > >   kernel/configs.o
> > >   .config
> > 
> > 
> > That seems like the wrong order. ./.config should always be first for
> > compatibility. 
> > 
> > That order would completely wreck all my build scripts, and I suspect
> > others too.
> 
> Quite, except that I hardly ever have a ./.config since I make extensive
> use of O=foo

yes I do too.  I meant $O/.config sorry

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

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

* Re: [PATCH 0/7] kconfig: more featured minimum module configs
  2009-05-01 23:27       ` Steven Rostedt
@ 2009-05-06 12:15         ` Ingo Molnar
  0 siblings, 0 replies; 25+ messages in thread
From: Ingo Molnar @ 2009-05-06 12:15 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kernel, Andrew Morton, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, Theodore Tso, Arnaldo Carvalho de Melo, zippel,
	linux-kbuild, Sam Ravnborg


* Steven Rostedt <rostedt@goodmis.org> wrote:

> 
> 
> On Fri, 1 May 2009, Ingo Molnar wrote:
> 
> > 
> > * Steven Rostedt <rostedt@goodmis.org> wrote:
> > 
> > > On Thu, 30 Apr 2009, Ingo Molnar wrote:
> > > 
> > > > * Steven Rostedt <rostedt@goodmis.org> wrote:
> > > > 
> > > > > This set of patches adds on top of my previous post.
> > > > > 
> > > > > It fixes CONFIG_IKCONFIG when CONFIG_IKCONFIG_PROC is not set.
> > > > >  (gcc optimizes the config out!)
> > > > > 
> > > > > As a request from Ingo, it now enables IKCONFIG and will also use 
> > > > > various locations to find a config to base against.
> > > > 
> > > > hm, now 'make localyesconfig' done on a Fedora distro kernel 
> > > > produces something very close to an allyesconfig:
> > > > 
> > > >  -rw-rw-r-- 1 mingo mingo 91930 2009-04-30 20:03 .config
> > > >  aldebaran:~/linux/linux> grep =y .config | wc -l
> > > >  3398
> > > > 
> > > > is that expected?
> > > 
> > > What config did it use? If it uses an allyesconfig that was 
> > > already made then it will not disable anything.
> > 
> > i used a regular config - then i also tried an allnoconfig - but no 
> > change in the result, bloated .config.
> 
> Could you send me the config it used (it should print out which 
> one it used) and the output of lsmod. Then I can test it locally.

'make allnoconfig' plus the module list i sent in a previous mail:

aldebaran:~/linux/linux> lsmod
Module                  Size  Used by
sunrpc                253904  1 
ipv6                  349568  50 
cpufreq_ondemand       73248  0 
acpi_cpufreq           75408  0 
freq_table             70400  2 cpufreq_ondemand,acpi_cpufreq
dm_multipath           82256  0 
i2c_i801               75932  0 
i2c_core               87192  1 i2c_i801
serio_raw              71556  0 
pcspkr                 68352  0 
pata_jmicron           69504  0 
iTCO_wdt               78208  0 
shpchp                 99160  0 
iTCO_vendor_support    68868  1 iTCO_wdt
igb                   144412  0 
dca                    71976  1 igb
pata_acpi              70528  0 
ata_generic            71428  0 

	Ingo

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

end of thread, other threads:[~2009-05-06 12:16 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-30 18:50 [PATCH 0/7] kconfig: more featured minimum module configs Steven Rostedt
2009-04-30 18:50 ` [PATCH 1/7] kconfig: streamline_config.pl do not stop with no depends Steven Rostedt
2009-04-30 18:50 ` [PATCH 2/7] kconfig: do not warn about modules built in Steven Rostedt
2009-04-30 18:50 ` [PATCH 3/7] kconfig: enable CONFIG_IKCONFIG from streamline_config.pl Steven Rostedt
2009-04-30 21:51   ` Alan Jenkins
2009-04-30 21:51     ` Alan Jenkins
2009-04-30 22:53     ` Steven Rostedt
2009-04-30 22:53       ` Steven Rostedt
2009-04-30 18:50 ` [PATCH 4/7] kconfig: add check if end exists in extract-ikconfig Steven Rostedt
2009-04-30 18:50 ` [PATCH 5/7] kconfig: have extract-ikconfig read ELF files Steven Rostedt
2009-04-30 18:50 ` [PATCH 6/7] kconfig: keep config.gz around even if CONFIG_IKCONFIG_PROC is not set Steven Rostedt
2009-04-30 18:50 ` [PATCH 7/7] kconfig: search for a config to base the local(mod|yes)config on Steven Rostedt
2009-04-30 22:04   ` Alan Jenkins
2009-04-30 22:04     ` Alan Jenkins
2009-04-30 22:54     ` Steven Rostedt
2009-04-30 22:54       ` Steven Rostedt
2009-05-04 12:15   ` Andi Kleen
2009-05-04 12:28     ` Peter Zijlstra
2009-05-04 14:46       ` Steven Rostedt
2009-05-04 14:59       ` Andi Kleen
2009-04-30 19:10 ` [PATCH 0/7] kconfig: more featured minimum module configs Ingo Molnar
2009-04-30 22:55   ` Steven Rostedt
2009-05-01 12:01     ` Ingo Molnar
2009-05-01 23:27       ` Steven Rostedt
2009-05-06 12:15         ` Ingo Molnar

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.