xref: /linux/samples/Kconfig (revision f5b5a164f9a11aab5b225f082b33a8f03c07516c)
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
99cfe06f8SSteven Rostedtconfig SAMPLE_TRACE_EVENTS
1096d17980SLi Zefan	tristate "Build trace_events examples -- loadable modules only"
1196d17980SLi Zefan	depends on EVENT_TRACING && m
129cfe06f8SSteven Rostedt	help
139cfe06f8SSteven Rostedt	  This build trace event example modules.
149cfe06f8SSteven Rostedt
15aad108aaSSteven Rostedt (Red Hat)config SAMPLE_TRACE_PRINTK
16aad108aaSSteven Rostedt (Red Hat)        tristate "Build trace_printk module - tests various trace_printk formats"
17aad108aaSSteven Rostedt (Red Hat)	depends on EVENT_TRACING && m
18aad108aaSSteven Rostedt (Red Hat)	help
19aad108aaSSteven Rostedt (Red Hat)	 This builds a module that calls trace_printk() and can be used to
20aad108aaSSteven Rostedt (Red Hat)	 test various trace_printk() calls from a module.
21aad108aaSSteven Rostedt (Red Hat)
22b06457c8SSteven Rostedt (VMware)config SAMPLE_FTRACE_DIRECT
23b06457c8SSteven Rostedt (VMware)	tristate "Build register_ftrace_direct() example"
24b06457c8SSteven Rostedt (VMware)	depends on DYNAMIC_FTRACE_WITH_DIRECT_CALLS && m
25b06457c8SSteven Rostedt (VMware)	depends on X86_64 # has x86_64 inlined asm
26b06457c8SSteven Rostedt (VMware)	help
27b06457c8SSteven Rostedt (VMware)	  This builds an ftrace direct function example
28b06457c8SSteven Rostedt (VMware)	  that hooks to wake_up_process and prints the parameters.
29b06457c8SSteven Rostedt (VMware)
3089ed4249SDivya Indiconfig SAMPLE_TRACE_ARRAY
3189ed4249SDivya Indi        tristate "Build sample module for kernel access to Ftrace instancess"
3289ed4249SDivya Indi	depends on EVENT_TRACING && m
3389ed4249SDivya Indi	help
3489ed4249SDivya Indi	 This builds a module that demonstrates the use of various APIs to
3589ed4249SDivya Indi	 access Ftrace instances from within the kernel.
3689ed4249SDivya Indi
3740efcb05SGreg Kroah-Hartmanconfig SAMPLE_KOBJECT
38e7e34917SMasahiro Yamada	tristate "Build kobject examples"
3940efcb05SGreg Kroah-Hartman	help
4040efcb05SGreg Kroah-Hartman	  This config option will allow you to build a number of
4140efcb05SGreg Kroah-Hartman	  different kobject sample modules showing how to use kobjects,
4240efcb05SGreg Kroah-Hartman	  ksets, and ktypes properly.
4340efcb05SGreg Kroah-Hartman
4440efcb05SGreg Kroah-Hartman	  If in doubt, say "N" here.
4540efcb05SGreg Kroah-Hartman
46804defeaSAnanth N Mavinakayanahalliconfig SAMPLE_KPROBES
47804defeaSAnanth N Mavinakayanahalli	tristate "Build kprobes examples -- loadable modules only"
48804defeaSAnanth N Mavinakayanahalli	depends on KPROBES && m
49804defeaSAnanth N Mavinakayanahalli	help
50804defeaSAnanth N Mavinakayanahalli	  This build several kprobes example modules.
51804defeaSAnanth N Mavinakayanahalli
52804defeaSAnanth N Mavinakayanahalliconfig SAMPLE_KRETPROBES
53804defeaSAnanth N Mavinakayanahalli	tristate "Build kretprobes example -- loadable modules only"
54804defeaSAnanth N Mavinakayanahalli	default m
55804defeaSAnanth N Mavinakayanahalli	depends on SAMPLE_KPROBES && KRETPROBES
56804defeaSAnanth N Mavinakayanahalli
5743203993SK.Prasadconfig SAMPLE_HW_BREAKPOINT
5843203993SK.Prasad	tristate "Build kernel hardware breakpoint examples -- loadable module only"
5943203993SK.Prasad	depends on HAVE_HW_BREAKPOINT && m
6043203993SK.Prasad	help
6143203993SK.Prasad	  This builds kernel hardware breakpoint example modules.
6243203993SK.Prasad
635bf2b193SStefani Seiboldconfig SAMPLE_KFIFO
645bf2b193SStefani Seibold	tristate "Build kfifo examples -- loadable modules only"
655bf2b193SStefani Seibold	depends on m
665bf2b193SStefani Seibold	help
675bf2b193SStefani Seibold	  This config option will allow you to build a number of
685bf2b193SStefani Seibold	  different kfifo sample modules showing how to use the
695bf2b193SStefani Seibold	  generic kfifo API.
705bf2b193SStefani Seibold
715bf2b193SStefani Seibold	  If in doubt, say "N" here.
725bf2b193SStefani Seibold
734aad8f51SJason Wesselconfig SAMPLE_KDB
7425985edcSLucas De Marchi	tristate "Build kdb command example -- loadable modules only"
754aad8f51SJason Wessel	depends on KGDB_KDB && m
764aad8f51SJason Wessel	help
774aad8f51SJason Wessel	  Build an example of how to dynamically add the hello
784aad8f51SJason Wessel	  command to the kdb shell.
794aad8f51SJason Wessel
80842891beSBjorn Anderssonconfig SAMPLE_QMI_CLIENT
81842891beSBjorn Andersson	tristate "Build qmi client sample -- loadable modules only"
82842891beSBjorn Andersson	depends on m
83842891beSBjorn Andersson	depends on ARCH_QCOM
84dea4bd19SArnd Bergmann	depends on NET
85842891beSBjorn Andersson	select QCOM_QMI_HELPERS
86842891beSBjorn Andersson	help
87842891beSBjorn Andersson	  Build an QMI client sample driver, which demonstrates how to
88842891beSBjorn Andersson	  communicate with a remote QRTR service, using QMI encoded messages.
89842891beSBjorn Andersson
90779b96d2SOhad Ben-Cohenconfig SAMPLE_RPMSG_CLIENT
91779b96d2SOhad Ben-Cohen	tristate "Build rpmsg client sample -- loadable modules only"
92779b96d2SOhad Ben-Cohen	depends on RPMSG && m
93779b96d2SOhad Ben-Cohen	help
94779b96d2SOhad Ben-Cohen	  Build an rpmsg client sample driver, which demonstrates how
95779b96d2SOhad Ben-Cohen	  to communicate with an AMP-configured remote processor over
96779b96d2SOhad Ben-Cohen	  the rpmsg bus.
97779b96d2SOhad Ben-Cohen
9812cf89b5SJosh Poimboeufconfig SAMPLE_LIVEPATCH
99439e7271SJoe Lawrence	tristate "Build live patching samples -- loadable modules only"
10012cf89b5SJosh Poimboeuf	depends on LIVEPATCH && m
10113d1cf7eSSeth Jennings	help
102439e7271SJoe Lawrence	  Build sample live patch demonstrations.
10313d1cf7eSSeth Jennings
10451798222SChristoph Hellwigconfig SAMPLE_CONFIGFS
10551798222SChristoph Hellwig	tristate "Build configfs patching sample -- loadable modules only"
10651798222SChristoph Hellwig	depends on CONFIGFS_FS && m
10751798222SChristoph Hellwig	help
10851798222SChristoph Hellwig	  Builds a sample configfs interface.
10951798222SChristoph Hellwig
11014fbff6bSArnd Bergmannconfig SAMPLE_CONNECTOR
11114fbff6bSArnd Bergmann	tristate "Build connector sample -- loadable modules only"
112e949f4c2SMasahiro Yamada	depends on CONNECTOR && HEADERS_INSTALL && m
11314fbff6bSArnd Bergmann	help
11414fbff6bSArnd Bergmann	  When enabled, this builds both a sample kernel module for
11514fbff6bSArnd Bergmann	  the connector interface and a user space tool to communicate
11614fbff6bSArnd Bergmann	  with it.
117baa293e9SMauro Carvalho Chehab	  See also Documentation/driver-api/connector.rst
11814fbff6bSArnd Bergmann
119e949f4c2SMasahiro Yamadaconfig SAMPLE_HIDRAW
120e949f4c2SMasahiro Yamada	bool "hidraw sample"
121e949f4c2SMasahiro Yamada	depends on HEADERS_INSTALL
122e949f4c2SMasahiro Yamada
123e949f4c2SMasahiro Yamadaconfig SAMPLE_PIDFD
124e949f4c2SMasahiro Yamada	bool "pidfd sample"
125e949f4c2SMasahiro Yamada	depends on HEADERS_INSTALL
126e949f4c2SMasahiro Yamada
127f6041c1dSOlof Johanssonconfig SAMPLE_SECCOMP
1287206c124SMasahiro Yamada	bool "Build seccomp sample code"
129e949f4c2SMasahiro Yamada	depends on SECCOMP_FILTER && HEADERS_INSTALL
130f6041c1dSOlof Johansson	help
131f6041c1dSOlof Johansson	  Build samples of seccomp filters using various methods of
132f6041c1dSOlof Johansson	  BPF filter construction.
133f6041c1dSOlof Johansson
13408c1a4efSAlex Williamsonconfig SAMPLE_VFIO_MDEV_MTTY
13508c1a4efSAlex Williamson	tristate "Build VFIO mtty example mediated device sample code -- loadable modules only"
13608c1a4efSAlex Williamson	depends on VFIO_MDEV_DEVICE && m
13708c1a4efSAlex Williamson	help
13808c1a4efSAlex Williamson	  Build a virtual tty sample driver for use as a VFIO
13908c1a4efSAlex Williamson	  mediated device
14008c1a4efSAlex Williamson
141d61fc96fSGerd Hoffmannconfig SAMPLE_VFIO_MDEV_MDPY
142d61fc96fSGerd Hoffmann	tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
143d61fc96fSGerd Hoffmann	depends on VFIO_MDEV_DEVICE && m
144d61fc96fSGerd Hoffmann	help
145d61fc96fSGerd Hoffmann	  Build a virtual display sample driver for use as a VFIO
146d61fc96fSGerd Hoffmann	  mediated device.  It is a simple framebuffer and supports
147d61fc96fSGerd Hoffmann	  the region display interface (VFIO_GFX_PLANE_TYPE_REGION).
148d61fc96fSGerd Hoffmann
149cacade19SGerd Hoffmannconfig SAMPLE_VFIO_MDEV_MDPY_FB
150cacade19SGerd Hoffmann	tristate "Build VFIO mdpy example guest fbdev driver -- loadable module only"
151cacade19SGerd Hoffmann	depends on FB && m
152cacade19SGerd Hoffmann	select FB_CFB_FILLRECT
153cacade19SGerd Hoffmann	select FB_CFB_COPYAREA
154cacade19SGerd Hoffmann	select FB_CFB_IMAGEBLIT
155cacade19SGerd Hoffmann	help
156cacade19SGerd Hoffmann	  Guest fbdev driver for the virtual display sample driver.
157cacade19SGerd Hoffmann
158a5e6e650SGerd Hoffmannconfig SAMPLE_VFIO_MDEV_MBOCHS
159a5e6e650SGerd Hoffmann	tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
160a5e6e650SGerd Hoffmann	depends on VFIO_MDEV_DEVICE && m
161c1abca96SArnd Bergmann	select DMA_SHARED_BUFFER
162a5e6e650SGerd Hoffmann	help
163a5e6e650SGerd Hoffmann	  Build a virtual display sample driver for use as a VFIO
164a5e6e650SGerd Hoffmann	  mediated device.  It supports the region display interface
165a5e6e650SGerd Hoffmann	  (VFIO_GFX_PLANE_TYPE_DMABUF).
166a5e6e650SGerd Hoffmann	  Emulate enough of qemu stdvga to make bochs-drm.ko happy.
167a5e6e650SGerd Hoffmann	  That is basically the vram memory bar and the bochs dispi
168a5e6e650SGerd Hoffmann	  interface vbe registers in the mmio register bar.
169a5e6e650SGerd Hoffmann	  Specifically it does *not* include any legacy vga stuff.
170a5e6e650SGerd Hoffmann	  Device looks a lot like "qemu -device secondary-vga".
171a5e6e650SGerd Hoffmann
1729762dc14SChristian Braunerconfig SAMPLE_ANDROID_BINDERFS
1739762dc14SChristian Brauner	bool "Build Android binderfs example"
1749762dc14SChristian Brauner	depends on CONFIG_ANDROID_BINDERFS
1759762dc14SChristian Brauner	help
1769762dc14SChristian Brauner	  Builds a sample program to illustrate the use of the Android binderfs
1779762dc14SChristian Brauner	  filesystem.
1789762dc14SChristian Brauner
179f1b5618eSDavid Howellsconfig SAMPLE_VFS
180f1b5618eSDavid Howells	bool "Build example programs that use new VFS system calls"
181e949f4c2SMasahiro Yamada	depends on HEADERS_INSTALL
182a528d35eSDavid Howells	help
183f1b5618eSDavid Howells	  Build example userspace programs that use new VFS system calls such
184f1b5618eSDavid Howells	  as mount API and statx().  Note that this is restricted to the x86
185f1b5618eSDavid Howells	  arch whilst it accesses system calls that aren't yet in all arches.
186a528d35eSDavid Howells
1876859eba4STomas Winklerconfig SAMPLE_INTEL_MEI
1886859eba4STomas Winkler	bool "Build example program working with intel mei driver"
1896859eba4STomas Winkler	depends on INTEL_MEI
1906859eba4STomas Winkler	help
1916859eba4STomas Winkler	  Build a sample program to work with mei device.
1926859eba4STomas Winkler
193*f5b5a164SDavid Howellsconfig SAMPLE_WATCH_QUEUE
194*f5b5a164SDavid Howells	bool "Build example /dev/watch_queue notification consumer"
195*f5b5a164SDavid Howells	depends on HEADERS_INSTALL
196*f5b5a164SDavid Howells	help
197*f5b5a164SDavid Howells	  Build example userspace program to use the new mount_notify(),
198*f5b5a164SDavid Howells	  sb_notify() syscalls and the KEYCTL_WATCH_KEY keyctl() function.
1996859eba4STomas Winkler
200267c4025SMathieu Desnoyersendif # SAMPLES
201