summaryrefslogtreecommitdiff
path: root/recipes-bsp
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-09-18 14:35:49 -0500
committerJohn Klug <john.klug@multitech.com>2020-09-18 14:35:49 -0500
commit23511fb6e6a316a7641cf5e89182be8a3aa20f25 (patch)
tree51139a85e053cecaed5bf2a63925b592bd92ec0a /recipes-bsp
parent2dae7c8521e3b6090062968670eb52b1cada9984 (diff)
downloadmeta-multitech-atmel-23511fb6e6a316a7641cf5e89182be8a3aa20f25.tar.gz
meta-multitech-atmel-23511fb6e6a316a7641cf5e89182be8a3aa20f25.tar.bz2
meta-multitech-atmel-23511fb6e6a316a7641cf5e89182be8a3aa20f25.zip
Remove mts-io and mt-dt-overlay, which are not MACHINE dependent
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/multitech/mt-dt-overlay_1.0.0.bb53
-rw-r--r--recipes-bsp/multitech/mt-dt-overlay_1.0.1.bb53
-rw-r--r--recipes-bsp/multitech/mts-io.inc118
-rwxr-xr-xrecipes-bsp/multitech/mts-io/led-status_heartbeat_trigger6
-rwxr-xr-xrecipes-bsp/multitech/mts-io/lora-led-updater14
-rw-r--r--recipes-bsp/multitech/mts-io/mts-io.blacklist1
-rw-r--r--recipes-bsp/multitech/mts-io/mts-io.conf9
-rwxr-xr-xrecipes-bsp/multitech/mts-io/mts-io.init405
-rw-r--r--recipes-bsp/multitech/mts-io/mts-io.mtcap.init122
-rw-r--r--recipes-bsp/multitech/mts-io_4.1.4.bb.save4
-rw-r--r--recipes-bsp/multitech/mts-io_4.3.2.bb.save4
11 files changed, 0 insertions, 789 deletions
diff --git a/recipes-bsp/multitech/mt-dt-overlay_1.0.0.bb b/recipes-bsp/multitech/mt-dt-overlay_1.0.0.bb
deleted file mode 100644
index 2714705..0000000
--- a/recipes-bsp/multitech/mt-dt-overlay_1.0.0.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-DESCRIPTION = "Compile MT board device tree overlays"
-LICENSE = "(GPLv2+)"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-# By using an overlay, we should be able to support multiple pinouts
-# using the same image. The overlays go into /lib/dtoverlays.
-# There names are: [hw-version]-driver.dtbo
-# e.g. /lib/dtoverlays/MTRV1-0.0-pps.dtbo
-# The idea is that mts-io will search for the overlays, and install the
-# appropriate device tree overlay for the current hw-version.
-
-dt_dir = "/lib/dtoverlays"
-
-PR = "r1"
-
-SRC_URI = "git://git.multitech.net/mt-dt-overlay.git;protocol=git"
-
-SRCREV = "${PV}"
-
-DEPENDS = "virtual/kernel u-boot-mkimage-native"
-
-S = "${WORKDIR}/git"
-
-do_compile[depends] += "virtual/kernel:do_deploy virtual/kernel:do_shared_workdir"
-do_compile[nostamp] = "1"
-
-do_compile () {
- echo MACHINE is ${MACHINE}
- oe_runmake DTC=/usr/bin/dtc KERNEL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${KERNEL_PATH} ${MACHINE}_dtbos
-}
-
-FILES_${PN} = "${dt_dir}"
-
-addtask install after do_compile
-
-do_install () {
- # Copy files to /lib/dt-overlay/main (mtac cards will be in mtac)
- if [ -e ${AT91BOOTSTRAP_MACHINE} ]; then
- install -d ${D}/${dt_dir}
- (
- cd ${MACHINE}
- for f in *.dtbo ; do
- if [[ -h $f ]] ; then
- cp -df ${f} ${D}/${dt_dir}
- else
- install ${f} ${D}/${dt_dir}
- fi
- done
- )
- fi;
-}
-
diff --git a/recipes-bsp/multitech/mt-dt-overlay_1.0.1.bb b/recipes-bsp/multitech/mt-dt-overlay_1.0.1.bb
deleted file mode 100644
index 2714705..0000000
--- a/recipes-bsp/multitech/mt-dt-overlay_1.0.1.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-DESCRIPTION = "Compile MT board device tree overlays"
-LICENSE = "(GPLv2+)"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-# By using an overlay, we should be able to support multiple pinouts
-# using the same image. The overlays go into /lib/dtoverlays.
-# There names are: [hw-version]-driver.dtbo
-# e.g. /lib/dtoverlays/MTRV1-0.0-pps.dtbo
-# The idea is that mts-io will search for the overlays, and install the
-# appropriate device tree overlay for the current hw-version.
-
-dt_dir = "/lib/dtoverlays"
-
-PR = "r1"
-
-SRC_URI = "git://git.multitech.net/mt-dt-overlay.git;protocol=git"
-
-SRCREV = "${PV}"
-
-DEPENDS = "virtual/kernel u-boot-mkimage-native"
-
-S = "${WORKDIR}/git"
-
-do_compile[depends] += "virtual/kernel:do_deploy virtual/kernel:do_shared_workdir"
-do_compile[nostamp] = "1"
-
-do_compile () {
- echo MACHINE is ${MACHINE}
- oe_runmake DTC=/usr/bin/dtc KERNEL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${KERNEL_PATH} ${MACHINE}_dtbos
-}
-
-FILES_${PN} = "${dt_dir}"
-
-addtask install after do_compile
-
-do_install () {
- # Copy files to /lib/dt-overlay/main (mtac cards will be in mtac)
- if [ -e ${AT91BOOTSTRAP_MACHINE} ]; then
- install -d ${D}/${dt_dir}
- (
- cd ${MACHINE}
- for f in *.dtbo ; do
- if [[ -h $f ]] ; then
- cp -df ${f} ${D}/${dt_dir}
- else
- install ${f} ${D}/${dt_dir}
- fi
- done
- )
- fi;
-}
-
diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc
deleted file mode 100644
index 5b1dccc..0000000
--- a/recipes-bsp/multitech/mts-io.inc
+++ /dev/null
@@ -1,118 +0,0 @@
-DESCRIPTION = "mts-io controller and sysfs wrapper"
-HOMEPAGE = "http://www.multitech.net/"
-SECTION = "base"
-PRIORITY = "optional"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://io-module/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://io-tool/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-"
-DEPENDS = "virtual/kernel"
-INC_PR = "r1"
-
-SRCREV = "${PV}"
-
-PR = "${INC_PR}.1-${KERNEL_MODULE_PACKAGE_SUFFIX}"
-
-SRC_URI = " \
- git://git.multitech.net/mts-io.git;protocol=git \
- file://led-status_heartbeat_trigger \
- file://lora-led-updater \
- file://mts-io.init \
- file://mts-io.blacklist \
- file://mts-io.mtcap.init \
- file://mts-io.conf \
-"
-S = "${WORKDIR}/git"
-
-inherit module
-inherit update-rc.d
-inherit autotools
-
-# add this since we aren't using module.bbclass
-addtask make_scripts after do_patch before do_compile
-do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
-do_make_scripts[deptask] = "do_populate_sysroot"
-
-EXTRA_OEMAKE = " -C ${STAGING_KERNEL_DIR} \
- KBUILD_VERBOSE=1 \
- M=${S}/io-module \
- modules \
- "
-
-do_compile () {
- bbnote make "$@"
- make "$@"
- unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- oe_runmake
-}
-
-
-PACKAGES = "${PN}-noarch kernel-module-${PN} ${PN}-util ${PN}-util-dbg ${PN}-dev"
-
-FILES_kernel-module-${PN} = " \
- ${base_libdir}/modules/${KERNEL_VERSION}/extra/mts_io.ko \
- ${sysconfdir}/modprobe.d/mts-io.conf \
-"
-
-FILES_${PN}-noarch = "${sysconfdir}/init.d/mts-io \
- ${sysconfdir}/rc5.d/S95led-status_heartbeat_trigger \
- ${sysconfdir}/default/mts-io \
- ${sysconfdir}/init.d/led-status_heartbeat_trigger"
-
-
-FILES_${PN}-noarch += "${libdir}/mts-io-sysfs*"
-FILES_${PN}-noarch += "${sbindir}/mts-io-sysfs"
-FILES_${PN}-noarch_append_mtcap += "${sbindir}/lora-led-updater"
-FILES_${PN}-util += "${sbindir}/mts-util-lora2-reset"
-FILES_${PN}-util-dbg += "/usr/src /usr/sbin/.debug"
-FILES_${PN}-dev += "${includedir}/linux ${includedir}/mts-kernel-headers"
-
-INITSCRIPT_NAME = "mts-io"
-INITSCRIPT_PARAMS = "start 39 S ."
-
-PARALLEL_MAKE = ""
-
-fakeroot do_install () {
- make DESTDIR=${D} install
- install -m 0755 -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra
- # use cp instead of install so the driver doesn't get stripped
- cp ${S}/io-module/mts_io.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra
-
- # install headers for kernel modules
- install -d ${D}${includedir}/mts-kernel-headers/linux
- install -m 0644 ${S}/io-module/mts_io.h ${D}${includedir}/mts-kernel-headers/linux
- install -m 0644 ${S}/io-module/mts_eeprom.h ${D}${includedir}/mts-kernel-headers/linux
- install -m 0644 ${S}/io-module/at91gpio.h ${D}${includedir}/mts-kernel-headers/linux
-
- # install same headers for userspace applications
- # Note this dupication can be avoided by adding the following into the recipes
- # CFLAGS += ${STAGING_INCDIR}/mts-kernel-headers
- #
- install -d ${D}${includedir}/linux
- install -m 0644 ${S}/io-module/mts_io.h ${D}${includedir}/linux
- install -m 0644 ${S}/io-module/mts_eeprom.h ${D}${includedir}/linux
- install -m 0644 ${S}/io-module/at91gpio.h ${D}${includedir}/linux
-
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/mts-io.init ${D}${sysconfdir}/init.d/mts-io
- install -m 0755 ${WORKDIR}/led-status_heartbeat_trigger ${D}/${sysconfdir}/init.d/
- install -d ${D}${sysconfdir}/default
- install -m 0755 ${WORKDIR}/mts-io.conf ${D}${sysconfdir}/default/mts-io
- install -d ${D}${sysconfdir}/modprobe.d
- install -m 0644 ${WORKDIR}/mts-io.blacklist ${D}${sysconfdir}/modprobe.d/mts-io.conf
-
- # blink status LED after booted
- install -d ${D}${sysconfdir}/rc5.d
- ln -sf ${sysconfdir}/init.d/led-status_heartbeat_trigger ${D}/${sysconfdir}/rc5.d/S95led-status_heartbeat_trigger
-
- install -m 0755 -d ${D}${sbindir}
- install -d ${D}${libdir}/mts-io-sysfs
- install -m 0755 ${S}/io-tool/mts-io-sysfs-inc.sh ${D}${libdir}/mts-io-sysfs
- install -m 0755 ${S}/io-tool/mts-io-sysfs ${D}${sbindir}/mts-io-sysfs
-}
-
-fakeroot do_install_append_mtcap() {
- # install MTCAP mts-io init script
- install -m 0755 ${WORKDIR}/mts-io.mtcap.init ${D}${sysconfdir}/init.d/mts-io
- install -m 0755 ${WORKDIR}/lora-led-updater ${D}${sbindir}/lora-led-updater
-}
diff --git a/recipes-bsp/multitech/mts-io/led-status_heartbeat_trigger b/recipes-bsp/multitech/mts-io/led-status_heartbeat_trigger
deleted file mode 100755
index 88910df..0000000
--- a/recipes-bsp/multitech/mts-io/led-status_heartbeat_trigger
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-TRIGGER="/sys/class/leds/led-status/trigger"
-
-echo "setting $TRIGGER to heartbeat"
-echo "heartbeat" > $TRIGGER
diff --git a/recipes-bsp/multitech/mts-io/lora-led-updater b/recipes-bsp/multitech/mts-io/lora-led-updater
deleted file mode 100755
index 0e38310..0000000
--- a/recipes-bsp/multitech/mts-io/lora-led-updater
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-while true; do
- # If driver is unloaded, stop.
- [[ -d /sys/devices/platform/mts-io ]] || exit 0
- fuser /dev/spidev0.0 > /dev/null
- if [ $? == 0 ]; then
- mts-io-sysfs store led-lora 1 >/dev/null 2>&1
- else
- mts-io-sysfs store led-lora 0 >/dev/null 2>&1
- fi
- sleep 5
-done
-
diff --git a/recipes-bsp/multitech/mts-io/mts-io.blacklist b/recipes-bsp/multitech/mts-io/mts-io.blacklist
deleted file mode 100644
index 7421ac4..0000000
--- a/recipes-bsp/multitech/mts-io/mts-io.blacklist
+++ /dev/null
@@ -1 +0,0 @@
-blacklist mts-io
diff --git a/recipes-bsp/multitech/mts-io/mts-io.conf b/recipes-bsp/multitech/mts-io/mts-io.conf
deleted file mode 100644
index b5b4275..0000000
--- a/recipes-bsp/multitech/mts-io/mts-io.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-# GPS GNSS reset when loading driver
-# 1 Reset the GPS on driver load (default)
-# 0 Do not reset
-GPSGNSSRESET=1
-
-# DEBUG
-# 0 is off
-# 1 is on
-DEBUG=0
diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init
deleted file mode 100755
index 966d5ae..0000000
--- a/recipes-bsp/multitech/mts-io/mts-io.init
+++ /dev/null
@@ -1,405 +0,0 @@
-#!/bin/bash
-### BEGIN INIT INFO
-# Provides: mts-io
-# Default-Start: S
-# Default-Stop:
-# Short-Description: load the mts-io driver
-# Description: mts-io driver initializes the Conduit hardware and
-# provides user mode access through the driver to the
-# Conduit features.
-### END INIT INFO
-
-. /etc/default/mts-io
-
-i2c=/sys/bus/i2c/devices/
-GPSCONFIGTYPE="/var/run/config/gpstype"
-DEVTREE="/sys/kernel/config/device-tree/overlays/"
-
-((fail=0))
-# To log debug, set LOGDBG to /usr/bin/LOGGER
-if ((DEBUG)) ; then
- LOGDBG=/usr/bin/logger
- ${LOGDBG} -t "mts-io" -p daemon.info -s "LOGDBG turned on"
-else
- LOGDBG=":"
-fi
-
-hw=""
-hw_name=""
-MTAC_MODULES=""
-((HASAP=0))
-
-sethwtype() {
- # mts-io must be loaded before trying this
- hw=$(${SYSFS} show hw-version)
- hw_name=(${hw//-/ })
-
- # Only MTCDT and MTCDTIP have accessory cards, and
- # MTCDTIPHP does not have accessory cards.
- ((HASAP==0))
- case $hw_name in
- MTCDTIPHP)
- ;;
- MTCDT|MTCDTIP)
- ((HASAP = 1))
- ;;
- *)
- ;;
- esac
- MTAC_MODULES=$(cd /lib/modules/$(uname -r)/extra/;ls mtac_* 2>/dev/null)
-}
-
-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"
-
-${LOGDBG} -p daemon.info 'mts-io script'
-sysdir=/sys/devices/platform/mts-io
-gpiodir=/sys/class/gpio
-port1=${sysdir}/ap1
-port2=${sysdir}/ap2
-
-USBRST=${sysdir}/usbhub-reset
-NEED_I2C_RESET=0
-HWVER=""
-HWNAME=""
-HWLVL=""
-
-
-RST[0]="${sysdir}/wifi-bt-reset"
-RST[1]="${sysdir}/mtq-reset"
-RST[2]="${sysdir}/ap1/reset"
-RST[3]="${sysdir}/ap1/creset"
-RST[4]="${sysdir}/ap2/reset"
-RST[5]="${sysdir}/ap2/creset"
-RST[6]="${sysdir}/secure-reset"
-RST[7]="${sysdir}/eth-reset"
-RST[8]="${sysdir}/sm1-reset"
-
-# GPSGNSSRESET is now set low during boot and is special cased.
-#if ((GPSGNSSRESET)) ; then
-# RST[9]="${sysdir}/gnss-reset"
-#fi
-
-WPIN[0]="${sysdir}/ap1/cdone"
-WPIN[1]="${sysdir}/ap2/cdone"
-
-USLPTIME=60000 # 30 milliseconds from Redpine Signals Reset Spec
-WAIT="/bin/busybox usleep ${USLPTIME}"
-
-# Wait 10 WAIT intervals for pins to come high
-waitpins() {
- ((i=0))
- while((i < ${#WPIN[@]})) ; do
- ((j=0))
- while [[ -r ${WPIN[$i]} ]] && ! (($(cat ${WPIN[$i]}))) ; do
- logger -t "mts-io" -p daemon.error -s "Wait on ${WPIN[$i]}"
- ${WAIT}
- ((j++))
- if ((j > 10)) ; then
- ((fail++))
- ${LOGDBG} -t "mts-io" -p daemon.error -s "Ready failure on ${WPIN[$i]}"
- break
- fi
- done
- ((i++))
- done
-}
-
-reset_path() {
- pin=$1
- ${LOGDBG} -t "mts-io" -p daemon.info Reset $pin
- if [[ -f ${pin} ]] ; then
- if ! ( (echo 1 >${pin}) && ${WAIT} && (echo 0 >${pin}) && ${WAIT} && (echo 1 >${pin}) ) ; then
- /usr/bin/logger -t "mts-io" -p daemon.error -s "Failed write to ${pin}"
- return 1
- fi
- sleep 2
-
- ${LOGDBG} -t "mts-io" -p daemon.info Completeed reset $pin
- else
- ${LOGDBG} -t "mts-io" -p daemon.info "${pin} does not exist"
- fi
- return 0
-}
-reset_array() {
- ((i=${#RST[@]}-1))
- while ((i>=0)) ; do
- if [[ -f ${RST[$i]} ]] ; then
- if ! ( (echo 1 >${RST[i]}) ) ; then
- /usr/bin/logger -t "mts-io" -p daemon.error -s "Failed write to ${RST[$i]}"
- fail=1
- else
- ${LOGDBG} -t "mts-io" -p daemon.error -s "Wrote 1 to ${RST[$i]}"
- fi
- else
- ${LOGDBG} -t "mts-io" -p daemon.info "${RST[$i]} does not exist"
- RST[$i]=""
- fi
- ((i--))
- done
- ((DBG)) && (cd $sysdir ; head gnss-reset eth-reset wifi-bt-reset usbhub-reset | logger -p daemon.info)
- ((i=${#RST[@]}-1))
- while ((i>=0)) ; do
- ${LOGDBG} -s -p daemon.info "i value is $i RST is ${RST[$i]} count is ${#RST[$i]}"
- if ((${#RST[$i]} > 0)) && [[ -f ${RST[$i]} ]] ; then
- if ! ( (echo 0 >${RST[i]}) ) ; then
- /usr/bin/logger -t "mts-io" -p daemon.error -s "Failed write to ${RST[$i]}"
- fail=1
- else
- ${LOGDBG} -t "mts-io" -p daemon.error -s "Wrote 0 to ${RST[$i]}"
- :
- fi
- else
- ${LOGDBG} -t "mts-io" -p daemon.info "${RST[$i]} does not exist"
- fi
- ((i--))
- done
- ${WAIT}
- ((DBG)) && (cd $sysdir ; head gnss-reset eth-reset wifi-bt-reset usbhub-reset | logger -p daemon.info)
- ((i=${#RST[@]}-1))
- while ((i>=0)) ; do
- if ((${#RST[$i]} > 0)) && [[ -f ${RST[$i]} ]] ; then
- if ! ( (echo 1 >${RST[$i]}) ) ; then
- /usr/bin/logger -t "mts-io" -p daemon.error -s "Failed write to ${RST[$i]}"
- fail=1
- else
- ${LOGDBG} -t "mts-io" -p daemon.error -s "Wrote 1 to ${RST[$i]}"
- fi
- else
- ${LOGDBG} -t "mts-io" -p daemon.info "${RST[$i]} does not exist"
- fi
- ((i--))
- done
- ((DBG)) && (cd $sysdir ; head gnss-reset eth-reset wifi-bt-reset usbhub-reset | logger -p daemon.info)
- return $fail
-}
-read_card_info() {
- ap1_product_id=""
- ap2_product_id=""
-
- if [[ -d $sysdir/ap1 ]]; then
- ap1_product_id=$(cat $sysdir/ap1/product-id)
- fi
- if [[ -d $sysdir/ap2 ]]; then
- ap2_product_id=$(cat $sysdir/ap2/product-id)
- fi
-
- lora_hw=$(${SYSFS} show lora/hw-version 2> /dev/null)
-
- if [ -d $port1 ] && [[ $(cat $port1/hw-version) = $lora_hw ]]; then
- modprobe spidev
- ln -sf /dev/spidev32766.2 /dev/spidev0.0
- elif [ -d $port2 ] && [[ $(cat $port2/hw-version) = $lora_hw ]]; then
- modprobe spidev
- ln -sf /dev/spidev32765.2 /dev/spidev0.0
- elif [[ ${hw_name} == MTCAP ]]; then
- modprobe spidev
- elif [[ ${hw_name} == MTCDTIPHP ]]; then
- modprobe spidev
- ln -sf /dev/spidev32766.2 /dev/spidev0.0
- fi
-}
-
-mfser_init() {
- found_ap1=0
-
- if [[ $ap1_product_id =~ ^MTAC-MFSER- ]]; then
- /usr/bin/logger -t "mts-io" -p daemon.info -s "Linking /dev/mfser to /dev/ttyAP1"
- ln -sf /dev/ttyAP1 /dev/mfser
- found_ap1=1
- fi
-
- if [[ $ap2_product_id =~ ^MTAC-MFSER- ]]; then
- if [[ $found_ap1 = 1 ]]; then
- /usr/bin/logger -t "mts-io" -p daemon.info -s "Linking /dev/mfser-2 to /dev/ttyAP2"
- ln -sf /dev/ttyAP2 /dev/mfser-2
- else
- /usr/bin/logger -t "mts-io" -p daemon.info -s "Linking /dev/mfser to /dev/ttyAP2"
- ln -sf /dev/ttyAP2 /dev/mfser
- fi
- fi
-
-}
-
-set_gpslink() {
- [[ -d /var/run/config ]] || mkdir /var/run/config
- gpscap=$(cat ${sysdir}/capability/gps)
-
- # For all hardware except MTCDTIPHP, the gpscapability
- # flag indicates whether or not we have a GPS.
- if ! [[ ${hw_name} =~ ^MTCDTIPHP$ ]] && ((gpscap == 0)) ; then
- return
- fi
-
- # Oldest MTRV1 uses venuse on ttyS1.
- if [[ ${hw_name} == MTRV1 ]] && [[ ${hw} != MTRV1-0.0 ]] ; then
- ln -sf /dev/ttyXRUSB0 /dev/gps0
- echo "u-blox" >"$GPSCONFIGTYPE"
- return
- fi
-
- if [[ ${hw_name} == MTR ]] || [[ ${hw_name} == MTRV1 ]] || [[ ${hw_name} == MTHS ]] ; then
- ln -sf /dev/ttyS1 /dev/gps0
- echo "venus" >"$GPSCONFIGTYPE"
- return
- fi
-
- if [[ ${hw} == MTCDT ]] && [[ ${HWLVL} == 0.0 ]] ; then
- # No GPS
- return
- fi
- if [[ ${hw_name} == MTCDTIPHP ]] ; then
- NEED_I2C_RESET=1
- ln -sf /dev/ttyXRUSB0 /dev/gps0
- return
- fi
- # Default MTCDT-0.1
- echo "u-blox" >"$GPSCONFIGTYPE"
- ln -sf /dev/ttyXRUSB2 /dev/gps0
-}
-
-case $1 in
- start)
- # Point the firmware API at our i2c EEPROMs
- echo -n ${i2c} > /sys/module/firmware_class/parameters/path
-
- /usr/bin/logger -t "mts-io" -p daemon.info -s "Loading mts-io module"
- if ! modprobe mts_io ; then
- ((fail++))
- fi
-
- sethwtype
- setdevtree
-
- if ((HASAP == 1)) ; then
- # install mtac explicitly or any unused modules will cause
- # junk to the log as mtac is loaded and unloaded each time.
- modprobe mtac
- for f in ${MTAC_MODULES} ; do
- modprobe ${f//.ko} 2>&1 | grep -v 'No such device or address'
- done
- fi
- set_gpslink # Set GPS symlink.
- /usr/bin/logger -t "mts-io" -p daemon.info -s "Resetting system modules"
- read_card_info
- has_gnss_reset=0
- # On boot, gnss-reset will be low
- if [[ -f ${sysdir}/gnss-reset ]] ; then
- if (($(mts-io-sysfs show gnss-reset) == 1)) ; then
- mts-io-sysfs store gnss-reset 0
- fi
- has_gnss_reset=1
- fi
- /bin/busybox usleep $USLPTIME
- reset_array
- if ((has_gnss_reset)) ; then
- mts-io-sysfs store gnss-reset 1
- fi
- # use radio-reset init script for radio-reset
- mfser_init
-
- waitpins
- # Fix Telit error -62 and Redpine wrong USB speed detection on reset.
- sleep 1
- if ! reset_path $USBRST ; then
- ((fail++))
- fi
-
- if ((${#lora_hw} > 0)) && [[ ${lora_hw} =~ ^MTCDTIPHP-LORA-2\.1 ]] ; then
- if [[ -x ${LRST} ]] ; then
- ${LRST} -g -f
- else
- /usr/bin/logger -t "mts-io" -p daemon.err -s "ERROR: Missing ${LRST} -- Cannot initialize LoRa."
- fi
- fi
-
- if [[ -d ${DEVTREE} ]] ; then
- /bin/umount configfs
- fi
-
- if ((fail == 0)) ; then
- echo "OK"
- else
- echo "FAIL"
- fi
- exit $fail
- ;;
-
- stop)
- /usr/bin/logger -t "mts-io" -p daemon.info -s "Unloading mtac modules and mts-io module"
- MTAC_MODULES=$(lsmod | grep '^mtac_' | sed -e 's/_/-/' -e 's/ .*//')
-
- for f in ${MTAC_MODULES} ; do
- if ! modprobe -r "$f" ; then
- rmmod "$f"
- fi
- done
- if ! modprobe -r mtac ; then
- rmmod mtac
- fi
-
- if ! modprobe -r mts-io ; then
- rmmod mtsio
- fi
- RETVAL=$?
- if ((RETVAL == 0)) ; then
- echo "OK"
- else
- echo "FAIL"
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- reload)
- /usr/bin/logger -t "mts-io" -p daemon.info -s "Resetting system modules"
- if ! reset_path $USBRST ; then
- ((fail++))
- fi
- /bin/busybox usleep $USLPTIME
- reset_array
- # Use radio-reset init script for radio-reset
- mfser_init
- if ((fail == 0)) ; then
- echo "OK"
- else
- echo "FAIL"
- fi
- exit $fail
- ;;
- status)
- if [[ -d ${sysdir} ]] ; then
- echo Driver is loaded
- exit 0
- else
- echo Driver is not loaded
- exit 3
- fi
- ;;
- *)
- echo "Usage: $0 {start|stop|status|restart}"
- exit 2
- ;;
-esac
-
diff --git a/recipes-bsp/multitech/mts-io/mts-io.mtcap.init b/recipes-bsp/multitech/mts-io/mts-io.mtcap.init
deleted file mode 100644
index 2642de9..0000000
--- a/recipes-bsp/multitech/mts-io/mts-io.mtcap.init
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/bin/bash
-
-sysdir=/sys/devices/platform/mts-io
-
-i2c=/sys/bus/i2c/devices/
-
-DEVTREE="/sys/kernel/config/device-tree/overlays/"
-SYSFS="/usr/sbin/mts-io-sysfs"
-
-setwificap() {
- WIFICAP=0
- if [[ -f ${sysdir}/capability/wifi ]] && (($(cat ${sysdir}/capability/wifi) == 1)) ; then
- WIFICAP=1
- fi
-}
-
-lora_init() {
- # reset lora chip
- mts-io-sysfs store lora/reset 1
- mts-io-sysfs store lora/reset 0
- usleep 100000
- mts-io-sysfs store lora/reset 1
-}
-
-eth_init() {
- # reset eth phy
- mts-io-sysfs store eth-reset 1
- mts-io-sysfs store eth-reset 0
- usleep 100000
- mts-io-sysfs store eth-reset 1
-}
-
-# Normal state when powered up
-wifi_init1() {
- (($WIFICAP)) || return 0
- # reset wlan
- mts-io-sysfs store wlan-rst 0
- # disable wlan
- mts-io-sysfs store wlan-en 0
-}
-
-wifi_init2() {
- (($WIFICAP)) || return 0
- mts-io-sysfs store wlan-en 1
- usleep 30000 # 30mS according to WILC1000 spec.
- mts-io-sysfs store wlan-rst 1
-}
-
-
-cell_init() {
- # remove /dev/modem_at[0,1] symlinks
- rm -f /dev/modem_at[0,1]
-
- if [ -w /sys/devices/platform/mts-io/radio-power ] ; then
- # power down the cellular chip gracefully
- mts-io-sysfs store radio-power 0
- # power up the cellular chip
- mts-io-sysfs store radio-power 1
- fi
-}
-
-start_lora_led_updater() {
- lora-led-updater &
-}
-
-setdevtree() {
- hw=$(${SYSFS} show hw-version)
-
- # 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
- )
-}
-
-case $1 in
- start)
- # SPI driver for LoRa
- modprobe spidev
- # Point the firmware API at our i2c EEPROMs
- echo -n ${i2c} > /sys/module/firmware_class/parameters/path
- echo "Loading mts-io module"
- modprobe -r atmel_mci
- # Point the firmware API at our i2c EEPROMs
- echo -n ${i2c} > /sys/module/firmware_class/parameters/path
- modprobe mts_io
- setdevtree
- setwificap
- wifi_init1
- lora_init
- eth_init
- cell_init &
- start_lora_led_updater
- wifi_init2
- modprobe atmel_mci
- (($WIFICAP)) && modprobe wilc1000
- (($WIFICAP)) && modprobe wilc1000-sdio
- ;;
-
- stop)
- echo "Unloading mts-io module"
- wifi_init1 # Power down wifi
- modprobe -r wilc1000 >/dev/null 2>&1
- modprobe -r wilc1000-sdio >/dev/null 2>&1
- modprobe -r mts_io >/dev/null 2>&1
- ;;
-
- *)
- echo "Usage: $0 {start|stop}"
- exit 2
- ;;
-esac
diff --git a/recipes-bsp/multitech/mts-io_4.1.4.bb.save b/recipes-bsp/multitech/mts-io_4.1.4.bb.save
deleted file mode 100644
index 92937cd..0000000
--- a/recipes-bsp/multitech/mts-io_4.1.4.bb.save
+++ /dev/null
@@ -1,4 +0,0 @@
-require mts-io.inc
-
-PR = "${INC_PR}.0-${MLINUX_KERNEL_VERSION}${MLINUX_KERNEL_EXTRA_VERSION}"
-
diff --git a/recipes-bsp/multitech/mts-io_4.3.2.bb.save b/recipes-bsp/multitech/mts-io_4.3.2.bb.save
deleted file mode 100644
index 92937cd..0000000
--- a/recipes-bsp/multitech/mts-io_4.3.2.bb.save
+++ /dev/null
@@ -1,4 +0,0 @@
-require mts-io.inc
-
-PR = "${INC_PR}.0-${MLINUX_KERNEL_VERSION}${MLINUX_KERNEL_EXTRA_VERSION}"
-