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