[yocto] module do_configure depends on kernel .config and headers

Bruce Ashfield bruce.ashfield at gmail.com
Fri Apr 15 10:14:59 PDT 2016


On Fri, Apr 15, 2016 at 12:02 PM, Vajzovic, Tom <Tom.Vajzovic at irisys.co.uk>
wrote:

> Hi,
>
> I am using a meta layer provided by a SOM manufacturer.  They have a
> recipe which sets:
>
>
What branch are you using ? master ? jethro ? ... something else ? The
answer
changes with the branch you are using since the management of the kernel
source and build artifacts has changed over time.


> 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

.. so there's a split in the files, if you look in the git history of those
files you'll see the
reasons why it is like that (less disk i/o, build time, packaging/sharing
of source, etc).


>
> 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:

# This is instead of DEPENDS = "virtual/kernel"

do_configure[depends] += "virtual/kernel:do_compile_kernelmodules"


.. this isn't a simple place to wade in, I work on this quite a bit and I
still have to

double check things.
Bruce


>
> Thanks,
> Tom
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160415/258360cc/attachment.html>


More information about the yocto mailing list