summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xremote/setup_target11
1 files changed, 6 insertions, 5 deletions
diff --git a/remote/setup_target b/remote/setup_target
index 804f43bc..378606b0 100755
--- a/remote/setup_target
+++ b/remote/setup_target
@@ -240,10 +240,11 @@ generate_target() {
# cleaning the module is enough as it forces to rebuild.
[[ "${AUTO_UPDATE_KERNEL}" == 1 ]] && pinfo "Auto-Udpate Kernel..." && clean_kernel_module --force
fi
- else
- # KVERSION is not found.
- pdebug "KVERSION not found under remote/modules/kernel/ksrc/KVERSION"
- pdebug "Ignoring. If errors arise, either write your KVERSION manually or clean the kernel."
+ elif [ -e "${MODULES_DIR}/kernel/ksrc" ]; then
+ # check if ksrc is there, since that would be problematic
+ pwarning "${MODULES_DIR}/kernel/ksrc exists, but KVERSION is not found!"
+ pwarning "Kernel was probably build with an older version of mltk."
+ pwarning "If errors arise, either write your KVERSION manually or clean the kernel."
fi
fi
@@ -446,7 +447,7 @@ clean_kernel_module() {
if [ -e .built ]; then
rm .built || perror "Could not delete ${TARGET_DIR}/kernel/.built"
fi
- if [ -e ksrc ]; then
+ if [ -L ksrc ]; then
unlink ksrc || perror "Could not unlink ${TARGET_DIR}/kernel/ksrc."
fi
else