Kconfig 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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 build trace event example modules.
  15. config 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. config SAMPLE_FTRACE_DIRECT
  22. tristate "Build register_ftrace_direct() example"
  23. depends on DYNAMIC_FTRACE_WITH_DIRECT_CALLS && m
  24. depends on X86_64 # has x86_64 inlined asm
  25. help
  26. This builds an ftrace direct function example
  27. that hooks to wake_up_process and prints the parameters.
  28. config SAMPLE_TRACE_ARRAY
  29. tristate "Build sample module for kernel access to Ftrace instancess"
  30. depends on EVENT_TRACING && m
  31. help
  32. This builds a module that demonstrates the use of various APIs to
  33. access Ftrace instances from within the kernel.
  34. config SAMPLE_KOBJECT
  35. tristate "Build kobject examples"
  36. help
  37. This config option will allow you to build a number of
  38. different kobject sample modules showing how to use kobjects,
  39. ksets, and ktypes properly.
  40. If in doubt, say "N" here.
  41. config SAMPLE_KPROBES
  42. tristate "Build kprobes examples -- loadable modules only"
  43. depends on KPROBES && m
  44. help
  45. This build several kprobes example modules.
  46. config SAMPLE_KRETPROBES
  47. tristate "Build kretprobes example -- loadable modules only"
  48. default m
  49. depends on SAMPLE_KPROBES && KRETPROBES
  50. config 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. config SAMPLE_KFIFO
  56. tristate "Build kfifo examples -- loadable modules only"
  57. depends on m
  58. help
  59. This config option will allow you to build a number of
  60. different kfifo sample modules showing how to use the
  61. generic kfifo API.
  62. If in doubt, say "N" here.
  63. config SAMPLE_KDB
  64. tristate "Build kdb command example -- loadable modules only"
  65. depends on KGDB_KDB && m
  66. help
  67. Build an example of how to dynamically add the hello
  68. command to the kdb shell.
  69. config SAMPLE_QMI_CLIENT
  70. tristate "Build qmi client sample -- loadable modules only"
  71. depends on m
  72. depends on ARCH_QCOM
  73. depends on NET
  74. select QCOM_QMI_HELPERS
  75. help
  76. Build an QMI client sample driver, which demonstrates how to
  77. communicate with a remote QRTR service, using QMI encoded messages.
  78. config SAMPLE_RPMSG_CLIENT
  79. tristate "Build rpmsg client sample -- loadable modules only"
  80. depends on RPMSG && m
  81. help
  82. Build an rpmsg client sample driver, which demonstrates how
  83. to communicate with an AMP-configured remote processor over
  84. the rpmsg bus.
  85. config SAMPLE_LIVEPATCH
  86. tristate "Build live patching samples -- loadable modules only"
  87. depends on LIVEPATCH && m
  88. help
  89. Build sample live patch demonstrations.
  90. config SAMPLE_CONFIGFS
  91. tristate "Build configfs patching sample -- loadable modules only"
  92. depends on CONFIGFS_FS && m
  93. help
  94. Builds a sample configfs interface.
  95. config SAMPLE_CONNECTOR
  96. tristate "Build connector sample -- loadable modules only"
  97. depends on CONNECTOR && HEADERS_INSTALL && m
  98. help
  99. When enabled, this builds both a sample kernel module for
  100. the connector interface and a user space tool to communicate
  101. with it.
  102. See also Documentation/driver-api/connector.rst
  103. config SAMPLE_HIDRAW
  104. bool "hidraw sample"
  105. depends on CC_CAN_LINK && HEADERS_INSTALL
  106. config SAMPLE_PIDFD
  107. bool "pidfd sample"
  108. depends on CC_CAN_LINK && HEADERS_INSTALL
  109. config SAMPLE_SECCOMP
  110. bool "Build seccomp sample code"
  111. depends on SECCOMP_FILTER && CC_CAN_LINK && HEADERS_INSTALL
  112. help
  113. Build samples of seccomp filters using various methods of
  114. BPF filter construction.
  115. config SAMPLE_TIMER
  116. bool "Timer sample"
  117. depends on CC_CAN_LINK && HEADERS_INSTALL
  118. config SAMPLE_UHID
  119. bool "UHID sample"
  120. depends on CC_CAN_LINK && HEADERS_INSTALL
  121. help
  122. Build UHID sample program.
  123. config SAMPLE_VFIO_MDEV_MTTY
  124. tristate "Build VFIO mtty example mediated device sample code -- loadable modules only"
  125. depends on VFIO_MDEV_DEVICE && m
  126. help
  127. Build a virtual tty sample driver for use as a VFIO
  128. mediated device
  129. config SAMPLE_VFIO_MDEV_MDPY
  130. tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
  131. depends on VFIO_MDEV_DEVICE && m
  132. help
  133. Build a virtual display sample driver for use as a VFIO
  134. mediated device. It is a simple framebuffer and supports
  135. the region display interface (VFIO_GFX_PLANE_TYPE_REGION).
  136. config SAMPLE_VFIO_MDEV_MDPY_FB
  137. tristate "Build VFIO mdpy example guest fbdev driver -- loadable module only"
  138. depends on FB && m
  139. select FB_CFB_FILLRECT
  140. select FB_CFB_COPYAREA
  141. select FB_CFB_IMAGEBLIT
  142. help
  143. Guest fbdev driver for the virtual display sample driver.
  144. config SAMPLE_VFIO_MDEV_MBOCHS
  145. tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
  146. depends on VFIO_MDEV_DEVICE && m
  147. select DMA_SHARED_BUFFER
  148. help
  149. Build a virtual display sample driver for use as a VFIO
  150. mediated device. It supports the region display interface
  151. (VFIO_GFX_PLANE_TYPE_DMABUF).
  152. Emulate enough of qemu stdvga to make bochs-drm.ko happy.
  153. That is basically the vram memory bar and the bochs dispi
  154. interface vbe registers in the mmio register bar.
  155. Specifically it does *not* include any legacy vga stuff.
  156. Device looks a lot like "qemu -device secondary-vga".
  157. config SAMPLE_ANDROID_BINDERFS
  158. bool "Build Android binderfs example"
  159. depends on CC_CAN_LINK && HEADERS_INSTALL
  160. help
  161. Builds a sample program to illustrate the use of the Android binderfs
  162. filesystem.
  163. config SAMPLE_VFS
  164. bool "Build example programs that use new VFS system calls"
  165. depends on CC_CAN_LINK && HEADERS_INSTALL
  166. help
  167. Build example userspace programs that use new VFS system calls such
  168. as mount API and statx(). Note that this is restricted to the x86
  169. arch whilst it accesses system calls that aren't yet in all arches.
  170. config SAMPLE_INTEL_MEI
  171. bool "Build example program working with intel mei driver"
  172. depends on INTEL_MEI
  173. depends on CC_CAN_LINK && HEADERS_INSTALL
  174. help
  175. Build a sample program to work with mei device.
  176. config SAMPLE_WATCHDOG
  177. bool "watchdog sample"
  178. depends on CC_CAN_LINK
  179. config SAMPLE_WATCH_QUEUE
  180. bool "Build example watch_queue notification API consumer"
  181. depends on CC_CAN_LINK && HEADERS_INSTALL
  182. help
  183. Build example userspace program to use the new mount_notify(),
  184. sb_notify() syscalls and the KEYCTL_WATCH_KEY keyctl() function.
  185. endif # SAMPLES