18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_cimenuconfig SAMPLES
38c2ecf20Sopenharmony_ci	bool "Sample kernel code"
48c2ecf20Sopenharmony_ci	help
58c2ecf20Sopenharmony_ci	  You can build and test sample kernel code here.
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciif SAMPLES
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciconfig SAMPLE_AUXDISPLAY
108c2ecf20Sopenharmony_ci	bool "auxdisplay sample"
118c2ecf20Sopenharmony_ci	depends on CC_CAN_LINK
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ciconfig SAMPLE_TRACE_EVENTS
148c2ecf20Sopenharmony_ci	tristate "Build trace_events examples -- loadable modules only"
158c2ecf20Sopenharmony_ci	depends on EVENT_TRACING && m
168c2ecf20Sopenharmony_ci	help
178c2ecf20Sopenharmony_ci	  This build trace event example modules.
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciconfig SAMPLE_TRACE_PRINTK
208c2ecf20Sopenharmony_ci        tristate "Build trace_printk module - tests various trace_printk formats"
218c2ecf20Sopenharmony_ci	depends on EVENT_TRACING && m
228c2ecf20Sopenharmony_ci	help
238c2ecf20Sopenharmony_ci	 This builds a module that calls trace_printk() and can be used to
248c2ecf20Sopenharmony_ci	 test various trace_printk() calls from a module.
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ciconfig SAMPLE_FTRACE_DIRECT
278c2ecf20Sopenharmony_ci	tristate "Build register_ftrace_direct() example"
288c2ecf20Sopenharmony_ci	depends on DYNAMIC_FTRACE_WITH_DIRECT_CALLS && m
298c2ecf20Sopenharmony_ci	depends on X86_64 # has x86_64 inlined asm
308c2ecf20Sopenharmony_ci	help
318c2ecf20Sopenharmony_ci	  This builds an ftrace direct function example
328c2ecf20Sopenharmony_ci	  that hooks to wake_up_process and prints the parameters.
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ciconfig SAMPLE_TRACE_ARRAY
358c2ecf20Sopenharmony_ci        tristate "Build sample module for kernel access to Ftrace instancess"
368c2ecf20Sopenharmony_ci	depends on EVENT_TRACING && m
378c2ecf20Sopenharmony_ci	help
388c2ecf20Sopenharmony_ci	 This builds a module that demonstrates the use of various APIs to
398c2ecf20Sopenharmony_ci	 access Ftrace instances from within the kernel.
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ciconfig SAMPLE_KOBJECT
428c2ecf20Sopenharmony_ci	tristate "Build kobject examples"
438c2ecf20Sopenharmony_ci	help
448c2ecf20Sopenharmony_ci	  This config option will allow you to build a number of
458c2ecf20Sopenharmony_ci	  different kobject sample modules showing how to use kobjects,
468c2ecf20Sopenharmony_ci	  ksets, and ktypes properly.
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci	  If in doubt, say "N" here.
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ciconfig SAMPLE_KPROBES
518c2ecf20Sopenharmony_ci	tristate "Build kprobes examples -- loadable modules only"
528c2ecf20Sopenharmony_ci	depends on KPROBES && m
538c2ecf20Sopenharmony_ci	help
548c2ecf20Sopenharmony_ci	  This build several kprobes example modules.
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ciconfig SAMPLE_KRETPROBES
578c2ecf20Sopenharmony_ci	tristate "Build kretprobes example -- loadable modules only"
588c2ecf20Sopenharmony_ci	default m
598c2ecf20Sopenharmony_ci	depends on SAMPLE_KPROBES && KRETPROBES
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ciconfig SAMPLE_HW_BREAKPOINT
628c2ecf20Sopenharmony_ci	tristate "Build kernel hardware breakpoint examples -- loadable module only"
638c2ecf20Sopenharmony_ci	depends on HAVE_HW_BREAKPOINT && m
648c2ecf20Sopenharmony_ci	help
658c2ecf20Sopenharmony_ci	  This builds kernel hardware breakpoint example modules.
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ciconfig SAMPLE_KFIFO
688c2ecf20Sopenharmony_ci	tristate "Build kfifo examples -- loadable modules only"
698c2ecf20Sopenharmony_ci	depends on m
708c2ecf20Sopenharmony_ci	help
718c2ecf20Sopenharmony_ci	  This config option will allow you to build a number of
728c2ecf20Sopenharmony_ci	  different kfifo sample modules showing how to use the
738c2ecf20Sopenharmony_ci	  generic kfifo API.
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci	  If in doubt, say "N" here.
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ciconfig SAMPLE_KDB
788c2ecf20Sopenharmony_ci	tristate "Build kdb command example -- loadable modules only"
798c2ecf20Sopenharmony_ci	depends on KGDB_KDB && m
808c2ecf20Sopenharmony_ci	help
818c2ecf20Sopenharmony_ci	  Build an example of how to dynamically add the hello
828c2ecf20Sopenharmony_ci	  command to the kdb shell.
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_ciconfig SAMPLE_QMI_CLIENT
858c2ecf20Sopenharmony_ci	tristate "Build qmi client sample -- loadable modules only"
868c2ecf20Sopenharmony_ci	depends on m
878c2ecf20Sopenharmony_ci	depends on ARCH_QCOM
888c2ecf20Sopenharmony_ci	depends on NET
898c2ecf20Sopenharmony_ci	select QCOM_QMI_HELPERS
908c2ecf20Sopenharmony_ci	help
918c2ecf20Sopenharmony_ci	  Build an QMI client sample driver, which demonstrates how to
928c2ecf20Sopenharmony_ci	  communicate with a remote QRTR service, using QMI encoded messages.
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_ciconfig SAMPLE_RPMSG_CLIENT
958c2ecf20Sopenharmony_ci	tristate "Build rpmsg client sample -- loadable modules only"
968c2ecf20Sopenharmony_ci	depends on RPMSG && m
978c2ecf20Sopenharmony_ci	help
988c2ecf20Sopenharmony_ci	  Build an rpmsg client sample driver, which demonstrates how
998c2ecf20Sopenharmony_ci	  to communicate with an AMP-configured remote processor over
1008c2ecf20Sopenharmony_ci	  the rpmsg bus.
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ciconfig SAMPLE_LIVEPATCH
1038c2ecf20Sopenharmony_ci	tristate "Build live patching samples -- loadable modules only"
1048c2ecf20Sopenharmony_ci	depends on LIVEPATCH && m
1058c2ecf20Sopenharmony_ci	help
1068c2ecf20Sopenharmony_ci	  Build sample live patch demonstrations.
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ciconfig SAMPLE_CONFIGFS
1098c2ecf20Sopenharmony_ci	tristate "Build configfs patching sample -- loadable modules only"
1108c2ecf20Sopenharmony_ci	depends on CONFIGFS_FS && m
1118c2ecf20Sopenharmony_ci	help
1128c2ecf20Sopenharmony_ci	  Builds a sample configfs interface.
1138c2ecf20Sopenharmony_ci
1148c2ecf20Sopenharmony_ciconfig SAMPLE_CONNECTOR
1158c2ecf20Sopenharmony_ci	tristate "Build connector sample -- loadable modules only"
1168c2ecf20Sopenharmony_ci	depends on CONNECTOR && HEADERS_INSTALL && m
1178c2ecf20Sopenharmony_ci	help
1188c2ecf20Sopenharmony_ci	  When enabled, this builds both a sample kernel module for
1198c2ecf20Sopenharmony_ci	  the connector interface and a user space tool to communicate
1208c2ecf20Sopenharmony_ci	  with it.
1218c2ecf20Sopenharmony_ci	  See also Documentation/driver-api/connector.rst
1228c2ecf20Sopenharmony_ci
1238c2ecf20Sopenharmony_ciconfig SAMPLE_HIDRAW
1248c2ecf20Sopenharmony_ci	bool "hidraw sample"
1258c2ecf20Sopenharmony_ci	depends on CC_CAN_LINK && HEADERS_INSTALL
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_ciconfig SAMPLE_PIDFD
1288c2ecf20Sopenharmony_ci	bool "pidfd sample"
1298c2ecf20Sopenharmony_ci	depends on CC_CAN_LINK && HEADERS_INSTALL
1308c2ecf20Sopenharmony_ci
1318c2ecf20Sopenharmony_ciconfig SAMPLE_SECCOMP
1328c2ecf20Sopenharmony_ci	bool "Build seccomp sample code"
1338c2ecf20Sopenharmony_ci	depends on SECCOMP_FILTER && CC_CAN_LINK && HEADERS_INSTALL
1348c2ecf20Sopenharmony_ci	help
1358c2ecf20Sopenharmony_ci	  Build samples of seccomp filters using various methods of
1368c2ecf20Sopenharmony_ci	  BPF filter construction.
1378c2ecf20Sopenharmony_ci
1388c2ecf20Sopenharmony_ciconfig SAMPLE_TIMER
1398c2ecf20Sopenharmony_ci	bool "Timer sample"
1408c2ecf20Sopenharmony_ci	depends on CC_CAN_LINK && HEADERS_INSTALL
1418c2ecf20Sopenharmony_ci
1428c2ecf20Sopenharmony_ciconfig SAMPLE_UHID
1438c2ecf20Sopenharmony_ci	bool "UHID sample"
1448c2ecf20Sopenharmony_ci	depends on CC_CAN_LINK && HEADERS_INSTALL
1458c2ecf20Sopenharmony_ci	help
1468c2ecf20Sopenharmony_ci	  Build UHID sample program.
1478c2ecf20Sopenharmony_ci
1488c2ecf20Sopenharmony_ciconfig SAMPLE_VFIO_MDEV_MTTY
1498c2ecf20Sopenharmony_ci	tristate "Build VFIO mtty example mediated device sample code -- loadable modules only"
1508c2ecf20Sopenharmony_ci	depends on VFIO_MDEV_DEVICE && m
1518c2ecf20Sopenharmony_ci	help
1528c2ecf20Sopenharmony_ci	  Build a virtual tty sample driver for use as a VFIO
1538c2ecf20Sopenharmony_ci	  mediated device
1548c2ecf20Sopenharmony_ci
1558c2ecf20Sopenharmony_ciconfig SAMPLE_VFIO_MDEV_MDPY
1568c2ecf20Sopenharmony_ci	tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
1578c2ecf20Sopenharmony_ci	depends on VFIO_MDEV_DEVICE && m
1588c2ecf20Sopenharmony_ci	help
1598c2ecf20Sopenharmony_ci	  Build a virtual display sample driver for use as a VFIO
1608c2ecf20Sopenharmony_ci	  mediated device.  It is a simple framebuffer and supports
1618c2ecf20Sopenharmony_ci	  the region display interface (VFIO_GFX_PLANE_TYPE_REGION).
1628c2ecf20Sopenharmony_ci
1638c2ecf20Sopenharmony_ciconfig SAMPLE_VFIO_MDEV_MDPY_FB
1648c2ecf20Sopenharmony_ci	tristate "Build VFIO mdpy example guest fbdev driver -- loadable module only"
1658c2ecf20Sopenharmony_ci	depends on FB && m
1668c2ecf20Sopenharmony_ci	select FB_CFB_FILLRECT
1678c2ecf20Sopenharmony_ci	select FB_CFB_COPYAREA
1688c2ecf20Sopenharmony_ci	select FB_CFB_IMAGEBLIT
1698c2ecf20Sopenharmony_ci	help
1708c2ecf20Sopenharmony_ci	  Guest fbdev driver for the virtual display sample driver.
1718c2ecf20Sopenharmony_ci
1728c2ecf20Sopenharmony_ciconfig SAMPLE_VFIO_MDEV_MBOCHS
1738c2ecf20Sopenharmony_ci	tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
1748c2ecf20Sopenharmony_ci	depends on VFIO_MDEV_DEVICE && m
1758c2ecf20Sopenharmony_ci	select DMA_SHARED_BUFFER
1768c2ecf20Sopenharmony_ci	help
1778c2ecf20Sopenharmony_ci	  Build a virtual display sample driver for use as a VFIO
1788c2ecf20Sopenharmony_ci	  mediated device.  It supports the region display interface
1798c2ecf20Sopenharmony_ci	  (VFIO_GFX_PLANE_TYPE_DMABUF).
1808c2ecf20Sopenharmony_ci	  Emulate enough of qemu stdvga to make bochs-drm.ko happy.
1818c2ecf20Sopenharmony_ci	  That is basically the vram memory bar and the bochs dispi
1828c2ecf20Sopenharmony_ci	  interface vbe registers in the mmio register bar.
1838c2ecf20Sopenharmony_ci	  Specifically it does *not* include any legacy vga stuff.
1848c2ecf20Sopenharmony_ci	  Device looks a lot like "qemu -device secondary-vga".
1858c2ecf20Sopenharmony_ci
1868c2ecf20Sopenharmony_ciconfig SAMPLE_ANDROID_BINDERFS
1878c2ecf20Sopenharmony_ci	bool "Build Android binderfs example"
1888c2ecf20Sopenharmony_ci	depends on CC_CAN_LINK && HEADERS_INSTALL
1898c2ecf20Sopenharmony_ci	help
1908c2ecf20Sopenharmony_ci	  Builds a sample program to illustrate the use of the Android binderfs
1918c2ecf20Sopenharmony_ci	  filesystem.
1928c2ecf20Sopenharmony_ci
1938c2ecf20Sopenharmony_ciconfig SAMPLE_VFS
1948c2ecf20Sopenharmony_ci	bool "Build example programs that use new VFS system calls"
1958c2ecf20Sopenharmony_ci	depends on CC_CAN_LINK && HEADERS_INSTALL
1968c2ecf20Sopenharmony_ci	help
1978c2ecf20Sopenharmony_ci	  Build example userspace programs that use new VFS system calls such
1988c2ecf20Sopenharmony_ci	  as mount API and statx().  Note that this is restricted to the x86
1998c2ecf20Sopenharmony_ci	  arch whilst it accesses system calls that aren't yet in all arches.
2008c2ecf20Sopenharmony_ci
2018c2ecf20Sopenharmony_ciconfig SAMPLE_INTEL_MEI
2028c2ecf20Sopenharmony_ci	bool "Build example program working with intel mei driver"
2038c2ecf20Sopenharmony_ci	depends on INTEL_MEI
2048c2ecf20Sopenharmony_ci	depends on CC_CAN_LINK && HEADERS_INSTALL
2058c2ecf20Sopenharmony_ci	help
2068c2ecf20Sopenharmony_ci	  Build a sample program to work with mei device.
2078c2ecf20Sopenharmony_ci
2088c2ecf20Sopenharmony_ciconfig SAMPLE_WATCHDOG
2098c2ecf20Sopenharmony_ci	bool "watchdog sample"
2108c2ecf20Sopenharmony_ci	depends on CC_CAN_LINK
2118c2ecf20Sopenharmony_ci
2128c2ecf20Sopenharmony_ciconfig SAMPLE_WATCH_QUEUE
2138c2ecf20Sopenharmony_ci	bool "Build example watch_queue notification API consumer"
2148c2ecf20Sopenharmony_ci	depends on CC_CAN_LINK && HEADERS_INSTALL
2158c2ecf20Sopenharmony_ci	help
2168c2ecf20Sopenharmony_ci	  Build example userspace program to use the new mount_notify(),
2178c2ecf20Sopenharmony_ci	  sb_notify() syscalls and the KEYCTL_WATCH_KEY keyctl() function.
2188c2ecf20Sopenharmony_ci
2198c2ecf20Sopenharmony_ciconfig SAMPLE_HCK
2208c2ecf20Sopenharmony_ci	bool "HCK sample"
2218c2ecf20Sopenharmony_ci	help
2228c2ecf20Sopenharmony_ci	  HCK sample
2238c2ecf20Sopenharmony_ci
2248c2ecf20Sopenharmony_ciconfig SAMPLE_HCK_CALL
2258c2ecf20Sopenharmony_ci	bool "HCK call sample"
2268c2ecf20Sopenharmony_ci	depends on SAMPLE_HCK
2278c2ecf20Sopenharmony_ci	help
2288c2ecf20Sopenharmony_ci	  HCK call sample
2298c2ecf20Sopenharmony_ci
2308c2ecf20Sopenharmony_ciconfig SAMPLE_HCK_REGISTER
2318c2ecf20Sopenharmony_ci	bool "HCK register sample"
2328c2ecf20Sopenharmony_ci	depends on SAMPLE_HCK
2338c2ecf20Sopenharmony_ci	help
2348c2ecf20Sopenharmony_ci	  HCK register sample
2358c2ecf20Sopenharmony_ci
2368c2ecf20Sopenharmony_ciconfig SAMPLE_HCK_REGISTER_ONE
2378c2ecf20Sopenharmony_ci	bool "HCK register one interface sample"
2388c2ecf20Sopenharmony_ci	depends on SAMPLE_HCK
2398c2ecf20Sopenharmony_ci	help
2408c2ecf20Sopenharmony_ci	  HCK register sample
2418c2ecf20Sopenharmony_ci
2428c2ecf20Sopenharmony_ciendif # SAMPLES
243