Skip to content

Instantly share code, notes, and snippets.

@SebastianBoe
Created September 11, 2017 16:09
Show Gist options
  • Save SebastianBoe/23cca69b70a9a7f90000c50e37d1a888 to your computer and use it in GitHub Desktop.
Save SebastianBoe/23cca69b70a9a7f90000c50e37d1a888 to your computer and use it in GitHub Desktop.
cmake kconfig [OPTIONS..] [COMMAND] ...
Query or modify the current config.
Options:
-d --default=SOURCE[,SOURCE][...] # Determine how the default value is set. See below.
-p --tech=TECH # Determine what technology is used to prompt for user input. See below.
-a --auto=old|all # Automatically select the option's default value for old values or for all values
-A --update-autoconf # Update autoconf.h after updating current config
Commands:
list-new # List new options
list-current # List the current options and save them as defconfig
--default=current # Use the current config as the default [Default]
--default=kconfig # Use defaults set by Kconfig
--default=ARCH # Use defaults from the $ARCH supplied defconfig
--default=BOARD # Use defaults from the board's defconfig file
--default=CONF_FILE # Use defaults from the specified CONF_FILE's
--default=no # Use no for all defaults
--default=yes # Use yes for all defaults
--default=random # Use random values for all defaults
The --default option determines where the default value for an option is taken from. Multiple
sources can be specified as comma-seperated values. When an option is
set by multiple sources the last specified source has precedence. E.g.
--default=BOARD,CONF_FILE,current
will cause options set in the current config to override options set
in the board's defconfig.
When an option is not covered by any of the sources it is considered to be
a new option, and the kconfig default is used.
Meaning that
--default=current
is equivalent to
--default=kconfig,current
And
--default=current,kconfig
is equivalent to
--default=kconfig
When selecting options, any of these technologies can be used:
--tech=stdin # Use a line-oriented program to prompt the user [Default]
--tech=qt # Use a QT based front-end to prompt the user
--tech=gtk # Use a GTK based front-end to prompt the user
--tech=menu # Use a menu based program to prompt the user
--tech=ncurses # Use an ncurses based program to prompt the user
# Migration examples from Kbuild targets to the new cmake CLI
# (The CMake version will not require the app to be built with a bogus config first)
make && make config -> cmake kconfig --default=BOARD,CONF_FILE,current
make nconfig -> cmake kconfig --tech=ncurses
make menuconfig -> cmake kconfig --tech=menu
make xconfig -> cmake kconfig --tech=qt
[...]
make config -> cmake kconfig
make oldconfig -> cmake kconfig --auto=old
make silentoldconfig -> cmake kconfig --auto=old --update-autoconf
make olddefconfig -> cmake kconfig --auto=all --update-autoconf
make defconfig -> cmake kconfig --default=ARCH --auto=all
make allnoconfig -> cmake kconfig --default=no --auto=all
make alldefconfig -> cmake kconfig --default=kconfig --auto=all
make listnewconfig -> cmake kconfig list-new
make listnewconfig -> cmake kconfig list-current
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment