Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Cc: Michael Jones <michael.jones@matrix-vision.de>,
	openembedded-devel <openembedded-devel@lists.openembedded.org>
Subject: Re: staging & using kernel headers
Date: Fri, 25 Mar 2011 13:38:22 +0000	[thread overview]
Message-ID: <1301060302.3018.129.camel@rex> (raw)
In-Reply-To: <AB78D48B-B478-47DF-A7CF-94FF96C313AC@dominion.thruhere.net>

On Fri, 2011-03-18 at 10:55 +0100, Koen Kooi wrote:
> CC:ing oe-core since we have kernel.bbclass patches there as well.
> 
> Op 18 mrt 2011, om 10:49 heeft Michael Jones het volgende geschreven:
> 
> > Hello Koen & co.,
> > 
> > I recently bumped into a problem with recipes ti-dmai and gstreamer-ti
> > when they included the kernel headers.  These headers were staged by
> > kernel.bbclass sysroot_stage_all_append() with a lot of manual copying
> > and manipulating links and such, rather than using 'oe_runmake
> > headers_install'.  Back in October Koen explained this
> > (http://article.gmane.org/gmane.comp.handhelds.openembedded/37772) is
> > because some recipes use private kernel API.  The result of this with my
> > 2.6.38 kernel
> 
> DMAI and gst-ti don't really work with anything newer than 2.6.32-psp, we're trying to get that addressed internally.
> 
> > is that I get a warning-turned-error from linux/types.h
> > that "Attempt to use kernel headers from user space".
> > 
> > ti-dmai_svn.bb hacks this (self-admittedly) by defining
> > _EXPORTED_HEADERS_ (commit d0184be13b4879e, also from Koen).  I had to
> > modify the recipe to enable the define to actually get passed as a
> > compile option.  For gstreamer-ti, there was no such hack in place, but
> > it was needed for the same reason.
> > 
> > I would think it is a common requirement for recipes to include kernel
> > headers, and this warning has been around since 2.6.32.  I got around it
> > with gstreamer-ti by installing the headers with headers_install into a
> > subdir of the headers directory set up currently by kernel.bbclass, and
> > pointing the gstreamer-ti recipe at that, but I'm not sure if there's a
> > better way.
> > 
> > If there are some recipes that need internal kernel sources staged for
> > them, then it seems to me that we need both sets of kernel headers: one
> > exported to userspace (with headers_install) and one that is not.
> > Right?  Can we agree on a standard place/manner for this?
> > 
> > Below is my patch to get gstreamer-ti working, for illustration.
> 
> I don't really have a better suggestion, apart from adding a var in e.g. bitbake.conf to point to the userspace stuff.
> 
> We might even do the reverse, stage the full set into
> $kernel_dir/private and the userspace ones in $kernel_dir, that would
> make it more clear which recipes need internal API.

Anything using internal kernel headers is effectively kernel module like
and should be using STAGING_DIR_KERNEL. There should be a complete set
of headers available there, particularly after recent improvemnents to
kernel.bbclass in oecore. Note that using kernel headers like this
effectively makes the package machine specific since the kernel is
machine specific.

Cheers,

Richard




  reply	other threads:[~2011-03-25 13:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4D832AA4.1020701@matrix-vision.de>
2011-03-18  9:55 ` staging & using kernel headers Koen Kooi
2011-03-25 13:38   ` Richard Purdie [this message]
2011-03-25 14:14     ` Michael Jones
2011-03-25 14:55       ` Richard Purdie
2011-03-25 16:02         ` Michael Jones
2011-03-28 12:42           ` [oe] " Richard Purdie
2011-03-28 16:39             ` Khem Raj
2011-04-07 13:03               ` Michael Jones
2011-04-06 15:47             ` Michael Jones

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=1301060302.3018.129.camel@rex \
    --to=richard.purdie@linuxfoundation.org \
    --cc=michael.jones@matrix-vision.de \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=openembedded-devel@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox