summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 0df087b531..b3aa509e9f 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