<div dir="ltr">Even older kernels than 4.4 might need even more files to be copied first, with 3.16 kernel I'm seeing:<div><br></div><div><div> FLAGS: * new build flags or prefix</div><div>Makefile:358: scripts/Kbuild.include: No such file or directory</div><div>Makefile:614: arch/arm/Makefile: No such file or directory</div><div>/bin/bash: ./scripts/gcc-goto.sh: No such file or directory</div><div>Makefile:755: scripts/Makefile.kasan: No such file or directory</div><div>Makefile:756: scripts/Makefile.extrawarn: No such file or directory</div><div>make[2]: *** No rule to make target `scripts/Makefile.extrawarn'. Stop.</div><div> PERF_VERSION = </div></div><div><br></div><div>Adding scripts, arch, lib to <span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">PERF_SRC fixes the build with 3.16, but not sure if you want to support such old kernel in oe-core.</span></div><div><span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div>Adding <span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">PERF_SRC_append = "scripts arch lib" in perf.bbappend works as well.</span></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, May 24, 2018 at 4:55 PM Martin Jansa <<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">* perf is failing to build for me since this oe-core commit:<br>
commit 9b38c824961fc9dce51bda95c25dac91a69fc64f<br>
Author: Hongxu Jia <<a href="mailto:hongxu.jia@windriver.com" target="_blank">hongxu.jia@windriver.com</a>><br>
Date: Tue Apr 24 11:33:47 2018 +0800<br>
<br>
perf: make a copy of kernel source to perf workdir<br>
<br>
the problem is that perf sources in kernel older than 4.8 (in my case<br>
4.4) are depending on the "global" include headers outside tools<br>
directory, e.g. swab.h in:<br>
kernel-source/tools$ git grep swab.h<br>
perf/MANIFEST:include/linux/swab.h<br>
perf/MANIFEST:include/uapi/linux/swab.h<br>
perf/util/include/asm/byteorder.h:#include "../../../../include/uapi/linux/swab.h"<br>
<br>
this was resolved in 4.8 with:<br>
commit 7e3f36411342a54f1981fa97b43550b8406a3d69<br>
Author: Arnaldo Carvalho de Melo <<a href="mailto:acme@redhat.com" target="_blank">acme@redhat.com</a>><br>
Date: Mon Jul 18 17:42:16 2016 -0300<br>
<br>
perf tools: Remove tools/perf/util/include/asm/byteorder.h<br>
<br>
Not used anymore. This also stops include linux/swab.h directly<br>
from the kernel sources, remove that reference from the MANIFEST.<br>
<br>
and few more changes to make tools/include more complete and standalone:<br>
tools/include in 4.15:<br>
asm asm-generic linux tools trace uapi<br>
<br>
tools/include in 4.4:<br>
asm asm-generic linux tools<br>
<br>
but copying the include header even for kernels which don't really<br>
need it doesn't add big overhead, so just copy include to perf sources<br>
for all kernels.<br>
<br>
Signed-off-by: Martin Jansa <<a href="mailto:Martin.Jansa@gmail.com" target="_blank">Martin.Jansa@gmail.com</a>><br>
---<br>
meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">perf.bb</a> | 1 +<br>
1 file changed, 1 insertion(+)<br>
<br>
diff --git a/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">perf.bb</a> b/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">perf.bb</a><br>
index fb4e3ac668..51f5597eb9 100644<br>
--- a/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">perf.bb</a><br>
+++ b/meta/recipes-kernel/perf/<a href="http://perf.bb" rel="noreferrer" target="_blank">perf.bb</a><br>
@@ -98,6 +98,7 @@ EXTRA_OEMAKE += "\<br>
"<br>
<br>
PERF_SRC ?= "Makefile \<br>
+ include \<br>
tools/arch \<br>
tools/build \<br>
tools/include \<br>
-- <br>
2.17.0<br>
<br>
</blockquote></div>