[yocto] Installing Linux kernel headers including custom UAPI header file

Craig McQueen craig.mcqueen at innerrange.com
Wed Mar 18 16:59:12 PDT 2015


Hello,

I'm using Yocto (dizzy) with meta-ti and the linux-ti-staging kernel 3.14.x to build for BeagleBone Black.

I've written a custom char driver with several ioctl() calls, and I'm patching that into the linux-ti-staging kernel. The driver adds a new UAPI header file that goes in the kernel tree under include/uapi/linux/mydriver.h, to define the ioctl commands.

I've got a test application to use that custom char driver. I've also written a library libmydriver, to provide a more user-friendly interface to the ioctl calls. Both want to include the mydriver.h from the Linux headers. The application and library are using autotools to build. I've written a Yocto recipe to build them via autotools.

My problem is this: my application and library fail to build under Yocto, due to missing the Linux kernel header file mydriver.h (/usr/include/linux/mydriver.h is where I'd expect it to appear in the build environment root filesystem).

What do I need to change to cause the custom Linux kernel build to install the kernel header files, including mydriver.h into the Yocto build for other packages to use during build?

(I don't want it installed on the target, only in the build sysroot, although I'm not familiar enough with Yocto to understand how it installs include files to the build sysroot, but not the target sysroot.) I can see that Linux kernel headers are being installed to tmp/sysroots/beaglebone/usr/include/linux/... but not including mydriver.h; I'm not sure what package is installing these headers. (I can also see that my header is installed at tmp/sysroots/beaglebone/usr/src/kernel/include/uapi/linux/mydriver.h, but that's not the same.)

-- 
Craig McQueen




More information about the yocto mailing list