]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel-devsrc: fix /usr/src/kernel symlink to also work for SDK
authorHenrik Nymann Jensen (HNJE) <hnje@triax.com>
Fri, 29 Mar 2019 19:14:00 +0000 (19:14 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 1 Apr 2019 13:58:15 +0000 (14:58 +0100)
If kernel-devsrc is used in a SDK context, the symlink from usr/src/kernel
points to an absolute path '/lib/modules/${KERNEL_VERSION}/build',
which ends up pointing to the local machine's build directory.

To address this issue change the symlink to be realtive to
${D}/lib/modules/${KERNEL_VERSION}/build.

Signed-off-by: Henrik Nymann Jensen <hnje@triax.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/linux/kernel-devsrc.bb

index 6daeea4f7ae4f7c9b7f6fad08f5cdaf7478851b3..69a8eaef815c435a1236d6e2b4abda1e0bcc9bbc 100644 (file)
@@ -48,7 +48,7 @@ do_install() {
     mkdir -p ${D}/usr/src
     (
        cd ${D}/usr/src
-       ln -s ${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel
+       lnr ${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel
     )
 
     # for on target purposes, we unify build and source