How to understand 'make oldconfig'?
dhylands at gmail.com
Fri Aug 26 02:01:04 EDT 2011
On Thu, Aug 25, 2011 at 9:32 AM, Parmenides <mobile.parmenides at gmail.com> wrote:
> I have tried to understand 'make oldconfig' command while
> configurating kernel. I do some experiments and get the following
> 1. When there is no a .config in /usr/src/linux,
> (1) If there is no a /boot/config-x.y.z, make will ask some
> questions and then produce a .config.
> (2) Otherwise, make will copy the /boot/config-x.y.z to
> My question: According to the messages generated by make, I get that
> both 'make defconfig' and 'make oldconfig' will gerenate .config based
> on 'i386_defconfig'. Why does 'make oldconfig' ask some questions,
> while 'make defconfig' does not?
Make defconfig takes the default configuration and copies it to .config.
Make oldconfog takes the .config and runs it through the rules of the
Kconfig files and produces a .config which is consistant with the
Kconfig rules. If there are CONFIG values which are missing, the make
oldconfig will ask for them.
Simialrly if some option CONFIG_FOO is dependant on CONFIG_BAR, and
CONFIG_BAR has been turned off, then make oldconfig will cause
CONFIG_FOO to be turned off as well.
> 2. When there is a .config in /usr/src/linux indeed, make do nothing
> but generate a copy of .config, namely .config.old.
If the .config is already consistant with the rules found in Kconfig,
then make oldconfig is essentially a no-op.
If you were to run make oldconfig, and then run make oldconfig a
second time, the second time won't cause any additional changes to be
> My question: According to Love, "After making changes to your
> configuration file, or when using an existing configuration file on a
> new kernel tree, you can validate and update the configuration: make
> oldconfig." But, whether I edit .config and make some changes or I
> copy an existing .config into /usr/src/linux, 'make oldconfig' seems
> do nothing. So, how can I understand 'make oldconfig' in this case?
If make oldconfig does nothing, it just means that the .config doesn't
have any inconsistencies in it.
Shuswap, BC, Canada
More information about the Kernelnewbies