<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 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
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;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:435901971;
        mso-list-type:hybrid;
        mso-list-template-ids:570952552 1546410722 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-number-format:alpha-upper;
        mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></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-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">I am trying to compile a kernel located in SVN.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I get this error message:<o:p></o:p></p>
<p class="MsoNormal">ERROR: linux-xlnx-4.9-xilinx-v2017.2+git20-r0 do_kernel_checkout: S /tmp/stride/work-shared/plnx_arm/kernel-source is not set to the linux source directory. Check
<o:p></o:p></p>
<p class="MsoNormal">ERROR: linux-xlnx-4.9-xilinx-v2017.2+git20-r0 do_kernel_checkout: the recipe and set S to the proper extracted subdirectory<o:p></o:p></p>
<p class="MsoNormal">ERROR: linux-xlnx-4.9-xilinx-v2017.2+git20-r0 do_kernel_checkout: Function failed: do_kernel_checkout (log file is located at /tmp/stride/work/plnx_arm-xilinx-linux-gnueabi/linux-xlnx/4.9-xilinx-v2017.2+git20-r0/temp/log.do_kernel_checkout.34928)<o:p></o:p></p>
<p class="MsoNormal">ERROR: Logfile of failure stored in: /tmp/stride/work/plnx_arm-xilinx-linux-gnueabi/linux-xlnx/4.9-xilinx-v2017.2+git20-r0/temp/log.do_kernel_checkout.34928<o:p></o:p></p>
<p class="MsoNormal">ERROR: Task (/opt/pkg/petalinux/2017.2/components/yocto/source/arm/layers/meta-xilinx/recipes-kernel/linux/linux-xlnx_4.9.bb:do_kernel_checkout) failed with exit code '1'<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">And my kernel gets downloaded to:<o:p></o:p></p>
<p class="MsoNormal">/tmp/stride/work/plnx_arm-xilinx-linux-gnueabi/linux-xlnx/4.9-xilinx-v2017.2+git20-r0/trunk<o:p></o:p></p>
<p class="MsoNormal">But Yocto is looking for it in /tmp/stride/work-shared/plnx_arm/kernel-source<o:p></o:p></p>
<p class="MsoNormal">Which is why it is failing in kernel-yocto.bbclass when I try and compile a kernel located in SVN.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If it is a git repo it gets copied into /tmp/stride/work-shared/plnx_arm/kernel-source and things work nicely.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">do_kernel_checkout() {<o:p></o:p></p>
<p class="MsoNormal">…….<o:p></o:p></p>
<p class="MsoNormal">if [ -d "${WORKDIR}/git/" ]; then<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:.5in"># case: git repository<o:p></o:p></p>
<p class="MsoNormal">                # if S is WORKDIR/git, then we shouldn't be moving or deleting the tree.<o:p></o:p></p>
<p class="MsoNormal">                if [ "${source_dir}" != "${source_workdir}" ]; then<o:p></o:p></p>
<p class="MsoNormal">                        if [ -d "${source_workdir}/.git" ]; then<o:p></o:p></p>
<p class="MsoNormal">                                # regular git repository with .git<o:p></o:p></p>
<p class="MsoNormal">                                rm -rf ${S}<o:p></o:p></p>
<p class="MsoNormal">                                mv ${WORKDIR}/git ${S}<o:p></o:p></p>
<p class="MsoNormal">                        else<o:p></o:p></p>
<p class="MsoNormal">                                # create source for bare cloned git repository<o:p></o:p></p>
<p class="MsoNormal">                                git clone ${WORKDIR}/git ${S}<o:p></o:p></p>
<p class="MsoNormal">                                rm -rf ${WORKDIR}/git<o:p></o:p></p>
<p class="MsoNormal">                        fi<o:p></o:p></p>
<p class="MsoNormal">                fi<o:p></o:p></p>
<p class="MsoNormal">                cd ${S}<o:p></o:p></p>
<p class="MsoNormal">else<o:p></o:p></p>
<p class="MsoNormal">                # case: we have no git repository at all. <o:p>
</o:p></p>
<p class="MsoNormal">                # To support low bandwidth options for building the kernel, we'll just
<o:p></o:p></p>
<p class="MsoNormal">                # convert the tree to a git repo and let the rest of the process work unchanged<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">                # if ${S} hasn't been set to the proper subdirectory a default of "linux" is
<o:p></o:p></p>
<p class="MsoNormal">                # used, but we can't initialize that empty directory. So check it and throw a<o:p></o:p></p>
<p class="MsoNormal">                # clear error<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">                cd ${S}<o:p></o:p></p>
<p class="MsoNormal">                if [ ! -f "Makefile" ]; then<o:p></o:p></p>
<p class="MsoNormal">                        bberror "S ${S} is not set to the linux source directory. Check "<o:p></o:p></p>
<p class="MsoNormal">                        bbfatal "the recipe and set S to the proper extracted subdirectory"<o:p></o:p></p>
<p class="MsoNormal">                fi<o:p></o:p></p>
<p class="MsoNormal">……<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">${S} is set to /tmp/stride/work-shared/plnx_arm/kernel-source when I need one of the two things to happen:<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">A)<span style="font:7.0pt "Times New Roman"">    
</span></span><![endif]>${S} set to  ${WORKDIR}/trunk             OR<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">B)<span style="font:7.0pt "Times New Roman"">     
</span></span><![endif]>${WORKDIR}/trunk copied to ${S}/<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I could modify that file directly on my machine and move on, but is there a way I can create an .bbappend or something that will change ${S}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m pretty new to Yocto and I’d like to have a solution that resides in my project folder instead of having to modify Yocto files so that when I do tool installs on new development machines I can just checkout my project data and have it
 work.  I’m using Petalinux, so the process would be install that, then checkout the project and then build it, with the correct ${S} directory flowing into kernel-yocto.bbclass:do_kernel_checkout()<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m new Yocto but I’ve been reading a ton and am looking for some advice.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>This e-mail contains proprietary information some or all of which may be legally privileged. It is intended for the recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the authority by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail.  In addition, information contained in or attached to this e-mail may be subject to either 22 C.F.R. Parts 120?130, or 15 C.F.R. Parts 730-774. These regulations prohibit the release or disclosure of certain information contained herein to anyone who is not a U.S. citizen or permanent resident alien, without a license first having been issued.  Failure to observe such requirements is a violation of U.S. law that carries serious penalties.
  ­­  </body>
</html>