xref: /linux/samples/Kconfig (revision fca5e94921d50d13ee8720ce58a352e7fc0228bf)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
2267c4025SMathieu Desnoyersmenuconfig SAMPLES
3267c4025SMathieu Desnoyers	bool "Sample kernel code"
4267c4025SMathieu Desnoyers	help
5267c4025SMathieu Desnoyers	  You can build and test sample kernel code here.
6267c4025SMathieu Desnoyers
7267c4025SMathieu Desnoyersif SAMPLES
8267c4025SMathieu Desnoyers
987ffbba9SMasahiro Yamadaconfig SAMPLE_AUXDISPLAY
1087ffbba9SMasahiro Yamada	bool "auxdisplay sample"
1187ffbba9SMasahiro Yamada	depends on CC_CAN_LINK
1287ffbba9SMasahiro Yamada
139cfe06f8SSteven Rostedtconfig SAMPLE_TRACE_EVENTS
1496d17980SLi Zefan	tristate "Build trace_events examples -- loadable modules only"
1596d17980SLi Zefan	depends on EVENT_TRACING && m
169cfe06f8SSteven Rostedt	help
179cfe06f8SSteven Rostedt	  This build trace event example modules.
189cfe06f8SSteven Rostedt
19aad108aaSSteven Rostedt (Red Hat)config SAMPLE_TRACE_PRINTK
20aad108aaSSteven Rostedt (Red Hat)        tristate "Build trace_printk module - tests various trace_printk formats"
21aad108aaSSteven Rostedt (Red Hat)	depends on EVENT_TRACING && m
22aad108aaSSteven Rostedt (Red Hat)	help
23aad108aaSSteven Rostedt (Red Hat)	 This builds a module that calls trace_printk() and can be used to
24aad108aaSSteven Rostedt (Red Hat)	 test various trace_printk() calls from a module.
25aad108aaSSteven Rostedt (Red Hat)
26b06457c8SSteven Rostedt (VMware)config SAMPLE_FTRACE_DIRECT
27b06457c8SSteven Rostedt (VMware)	tristate "Build register_ftrace_direct() example"
28b06457c8SSteven Rostedt (VMware)	depends on DYNAMIC_FTRACE_WITH_DIRECT_CALLS && m
29b06457c8SSteven Rostedt (VMware)	depends on X86_64 # has x86_64 inlined asm
30b06457c8SSteven Rostedt (VMware)	help
31b06457c8SSteven Rostedt (VMware)	  This builds an ftrace direct function example
32b06457c8SSteven Rostedt (VMware)	  that hooks to wake_up_process and prints the parameters.
33b06457c8SSteven Rostedt (VMware)
3489ed4249SDivya Indiconfig SAMPLE_TRACE_ARRAY
3589ed4249SDivya Indi        tristate "Build sample module for kernel access to Ftrace instancess"
3689ed4249SDivya Indi	depends on EVENT_TRACING && m
3789ed4249SDivya Indi	help
3889ed4249SDivya Indi	 This builds a module that demonstrates the use of various APIs to
3989ed4249SDivya Indi	 access Ftrace instances from within the kernel.
4089ed4249SDivya Indi
4140efcb05SGreg Kroah-Hartmanconfig SAMPLE_KOBJECT
42e7e34917SMasahiro Yamada	tristate "Build kobject examples"
4340efcb05SGreg Kroah-Hartman	help
4440efcb05SGreg Kroah-Hartman	  This config option will allow you to build a number of
4540efcb05SGreg Kroah-Hartman	  different kobject sample modules showing how to use kobjects,
4640efcb05SGreg Kroah-Hartman	  ksets, and ktypes properly.
4740efcb05SGreg Kroah-Hartman
4840efcb05SGreg Kroah-Hartman	  If in doubt, say "N" here.
4940efcb05SGreg Kroah-Hartman
50804defeaSAnanth N Mavinakayanahalliconfig SAMPLE_KPROBES
51804defeaSAnanth N Mavinakayanahalli	tristate "Build kprobes examples -- loadable modules only"
52804defeaSAnanth N Mavinakayanahalli	depends on KPROBES && m
53804defeaSAnanth N Mavinakayanahalli	help
54804defeaSAnanth N Mavinakayanahalli	  This build several kprobes example modules.
55804defeaSAnanth N Mavinakayanahalli
56804defeaSAnanth N Mavinakayanahalliconfig SAMPLE_KRETPROBES
57804defeaSAnanth N Mavinakayanahalli	tristate "Build kretprobes example -- loadable modules only"
58804defeaSAnanth N Mavinakayanahalli	default m
59804defeaSAnanth N Mavinakayanahalli	depends on SAMPLE_KPROBES && KRETPROBES
60804defeaSAnanth N Mavinakayanahalli
6143203993SK.Prasadconfig SAMPLE_HW_BREAKPOINT
6243203993SK.Prasad	tristate "Build kernel hardware breakpoint examples -- loadable module only"
6343203993SK.Prasad	depends on HAVE_HW_BREAKPOINT && m
6443203993SK.Prasad	help
6543203993SK.Prasad	  This builds kernel hardware breakpoint example modules.
6643203993SK.Prasad
675bf2b193SStefani Seiboldconfig SAMPLE_KFIFO
685bf2b193SStefani Seibold	tristate "Build kfifo examples -- loadable modules only"
695bf2b193SStefani Seibold	depends on m
705bf2b193SStefani Seibold	help
715bf2b193SStefani Seibold	  This config option will allow you to build a number of
725bf2b193SStefani Seibold	  different kfifo sample modules showing how to use the
735bf2b193SStefani Seibold	  generic kfifo API.
745bf2b193SStefani Seibold
755bf2b193SStefani Seibold	  If in doubt, say "N" here.
765bf2b193SStefani Seibold
774aad8f51SJason Wesselconfig SAMPLE_KDB
7825985edcSLucas De Marchi	tristate "Build kdb command example -- loadable modules only"
794aad8f51SJason Wessel	depends on KGDB_KDB && m
804aad8f51SJason Wessel	help
814aad8f51SJason Wessel	  Build an example of how to dynamically add the hello
824aad8f51SJason Wessel	  command to the kdb shell.
834aad8f51SJason Wessel
84842891beSBjorn Anderssonconfig SAMPLE_QMI_CLIENT
85842891beSBjorn Andersson	tristate "Build qmi client sample -- loadable modules only"
86842891beSBjorn Andersson	depends on m
87842891beSBjorn Andersson	depends on ARCH_QCOM
88dea4bd19SArnd Bergmann	depends on NET
89842891beSBjorn Andersson	select QCOM_QMI_HELPERS
90842891beSBjorn Andersson	help
91842891beSBjorn Andersson	  Build an QMI client sample driver, which demonstrates how to
92842891beSBjorn Andersson	  communicate with a remote QRTR service, using QMI encoded messages.
93842891beSBjorn Andersson
94779b96d2SOhad Ben-Cohenconfig SAMPLE_RPMSG_CLIENT
95779b96d2SOhad Ben-Cohen	tristate "Build rpmsg client sample -- loadable modules only"
96779b96d2SOhad Ben-Cohen	depends on RPMSG && m
97779b96d2SOhad Ben-Cohen	help
98779b96d2SOhad Ben-Cohen	  Build an rpmsg client sample driver, which demonstrates how
99779b96d2SOhad Ben-Cohen	  to communicate with an AMP-configured remote processor over
100779b96d2SOhad Ben-Cohen	  the rpmsg bus.
101779b96d2SOhad Ben-Cohen
10212cf89b5SJosh Poimboeufconfig SAMPLE_LIVEPATCH
103439e7271SJoe Lawrence	tristate "Build live patching samples -- loadable modules only"
10412cf89b5SJosh Poimboeuf	depends on LIVEPATCH && m
10513d1cf7eSSeth Jennings	help
106439e7271SJoe Lawrence	  Build sample live patch demonstrations.
10713d1cf7eSSeth Jennings
10851798222SChristoph Hellwigconfig SAMPLE_CONFIGFS
10951798222SChristoph Hellwig	tristate "Build configfs patching sample -- loadable modules only"
11051798222SChristoph Hellwig	depends on CONFIGFS_FS && m
11151798222SChristoph Hellwig	help
11251798222SChristoph Hellwig	  Builds a sample configfs interface.
11351798222SChristoph Hellwig
11414fbff6bSArnd Bergmannconfig SAMPLE_CONNECTOR
11514fbff6bSArnd Bergmann	tristate "Build connector sample -- loadable modules only"
116e949f4c2SMasahiro Yamada	depends on CONNECTOR && HEADERS_INSTALL && m
11714fbff6bSArnd Bergmann	help
11814fbff6bSArnd Bergmann	  When enabled, this builds both a sample kernel module for
11914fbff6bSArnd Bergmann	  the connector interface and a user space tool to communicate
12014fbff6bSArnd Bergmann	  with it.
121baa293e9SMauro Carvalho Chehab	  See also Documentation/driver-api/connector.rst
12214fbff6bSArnd Bergmann
123e949f4c2SMasahiro Yamadaconfig SAMPLE_HIDRAW
124e949f4c2SMasahiro Yamada	bool "hidraw sample"
12582d00a93SMasahiro Yamada	depends on CC_CAN_LINK && HEADERS_INSTALL
126e949f4c2SMasahiro Yamada
127e949f4c2SMasahiro Yamadaconfig SAMPLE_PIDFD
128e949f4c2SMasahiro Yamada	bool "pidfd sample"
12960fb0b12SMasahiro Yamada	depends on CC_CAN_LINK && HEADERS_INSTALL
130e949f4c2SMasahiro Yamada
131f6041c1dSOlof Johanssonconfig SAMPLE_SECCOMP
1327206c124SMasahiro Yamada	bool "Build seccomp sample code"
133f59e7668SMasahiro Yamada	depends on SECCOMP_FILTER && CC_CAN_LINK && HEADERS_INSTALL
134f6041c1dSOlof Johansson	help
135f6041c1dSOlof Johansson	  Build samples of seccomp filters using various methods of
136f6041c1dSOlof Johansson	  BPF filter construction.
137f6041c1dSOlof Johansson
138b98ccc71SMasahiro Yamadaconfig SAMPLE_TIMER
139b98ccc71SMasahiro Yamada	bool "Timer sample"
140b98ccc71SMasahiro Yamada	depends on CC_CAN_LINK && HEADERS_INSTALL
141b98ccc71SMasahiro Yamada
14287ecdf4fSMasahiro Yamadaconfig SAMPLE_UHID
14387ecdf4fSMasahiro Yamada	bool "UHID sample"
14487ecdf4fSMasahiro Yamada	depends on CC_CAN_LINK && HEADERS_INSTALL
14587ecdf4fSMasahiro Yamada	help
14687ecdf4fSMasahiro Yamada	  Build UHID sample program.
14787ecdf4fSMasahiro Yamada
14808c1a4efSAlex Williamsonconfig SAMPLE_VFIO_MDEV_MTTY
14908c1a4efSAlex Williamson	tristate "Build VFIO mtty example mediated device sample code -- loadable modules only"
15008c1a4efSAlex Williamson	depends on VFIO_MDEV_DEVICE && m
15108c1a4efSAlex Williamson	help
15208c1a4efSAlex Williamson	  Build a virtual tty sample driver for use as a VFIO
15308c1a4efSAlex Williamson	  mediated device
15408c1a4efSAlex Williamson
155d61fc96fSGerd Hoffmannconfig SAMPLE_VFIO_MDEV_MDPY
156d61fc96fSGerd Hoffmann	tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
157d61fc96fSGerd Hoffmann	depends on VFIO_MDEV_DEVICE && m
158d61fc96fSGerd Hoffmann	help
159d61fc96fSGerd Hoffmann	  Build a virtual display sample driver for use as a VFIO
160d61fc96fSGerd Hoffmann	  mediated device.  It is a simple framebuffer and supports
161d61fc96fSGerd Hoffmann	  the region display interface (VFIO_GFX_PLANE_TYPE_REGION).
162d61fc96fSGerd Hoffmann
163cacade19SGerd Hoffmannconfig SAMPLE_VFIO_MDEV_MDPY_FB
164cacade19SGerd Hoffmann	tristate "Build VFIO mdpy example guest fbdev driver -- loadable module only"
165cacade19SGerd Hoffmann	depends on FB && m
166cacade19SGerd Hoffmann	select FB_CFB_FILLRECT
167cacade19SGerd Hoffmann	select FB_CFB_COPYAREA
168cacade19SGerd Hoffmann	select FB_CFB_IMAGEBLIT
169cacade19SGerd Hoffmann	help
170cacade19SGerd Hoffmann	  Guest fbdev driver for the virtual display sample driver.
171cacade19SGerd Hoffmann
172a5e6e650SGerd Hoffmannconfig SAMPLE_VFIO_MDEV_MBOCHS
173a5e6e650SGerd Hoffmann	tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
174a5e6e650SGerd Hoffmann	depends on VFIO_MDEV_DEVICE && m
175c1abca96SArnd Bergmann	select DMA_SHARED_BUFFER
176a5e6e650SGerd Hoffmann	help
177a5e6e650SGerd Hoffmann	  Build a virtual display sample driver for use as a VFIO
178a5e6e650SGerd Hoffmann	  mediated device.  It supports the region display interface
179a5e6e650SGerd Hoffmann	  (VFIO_GFX_PLANE_TYPE_DMABUF).
180a5e6e650SGerd Hoffmann	  Emulate enough of qemu stdvga to make bochs-drm.ko happy.
181a5e6e650SGerd Hoffmann	  That is basically the vram memory bar and the bochs dispi
182a5e6e650SGerd Hoffmann	  interface vbe registers in the mmio register bar.
183a5e6e650SGerd Hoffmann	  Specifically it does *not* include any legacy vga stuff.
184a5e6e650SGerd Hoffmann	  Device looks a lot like "qemu -device secondary-vga".
185a5e6e650SGerd Hoffmann
1869762dc14SChristian Braunerconfig SAMPLE_ANDROID_BINDERFS
1879762dc14SChristian Brauner	bool "Build Android binderfs example"
188*fca5e949SMasahiro Yamada	depends on CC_CAN_LINK && HEADERS_INSTALL
1899762dc14SChristian Brauner	help
1909762dc14SChristian Brauner	  Builds a sample program to illustrate the use of the Android binderfs
1919762dc14SChristian Brauner	  filesystem.
1929762dc14SChristian Brauner
193f1b5618eSDavid Howellsconfig SAMPLE_VFS
194f1b5618eSDavid Howells	bool "Build example programs that use new VFS system calls"
19528949b84SMasahiro Yamada	depends on CC_CAN_LINK && HEADERS_INSTALL
196a528d35eSDavid Howells	help
197f1b5618eSDavid Howells	  Build example userspace programs that use new VFS system calls such
198f1b5618eSDavid Howells	  as mount API and statx().  Note that this is restricted to the x86
199f1b5618eSDavid Howells	  arch whilst it accesses system calls that aren't yet in all arches.
200a528d35eSDavid Howells
2016859eba4STomas Winklerconfig SAMPLE_INTEL_MEI
2026859eba4STomas Winkler	bool "Build example program working with intel mei driver"
2036859eba4STomas Winkler	depends on INTEL_MEI
204c4c10996SMasahiro Yamada	depends on CC_CAN_LINK && HEADERS_INSTALL
2056859eba4STomas Winkler	help
2066859eba4STomas Winkler	  Build a sample program to work with mei device.
2076859eba4STomas Winkler
20888a8e278SMasahiro Yamadaconfig SAMPLE_WATCHDOG
20988a8e278SMasahiro Yamada	bool "watchdog sample"
21088a8e278SMasahiro Yamada	depends on CC_CAN_LINK
2116859eba4STomas Winkler
212267c4025SMathieu Desnoyersendif # SAMPLES
213