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


--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to