Atlas - Kmenuconfig
Home / ext / kconfiglib / examples Lines: 1 | Size: 1536 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1mainmenu "Example Kconfig configuration" 2 3config MODULES 4 bool "Enable loadable module support" 5 option modules 6 default y 7 8menu "Bool and tristate symbols" 9 10config BOOL 11 bool "Bool symbol" 12 default y 13 14config 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' 19if BOOL 20 21config TRI_DEP 22 tristate "Dependent tristate symbol" 23 select SELECTED_BY_TRI_DEP 24 imply IMPLIED_BY_TRI_DEP 25 26endif 27 28config TWO_MENU_NODES 29 bool "First prompt" 30 depends on BOOL 31 32config TRI 33 tristate "Tristate symbol" 34 35config TWO_MENU_NODES 36 bool "Second prompt" 37 38comment "These are selected by TRI_DEP" 39 40config SELECTED_BY_TRI_DEP 41 tristate "Tristate selected by TRI_DEP" 42 43config IMPLIED_BY_TRI_DEP 44 tristate "Tristate implied by TRI_DEP" 45 46endmenu 47 48 49menu "String, int, and hex symbols" 50 51config STRING 52 string "String symbol" 53 default "foo" 54 55config INT 56 int "Int symbol" 57 default 747 58 59config HEX 60 hex "Hex symbol" 61 default 0xABC 62 63endmenu 64 65 66menu "Various choices" 67 68choice BOOL_CHOICE 69 bool "Bool choice" 70 71config BOOL_CHOICE_SYM_1 72 bool "Bool choice sym 1" 73 74config BOOL_CHOICE_SYM_2 75 bool "Bool choice sym 2" 76 77endchoice 78 79choice TRI_CHOICE 80 tristate "Tristate choice" 81 82config TRI_CHOICE_SYM_1 83 tristate "Tristate choice sym 1" 84 85config TRI_CHOICE_SYM_2 86 tristate "Tristate choice sym 2" 87 88endchoice 89 90choice OPT_BOOL_CHOICE 91 bool "Optional bool choice" 92 optional 93 94config OPT_BOOL_CHOICE_SYM_1 95 bool "Optional bool choice sym 1" 96 97config OPT_BOOL_CHOICE_SYM_2 98 bool "Optional bool choice sym 2" 99 100endchoice 101 102endmenu 103[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.