Warning, /frameworks/syntax-highlighting/autotests/folding/Kconfig.fold is written in an unsupported language. File is not indexed.

0001 This is wrong but should not crash ] ) } !
0002 
0003 # comment
0004 
0005 <beginfold id='1'>config</beginfold id='1'> BR2_PACKAGE_GAMMARAY
0006         bool "gammaray"
0007         depends on BR2_PACKAGE_QT5
0008         <beginfold id='2'>help</beginfold id='2'>
0009           GammaRay Qt introspection probe.
0010           second line of help, with correct indentation
0011 
0012           GammaRay Qt introspection probe.
0013           second line of help, with correct indentation
0014          <endfold id='2'></endfold id='2'>third line underindented and thus wrong
0015         default 'true'
0016 <endfold id='1'></endfold id='1'><beginfold id='1'>config</beginfold id='1'> W1_MASTER_GPIO_CUSTOM
0017         tristate "Custom GPIO-based W1 driver"
0018         depends on GENERIC_GPIO
0019         select W1_GPIOconfig AG71XX
0020         tristate "Atheros AR7XXX/AR9XXX built-in ethernet mac support"
0021         depends on ATH79
0022         imply HAS_TXX9_SERIAL
0023         def_bool LD_VERSION >= 225000000 || LD_IS_LLD
0024         select PHYLIB
0025         <beginfold id='2'>---help---</beginfold id='2'>
0026           If you wish to compile a kernel for AR7XXX/91XXX and enable
0027           ethernet support, then you should always answer Y to this.
0028 
0029 <endfold id='2'></endfold id='2'><endfold id='1'></endfold id='1'><beginfold id='3'>comment</beginfold id='3'> "module support disabled"
0030     depends on !MODULES
0031 
0032 <endfold id='3'></endfold id='3'><beginfold id='4'>menu</beginfold id='4'> myMenu
0033       depends on NET
0034 <beginfold id='1'>config</beginfold id='1'> NETDEVICES
0035         bool "Atheros AR71xx built-in ethernet driver debugging"
0036         def_bool ds
0037         default n
0038         <beginfold id='2'>help</beginfold id='2'>
0039           Atheros AR71xx built-in ethernet driver debugging messages.
0040 <endfold id='2'></endfold id='2'><endfold id='1'></endfold id='1'><endfold id='4'>endmenu</endfold id='4'>
0041 <beginfold id='5'>if</beginfold id='5'> TARGET_OX820
0042 
0043 <beginfold id='1'>config</beginfold id='1'> SYS_CPU
0044         default "arm1136"
0045 
0046 <endfold id='1'></endfold id='1'><endfold id='5'>endif</endfold id='5'>
0047 
0048 <beginfold id='5'>if</beginfold id='5'> AG71XX
0049 <beginfold id='1'>config</beginfold id='1'> AG71XX_DEBUG
0050         bool "Atheros AR71xx built-in ethernet driver debugging"
0051         default n
0052         <beginfold id='2'>help</beginfold id='2'>
0053           Atheros AR71xx built-in ethernet driver debugging messages.
0054 <endfold id='2'></endfold id='2'><endfold id='1'></endfold id='1'><endfold id='5'>endif</endfold id='5'>
0055 
0056 # comment
0057 
0058 <beginfold id='4'>menu</beginfold id='4'> "System setup"
0059 
0060 <beginfold id='6'>choice</beginfold id='6'>
0061         prompt "Alpha system type"
0062         default ALPHA_GENERIC
0063         string "bad"
0064         <beginfold id='2'>---help---</beginfold id='2'>
0065           This is the system type of your hardware.
0066 
0067         <endfold id='2'></endfold id='2'><beginfold id='1'>config</beginfold id='1'> HZ_32
0068                 bool "32 Hz"
0069         <endfold id='1'></endfold id='1'><beginfold id='1'>config</beginfold id='1'> HZ_64
0070                 bool "64 Hz"
0071 
0072 <endfold id='1'></endfold id='1'><beginfold id='1'>config</beginfold id='1'> ALPHA_GENERIC
0073         bool "Generic"
0074         depends on TTY
0075         select HAVE_EISA
0076         select GENERIC_BUG_RELATIVE_POINTERS if X86_64
0077         bool "64-bit kernel" if "$(SUBARCH)" = "x86"
0078         bool "Support the legacy \"mmu-masters\" devicetree bindings"
0079         depends on ARM_SMMU=y && OF
0080         <beginfold id='2'>help</beginfold id='2'>
0081           A generic kernel will run on all supported Alpha hardware.
0082 
0083 <endfold id='2'></endfold id='2'><endfold id='1'></endfold id='1'><endfold id='6'>endchoice</endfold id='6'>
0084 
0085 <beginfold id='1'>config</beginfold id='1'> VGA_HOSE
0086         bool
0087         def_bool y
0088         depends on VGA_CONSOLE && <beginfold id='7'>(</beginfold id='7'>ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL || ALPHA_TSUNAMI<endfold id='7'>)</endfold id='7'>
0089         default y
0090         default n
0091         default 3
0092         bool "Use WTINT" if ALPHA_SRM || ALPHA_GENERIC
0093         default y if ALPHA_QEMU
0094         default n if ALPHA_EV5 || ALPHA_EV56 || <beginfold id='7'>(</beginfold id='7'>ALPHA_EV4 && !ALPHA_LCA<endfold id='7'>)</endfold id='7'>
0095         default n if !ALPHA_SRM && !ALPHA_GENERIC
0096         default y if SMP
0097         default "y" if PPC_POWERNV
0098         range 2 32
0099         depends on SMP
0100         default "32" if ALPHA_GENERIC || ALPHA_MARVEL
0101         default '4' if !ALPHA_GENERIC && !ALPHA_MARVEL
0102         <beginfold id='2'>help</beginfold id='2'>
0103           Support VGA on an arbitrary hose; needed for several platforms
0104           which always have multiple hoses, and whose consoles support it.
0105 
0106 <endfold id='2'></endfold id='2'><endfold id='1'></endfold id='1'><endfold id='4'>endmenu</endfold id='4'>
0107 
0108 <beginfold id='4'>menu</beginfold id='4'> "ARC Architecture Configuration"
0109 
0110 <beginfold id='4'>menu</beginfold id='4'> "ARC Platform/SoC/Board"
0111 
0112 #New platform adds here
0113 source "arch/arc/plat-eznps/Kconfig"
0114 source 'arch/arc/plat-hsdk/Kconfig'
0115 
0116 <endfold id='4'>endmenu</endfold id='4'>
0117 
0118 <beginfold id='4'>menu</beginfold id='4'> "ARC CPU Configuration"
0119 
0120 <beginfold id='6'>choice</beginfold id='6'>
0121         prompt "ARC Core"
0122         default ARC_CPU_HS if ISA_ARCV2
0123         <beginfold id='2'>help</beginfold id='2'>
0124           bla bla
0125 
0126 <endfold id='2'></endfold id='2'><beginfold id='5'>if</beginfold id='5'> ISA_ARCOMPACT
0127 
0128 <beginfold id='1'>config</beginfold id='1'> ARC_CPU_750D
0129         bool "ARC750D"
0130         select ARC_CANT_LLSC
0131         <beginfold id='2'>help</beginfold id='2'>
0132           Support for ARC750 core
0133 
0134 <endfold id='2'></endfold id='2'><endfold id='1'></endfold id='1'><endfold id='5'>endif</endfold id='5'> #ISA_ARCOMPACT
0135 
0136 <endfold id='6'>endchoice</endfold id='6'>
0137 
0138 <beginfold id='5'>if</beginfold id='5'> SMP
0139 
0140 <beginfold id='1'>config</beginfold id='1'> NR_CPUS
0141         int "Maximum number of CPUs (2-4096)"
0142         range 2 4096
0143         default "4"
0144 
0145 <endfold id='1'></endfold id='1'><endfold id='5'>endif</endfold id='5'> #SMP
0146 
0147 <beginfold id='1'>config</beginfold id='1'> ARC_MMU_V4
0148         bool "MMU v4"
0149         depends on ISA_ARCV2
0150 
0151 <endfold id='1'></endfold id='1'><endfold id='4'>endmenu</endfold id='4'>   # "ARC CPU Configuration"
0152 
0153 <beginfold id='1'>menuconfig</beginfold id='1'> ARC_PLAT_EZNPS
0154         bool "\"EZchip\" ARC dev platform"
0155         depends on ISA_ARCOMPACT
0156         select CPU_BIG_ENDIAN
0157         select CLKSRC_NPS if !PHYS_ADDR_T_64BIT
0158         <beginfold id='2'>help</beginfold id='2'>
0159           Support for EZchip development platforms,
0160           based on ARC700 cores.
0161           We handle few flavors:
0162             - Hardware Emulator AKA HE which is FPGA based chassis
0163             - Simulator based on MetaWare nSIM
0164             - NPS400 chip based on ASIC
0165 
0166 <endfold id='2'></endfold id='2'># SPDX-License-Identifier: GPL-2.0-only
0167 <endfold id='1'></endfold id='1'><beginfold id='1'>config</beginfold id='1'> ARM64
0168         def_bool y
0169         select HAVE_DYNAMIC_FTRACE_WITH_REGS \
0170                 if $(cc-option,-fpatchable-function-entry=2)
0171         select HAVE_EFFICIENT_UNALIGNED_ACCESS
0172         <beginfold id='2'>help</beginfold id='2'>
0173           ARM 64-bit (AArch64) Linux support.
0174 
0175 <endfold id='2'></endfold id='2'><endfold id='1'></endfold id='1'><beginfold id='1'>config</beginfold id='1'> PHYS_OFFSET
0176         hex "Physical address of main memory" if MMU
0177         depends on !ARM_PATCH_PHYS_VIRT
0178         default DRAM_BASE if !MMU
0179         default 0x00000000 if ARCH_EBSA110 || \
0180                         ARCH_FOOTBRIDGE || \
0181                         ARCH_INTEGRATOR || \
0182                         ARCH_REALVIEW
0183         default 0x10000000 if ARCH_OMAP1 || ARCH_RPC
0184         default 0x20000000 if ARCH_S5PV210
0185         default 0xc0000000 if ARCH_SA1100
0186         <beginfold id='2'>help</beginfold id='2'>
0187           Please provide the physical address corresponding to the
0188           location of main memory in your system.
0189 
0190 <endfold id='2'></endfold id='2'><endfold id='1'></endfold id='1'><beginfold id='3'>comment</beginfold id='3'> "S3C2416 Boards"
0191 
0192 <endfold id='3'></endfold id='3'><beginfold id='1'>config</beginfold id='1'> KERNEL_RAM_BASE_ADDRESS
0193         hex "Virtual address of memory base"
0194         default 0xe0000000 if SOC_TMS320C6455
0195         default 0xe0000000 if SOC_TMS320C6457
0196 
0197 <endfold id='1'></endfold id='1'><beginfold id='1'>config</beginfold id='1'> CC_IS_GCC
0198         def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q gcc)
0199 
0200 <endfold id='1'></endfold id='1'>endif # error
0201 
0202 # next line caused hang, see https://phabricator.kde.org/D18509
0203 <beginfold id='4'>menu</beginfold id='4'>
0204 
0205 # the next lines should all be fine
0206 plain:=plain_value
0207          with_whitespace        :=       plain value whitespace
0208 value_with_expansion            := $(ARCH)
0209 plain_expansion_mix             := Linux/$(ARCH) $(KERNELVERSION) Kernel Configuration
0210 
0211 # function definition
0212 cc-option-bit                   = $(if-success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null,$(1))
0213 
0214 # function call
0215 $(cc-option-bit,-m64)
0216 
0217 # function call and storing the result
0218 m32-flag                        := $(cc-option-bit,-m32)
0219 
0220 # call to known function
0221 name                            := $(filename)
0222 
0223 # call to known function with arguments
0224 $(warning-if,y,hello world 1)
0225 
0226 # ... with nested expansions
0227 $(error-if,$(success, $(LD) -v | grep -q gold), gold linker '$(LD)' not supported)
0228 
0229 # expansion in different contexts
0230 <beginfold id='1'>config</beginfold id='1'> FOO_$(BAR$(BAZ))
0231         int "$(filename)"
0232         default $(lineno) if $(lineno) >= 5
0233 
0234 <endfold id='1'></endfold id='1'><beginfold id='4'>menu</beginfold id='4'> "A MENU"
0235 visible if 01 > 00
0236 
0237 <beginfold id='1'>config</beginfold id='1'> A_BOOL
0238         def_bool y && m || !!<beginfold id='7'>(</beginfold id='7'>!<beginfold id='7'>(</beginfold id='7'>!!n<endfold id='7'>)</endfold id='7'><endfold id='7'>)</endfold id='7'> || "$(foo)"
0239 
0240 <endfold id='1'></endfold id='1'><endfold id='4'>endmenu</endfold id='4'>
0241 
0242 # Advanced real world example taken from init/Kconfig in Linux 5.10:
0243 # Invoke the system shell /bin/sh with a command to pipe a C program with an
0244 # asm goto statement to the C compiler that is set by the environment. If the
0245 # exit code is 0 then set the default value of CC_HAS_ASM_GOTO_OUTPUT to y,
0246 # otherwise to n.
0247 <beginfold id='1'>config</beginfold id='1'> CC_HAS_ASM_GOTO_OUTPUT
0248         depends on CC_HAS_ASM_GOTO
0249         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)
0250 
0251 # Real world example with irregular indentation
0252 <endfold id='1'></endfold id='1'><beginfold id='1'>config</beginfold id='1'> W1_MASTER_DS2490
0253         tristate "DS2490 USB <-> W1 transport layer for 1-wire"
0254         depends on USB
0255         <beginfold id='2'>help</beginfold id='2'>
0256           Say Y here if you want to have a driver for DS2490 based USB <-> W1 bridges,
0257           for example DS9490*.
0258 
0259           This support is also available as a module.  If so, the module
0260           will be called ds2490.
0261 
0262 <endfold id='2'></endfold id='2'># synthetic example
0263 <endfold id='1'></endfold id='1'>to_upper=$(shell,echo $(1) | tr [:lower:] [:upper:])
0264 
0265 <beginfold id='1'>config</beginfold id='1'> ARGS_$(to_upper,$(CC))
0266         string "Arguments for the current compiler \"$(CC)\""
0267         <beginfold id='2'>help</beginfold id='2'>
0268           This is a bad idea.
0269           See <file:Documentation/completely/made-up.rst>
0270 
0271 <endfold id='2'></endfold id='2'># binary operator in expression of an if statement
0272 <endfold id='1'></endfold id='1'><beginfold id='5'>if</beginfold id='5'> CPU_SUPPORTS_CPUFREQ && MIPS_EXTERNAL_TIMER
0273 source "drivers/cpufreq/Kconfig"
0274 <endfold id='5'>endif</endfold id='5'>
0275 
0276 # alert on characters (here a colon) that are ignored (taken from axTLS 2.1.5)
0277 <beginfold id='1'>config</beginfold id='1'> CONFIG_LUA_CORE
0278     string "Location of Lua CORE"
0279     default "/usr/local"
0280     <beginfold id='2'>help</beginfold id='2'>:
0281         If the Lua exists on another directory then this needs to be changed
0282 
0283 <endfold id='2'></endfold id='2'><endfold id='1'></endfold id='1'><beginfold id='3'>comment</beginfold id='3'> "Comment texts know expansions, too: $(CC), and the depends property:"
0284         depends on A_BOOL
0285 
0286 # "boolean" is now a free variable name ...
0287 <endfold id='1'></endfold id='1'>boolean=foo
0288 # ... but it looks like a bad idea. This may be disputed.
0289 
0290 <beginfold id='1'>menuconfig</beginfold id='1'> MODULES
0291         bool "Enable loadable module support"
0292         modules
0293 
0294 # the three modern options
0295 <endfold id='1'></endfold id='1'><beginfold id='1'>config</beginfold id='1'> OPTIONS
0296         option allnoconfig_y
0297         option modules
0298         option defconfig_list
0299 
0300 # old option "env" and obsolete custom options
0301 <endfold id='1'></endfold id='1'><beginfold id='1'>config</beginfold id='1'> OPTIONS
0302         option env=ARCH
0303         option custom-without-argument
0304         option custom-with-argument=ABC
0305 
0306 # old syntax
0307 <endfold id='1'></endfold id='1'><beginfold id='4'>menu</beginfold id='4'> OLD_STYLE_PROMPT
0308 visible if CPU_SUPPORTS_CPUFREQ
0309 
0310 # busybox 1.31.1
0311 source libbb/Config.in
0312 
0313 # uClibc-ng-1.0.37
0314 <beginfold id='1'>config</beginfold id='1'> DESIRED_TARGET_ARCH
0315         string
0316         option env="ARCH"
0317 
0318 <endfold id='1'></endfold id='1'><beginfold id='1'>config</beginfold id='1'> OLD_HELP
0319         hex
0320         <beginfold id='2'>---help---</beginfold id='2'>
0321                 old help property
0322         <endfold id='2'></endfold id='2'>default 0x1CEC0FEE
0323 <endfold id='1'></endfold id='1'><endfold id='4'>endmenu</endfold id='4'>
0324 
0325 # a few errors
0326 allnoconfig_y
0327 bool
0328 def_bool
0329 def_tristate
0330 default
0331 defconfig_list
0332 depends
0333 endchoice
0334 endif
0335 help
0336 hex
0337 imply
0338 int
0339 mainmenu
0340 modules
0341 on
0342 option
0343 optional
0344 prompt
0345 range
0346 select
0347 string
0348 tristate
0349 visible
0350 
0351 <beginfold id='1'>config</beginfold id='1'> OK
0352     bool "still OK"
0353     <beginfold id='2'>help</beginfold id='2'>
0354         still OK
0355 <endfold id='2'></endfold id='2'>now=fail
0356 <endfold id='1'></endfold id='1'>andNow=OK