Update AC_CONFIG_SRCDIR after scripts/vs removal
[hvutilities.git] / scripts / hvk-compile.sh
index 2621ab6..f2b6cab 100755 (executable)
@@ -48,6 +48,10 @@ if [ $# -gt 1 ]; then
     exit 1
 fi
 
+if [ ${#} -eq 1 ]; then
+    EVK_IP="${1}"
+fi
+
 if [ ! -f .config ]; then
     echo "Missing configuration file .config."
     echo "Configure your kernel by running 'hvk-init.sh'"
@@ -77,9 +81,7 @@ elif [ x"${mode}" = x"uboot" ]; then
     ${KMAKE} u-boot-initial-env
 fi
 
-if [ ${#} -eq 1 ]; then
-    EVK_IP="${1}"
-
+if [ "${EVK_IP}" != "" ]; then
     scp ${BOOT_SRC}/Image root@${EVK_IP}:${BOOT_DEST}/Image-latest
 
     scp ${DTB_SRC} root@${EVK_IP}:${BOOT_DEST}/latest.dtb
@@ -97,8 +99,13 @@ if [ ${#} -eq 1 ]; then
         rm /tmp/modules.tar.gz
     fi
 
-    # Switch to latest kernel and DTB:
-    ssh root@${EVK_IP} "sed -i -e 's@^DEFAULT.*@DEFAULT test@' /boot/extlinux/extlinux.conf"
+    # Determine if using extlinux on target:
+    ssh -q root@${EVK_IP} [[ -f /boot/extlinux/extlinux.conf ]] && EXTLINUX=1 || EXTLINUX=0;
+
+    if [ "${EXTLINUX}" = "1" ]; then
+        # Switch to latest kernel and DTB:
+        ssh root@${EVK_IP} "sed -i -e 's@^DEFAULT.*@DEFAULT test@' /boot/extlinux/extlinux.conf"
+    fi
 
     if [ x"${reboot}" = x"1" ]; then
         ssh root@${EVK_IP} "reboot"