From: Bruce Ashfield <bruce.ashfield@windriver.com>
To: "Vajzovic, Tom" <Tom.Vajzovic@irisys.co.uk>,
"yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: module do_configure depends on kernel .config and headers
Date: Tue, 19 Apr 2016 13:45:19 -0400 [thread overview]
Message-ID: <57166EAF.9010808@windriver.com> (raw)
In-Reply-To: <14E4216AB3B3624BB1E80BC692D0F413D8D43038@EU-EHV-EXM01-P.global.tektronix.net>
On 2016-04-18 6:16 AM, Vajzovic, Tom wrote:
> Hi Bruce,
>
> From: Bruce Ashfield
> Sent: 15 April 2016 18:15
>> On Fri, Apr 15, 2016 at 12:02 PM, Vajzovic, Tom wrote:
>>>
>>> I am using a meta layer provided by a SOM manufacturer.
>>> They have a recipe which sets:
>>
>> What branch are you using ?
>
> Fido.
>
>>> inherit module
>>>
>>> export KLIB_BUILD="${STAGING_KERNEL_DIR}"
>>> export KLIB="${D}"
>>>
>>> and then its do_configure script calls make, and the Makefile
>>> expects $(KLIB_BUILD)/.config to exist, and the kernel headers to be
>>> in the same place.
>>>
>>> This sometimes succeeds and sometimes fails, which I presume is to
>>> do with the order that the other entries in the run-queue are
>>> executed.
>>>
>>> I thought that this might be because the dependency on the kernel
>>> .config and headers is not correctly recorded in the recipe.
>>>
>>> I added a .bbappend file to the recipe in my own layer which
>>> contains:
>>>
>>> do_configure[depends] += "virtual/kernel:do_shared_workdir"
>>>
>>> But this has not resolved the problem. I have used
>>> bitbake-layers to verify that my bbappend is being applied.
>>>
>>> So my questions are:
>>>
>>> Is $(KLIB_BUILD) the correct place to look for the kernel
>>> .config and headers?
>>
>> The .config is in: STAGING_KERNEL_BUILDDIR, that also has any
>> generated files as part of the build.
>>
>> The headers are in the shared_workdir, as you had found:
>> STAGING_KERNEL_DIR
>
> I have a copy of .config in both STAGING_KERNEL_DIR and
> STAGING_KERNEL_BUILDDIR. They differ only on that the latter has
> CONFIG_LOCALVERSION added. Is this normal? Can I depend on the
> copy in STAGING_KERNEL_DIR? I think that is what the configure
> script is currently using. How else might it differ?
They shouldn't really differ at all, but there's been issues with
the timing on when the shared directory is populated, so there
may be a lurking race on fido.
I'd count on the one in the kernel_builddir, but I imagine that
either will work in a pinch.
>
>>> What is the correct way to record the dependency in the recipe?
>>>
>>> Why isn't this done in module.bbclass? Wouldn't all modules depend
>>> on the kernel headers?
>>
>> It pretty much does, with this in module-base.bbclass:
>> do_configure[depends] += "virtual/kernel:do_compile_kernelmodules"
>
> In my Fido modules-base.bbclass I have exactly:
>
> do_configure[depends] += "virtual/kernel:do_shared_workdir"
>
> So this means that my bbappend is a no-op (I only looked as far as
> modules.bbclass; I missed modules-base).
Hmm. So we are no further ahead.
Bruce
>
> Thanks,
> Tom
>
prev parent reply other threads:[~2016-04-19 17:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-15 16:02 module do_configure depends on kernel .config and headers Vajzovic, Tom
2016-04-15 17:14 ` Bruce Ashfield
2016-04-18 10:16 ` Vajzovic, Tom
2016-04-19 17:45 ` Bruce Ashfield [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=57166EAF.9010808@windriver.com \
--to=bruce.ashfield@windriver.com \
--cc=Tom.Vajzovic@irisys.co.uk \
--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.