Re: How to check the kernel compile options ?

From: Randy.Dunlap (rddunlap@osdl.org)
Date: Fri Mar 01 2002 - 16:01:39 EST


On Tue, 26 Feb 2002, Andreas Ferber wrote:

| On Sat, Feb 23, 2002 at 08:02:24AM +0100, Andreas Ferber wrote:
|
| > At the moment I'm just writing a tool which does all parts in one turn
| > (using zlib), to make it faster and more robust (the script above may
| > fail for example if the kernel image has more than one block of gzip
| > compressed data embedded). (It's actually working already, but the
| > code needs some heavy cleanup before it can be released to the public
| > ;-) Come back in a few days for news...
|
| Here we go again. Attached to this mail you find the announced kernel
| config extractor. It is also available via HTTP:
|
| http://www.myipv6.de/patches/kconfig/dumpkconfig.c

Good!

and here's an alternative, which doesn't put .config in
/proc/ at all, although that's probably better for some
environments or people.

This patch (along with the attached 'binoffset.c' program, which
I didn't stick into linux/scripts/) gives one the option to
have the kernel .config file saved in the kernel image file
(as __initdata) and then use 'extract-ikconfig' to read it from
the kernel image file and re-use it.

Notes:

1. I didn't zip any of the text since kernel Makefiles (can) do that
on the entire image.

2. I haven't stripped the leading "CONFIG_" from .config lines.

3. I strip out (omit) all lines *except* those that begin with
"CONFIG_" or "# CONFIG_". Keeping the commented CONFIG_ lines
keeps make oldconfig happy. Otherwise one has to answer for all
unspecified CONFIGs, or use "yes n | make oldconfig" [which is
just as good IMHO, but some users might want to know about new
kernel config options].

4. The output file from 'extract-ikconfig' contains the CONFIG_
data in reversed order, but oldconfig doesn't care about this.

My test case (.config is around 25000 bytes) increased the
kernel bzImage file size by about 8 KB.

-- 
~Randy



- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 07 2002 - 21:00:20 EST