diff options
-rw-r--r-- | recipes-bsp/multitech/mts-io/mts-io.init | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init index 048c697..8910e64 100644 --- a/recipes-bsp/multitech/mts-io/mts-io.init +++ b/recipes-bsp/multitech/mts-io/mts-io.init @@ -185,11 +185,22 @@ mfser_init() { set_gpslink() { hw=$(${SYSFS} show hw-version) hw_name=(${hw//-/ }) - - if ! [[ ${hw} =~ ^MTCDT ]] ; then - # No GPS (unless MTR, and that is TBD) + gpscap=$(cat ${sysdir}/capability/gps) + + if ((gpscap == 0)) && [[ ${hw_name} != MTCDTIPHP ]] ; then + return + fi + + if [[ ${hw_name} == MTRV1 ]] ; then + ln -sf /dev/ttyXRUSB0 /dev/gps0 + return + fi + + if [[ ${hw_name} == MTR ]] ; then + ln -sf /dev/ttyS0 /dev/gps0 return fi + if [[ ${hw} == MTCDT ]] && [[ ${HWLVL} == 0.0 ]] ; then # No GPS return @@ -199,6 +210,7 @@ set_gpslink() { ln -sf /dev/ttyXRUSB0 /dev/gps0 return fi + # Default MTCDT-0.1 ln -sf /dev/ttyXRUSB2 /dev/gps0 } @@ -213,7 +225,7 @@ case $1 in read_card_info /bin/busybox usleep $USLPTIME reset_array - [ -w ${sysdir}/radio-reset ] && ${SYSFS} store radio-reset 0 + # Radio reset has its own init script mfser_init waitpins |