diff --git a/Tmain/extras-long.d/stdout-expected.txt b/Tmain/extras-long.d/stdout-expected.txt
index 2912dcfdf1..8e01fc959d 100644
--- a/Tmain/extras-long.d/stdout-expected.txt
+++ b/Tmain/extras-long.d/stdout-expected.txt
@@ -7,6 +7,7 @@ p pseudo no NONE no Include pseudo tags
q qualified no NONE no Include an extra class-qualified tag entry for each tag
r reference no NONE no Include reference tags
s subparser yes NONE no Include tags generated by subparsers
+- configPrefixed yes Kconfig no prepend CONFIG_ to config names
- funcmap yes QemuHX no Include mapping SQMP to C function name
- whitespaceSwapped yes Robot no Include tags swapping whitespace and underscore chars
# enabling 1
@@ -18,6 +19,7 @@ p pseudo yes NONE no Include pseudo tags
q qualified no NONE no Include an extra class-qualified tag entry for each tag
r reference no NONE no Include reference tags
s subparser yes NONE no Include tags generated by subparsers
+- configPrefixed yes Kconfig no prepend CONFIG_ to config names
- funcmap yes QemuHX no Include mapping SQMP to C function name
- whitespaceSwapped yes Robot no Include tags swapping whitespace and underscore chars
# disabling 1
@@ -29,6 +31,7 @@ p pseudo yes NONE no Include pseudo tags
q qualified no NONE no Include an extra class-qualified tag entry for each tag
r reference no NONE no Include reference tags
s subparser yes NONE no Include tags generated by subparsers
+- configPrefixed yes Kconfig no prepend CONFIG_ to config names
- funcmap yes QemuHX no Include mapping SQMP to C function name
- whitespaceSwapped yes Robot no Include tags swapping whitespace and underscore chars
# combination
@@ -40,6 +43,7 @@ p pseudo yes NONE no Include pseudo tags
q qualified no NONE no Include an extra class-qualified tag entry for each tag
r reference yes NONE no Include reference tags
s subparser yes NONE no Include tags generated by subparsers
+- configPrefixed yes Kconfig no prepend CONFIG_ to config names
- funcmap yes QemuHX no Include mapping SQMP to C function name
- whitespaceSwapped yes Robot no Include tags swapping whitespace and underscore chars
# combination with letters
@@ -51,5 +55,6 @@ p pseudo yes NONE no Include pseudo tags
q qualified yes NONE no Include an extra class-qualified tag entry for each tag
r reference yes NONE no Include reference tags
s subparser yes NONE no Include tags generated by subparsers
+- configPrefixed yes Kconfig no prepend CONFIG_ to config names
- funcmap yes QemuHX no Include mapping SQMP to C function name
- whitespaceSwapped yes Robot no Include tags swapping whitespace and underscore chars
diff --git a/Tmain/list-extras.d/stdout-expected.txt b/Tmain/list-extras.d/stdout-expected.txt
index fcbcf13ac1..c0a6960c4b 100644
--- a/Tmain/list-extras.d/stdout-expected.txt
+++ b/Tmain/list-extras.d/stdout-expected.txt
@@ -7,6 +7,7 @@ p pseudo yes NONE no Include pseudo tags
q qualified yes NONE no Include an extra class-qualified tag entry for each tag
r reference yes NONE no Include reference tags
s subparser yes NONE no Include tags generated by subparsers
+- configPrefixed yes Kconfig no prepend CONFIG_ to config names
- funcmap yes QemuHX no Include mapping SQMP to C function name
- whitespaceSwapped yes Robot no Include tags swapping whitespace and underscore chars
#LETTER NAME ENABLED LANGUAGE FIXED DESCRIPTION
@@ -18,5 +19,6 @@ p pseudo yes NONE no Include pseudo tags
q qualified yes NONE no Include an extra class-qualified tag entry for each tag
r reference yes NONE no Include reference tags
s subparser yes NONE no Include tags generated by subparsers
+- configPrefixed yes Kconfig no prepend CONFIG_ to config names
- funcmap yes QemuHX no Include mapping SQMP to C function name
- whitespaceSwapped yes Robot no Include tags swapping whitespace and underscore chars
diff --git a/Tmain/list-roles.d/stdout-expected.txt b/Tmain/list-roles.d/stdout-expected.txt
index d66cabf51e..406fb15348 100644
--- a/Tmain/list-roles.d/stdout-expected.txt
+++ b/Tmain/list-roles.d/stdout-expected.txt
@@ -40,6 +40,7 @@ HTML C/stylesheet extFile on referenced as extern
HTML J/script extFile on referenced as external files
HTML c/class attribute on assigned as attributes
Java p/package imported on imported package
+Kconfig k/kconfig source on kconfig file loaded with source directive
LdScript i/inputSection discarded on discarded when linking
LdScript i/inputSection mapped on mapped to output section
LdScript s/symbol entrypoint on entry points
@@ -122,6 +123,7 @@ HTML C/stylesheet extFile on referenced as extern
HTML J/script extFile on referenced as external files
HTML c/class attribute on assigned as attributes
Java p/package imported on imported package
+Kconfig k/kconfig source on kconfig file loaded with source directive
LdScript i/inputSection discarded on discarded when linking
LdScript i/inputSection mapped on mapped to output section
LdScript s/symbol entrypoint on entry points
diff --git a/Units/simple-kconfig.d/args.ctags b/Units/simple-kconfig.d/args.ctags
new file mode 100644
index 0000000000..de0a73f9e0
--- /dev/null
+++ b/Units/simple-kconfig.d/args.ctags
@@ -0,0 +1,4 @@
+--map-Kconfig=.kconfig
+--extras=+r
+--fields=+r
+--sort=no
diff --git a/Units/simple-kconfig.d/expected.tags b/Units/simple-kconfig.d/expected.tags
new file mode 100644
index 0000000000..f82f6564a4
--- /dev/null
+++ b/Units/simple-kconfig.d/expected.tags
@@ -0,0 +1,163 @@
+Linux/$(ARCH) $(KERNELVERSION) Kernel Configuration input.kconfig /^mainmenu "Linux\/$(ARCH) $(KERNELVERSION) Kernel Configuration"$/;" M roles:def
+scripts/Kconfig.include input.kconfig /^source "scripts\/Kconfig.include"$/;" k roles:source
+init/Kconfig input.kconfig /^source "init\/Kconfig"$/;" k roles:source
+kernel/Kconfig.freezer input.kconfig /^source "kernel\/Kconfig.freezer"$/;" k roles:source
+fs/Kconfig.binfmt input.kconfig /^source "fs\/Kconfig.binfmt"$/;" k roles:source
+mm/Kconfig input.kconfig /^source "mm\/Kconfig"$/;" k roles:source
+net/Kconfig input.kconfig /^source "net\/Kconfig"$/;" k roles:source
+drivers/Kconfig input.kconfig /^source "drivers\/Kconfig"$/;" k roles:source
+fs/Kconfig input.kconfig /^source "fs\/Kconfig"$/;" k roles:source
+security/Kconfig input.kconfig /^source "security\/Kconfig"$/;" k roles:source
+crypto/Kconfig input.kconfig /^source "crypto\/Kconfig"$/;" k roles:source
+lib/Kconfig input.kconfig /^source "lib\/Kconfig"$/;" k roles:source
+lib/Kconfig.debug input.kconfig /^source "lib\/Kconfig.debug"$/;" k roles:source
+Documentation/Kconfig input.kconfig /^source "Documentation\/Kconfig"$/;" k roles:source
+JFFS2_FS input-1.kconfig /^config JFFS2_FS$/;" c roles:def
+CONFIG_JFFS2_FS input-1.kconfig /^config JFFS2_FS$/;" c roles:def
+JFFS2_FS_DEBUG input-1.kconfig /^config JFFS2_FS_DEBUG$/;" c roles:def
+CONFIG_JFFS2_FS_DEBUG input-1.kconfig /^config JFFS2_FS_DEBUG$/;" c roles:def
+JFFS2_FS_WRITEBUFFER input-1.kconfig /^config JFFS2_FS_WRITEBUFFER$/;" c roles:def
+CONFIG_JFFS2_FS_WRITEBUFFER input-1.kconfig /^config JFFS2_FS_WRITEBUFFER$/;" c roles:def
+JFFS2_FS_WBUF_VERIFY input-1.kconfig /^config JFFS2_FS_WBUF_VERIFY$/;" c roles:def
+CONFIG_JFFS2_FS_WBUF_VERIFY input-1.kconfig /^config JFFS2_FS_WBUF_VERIFY$/;" c roles:def
+JFFS2_SUMMARY input-1.kconfig /^config JFFS2_SUMMARY$/;" c roles:def
+CONFIG_JFFS2_SUMMARY input-1.kconfig /^config JFFS2_SUMMARY$/;" c roles:def
+JFFS2_FS_XATTR input-1.kconfig /^config JFFS2_FS_XATTR$/;" c roles:def
+CONFIG_JFFS2_FS_XATTR input-1.kconfig /^config JFFS2_FS_XATTR$/;" c roles:def
+JFFS2_FS_POSIX_ACL input-1.kconfig /^config JFFS2_FS_POSIX_ACL$/;" c roles:def
+CONFIG_JFFS2_FS_POSIX_ACL input-1.kconfig /^config JFFS2_FS_POSIX_ACL$/;" c roles:def
+JFFS2_FS_SECURITY input-1.kconfig /^config JFFS2_FS_SECURITY$/;" c roles:def
+CONFIG_JFFS2_FS_SECURITY input-1.kconfig /^config JFFS2_FS_SECURITY$/;" c roles:def
+JFFS2_COMPRESSION_OPTIONS input-1.kconfig /^config JFFS2_COMPRESSION_OPTIONS$/;" c roles:def
+CONFIG_JFFS2_COMPRESSION_OPTIONS input-1.kconfig /^config JFFS2_COMPRESSION_OPTIONS$/;" c roles:def
+JFFS2_ZLIB input-1.kconfig /^config JFFS2_ZLIB$/;" c roles:def
+CONFIG_JFFS2_ZLIB input-1.kconfig /^config JFFS2_ZLIB$/;" c roles:def
+JFFS2_LZO input-1.kconfig /^config JFFS2_LZO$/;" c roles:def
+CONFIG_JFFS2_LZO input-1.kconfig /^config JFFS2_LZO$/;" c roles:def
+JFFS2_RTIME input-1.kconfig /^config JFFS2_RTIME$/;" c roles:def
+CONFIG_JFFS2_RTIME input-1.kconfig /^config JFFS2_RTIME$/;" c roles:def
+JFFS2_RUBIN input-1.kconfig /^config JFFS2_RUBIN$/;" c roles:def
+CONFIG_JFFS2_RUBIN input-1.kconfig /^config JFFS2_RUBIN$/;" c roles:def
+choice29ffa23a0104 input-1.kconfig /^choice$/;" C roles:def
+JFFS2_CMODE_NONE input-1.kconfig /^config JFFS2_CMODE_NONE$/;" c choice:choice29ffa23a0104 roles:def
+CONFIG_JFFS2_CMODE_NONE input-1.kconfig /^config JFFS2_CMODE_NONE$/;" c choice:choice29ffa23a0104 roles:def
+JFFS2_CMODE_PRIORITY input-1.kconfig /^config JFFS2_CMODE_PRIORITY$/;" c choice:choice29ffa23a0104 roles:def
+CONFIG_JFFS2_CMODE_PRIORITY input-1.kconfig /^config JFFS2_CMODE_PRIORITY$/;" c choice:choice29ffa23a0104 roles:def
+JFFS2_CMODE_SIZE input-1.kconfig /^config JFFS2_CMODE_SIZE$/;" c choice:choice29ffa23a0104 roles:def
+CONFIG_JFFS2_CMODE_SIZE input-1.kconfig /^config JFFS2_CMODE_SIZE$/;" c choice:choice29ffa23a0104 roles:def
+JFFS2_CMODE_FAVOURLZO input-1.kconfig /^config JFFS2_CMODE_FAVOURLZO$/;" c choice:choice29ffa23a0104 roles:def
+CONFIG_JFFS2_CMODE_FAVOURLZO input-1.kconfig /^config JFFS2_CMODE_FAVOURLZO$/;" c choice:choice29ffa23a0104 roles:def
+HAVE_ARCH_KGDB input-2.kconfig /^config HAVE_ARCH_KGDB$/;" c roles:def
+CONFIG_HAVE_ARCH_KGDB input-2.kconfig /^config HAVE_ARCH_KGDB$/;" c roles:def
+KGDB input-2.kconfig /^menuconfig KGDB$/;" c roles:def
+CONFIG_KGDB input-2.kconfig /^menuconfig KGDB$/;" c roles:def
+KGDB_SERIAL_CONSOLE input-2.kconfig /^config KGDB_SERIAL_CONSOLE$/;" c roles:def
+CONFIG_KGDB_SERIAL_CONSOLE input-2.kconfig /^config KGDB_SERIAL_CONSOLE$/;" c roles:def
+KGDB_TESTS input-2.kconfig /^config KGDB_TESTS$/;" c roles:def
+CONFIG_KGDB_TESTS input-2.kconfig /^config KGDB_TESTS$/;" c roles:def
+KGDB_TESTS_ON_BOOT input-2.kconfig /^config KGDB_TESTS_ON_BOOT$/;" c roles:def
+CONFIG_KGDB_TESTS_ON_BOOT input-2.kconfig /^config KGDB_TESTS_ON_BOOT$/;" c roles:def
+KGDB_TESTS_BOOT_STRING input-2.kconfig /^config KGDB_TESTS_BOOT_STRING$/;" c roles:def
+CONFIG_KGDB_TESTS_BOOT_STRING input-2.kconfig /^config KGDB_TESTS_BOOT_STRING$/;" c roles:def
+KGDB_LOW_LEVEL_TRAP input-2.kconfig /^config KGDB_LOW_LEVEL_TRAP$/;" c roles:def
+CONFIG_KGDB_LOW_LEVEL_TRAP input-2.kconfig /^config KGDB_LOW_LEVEL_TRAP$/;" c roles:def
+KGDB_KDB input-2.kconfig /^config KGDB_KDB$/;" c roles:def
+CONFIG_KGDB_KDB input-2.kconfig /^config KGDB_KDB$/;" c roles:def
+KDB_DEFAULT_ENABLE input-2.kconfig /^config KDB_DEFAULT_ENABLE$/;" c roles:def
+CONFIG_KDB_DEFAULT_ENABLE input-2.kconfig /^config KDB_DEFAULT_ENABLE$/;" c roles:def
+KDB_KEYBOARD input-2.kconfig /^config KDB_KEYBOARD$/;" c roles:def
+CONFIG_KDB_KEYBOARD input-2.kconfig /^config KDB_KEYBOARD$/;" c roles:def
+KDB_CONTINUE_CATASTROPHIC input-2.kconfig /^config KDB_CONTINUE_CATASTROPHIC$/;" c roles:def
+CONFIG_KDB_CONTINUE_CATASTROPHIC input-2.kconfig /^config KDB_CONTINUE_CATASTROPHIC$/;" c roles:def
+Networking options input-3.kconfig /^menu "Networking options"$/;" m roles:def
+net/packet/Kconfig input-3.kconfig /^source "net\/packet\/Kconfig"$/;" k menu:Networking options roles:source
+net/unix/Kconfig input-3.kconfig /^source "net\/unix\/Kconfig"$/;" k menu:Networking options roles:source
+net/tls/Kconfig input-3.kconfig /^source "net\/tls\/Kconfig"$/;" k menu:Networking options roles:source
+net/xfrm/Kconfig input-3.kconfig /^source "net\/xfrm\/Kconfig"$/;" k menu:Networking options roles:source
+net/iucv/Kconfig input-3.kconfig /^source "net\/iucv\/Kconfig"$/;" k menu:Networking options roles:source
+net/smc/Kconfig input-3.kconfig /^source "net\/smc\/Kconfig"$/;" k menu:Networking options roles:source
+net/xdp/Kconfig input-3.kconfig /^source "net\/xdp\/Kconfig"$/;" k menu:Networking options roles:source
+INET input-3.kconfig /^config INET$/;" c menu:Networking options roles:def
+CONFIG_INET input-3.kconfig /^config INET$/;" c menu:Networking options roles:def
+net/ipv4/Kconfig input-3.kconfig /^source "net\/ipv4\/Kconfig"$/;" k menu:Networking options roles:source
+net/ipv6/Kconfig input-3.kconfig /^source "net\/ipv6\/Kconfig"$/;" k menu:Networking options roles:source
+net/netlabel/Kconfig input-3.kconfig /^source "net\/netlabel\/Kconfig"$/;" k menu:Networking options roles:source
+net/mptcp/Kconfig input-3.kconfig /^source "net\/mptcp\/Kconfig"$/;" k menu:Networking options roles:source
+NETWORK_SECMARK input-3.kconfig /^config NETWORK_SECMARK$/;" c menu:Networking options roles:def
+CONFIG_NETWORK_SECMARK input-3.kconfig /^config NETWORK_SECMARK$/;" c menu:Networking options roles:def
+NET_PTP_CLASSIFY input-3.kconfig /^config NET_PTP_CLASSIFY$/;" c menu:Networking options roles:def
+CONFIG_NET_PTP_CLASSIFY input-3.kconfig /^config NET_PTP_CLASSIFY$/;" c menu:Networking options roles:def
+NETWORK_PHY_TIMESTAMPING input-3.kconfig /^config NETWORK_PHY_TIMESTAMPING$/;" c menu:Networking options roles:def
+CONFIG_NETWORK_PHY_TIMESTAMPING input-3.kconfig /^config NETWORK_PHY_TIMESTAMPING$/;" c menu:Networking options roles:def
+NETFILTER input-3.kconfig /^menuconfig NETFILTER$/;" c menu:Networking options roles:def
+CONFIG_NETFILTER input-3.kconfig /^menuconfig NETFILTER$/;" c menu:Networking options roles:def
+NETFILTER_ADVANCED input-3.kconfig /^config NETFILTER_ADVANCED$/;" c menu:Networking options roles:def
+CONFIG_NETFILTER_ADVANCED input-3.kconfig /^config NETFILTER_ADVANCED$/;" c menu:Networking options roles:def
+BRIDGE_NETFILTER input-3.kconfig /^config BRIDGE_NETFILTER$/;" c menu:Networking options roles:def
+CONFIG_BRIDGE_NETFILTER input-3.kconfig /^config BRIDGE_NETFILTER$/;" c menu:Networking options roles:def
+net/netfilter/Kconfig input-3.kconfig /^source "net\/netfilter\/Kconfig"$/;" k menu:Networking options roles:source
+net/ipv4/netfilter/Kconfig input-3.kconfig /^source "net\/ipv4\/netfilter\/Kconfig"$/;" k menu:Networking options roles:source
+net/ipv6/netfilter/Kconfig input-3.kconfig /^source "net\/ipv6\/netfilter\/Kconfig"$/;" k menu:Networking options roles:source
+net/decnet/netfilter/Kconfig input-3.kconfig /^source "net\/decnet\/netfilter\/Kconfig"$/;" k menu:Networking options roles:source
+net/bridge/netfilter/Kconfig input-3.kconfig /^source "net\/bridge\/netfilter\/Kconfig"$/;" k menu:Networking options roles:source
+net/bpfilter/Kconfig input-3.kconfig /^source "net\/bpfilter\/Kconfig"$/;" k menu:Networking options roles:source
+net/dccp/Kconfig input-3.kconfig /^source "net\/dccp\/Kconfig"$/;" k menu:Networking options roles:source
+net/sctp/Kconfig input-3.kconfig /^source "net\/sctp\/Kconfig"$/;" k menu:Networking options roles:source
+net/rds/Kconfig input-3.kconfig /^source "net\/rds\/Kconfig"$/;" k menu:Networking options roles:source
+net/tipc/Kconfig input-3.kconfig /^source "net\/tipc\/Kconfig"$/;" k menu:Networking options roles:source
+net/atm/Kconfig input-3.kconfig /^source "net\/atm\/Kconfig"$/;" k menu:Networking options roles:source
+net/l2tp/Kconfig input-3.kconfig /^source "net\/l2tp\/Kconfig"$/;" k menu:Networking options roles:source
+net/802/Kconfig input-3.kconfig /^source "net\/802\/Kconfig"$/;" k menu:Networking options roles:source
+net/bridge/Kconfig input-3.kconfig /^source "net\/bridge\/Kconfig"$/;" k menu:Networking options roles:source
+net/dsa/Kconfig input-3.kconfig /^source "net\/dsa\/Kconfig"$/;" k menu:Networking options roles:source
+net/8021q/Kconfig input-3.kconfig /^source "net\/8021q\/Kconfig"$/;" k menu:Networking options roles:source
+net/decnet/Kconfig input-3.kconfig /^source "net\/decnet\/Kconfig"$/;" k menu:Networking options roles:source
+net/llc/Kconfig input-3.kconfig /^source "net\/llc\/Kconfig"$/;" k menu:Networking options roles:source
+drivers/net/appletalk/Kconfig input-3.kconfig /^source "drivers\/net\/appletalk\/Kconfig"$/;" k menu:Networking options roles:source
+net/x25/Kconfig input-3.kconfig /^source "net\/x25\/Kconfig"$/;" k menu:Networking options roles:source
+net/lapb/Kconfig input-3.kconfig /^source "net\/lapb\/Kconfig"$/;" k menu:Networking options roles:source
+net/phonet/Kconfig input-3.kconfig /^source "net\/phonet\/Kconfig"$/;" k menu:Networking options roles:source
+net/6lowpan/Kconfig input-3.kconfig /^source "net\/6lowpan\/Kconfig"$/;" k menu:Networking options roles:source
+net/ieee802154/Kconfig input-3.kconfig /^source "net\/ieee802154\/Kconfig"$/;" k menu:Networking options roles:source
+net/mac802154/Kconfig input-3.kconfig /^source "net\/mac802154\/Kconfig"$/;" k menu:Networking options roles:source
+net/sched/Kconfig input-3.kconfig /^source "net\/sched\/Kconfig"$/;" k menu:Networking options roles:source
+net/dcb/Kconfig input-3.kconfig /^source "net\/dcb\/Kconfig"$/;" k menu:Networking options roles:source
+net/dns_resolver/Kconfig input-3.kconfig /^source "net\/dns_resolver\/Kconfig"$/;" k menu:Networking options roles:source
+net/batman-adv/Kconfig input-3.kconfig /^source "net\/batman-adv\/Kconfig"$/;" k menu:Networking options roles:source
+net/openvswitch/Kconfig input-3.kconfig /^source "net\/openvswitch\/Kconfig"$/;" k menu:Networking options roles:source
+net/vmw_vsock/Kconfig input-3.kconfig /^source "net\/vmw_vsock\/Kconfig"$/;" k menu:Networking options roles:source
+net/netlink/Kconfig input-3.kconfig /^source "net\/netlink\/Kconfig"$/;" k menu:Networking options roles:source
+net/mpls/Kconfig input-3.kconfig /^source "net\/mpls\/Kconfig"$/;" k menu:Networking options roles:source
+net/nsh/Kconfig input-3.kconfig /^source "net\/nsh\/Kconfig"$/;" k menu:Networking options roles:source
+net/hsr/Kconfig input-3.kconfig /^source "net\/hsr\/Kconfig"$/;" k menu:Networking options roles:source
+net/switchdev/Kconfig input-3.kconfig /^source "net\/switchdev\/Kconfig"$/;" k menu:Networking options roles:source
+net/l3mdev/Kconfig input-3.kconfig /^source "net\/l3mdev\/Kconfig"$/;" k menu:Networking options roles:source
+net/qrtr/Kconfig input-3.kconfig /^source "net\/qrtr\/Kconfig"$/;" k menu:Networking options roles:source
+net/ncsi/Kconfig input-3.kconfig /^source "net\/ncsi\/Kconfig"$/;" k menu:Networking options roles:source
+RPS input-3.kconfig /^config RPS$/;" c menu:Networking options roles:def
+CONFIG_RPS input-3.kconfig /^config RPS$/;" c menu:Networking options roles:def
+RFS_ACCEL input-3.kconfig /^config RFS_ACCEL$/;" c menu:Networking options roles:def
+CONFIG_RFS_ACCEL input-3.kconfig /^config RFS_ACCEL$/;" c menu:Networking options roles:def
+XPS input-3.kconfig /^config XPS$/;" c menu:Networking options roles:def
+CONFIG_XPS input-3.kconfig /^config XPS$/;" c menu:Networking options roles:def
+HWBM input-3.kconfig /^config HWBM$/;" c menu:Networking options roles:def
+CONFIG_HWBM input-3.kconfig /^config HWBM$/;" c menu:Networking options roles:def
+CGROUP_NET_PRIO input-3.kconfig /^config CGROUP_NET_PRIO$/;" c menu:Networking options roles:def
+CONFIG_CGROUP_NET_PRIO input-3.kconfig /^config CGROUP_NET_PRIO$/;" c menu:Networking options roles:def
+CGROUP_NET_CLASSID input-3.kconfig /^config CGROUP_NET_CLASSID$/;" c menu:Networking options roles:def
+CONFIG_CGROUP_NET_CLASSID input-3.kconfig /^config CGROUP_NET_CLASSID$/;" c menu:Networking options roles:def
+NET_RX_BUSY_POLL input-3.kconfig /^config NET_RX_BUSY_POLL$/;" c menu:Networking options roles:def
+CONFIG_NET_RX_BUSY_POLL input-3.kconfig /^config NET_RX_BUSY_POLL$/;" c menu:Networking options roles:def
+BQL input-3.kconfig /^config BQL$/;" c menu:Networking options roles:def
+CONFIG_BQL input-3.kconfig /^config BQL$/;" c menu:Networking options roles:def
+BPF_JIT input-3.kconfig /^config BPF_JIT$/;" c menu:Networking options roles:def
+CONFIG_BPF_JIT input-3.kconfig /^config BPF_JIT$/;" c menu:Networking options roles:def
+BPF_STREAM_PARSER input-3.kconfig /^config BPF_STREAM_PARSER$/;" c menu:Networking options roles:def
+CONFIG_BPF_STREAM_PARSER input-3.kconfig /^config BPF_STREAM_PARSER$/;" c menu:Networking options roles:def
+NET_FLOW_LIMIT input-3.kconfig /^config NET_FLOW_LIMIT$/;" c menu:Networking options roles:def
+CONFIG_NET_FLOW_LIMIT input-3.kconfig /^config NET_FLOW_LIMIT$/;" c menu:Networking options roles:def
+Network testing input-3.kconfig /^menu "Network testing"$/;" m menu:Networking options roles:def
+NET_PKTGEN input-3.kconfig /^config NET_PKTGEN$/;" c menu:Networking options""Network testing roles:def
+CONFIG_NET_PKTGEN input-3.kconfig /^config NET_PKTGEN$/;" c menu:Networking options""Network testing roles:def
+NET_DROP_MONITOR input-3.kconfig /^config NET_DROP_MONITOR$/;" c menu:Networking options""Network testing roles:def
+CONFIG_NET_DROP_MONITOR input-3.kconfig /^config NET_DROP_MONITOR$/;" c menu:Networking options""Network testing roles:def
diff --git a/Units/simple-kconfig.d/input-1.kconfig b/Units/simple-kconfig.d/input-1.kconfig
new file mode 100644
index 0000000000..b71b6427ee
--- /dev/null
+++ b/Units/simple-kconfig.d/input-1.kconfig
@@ -0,0 +1,189 @@
+# SPDX-License-Identifier: GPL-2.0-only
+config JFFS2_FS
+ tristate "Journalling Flash File System v2 (JFFS2) support"
+ select CRC32
+ depends on MTD
+ help
+ JFFS2 is the second generation of the Journalling Flash File System
+ for use on diskless embedded devices. It provides improved wear
+ levelling, compression and support for hard links. You cannot use
+ this on normal block devices, only on 'MTD' devices.
+
+ Further information on the design and implementation of JFFS2 is
+ available at .
+
+config JFFS2_FS_DEBUG
+ int "JFFS2 debugging verbosity (0 = quiet, 2 = noisy)"
+ depends on JFFS2_FS
+ default "0"
+ help
+ This controls the amount of debugging messages produced by the JFFS2
+ code. Set it to zero for use in production systems. For evaluation,
+ testing and debugging, it's advisable to set it to one. This will
+ enable a few assertions and will print debugging messages at the
+ KERN_DEBUG loglevel, where they won't normally be visible. Level 2
+ is unlikely to be useful - it enables extra debugging in certain
+ areas which at one point needed debugging, but when the bugs were
+ located and fixed, the detailed messages were relegated to level 2.
+
+ If reporting bugs, please try to have available a full dump of the
+ messages at debug level 1 while the misbehaviour was occurring.
+
+config JFFS2_FS_WRITEBUFFER
+ bool "JFFS2 write-buffering support"
+ depends on JFFS2_FS
+ default y
+ help
+ This enables the write-buffering support in JFFS2.
+
+ This functionality is required to support JFFS2 on the following
+ types of flash devices:
+ - NAND flash
+ - NOR flash with transparent ECC
+ - DataFlash
+
+config JFFS2_FS_WBUF_VERIFY
+ bool "Verify JFFS2 write-buffer reads"
+ depends on JFFS2_FS_WRITEBUFFER
+ default n
+ help
+ This causes JFFS2 to read back every page written through the
+ write-buffer, and check for errors.
+
+config JFFS2_SUMMARY
+ bool "JFFS2 summary support"
+ depends on JFFS2_FS
+ default n
+ help
+ This feature makes it possible to use summary information
+ for faster filesystem mount.
+
+ The summary information can be inserted into a filesystem image
+ by the utility 'sumtool'.
+
+ If unsure, say 'N'.
+
+config JFFS2_FS_XATTR
+ bool "JFFS2 XATTR support"
+ depends on JFFS2_FS
+ default n
+ help
+ Extended attributes are name:value pairs associated with inodes by
+ the kernel or by users (see the attr(5) manual page for details).
+
+ If unsure, say N.
+
+config JFFS2_FS_POSIX_ACL
+ bool "JFFS2 POSIX Access Control Lists"
+ depends on JFFS2_FS_XATTR
+ default y
+ select FS_POSIX_ACL
+ help
+ Posix Access Control Lists (ACLs) support permissions for users and
+ groups beyond the owner/group/world scheme.
+
+ If you don't know what Access Control Lists are, say N
+
+config JFFS2_FS_SECURITY
+ bool "JFFS2 Security Labels"
+ depends on JFFS2_FS_XATTR
+ default y
+ help
+ Security labels support alternative access control models
+ implemented by security modules like SELinux. This option
+ enables an extended attribute handler for file security
+ labels in the jffs2 filesystem.
+
+ If you are not using a security module that requires using
+ extended attributes for file security labels, say N.
+
+config JFFS2_COMPRESSION_OPTIONS
+ bool "Advanced compression options for JFFS2"
+ depends on JFFS2_FS
+ default n
+ help
+ Enabling this option allows you to explicitly choose which
+ compression modules, if any, are enabled in JFFS2. Removing
+ compressors can mean you cannot read existing file systems,
+ and enabling experimental compressors can mean that you
+ write a file system which cannot be read by a standard kernel.
+
+ If unsure, you should _definitely_ say 'N'.
+
+config JFFS2_ZLIB
+ bool "JFFS2 ZLIB compression support" if JFFS2_COMPRESSION_OPTIONS
+ select ZLIB_INFLATE
+ select ZLIB_DEFLATE
+ depends on JFFS2_FS
+ default y
+ help
+ Zlib is designed to be a free, general-purpose, legally unencumbered,
+ lossless data-compression library for use on virtually any computer
+ hardware and operating system. See for
+ further information.
+
+ Say 'Y' if unsure.
+
+config JFFS2_LZO
+ bool "JFFS2 LZO compression support" if JFFS2_COMPRESSION_OPTIONS
+ select LZO_COMPRESS
+ select LZO_DECOMPRESS
+ depends on JFFS2_FS
+ default n
+ help
+ minilzo-based compression. Generally works better than Zlib.
+
+ This feature was added in July, 2007. Say 'N' if you need
+ compatibility with older bootloaders or kernels.
+
+config JFFS2_RTIME
+ bool "JFFS2 RTIME compression support" if JFFS2_COMPRESSION_OPTIONS
+ depends on JFFS2_FS
+ default y
+ help
+ Rtime does manage to recompress already-compressed data. Say 'Y' if unsure.
+
+config JFFS2_RUBIN
+ bool "JFFS2 RUBIN compression support" if JFFS2_COMPRESSION_OPTIONS
+ depends on JFFS2_FS
+ default n
+ help
+ RUBINMIPS and DYNRUBIN compressors. Say 'N' if unsure.
+
+choice
+ prompt "JFFS2 default compression mode" if JFFS2_COMPRESSION_OPTIONS
+ default JFFS2_CMODE_PRIORITY
+ depends on JFFS2_FS
+ help
+ You can set here the default compression mode of JFFS2 from
+ the available compression modes. Don't touch if unsure.
+
+config JFFS2_CMODE_NONE
+ bool "no compression"
+ help
+ Uses no compression.
+
+config JFFS2_CMODE_PRIORITY
+ bool "priority"
+ help
+ Tries the compressors in a predefined order and chooses the first
+ successful one.
+
+config JFFS2_CMODE_SIZE
+ bool "size"
+ help
+ Tries all compressors and chooses the one which has the smallest
+ result.
+
+config JFFS2_CMODE_FAVOURLZO
+ bool "Favour LZO"
+ help
+ Tries all compressors and chooses the one which has the smallest
+ result but gives some preference to LZO (which has faster
+ decompression) at the expense of size.
+
+endchoice
+
+#
+# This test input for u-ctags is taken from linux/fs/jffs2/Kconfig
+#
diff --git a/Units/simple-kconfig.d/input-2.kconfig b/Units/simple-kconfig.d/input-2.kconfig
new file mode 100644
index 0000000000..c0b9c90b61
--- /dev/null
+++ b/Units/simple-kconfig.d/input-2.kconfig
@@ -0,0 +1,131 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+config HAVE_ARCH_KGDB
+ bool
+
+menuconfig KGDB
+ bool "KGDB: kernel debugger"
+ depends on HAVE_ARCH_KGDB
+ depends on DEBUG_KERNEL
+ help
+ If you say Y here, it will be possible to remotely debug the
+ kernel using gdb. It is recommended but not required, that
+ you also turn on the kernel config option
+ CONFIG_FRAME_POINTER to aid in producing more reliable stack
+ backtraces in the external debugger. Documentation of
+ kernel debugger is available at http://kgdb.sourceforge.net
+ as well as in Documentation/dev-tools/kgdb.rst. If
+ unsure, say N.
+
+if KGDB
+
+config KGDB_SERIAL_CONSOLE
+ tristate "KGDB: use kgdb over the serial console"
+ select CONSOLE_POLL
+ select MAGIC_SYSRQ
+ depends on TTY && HW_CONSOLE
+ default y
+ help
+ Share a serial console with kgdb. Sysrq-g must be used
+ to break in initially.
+
+config KGDB_TESTS
+ bool "KGDB: internal test suite"
+ default n
+ help
+ This is a kgdb I/O module specifically designed to test
+ kgdb's internal functions. This kgdb I/O module is
+ intended to for the development of new kgdb stubs
+ as well as regression testing the kgdb internals.
+ See the drivers/misc/kgdbts.c for the details about
+ the tests. The most basic of this I/O module is to boot
+ a kernel boot arguments "kgdbwait kgdbts=V1F100"
+
+config KGDB_TESTS_ON_BOOT
+ bool "KGDB: Run tests on boot"
+ depends on KGDB_TESTS
+ default n
+ help
+ Run the kgdb tests on boot up automatically without the need
+ to pass in a kernel parameter
+
+config KGDB_TESTS_BOOT_STRING
+ string "KGDB: which internal kgdb tests to run"
+ depends on KGDB_TESTS_ON_BOOT
+ default "V1F100"
+ help
+ This is the command string to send the kgdb test suite on
+ boot. See the drivers/misc/kgdbts.c for detailed
+ information about other strings you could use beyond the
+ default of V1F100.
+
+config KGDB_LOW_LEVEL_TRAP
+ bool "KGDB: Allow debugging with traps in notifiers"
+ depends on X86 || MIPS
+ default n
+ help
+ This will add an extra call back to kgdb for the breakpoint
+ exception handler which will allow kgdb to step through a
+ notify handler.
+
+config KGDB_KDB
+ bool "KGDB_KDB: include kdb frontend for kgdb"
+ default n
+ help
+ KDB frontend for kernel
+
+config KDB_DEFAULT_ENABLE
+ hex "KDB: Select kdb command functions to be enabled by default"
+ depends on KGDB_KDB
+ default 0x1
+ help
+ Specifiers which kdb commands are enabled by default. This may
+ be set to 1 or 0 to enable all commands or disable almost all
+ commands.
+
+ Alternatively the following bitmask applies:
+
+ 0x0002 - allow arbitrary reads from memory and symbol lookup
+ 0x0004 - allow arbitrary writes to memory
+ 0x0008 - allow current register state to be inspected
+ 0x0010 - allow current register state to be modified
+ 0x0020 - allow passive inspection (backtrace, process list, lsmod)
+ 0x0040 - allow flow control management (breakpoint, single step)
+ 0x0080 - enable signalling of processes
+ 0x0100 - allow machine to be rebooted
+
+ The config option merely sets the default at boot time. Both
+ issuing 'echo X > /sys/module/kdb/parameters/cmd_enable' or
+ setting with kdb.cmd_enable=X kernel command line option will
+ override the default settings.
+
+config KDB_KEYBOARD
+ bool "KGDB_KDB: keyboard as input device"
+ depends on VT && KGDB_KDB
+ default n
+ help
+ KDB can use a PS/2 type keyboard for an input device
+
+config KDB_CONTINUE_CATASTROPHIC
+ int "KDB: continue after catastrophic errors"
+ depends on KGDB_KDB
+ default "0"
+ help
+ This integer controls the behaviour of kdb when the kernel gets a
+ catastrophic error, i.e. for a panic or oops.
+ When KDB is active and a catastrophic error occurs, nothing extra
+ will happen until you type 'go'.
+ CONFIG_KDB_CONTINUE_CATASTROPHIC == 0 (default). The first time
+ you type 'go', you will be warned by kdb. The secend time you type
+ 'go', KDB tries to continue. No guarantees that the
+ kernel is still usable in this situation.
+ CONFIG_KDB_CONTINUE_CATASTROPHIC == 1. KDB tries to continue.
+ No guarantees that the kernel is still usable in this situation.
+ CONFIG_KDB_CONTINUE_CATASTROPHIC == 2. KDB forces a reboot.
+ If you are not sure, say 0.
+
+endif # KGDB
+
+#
+# This test input for u-ctags is taken from linux/lib/Kconfig.kgdb
+#
diff --git a/Units/simple-kconfig.d/input-3.kconfig b/Units/simple-kconfig.d/input-3.kconfig
new file mode 100644
index 0000000000..8dd0ac4952
--- /dev/null
+++ b/Units/simple-kconfig.d/input-3.kconfig
@@ -0,0 +1,314 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Network configuration
+#
+
+menu "Networking options"
+
+source "net/packet/Kconfig"
+source "net/unix/Kconfig"
+source "net/tls/Kconfig"
+source "net/xfrm/Kconfig"
+source "net/iucv/Kconfig"
+source "net/smc/Kconfig"
+source "net/xdp/Kconfig"
+
+config INET
+ bool "TCP/IP networking"
+ ---help---
+ These are the protocols used on the Internet and on most local
+ Ethernets. It is highly recommended to say Y here (this will enlarge
+ your kernel by about 400 KB), since some programs (e.g. the X window
+ system) use TCP/IP even if your machine is not connected to any
+ other computer. You will get the so-called loopback device which
+ allows you to ping yourself (great fun, that!).
+
+ For an excellent introduction to Linux networking, please read the
+ Linux Networking HOWTO, available from
+ .
+
+ If you say Y here and also to "/proc file system support" and
+ "Sysctl support" below, you can change various aspects of the
+ behavior of the TCP/IP code by writing to the (virtual) files in
+ /proc/sys/net/ipv4/*; the options are explained in the file
+ .
+
+ Short answer: say Y.
+
+if INET
+source "net/ipv4/Kconfig"
+source "net/ipv6/Kconfig"
+source "net/netlabel/Kconfig"
+source "net/mptcp/Kconfig"
+
+endif # if INET
+
+config NETWORK_SECMARK
+ bool "Security Marking"
+ help
+ This enables security marking of network packets, similar
+ to nfmark, but designated for security purposes.
+ If you are unsure how to answer this question, answer N.
+
+config NET_PTP_CLASSIFY
+ def_bool n
+
+config NETWORK_PHY_TIMESTAMPING
+ bool "Timestamping in PHY devices"
+ select NET_PTP_CLASSIFY
+ help
+ This allows timestamping of network packets by PHYs (or
+ other MII bus snooping devices) with hardware timestamping
+ capabilities. This option adds some overhead in the transmit
+ and receive paths.
+
+ If you are unsure how to answer this question, answer N.
+
+menuconfig NETFILTER
+ bool "Network packet filtering framework (Netfilter)"
+ ---help---
+ Netfilter is a framework for filtering and mangling network packets
+ that pass through your Linux box.
+
+ The most common use of packet filtering is to run your Linux box as
+ a firewall protecting a local network from the Internet. The type of
+ firewall provided by this kernel support is called a "packet
+ filter", which means that it can reject individual network packets
+ based on type, source, destination etc. The other kind of firewall,
+ a "proxy-based" one, is more secure but more intrusive and more
+ bothersome to set up; it inspects the network traffic much more
+ closely, modifies it and has knowledge about the higher level
+ protocols, which a packet filter lacks. Moreover, proxy-based
+ firewalls often require changes to the programs running on the local
+ clients. Proxy-based firewalls don't need support by the kernel, but
+ they are often combined with a packet filter, which only works if
+ you say Y here.
+
+ You should also say Y here if you intend to use your Linux box as
+ the gateway to the Internet for a local network of machines without
+ globally valid IP addresses. This is called "masquerading": if one
+ of the computers on your local network wants to send something to
+ the outside, your box can "masquerade" as that computer, i.e. it
+ forwards the traffic to the intended outside destination, but
+ modifies the packets to make it look like they came from the
+ firewall box itself. It works both ways: if the outside host
+ replies, the Linux box will silently forward the traffic to the
+ correct local computer. This way, the computers on your local net
+ are completely invisible to the outside world, even though they can
+ reach the outside and can receive replies. It is even possible to
+ run globally visible servers from within a masqueraded local network
+ using a mechanism called portforwarding. Masquerading is also often
+ called NAT (Network Address Translation).
+
+ Another use of Netfilter is in transparent proxying: if a machine on
+ the local network tries to connect to an outside host, your Linux
+ box can transparently forward the traffic to a local server,
+ typically a caching proxy server.
+
+ Yet another use of Netfilter is building a bridging firewall. Using
+ a bridge with Network packet filtering enabled makes iptables "see"
+ the bridged traffic. For filtering on the lower network and Ethernet
+ protocols over the bridge, use ebtables (under bridge netfilter
+ configuration).
+
+ Various modules exist for netfilter which replace the previous
+ masquerading (ipmasqadm), packet filtering (ipchains), transparent
+ proxying, and portforwarding mechanisms. Please see
+ under "iptables" for the location of
+ these packages.
+
+if NETFILTER
+
+config NETFILTER_ADVANCED
+ bool "Advanced netfilter configuration"
+ depends on NETFILTER
+ default y
+ help
+ If you say Y here you can select between all the netfilter modules.
+ If you say N the more unusual ones will not be shown and the
+ basic ones needed by most people will default to 'M'.
+
+ If unsure, say Y.
+
+config BRIDGE_NETFILTER
+ tristate "Bridged IP/ARP packets filtering"
+ depends on BRIDGE
+ depends on NETFILTER && INET
+ depends on NETFILTER_ADVANCED
+ select NETFILTER_FAMILY_BRIDGE
+ select SKB_EXTENSIONS
+ ---help---
+ Enabling this option will let arptables resp. iptables see bridged
+ ARP resp. IP traffic. If you want a bridging firewall, you probably
+ want this option enabled.
+ Enabling or disabling this option doesn't enable or disable
+ ebtables.
+
+ If unsure, say N.
+
+source "net/netfilter/Kconfig"
+source "net/ipv4/netfilter/Kconfig"
+source "net/ipv6/netfilter/Kconfig"
+source "net/decnet/netfilter/Kconfig"
+source "net/bridge/netfilter/Kconfig"
+
+endif
+
+source "net/bpfilter/Kconfig"
+
+source "net/dccp/Kconfig"
+source "net/sctp/Kconfig"
+source "net/rds/Kconfig"
+source "net/tipc/Kconfig"
+source "net/atm/Kconfig"
+source "net/l2tp/Kconfig"
+source "net/802/Kconfig"
+source "net/bridge/Kconfig"
+source "net/dsa/Kconfig"
+source "net/8021q/Kconfig"
+source "net/decnet/Kconfig"
+source "net/llc/Kconfig"
+source "drivers/net/appletalk/Kconfig"
+source "net/x25/Kconfig"
+source "net/lapb/Kconfig"
+source "net/phonet/Kconfig"
+source "net/6lowpan/Kconfig"
+source "net/ieee802154/Kconfig"
+source "net/mac802154/Kconfig"
+source "net/sched/Kconfig"
+source "net/dcb/Kconfig"
+source "net/dns_resolver/Kconfig"
+source "net/batman-adv/Kconfig"
+source "net/openvswitch/Kconfig"
+source "net/vmw_vsock/Kconfig"
+source "net/netlink/Kconfig"
+source "net/mpls/Kconfig"
+source "net/nsh/Kconfig"
+source "net/hsr/Kconfig"
+source "net/switchdev/Kconfig"
+source "net/l3mdev/Kconfig"
+source "net/qrtr/Kconfig"
+source "net/ncsi/Kconfig"
+
+config RPS
+ bool
+ depends on SMP && SYSFS
+ default y
+
+config RFS_ACCEL
+ bool
+ depends on RPS
+ select CPU_RMAP
+ default y
+
+config XPS
+ bool
+ depends on SMP
+ default y
+
+config HWBM
+ bool
+
+config CGROUP_NET_PRIO
+ bool "Network priority cgroup"
+ depends on CGROUPS
+ select SOCK_CGROUP_DATA
+ ---help---
+ Cgroup subsystem for use in assigning processes to network priorities on
+ a per-interface basis.
+
+config CGROUP_NET_CLASSID
+ bool "Network classid cgroup"
+ depends on CGROUPS
+ select SOCK_CGROUP_DATA
+ ---help---
+ Cgroup subsystem for use as general purpose socket classid marker that is
+ being used in cls_cgroup and for netfilter matching.
+
+config NET_RX_BUSY_POLL
+ bool
+ default y
+
+config BQL
+ bool
+ depends on SYSFS
+ select DQL
+ default y
+
+config BPF_JIT
+ bool "enable BPF Just In Time compiler"
+ depends on HAVE_CBPF_JIT || HAVE_EBPF_JIT
+ depends on MODULES
+ ---help---
+ Berkeley Packet Filter filtering capabilities are normally handled
+ by an interpreter. This option allows kernel to generate a native
+ code when filter is loaded in memory. This should speedup
+ packet sniffing (libpcap/tcpdump).
+
+ Note, admin should enable this feature changing:
+ /proc/sys/net/core/bpf_jit_enable
+ /proc/sys/net/core/bpf_jit_harden (optional)
+ /proc/sys/net/core/bpf_jit_kallsyms (optional)
+
+config BPF_STREAM_PARSER
+ bool "enable BPF STREAM_PARSER"
+ depends on INET
+ depends on BPF_SYSCALL
+ depends on CGROUP_BPF
+ select STREAM_PARSER
+ select NET_SOCK_MSG
+ ---help---
+ Enabling this allows a stream parser to be used with
+ BPF_MAP_TYPE_SOCKMAP.
+
+ BPF_MAP_TYPE_SOCKMAP provides a map type to use with network sockets.
+ It can be used to enforce socket policy, implement socket redirects,
+ etc.
+
+config NET_FLOW_LIMIT
+ bool
+ depends on RPS
+ default y
+ ---help---
+ The network stack has to drop packets when a receive processing CPU's
+ backlog reaches netdev_max_backlog. If a few out of many active flows
+ generate the vast majority of load, drop their traffic earlier to
+ maintain capacity for the other flows. This feature provides servers
+ with many clients some protection against DoS by a single (spoofed)
+ flow that greatly exceeds average workload.
+
+menu "Network testing"
+
+config NET_PKTGEN
+ tristate "Packet Generator (USE WITH CAUTION)"
+ depends on INET && PROC_FS
+ ---help---
+ This module will inject preconfigured packets, at a configurable
+ rate, out of a given interface. It is used for network interface
+ stress testing and performance analysis. If you don't understand
+ what was just said, you don't need it: say N.
+
+ Documentation on how to use the packet generator can be found
+ at .
+
+ To compile this code as a module, choose M here: the
+ module will be called pktgen.
+
+config NET_DROP_MONITOR
+ tristate "Network packet drop alerting service"
+ depends on INET && TRACEPOINTS
+ ---help---
+ This feature provides an alerting service to userspace in the
+ event that packets are discarded in the network stack. Alerts
+ are broadcast via netlink socket to any listening user space
+ process. If you don't need network drop alerts, or if you are ok
+ just checking the various proc files and other utilities for
+ drop statistics, say N here.
+
+endmenu
+
+endmenu
+
+#
+# This test input for u-ctags is partially taken from linux/net/Kconfig
+#
diff --git a/Units/simple-kconfig.d/input.kconfig b/Units/simple-kconfig.d/input.kconfig
new file mode 100644
index 0000000000..6a6eb205a2
--- /dev/null
+++ b/Units/simple-kconfig.d/input.kconfig
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/kconfig-language.rst.
+#
+mainmenu "Linux/$(ARCH) $(KERNELVERSION) Kernel Configuration"
+
+comment "Compiler: $(CC_VERSION_TEXT)"
+
+source "scripts/Kconfig.include"
+
+source "init/Kconfig"
+
+source "kernel/Kconfig.freezer"
+
+source "fs/Kconfig.binfmt"
+
+source "mm/Kconfig"
+
+source "net/Kconfig"
+
+source "drivers/Kconfig"
+
+source "fs/Kconfig"
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
+
+source "lib/Kconfig.debug"
+
+source "Documentation/Kconfig"
+
+#
+# This test input for u-ctags is taken from linux/Kconfig
+#
diff --git a/docs/news.rst b/docs/news.rst
index e5b319d3ee..ad8c056751 100644
--- a/docs/news.rst
+++ b/docs/news.rst
@@ -62,6 +62,7 @@ The following parsers have been added:
* Inko *optlib*
* JavaProperties
* JSON
+* Kconfig *optlib*
* GNU linker script(LdScript)
* Man page *optlib*
* Markdown *optlib*
diff --git a/main/parsers_p.h b/main/parsers_p.h
index fc4a9cdd34..b463c2388e 100644
--- a/main/parsers_p.h
+++ b/main/parsers_p.h
@@ -89,6 +89,7 @@
JavaPropertiesParser, \
JavaScriptParser, \
JsonParser, \
+ KconfigParser, \
LdScriptParser, \
LispParser, \
LuaParser, \
diff --git a/makefiles/optlib2c_input.mak b/makefiles/optlib2c_input.mak
index 0a0e3b11a4..49275272ac 100644
--- a/makefiles/optlib2c_input.mak
+++ b/makefiles/optlib2c_input.mak
@@ -7,6 +7,7 @@ OPTLIB2C_INPUT = \
optlib/elm.ctags \
optlib/gdbinit.ctags \
optlib/inko.ctags \
+ optlib/kconfig.ctags \
optlib/man.ctags \
optlib/markdown.ctags \
optlib/passwd.ctags \
diff --git a/optlib/kconfig.c b/optlib/kconfig.c
new file mode 100644
index 0000000000..b49f3858da
--- /dev/null
+++ b/optlib/kconfig.c
@@ -0,0 +1,109 @@
+/*
+ * Generated by ./misc/optlib2c from optlib/kconfig.ctags, Don't edit this manually.
+ */
+#include "general.h"
+#include "parse.h"
+#include "routines.h"
+#include "field.h"
+#include "xtag.h"
+
+
+typedef enum {
+ K_CONFIG,
+ K_MENU,
+ K_MAINMENU,
+ K_KCONFIG,
+ K_CHOICE,
+} KconfigKind;
+
+
+static void initializeKconfigParser (const langType language CTAGS_ATTR_UNUSED)
+{
+}
+
+extern parserDefinition* KconfigParser (void)
+{
+ static const char *const extensions [] = {
+ NULL
+ };
+
+ static const char *const aliases [] = {
+ NULL
+ };
+
+ static const char *const patterns [] = {
+ "Kconfig*",
+ NULL
+ };
+
+ static roleDefinition KconfigKconfigRoleTable [] = {
+ { true, "source", "kconfig file loaded with source directive" },
+ };
+ static kindDefinition KconfigKindTable [] = {
+ {
+ true, 'c', "config", "configs",
+ },
+ {
+ true, 'm', "menu", "menus",
+ },
+ {
+ true, 'M', "mainMenu", "the main menu",
+ },
+ {
+ true, 'k', "kconfig", "kconfig file",
+ ATTACH_ROLES(KconfigKconfigRoleTable),
+ },
+ {
+ true, 'C', "choice", "choices",
+ },
+ };
+ static xtagDefinition KconfigXtagTable [] = {
+ {
+ .enabled = true,
+ .name = "configPrefixed",
+ .description = "prepend CONFIG_ to config names",
+ },
+ };
+ static tagRegexTable KconfigTagRegexTable [] = {
+ {"^[ \t]*#.*$", "",
+ "", "{placeholder}", NULL, false},
+ {"^[ \t]*(menu)?config[ \t]+([A-Za-z0-9_]+)[ \t]*$", "\\2",
+ "c", "{scope=ref}", NULL, false},
+ {"^[ \t]*(menu)?config[ \t]+([A-Za-z0-9_]+)[ \t]*$", "CONFIG_\\2",
+ "c", "{scope=ref}{_extra=configPrefixed}{exclusive}", NULL, false},
+ {"^[ \t]*menu[ \t]+\"([^\"]+)\"[ \t]*", "\\1",
+ "m", "{scope=push}{exclusive}", NULL, false},
+ {"^[ \t]*endmenu[ \t]*", "",
+ "", "{scope=pop}{placeholder}{exclusive}", NULL, false},
+ {"^[ \t]*source[ \t]+\"([^\"]+)\"[ \t]*", "\\1",
+ "k", "{_role=source}{exclusive}{scope=ref}", NULL, false},
+ {"^[ \t]*choice[ \t]+([A-Za-z0-9_]+)[ \t]*", "\\1",
+ "C", "{scope=push}{exclusive}", NULL, false},
+ {"^[ \t]*choice[ \t]*$", "",
+ "C", "{_anonymous=choice}{scope=push}{exclusive}", NULL, false},
+ {"^[ \t]*endchoice[ \t]*", "",
+ "", "{scope=pop}{placeholder}{exclusive}", NULL, false},
+ {"^[ \t]*mainmenu[ \t]+\"([^\"]+)\"[ \t]*", "\\1",
+ "M", "{exclusive}", NULL, false},
+ };
+
+
+ parserDefinition* const def = parserNew ("Kconfig");
+
+ def->enabled = true;
+ def->extensions = extensions;
+ def->patterns = patterns;
+ def->aliases = aliases;
+ def->method = METHOD_NOT_CRAFTED|METHOD_REGEX;
+ def->useCork = CORK_QUEUE;
+ def->kindTable = KconfigKindTable;
+ def->kindCount = ARRAY_SIZE(KconfigKindTable);
+ def->xtagTable = KconfigXtagTable;
+ def->xtagCount = ARRAY_SIZE(KconfigXtagTable);
+ def->tagRegexTable = KconfigTagRegexTable;
+ def->tagRegexCount = ARRAY_SIZE(KconfigTagRegexTable);
+ def->defaultScopeSeparator = "\"\"";
+ def->initialize = initializeKconfigParser;
+
+ return def;
+}
diff --git a/optlib/kconfig.ctags b/optlib/kconfig.ctags
new file mode 100644
index 0000000000..40bac4f8eb
--- /dev/null
+++ b/optlib/kconfig.ctags
@@ -0,0 +1,65 @@
+#
+# Copyright (c) 2020, Maxime Chretien
+#
+# This source code is released for free distribution under the terms of the
+# GNU General Public License version 2 or (at your option) any later version.
+#
+# This module contains functions for generating tags for the Kconfig language
+#
+# Reference
+# https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html
+#
+#
+# This parser was originally written in C as proplosed in #2553 by Maxime.
+# Masatake converted it to an optlib file.
+#
+--langdef=Kconfig
+--map-Kconfig=+(Kconfig*)
+
+--kinddef-Kconfig=c,config,configs
+--kinddef-Kconfig=m,menu,menus
+--kinddef-Kconfig=M,mainMenu,the main menu
+--kinddef-Kconfig=k,kconfig,kconfig file
+--kinddef-Kconfig=C,choice,choices
+
+--_roledef-Kconfig=k.source,kconfig file loaded with source directive
+
+# Menus can be nested. Combine the parent menu and its child with "".
+--_scopesep-Kconfig=*/*:""
+
+#
+# The next extra is useful for jumpping from
+#
+# #ifdef CONFIG_FOO
+# ...
+#
+# in C code.
+#
+# Masatake proposed this extra to linux-kbuild ML and it was
+# merged as
+# ----------------------------------------------------------------------
+# commit e838db685fcfd2e9a0548ffc5cb9447e6c3c11be
+# Author: Masatake YAMATO
+# Date: Thu Jun 22 12:21:20 2006 +0900
+#
+# kbuild: adding symbols in Kconfig and defconfig to TAGS
+#
+--_extradef-Kconfig=configPrefixed,prepend CONFIG_ to config names
+--extras-Kconfig=+{configPrefixed}
+
+# skip the comment lines.
+--regex-Kconfig=/^[ \t]*#.*$//{placeholder}
+
+--regex-Kconfig=/^[ \t]*(menu)?config[ \t]+([A-Za-z0-9_]+)[ \t]*$/\2/c/{scope=ref}
+--regex-Kconfig=/^[ \t]*(menu)?config[ \t]+([A-Za-z0-9_]+)[ \t]*$/CONFIG_\2/c/{scope=ref}{_extra=configPrefixed}{exclusive}
+
+--regex-Kconfig=/^[ \t]*menu[ \t]+"([^"]+)"[ \t]*/\1/m/{scope=push}{exclusive}
+--regex-Kconfig=/^[ \t]*endmenu[ \t]*//{scope=pop}{placeholder}{exclusive}
+
+--regex-Kconfig=/^[ \t]*source[ \t]+"([^"]+)"[ \t]*/\1/k/{_role=source}{exclusive}{scope=ref}
+
+--regex-Kconfig=/^[ \t]*choice[ \t]+([A-Za-z0-9_]+)[ \t]*/\1/C/{scope=push}{exclusive}
+--regex-Kconfig=/^[ \t]*choice[ \t]*$//C/{_anonymous=choice}{scope=push}{exclusive}
+--regex-Kconfig=/^[ \t]*endchoice[ \t]*//{scope=pop}{placeholder}{exclusive}
+
+--regex-Kconfig=/^[ \t]*mainmenu[ \t]+"([^"]+)"[ \t]*/\1/M/{exclusive}
diff --git a/win32/ctags_vs2013.vcxproj b/win32/ctags_vs2013.vcxproj
index 33329afd2a..a7cb00becc 100644
--- a/win32/ctags_vs2013.vcxproj
+++ b/win32/ctags_vs2013.vcxproj
@@ -156,6 +156,7 @@
+
diff --git a/win32/ctags_vs2013.vcxproj.filters b/win32/ctags_vs2013.vcxproj.filters
index 032997653b..b422bd5c27 100644
--- a/win32/ctags_vs2013.vcxproj.filters
+++ b/win32/ctags_vs2013.vcxproj.filters
@@ -204,6 +204,9 @@
Source Files\optlib
+
+ Source Files\optlib
+
Source Files\optlib