Re: out of tree kernel modules using autotools

Matt Broadstone <mbroadst@...>

On Thu, Apr 7, 2016 at 10:05 AM, Matt Broadstone <mbroadst@...> wrote:
I'm beginning a process to try to build zfs-on-linux for my image (as I have yet to find any existing work in this area), and am running into some trouble building out of tree kernel modules with autotools.

Here is the current recipe:

inherit module autotools
SRC_URI[md5sum] = "4544b80018ddc5c39ed395363a582228"
SRC_URI[sha256sum] = "167595fe76eb5497c3a1ffe396b6300155d0cbe46d06824a710099ca1ae1b8bd"
EXTRA_OECONF += "--with-config=kernel --with-linux=${KERNEL_PATH}"

This recipe builds fine, except that it's using the installed kernel sources for the base ubuntu system rather than those build by yocto. I can confirm that the kernel has already been built, and sources are available, however when entering into the devshell for this package neither KERNEL_SRC nor KERNEL_PATH are defined (they are simply empty), despite what the documentation for the module bbclass indicates. 

It seems I'm missing something important here?  Also any other references to examples of building these types of modules would be greatly appreciated.


It looks like the variable is indeed defined, however not in a way where I could have seen it via the devshell. I fixed the build by adding an additional `--with-linux-obj=${STAGING_KERNEL_BUILDDIR}`, apologies for the noise!


Join to automatically receive all group messages.