Debian Codegraph @

autotests/input/Kconfig

raw
1 This is wrong but should not crash ] ) } !
2
3 # comment
4
5 config BR2_PACKAGE_GAMMARAY
6 bool "gammaray"
7 depends on BR2_PACKAGE_QT5
8 help
9 GammaRay Qt introspection probe.
10 second line of help, with correct indentation
11
12 GammaRay Qt introspection probe.
13 second line of help, with correct indentation
14 third line underindented and thus wrong
15 default 'true'
16 config W1_MASTER_GPIO_CUSTOM
17 tristate "Custom GPIO-based W1 driver"
18 depends on GENERIC_GPIO
19 select W1_GPIOconfig AG71XX
20 tristate "Atheros AR7XXX/AR9XXX built-in ethernet mac support"
21 depends on ATH79
22 imply HAS_TXX9_SERIAL
23 def_bool LD_VERSION >= 225000000 || LD_IS_LLD
24 select PHYLIB
25 ---help---
26 If you wish to compile a kernel for AR7XXX/91XXX and enable
27 ethernet support, then you should always answer Y to this.
28
29 comment "module support disabled"
30 depends on !MODULES
31
32 menu myMenu
33 depends on NET
34 config NETDEVICES
35 bool "Atheros AR71xx built-in ethernet driver debugging"
36 def_bool ds
37 default n
38 help
39 Atheros AR71xx built-in ethernet driver debugging messages.
40 endmenu
41 if TARGET_OX820
42
43 config SYS_CPU
44 default "arm1136"
45
46 endif
47
48 if AG71XX
49 config AG71XX_DEBUG
50 bool "Atheros AR71xx built-in ethernet driver debugging"
51 default n
52 help
53 Atheros AR71xx built-in ethernet driver debugging messages.
54 endif
55
56 # comment
57
58 menu "System setup"
59
60 choice
61 prompt "Alpha system type"
62 default ALPHA_GENERIC
63 string "bad"
64 ---help---
65 This is the system type of your hardware.
66
67 config HZ_32
68 bool "32 Hz"
69 config HZ_64
70 bool "64 Hz"
71
72 config ALPHA_GENERIC
73 bool "Generic"
74 depends on TTY
75 select HAVE_EISA
76 select GENERIC_BUG_RELATIVE_POINTERS if X86_64
77 bool "64-bit kernel" if "$(SUBARCH)" = "x86"
78 bool "Support the legacy \"mmu-masters\" devicetree bindings"
79 depends on ARM_SMMU=y && OF
80 help
81 A generic kernel will run on all supported Alpha hardware.
82
83 endchoice
84
85 config VGA_HOSE
86 bool
87 def_bool y
88 depends on VGA_CONSOLE && (ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL || ALPHA_TSUNAMI)
89 default y
90 default n
91 default 3
92 bool "Use WTINT" if ALPHA_SRM || ALPHA_GENERIC
93 default y if ALPHA_QEMU
94 default n if ALPHA_EV5 || ALPHA_EV56 || (ALPHA_EV4 && !ALPHA_LCA)
95 default n if !ALPHA_SRM && !ALPHA_GENERIC
96 default y if SMP
97 default "y" if PPC_POWERNV
98 range 2 32
99 depends on SMP
100 default "32" if ALPHA_GENERIC || ALPHA_MARVEL
101 default '4' if !ALPHA_GENERIC && !ALPHA_MARVEL
102 help
103 Support VGA on an arbitrary hose; needed for several platforms
104 which always have multiple hoses, and whose consoles support it.
105
106 endmenu
107
108 menu "ARC Architecture Configuration"
109
110 menu "ARC Platform/SoC/Board"
111
112 #New platform adds here
113 source "arch/arc/plat-eznps/Kconfig"
114 source 'arch/arc/plat-hsdk/Kconfig'
115
116 endmenu
117
118 menu "ARC CPU Configuration"
119
120 choice
121 prompt "ARC Core"
122 default ARC_CPU_HS if ISA_ARCV2
123 help
124 bla bla
125
126 if ISA_ARCOMPACT
127
128 config ARC_CPU_750D
129 bool "ARC750D"
130 select ARC_CANT_LLSC
131 help
132 Support for ARC750 core
133
134 endif #ISA_ARCOMPACT
135
136 endchoice
137
138 if SMP
139
140 config NR_CPUS
141 int "Maximum number of CPUs (2-4096)"
142 range 2 4096
143 default "4"
144
145 endif #SMP
146
147 config ARC_MMU_V4
148 bool "MMU v4"
149 depends on ISA_ARCV2
150
151 endmenu # "ARC CPU Configuration"
152
153 menuconfig ARC_PLAT_EZNPS
154 bool "\"EZchip\" ARC dev platform"
155 depends on ISA_ARCOMPACT
156 select CPU_BIG_ENDIAN
157 select CLKSRC_NPS if !PHYS_ADDR_T_64BIT
158 help
159 Support for EZchip development platforms,
160 based on ARC700 cores.
161 We handle few flavors:
162 - Hardware Emulator AKA HE which is FPGA based chassis
163 - Simulator based on MetaWare nSIM
164 - NPS400 chip based on ASIC
165
166 # SPDX-License-Identifier: GPL-2.0-only
167 config ARM64
168 def_bool y
169 select HAVE_DYNAMIC_FTRACE_WITH_REGS \
170 if $(cc-option,-fpatchable-function-entry=2)
171 select HAVE_EFFICIENT_UNALIGNED_ACCESS
172 help
173 ARM 64-bit (AArch64) Linux support.
174
175 config PHYS_OFFSET
176 hex "Physical address of main memory" if MMU
177 depends on !ARM_PATCH_PHYS_VIRT
178 default DRAM_BASE if !MMU
179 default 0x00000000 if ARCH_EBSA110 || \
180 ARCH_FOOTBRIDGE || \
181 ARCH_INTEGRATOR || \
182 ARCH_REALVIEW
183 default 0x10000000 if ARCH_OMAP1 || ARCH_RPC
184 default 0x20000000 if ARCH_S5PV210
185 default 0xc0000000 if ARCH_SA1100
186 help
187 Please provide the physical address corresponding to the
188 location of main memory in your system.
189
190 comment "S3C2416 Boards"
191
192 config KERNEL_RAM_BASE_ADDRESS
193 hex "Virtual address of memory base"
194 default 0xe0000000 if SOC_TMS320C6455
195 default 0xe0000000 if SOC_TMS320C6457
196
197 config CC_IS_GCC
198 def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q gcc)
199
200 endif # error
201
202 # next line caused hang, see https://phabricator.kde.org/D18509
203 menu
204
205 # the next lines should all be fine
206 plain:=plain_value
207 with_whitespace := plain value whitespace
208 value_with_expansion := $(ARCH)
209 plain_expansion_mix := Linux/$(ARCH) $(KERNELVERSION) Kernel Configuration
210
211 # function definition
212 cc-option-bit = $(if-success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null,$(1))
213
214 # function call
215 $(cc-option-bit,-m64)
216
217 # function call and storing the result
218 m32-flag := $(cc-option-bit,-m32)
219
220 # call to known function
221 name := $(filename)
222
223 # call to known function with arguments
224 $(warning-if,y,hello world 1)
225
226 # ... with nested expansions
227 $(error-if,$(success, $(LD) -v | grep -q gold), gold linker '$(LD)' not supported)
228
229 # expansion in different contexts
230 config FOO_$(BAR$(BAZ))
231 int "$(filename)"
232 default $(lineno) if $(lineno) >= 5
233
234 menu "A MENU"
235 visible if 01 > 00
236
237 config A_BOOL
238 def_bool y && m || !!(!(!!n)) || "$(foo)"
239
240 endmenu
241
242 # Advanced real world example taken from init/Kconfig in Linux 5.10:
243 # Invoke the system shell /bin/sh with a command to pipe a C program with an
244 # asm goto statement to the C compiler that is set by the environment. If the
245 # exit code is 0 then set the default value of CC_HAS_ASM_GOTO_OUTPUT to y,
246 # otherwise to n.
247 config CC_HAS_ASM_GOTO_OUTPUT
248 depends on CC_HAS_ASM_GOTO
249 def_bool $(success,echo 'int foo(int x) { asm goto ("": "=r"(x) ::: bar); return x; bar: return 0; }' | $(CC) -x c - -c -o /dev/null)
250
251 # Real world example with irregular indentation
252 config W1_MASTER_DS2490
253 tristate "DS2490 USB <-> W1 transport layer for 1-wire"
254 depends on USB
255 help
256 Say Y here if you want to have a driver for DS2490 based USB <-> W1 bridges,
257 for example DS9490*.
258
259 This support is also available as a module. If so, the module
260 will be called ds2490.
261
262 # synthetic example
263 to_upper=$(shell,echo $(1) | tr [:lower:] [:upper:])
264
265 config ARGS_$(to_upper,$(CC))
266 string "Arguments for the current compiler \"$(CC)\""
267 help
268 This is a bad idea.
269 See <file:Documentation/completely/made-up.rst>
270
271 # binary operator in expression of an if statement
272 if CPU_SUPPORTS_CPUFREQ && MIPS_EXTERNAL_TIMER
273 source "drivers/cpufreq/Kconfig"
274 endif
275
276 # alert on characters (here a colon) that are ignored (taken from axTLS 2.1.5)
277 config CONFIG_LUA_CORE
278 string "Location of Lua CORE"
279 default "/usr/local"
280 help:
281 If the Lua exists on another directory then this needs to be changed
282
283 comment "Comment texts know expansions, too: $(CC), and the depends property:"
284 depends on A_BOOL
285
286 # "boolean" is now a free variable name ...
287 boolean=foo
288 # ... but it looks like a bad idea. This may be disputed.
289
290 menuconfig MODULES
291 bool "Enable loadable module support"
292 modules
293
294 # the three modern options
295 config OPTIONS
296 option allnoconfig_y
297 option modules
298 option defconfig_list
299
300 # old option "env" and obsolete custom options
301 config OPTIONS
302 option env=ARCH
303 option custom-without-argument
304 option custom-with-argument=ABC
305
306 # old syntax
307 menu OLD_STYLE_PROMPT
308 visible if CPU_SUPPORTS_CPUFREQ
309
310 # busybox 1.31.1
311 source libbb/Config.in
312
313 # uClibc-ng-1.0.37
314 config DESIRED_TARGET_ARCH
315 string
316 option env="ARCH"
317
318 config OLD_HELP
319 hex
320 ---help---
321 old help property
322 default 0x1CEC0FEE
323 endmenu
324
325 # a few errors
326 allnoconfig_y
327 bool
328 def_bool
329 def_tristate
330 default
331 defconfig_list
332 depends
333 endchoice
334 endif
335 help
336 hex
337 imply
338 int
339 mainmenu
340 modules
341 on
342 option
343 optional
344 prompt
345 range
346 select
347 string
348 tristate
349 visible
350
351 config OK
352 bool "still OK"
353 help
354 still OK
355 now=fail
356 andNow=OK