Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] External modules fail to load due to unknown symbols
@ 2015-06-05 17:18 Amy Fong
  2015-06-05 22:53 ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Amy Fong @ 2015-06-05 17:18 UTC (permalink / raw)
  To: openembedded-core, amy.fong

From da12fa5e6daca0c0b7bb15df030b1c79fbefa089 Mon Sep 17 00:00:00 2001
From: Amy Fong <amy.fong@windriver.com>
Date: Mon, 1 Jun 2015 13:16:20 -0400
Subject: [PATCH] External modules fail to load due to unknown symbols

When building external kernel modules, a failure can happen
when the module has dependencies on other kernel modules.
In such cases, the build looks at Module.symvers to do
symbol lookups of the other kernel modules that it depends on.

Module.symvers gets copied by do_shared_workdir
after do_compile and Module.symvers gets updated during
do_compile_kernelmodules.

do_compile_kernelmodules is modified to explicitly copy Module.symvers
to the shared workdir.

Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 meta/classes/kernel.bbclass | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 4f22cde..4a177b1 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -215,6 +215,14 @@ do_compile_kernelmodules() {
 	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
 	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
 		oe_runmake ${PARALLEL_MAKE} modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
+
+		# Module.symvers gets updated during the 
+		# building of the kernel modules. We need to
+		# update this in the shared workdir since some
+		# external kernel modules has a dependency on
+		# other kernel modules and will look at this
+		# file to do symbol lookups
+		cp Module.symvers ${STAGING_KERNEL_BUILDDIR}
 	else
 		bbnote "no modules to compile"
 	fi
-- 
2.0.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] External modules fail to load due to unknown symbols
@ 2015-06-02 20:41 Amy Fong
  0 siblings, 0 replies; 4+ messages in thread
From: Amy Fong @ 2015-06-02 20:41 UTC (permalink / raw)
  To: openembedded-core, amy.fong

From da12fa5e6daca0c0b7bb15df030b1c79fbefa089 Mon Sep 17 00:00:00 2001
From: Amy Fong <amy.fong@windriver.com>
Date: Mon, 1 Jun 2015 13:16:20 -0400
Subject: [PATCH] External modules fail to load due to unknown symbols

When building external kernel modules, a failure can happen
when the module has dependencies on other kernel modules.
In such cases, the build looks at Module.symvers to do
symbol lookups of the other kernel modules that it depends on.

Module.symvers gets copied by do_shared_workdir
after do_compile and Module.symvers gets updated during
do_compile_kernelmodules.

do_compile_kernelmodules is modified to explicitly copy Module.symvers
to the shared workdir.

Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 meta/classes/kernel.bbclass | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 4f22cde..4a177b1 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -215,6 +215,14 @@ do_compile_kernelmodules() {
 	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
 	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
 		oe_runmake ${PARALLEL_MAKE} modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
+
+		# Module.symvers gets updated during the 
+		# building of the kernel modules. We need to
+		# update this in the shared workdir since some
+		# external kernel modules has a dependency on
+		# other kernel modules and will look at this
+		# file to do symbol lookups
+		cp Module.symvers ${STAGING_KERNEL_BUILDDIR}
 	else
 		bbnote "no modules to compile"
 	fi
-- 
2.0.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-07 20:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-05 17:18 [PATCH] External modules fail to load due to unknown symbols Amy Fong
2015-06-05 22:53 ` Richard Purdie
2015-06-07 20:30   ` Bruce Ashfield
  -- strict thread matches above, loose matches on Subject: below --
2015-06-02 20:41 Amy Fong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox