buildyoctokernel-moduleopenembedded

yocto kernel module recipe


I have a recipe as follows:

SUMMARY = "foo driver"
LICENSE = "CLOSED"
inherit module
SRC_URI = "file://foo.tgz"
S = "${WORKDIR}/foo-module"

RPROVIDES_${PN} += "kernel-module-foo"

What I don't understand are:

  1. There is no do_compile(), do_install(), oe_runmake...etc, why it will compile?
  2. RPROVIDES_${PN} and kernel-module-xxxx can solve this issue if a kernel module needs to build?
  3. Why there is no FILES_${PN} assignment?

Solution

    1. You have inherit module in your recipe. This means you do have both do_compile() and do_install(): see meta/classes/module.bbclass.

    2. You have not actually explained what your issue is?

    3. module class inherits kernel-module-split class: this will create one package per built module, generating package names from module names, and setting FILES_* variables as needed. The RPROVIDES line seems to be just saying that one of the generated packages ("kernel-module-foo") can also be referred to with the name "${PN}".

    See https://www.yoctoproject.org/docs/current/kernel-dev/kernel-dev.html#incorporating-out-of-tree-modules for more details