[poky] How to export kernel specific headers to userspace

Bas Mevissen abuse at basmevissen.nl
Tue Jun 19 06:44:53 PDT 2018


On 2018-06-19 07:16, Ankit Rastogi wrote:
> Hi,
> 
> Can someone provide any pointers on how to export kernel specific
> headers to userspace?
> 
> I am getting below error while building our one of the component which
> requires kernel uapi headers.
> 
> Error Received:
>  /hdmi-capture/main.c:16:10: fatal error: linux/hdmi_info.h: No such
> file or directory
>> |  #include <linux/hdmi_info.h>
>> |           ^~~~~~~~~~~~~~~~~~~
>> | compilation terminated.
> 
> In yocto 2.5, userspace is boot strapped with linux-libc-headers
> package which uses a set of uapi headers from Linux kernel 4.15. Can
> someone suggest for custom kernels, how to expose uapi headers to
> userspace? Thus create a separate linux-apl-headers package with those
> files.
> 

You might want to (re)move the linux-libc-headers package (header files) 
and install kernel-devsrc package. Then link the include directories 
from /usr/src/kernel/include/{asm*,linux} to /usr/include or modify your 
Makefile to get the linux include files from 
/usr/src/kernel/include/linux instead of /usr/include/linux.

Please note that the kernel-devsrc package is not without problems. 
Building it and manually installing it with --nodeps (for rpm) will do 
the trick. The package is due for replacement, see a thread on this 
started by me a few weeks ago.

Please also note that linux-libc-headers are cleaned-up versions of the 
4.15 kernel headers, so expect some rough edges.



More information about the poky mailing list