Re: How to check the kernel compile options ?

From: Randy.Dunlap (rddunlap@osdl.org)
Date: Wed Feb 13 2002 - 13:09:43 EST


On Wed, 13 Feb 2002, Richard B. Johnson wrote:

| On Wed, 13 Feb 2002, Horst von Brand wrote:
|
| > Daniel Phillips <phillips@bonn-fries.net> said:
| > > On February 12, 2002 05:38 pm, Bill Davidsen wrote:
| >
| > [...]
| [SNIPPED...]
|
| My idea is to take the .config file and remove most of its
| redundancy and unnecessary verbage. Then, the result is
| compressed and written to a constant global array, linked
| into the kernel. Both the array and the array length will then
| be available from /proc/kcore for user-mode tools to recreate the
| .config file.

This is a bit similar to what I did last weekend (and attach
here). Mine goes into the kernel boot file, however, so that
it can be read even when the kernel isn't running.

I'll experiment with ideas from Andreas (thanks) or Ian Soboroff
to create a userspace get-config tool.

One small nit: you say "user-mode tools", but /proc/kcore
is read-only for root only -- right?
That's not desirable or required IMO.

| Here are tools and a test/documentation script that shows it
| will work. The .config on my machine generates a 1730 byte
| array. This is certainly small enough to not be considered
| bloat.

Not a problem to me, although most people seem to want to see
it as a config option.
I plan to add that to what I've done...
and probably strip the leading "CONFIG_" strings.

| The advantage, of course is that if you are executing the kernel,
| it can give you all the information necessary to recreate a
| new one from the sources because its .config is embeded into
| itself. Once you have the ".config" file, you just do `make oldconfig`
| and you are home free.

-- 
~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 : Fri Feb 15 2002 - 21:00:56 EST