From: Bruce Ashfield <bruce.ashfield@windriver.com>
To: "Vuille, Martin (Martin)" <vmartin@avaya.com>,
"yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: Exporting kernel header from patch
Date: Thu, 24 Apr 2014 13:32:16 -0400 [thread overview]
Message-ID: <53594AA0.7020603@windriver.com> (raw)
In-Reply-To: <30C2D590D16A5C46ADFE65219103779820B77A65@AZ-US1EXMB03.global.avaya.com>
On 14-04-24 11:57 AM, Vuille, Martin (Martin) wrote:
> I have a custom layer to add patches to my vendor’s BSP layer
>
> (based on Linux 3.4, if it matters) and a .bbappend to list the
>
> patches.
>
> One of the patches adds a header, and this header needs to
>
> be exported to the sysroot.
>
> I added the following to my .bbappend, based on a discussion
>
> I found:
>
> do_install_append() {
>
> install -d ${D}${includedir}/linux
>
> install -m 644 ${S}/include/linux/uc1698u.h
> ${D}${includedir}/linux/uc1698u.h
>
> }
>
> It “works” (i.e., the header is installed in the sysroot) but there must
>
> be more to it than that because I also get a warning about the header
>
> being “installed but not shipped in any package”.
>
> What’s the correct way to do this?
Not answering the question directly, but I can say that kernel's
shouldn't be exporting their header files over the sysroot's
include/linux/* directory structure, since that is where linux-libc-headers
installs and manages the userspace safe headers for the c-library.
Sure you are probably installing a new file, and one that doesn't
conflict with the existing libc-headers, but as soon as you start
working in that directory structure .. you will eventually clobber
an existing file.
There have been quite a few discussions on this topic over time on the
oe-core and yocto lists. Look at the comment in the linux-libc-headers.inc
file, and you'll see a note from Richard explaining why this shouldn't
be done (searches on the mailing list archives will also find more
hits).
When you install into the sysroot, the header file should also be
in a FILES_<package> as part of your recipe .. and that is why you
are seeing the warning. packaging it would remove the warning, but
you'll still have the problem I mention above.
The right way is for your application to look at the STAGING_KERNEL_DIR,
which will have a copy of that same header file.
Alternatively, you can stage your header file at a different sysroot
location than include/linux/* and have your application look there.
I have an open enhancement that I'm doing for yocto 1.7 which automates
the alternate header file structure, but doing it explicitly in your
recipes will work for now.
Cheers,
Bruce
>
> MV
>
>
>
next prev parent reply other threads:[~2014-04-24 17:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-24 15:57 Exporting kernel header from patch Vuille, Martin (Martin)
2014-04-24 17:32 ` Bruce Ashfield [this message]
2014-04-24 17:52 ` Vuille, Martin (Martin)
2014-04-24 18:00 ` Bruce Ashfield
2014-04-24 19:54 ` Vuille, Martin (Martin)
2014-04-24 20:05 ` Bruce Ashfield
2014-04-24 20:18 ` Vuille, Martin (Martin)
-- strict thread matches above, loose matches on Subject: below --
2015-07-22 15:09 Gamma.Dean
[not found] ` <CAF3SDA5-QQ3me8ETP=nP5irdf3nDtncFQLT0PtyzoJb3SCgMjQ@mail.gmail.com>
2015-07-23 1:03 ` Daniel.
2015-07-23 17:54 ` Gamma.Dean
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=53594AA0.7020603@windriver.com \
--to=bruce.ashfield@windriver.com \
--cc=vmartin@avaya.com \
--cc=yocto@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.