[yocto] out of tree kernel modules using autotools

Matt Broadstone mbroadst at gmail.com
Thu Apr 7 07:38:22 PDT 2016


On Thu, Apr 7, 2016 at 10:05 AM, Matt Broadstone <mbroadst at gmail.com> wrote:

> Hello,
> 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.
>
> I've been loosely basing my recipe off of the one over here:
> https://github.com/Freescale/meta-freescale/blob/master/recipes-kernel/kernel-modules/kernel-module-perf-qoriq_0.8.2.bb
>
> Here is the current recipe:
>
> <snip>
> inherit module autotools
> SRC_URI = "
> http://archive.zfsonlinux.org/downloads/zfsonlinux/spl/spl-0.6.5.6.tar.gz"
> SRC_URI[md5sum] = "4544b80018ddc5c39ed395363a582228"
> SRC_URI[sha256sum] =
> "167595fe76eb5497c3a1ffe396b6300155d0cbe46d06824a710099ca1ae1b8bd"
> EXTRA_OECONF += "--with-config=kernel --with-linux=${KERNEL_PATH}"
> <snip>
>
> 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.
>
> Regards,
> Matt
>

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!

Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160407/511e8cd9/attachment.html>


More information about the yocto mailing list