summaryrefslogtreecommitdiff
path: root/examples/Kmenuconfig
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2017-11-09 11:43:13 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2017-11-09 11:43:13 +0100
commit395c2db0e9761def8eb992e3e8068ba2d3ab179c (patch)
tree7b14ac791dbf9d4b9354f1c6149444e090068309 /examples/Kmenuconfig
parent8c978ee0b9c0f7f8406f58d24478a73330512056 (diff)
parent4bffd653148d6fa1c8e626872ae4f445e2b0a24c (diff)
Make Kconfiglib 2 official
Merge in the 'kconfiglib-2-backup' branch.
Diffstat (limited to 'examples/Kmenuconfig')
-rw-r--r--examples/Kmenuconfig102
1 files changed, 102 insertions, 0 deletions
diff --git a/examples/Kmenuconfig b/examples/Kmenuconfig
new file mode 100644
index 0000000..f1cb67b
--- /dev/null
+++ b/examples/Kmenuconfig
@@ -0,0 +1,102 @@
+mainmenu "Example Kconfig configuration"
+
+config MODULES
+ bool "Enable loadable module support"
+ option modules
+ default y
+
+menu "Bool and tristate symbols"
+
+config BOOL
+ bool "Bool symbol"
+ default y
+
+config BOOL_DEP
+ bool "Dependent bool symbol"
+ depends on BOOL
+
+# Mix it up a bit with an 'if' instead of a 'depends on'
+if BOOL
+
+config TRI_DEP
+ tristate "Dependent tristate symbol"
+ select SELECTED_BY_TRI_DEP
+ imply IMPLIED_BY_TRI_DEP
+
+endif
+
+config TWO_MENU_NODES
+ bool "First prompt"
+ depends on BOOL
+
+config TRI
+ tristate "Tristate symbol"
+
+config TWO_MENU_NODES
+ bool "Second prompt"
+
+comment "These are selected by TRI_DEP"
+
+config SELECTED_BY_TRI_DEP
+ tristate "Tristate selected by TRI_DEP"
+
+config IMPLIED_BY_TRI_DEP
+ tristate "Tristate implied by TRI_DEP"
+
+endmenu
+
+
+menu "String, int, and hex symbols"
+
+config STRING
+ string "String symbol"
+ default "foo"
+
+config INT
+ int "Int symbol"
+ default 747
+
+config HEX
+ hex "Hex symbol"
+ default 0xABC
+
+endmenu
+
+
+menu "Various choices"
+
+choice BOOL_CHOICE
+ bool "Bool choice"
+
+config BOOL_CHOICE_SYM_1
+ bool "Bool choice sym 1"
+
+config BOOL_CHOICE_SYM_2
+ bool "Bool choice sym 2"
+
+endchoice
+
+choice TRI_CHOICE
+ tristate "Tristate choice"
+
+config TRI_CHOICE_SYM_1
+ tristate "Tristate choice sym 1"
+
+config TRI_CHOICE_SYM_2
+ tristate "Tristate choice sym 2"
+
+endchoice
+
+choice OPT_BOOL_CHOICE
+ bool "Optional bool choice"
+ optional
+
+config OPT_BOOL_CHOICE_SYM_1
+ bool "Optional bool choice sym 1"
+
+config OPT_BOOL_CHOICE_SYM_2
+ bool "Optional bool choice sym 2"
+
+endchoice
+
+endmenu