lkml.org 
[lkml]   [2002]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to check the kernel compile options ?
Andries.Brouwer@cwi.nl wrote:

> > I would be surprised if there is anyone on this list
> > who has not lost at some point either the .config, the
> > ksyms, or something similar associated with at least
> > one build they've made.
>
> Sure. And people have lost their root filesystems due to "rm -rf /".
> That doesn't mean we build the entire (real) root filesystem into
> the kernel.
>
> -hpa
>
>Peter, in my eyes this is an unreasonable answer.
>
>For debugging and other purposes it is good to have some
>information. One may wish to know about a certain kernel image
>what Linux kernel version that was, with what patches, compiled
>with what options, by which compiler. Or one may want to know
>such things about the currently running kernel. Even user-space
>programs (like mount) may want to know (what NFS version? do we
>have CONFIG_JOLIET?).
>
>Today we supply a little of this information.
>For example, /proc/version supplies information on version
>and compiler and date. Why? One might as well keep this compiler
>info in a separate file. What a waste of unswappable kernel memory!
>
>You see - this is not a matter of absolutes.
>In the good old days, when an operating system had to fit in 4k
>and a device driver in 128 words, putting a 100-char text like
>the one found in /proc/version into the system would be ridiculous.
>Today nobody worries about a hundred bytes paid for some useful info.
>
>So, the question is: how useful is the information, and how expensive
>is it to store it. Consider the config options. How much space do they
>take? Typically 1-5 kB (compressed). If this is stored at the end of
>a kernel image file, and not loaded into memory, then the kernel memory
>cost is zero. If this is made part of the kernel itself, say accessible
>via /proc, then the cost is 1-5 kB.
>
>So, you should ponder whether it is worthwhile to pay this cost of zero,
>and ponder whether it is worthwhile to pay this cost of 5 kB.
>

I think it's insanely useful at times. Especially if you're doing
something like building an embedded box where you're building some of
your own drivers and making some kernel mods. And you've got a team of
5 or more people.

I've written a simple hack that puts .config in the proc filesystem.
I'll send it if you want. It bzip2 the .config file and then you can
bzcat /proc/kernconfig to see what your kernel was made with. It's not
a good general purpose solution but it worked for what I was doing.

Ian

--
Ian S. Nelson <nelcomp@attglobal.net> 303-666-0315
Nelson Computing of Boulder Colorado
Networking/Contracting/Custom Software/Linux Fast and Personal service



-
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/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.235 / U:23.824 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site