Kconfig 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. menuconfig SAMPLES
  3. bool "Sample kernel code"
  4. help
  5. You can build and test sample kernel code here.
  6. if SAMPLES
  7. config SAMPLE_AUXDISPLAY
  8. bool "auxdisplay sample"
  9. depends on CC_CAN_LINK
  10. config SAMPLE_TRACE_EVENTS
  11. tristate "Build trace_events examples -- loadable modules only"
  12. depends on EVENT_TRACING && m
  13. help
  14. This builds the trace event example module.
  15. config SAMPLE_TRACE_CUSTOM_EVENTS
  16. tristate "Build custom trace event example -- loadable modules only"
  17. depends on EVENT_TRACING && m
  18. help
  19. This builds the custom trace event example module.
  20. config SAMPLE_TRACE_PRINTK
  21. tristate "Build trace_printk module - tests various trace_printk formats"
  22. depends on EVENT_TRACING && m
  23. help
  24. This builds a module that calls trace_printk() and can be used to
  25. test various trace_printk() calls from a module.
  26. config SAMPLE_FTRACE_DIRECT
  27. tristate "Build register_ftrace_direct() example"
  28. depends on DYNAMIC_FTRACE_WITH_DIRECT_CALLS && m
  29. depends on HAVE_SAMPLE_FTRACE_DIRECT
  30. help
  31. This builds an ftrace direct function example
  32. that hooks to wake_up_process and prints the parameters.
  33. config SAMPLE_FTRACE_DIRECT_MULTI
  34. tristate "Build register_ftrace_direct_multi() example"
  35. depends on DYNAMIC_FTRACE_WITH_DIRECT_CALLS && m
  36. depends on HAVE_SAMPLE_FTRACE_DIRECT_MULTI
  37. help
  38. This builds an ftrace direct function example
  39. that hooks to wake_up_process and schedule, and prints
  40. the function addresses.
  41. config SAMPLE_TRACE_ARRAY
  42. tristate "Build sample module for kernel access to Ftrace instancess"
  43. depends on EVENT_TRACING && m
  44. help
  45. This builds a module that demonstrates the use of various APIs to
  46. access Ftrace instances from within the kernel.
  47. config SAMPLE_KOBJECT
  48. tristate "Build kobject examples"
  49. help
  50. This config option will allow you to build a number of
  51. different kobject sample modules showing how to use kobjects,
  52. ksets, and ktypes properly.
  53. If in doubt, say "N" here.
  54. config SAMPLE_KPROBES
  55. tristate "Build kprobes examples -- loadable modules only"
  56. depends on KPROBES && m
  57. help
  58. This build several kprobes example modules.
  59. config SAMPLE_KRETPROBES
  60. tristate "Build kretprobes example -- loadable modules only"
  61. default m
  62. depends on SAMPLE_KPROBES && KRETPROBES
  63. config SAMPLE_HW_BREAKPOINT
  64. tristate "Build kernel hardware breakpoint examples -- loadable module only"
  65. depends on HAVE_HW_BREAKPOINT && m
  66. help
  67. This builds kernel hardware breakpoint example modules.
  68. config SAMPLE_FPROBE
  69. tristate "Build fprobe examples -- loadable modules only"
  70. depends on FPROBE && m
  71. help
  72. This builds a fprobe example module. This module has an option 'symbol'.
  73. You can specify a probed symbol or symbols separated with ','.
  74. config SAMPLE_KFIFO
  75. tristate "Build kfifo examples -- loadable modules only"
  76. depends on m
  77. help
  78. This config option will allow you to build a number of
  79. different kfifo sample modules showing how to use the
  80. generic kfifo API.
  81. If in doubt, say "N" here.
  82. config SAMPLE_KDB
  83. tristate "Build kdb command example -- loadable modules only"
  84. depends on KGDB_KDB && m
  85. help
  86. Build an example of how to dynamically add the hello
  87. command to the kdb shell.
  88. config SAMPLE_QMI_CLIENT
  89. tristate "Build qmi client sample -- loadable modules only"
  90. depends on m
  91. depends on ARCH_QCOM
  92. depends on NET
  93. select QCOM_QMI_HELPERS
  94. help
  95. Build an QMI client sample driver, which demonstrates how to
  96. communicate with a remote QRTR service, using QMI encoded messages.
  97. config SAMPLE_RPMSG_CLIENT
  98. tristate "Build rpmsg client sample -- loadable modules only"
  99. depends on RPMSG && m
  100. help
  101. Build an rpmsg client sample driver, which demonstrates how
  102. to communicate with an AMP-configured remote processor over
  103. the rpmsg bus.
  104. config SAMPLE_LIVEPATCH
  105. tristate "Build live patching samples -- loadable modules only"
  106. depends on LIVEPATCH && m
  107. help
  108. Build sample live patch demonstrations.
  109. config SAMPLE_CONFIGFS
  110. tristate "Build configfs patching sample -- loadable modules only"
  111. depends on CONFIGFS_FS && m
  112. help
  113. Builds a sample configfs interface.
  114. config SAMPLE_CONNECTOR
  115. tristate "Build connector sample -- loadable modules only"
  116. depends on CONNECTOR && HEADERS_INSTALL && m
  117. help
  118. When enabled, this builds both a sample kernel module for
  119. the connector interface and a user space tool to communicate
  120. with it.
  121. See also Documentation/driver-api/connector.rst
  122. config SAMPLE_FANOTIFY_ERROR
  123. bool "Build fanotify error monitoring sample"
  124. depends on FANOTIFY && CC_CAN_LINK && HEADERS_INSTALL
  125. help
  126. When enabled, this builds an example code that uses the
  127. FAN_FS_ERROR fanotify mechanism to monitor filesystem
  128. errors.
  129. See also Documentation/admin-guide/filesystem-monitoring.rst.
  130. config SAMPLE_HIDRAW
  131. bool "hidraw sample"
  132. depends on CC_CAN_LINK && HEADERS_INSTALL
  133. config SAMPLE_LANDLOCK
  134. bool "Landlock example"
  135. depends on CC_CAN_LINK && HEADERS_INSTALL
  136. help
  137. Build a simple Landlock sandbox manager able to start a process
  138. restricted by a user-defined filesystem access control policy.
  139. config SAMPLE_PIDFD
  140. bool "pidfd sample"
  141. depends on CC_CAN_LINK && HEADERS_INSTALL
  142. config SAMPLE_SECCOMP
  143. bool "Build seccomp sample code"
  144. depends on SECCOMP_FILTER && CC_CAN_LINK && HEADERS_INSTALL
  145. help
  146. Build samples of seccomp filters using various methods of
  147. BPF filter construction.
  148. config SAMPLE_TIMER
  149. bool "Timer sample"
  150. depends on CC_CAN_LINK && HEADERS_INSTALL
  151. config SAMPLE_UHID
  152. bool "UHID sample"
  153. depends on CC_CAN_LINK && HEADERS_INSTALL
  154. help
  155. Build UHID sample program.
  156. config SAMPLE_VFIO_MDEV_MTTY
  157. tristate "Build VFIO mtty example mediated device sample code -- loadable modules only"
  158. depends on VFIO_MDEV && m
  159. help
  160. Build a virtual tty sample driver for use as a VFIO
  161. mediated device
  162. config SAMPLE_VFIO_MDEV_MDPY
  163. tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
  164. depends on VFIO_MDEV && m
  165. help
  166. Build a virtual display sample driver for use as a VFIO
  167. mediated device. It is a simple framebuffer and supports
  168. the region display interface (VFIO_GFX_PLANE_TYPE_REGION).
  169. config SAMPLE_VFIO_MDEV_MDPY_FB
  170. tristate "Build VFIO mdpy example guest fbdev driver -- loadable module only"
  171. depends on FB && m
  172. select FB_CFB_FILLRECT
  173. select FB_CFB_COPYAREA
  174. select FB_CFB_IMAGEBLIT
  175. help
  176. Guest fbdev driver for the virtual display sample driver.
  177. config SAMPLE_VFIO_MDEV_MBOCHS
  178. tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
  179. depends on VFIO_MDEV && m
  180. select DMA_SHARED_BUFFER
  181. help
  182. Build a virtual display sample driver for use as a VFIO
  183. mediated device. It supports the region display interface
  184. (VFIO_GFX_PLANE_TYPE_DMABUF).
  185. Emulate enough of qemu stdvga to make bochs-drm.ko happy.
  186. That is basically the vram memory bar and the bochs dispi
  187. interface vbe registers in the mmio register bar.
  188. Specifically it does *not* include any legacy vga stuff.
  189. Device looks a lot like "qemu -device secondary-vga".
  190. config SAMPLE_ANDROID_BINDERFS
  191. bool "Build Android binderfs example"
  192. depends on CC_CAN_LINK && HEADERS_INSTALL
  193. help
  194. Builds a sample program to illustrate the use of the Android binderfs
  195. filesystem.
  196. config SAMPLE_VFS
  197. bool "Build example programs that use new VFS system calls"
  198. depends on CC_CAN_LINK && HEADERS_INSTALL
  199. help
  200. Build example userspace programs that use new VFS system calls such
  201. as mount API and statx(). Note that this is restricted to the x86
  202. arch whilst it accesses system calls that aren't yet in all arches.
  203. config SAMPLE_INTEL_MEI
  204. bool "Build example program working with intel mei driver"
  205. depends on INTEL_MEI
  206. depends on CC_CAN_LINK && HEADERS_INSTALL
  207. help
  208. Build a sample program to work with mei device.
  209. config SAMPLE_WATCHDOG
  210. bool "watchdog sample"
  211. depends on CC_CAN_LINK
  212. config SAMPLE_WATCH_QUEUE
  213. bool "Build example watch_queue notification API consumer"
  214. depends on CC_CAN_LINK && HEADERS_INSTALL
  215. help
  216. Build example userspace program to use the new mount_notify(),
  217. sb_notify() syscalls and the KEYCTL_WATCH_KEY keyctl() function.
  218. config SAMPLE_CORESIGHT_SYSCFG
  219. tristate "Build example loadable module for CoreSight config"
  220. depends on CORESIGHT && m
  221. help
  222. Build an example loadable module that adds new CoreSight features
  223. and configuration using the CoreSight system configuration API.
  224. This demonstrates how a user may create their own CoreSight
  225. configurations and easily load them into the system at runtime.
  226. config SAMPLE_GUNYAH
  227. bool "Build example Gunyah Virtual Machine Manager"
  228. depends on CC_CAN_LINK && HEADERS_INSTALL
  229. depends on GUNYAH
  230. help
  231. Build an example Gunyah VMM userspace program capable of launching
  232. a basic virtual machine under the Gunyah hypervisor.
  233. This demonstrates how to create a virtual machine under the Gunyah
  234. hypervisor.
  235. source "samples/rust/Kconfig"
  236. endif # SAMPLES
  237. config HAVE_SAMPLE_FTRACE_DIRECT
  238. bool
  239. config HAVE_SAMPLE_FTRACE_DIRECT_MULTI
  240. bool