[yocto] Building out of tree module into kernel image
Fan Zhang
fzhang at sgl.com
Wed Sep 6 12:20:30 PDT 2017
Hi Vincent
Thanks for the quick reply. The MACHINE_ESSENTIAL_EXTRA_RDEPENDS
instruction was put in the local.conf in my build folder.
After renaming axidma.bb to kernel-module-axidma.bb. The image build
picked up this module. Thanks you so much.
There is this comments in the module sample bb file/
/
/# The inherit of module.bbclass will automatically name module
packages with/
/# "kernel-module-" prefix as required by the oe-core build environment.
/
leaded me to believe this is done automatically by bitbake. Thanks again.
Best regards,
Fan
/
/
//On 06/09/2017 11:00 AM, Vincent Prince wrote:
> Hi,
>
> Where did you put MACHINE_ESSENTIAL_EXTRA_RDEPENDS instruction?
> Did you try to rename axidma.bb <http://axidma.bb/> to
> kernel-module-axidma.bb <http://kernel-module-axidma.bb> ?
>
> Best Regards,
> Vincent
>
> 2017-09-06 16:13 GMT+02:00 Fan Zhang <fzhang at sgl.com
> <mailto:fzhang at sgl.com>>:
>
> Hi,
>
> I've followed the Yocto manual here:
> http://www.yoctoproject.org/docs/1.6.1/kernel-dev/kernel-dev.html#incorporating-out-of-tree-modules
> <http://www.yoctoproject.org/docs/1.6.1/kernel-dev/kernel-dev.html#incorporating-out-of-tree-modules>
> to include an out of tree module, named axidma. I can build this
> module alone by
>
> bitbake axidma
>
> and get the .ko file in build/tmp/work/my_machine/axidma
> directory, but when I build my custom image, and include this
> module by
>
> MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-module-axidma"
>
> I got an error that says "/Computing transaction...error: Can't
> install packagegroup-core-boot-1.0-r17 at microzed_zynq7: no package
> provides kernel-module-axidma/". All the other variables mentioned
> in the manual doesn't compile the module either. They just doesn't
> stop the image from building.
>
> After googling for a few days, it seems every thread I found
> stucked at different stage of this problem, some advance further
> than me, but from my very limited knowledge about bitbake, out of
> tree modules should be included into the build by module.bbclass,
> which has do_configuration, do_compile and do _install in that
> class. So it is quite puzzling why this is not working.
>
> Any pointer is greatly appreciated. Thanks. Below are the
> configurations for my module:
>
> My axidma folder structure is this
>
> /axidma (a directory under recipes-sgl directory)
> /
>
> / - files (directory)
> /
>
> / - COPYING/
>
> / - dma_proxy.c/
>
> / - dma_proxy.h/
>
> / - Makefile
> /
>
> / - axidma.bb <http://axidma.bb>/
>
> The bb files in axidma directory is added to BBFILES in
> layer.conf by
>
> /BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \//
> // ${LAYERDIR}/recipes-*/*/*.bbappend"/
>
> axidma.bb <http://axidma.bb> file looks like this:
>
> /SUMMARY = "Example of how to build an external Linux
> kernel module"
> LICENSE = "GPLv2"
> LIC_FILES_CHKSUM =
> "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
>
> inherit module
> PR = "r0"
> PV = "0.1"
> SRC_URI = "file://Makefile \
> file://dma_proxy.c \
> file://dma_proxy.h \
> file://COPYING \
> "
>
> S = "${WORKDIR}"
>
> # The inherit of module.bbclass will automatically name
> module packages with
> # "kernel-module-" prefix as required by the oe-core build
> environment./
>
> Makefile looks like this:
>
> /obj-m := dma_proxy.o//
> //
> //SRC := $(shell pwd)//
> //
> //all://
> // $(MAKE) -C $(KERNEL_SRC) M=$(SRC)//
> //
> //modules_install://
> // $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install//
> //
> //clean://
> // rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c//
> // rm -f Module.markers Module.symvers modules.order//
> // rm -rf .tmp_versions Modules.symvers/
>
> Fan Zhang
>
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org <mailto:yocto at yoctoproject.org>
> https://lists.yoctoproject.org/listinfo/yocto
> <https://lists.yoctoproject.org/listinfo/yocto>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20170906/a3cdb077/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fzhang.vcf
Type: text/x-vcard
Size: 175 bytes
Desc: not available
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20170906/a3cdb077/attachment.vcf>
More information about the yocto
mailing list