<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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Cantarell;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:472792674;
        mso-list-type:hybrid;
        mso-list-template-ids:-653985490 -331437458 269025283 269025285 269025281 269025283 269025285 269025281 269025283 269025285;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:20.25pt;
        text-indent:-18.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-font-family:Calibri;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:56.25pt;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:ï‚§;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:92.25pt;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:ï‚·;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:128.25pt;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:164.25pt;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:ï‚§;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:200.25pt;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:ï‚·;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:236.25pt;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:272.25pt;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:ï‚§;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:308.25pt;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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-CA" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">I tried building backports under Yocto a few years back using Yocto daisy branch with kernel 3.4 for x86 and kernel 3.12 for ARM.  After a fair amount of pain I was able to get it to sort of work. 
 The problem was mainly a sysroot arm-wrestle between kernel and backports because they both generate the same kernel module packages.  It was a last-one-wins arm-wrestle.  It sort of worked OK with daisy branch, but newer yocto versions have stricter management
 of sysroots and staging areas.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">I think what we need is some sort of virtual provider or alternatives scheme to make this work properly.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">You can also run into problems related to exports to other out-of-tree modules but IIRC, it would only affect an out-of-tree module with an incompatible license.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">I was able to run a few circa kernel 3.18 backports experimentally on a kernel 3.4 and a kernel 3.12.  Eventually we just upgraded the kernel.  Another project I know of used backports to update
 their kernel source and then created a recipe to build kernel from that source.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">The notes/questions I had in the end were:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<ul style="margin-top:0cm" type="disc">
<li class="MsoListParagraph" style="margin-left:-15.75pt;mso-list:l0 level1 lfo1">
<span style="mso-fareast-language:EN-US">was building backports as out-of-tree kernel modules<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:-15.75pt;mso-list:l0 level1 lfo1">
<span style="mso-fareast-language:EN-US">was concerned that this wouldn’t provide updated kernel staging source, particularly with respect to any updated includes<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:-15.75pt;mso-list:l0 level1 lfo1">
<span style="mso-fareast-language:EN-US">wasn’t sure what would be propagated into the sysroot<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:-15.75pt;mso-list:l0 level1 lfo1">
<span style="mso-fareast-language:EN-US">should consider the backports use case that patches the kernel source and then perhaps use this to generate patchset to be added to kernel recipe (bbappend)<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:-15.75pt;mso-list:l0 level1 lfo1">
<span style="mso-fareast-language:EN-US">otherwise need to ensure proper handling of sysroot, staging, (as well as a notion of providers and/or alternatives like I mentioned earlier)<o:p></o:p></span></li></ul>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">I haven’t touched this in years, but perhaps it may help a bit.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">I think your best bet for short term is to use it to patch the kernel and then capture the changes as a patchset to add to a kernel recipe.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style="text-autospace:none"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#656565"><o:p> </o:p></span></b></p>
<p class="MsoNormal" style="text-autospace:none"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#656565">Regards,<o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-autospace:none"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#656565"><o:p> </o:p></span></b></p>
<p class="MsoNormal" style="text-autospace:none"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#656565">Darcy<o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-autospace:none"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#656565"><o:p> </o:p></span></b></p>
<p class="MsoNormal" style="text-autospace:none"><b><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#656565">Darcy Watkins ::  Senior Staff Engineer, Firmware<o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-autospace:none"><b><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#E33A2F"><o:p> </o:p></span></b></p>
<p class="MsoNormal" style="text-autospace:none"><b><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#E33A2F">SIERRA WIRELESS<o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#E33A2F">Direct</span><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#656565">  +1 604 233 7989 
  ::  </span><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#E33A2F">Fax 
</span><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#656565">+1 604 231 1109  :: 
</span><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#C00000">Main</span><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif"> 
<span style="color:#656565">+1 604 231 1100</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#656565">13811 Wireless Way  :: Richmond, BC Canada V6V 3A4<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#656565">[P2]<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><a href="mailto:dwatkins@sierrawireless.com"><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif;color:blue">dwatkins@sierrawireless.com</span></a><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#E43B30">
 :: </span><a href="http://www.sierrawireless.com/"><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif;color:blue">www.sierrawireless.com</span></a><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#E43B30"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org]
<b>On Behalf Of </b>Marlon Smith<br>
<b>Sent:</b> October-18-17 3:14 PM<br>
<b>To:</b> yocto@yoctoproject.org<br>
<b>Subject:</b> [yocto] Building kernel backports for ARM with Yocto<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi everyone,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I'm trying to build the Linux backports project to get updated wifi drivers on an older kernel.  The problem is that when building backports, it first builds several tools that need to be run natively before cross-compiling the rest of
 the project.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I know how to write a bitbake recipe to compile natively, and how to write one to build for the target, but I can't figure out how to combine the two.  The backports project has steps for LTIB:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<pre> %Build<o:p></o:p></pre>
<pre> export PATH=$UNSPOOF_PATH<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre> make menuconfig prefix=%{_prefix} \<o:p></o:p></pre>
<pre>   CROSS_COMPILE=${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX} \<o:p></o:p></pre>
<pre>   ARCH=$LINTARCH KLIB=${TOP}/rootfs/lib/modules/%{kversion} \<o:p></o:p></pre>
<pre>   KLIB_BUILD=${TOP}/rpm/BUILD/linux<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre> export PATH=$SPOOF_PATH<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre> make prefix=%{_prefix} \<o:p></o:p></pre>
<pre>   CROSS_COMPILE=${TOOLCHAIN_PATH}/bin/${TOOLCHAIN_PREFIX} \<o:p></o:p></pre>
<pre>   ARCH=$LINTARCH KLIB=${TOP}/rootfs/lib/modules/%{kversion} \<o:p></o:p></pre>
<pre>   KLIB_BUILD=${TOP}/rpm/BUILD/linux<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><span style="font-size:11.5pt;font-family:"Cantarell",serif">I believe what I need is an equivalent to the line </span>export PATH=$UNSPOOF_PATH<span style="font-size:11.5pt;font-family:"Cantarell",serif"> but I can't find anything in the Yocto documentation or mailing lists that would be equivalent to that.</span><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><span style="font-size:11.5pt;font-family:"Cantarell",serif">Any help would be much appreciated!</span><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><span style="font-size:11.5pt;font-family:"Cantarell",serif">Thanks</span><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><span style="font-size:11.5pt;font-family:"Cantarell",serif">Marlon</span><o:p></o:p></pre>
</div>
</div>
</body>
</html>