module

out of tree

Common tasks are provided by module.bbclass. See poky/plain/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb

hello-mod_0.1.bb
SUMMARY = "Example of how to build an external Linux kernel module"
DESCRIPTION = "${SUMMARY}"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
 
inherit module
 
SRC_URI = "file://Makefile \
           file://hello.c \
           file://COPYING \
          "
 
S = "${WORKDIR}"
 
# The inherit of module.bbclass will automatically name module packages with
# "kernel-module-" prefix as required by the oe-core build environment.
 
RPROVIDES:${PN} += "kernel-module-hello"