[OE-core] Problem with module.bbclass

Paul Eggleton paul.eggleton at linux.intel.com
Thu May 21 13:53:37 UTC 2015


Hi Steffen,

On Thursday 21 May 2015 13:48:34 Steffen.Pankratz at elektrobit.com wrote:
> I am using
> http://git.openembedded.org/openembedded-core/tree/meta/classes/module.bbcl
> ass as a base for my recipe to compile a kernel module outside of the kernel
> tree.
> 
> This is my recipe:
> 
> DESCRIPTION = "Nouveau kernel module"
> SECTION = "kernel/modules"
> LICENSE = "CLOSED" #fixme
> PR = "r0"
> SRC_URI = "git://github.com/Gnurou/nouveau;protocol=https;branch=staging"
> SRCREV = "c256f9450c613cd5075fc8c4a407686925041487"
> S = "${WORKDIR}/git/drm/nouveau"
> inherit module
> 
> Naively, I hoped that would work out of the box. Of course it did not :) and 
every compiler call resulted in an error message like this:
> | make: *** [lib/nvif/notify.o] Error 1
> | In file included from ./lib/include/nvif/os.h:32:0,
> | 
> |                  from ./drm/nouveau/include/nvif/object.h:4,
> |                  from ./drm/nouveau/include/nvif/device.h:4,
> | 
> |                  from drm/nouveau/nvif/device.c:25:
> | /home/vagrant/repos/tk1/build/tmp/sysroots/x86_64-linux/usr/lib/arm-poky-l
> | inux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/include/stdint.h:9:26: fatal
> | error: stdint.h: No such file or directory| 
> |  # include_next <stdint.h>
> |  
> |                           ^
> | 
> | compilation terminated.
> 
> I could resolve that issue by adding the following line to my recipe:
> 
> EXTRA_OEMAKE='-C "${STAGING_KERNEL_DIR}"'
> 
> And another problem I had faced was that using:
> 
> S = "${WORKDIR}/git/drm/nouveau"
> 
> Compiled all kernel modules inside the kernel tree, instead only the nouveau
> kernel module.
> 
> I could solve that as well and finally I ended up with:
> 
> EXTRA_OEMAKE='-C "${STAGING_KERNEL_DIR}" M="${S}"/drm/nouveau/'
> 
> Now, I am not sure if I am doing something wrong or if there maybe is a
> problem with module.bbclass.

The original message makes it sound like the makefile for the module isn't 
using CC but instead calling gcc directly, and thus not getting the 
--sysroot option passed in - is that possible?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the Openembedded-core mailing list