diff options
author | Simon Rettberg | 2014-07-04 20:04:41 +0200 |
---|---|---|
committer | Simon Rettberg | 2014-07-04 20:04:41 +0200 |
commit | b7a021b2df67c6d08457df32f3ba1514897ac70b (patch) | |
tree | f038199bdd92329808f1c54bf41d646d9dfe6fd3 /remote/setup_target | |
parent | [downloader.inc] Special case sourceforge: Allow setting a mirror in ./config (diff) | |
download | tm-scripts-b7a021b2df67c6d08457df32f3ba1514897ac70b.tar.gz tm-scripts-b7a021b2df67c6d08457df32f3ba1514897ac70b.tar.xz tm-scripts-b7a021b2df67c6d08457df32f3ba1514897ac70b.zip |
Try to clean up the mess with all the different kernel version variables everywhere
Diffstat (limited to 'remote/setup_target')
-rwxr-xr-x | remote/setup_target | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/remote/setup_target b/remote/setup_target index f76c7831..11e1d5be 100755 --- a/remote/setup_target +++ b/remote/setup_target @@ -52,7 +52,6 @@ # ----------------------------------------------------------------------------- # MODE_DIR="${ROOT_DIR}/remote" -MODULES_DIR="${MODE_DIR}/modules" EXPORT_DIR="/export/build" [ -z "$REMOTE_EXPORT_DIR" ] || EXPORT_DIR=$REMOTE_EXPORT_DIR # Keep track of processed modules so we don't @@ -288,20 +287,20 @@ generate_target() { # we need a bit of special logic for kernel specifically # to check if the built version is corresponding to the # current kernel version. If not we had a kernel update - # and need to ask the user what to do - if [[ "$MODULES" =~ .*\ kernel\ .* ]]; then + # and need to tell the user + if [[ -e "${TARGET_DIR}/kernel" ]]; then # if so, check what kernels have been built - if [ -e "${MODULES_DIR}/kernel/ksrc/KVERSION" ]; then - local BUILT_KERNEL_VERSION=$(cat "${MODULES_DIR}/kernel/ksrc/KVERSION") - if [[ "${BUILT_KERNEL_VERSION}" != "${KERNEL_CURRENT_VERSION}" ]]; then - pinfo "The built kernel (${BUILT_KERNEL_VERSION}) is older than the running one (${KERNEL_CURRENT_VERSION})!" + if [ -e "${TARGET_DIR}/kernel/ksrc/KVERSION" ]; then + local BUILT_KERNEL_VERSION=$(cat "${TARGET_DIR}/kernel/ksrc/KVERSION") + if [[ "${BUILT_KERNEL_VERSION}" != "${SYSTEM_KERNEL_LONG}" ]]; then + pinfo "The built kernel (${BUILT_KERNEL_VERSION}) is older than the running one (${SYSTEM_KERNEL_LONG})!" # cleaning the module is enough as it forces to rebuild. [[ "${AUTO_UPDATE_KERNEL}" == 1 ]] && pinfo "Auto-Udpate Kernel..." && clean_kernel_module --force fi - elif [ -e "${MODULES_DIR}/kernel/ksrc" ]; then + elif [ -e "${TARGET_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 "${TARGET_DIR}/kernel/ksrc exists, but KVERSION is not found!" + pwarning "Kernel was probably built with an older version of mltk." pwarning "If errors arise, either write your KVERSION manually or clean the kernel." fi fi |