summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorJustin Bronder <jsbronder@cold-front.org>2019-03-01 05:34:26 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-02 16:49:07 (GMT)
commita2938316e3bf531ca78d7c9fa5466daa7246a2ab (patch)
tree95b5184e82f66149384fd6088d7eafec717384cd /meta/classes/kernel.bbclass
parent3a5a49cad0c903a4d3d77d288514c8e5c15e07af (diff)
downloadpoky-a2938316e3bf531ca78d7c9fa5466daa7246a2ab.tar.gz
kernel: add objtool to shared workdir when CONFIG_UNWINDER_ORC is set
Based on: https://patchwork.openembedded.org/patch/148047/ When x86_64 enables CONFIG_UNWINDER_ORC [ORC (Oops Rewind Capability) unwinder for unwinding kernel stack traces], objtool is required to generate the required information. If we don't copy objtool to the shared workdir, out-of-tree modules cannot generate object files. For instance, meta-skeleton/hello-mod fails with: | make[3]: *** No rule to make target 'tools/objtool/objtool', needed by ... (From OE-Core rev: 7d4fdd3b95c949277f77df90bb2e8120b8d167ae) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index a5b1df1..9da9818 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -487,6 +487,15 @@ do_shared_workdir () {
487 mkdir -p $kerneldir/arch/${ARCH}/include/generated/ 487 mkdir -p $kerneldir/arch/${ARCH}/include/generated/
488 cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/ 488 cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
489 fi 489 fi
490
491 if (grep -q -i -e '^CONFIG_UNWINDER_ORC=y$' $kerneldir/.config); then
492 # With CONFIG_UNWINDER_ORC (the default in 4.14), objtool is required for
493 # out-of-tree modules to be able to generate object files.
494 if [ -x tools/objtool/objtool ]; then
495 mkdir -p ${kerneldir}/tools/objtool
496 cp tools/objtool/objtool ${kerneldir}/tools/objtool/
497 fi
498 fi
490} 499}
491 500
492# We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware 501# We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware