summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2018-04-24 03:33:47 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-15 09:22:45 (GMT)
commit42eadd3dea15ef3e31df16f239a15d0bb4e50bba (patch)
tree415da1f844d7f7345aab068d34231c24eadbe7ab
parent8b2dbbddc47aab5a84241b45d22a17fe344c30b2 (diff)
downloadpoky-42eadd3dea15ef3e31df16f239a15d0bb4e50bba.tar.gz
perf: make a copy of kernel source to perf workdir
Since perf contaminates linux shared workdir, 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 [YOCTO #10880] (From OE-Core rev: 9b38c824961fc9dce51bda95c25dac91a69fc64f) (From OE-Core rev: 1a39330bf79f3d36a1a0f6d34b421de53ff36405) (From OE-Core rev: 6f9117c0bceeedbfce08647825edf86966457bfc) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-kernel/perf/perf.bb31
1 files changed, 26 insertions, 5 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 0df087b..b3aa509 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -59,7 +59,7 @@ export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version
59 59
60inherit kernelsrc 60inherit kernelsrc
61 61
62B = "${WORKDIR}/${BPN}-${PV}" 62S = "${WORKDIR}/${BP}"
63SPDX_S = "${S}/tools/perf" 63SPDX_S = "${S}/tools/perf"
64 64
65# The LDFLAGS is required or some old kernels fails due missing 65# The LDFLAGS is required or some old kernels fails due missing
@@ -95,6 +95,16 @@ EXTRA_OEMAKE += "\
95 'infodir=${@os.path.relpath(infodir, prefix)}' \ 95 'infodir=${@os.path.relpath(infodir, prefix)}' \
96" 96"
97 97
98PERF_SRC ?= "Makefile \
99 tools/arch \
100 tools/build \
101 tools/include \
102 tools/lib \
103 tools/Makefile \
104 tools/perf \
105 tools/scripts \
106"
107
98PERF_EXTRA_LDFLAGS = "" 108PERF_EXTRA_LDFLAGS = ""
99 109
100# MIPS N32 110# MIPS N32
@@ -117,11 +127,22 @@ do_install() {
117 fi 127 fi
118} 128}
119 129
120do_configure_prepend () { 130do_configure[prefuncs] += "copy_perf_source_from_kernel"
121 # Fix for rebuilding 131python copy_perf_source_from_kernel() {
122 rm -rf ${B}/ 132 sources = (d.getVar("PERF_SRC") or "").split()
123 mkdir -p ${B}/ 133 src_dir = d.getVar("STAGING_KERNEL_DIR")
134 dest_dir = d.getVar("S")
135 bb.utils.mkdirhier(dest_dir)
136 for s in sources:
137 src = oe.path.join(src_dir, s)
138 dest = oe.path.join(dest_dir, s)
139 if os.path.isdir(src):
140 oe.path.copyhardlinktree(src, dest)
141 else:
142 bb.utils.copyfile(src, dest)
143}
124 144
145do_configure_prepend () {
125 # If building a multlib based perf, the incorrect library path will be 146 # If building a multlib based perf, the incorrect library path will be
126 # detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit 147 # detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit
127 # build, with a 64 bit multilib, the arch won't match and the detection of a 148 # build, with a 64 bit multilib, the arch won't match and the detection of a