From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Bruce Ashfield <bruce.ashfield@windriver.com>,
Hongxu Jia <hongxu.jia@windriver.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [PATCH V2] perf: make a copy of kernel source to perf workdir
Date: Mon, 23 Apr 2018 23:05:43 +0100 [thread overview]
Message-ID: <1524521143.18865.174.camel@linuxfoundation.org> (raw)
In-Reply-To: <df7a7e3b-09a9-26ac-8969-bc369f9bc2c4@windriver.com>
On Mon, 2018-04-23 at 13:51 -0400, Bruce Ashfield wrote:
> On 2018-04-23 4:13 AM, Hongxu Jia wrote:
> >
> > Since perf modify kernel source which shared by multiple
> > recipes, it probably caused kernel-devsrc compile failure
> > at world build.
> > ...
> > >
> > > 0 blocks
> > > cpio: ./tools/perf/arch/arm/util/sedr7ORqk: Cannot stat:
> > No such file or directory
> > >
> > > 0 blocks
> > ...
> > cpio tried to find a file at ${S}/tools/perf and failed
> > if the input list is not valid.
> >
> > Make a copy of kernel shared source directory into a perf workdir
> > could fix the issue.
> >
> > Drop `Fix for rebuilding' which is obsolete
> >
> > Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> > ---
> > meta/recipes-kernel/perf/perf.bb | 11 ++++++-----
> > 1 file changed, 6 insertions(+), 5 deletions(-)
> >
> > diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-
> > kernel/perf/perf.bb
> > index 872b5f0..8b40806 100644
> > --- a/meta/recipes-kernel/perf/perf.bb
> > +++ b/meta/recipes-kernel/perf/perf.bb
> > @@ -61,7 +61,7 @@ export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OW
> > N_DIR}/perl/${@get_perl_version
> >
> > inherit kernelsrc
> >
> > -B = "${WORKDIR}/${BPN}-${PV}"
> > +S = "${WORKDIR}/${BP}"
> > SPDX_S = "${S}/tools/perf"
> >
> > # The LDFLAGS is required or some old kernels fails due missing
> > @@ -119,11 +119,12 @@ do_install() {
> > fi
> > }
> >
> > -do_configure_prepend () {
> > - # Fix for rebuilding
> > - rm -rf ${B}/
> > - mkdir -p ${B}/
> > +do_configure[prefuncs] += "git_clone_kernel_source"
> > +git_clone_kernel_source () {
> > + git clone --single-branch ${STAGING_KERNEL_DIR} ${S}
> I probably would have used "cp -a -r", or similar. Since it
> is possible that a kernel may not actually be a git repo (linux-yocto
> always is, but that is just one data point).
>
> Also, did you try just copying the tools SRC dir + whatever
> infrastructure is needed to build ? That will save us a LOT
> of i/o when moving the source around for perf to build.
>
> But outside of those details/mechanics, the approach is sound.
Our "copy hardlink tree" function, whatever its called is sometimes of
use in these cases...
I think I'm the current owner of a bug in this area which I've sadly
not gotten to yet :(.
Also, have we considered the alternative - not copying tools/perf for
the kernel devsrc?
Cheers,
Richard
next prev parent reply other threads:[~2018-04-23 22:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 8:13 [PATCH V2] perf: make a copy of kernel source to perf workdir Hongxu Jia
2018-04-23 17:51 ` Bruce Ashfield
2018-04-23 22:05 ` Richard Purdie [this message]
2018-04-24 0:45 ` Bruce Ashfield
2018-04-24 1:44 ` Hongxu Jia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1524521143.18865.174.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=bruce.ashfield@windriver.com \
--cc=hongxu.jia@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox