[yocto] 答复: how to use a kernel build path in developing libs

Richard Zhang richard.zhang at pica8.com
Thu Dec 22 17:18:49 PST 2016


thanks


     I am trying to port some kernel modules to yocto, to add our libs.

     So should use linux-libc-headers to get include?



Regard,

Richard

________________________________
发件人: Khem Raj <raj.khem at gmail.com>
发送时间: 2016年12月23日 0:57:21
收件人: Richard Zhang
抄送: yocto at yoctoproject.org
主题: Re: [yocto] how to use a kernel build path in developing libs


On Dec 22, 2016, at 12:23 AM, Richard Zhang <richard.zhang at pica8.com<mailto:richard.zhang at pica8.com>> wrote:

hi all:

I am trying to add some lib related with kernel.

Unless you are writing a kernel module, using raw kernel headers and sources is generally not a good choice. Moreover
kernel does not have APIs beyond headers it exports for user space to use. So I would suggest to rethink what you are trying
to do and may be you can use the exposed kernel APIs through kernel headers

When I try to include the kernel build dir to the lib, i am not sure witch kernel build path should to be used :
build/tmp/work/genericx86_64-poky-linux/linux-yocto/4.4.3/linux-genericx86_64-standard-build/


Another question:

When I want to develop an application  use yocto SDK.
After I deploy a yocto SDK toolchain that image include full target,  could I use the kernel build path for compile software?

No, unless its a kernel module.



Regard,
Richard Zhang
--
_______________________________________________
yocto mailing list
yocto at yoctoproject.org<mailto:yocto at yoctoproject.org>
https://lists.yoctoproject.org/listinfo/yocto

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20161223/1abc841a/attachment.html>


More information about the yocto mailing list