All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bas Mevissen <abuse@basmevissen.nl>
To: Bruce Ashfield <bruce.ashfield@windriver.com>
Cc: Ankit Rastogi <Ankit.Rastogi@kpit.com>, poky@yoctoproject.org
Subject: Re: How to export kernel specific headers to userspace
Date: Tue, 19 Jun 2018 16:06:07 +0200	[thread overview]
Message-ID: <e34c413d9fa38e316ca9d7265382574e@basmevissen.nl> (raw)
In-Reply-To: <9d5f3a74-1cb9-ef2d-79a0-ef3d403295e2@windriver.com>

On 2018-06-19 15:55, Bruce Ashfield wrote:
> 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.
> 

Oh, maybe I'm confused with the ones installed by Centos and Fedora. 
There the #ifdef __KERNEL__ (..) #endif stuff is removed from the uapi 
headers package.

> They will be updated to 4.18 shortly, since I'm preparing the next
> round of kernel updates


> (and devsrc resubmission).
> 

That would be really nice as it is not really usable at the moment.

> Bruce
> 
> 
> 
>> 


      reply	other threads:[~2018-06-19 14:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19  5:16 How to export kernel specific headers to userspace Ankit Rastogi
2018-06-19  5:19 ` Ankit Rastogi
2018-06-19  6:50   ` Khem Raj
2018-06-19 13:22 ` Richard Purdie
2018-06-19 13:56   ` Bruce Ashfield
2018-06-19 13:44 ` Bas Mevissen
2018-06-19 13:55   ` Bruce Ashfield
2018-06-19 14:06     ` Bas Mevissen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e34c413d9fa38e316ca9d7265382574e@basmevissen.nl \
    --to=abuse@basmevissen.nl \
    --cc=Ankit.Rastogi@kpit.com \
    --cc=bruce.ashfield@windriver.com \
    --cc=poky@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.