1*ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 2267c4025SMathieu Desnoyersmenuconfig SAMPLES 3267c4025SMathieu Desnoyers bool "Sample kernel code" 45318321dSMasahiro Yamada depends on !UML 5267c4025SMathieu Desnoyers help 6267c4025SMathieu Desnoyers You can build and test sample kernel code here. 7267c4025SMathieu Desnoyers 8267c4025SMathieu Desnoyersif SAMPLES 9267c4025SMathieu Desnoyers 109cfe06f8SSteven Rostedtconfig SAMPLE_TRACE_EVENTS 1196d17980SLi Zefan tristate "Build trace_events examples -- loadable modules only" 1296d17980SLi Zefan depends on EVENT_TRACING && m 139cfe06f8SSteven Rostedt help 149cfe06f8SSteven Rostedt This build trace event example modules. 159cfe06f8SSteven Rostedt 16aad108aaSSteven Rostedt (Red Hat)config SAMPLE_TRACE_PRINTK 17aad108aaSSteven Rostedt (Red Hat) tristate "Build trace_printk module - tests various trace_printk formats" 18aad108aaSSteven Rostedt (Red Hat) depends on EVENT_TRACING && m 19aad108aaSSteven Rostedt (Red Hat) help 20aad108aaSSteven Rostedt (Red Hat) This builds a module that calls trace_printk() and can be used to 21aad108aaSSteven Rostedt (Red Hat) test various trace_printk() calls from a module. 22aad108aaSSteven Rostedt (Red Hat) 2340efcb05SGreg Kroah-Hartmanconfig SAMPLE_KOBJECT 24e7e34917SMasahiro Yamada tristate "Build kobject examples" 2540efcb05SGreg Kroah-Hartman help 2640efcb05SGreg Kroah-Hartman This config option will allow you to build a number of 2740efcb05SGreg Kroah-Hartman different kobject sample modules showing how to use kobjects, 2840efcb05SGreg Kroah-Hartman ksets, and ktypes properly. 2940efcb05SGreg Kroah-Hartman 3040efcb05SGreg Kroah-Hartman If in doubt, say "N" here. 3140efcb05SGreg Kroah-Hartman 32804defeaSAnanth N Mavinakayanahalliconfig SAMPLE_KPROBES 33804defeaSAnanth N Mavinakayanahalli tristate "Build kprobes examples -- loadable modules only" 34804defeaSAnanth N Mavinakayanahalli depends on KPROBES && m 35804defeaSAnanth N Mavinakayanahalli help 36804defeaSAnanth N Mavinakayanahalli This build several kprobes example modules. 37804defeaSAnanth N Mavinakayanahalli 38804defeaSAnanth N Mavinakayanahalliconfig SAMPLE_KRETPROBES 39804defeaSAnanth N Mavinakayanahalli tristate "Build kretprobes example -- loadable modules only" 40804defeaSAnanth N Mavinakayanahalli default m 41804defeaSAnanth N Mavinakayanahalli depends on SAMPLE_KPROBES && KRETPROBES 42804defeaSAnanth N Mavinakayanahalli 4343203993SK.Prasadconfig SAMPLE_HW_BREAKPOINT 4443203993SK.Prasad tristate "Build kernel hardware breakpoint examples -- loadable module only" 4543203993SK.Prasad depends on HAVE_HW_BREAKPOINT && m 4643203993SK.Prasad help 4743203993SK.Prasad This builds kernel hardware breakpoint example modules. 4843203993SK.Prasad 495bf2b193SStefani Seiboldconfig SAMPLE_KFIFO 505bf2b193SStefani Seibold tristate "Build kfifo examples -- loadable modules only" 515bf2b193SStefani Seibold depends on m 525bf2b193SStefani Seibold help 535bf2b193SStefani Seibold This config option will allow you to build a number of 545bf2b193SStefani Seibold different kfifo sample modules showing how to use the 555bf2b193SStefani Seibold generic kfifo API. 565bf2b193SStefani Seibold 575bf2b193SStefani Seibold If in doubt, say "N" here. 585bf2b193SStefani Seibold 594aad8f51SJason Wesselconfig SAMPLE_KDB 6025985edcSLucas De Marchi tristate "Build kdb command example -- loadable modules only" 614aad8f51SJason Wessel depends on KGDB_KDB && m 624aad8f51SJason Wessel help 634aad8f51SJason Wessel Build an example of how to dynamically add the hello 644aad8f51SJason Wessel command to the kdb shell. 654aad8f51SJason Wessel 66842891beSBjorn Anderssonconfig SAMPLE_QMI_CLIENT 67842891beSBjorn Andersson tristate "Build qmi client sample -- loadable modules only" 68842891beSBjorn Andersson depends on m 69842891beSBjorn Andersson depends on ARCH_QCOM 70dea4bd19SArnd Bergmann depends on NET 71842891beSBjorn Andersson select QCOM_QMI_HELPERS 72842891beSBjorn Andersson help 73842891beSBjorn Andersson Build an QMI client sample driver, which demonstrates how to 74842891beSBjorn Andersson communicate with a remote QRTR service, using QMI encoded messages. 75842891beSBjorn Andersson 76779b96d2SOhad Ben-Cohenconfig SAMPLE_RPMSG_CLIENT 77779b96d2SOhad Ben-Cohen tristate "Build rpmsg client sample -- loadable modules only" 78779b96d2SOhad Ben-Cohen depends on RPMSG && m 79779b96d2SOhad Ben-Cohen help 80779b96d2SOhad Ben-Cohen Build an rpmsg client sample driver, which demonstrates how 81779b96d2SOhad Ben-Cohen to communicate with an AMP-configured remote processor over 82779b96d2SOhad Ben-Cohen the rpmsg bus. 83779b96d2SOhad Ben-Cohen 8412cf89b5SJosh Poimboeufconfig SAMPLE_LIVEPATCH 85439e7271SJoe Lawrence tristate "Build live patching samples -- loadable modules only" 8612cf89b5SJosh Poimboeuf depends on LIVEPATCH && m 8713d1cf7eSSeth Jennings help 88439e7271SJoe Lawrence Build sample live patch demonstrations. 8913d1cf7eSSeth Jennings 9051798222SChristoph Hellwigconfig SAMPLE_CONFIGFS 9151798222SChristoph Hellwig tristate "Build configfs patching sample -- loadable modules only" 9251798222SChristoph Hellwig depends on CONFIGFS_FS && m 9351798222SChristoph Hellwig help 9451798222SChristoph Hellwig Builds a sample configfs interface. 9551798222SChristoph Hellwig 9614fbff6bSArnd Bergmannconfig SAMPLE_CONNECTOR 9714fbff6bSArnd Bergmann tristate "Build connector sample -- loadable modules only" 9814fbff6bSArnd Bergmann depends on CONNECTOR && m 9914fbff6bSArnd Bergmann help 10014fbff6bSArnd Bergmann When enabled, this builds both a sample kernel module for 10114fbff6bSArnd Bergmann the connector interface and a user space tool to communicate 10214fbff6bSArnd Bergmann with it. 10314fbff6bSArnd Bergmann See also Documentation/connector/connector.txt 10414fbff6bSArnd Bergmann 105f6041c1dSOlof Johanssonconfig SAMPLE_SECCOMP 1067206c124SMasahiro Yamada bool "Build seccomp sample code" 1077206c124SMasahiro Yamada depends on SECCOMP_FILTER 108f6041c1dSOlof Johansson help 109f6041c1dSOlof Johansson Build samples of seccomp filters using various methods of 110f6041c1dSOlof Johansson BPF filter construction. 111f6041c1dSOlof Johansson 11208c1a4efSAlex Williamsonconfig SAMPLE_VFIO_MDEV_MTTY 11308c1a4efSAlex Williamson tristate "Build VFIO mtty example mediated device sample code -- loadable modules only" 11408c1a4efSAlex Williamson depends on VFIO_MDEV_DEVICE && m 11508c1a4efSAlex Williamson help 11608c1a4efSAlex Williamson Build a virtual tty sample driver for use as a VFIO 11708c1a4efSAlex Williamson mediated device 11808c1a4efSAlex Williamson 119d61fc96fSGerd Hoffmannconfig SAMPLE_VFIO_MDEV_MDPY 120d61fc96fSGerd Hoffmann tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only" 121d61fc96fSGerd Hoffmann depends on VFIO_MDEV_DEVICE && m 122d61fc96fSGerd Hoffmann help 123d61fc96fSGerd Hoffmann Build a virtual display sample driver for use as a VFIO 124d61fc96fSGerd Hoffmann mediated device. It is a simple framebuffer and supports 125d61fc96fSGerd Hoffmann the region display interface (VFIO_GFX_PLANE_TYPE_REGION). 126d61fc96fSGerd Hoffmann 127cacade19SGerd Hoffmannconfig SAMPLE_VFIO_MDEV_MDPY_FB 128cacade19SGerd Hoffmann tristate "Build VFIO mdpy example guest fbdev driver -- loadable module only" 129cacade19SGerd Hoffmann depends on FB && m 130cacade19SGerd Hoffmann select FB_CFB_FILLRECT 131cacade19SGerd Hoffmann select FB_CFB_COPYAREA 132cacade19SGerd Hoffmann select FB_CFB_IMAGEBLIT 133cacade19SGerd Hoffmann help 134cacade19SGerd Hoffmann Guest fbdev driver for the virtual display sample driver. 135cacade19SGerd Hoffmann 136a5e6e650SGerd Hoffmannconfig SAMPLE_VFIO_MDEV_MBOCHS 137a5e6e650SGerd Hoffmann tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only" 138a5e6e650SGerd Hoffmann depends on VFIO_MDEV_DEVICE && m 139c1abca96SArnd Bergmann select DMA_SHARED_BUFFER 140a5e6e650SGerd Hoffmann help 141a5e6e650SGerd Hoffmann Build a virtual display sample driver for use as a VFIO 142a5e6e650SGerd Hoffmann mediated device. It supports the region display interface 143a5e6e650SGerd Hoffmann (VFIO_GFX_PLANE_TYPE_DMABUF). 144a5e6e650SGerd Hoffmann Emulate enough of qemu stdvga to make bochs-drm.ko happy. 145a5e6e650SGerd Hoffmann That is basically the vram memory bar and the bochs dispi 146a5e6e650SGerd Hoffmann interface vbe registers in the mmio register bar. 147a5e6e650SGerd Hoffmann Specifically it does *not* include any legacy vga stuff. 148a5e6e650SGerd Hoffmann Device looks a lot like "qemu -device secondary-vga". 149a5e6e650SGerd Hoffmann 1509762dc14SChristian Braunerconfig SAMPLE_ANDROID_BINDERFS 1519762dc14SChristian Brauner bool "Build Android binderfs example" 1529762dc14SChristian Brauner depends on CONFIG_ANDROID_BINDERFS 1539762dc14SChristian Brauner help 1549762dc14SChristian Brauner Builds a sample program to illustrate the use of the Android binderfs 1559762dc14SChristian Brauner filesystem. 1569762dc14SChristian Brauner 157f1b5618eSDavid Howellsconfig SAMPLE_VFS 158f1b5618eSDavid Howells bool "Build example programs that use new VFS system calls" 159a528d35eSDavid Howells help 160f1b5618eSDavid Howells Build example userspace programs that use new VFS system calls such 161f1b5618eSDavid Howells as mount API and statx(). Note that this is restricted to the x86 162f1b5618eSDavid Howells arch whilst it accesses system calls that aren't yet in all arches. 163a528d35eSDavid Howells 164267c4025SMathieu Desnoyersendif # SAMPLES 165