AnsweredAssumed Answered

Adding External Kernel Modules to Yocto

Question asked by oguzhan dalgic on Jul 10, 2018
Latest reply on Jul 11, 2018 by gusarambula



I would like to add an external device driver as kernel module. Before that, I wanted to try the example hello-mod shipped with poky, however I get an error related to linux headers.


The example I am trying to bitbake is available in the following path:


I created a layer named "meta-fsl-test" using poky's yocto-layer script and copied the hello-mod folder into the created layer folder. 

bitbake hello-mod

above command returns below error,

| DEBUG: Executing shell function do_compile
| helloworld.c:1:26: fatal error: linux/module.h: No such file or directory
| compilation terminated.
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile


Can anyone tell me to which places does the do_compile function looks for the headers? How can I solve this problem? 


Thanks in advance,