0

Is it possible to resolve the dependencies of an option using Kconfig utility?

For instance, I have my .config and I would like to add an option CONFIG_FOO and its dependency automatically without using menuconfig.

Note that using make oldconfig does not work, it just gets rid of the additional option CONFIG_FOO I just added.

I know that there is a Python implementation of Kconfig : Kconfiglib but I have to do it in C.

I did read the C code and I have an overview of what is going on there but I just do not get where is dependency solving for an option.

artless noise
  • 21,212
  • 6
  • 68
  • 105
Ngahy Be
  • 545
  • 1
  • 4
  • 10
  • I'm not sure I understand what do you want and dependencies are not linear. FOO could depends on (BAR or (USB and SPAM)). How do you resolve this? If you have a specific driver, you can check direct dependencies easily (syntax is simple), but you cannot generalize. About Python and C: use the right tool for the task. Note: I asked 20 years ago to build reverse dependencies on Kernel (like we have in distributions), but it seems few people care (just professional configure kernels in a very controlled way) – Giacomo Catenazzi Mar 08 '21 at 13:08
  • Yes, it's possible, The approach has been developed first in terms of Yocto distribution and now can be used wider. See the python + shell scripts to merge configuration: http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/merge_config.sh. (@GiacomoCatenazzi JFYI) – 0andriy Mar 09 '21 at 17:26

0 Answers0