public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* make cloneconfig ?
@ 2008-04-23 22:37 devzero
  2008-04-23 22:43 ` Jesper Juhl
  0 siblings, 1 reply; 4+ messages in thread
From: devzero @ 2008-04-23 22:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: agruen

any reason why "make cloneconfig" never made it into mainline?

many people are quite used to it and every time i build vanilla kernel i step into that trap  "oh - that`s a suse`ism"

make cloneconfig exists since /proc/config.gz - but while that one went into mainline, cloneconfig never did.

anyone know the reason for that ?

i wished, distros kernels were more similar to vanilla kernels - so what about making them more similar ?




http://marc.info/?l=linux-kernel&m=93250171620331&w=2
List:       linux-kernel
Subject:    [patch] config.gz and make cloneconfig
From:       Oliver Xymoron <oxymoron () waste ! org>
Date:       1999-07-20 20:03:45
[Download message RAW]

Please consider the following patch against 2.3.10 which adds a config
option to store the kernel configuration in the kernel image and make it
available as a file in /proc. It also adds 'make cloneconfig' which will
duplicate your running kernel configuration.

Also worth noting is scripts/bin2c, which is meant to replace the poorly
named and poorly located bin2hex programs that are in various places.

diff -urN linux/Documentation/Configure.help linux-cfg/Documentation/Configure.help
--- linux/Documentation/Configure.help	Mon Jul  5 22:37:25 1999
+++ linux-cfg/Documentation/Configure.help	Tue Jul 20 13:35:21 1999
@@ -7464,6 +7464,14 @@
   This option will enlarge your kernel by about 18 KB. Several
   programs depend on this, so everyone should say Y here.
 
+/proc/config.gz support
+CONFIG_PROC_CONFIG
+  Say Y here if you want a copy of your current kernel configuration
+  saved in the kernel that you build. This is extremely useful if you
+  ever build more than one kernel. The cost is around 1K-4K of running
+  memory. Only say no if you really can't spare this. You can sneeze
+  and lose more on memory than this.
+
 NFS filesystem support
 CONFIG_NFS_FS
   If you are connected to some other (usually local) Unix computer
diff -urN linux/Documentation/patches/cfg linux-cfg/Documentation/patches/cfg
--- linux/Documentation/patches/cfg	Wed Dec 31 18:00:00 1969
+++ linux-cfg/Documentation/patches/cfg	Tue Jul 20 14:26:27 1999
@@ -0,0 +1,10 @@
+This patch adds /proc/config.gz and make cloneconfig
+
+Oliver Xymoron <oxymoron@waste.org> 
+
+Jan 15 1999 - original 2.0.0-pre version
+Jul 20 1999 - updated to 2.3.10
+
+Derived from a patch by Nicholas Leon <nicholas@binary9.net> with
+suggestions from Michael Chastain <mec@shout.net> and Peter T. Breuer
+<ptb@it.uc3m.es>
diff -urN linux/Makefile linux-cfg/Makefile
--- linux/Makefile	Thu Jul  1 12:54:31 1999
+++ linux-cfg/Makefile	Tue Jul 20 14:22:52 1999
@@ -243,6 +243,15 @@
 config: symlinks
 	$(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in
 
+cloneconfig: symlinks
+	@if [ -f "/proc/config.gz" ]; then \
+		mv -f .config .config.bak; \
+	    	gzip -d < /proc/config.gz > .config; \
+		$(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in; \
+	else \
+		echo "Sorry, your current kernel was built without cloning support."; \
+	fi
+

_______________________________________________________________
Schon gehört? Der neue WEB.DE MultiMessenger kann`s mit allen: 
http://www.produkte.web.de/messenger/?did=3016


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

* Re: make cloneconfig ?
  2008-04-23 22:37 devzero
@ 2008-04-23 22:43 ` Jesper Juhl
  2008-04-24  7:31   ` Jan Engelhardt
  0 siblings, 1 reply; 4+ messages in thread
From: Jesper Juhl @ 2008-04-23 22:43 UTC (permalink / raw)
  To: devzero@web.de; +Cc: linux-kernel, agruen

On 24/04/2008, devzero@web.de <devzero@web.de> wrote:
> any reason why "make cloneconfig" never made it into mainline?
>
>  many people are quite used to it and every time i build vanilla kernel i step into that trap  "oh - that`s a suse`ism"
>
>  make cloneconfig exists since /proc/config.gz - but while that one went into mainline, cloneconfig never did.
>
>  anyone know the reason for that ?
>
>  i wished, distros kernels were more similar to vanilla kernels - so what about making them more similar ?
>
>

Isn't "cloneconfig" basically just "zcat /proc/config.gz > .config &&
make oldconfig" ???   If so, why do we need yet another "make
<some_target>" Makefile rule? What would actually be gained?

-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

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

* Re: make cloneconfig ?
@ 2008-04-24  7:00 devzero
  0 siblings, 0 replies; 4+ messages in thread
From: devzero @ 2008-04-24  7:00 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: agruen, linux-kernel

> Isn't "cloneconfig" basically just "zcat /proc/config.gz > .config &&
> make oldconfig" ???  

yes (see below)

> If so, why do we need yet another "make
> <some_target>" Makefile rule? What would actually be gained?

