[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core] [Patch v2 1/1] kernel.bbclass: enable a link for external module building
From:       nitin.a.kamble () intel ! com (nitin ! a ! kamble at intel ! com)
Date:       2014-09-30 21:40:05
Message-ID: 9c2742ca226e51d4d369e9c761c270c8acbe7b2a.1412112668.git.nitin.a.kamble () intel ! com
[Download RAW message or body]

From: Nitin A Kamble <nitin.a.kamble at intel.com>

Even though the kernel-dev package provides the required support for
building external kernel modules on the target, some commonly used scripts
and utilities fail as they are not finding the kernel module build support
files at the desired location.

Create the /lib/modules/<kernel-version>/build link on target pointing to
the sources provided by the kernel-dev package, to fix the issue.

Fixes Bug:
[YOCTO #2968]

Signed-off-by: Nitin A Kamble <nitin.a.kamble at intel.com>
---
 meta/classes/kernel.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 78b33ce..5ac4ff4 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -213,6 +213,7 @@ kernel_do_install() {
 	#
 	kerneldir=${D}${KERNEL_SRC_PATH}
 	install -d $kerneldir
+	ln -sf ${KERNEL_SRC_PATH} "${D}/lib/modules/${KERNEL_VERSION}/build"
 
 	#
 	# Store the kernel version in sysroots for module-base.bbclass
@@ -346,7 +347,7 @@ PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image \
kernel-dev kernel-mod  FILES_${PN} = ""
 FILES_kernel-base = "/lib/modules/${KERNEL_VERSION}/modules.order \
/lib/modules/${KERNEL_VERSION}/modules.builtin"  FILES_kernel-image = \
                "/boot/${KERNEL_IMAGETYPE}*"
-FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* \
${KERNEL_SRC_PATH}" +FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* \
/boot/config* ${KERNEL_SRC_PATH} /lib/modules/${KERNEL_VERSION}/build"  \
FILES_kernel-vmlinux = "/boot/vmlinux*"  FILES_kernel-modules = ""
 RDEPENDS_kernel = "kernel-base"
-- 
1.8.1.4


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic