Thread (6 messages) 6 messages, 5 authors, 2011-08-26

How to understand 'make oldconfig'?

From: Leonid V. Fedorenchik <hidden>
Date: 2011-08-26 03:39:30

On Fri, 26 Aug 2011 10:33:40 +0800
Parmenides [off-list ref] wrote:
quoted
quoted
2. When there is a .config in /usr/src/linux indeed, make do nothing
but generate a copy of .config, namely .config.old.
I don't understand.....
Other 'make XXXconfig' such as:

               make config
               make menuconfig
               make xconfig
               make defconfig

do some modification to the .config more or less. If 'make oldconfig'
have not ask some questions, then the .config does not changed. So, I
think the 'make oldconfig' does nothing.  I wonder what 'make
oldconfig' does.
AFAIK, 'make oldconfig' is used to update your old .config file to the newer
kernel. For exapmle, you have .config file of your current kernel and you
downloaded new kernel and want to build your new kernel. Since very likely new
kernel will have some new configuration options, you will need to update your
config. Easiest way to do this is to run 'make oldconfig' which will ask you
questions about new configuration options. (that is the ones your current
.config file doesn't have)

2011/8/26 Mulyadi Santosa [off-list ref]:
quoted
hi....

On Thu, Aug 25, 2011 at 23:32, Parmenides [off-list ref] wrote:
quoted
Hi,

? ?I have tried to understand 'make oldconfig' command while
configurating kernel. I do some experiments and get the following
ideas:

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
/usr/src/linux/.config.

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?
because "make defconfig" is simply generating a default pre configured
config file (it's based on i386_defconfig as you said).

make oldconfig asks something? quite likely because you tried to fetch
that config into newer kernel version. Thus, it asks your decision on
what to do on those new introduced options.
quoted
2. When there is a .config in /usr/src/linux indeed, make do nothing
but generate a copy of .config, namely .config.old.
I don't understand.....


--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Leonid V. Fedorenchik
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help