-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathKconfig
149 lines (104 loc) · 2.6 KB
/
Kconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
mainmenu "Kconfig demo"
comment "menuconfig"
menuconfig KCONFIG_DEMO_MENUCONFIG
bool "menuconfig"
if KCONFIG_DEMO_MENUCONFIG
config KCONFIG_DEMO_MENUCONFIG_CONFIG
bool "menuconfig config"
endif
comment "config"
config KCONFIG_DEMO_CONFIG
bool "config"
if KCONFIG_DEMO_CONFIG
config KCONFIG_DEMO_CONFIG_CONFIG
bool "config config"
endif
comment "menu"
menu "menu"
config KCONFIG_DEMO_MENU
bool
prompt "kconfig demo menu"
help
"I an help message"
endmenu
comment "choice"
choice
prompt "Kconfig demo choice"
config KCONFIG_DEMO_CHOICE_CONFIG
bool "choice config"
config KCONFIG_DEMO_CHOICE_CONFIG_1
bool "choice config 1"
endchoice
comment "depends on"
config KCONFIG_DEMO_DEPENDS_ON
bool "depends on"
config KCONFIG_DEMO_DEPENDS_ON_1
bool "depends on 1"
depends on KCONFIG_DEMO_DEPENDS_ON
config KCONFIG_DEMO_DEPENDS_ON_A
bool "A"
config KCONFIG_DEMO_DEPENDS_ON_B
bool "B"
config KCONFIG_DEMO_DEPENDS_ON_C
bool "C"
depends on KCONFIG_DEMO_DEPENDS_ON_A && KCONFIG_DEMO_DEPENDS_ON_B
help
"Depends on A and B"
config KCONFIG_DEMO_DEPENDS_ON_D
bool "D"
depends on KCONFIG_DEMO_DEPENDS_ON_A || KCONFIG_DEMO_DEPENDS_ON_B
default y if KCONFIG_DEMO_DEPENDS_ON_CON
help
"Depends on A or B"
config KCONFIG_DEMO_DEPENDS_ON_E
bool "E"
depends on !KCONFIG_DEMO_DEPENDS_ON_A
help
"Depends on not A"
comment "select"
config KCONFIG_DEMO_SELECT
bool "select"
select KCONFIG_DEMO_SELECT_1
config KCONFIG_DEMO_SELECT_1
bool "select 1"
config KCONFIG_DEMO_SELECT_AB
bool "select a && b visible"
config KCONFIG_DEMO_SELECT_DEPENDS
bool "select a && b depends"
menu "select A and B"
visible if KCONFIG_DEMO_SELECT_AB
depends on KCONFIG_DEMO_SELECT_DEPENDS
config KCONFIG_DEMO_SELECT_SA
bool "select A"
select KCONFIG_DEMO_SELECT_SB
select KCONFIG_DEMO_SELECT_SC
config KCONFIG_DEMO_SELECT_SB
bool "select B"
config KCONFIG_DEMO_SELECT_SC
bool "select C"
endmenu
comment "I am a comment in integer"
config KCONFIG_DEMO_INTEGER
int "int"
default 0
comment "I am a comment in string"
config KCONFIG_DEMO_STRING
string "string"
comment "I am a comment in hex"
config KCONFIG_DEMO_HEX
hex "hex"
default 0x0
comment "I am a comment in range"
config KCONFIG_DEMO_RANGE_INTEGER
int "range integer"
range 1 10
config KCONFIG_DEMO_RANGE_HEX
hex "range hex"
range 0xA 0xF
comment "comment depends on"
config KCONFIG_DEMO_COMMENT_DEPENDS
bool "comment depends on"
comment "comment depends on other comment"
depends on KCONFIG_DEMO_COMMENT_DEPENDS
comment "source other-dir/Kconfig"
source "other-dir/Kconfig"