Adding External Kernel Modules to Yocto

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Adding External Kernel Modules to Yocto

2,676件の閲覧回数
oguzhandalgic
Contributor I

Hello,

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:

sources/poky/meta-skeleton/recipes-kernel/hello-mod/

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,

Bests.

ラベル(3)
0 件の賞賛
返信
1 返信

1,261件の閲覧回数
gusarambula
NXP TechSupport
NXP TechSupport

Hello Oguzhan Dalgic,

I would recommend checking the recipe you copied. The recipe I found for the hello-mod example as part of the meta-skeleton branch of poky inherited the module class.

Inside the module class definition, you should see he variables that is taking including the KERNEL_PATH variable.

I hope this helps!

Regards,

0 件の賞賛
返信