diff options
author | John Klug <john.klug@multitech.com> | 2020-10-26 13:55:05 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2021-06-22 12:31:34 -0500 |
commit | 34c3f831e5f1d001dcf8ff6409a6d942a2720a8a (patch) | |
tree | 572c2df185f79842af378525d3b9c7949bd73816 | |
parent | 62c1d4ac0720086b064d7a75c38506ce709ea0f5 (diff) | |
download | meta-multitech-34c3f831e5f1d001dcf8ff6409a6d942a2720a8a.tar.gz meta-multitech-34c3f831e5f1d001dcf8ff6409a6d942a2720a8a.tar.bz2 meta-multitech-34c3f831e5f1d001dcf8ff6409a6d942a2720a8a.zip |
overlay has its own init script, remove mtcdt3b during stop, fix gps on MTCPM-BB
-rw-r--r-- | recipes-bsp/multitech/mts-io.inc | 2 | ||||
-rwxr-xr-x | recipes-bsp/multitech/mts-io/mts-io.init | 36 |
2 files changed, 15 insertions, 23 deletions
diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc index 42e4336..e894427 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 |