summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech/mtac-xdot
diff options
context:
space:
mode:
authorJason Reiss <jreiss@multitech.com>2019-12-10 15:24:14 -0600
committerJason Reiss <jreiss@multitech.com>2019-12-10 15:24:14 -0600
commit86a9523431b1a1fd530b6039fd74853411323877 (patch)
treeee3f2be6525d09b6cc543d6bd47502e7db9e8108 /recipes-bsp/multitech/mtac-xdot
parent64d3ca0fd0a2cb5cbc4474e06a2c3c42e78fe657 (diff)
downloadmeta-multitech-86a9523431b1a1fd530b6039fd74853411323877.tar.gz
meta-multitech-86a9523431b1a1fd530b6039fd74853411323877.tar.bz2
meta-multitech-86a9523431b1a1fd530b6039fd74853411323877.zip
xdot: update hw detect functions
Diffstat (limited to 'recipes-bsp/multitech/mtac-xdot')
-rwxr-xr-xrecipes-bsp/multitech/mtac-xdot/xdot-util15
1 files changed, 10 insertions, 5 deletions
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.