summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/perf
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2018-04-24 11:33:47 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-04 13:28:05 +0100
commit35c75c7773571005678de140589bc79becf6a63f (patch)
treea24a783de846c674e2c31939ec9fc16a18c9a134 /meta/recipes-kernel/perf
parent1d708bb18578c54bf64fdf028a2832741eb842ff (diff)
downloadpoky-35c75c7773571005678de140589bc79becf6a63f.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) 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>
Diffstat (limited to 'meta/recipes-kernel/perf')
-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 872b5f028a..fb4e3ac668 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_OWN_DIR}/perl/${@get_perl_version
61 61
62inherit kernelsrc 62inherit kernelsrc
63 63
64B = "${WORKDIR}/${BPN}-${PV}" 64S = "${WORKDIR}/${BP}"
65SPDX_S = "${S}/tools/perf" 65SPDX_S = "${S}/tools/perf"
66 66
67# The LDFLAGS is required or some old kernels fails due missing 67# The LDFLAGS is required or some old kernels fails due missing
@@ -97,6 +97,16 @@ EXTRA_OEMAKE += "\
97 'infodir=${@os.path.relpath(infodir, prefix)}' \ 97 'infodir=${@os.path.relpath(infodir, prefix)}' \
98" 98"
99 99
100PERF_SRC ?= "Makefile \
101 tools/arch \
102 tools/build \
103 tools/include \
104 tools/lib \
105 tools/Makefile \
106 tools/perf \
107 tools/scripts \
108"
109
100PERF_EXTRA_LDFLAGS = "" 110PERF_EXTRA_LDFLAGS = ""
101 111
102# MIPS N32 112# MIPS N32
@@ -119,11 +129,22 @@ do_install() {
119 fi 129 fi
120} 130}
121 131
122do_configure_prepend () { 132do_configure[prefuncs] += "copy_perf_source_from_kernel"
123 # Fix for rebuilding 133python copy_perf_source_from_kernel() {
124 rm -rf ${B}/ 134 sources = (d.getVar("PERF_SRC") or "").split()
125 mkdir -p ${B}/ 135 src_dir = d.getVar("STAGING_KERNEL_DIR")
136 dest_dir = d.getVar("S")
137 bb.utils.mkdirhier(dest_dir)
138 for s in sources:
139 src = oe.path.join(src_dir, s)
140 dest = oe.path.join(dest_dir, s)
141 if os.path.isdir(src):
142 oe.path.copyhardlinktree(src, dest)
143 else:
144 bb.utils.copyfile(src, dest)
145}
126 146
147do_configure_prepend () {
127 # If building a multlib based perf, the incorrect library path will be 148 # If building a multlib based perf, the incorrect library path will be
128 # detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit 149 # detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit
129 # build, with a 64 bit multilib, the arch won't match and the detection of a 150 # build, with a 64 bit multilib, the arch won't match and the detection of a