[poky] How to export kernel specific headers to userspace
Bruce Ashfield
bruce.ashfield at windriver.com
Tue Jun 19 06:55:32 PDT 2018
On 06/19/2018 09:44 AM, Bas Mevissen wrote:
> 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.
They aren't actually cleaned up at all. They are the standard uapi
installed headers from the latest kernel in a given yocto release.
They will be updated to 4.18 shortly, since I'm preparing the next
round of kernel updates (and devsrc resubmission).
Bruce
>
More information about the poky
mailing list