[yocto] Recipe require kernel headers

Gabriele Zampieri gabbla.malist at gmail.com
Thu Mar 7 00:47:57 PST 2019


Hi all,

I have a custom recipe that builds and installs a C program that include:

#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>

I can compile it with TI prebuilt SDK, but when I try to build it with
yocto the compiler is unable to find those headers.

In the recipe do_compile I simply execute:
${CC} ${CFLAGS} ${S}/program.c -o program
(as I do with the prebuild SDK). But the compilation fails due to the
missing headers. I could a list of include paths to ${CC}, pointing to the
location in the kernel tree, but I don't really like it as solution. The
prebuild SDK install those file in
<SDK>/sysroots/<armv7ahf-neon-linux-gnueabi>/usr/include (and append that
path to CFLAGS through the env setup script). Moreover, if I build the
image without my recipe and I look for the headers I find them in rootfs,
but not in recipe-sysroot. The Yocto system I'm using is based on TI arago
customization.

How can I add the sanitized kernel heders to the recipe-sysroot or use them
to build my tool?

Thanks in advance,
Gabriele
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190307/801e5792/attachment.html>


More information about the yocto mailing list