All of lore.kernel.org
 help / color / mirror / Atom feed
* How to understand 'make oldconfig'?
@ 2011-08-25 16:32 Parmenides
  2011-08-25 16:37 ` Mulyadi Santosa
  2011-08-26  6:01 ` Dave Hylands
  0 siblings, 2 replies; 6+ messages in thread
From: Parmenides @ 2011-08-25 16:32 UTC (permalink / raw)
  To: kernelnewbies

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?

2. When there is a .config in /usr/src/linux indeed, make do nothing
but generate a copy of .config, namely .config.old.

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?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to understand 'make oldconfig'?
  2011-08-25 16:32 How to understand 'make oldconfig'? Parmenides
@ 2011-08-25 16:37 ` Mulyadi Santosa
  2011-08-26  2:33   ` Parmenides
  2011-08-26  6:01 ` Dave Hylands
  1 sibling, 1 reply; 6+ messages in thread
From: Mulyadi Santosa @ 2011-08-25 16:37 UTC (permalink / raw)
  To: kernelnewbies

hi....

On Thu, Aug 25, 2011 at 23:32, Parmenides <mobile.parmenides@gmail.com> wrote:
> 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.

> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to understand 'make oldconfig'?
  2011-08-25 16:37 ` Mulyadi Santosa
@ 2011-08-26  2:33   ` Parmenides
  2011-08-26  3:39     ` Leonid V. Fedorenchik
  2011-08-26  4:17     ` Adrian Cornish
  0 siblings, 2 replies; 6+ messages in thread
From: Parmenides @ 2011-08-26  2:33 UTC (permalink / raw)
  To: kernelnewbies

>> 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.


2011/8/26 Mulyadi Santosa <mulyadi.santosa@gmail.com>:
> hi....
>
> On Thu, Aug 25, 2011 at 23:32, Parmenides <mobile.parmenides@gmail.com> wrote:
>> 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.
>
>> 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
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to understand 'make oldconfig'?
  2011-08-26  2:33   ` Parmenides
@ 2011-08-26  3:39     ` Leonid V. Fedorenchik
  2011-08-26  4:17     ` Adrian Cornish
  1 sibling, 0 replies; 6+ messages in thread
From: Leonid V. Fedorenchik @ 2011-08-26  3:39 UTC (permalink / raw)
  To: kernelnewbies

On Fri, 26 Aug 2011 10:33:40 +0800
Parmenides <mobile.parmenides@gmail.com> wrote:

> >> 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 <mulyadi.santosa@gmail.com>:
> > hi....
> >
> > On Thu, Aug 25, 2011 at 23:32, Parmenides <mobile.parmenides@gmail.com> wrote:
> >> 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.
> >
> >> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to understand 'make oldconfig'?
  2011-08-26  2:33   ` Parmenides
  2011-08-26  3:39     ` Leonid V. Fedorenchik
@ 2011-08-26  4:17     ` Adrian Cornish
  1 sibling, 0 replies; 6+ messages in thread
From: Adrian Cornish @ 2011-08-26  4:17 UTC (permalink / raw)
  To: kernelnewbies


>> 2. When there is a .config in /usr/src/linux indeed, make do nothing
>> but generate a copy of .config, namely .config.old.

This book took all the mystery out of building the kernel for me http://www.kroah.com/lkn/ and I happily bought it because he was kind enough to give it away for free

At my level - best kernel book ever - no more weird blank boot screens for some unknown reason when installing vanilla kernels.

He actually posts here to.


Adrian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to understand 'make oldconfig'?
  2011-08-25 16:32 How to understand 'make oldconfig'? Parmenides
  2011-08-25 16:37 ` Mulyadi Santosa
@ 2011-08-26  6:01 ` Dave Hylands
  1 sibling, 0 replies; 6+ messages in thread
From: Dave Hylands @ 2011-08-26  6:01 UTC (permalink / raw)
  To: kernelnewbies

Hi,

On Thu, Aug 25, 2011 at 9:32 AM, Parmenides <mobile.parmenides@gmail.com> wrote:
> 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?

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
made.

> 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.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-26  6:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25 16:32 How to understand 'make oldconfig'? Parmenides
2011-08-25 16:37 ` Mulyadi Santosa
2011-08-26  2:33   ` Parmenides
2011-08-26  3:39     ` Leonid V. Fedorenchik
2011-08-26  4:17     ` Adrian Cornish
2011-08-26  6:01 ` Dave Hylands

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.