diff options
author | John Klug <john.klug@multitech.com> | 2017-08-28 15:25:44 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2017-09-14 17:31:50 -0500 |
commit | bab089e8a10852a6262c26b67459a8b7045fd0a6 (patch) | |
tree | 848c254f0bee9616758c0e18d6a03220204e2471 /recipes-core | |
parent | 1e07a786112f7217bca318c55a37f4123e9a2b45 (diff) | |
download | meta-mlinux-bab089e8a10852a6262c26b67459a8b7045fd0a6.tar.gz meta-mlinux-bab089e8a10852a6262c26b67459a8b7045fd0a6.tar.bz2 meta-mlinux-bab089e8a10852a6262c26b67459a8b7045fd0a6.zip |
Move fwswitch script to mlinux-scripts, and call it mlinux-switch-cell-fw
Diffstat (limited to 'recipes-core')
-rwxr-xr-x | recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-switch-cell-fw (renamed from recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.sh) | 0 | ||||
-rw-r--r-- | recipes-core/mlinux-scripts/mlinux-scripts.inc | 1 | ||||
-rw-r--r-- | recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.default | 2 | ||||
-rw-r--r-- | recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.init | 57 | ||||
-rw-r--r-- | recipes-core/multitech/cell-radio-fwswitch_1.0.bb | 36 |
5 files changed, 1 insertions, 95 deletions
diff --git a/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.sh b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-switch-cell-fw index a101e56..a101e56 100755 --- a/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.sh +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-switch-cell-fw diff --git a/recipes-core/mlinux-scripts/mlinux-scripts.inc b/recipes-core/mlinux-scripts/mlinux-scripts.inc index e7f4b94..f0320bf 100644 --- a/recipes-core/mlinux-scripts/mlinux-scripts.inc +++ b/recipes-core/mlinux-scripts/mlinux-scripts.inc @@ -20,6 +20,7 @@ do_install() { install -m 755 ${WORKDIR}/mlinux-dhcpd ${D}${sbindir} install -m 755 ${WORKDIR}/mlinux-set-apn ${D}${sbindir} install -m 755 ${WORKDIR}/mlinux-switch-apn ${D}${sbindir} + install -m 755 ${WORKDIR}/mlinux-switch-cell-fw ${D}${sbindir} install -m 755 ${WORKDIR}/mlinux-cell-router ${D}${sbindir} install -m 755 ${WORKDIR}/mlinux-firmware-upgrade ${D}${sbindir} } diff --git a/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.default b/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.default deleted file mode 100644 index a19e18e..0000000 --- a/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.default +++ /dev/null @@ -1,2 +0,0 @@ -# set to "yes" to enable cell-radio-fwswitch on boot -ENABLED="no" diff --git a/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.init b/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.init deleted file mode 100644 index 82b5cb5..0000000 --- a/recipes-core/multitech/cell-radio-fwswitch/cell-radio-fwswitch.init +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh - -# no firmware switch by default -ENABLED="no" -# radio come up timeout -TIMEOUT=15 -# default radio firmware image id -FWIMAGE="0" - -[ -r /etc/default/cell-radio-fwswitch ] && source /etc/default/cell-radio-fwswitch -[ "$ENABLED" == "yes" ] || exit 0 - -function start() { - FWACTIVE=$(radio-query --active-firmware) - if [[ $? != 0 || x"$FWACTIVE" == x"" ]]; then - # radio does not support firmware switching. - exit 0 - fi - - FWSWITCH=$(curl -s 127.0.0.1/api/ppp/modem/fwSwitch | jsparser -p /result/) - if [[ x"$FWSWITCH" == x"" ]]; then - echo "Failed to obtain the radio firmware image id to use." - exit 1 - fi - - if [[ "$FWSWITCH" == "att" ]]; then - FWIMAGE="0" - elif [[ "$FWSWITCH" == "vz" ]]; then - FWIMAGE="1" - else - # autodetect - ICCID=$(radio-query --iccid) - if [ $? -ne 0 ]; then - exit 0 - fi - if [[ "$ICCID" =~ ^89148.* ]]; then - # - # Switch to FW image #1 for Verizon SIMs - # - FWIMAGE="1" - fi - fi - - cell-radio-fwswitch $FWIMAGE $TIMEOUT -} - -case $1 in - start) - start - ;; - - *) - echo "Usage: $0 {start}" - exit 2 - ;; -esac - diff --git a/recipes-core/multitech/cell-radio-fwswitch_1.0.bb b/recipes-core/multitech/cell-radio-fwswitch_1.0.bb deleted file mode 100644 index 93a058c..0000000 --- a/recipes-core/multitech/cell-radio-fwswitch_1.0.bb +++ /dev/null @@ -1,36 +0,0 @@ -DESCRIPTION = "Radio firmware switching functionality for dual image units (only LNA3 radios for now)" -SECTION = "base" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" -PR = "r1" - -RDEPENDS_${PN} = "radio-query radio-cmd" - -inherit update-rc.d - -INITSCRIPT_NAME = "cell-radio-fwswitch" -INITSCRIPT_PARAMS = "start 63 5 ." - -# remove fwswitch, since radio might not be ready. - -SRC_URI = "\ - file://cell-radio-fwswitch.sh \ -" -# file://cell-radio-fwswitch.default -# file://cell-radio-fwswitch.init - -do_install () { - #install -d ${D}${sysconfdir}/init.d - #install -m 0755 ${WORKDIR}/cell-radio-fwswitch.init ${D}${sysconfdir}/init.d/cell-radio-fwswitch - - #install -d ${D}${sysconfdir}/default - #install -m 0644 ${WORKDIR}/cell-radio-fwswitch.default ${D}${sysconfdir}/default/cell-radio-fwswitch - - install -d ${D}${sbindir} - install -m 0755 ${WORKDIR}/cell-radio-fwswitch.sh ${D}${sbindir}/cell-radio-fwswitch -} - -do_install_append_mtcap() { - # enable cell-radio-fwswitch init script on boot for MTCAP - sed -i 's/ENABLED="no"/ENABLED="yes"/g' ${D}${sysconfdir}/default/cell-radio-fwswitch -} |