ulfalizer / Kconfiglib

A flexible Python 2/3 Kconfig implementation and library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can you add support for `menuconfig`

xelll opened this issue · comments

commented

hi, Kconfiglib is a awsome project, i really like it.
but i see it is not support menuconfig now,can you add it?

image
image

There's a menuconfig, and also a graphical guiconfig interface.

See this part of the README. The code is in menuconfig.py and guiconfig.py. If you install Kconfiglib via pip, the executables are called menuconfig and guiconfig.

Closing since there is a menuconfig already.

Might have to add it to the project you're using Kconfiglib with if it's missing there.

Cheers.

What @xelll want is not the menuconfig command which already exist, but the menuconfig keyword in Kconfig file, like Openwrt did just like the screenshot above.

If we enable this item a expand symbol ( ---> )will show up, and we can config the items in the menuconfig item,
so I think actually menuconfig = menu + bool config item, just the UI's difference for user (kbuild doc), so it's a new feature request~

Kconfig content maybe like this:

menuconfig ENABLE_COMPONENT1
    bool "enable component1"
    default n

     config COMPONENT1_CONF1
        bool "...."
        defaul y
     .
     .
     .

we can use this Kconfig instead now:

config ENABLE_COMPONENT1
    bool "enbale component 1"
   default n

menu "component1 config"
     config COMPONENT1_CONF1
        depends on ENABLE_COMPONENT1
        bool "...."
        defaul y

endmenu

The menuconfig keyword is supported as well, and is respected by menuconfig.py (and by guiconfig.py in single-menu mode). Are you running into any problems with it?

Here's some documentation I wrote for it by the way.

Note that menuconfig only makes a difference if the symbol is followed by other symbols (or other things) that depend on it. Kconfig doesn't look at indentation.