summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-10-26 13:55:05 -0500
committerJohn Klug <john.klug@multitech.com>2020-10-26 13:55:05 -0500
commitad510ba0fa0fb01e90c588ab228fd62525b2f43b (patch)
tree5c5e2c341d38f601e3d8e740d92df36853cd1924
parent679990b4efdbe022d65f889645c04652056bb578 (diff)
downloadmeta-multitech-ad510ba0fa0fb01e90c588ab228fd62525b2f43b.tar.gz
meta-multitech-ad510ba0fa0fb01e90c588ab228fd62525b2f43b.tar.bz2
meta-multitech-ad510ba0fa0fb01e90c588ab228fd62525b2f43b.zip
overlay has its own init script, remove mtcdt3b during stop, fix gps on MTCPM-BB
-rw-r--r--recipes-bsp/multitech/mts-io.inc2
-rwxr-xr-xrecipes-bsp/multitech/mts-io/mts-io.init36
2 files changed, 15 insertions, 23 deletions
diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc
index c2b7956..0a68ac2 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 = "r2"
+INC_PR = "r3"
SRCREV = "${PV}"
PR = "${INC_PR}-${KERNEL_MODULE_PACKAGE_SUFFIX}"
diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init
index fee8f61..443b5ec 100755
--- a/recipes-bsp/multitech/mts-io/mts-io.init
+++ b/recipes-bsp/multitech/mts-io/mts-io.init
@@ -13,7 +13,6 @@
i2c=/sys/bus/i2c/devices/
GPSCONFIGTYPE="/var/run/config/gpstype"
-DEVTREE="/sys/kernel/config/device-tree/overlays/"
HWPATH="/sys/devices/platform/mts-io/hw-version"
MTSIOMODPATH="/lib/modules/$(uname -r)/extra/"
MTCDTBB="${MTSIOMODPATH}/mtcdt3b.ko"
@@ -59,25 +58,6 @@ sethwtype() {
}
-setdevtree() {
- # add device tree overlays, if they exist.
- [[ -d /lib/dtoverlays ]] || return 1
- (
- cd /lib/dtoverlays
- for f in $(ls ${hw}*) ; do
- if ! [[ -d ${DEVTREE} ]] ; then
- mount configfs
- fi
- f1=${f/#${hw}-/}
- f2=${f1/%.dtbo}
- # f2 is the extracted device name
- /bin/mkdir ${DEVTREE}/$f2
- /bin/cat $f >${DEVTREE}/$f2/dtbo
- done
- )
-}
-
-
SYSFS="/usr/sbin/mts-io-sysfs"
LRST="/usr/sbin/mts-util-lora2-reset"
@@ -278,7 +258,17 @@ set_gpslink() {
return
;;
MTCDT3)
- ln -sf /dev/ttyS1 /dev/gps0
+ [[ $hw =~ ^[^-]*-([^-]*) ]]
+ bbtype=${BASH_REMATCH[1]}
+ echo "hw_name: ${hw_name} bbtype: ${bbtype}"
+ case ${bbtype} in
+ LORA16)
+ ln -sf /dev/ttyS1 /dev/gps0
+ ;;
+ BB)
+ ln -sf /dev/ttyACM0 /dev/gps0
+ ;;
+ esac
echo "u-blox" >"$GPSCONFIGTYPE"
return
;;
@@ -315,7 +305,6 @@ case $1 in
fi
sethwtype
- setdevtree
if ((HASAP == 1)) ; then
# install mtac explicitly or any unused modules will cause
@@ -383,6 +372,9 @@ case $1 in
rmmod mtac
fi
+ if ! modprobe -r mtcdt3b ; then
+ rmmod mtcdt3b
+ fi
if ! modprobe -r mts-io ; then
rmmod mtsio
fi