Skip to contentSkip to conversation

kernel-devsrc: fix /usr/src/kernel symlink to also work for SDK

PATCH New Henrik Nymann Jensen (HNJE) 1 participant 1 message Mar 29, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-devsrc: fix /usr/src/kernel symlink to also work for SDK

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.

---
 meta/recipes-kernel/linux/kernel-devsrc.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/linux/kernel-devsrc.bb +1 -1
index 6daeea4f7a..69a8eaef81 100644
@@ -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
Signature · 1 line
2.20.1