Skip to contentSkip to conversation

make cloneconfig ?

PATCH [email protected] 3 participants 3 messages Apr 23, 2008 – Apr 24, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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 - thats a suseism"

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.

Documentation/Configure.help +8 -0
diff -urN linux/Documentation/Configure.help linux-cfg/Documentation/Configure.help
@@ -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
Documentation/patches/cfg +10 -0
diff -urN linux/Documentation/patches/cfg linux-cfg/Documentation/patches/cfg
@@ -0,0 +1,10 @@
+This patch adds /proc/config.gz and make cloneconfig
+
+Oliver Xymoron <[email protected]> 
+
+Jan 15 1999 - original 2.0.0-pre version
+Jul 20 1999 - updated to 2.3.10
+
+Derived from a patch by Nicholas Leon <[email protected]> with
+suggestions from Michael Chastain <[email protected]> and Peter T. Breuer
+<[email protected]>
Makefile +9 -0
diff -urN linux/Makefile linux-cfg/Makefile
@@ -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

#1 lore raw
Quoted 11 lines · On 24/04/2008, [email protected] <[email protected]> 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 - thats a suseism"

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?

Signature · 3 lines
Jesper Juhl <[email protected]>
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
#2 lore raw
Quoted 8 lines · Jesper Juhl
Quoted 8 lines

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 - thats a suseism"

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

anyone know the reason for that ?

Quoted 7 lines
Quoted 3 lines

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.