<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"><<a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundation.org</a>></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>
> On 2018-04-23 4:13 AM, Hongxu Jia wrote:<br>
> > <br>
> > Since perf modify kernel source which shared by multiple<br>
> > recipes, it probably caused kernel-devsrc compile failure<br>
> > at world build.<br>
> > ...<br>
> > > <br>
> > > 0 blocks<br>
> > > cpio: ./tools/perf/arch/arm/util/<wbr>sedr7ORqk: Cannot stat:<br>
> > No such file or directory<br>
> > > <br>
> > > 0 blocks<br>
> > ...<br>
> > cpio tried to find a file at ${S}/tools/perf and failed<br>
> > if the input list is not valid.<br>
> > <br>
> > Make a copy of kernel shared source directory into a perf workdir<br>
> > could fix the issue.<br>
> > <br>
> > Drop `Fix for rebuilding' which is obsolete<br>
> > <br>
> > Signed-off-by: Hongxu Jia <<a href="mailto:hongxu.jia@windriver.com">hongxu.jia@windriver.com</a>><br>
> > ---<br>
> > meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">perf.<wbr>bb</a> | 11 ++++++-----<br>
> > 1 file changed, 6 insertions(+), 5 deletions(-)<br>
> > <br>
> > 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>
> > kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">perf.bb</a><br>
> > index 872b5f0..8b40806 100644<br>
> > --- a/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a><br>
> > +++ b/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">per<wbr>f.bb</a><br>
> > @@ -61,7 +61,7 @@ export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OW<br>
> > N_DIR}/perl/${@get_perl_<wbr>version<br>
> > <br>
> > inherit kernelsrc<br>
> > <br>
> > -B = "${WORKDIR}/${BPN}-${PV}"<br>
> > +S = "${WORKDIR}/${BP}"<br>
> > SPDX_S = "${S}/tools/perf"<br>
> > <br>
> > # The LDFLAGS is required or some old kernels fails due missing<br>
> > @@ -119,11 +119,12 @@ do_install() {<br>
> > fi<br>
> > }<br>
> > <br>
> > -do_configure_prepend () {<br>
> > - # Fix for rebuilding<br>
> > - rm -rf ${B}/<br>
> > - mkdir -p ${B}/<br>
> > +do_configure[prefuncs] += "git_clone_kernel_source"<br>
> > +git_clone_kernel_source () {<br>
> > + git clone --single-branch ${STAGING_KERNEL_DIR} ${S}<br>
> I probably would have used "cp -a -r", or similar. Since it<br>
> is possible that a kernel may not actually be a git repo (linux-yocto<br>
> always is, but that is just one data point).<br>
> <br>
> Also, did you try just copying the tools SRC dir + whatever<br>
> infrastructure is needed to build ? That will save us a LOT<br>
> of i/o when moving the source around for perf to build.<br>
> <br>
> But outside of those details/mechanics, the approach is sound.<br>
<br>
</div></div>Our "copy hardlink tree" function, whatever its called is sometimes of<br>
use in these cases...<br>
<br>
I think I'm the current owner of a bug in this area which I'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'll resubmit after 2.5</div><div>releases). So for now, I'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">"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"</div>
</div></div>