diff options
-rw-r--r-- | recipes-bsp/multitech/mts-io.inc | 2 | ||||
-rw-r--r-- | recipes-bsp/multitech/mts-io/mts-io.mtcap.init | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc index 917dc10..f1346fa 100644 --- a/recipes-bsp/multitech/mts-io.inc +++ b/recipes-bsp/multitech/mts-io.inc @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://io-module/COPYING;md5=94d55d512a9ba36caa9b7df079bae19 file://io-tool/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ " do_fetch[depends] += "virtual/kernel:do_shared_workdir" -INC_PR = "r1" +INC_PR = "r2" SRCREV = "${PV}" PR = "${INC_PR}-${KERNEL_MODULE_PACKAGE_SUFFIX}" diff --git a/recipes-bsp/multitech/mts-io/mts-io.mtcap.init b/recipes-bsp/multitech/mts-io/mts-io.mtcap.init index d33e5f4..7b77ec2 100644 --- a/recipes-bsp/multitech/mts-io/mts-io.mtcap.init +++ b/recipes-bsp/multitech/mts-io/mts-io.mtcap.init @@ -8,6 +8,25 @@ i2c=/sys/bus/i2c/devices/ SYSFS="/usr/sbin/mts-io-sysfs" +GPSCONFIGTYPE="/var/run/config/gpstype" + +set_hw_name() { + hw=$(${SYSFS} show hw-version) + hw_name=(${hw//-/ }) +} + +set_gpslink() { + [[ -d /var/run/config ]] || mkdir /var/run/config + gpscap=$(cat ${sysdir}/capability/gps) + + # hw_name must be mtcap, and gpscap == 1 + if ! [[ ${hw_name} =~ ^MTCAP$ ]] || ((gpscap == 0)) ; then + return + fi + ln -sf /dev/ttyS1 /dev/gps0 + echo "u-blox" >"$GPSCONFIGTYPE" +} + setwificap() { WIFICAP=0 if [[ -f ${sysdir}/capability/wifi ]] && (($(cat ${sysdir}/capability/wifi) == 1)) ; then @@ -98,6 +117,8 @@ case $1 in modprobe atmel_mci (($WIFICAP)) && modprobe wilc1000 (($WIFICAP)) && modprobe wilc1000-sdio + set_hw_name + set_gps_link ;; stop) |