Re: [yocto] how to "compute" path to install module file

2018-03-23 Thread Vincent Daanen
Hi 
Thanks for your answer, it helps me to get module installation work.

But now I have another problem ... Stay tune the mail willarrive soon on the 
mailing list

> On 3/22/18 12:31 AM, Vincent Daanen wrote:
> > Hi,
> > 
> > I'm porting the makefile to build SocketCan for Ixxat on yocto. At 
> > this time I successfully build the module file.
>
> Have you checked out the CANopen drivers?
> https://github.com/ros-industrial/ros_canopen
> https://github.com/bmwcarit/meta-ros/tree/master/recipes-ros/ros-canopen
>
> There are already recipes for this if it happens to work for your part.
>
> Just figured I'd mention it :)
>
> For adding the Ixxat driver, this documentation might help:
> https://www.yoctoproject.org/docs/current/kernel-dev/kernel-dev.html#working-with-out-of-tree
>  modules
>
> > 
> > Build fails with the following error:
> > 
> > nothing provides kernel-module-ixx-pci-4.12.14-yocto-standard needed 
> > by kernel-module-ixxat-candriver-1.0-r0.qemux86_64
>
> Do you have a recipe that provides ixx-pci? If so it needs to say:
>
> PROVIDES = "ixx-pci"
>
> https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-PROVIDES
>
> Also, you need to be sure that it is being built, so I would add that recipe 
> into some RDEPENDS variable, > > for example:
>
> MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "ixx-pci"
>
> (in this case in your machine conf, assuming the package name is "ixx-pci")
>
> > 
> > I don't understand how yocto computes to module filename. It adds the 
> > kernel-version to the default filename...
>
> check out the "module_pattern" variables in:
> meta/classes/kernel-module-split.bbclass
>
> I believe this is done during packaging.
>
> Cheers,
> Stephano

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] how to "compute" path to install module file

2018-03-22 Thread Stephano Cetola
On 3/22/18 12:31 AM, Vincent Daanen wrote:
> Hi, 
> 
> I’m porting the makefile to build SocketCan for Ixxat on yocto. At this
> time I successfully build the module file.

Have you checked out the CANopen drivers?
https://github.com/ros-industrial/ros_canopen
https://github.com/bmwcarit/meta-ros/tree/master/recipes-ros/ros-canopen

There are already recipes for this if it happens to work for your part.

Just figured I'd mention it :)

For adding the Ixxat driver, this documentation might help:
https://www.yoctoproject.org/docs/current/kernel-dev/kernel-dev.html#working-with-out-of-tree-modules

> 
> Build fails with the following error:
> 
> nothing provides kernel-module-ixx-pci-4.12.14-yocto-standard needed by
> kernel-module-ixxat-candriver-1.0-r0.qemux86_64

Do you have a recipe that provides ixx-pci? If so it needs to say:

PROVIDES = "ixx-pci"

https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-PROVIDES

Also, you need to be sure that it is being built, so I would add that
recipe into some RDEPENDS variable, for example:

MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "ixx-pci"

(in this case in your machine conf, assuming the package name is "ixx-pci")

> 
> I don’t understand how yocto computes to module filename. It adds the
> kernel-version to the default filename…

check out the "module_pattern" variables in:
meta/classes/kernel-module-split.bbclass

I believe this is done during packaging.

Cheers,
Stephano

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] how to "compute" path to install module file

2018-03-22 Thread Vincent Daanen
Hi,

I'm porting the makefile to build SocketCan for Ixxat on yocto. At this time I 
successfully build the module file.
I now have to install it in the target image.

The "install" procedure from the original makefile does not work 
out-of-the-box. It copies files in the following directories starting by /lib 
and thus it tries to install in the host system, not the target system..

In order to install in the target image, the installation is performed in a 
customized do_install function in the bb file, and the problem starts here !

In the original makefile, installation process copies a file in the following 
directory : /lib/modules/$(shell uname -r)/kernel/drivers/net/.

In the bb file, I "compute" the kernel version using ${KERNEL_VERSION}

Thus the bb file contains the following lines:

#MODDIR = Module file destination directory
MODDIR 
="${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/can/ixxat"

do_install() {
install -d ${D}${base_libdir}/firmware
install -m 0755 ${WORKDIR}/can-ibxxx_socketcan/ixx-can-ib-1.9.3.fw 
${D}${base_libdir}/firmware
install -d ${D}${MODDIR}
install -m 0755 ${WORKDIR}/can-ibxxx_socketcan/ixx_pci.ko ${D}${MODDIR}
}
FILES_${PN} += " ${base_libdir}/firmware ${MODDIR}"

Build fails with the following error:
nothing provides kernel-module-ixx-pci-4.12.14-yocto-standard needed by 
kernel-module-ixxat-candriver-1.0-r0.qemux86_64

I don't understand how yocto computes to module filename. It adds the 
kernel-version to the default filename...
Is it the standard way for computing module filename with yocto (I searched and 
did not find any info about this) or could it be a side-effect of my bb file 
(and in this case, how can I identify where this side-effect occurs) or .. 
maybe if bug in bitbake ??

Thanks for helping

Vincent

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto