From 86a9523431b1a1fd530b6039fd74853411323877 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Tue, 10 Dec 2019 15:24:14 -0600 Subject: xdot: update hw detect functions --- recipes-bsp/multitech/mtac-xdot/xdot-util | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'recipes-bsp/multitech') diff --git a/recipes-bsp/multitech/mtac-xdot/xdot-util b/recipes-bsp/multitech/mtac-xdot/xdot-util index ab612f5..9163680 100755 --- a/recipes-bsp/multitech/mtac-xdot/xdot-util +++ b/recipes-bsp/multitech/mtac-xdot/xdot-util @@ -1,12 +1,19 @@ #!/bin/bash function detect_hw { - if [ ! -h /dev/disk/by-label/XDOT ]; then + if [ ! -d /sys/devices/platform/mts-io/xdot ]; then echo "XDOT hardware not found" exit fi } +function detect_hw_dev { + if [ ! -h /dev/disk/by-label/XDOT ]; then + echo "XDOT dev hardware not found" + exit + fi +} + function flash { echo "Flashing new firmware" cp $FIRMWARE_FILE $TEMP_DIR @@ -36,7 +43,7 @@ function clean_up { case "$1" in "flash") - detect_hw + detect_hw_dev FIRMWARE_FILE=$2 mts-io-sysfs store xdot/reset -- -1 &>/dev/null mount_xdot @@ -47,16 +54,14 @@ case "$1" in echo done ;; "mount") - detect_hw + detect_hw_dev mount_xdot echo Mounted at $TEMP_DIR ;; "reset") - detect_hw reset ;; "usb-reset") - detect_hw usb_reset ;; *) ## If no parameters are given, print which are avaiable. -- cgit v1.2.3