.config file and extract

Mike (mwester) mwester at dls.net
Wed Nov 12 15:52:51 CET 2008

Andy Green wrote:
> Hash: SHA1
> Somebody in the thread at some point said:
> | Niklas Johansson wrote:
> |> Hey,
> |>
> |> I am having some troubles getting a good .config file for the kernel.
> |>
> |> Is there anyway to extract the .config file from an existing kernel
> |> (something like scripts/extract-ikconfig)
> |
> | /proc/config.gz is a compressed copy of the config.  It should be
> | present on any self-respecting kernel. :)
> Fedora doesn't have it... their packaging system drops a copy of the
> .config in /boot instead.  One has to be careful about having excessive
> self-respect :-)

Yes... well... I'm a Fedora user myself, but I won't go so far as to use
them as the "definitive standard" for kernels! ;-)

> Likewise, we provide the packaging config for stable with our git tree
> as Sander points out.  If there's any deviation from that in actual
> packaging, I am sure Mickey will provide patches...

All distros should enable the kernel option to have the config stored in
/proc/config.gz, at least until the kernel can be considered "completely
stable" -- it's painless, and costs only a couple of kbytes of space.

Mickey has it enabled in the FSO distro; it's enabled in all kernels I
build.  I believe the Om 2008.x kernel does not provide this -- not sure
who has to do the update of the defconfig to fix that one.

(The fundamental problem is that it is far from simple to find the
actual defconfig used to build a kernel, given the way the kernel is
built in OE at present; I've attempted to find that definitive defconfig
by grepping and diffing everything I could think of in OE.  But in the
end, I could find nothing that wasn't significantly different from the
".config" that was actually used by the time the kernel was built.  I am
led to the conclusion that the only definitive way for one to know what
the defconfig was for a given OE-built kernel is to read it from
/proc/config.gz.  I would be happy for someone who knows this black
magic part of OE better to instruct me otherwise.)

Mike (mwester)

More information about the devel mailing list