<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m porting the makefile to build SocketCan for Ixxat on yocto. At this time I successfully build the module file.<o:p></o:p></p>
<p class="MsoNormal">I now have to install it in the target image.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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..<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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 !<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In the original makefile, installation process copies a file in the following directory : /lib/modules/$(shell uname -r)/kernel/drivers/net/…..<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In the bb file, I “compute” the kernel version using ${KERNEL_VERSION}
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thus the bb file contains the following lines:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">#MODDIR = Module file destination directory<o:p></o:p></p>
<p class="MsoNormal">MODDIR ="${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/can/ixxat"<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">do_install() {<o:p></o:p></p>
<p class="MsoNormal"> install -d ${D}${base_libdir}/firmware<o:p></o:p></p>
<p class="MsoNormal"> install -m 0755 ${WORKDIR}/can-ibxxx_socketcan/ixx-can-ib-1.9.3.fw ${D}${base_libdir}/firmware
<o:p></o:p></p>
<p class="MsoNormal"> install -d ${D}${MODDIR}<o:p></o:p></p>
<p class="MsoNormal"> install -m 0755 ${WORKDIR}/can-ibxxx_socketcan/ixx_pci.ko ${D}${MODDIR}<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal">FILES_${PN} += " ${base_libdir}/firmware ${MODDIR}"<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Build fails with the following error:<o:p></o:p></p>
<p class="MsoNormal">nothing provides kernel-module-ixx-pci-4.12.14-yocto-standard needed by kernel-module-ixxat-candriver-1.0-r0.qemux86_64<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I don’t understand how yocto computes to module filename. It adds the kernel-version to the default filename…<o:p></o:p></p>
<p class="MsoNormal">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 ??<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for helping<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Vincent<span lang="FR" style="font-family:"Arial",sans-serif;color:#222222;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR"><o:p> </o:p></span></p>
</div>
</body>
</html>