[OE-core] Problem with module.bbclass
Bruce Ashfield
bruce.ashfield at gmail.com
Thu May 21 13:54:22 UTC 2015
On Thu, May 21, 2015 at 9:48 AM, <Steffen.Pankratz at elektrobit.com> wrote:
> Hi,
>
> I am using http://git.openembedded.org/openembedded-core/tree/meta/classes/module.bbclass 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-linux-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.
It is expected, but is dependent on the Makefile in for the actual
source you are
building.
If the module doesn't respect O= or KBUILD_OUTPUT, you will see the build happen
without a split source/build.
And the other, CC is being overriden so the sysroot path is dropped.
Bruce
>
>
> --
> Steffen Pankratz
> Expert, Software Integration & Services
>
> EB - Driving the Future of Software
> Phone: +49 9131 7701-6605
> Fax: +49 9131 7701 6333
> steffen.pankratz at elektrobit.com
> http://automotive.elektrobit.com/
> PGP-Key: http://keyserver.elektrobit.com/
>
> Elektrobit Automotive GmbH, Am Wolfsmantel 46, 91058 Erlangen, Germany
> Managing Directors Alexander Kocher, Gregor Zink
> Register Court Fürth HRB 488
>
>
>
> ----------------------------------------------------------------
> Please note: This e-mail may contain confidential information
> intended solely for the addressee. If you have received this
> e-mail in error, please do not disclose it to anyone, notify
> the sender promptly, and delete the message from your system.
> Thank you.
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
More information about the Openembedded-core
mailing list