Kconfig language preview
1. Kernel debug options
config definitions, attributes, and a help body
horizon-dark
config DEBUG_KERNEL
bool "Kernel debugging"
default n
help
Say Y here to enable kernel debugging.
This adds extra checks and may slow the
kernel down.
config LOG_LEVEL
int "Log level"
range 0 7
default 4
depends on DEBUG_KERNEL
atom-one-dark
config DEBUG_KERNEL
bool "Kernel debugging"
default n
help
Say Y here to enable kernel debugging.
This adds extra checks and may slow the
kernel down.
config LOG_LEVEL
int "Log level"
range 0 7
default 4
depends on DEBUG_KERNEL
github-dark
config DEBUG_KERNEL
bool "Kernel debugging"
default n
help
Say Y here to enable kernel debugging.
This adds extra checks and may slow the
kernel down.
config LOG_LEVEL
int "Log level"
range 0 7
default 4
depends on DEBUG_KERNEL
dracula
config DEBUG_KERNEL
bool "Kernel debugging"
default n
help
Say Y here to enable kernel debugging.
This adds extra checks and may slow the
kernel down.
config LOG_LEVEL
int "Log level"
range 0 7
default 4
depends on DEBUG_KERNEL
nord
config DEBUG_KERNEL
bool "Kernel debugging"
default n
help
Say Y here to enable kernel debugging.
This adds extra checks and may slow the
kernel down.
config LOG_LEVEL
int "Log level"
range 0 7
default 4
depends on DEBUG_KERNEL
github
config DEBUG_KERNEL
bool "Kernel debugging"
default n
help
Say Y here to enable kernel debugging.
This adds extra checks and may slow the
kernel down.
config LOG_LEVEL
int "Log level"
range 0 7
default 4
depends on DEBUG_KERNEL
2. Menus and choices
menu/endmenu and choice/endchoice blocks
horizon-dark
menu "Networking"
choice
prompt "Driver"
default DRIVER_A
config DRIVER_A
bool "Driver A"
config DRIVER_B
bool "Driver B"
endchoice
endmenu atom-one-dark
menu "Networking"
choice
prompt "Driver"
default DRIVER_A
config DRIVER_A
bool "Driver A"
config DRIVER_B
bool "Driver B"
endchoice
endmenu github-dark
menu "Networking"
choice
prompt "Driver"
default DRIVER_A
config DRIVER_A
bool "Driver A"
config DRIVER_B
bool "Driver B"
endchoice
endmenu dracula
menu "Networking"
choice
prompt "Driver"
default DRIVER_A
config DRIVER_A
bool "Driver A"
config DRIVER_B
bool "Driver B"
endchoice
endmenu nord
menu "Networking"
choice
prompt "Driver"
default DRIVER_A
config DRIVER_A
bool "Driver A"
config DRIVER_B
bool "Driver B"
endchoice
endmenu github
menu "Networking"
choice
prompt "Driver"
default DRIVER_A
config DRIVER_A
bool "Driver A"
config DRIVER_B
bool "Driver B"
endchoice
endmenu 3. Source and conditionals
source and if/endif blocks
horizon-dark
if NETWORKING
source "drivers/net/Kconfig"
endif atom-one-dark
if NETWORKING
source "drivers/net/Kconfig"
endif github-dark
if NETWORKING
source "drivers/net/Kconfig"
endif dracula
if NETWORKING
source "drivers/net/Kconfig"
endif nord
if NETWORKING
source "drivers/net/Kconfig"
endif github
if NETWORKING
source "drivers/net/Kconfig"
endif