Kernel .config file overwritten

Valdis.Kletnieks at Valdis.Kletnieks at
Sat May 25 14:03:22 EDT 2013

On Sat, 25 May 2013 15:52:59 +0530, "Lakshmipathi.G" said:
> --001a11c35022e81b2f04dd884d9b
> Content-Type: text/plain; charset=ISO-8859-1
> Thanks for the replies. I'll explore suggestions given by Rami and Valdis.
> In the mean time,I think I found the lines(linux-3.9.3/Makefile) creating
> overwriting the config file.
> # If .config is newer than include/config/auto.conf, someone tinkered
> # with it and forgot to run make oldconfig.
> # if auto.conf.cmd is missing then we are probably in a cleaned tree so
> # we execute the config step to be sure to catch updated Kconfig files
> include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
>        $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
> when I comment out above lines the config file was not overwritten.

Right.  Exactly,  Now think about *why* those lines are in the Makefile
in the first place - it's to deal with people doing exactly what you're
doing.  The problem is that if you hand-edit one line of the .config, it
doesn't in fact deal with *other* entries that need to be changed because
there's a 'depends on' or 'select' that isn't fulfilled.  And the fact that
your hand-edited entry got removed shows that you didn't get it right - it
got removed precisely *because* you didn't get all the depends correct.

The reason the kernel does this is because if you're *lucky*, the kernel
compile will simply fail with either a totally mystifying compile error
about an undeclared variable or a structure member that doesn't exist, or
when it tries to link vmlinux and it can't find a routine.

If you're *unlucky*, it will compile, boot, and then die, corrupting your
root filesystem as it goes.

So yeah.  Don't do that. ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : 

More information about the Kernelnewbies mailing list