blob: 65b5967dac0c0f08baf1cc0030fd483749d2b8b7 [file] [log] [blame]
Thomas Gleixnerec8f24b2019-05-19 13:07:45 +01001# SPDX-License-Identifier: GPL-2.0-only
Mathieu Desnoyers267c4022007-10-18 23:41:07 -07002menuconfig SAMPLES
3 bool "Sample kernel code"
4 help
5 You can build and test sample kernel code here.
6
7if SAMPLES
8
Steven Rostedt9cfe06f2009-04-14 21:37:03 -04009config SAMPLE_TRACE_EVENTS
Li Zefan96d17982009-05-06 10:32:32 +080010 tristate "Build trace_events examples -- loadable modules only"
11 depends on EVENT_TRACING && m
Steven Rostedt9cfe06f2009-04-14 21:37:03 -040012 help
13 This build trace event example modules.
14
Steven Rostedt (Red Hat)aad108a2016-06-17 14:50:23 -040015config SAMPLE_TRACE_PRINTK
16 tristate "Build trace_printk module - tests various trace_printk formats"
17 depends on EVENT_TRACING && m
18 help
19 This builds a module that calls trace_printk() and can be used to
20 test various trace_printk() calls from a module.
21
Steven Rostedt (VMware)b06457c2019-11-08 13:12:33 -050022config SAMPLE_FTRACE_DIRECT
23 tristate "Build register_ftrace_direct() example"
24 depends on DYNAMIC_FTRACE_WITH_DIRECT_CALLS && m
25 depends on X86_64 # has x86_64 inlined asm
26 help
27 This builds an ftrace direct function example
28 that hooks to wake_up_process and prints the parameters.
29
Greg Kroah-Hartman40efcb02007-11-27 11:28:26 -080030config SAMPLE_KOBJECT
Masahiro Yamadae7e34912019-04-27 12:33:40 +090031 tristate "Build kobject examples"
Greg Kroah-Hartman40efcb02007-11-27 11:28:26 -080032 help
33 This config option will allow you to build a number of
34 different kobject sample modules showing how to use kobjects,
35 ksets, and ktypes properly.
36
37 If in doubt, say "N" here.
38
Ananth N Mavinakayanahalli804defe2008-03-04 14:28:38 -080039config SAMPLE_KPROBES
40 tristate "Build kprobes examples -- loadable modules only"
41 depends on KPROBES && m
42 help
43 This build several kprobes example modules.
44
45config SAMPLE_KRETPROBES
46 tristate "Build kretprobes example -- loadable modules only"
47 default m
48 depends on SAMPLE_KPROBES && KRETPROBES
49
K.Prasad43203992009-06-01 23:46:20 +053050config SAMPLE_HW_BREAKPOINT
51 tristate "Build kernel hardware breakpoint examples -- loadable module only"
52 depends on HAVE_HW_BREAKPOINT && m
53 help
54 This builds kernel hardware breakpoint example modules.
55
Stefani Seibold5bf2b192010-08-10 18:03:39 -070056config SAMPLE_KFIFO
57 tristate "Build kfifo examples -- loadable modules only"
58 depends on m
59 help
60 This config option will allow you to build a number of
61 different kfifo sample modules showing how to use the
62 generic kfifo API.
63
64 If in doubt, say "N" here.
65
Jason Wessel4aad8f52010-10-25 10:14:05 -050066config SAMPLE_KDB
Lucas De Marchi25985ed2011-03-30 22:57:33 -030067 tristate "Build kdb command example -- loadable modules only"
Jason Wessel4aad8f52010-10-25 10:14:05 -050068 depends on KGDB_KDB && m
69 help
70 Build an example of how to dynamically add the hello
71 command to the kdb shell.
72
Bjorn Andersson842891b2017-06-26 09:02:28 -070073config SAMPLE_QMI_CLIENT
74 tristate "Build qmi client sample -- loadable modules only"
75 depends on m
76 depends on ARCH_QCOM
Arnd Bergmanndea4bd12018-02-22 16:57:38 +010077 depends on NET
Bjorn Andersson842891b2017-06-26 09:02:28 -070078 select QCOM_QMI_HELPERS
79 help
80 Build an QMI client sample driver, which demonstrates how to
81 communicate with a remote QRTR service, using QMI encoded messages.
82
Ohad Ben-Cohen779b96d2011-10-20 21:41:24 +020083config SAMPLE_RPMSG_CLIENT
84 tristate "Build rpmsg client sample -- loadable modules only"
85 depends on RPMSG && m
86 help
87 Build an rpmsg client sample driver, which demonstrates how
88 to communicate with an AMP-configured remote processor over
89 the rpmsg bus.
90
Josh Poimboeuf12cf89b2015-02-03 16:45:18 -060091config SAMPLE_LIVEPATCH
Joe Lawrence439e7272017-08-31 16:37:41 -040092 tristate "Build live patching samples -- loadable modules only"
Josh Poimboeuf12cf89b2015-02-03 16:45:18 -060093 depends on LIVEPATCH && m
Seth Jennings13d1cf72014-12-16 11:58:20 -060094 help
Joe Lawrence439e7272017-08-31 16:37:41 -040095 Build sample live patch demonstrations.
Seth Jennings13d1cf72014-12-16 11:58:20 -060096
Christoph Hellwig51798222015-10-03 15:32:59 +020097config SAMPLE_CONFIGFS
98 tristate "Build configfs patching sample -- loadable modules only"
99 depends on CONFIGFS_FS && m
100 help
101 Builds a sample configfs interface.
102
Arnd Bergmann14fbff62016-04-25 18:03:08 +0200103config SAMPLE_CONNECTOR
104 tristate "Build connector sample -- loadable modules only"
Masahiro Yamadae949f4c2019-06-04 19:13:59 +0900105 depends on CONNECTOR && HEADERS_INSTALL && m
Arnd Bergmann14fbff62016-04-25 18:03:08 +0200106 help
107 When enabled, this builds both a sample kernel module for
108 the connector interface and a user space tool to communicate
109 with it.
Mauro Carvalho Chehabbaa293e2019-06-27 15:39:22 -0300110 See also Documentation/driver-api/connector.rst
Arnd Bergmann14fbff62016-04-25 18:03:08 +0200111
Masahiro Yamadae949f4c2019-06-04 19:13:59 +0900112config SAMPLE_HIDRAW
113 bool "hidraw sample"
114 depends on HEADERS_INSTALL
115
116config SAMPLE_PIDFD
117 bool "pidfd sample"
118 depends on HEADERS_INSTALL
119
Olof Johanssonf6041c12016-07-05 23:53:19 -0700120config SAMPLE_SECCOMP
Masahiro Yamada7206c122019-04-27 12:33:39 +0900121 bool "Build seccomp sample code"
Masahiro Yamadae949f4c2019-06-04 19:13:59 +0900122 depends on SECCOMP_FILTER && HEADERS_INSTALL
Olof Johanssonf6041c12016-07-05 23:53:19 -0700123 help
124 Build samples of seccomp filters using various methods of
125 BPF filter construction.
126
Alex Williamson08c1a4e2016-12-30 08:13:30 -0700127config SAMPLE_VFIO_MDEV_MTTY
128 tristate "Build VFIO mtty example mediated device sample code -- loadable modules only"
129 depends on VFIO_MDEV_DEVICE && m
130 help
131 Build a virtual tty sample driver for use as a VFIO
132 mediated device
133
Gerd Hoffmannd61fc96f2018-05-11 09:05:03 -0600134config SAMPLE_VFIO_MDEV_MDPY
135 tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
136 depends on VFIO_MDEV_DEVICE && m
137 help
138 Build a virtual display sample driver for use as a VFIO
139 mediated device. It is a simple framebuffer and supports
140 the region display interface (VFIO_GFX_PLANE_TYPE_REGION).
141
Gerd Hoffmanncacade12018-05-11 09:05:04 -0600142config SAMPLE_VFIO_MDEV_MDPY_FB
143 tristate "Build VFIO mdpy example guest fbdev driver -- loadable module only"
144 depends on FB && m
145 select FB_CFB_FILLRECT
146 select FB_CFB_COPYAREA
147 select FB_CFB_IMAGEBLIT
148 help
149 Guest fbdev driver for the virtual display sample driver.
150
Gerd Hoffmanna5e6e652018-05-11 09:05:04 -0600151config SAMPLE_VFIO_MDEV_MBOCHS
152 tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
153 depends on VFIO_MDEV_DEVICE && m
Arnd Bergmannc1abca92018-05-30 23:37:31 +0200154 select DMA_SHARED_BUFFER
Gerd Hoffmanna5e6e652018-05-11 09:05:04 -0600155 help
156 Build a virtual display sample driver for use as a VFIO
157 mediated device. It supports the region display interface
158 (VFIO_GFX_PLANE_TYPE_DMABUF).
159 Emulate enough of qemu stdvga to make bochs-drm.ko happy.
160 That is basically the vram memory bar and the bochs dispi
161 interface vbe registers in the mmio register bar.
162 Specifically it does *not* include any legacy vga stuff.
163 Device looks a lot like "qemu -device secondary-vga".
164
Christian Brauner9762dc12019-01-11 14:41:00 +0100165config SAMPLE_ANDROID_BINDERFS
166 bool "Build Android binderfs example"
167 depends on CONFIG_ANDROID_BINDERFS
168 help
169 Builds a sample program to illustrate the use of the Android binderfs
170 filesystem.
171
David Howellsf1b56182018-11-01 23:36:32 +0000172config SAMPLE_VFS
173 bool "Build example programs that use new VFS system calls"
Masahiro Yamadae949f4c2019-06-04 19:13:59 +0900174 depends on HEADERS_INSTALL
David Howellsa528d352017-01-31 16:46:22 +0000175 help
David Howellsf1b56182018-11-01 23:36:32 +0000176 Build example userspace programs that use new VFS system calls such
177 as mount API and statx(). Note that this is restricted to the x86
178 arch whilst it accesses system calls that aren't yet in all arches.
David Howellsa528d352017-01-31 16:46:22 +0000179
Mathieu Desnoyers267c4022007-10-18 23:41:07 -0700180endif # SAMPLES