<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 23, 2018 at 6:05 PM, Richard Purdie <span dir="ltr">&lt;<a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundation.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, 2018-04-23 at 13:51 -0400, Bruce Ashfield wrote:<br>
&gt; On 2018-04-23 4:13 AM, Hongxu Jia wrote:<br>
&gt; &gt; <br>
&gt; &gt; Since perf modify kernel source which shared by multiple<br>
&gt; &gt; recipes, it probably caused kernel-devsrc compile failure<br>
&gt; &gt; at world build.<br>
&gt; &gt; ...<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; 0 blocks<br>
&gt; &gt; &gt; cpio: ./tools/perf/arch/arm/util/<wbr>sedr7ORqk: Cannot stat:<br>
&gt; &gt; No such file or directory<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; 0 blocks<br>
&gt; &gt; ...<br>
&gt; &gt; cpio tried to find a file at ${S}/tools/perf and failed<br>
&gt; &gt; if the input list is not valid.<br>
&gt; &gt; <br>
&gt; &gt; Make a copy of kernel shared source directory into a perf workdir<br>
&gt; &gt; could fix the issue.<br>
&gt; &gt; <br>
&gt; &gt; Drop `Fix for rebuilding&#39; which is obsolete<br>
&gt; &gt; <br>
&gt; &gt; Signed-off-by: Hongxu Jia &lt;<a href="mailto:hongxu.jia@windriver.com">hongxu.jia@windriver.com</a>&gt;<br>
&gt; &gt; ---<br>
&gt; &gt;   meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">perf.<wbr>bb</a> | 11 ++++++-----<br>
&gt; &gt;   1 file changed, 6 insertions(+), 5 deletions(-)<br>
&gt; &gt; <br>
&gt; &gt; diff --git a/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a> b/meta/recipes-<br>
&gt; &gt; kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">perf.bb</a><br>
&gt; &gt; index 872b5f0..8b40806 100644<br>
&gt; &gt; --- a/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a><br>
&gt; &gt; +++ b/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a><br>
&gt; &gt; @@ -61,7 +61,7 @@ export PERL_ARCHLIB = &quot;${STAGING_LIBDIR}${PERL_OW<br>
&gt; &gt; N_DIR}/perl/${@get_perl_<wbr>version<br>
&gt; &gt;   <br>
&gt; &gt;   inherit kernelsrc<br>
&gt; &gt;   <br>
&gt; &gt; -B = &quot;${WORKDIR}/${BPN}-${PV}&quot;<br>
&gt; &gt; +S = &quot;${WORKDIR}/${BP}&quot;<br>
&gt; &gt;   SPDX_S = &quot;${S}/tools/perf&quot;<br>
&gt; &gt;   <br>
&gt; &gt;   # The LDFLAGS is required or some old kernels fails due missing<br>
&gt; &gt; @@ -119,11 +119,12 @@ do_install() {<br>
&gt; &gt;     fi<br>
&gt; &gt;   }<br>
&gt; &gt;   <br>
&gt; &gt; -do_configure_prepend () {<br>
&gt; &gt; -    # Fix for rebuilding<br>
&gt; &gt; -    rm -rf ${B}/<br>
&gt; &gt; -    mkdir -p ${B}/<br>
&gt; &gt; +do_configure[prefuncs] += &quot;git_clone_kernel_source&quot;<br>
&gt; &gt; +git_clone_kernel_source () {<br>
&gt; &gt; +    git clone --single-branch ${STAGING_KERNEL_DIR} ${S}<br>
&gt; I probably would have used &quot;cp -a -r&quot;, or similar. Since it<br>
&gt; is possible that a kernel may not actually be a git repo (linux-yocto<br>
&gt; always is, but that is just one data point).<br>
&gt; <br>
&gt; Also, did you try just copying the tools SRC dir + whatever<br>
&gt; infrastructure is needed to build ? That will save us a LOT<br>
&gt; of i/o when moving the source around for perf to build.<br>
&gt; <br>
&gt; But outside of those details/mechanics, the approach is sound.<br>
<br>
</div></div>Our &quot;copy hardlink tree&quot; function, whatever its called is sometimes of<br>
use in these cases...<br>
<br>
I think I&#39;m the current owner of a bug in this area which I&#39;ve sadly<br>
not gotten to yet :(.<br>
<br>
Also, have we considered the alternative - not copying tools/perf for<br>
the kernel devsrc?<br></blockquote><div><br></div><div>We could, but sometimes the devsrc is actually used to build the tools.</div><div>I know that I have used it to build perf in the past.</div><div><br></div><div>It is mostly skipped in my rewritten version (which I&#39;ll resubmit after 2.5</div><div>releases). So for now, I&#39;m thinking the smallest footprint change makes</div><div>the most sense (as to which that is, that is probably not black and white).</div><div><br></div><div>Bruce</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
<br>
Richard<br>
<div class="HOEnZb"><div class="h5">-- <br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">&quot;Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end&quot;</div>
</div></div>