summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech/mtac-xdot/xdot-util
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-09-29 16:32:42 -0500
committerJohn Klug <john.klug@multitech.com>2020-09-29 16:32:42 -0500
commite145fa5035ba50cf304022a1edb6b865a0d33f35 (patch)
tree7ed513d4f29d43114434c79043285490e754f841 /recipes-bsp/multitech/mtac-xdot/xdot-util
parentc025777d689a5d989b557c0e486408b9fb60b2de (diff)
downloadmeta-multitech-atmel-e145fa5035ba50cf304022a1edb6b865a0d33f35.tar.gz
meta-multitech-atmel-e145fa5035ba50cf304022a1edb6b865a0d33f35.tar.bz2
meta-multitech-atmel-e145fa5035ba50cf304022a1edb6b865a0d33f35.zip
Move mtac to meta-multiech
Diffstat (limited to 'recipes-bsp/multitech/mtac-xdot/xdot-util')
-rwxr-xr-xrecipes-bsp/multitech/mtac-xdot/xdot-util72
1 files changed, 0 insertions, 72 deletions
diff --git a/recipes-bsp/multitech/mtac-xdot/xdot-util b/recipes-bsp/multitech/mtac-xdot/xdot-util
deleted file mode 100755
index f805305..0000000
--- a/recipes-bsp/multitech/mtac-xdot/xdot-util
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/bash
-
-function detect_hw {
- 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
-}
-
-function mount_xdot {
- TEMP_DIR=`mktemp -d`
- mount /dev/disk/by-label/XDOT $TEMP_DIR
-}
-
-function reset {
- mts-io-sysfs store xdot/reset 0
- mts-io-sysfs store xdot/reset 1
- mts-io-sysfs store xdot/reset -- -1 &>/dev/null
-}
-
-function usb_reset {
- echo 0 > /sys/bus/usb/devices/1-2.1/authorized
- sleep 1
- echo 1 > /sys/bus/usb/devices/1-2.1/authorized
-}
-
-function clean_up {
- umount $TEMP_DIR
- rm -fr $TEMP_DIR
-}
-
-case "$1" in
-"flash")
- detect_hw_dev
- FIRMWARE_FILE=$2
- mts-io-sysfs store xdot/reset -- -1 &>/dev/null
- mount_xdot
- flash
- clean_up
- sleep 1
- reset
- echo done
- ;;
-"mount")
- 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.
- echo "Usage: $0 {flash|mount|reset|usb-reset}"
- ;;
-esac