Kernel .config file overwritten
Hello - I wanted to compile my kernel from sources. I needed to add one line in .config file, because that option is not possible to change by 'make menuconfig'. But then when I start compilation, these lines are shown at startup: Code: scripts/kconfig/conf --silentoldconfig Kconfig # # configuration written to .config # and my .config is saved as .config.old file and new .config is created. How can I use my manually modified .config file? src: http://ubuntuforums.org/showthread.php?t=2087810 === I'm facing the same problem - anyone here know the solution ? -- ---- Cheers, Lakshmipathi.G FOSS Programmer. www.giis.co.in
Hi, Which option you cannot add ? You should be able to add any option with "menu config". In case it is something you added, than you should also add entry in a Kconfig file. Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Sat, May 25, 2013 at 7:46 AM, Lakshmipathi.G <lakshmipathi.g@gmail.com> wrote:
Hello -
I wanted to compile my kernel from sources. I needed to add one line in .config file, because that option is not possible to change by 'make menuconfig'.
But then when I start compilation, these lines are shown at startup:
Code: scripts/kconfig/conf --silentoldconfig Kconfig # # configuration written to .config # and my .config is saved as .config.old file and new .config is created.
How can I use my manually modified .config file?
src: http://ubuntuforums.org/showthread.php?t=2087810
=== I'm facing the same problem - anyone here know the solution ?
-- ---- Cheers, Lakshmipathi.G FOSS Programmer. www.giis.co.in
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Sat, 25 May 2013 10:16:47 +0530, "Lakshmipathi.G" said:
I wanted to compile my kernel from sources. I needed to add one line in .config file, because that option is not possible to change by 'make menuconfig'.
If menuconfig won't let you change it, there's several possibilities: 1) It's an "internal" config option that wsn't intended to be changed directly (it's all done via SELECT and friends). This is indicated in the Kconfig file by a lack of HELP text. If you're trying to change one of these, stop and ask yourself *why* - such variables almost *never* make sense to change by themselves - that's why they're inaccessible and choosing something that requires the services will do a SELECT of it to include it. You almost certainly intended to turn on something else and let that variable's SELECT turn on the hidden config variable. 2) You're missing a pre-requisite that needs to be on. Go find it and turn it on and try again. note that inside menuconfig, entering '/' and then (part of) a config variable name will show you what it depends on, and which menu it's in. 3) Simply editing the .config by hand is usually *not* a good idea unless you know exactly what you're doing. As you noticed, the kbuild system will do a 'make oldconfig' if you tried to do that - that is to make sure that any DEPENDS and SELECTS are re-driven.
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. -- ---- Cheers, Lakshmipathi.G FOSS Programmer. www.giis.co.in
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. ;)
participants (3)
-
Lakshmipathi.G -
Rami Rosen -
Valdis.Kletnieks@vt.edu