[oe-commits] [openembedded-core] 03/09: kernel: add objtool to shared workdir when CONFIG_UNWINDER_ORC is set

git at git.openembedded.org git at git.openembedded.org
Fri Mar 1 07:16:02 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 7d4fdd3b95c949277f77df90bb2e8120b8d167ae
Author: Justin Bronder <jsbronder at cold-front.org>
AuthorDate: Fri Mar 1 00:34:26 2019 -0500

    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 ...
    
    Signed-off-by: Bruce Ashfield <bruce.ashfield at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/kernel.bbclass | 9 +++++++++
 1 file changed, 9 insertions(+)

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 () {
 		mkdir -p $kerneldir/arch/${ARCH}/include/generated/
 		cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
 	fi
+
+	if (grep -q -i -e '^CONFIG_UNWINDER_ORC=y$' $kerneldir/.config); then
+		# With CONFIG_UNWINDER_ORC (the default in 4.14), objtool is required for
+		# out-of-tree modules to be able to generate object files.
+		if [ -x tools/objtool/objtool ]; then
+			mkdir -p ${kerneldir}/tools/objtool
+			cp tools/objtool/objtool ${kerneldir}/tools/objtool/
+		fi
+	fi
 }
 
 # We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list