| 1 |
mainmenu "Example Kconfig configuration" |
| 2 |
|
| 3 |
config MODULES |
| 4 |
bool "Enable loadable module support" |
| 5 |
option modules |
| 6 |
default y |
| 7 |
|
| 8 |
menu "Bool and tristate symbols" |
| 9 |
|
| 10 |
config BOOL |
| 11 |
bool "Bool symbol" |
| 12 |
default y |
| 13 |
|
| 14 |
config BOOL_DEP |
| 15 |
bool "Dependent bool symbol" |
| 16 |
depends on BOOL |
| 17 |
|
| 18 |
# Mix it up a bit with an 'if' instead of a 'depends on' |
| 19 |
if BOOL |
| 20 |
|
| 21 |
config TRI_DEP |
| 22 |
tristate "Dependent tristate symbol" |
| 23 |
select SELECTED_BY_TRI_DEP |
| 24 |
imply IMPLIED_BY_TRI_DEP |
| 25 |
|
| 26 |
endif |
| 27 |
|
| 28 |
config TWO_MENU_NODES |
| 29 |
bool "First prompt" |
| 30 |
depends on BOOL |
| 31 |
|
| 32 |
config TRI |
| 33 |
tristate "Tristate symbol" |
| 34 |
|
| 35 |
config TWO_MENU_NODES |
| 36 |
bool "Second prompt" |
| 37 |
|
| 38 |
comment "These are selected by TRI_DEP" |
| 39 |
|
| 40 |
config SELECTED_BY_TRI_DEP |
| 41 |
tristate "Tristate selected by TRI_DEP" |
| 42 |
|
| 43 |
config IMPLIED_BY_TRI_DEP |
| 44 |
tristate "Tristate implied by TRI_DEP" |
| 45 |
|
| 46 |
endmenu |
| 47 |
|
| 48 |
|
| 49 |
menu "String, int, and hex symbols" |
| 50 |
|
| 51 |
config STRING |
| 52 |
string "String symbol" |
| 53 |
default "foo" |
| 54 |
|
| 55 |
config INT |
| 56 |
int "Int symbol" |
| 57 |
default 747 |
| 58 |
|
| 59 |
config HEX |
| 60 |
hex "Hex symbol" |
| 61 |
default 0xABC |
| 62 |
|
| 63 |
endmenu |
| 64 |
|
| 65 |
|
| 66 |
menu "Various choices" |
| 67 |
|
| 68 |
choice BOOL_CHOICE |
| 69 |
bool "Bool choice" |
| 70 |
|
| 71 |
config BOOL_CHOICE_SYM_1 |
| 72 |
bool "Bool choice sym 1" |
| 73 |
|
| 74 |
config BOOL_CHOICE_SYM_2 |
| 75 |
bool "Bool choice sym 2" |
| 76 |
|
| 77 |
endchoice |
| 78 |
|
| 79 |
choice TRI_CHOICE |
| 80 |
tristate "Tristate choice" |
| 81 |
|
| 82 |
config TRI_CHOICE_SYM_1 |
| 83 |
tristate "Tristate choice sym 1" |
| 84 |
|
| 85 |
config TRI_CHOICE_SYM_2 |
| 86 |
tristate "Tristate choice sym 2" |
| 87 |
|
| 88 |
endchoice |
| 89 |
|
| 90 |
choice OPT_BOOL_CHOICE |
| 91 |
bool "Optional bool choice" |
| 92 |
optional |
| 93 |
|
| 94 |
config OPT_BOOL_CHOICE_SYM_1 |
| 95 |
bool "Optional bool choice sym 1" |
| 96 |
|
| 97 |
config OPT_BOOL_CHOICE_SYM_2 |
| 98 |
bool "Optional bool choice sym 2" |
| 99 |
|
| 100 |
endchoice |
| 101 |
|
| 102 |
endmenu |