[poky] How to export kernel specific headers to userspace
Bruce Ashfield
bruce.ashfield at windriver.com
Tue Jun 19 06:56:59 PDT 2018
On 06/19/2018 09:22 AM, Richard Purdie wrote:
> On Tue, 2018-06-19 at 05:16 +0000, Ankit Rastogi wrote:
>> 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.
>
> linux-libc-headers is really there to bootstrap the libc and toolchain,
> not provide non-standard kernel headers to userspace. You likely need
> to create your own recipe which installs the correct extra headers and
> then have your code DEPEND on that recipe.
Just adding a confirmation that this is what I've always done, and
what I recommend to anyone trying to do this.
The only additional caution/advice that I'd add, is that if you do
this, do not modify existing headers (since you are changing the
interface for a given version of the kernel), but additional/new
header files are fine.
Cheers,
Bruce
>
> Cheers,
>
> Richard
>
More information about the poky
mailing list