ease of use and less confused users of suse-kernel based distro`s.
i have seen people giving hints for kernel compilation and telling "just do make cloneconfig" to non-suse users, just because they didn`t know, that this is suse specific.

ok, that`s not a real reason because you could argue that suse should drop it for more consistent end-user experience, but i think it`s much easier (and hassle free) to add it to mainline than drop it from suse. 

roland


List:       linux-kernel
Subject:    [kbuild 3/5] Add cloneconfig target
From:       Andreas Gruenbacher <agruen () suse ! de>
Date:       2005-01-18 18:41:23
Message-ID: 20050118192608.500213000.suse.de
[Download message RAW]

Cloneconfig takes the first configuration it finds which appears to
belong to the running kernel, and configures the kernel sources to match
this configuration as closely as possible.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>

Index: linux-2.6.11-rc1-bk6/scripts/kconfig/Makefile
===================================================================
--- linux-2.6.11-rc1-bk6.orig/scripts/kconfig/Makefile
+++ linux-2.6.11-rc1-bk6/scripts/kconfig/Makefile
@@ -37,6 +37,22 @@ allnoconfig: $(obj)/conf
 allmodconfig: $(obj)/conf
 	$< -m arch/$(ARCH)/Kconfig
 
+UNAME_RELEASE := $(shell uname -r)
+CLONECONFIG := $(firstword $(wildcard /proc/config.gz \
+				      /lib/modules/$(UNAME_RELEASE)/.config \
+				      /etc/kernel-config \
+				      /boot/config-$(UNAME_RELEASE)))
+cloneconfig: $(obj)/conf
+	$(Q)case "$(CLONECONFIG)" in				\
+	'')	echo -e "The configuration of the running"	\
+			"kernel could not be determined\n";	\
+		false ;;					\
+	*.gz)	gzip -cd $(CLONECONFIG) > .config.running ;;	\
+	*)	cat $(CLONECONFIG) > .config.running ;;		\
+	esac &&							\
+	echo -e "Cloning configuration file $(CLONECONFIG)\n"
+	$(Q)$< -D .config.running arch/$(ARCH)/Kconfig
+
 defconfig: $(obj)/conf
 ifeq ($(KBUILD_DEFCONFIG),)
 	$< -d arch/$(ARCH)/Kconfig

--
Andreas Gruenbacher <agruen@suse.de>
SUSE Labs, SUSE LINUX PRODUCTS GMBH



> -----Ursprüngliche Nachricht-----
> Von: "Jesper Juhl" <jesper.juhl@gmail.com>
> Gesendet: 24.04.08 00:43:56
> An: "devzero@web.de" <devzero@web.de>
> CC: linux-kernel@vger.kernel.org, agruen@suse.de
> Betreff: Re: make cloneconfig ?


> On 24/04/2008, devzero@web.de <devzero@web.de> wrote:
> > any reason why "make cloneconfig" never made it into mainline?
> >
> >  many people are quite used to it and every time i build vanilla kernel i step into that trap  "oh - that`s a suse`ism"
> >
> >  make cloneconfig exists since /proc/config.gz - but while that one went into mainline, cloneconfig never did.
> >
> >  anyone know the reason for that ?
> >
> >  i wished, distros kernels were more similar to vanilla kernels - so what about making them more similar ?
> >
> >
> 
> Isn't "cloneconfig" basically just "zcat /proc/config.gz > .config &&
> make oldconfig" ???   If so, why do we need yet another "make
> <some_target>" Makefile rule? What would actually be gained?
> 
> -- 
> Jesper Juhl <jesper.juhl@gmail.com>
> Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
> Plain text mails only, please      http://www.expita.com/nomime.html
> 


_______________________________________________________________
Schon gehört? Der neue WEB.DE MultiMessenger kann`s mit allen: 
http://www.produkte.web.de/messenger/?did=3016


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

* Re: make cloneconfig ?
  2008-04-23 22:43 ` Jesper Juhl
@ 2008-04-24  7:31   ` Jan Engelhardt
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Engelhardt @ 2008-04-24  7:31 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: devzero@web.de, linux-kernel, agruen


On Thursday 2008-04-24 00:43, Jesper Juhl wrote:
>> any reason why "make cloneconfig" never made it into mainline?
>>
>>  many people are quite used to it and every time i build vanilla kernel i step into that trap  "oh - that`s a suse`ism"
>>
>>  make cloneconfig exists since /proc/config.gz - but while that one went into mainline, cloneconfig never did.
>>
>>  anyone know the reason for that ?
>>
>>  i wished, distros kernels were more similar to vanilla kernels - so what about making them more similar ?
>>
>>
>
>Isn't "cloneconfig" basically just "zcat /proc/config.gz > .config &&
>make oldconfig" ???   If so, why do we need yet another "make
><some_target>" Makefile rule? What would actually be gained?

Not just that, it also searches /boot/config-... (a redhatism)
and /lib/modules/.../.config.
So it's not like it would be a suse-only shortcut.

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

end of thread, other threads:[~2008-04-24  7:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-24  7:00 make cloneconfig ? devzero
  -- strict thread matches above, loose matches on Subject: below --
2008-04-23 22:37 devzero
2008-04-23 22:43 ` Jesper Juhl
2008-04-24  7:31   ` Jan Engelhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox