From: Bruce Ashfield <bruce.ashfield@windriver.com>
To: Patrick Turley <PatrickTurley@gamestop.com>
Cc: "yocto@yoctoproject.org" <yocto@yoctoproject.org>,
Darren Hart <dvhart@linux.intel.com>
Subject: Re: Build external module against Yocto kernel
Date: Tue, 22 Jan 2013 15:34:52 -0500 [thread overview]
Message-ID: <50FEF7EC.6030601@windriver.com> (raw)
In-Reply-To: <5BEFD653CA8A8D47AA194ED30AB5968C370295@GV1HQPEX03.babgsetc.pvt>
On 13-01-22 03:28 PM, Patrick Turley wrote:
> On Jan 16, 2013, at 11:11 AM, Darren Hart <dvhart@linux.intel.com> wrote:
>> On 01/15/2013 10:38 AM, Bruce Ashfield wrote:
>>> I finally found the entries that I was recalling earlier. They are:
>>>
>>> https://bugzilla.yoctoproject.org/show_bug.cgi?id=241
>>> https://bugzilla.yoctoproject.org/show_bug.cgi?id=1614
>>> https://bugzilla.yoctoproject.org/show_bug.cgi?id=2968
>>>
>>> 1614 and 2968 are the most interesting for what you are asking.
>>>
>>> As you can see the net result of those bugs is that you can get the
>>> right parts of the kernel tree in SDK packages, since they include
>>> dev packages, and with what is currently in kernel-dev .. it should
>>> be enough to build against in the SDK (perhaps with just the LDFLAGS
>>> tweaks mentioned in the other thread). The sources should be part
>>> of the sysroot, and hence available when that is packaged for use
>>> outside of bitbake/yocto.
>>>
>>> If you aren't seeing kernel-dev in the SDK image, it might be that
>>> TOOLCHAIN_TARGET_TASK doesn't have kernel-dev by default, or something
>>> else is different in the SDK that is being generated in your testing.
>>>
>>> I'm only speculating about what might be missing, since I'm not 100%
>>> familiar with the SDK, but perhaps Jessica or others can chime in if
>>> I've led you astray :)
>
> You have *not* led me astray. A fundamental problem was that I didn't comprehend the distinction/correspondence between "target image" recipes and "SDK image" recipes. I believe I get that now.
>
> We've created a target image recipe, and an SDK image recipe that "require's" the former (this is conventional, I believe). The SDK image recipe adds all the development packages and, yes, it includes kernel-dev. So, when I install my SDK now, I certainly *do* get all the kernel header files. As you know, I do *not* get the hostprogs.
>
> As I described in an earlier post, I am currently reaching into the "tmp" directory, pulling out the kernel work directory, and making it directly available to my external build process. This solves my problem because the work directory contains all the header files I need *and* the hostprogs. Of course, it's "bad" because it's not an intended way to use the build artifacts, and it's awkward to distribute.
>
> With the recent improvement, I can now get the kernel header files packaged in the SDK. That's good because it's an intended mechanism and it's easy to distribute.
>
> With regard to:
>
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=1614
>
> This seems a reasonable solution to the problem of building modules on the target, given the difficulties of dealing with executables. I'm not building modules on the target (I'm cross-compiling them), but this seems to apply anyway. It adds an extra step to SDK installation, but that's the least of our problems.
>
> One problem I ran into … When I tried to execute "make scripts," I got a whole bunch of config questions that I *think* should have been answered with a .config file or something. Should I have copied out the .config file from the kernel work directory into the SDK installation before I ran that? Is that the "best" way to get around all the questions?
>
Interesting. I haven't seen this myself, so just a couple of quick
questions:
- without the .config, did you still get a working set of hostprogs, and
only had to suffer the warnings ?
- If the answer is yes, then the .config really doesn't matter for this
and the approach of grabbing a .config should work fine or even
having a dummy defconfig available with enough to keep the build
happy.
Definitely sounds like something we can address and it's worth putting into
bugzilla so it doesn't get lost.
Bruce
>> Patrick, please keep us posted if this continues to not work for you. I
>> will open a bug to include a section about this in the kernel
>> development manual.
>
> It's very *nearly* working for me now. See my question above.
>
next prev parent reply other threads:[~2013-01-22 20:34 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 23:27 Build external module against Yocto kernel Patrick Turley
2013-01-15 17:07 ` Brian Lloyd
2013-01-15 17:09 ` Brian Lloyd
2013-01-15 17:54 ` Patrick Turley
2013-01-15 18:00 ` Bruce Ashfield
2013-01-15 18:26 ` Patrick Turley
2013-01-15 18:38 ` Bruce Ashfield
2013-01-15 19:16 ` Zhang, Jessica
2013-01-22 19:52 ` Patrick Turley
2013-01-16 17:11 ` Darren Hart
2013-01-21 21:21 ` Patrick Turley
2013-01-22 12:34 ` Christian Ege
2013-01-22 20:28 ` Patrick Turley
2013-01-22 20:34 ` Bruce Ashfield [this message]
2013-01-23 2:26 ` Patrick Turley
2013-01-23 4:43 ` Bruce Ashfield
2013-01-23 5:14 ` Patrick Turley
2013-01-23 5:17 ` Bruce Ashfield
2013-01-23 5:34 ` Patrick Turley
2013-01-23 13:48 ` Bruce Ashfield
2013-01-23 15:17 ` Patrick Turley
2013-01-24 19:58 ` John Mehaffey
2013-01-24 20:10 ` Bruce Ashfield
2013-01-25 1:34 ` John Mehaffey
2013-02-01 4:50 ` Bruce Ashfield
2013-02-02 0:48 ` Patrick Turley
2013-02-02 4:35 ` Brian Lloyd
2013-02-02 4:51 ` Bruce Ashfield
2013-02-02 4:48 ` Bruce Ashfield
2013-02-02 5:12 ` Brian Lloyd
2013-02-02 5:16 ` Bruce Ashfield
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=50FEF7EC.6030601@windriver.com \
--to=bruce.ashfield@windriver.com \
--cc=PatrickTurley@gamestop.com \
--cc=dvhart@linux.intel.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.