linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Reasons for oldconfig resetting config options to =m
@ 2019-04-21 15:11 Niklas Hambüchen
  2019-04-21 15:55 ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Niklas Hambüchen @ 2019-04-21 15:11 UTC (permalink / raw)
  To: lkml

When you set an option to `=y` but one of its dependencies is set to `=m`, then `make oldconfig` will reset it back to `=m` as well.

That makes sense, but does there exist a feature somewhere that can tell me explicitly when this happens, ideally with a reason like:

    Resetting CONFIG_USB_STORAGE from =y to =m
        because its dependency CONFIG_... is set to =m
        Consequently also resetting the following dependent options from =y to =m:
            CONFIG_USB_STORAGE_REALTEK
            CONFIG_USB_...

This would help tuning kernel configs in situations where menuconfig is not appropriate, for example when working with diffs of configs.

Is there such tooling, or what do people use?

Thanks,
Niklas

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

* Re: Reasons for oldconfig resetting config options to =m
  2019-04-21 15:11 Reasons for oldconfig resetting config options to =m Niklas Hambüchen
@ 2019-04-21 15:55 ` Randy Dunlap
  2019-04-21 16:47   ` Niklas Hambüchen
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2019-04-21 15:55 UTC (permalink / raw)
  To: Niklas Hambüchen, lkml

On 4/21/19 8:11 AM, Niklas Hambüchen wrote:
> When you set an option to `=y` but one of its dependencies is set to `=m`, then `make oldconfig` will reset it back to `=m` as well.
> 
> That makes sense, but does there exist a feature somewhere that can tell me explicitly when this happens, ideally with a reason like:
> 
>     Resetting CONFIG_USB_STORAGE from =y to =m
>         because its dependency CONFIG_... is set to =m
>         Consequently also resetting the following dependent options from =y to =m:
>             CONFIG_USB_STORAGE_REALTEK
>             CONFIG_USB_...
> 
> This would help tuning kernel configs in situations where menuconfig is not appropriate, for example when working with diffs of configs.
> 
> Is there such tooling, or what do people use?

When using 'make menuconfig', enter /usb_storage and it says:

  │ Symbol: USB_STORAGE [=m]                                                │  
  │ Type  : tristate                                                        │  
  │ Prompt: USB Mass Storage support                                        │  
  │   Location:                                                             │  
  │     -> Device Drivers                                                   │  
  │ (1)   -> USB support (USB_SUPPORT [=y])                                 │  
  │   Defined at drivers/usb/storage/Kconfig:9                              │  
  │   Depends on: USB_SUPPORT [=y] && USB [=m] && SCSI [=m]

so it is limited to m (or n) by USB and SCSI.

Or you can just find the symbol of interest and use Help to get the same info.

The same can be done with 'make nconfig'.

With 'make xconfig', if you click on "USB Mass Storage support" (e.g.), it shows
the same info.  Or you can use Ctrl+F (or Edit/Find), enter a symbol (or
a partial symbol name), like USB_STORAGE, which gives you a list of symbols.
Click on one of them and it will give you the same info.

HTH.  There is nothing quite as explicit as your example output.

-- 
~Randy

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

* Re: Reasons for oldconfig resetting config options to =m
  2019-04-21 15:55 ` Randy Dunlap
@ 2019-04-21 16:47   ` Niklas Hambüchen
  0 siblings, 0 replies; 3+ messages in thread
From: Niklas Hambüchen @ 2019-04-21 16:47 UTC (permalink / raw)
  To: Randy Dunlap, lkml

On 2019-04-21 17:55, Randy Dunlap wrote:
> When using 'make menuconfig', enter /usb_storage and it says:
> ...
>   │   Depends on: USB_SUPPORT [=y] && USB [=m] && SCSI [=m]
> 
> HTH.  There is nothing quite as explicit as your example output.

Hmm OK.

The menuconfig approach is what I've used so far manually, but it does not work so well for batch / CI use.

Thanks nevertheless for the detail explanation!

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

end of thread, other threads:[~2019-04-21 16:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-21 15:11 Reasons for oldconfig resetting config options to =m Niklas Hambüchen
2019-04-21 15:55 ` Randy Dunlap
2019-04-21 16:47   ` Niklas Hambüchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).