diff --git a/packages/sysutils/imx6-soc-fan/bin/imx6-soc-fan-control b/packages/sysutils/imx6-soc-fan/bin/imx6-soc-fan-control deleted file mode 100755 index 699706848f..0000000000 --- a/packages/sysutils/imx6-soc-fan/bin/imx6-soc-fan-control +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv) -# -# OpenELEC is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# OpenELEC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC. If not, see . -################################################################################ - -. /usr/lib/libreelec/imx6-system-type - -if [ "$SYSTEM_TYPE" != "matrix" ]; then - echo "Only for TBS Matrix system." - exit 12 -fi - -fan_on() { - echo 1 > /sys/class/leds/fan/brightness -} - -fan_off() { - echo 0 > /sys/class/leds/fan/brightness -} - -soc_temp() { - local temp=$(cat /sys/devices/virtual/thermal/thermal_zone0/temp) - temp="$(( $temp / 1000 ))" - echo "$temp" -} - -echo "SoC temp: $(soc_temp) C" - -ACTION=$1 -INTERVAL=$2 - -if [ -n "$ACTION" -a "$ACTION" = "on" ]; then - echo "Turning fan on." - fan_on -elif [ -n "$ACTION" -a "$ACTION" = "off" ]; then - echo "Turning fan off." - fan_off -elif [ -n "$ACTION" -a "$ACTION" = "log" ]; then - if [ -n "$INTERVAL" ]; then - interval=$INTERVAL - else - interval=60 - fi - - while true; do - echo "SoC temp: $(soc_temp) C" - - sleep $interval - done -else - echo "Unknown argument - must be on, off or log [interval]." -fi diff --git a/packages/sysutils/imx6-soc-fan/config/imx6-soc-fan-monitor.conf.sample b/packages/sysutils/imx6-soc-fan/config/imx6-soc-fan-monitor.conf.sample deleted file mode 100644 index a8da70d4d0..0000000000 --- a/packages/sysutils/imx6-soc-fan/config/imx6-soc-fan-monitor.conf.sample +++ /dev/null @@ -1,37 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv) -# -# OpenELEC is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# OpenELEC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC. If not, see . -################################################################################ - -# -# imx6-soc-fan-monitor.conf.sample - i.MX6 SoC fan monitor config file -# used only for TBS Matrix system -# - -# default limits without config file -# when fan is turned on -# high=70 -# when fan is turned off -# low=60 -# temperature checking interval -# interval=30 -# periodically show temperature -# debug=no - -high=70 -low=55 -interval=30 -debug=no diff --git a/packages/sysutils/imx6-soc-fan/package.mk b/packages/sysutils/imx6-soc-fan/package.mk deleted file mode 100644 index 1232d49ff6..0000000000 --- a/packages/sysutils/imx6-soc-fan/package.mk +++ /dev/null @@ -1,48 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv) -# -# OpenELEC is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# OpenELEC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC. If not, see . -################################################################################ - -PKG_NAME="imx6-soc-fan" -PKG_VERSION="1.0" -PKG_ARCH="arm" -PKG_LICENSE="GPL" -PKG_SITE="http://www.openelec.tv/" -PKG_URL="" -PKG_DEPENDS_TARGET="imx6-status-led" -PKG_SECTION="system" -PKG_SHORTDESC="i.MX6 SoC fan monitor" -PKG_LONGDESC="i.MX6 SoC fan monitor for TBS Matrix system" -PKG_AUTORECONF="no" - -make_target() { - : # nothing -} - -makeinstall_target() { - mkdir -p $INSTALL/usr/config - cp $PKG_DIR/config/* $INSTALL/usr/config - - mkdir -p $INSTALL/usr/bin - cp $PKG_DIR/bin/* $INSTALL/usr/bin - - mkdir -p $INSTALL/usr/lib/libreelec - cp $PKG_DIR/scripts/* $INSTALL/usr/lib/libreelec -} - -post_install() { - enable_service imx6-soc-fan-monitor.service -} diff --git a/packages/sysutils/imx6-soc-fan/scripts/imx6-soc-fan-monitor b/packages/sysutils/imx6-soc-fan/scripts/imx6-soc-fan-monitor deleted file mode 100755 index 4f1cbae804..0000000000 --- a/packages/sysutils/imx6-soc-fan/scripts/imx6-soc-fan-monitor +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv) -# -# OpenELEC is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# OpenELEC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC. If not, see . -################################################################################ - -. /usr/lib/libreelec/imx6-system-type - -if [ "$SYSTEM_TYPE" != "matrix" ]; then - echo "Only for TBS Matrix system." - exit 12 -fi - -debug_echo() { - if [ -n "$debug" -a "$debug" == "yes" ]; then - echo $* - fi -} - -fan_on() { - echo 1 > /sys/class/leds/fan/brightness -} - -fan_off() { - echo 0 > /sys/class/leds/fan/brightness -} - -soc_temp() { - local temp=$(cat /sys/devices/virtual/thermal/thermal_zone0/temp) - temp="$(( $temp / 1000 ))" - echo "$temp" -} - -# default limits -high=75 -low=60 -interval=30 -debug=no - -userconfig=/storage/.config/imx6-soc-fan-monitor.conf -if [ -e $userconfig ]; then - . $userconfig - echo "Values from config: low=$low high=$high interval=$interval debug=$debug" -else - echo "Default values: low=$low high=$high interval=$interval debug=$debug" -fi - -#( -# # turn fan on for a moment -# fan_on -# sleep 2 -# fan_off -#)& - -while true; do - temp=$(soc_temp) - debug_echo "SoC temp: $temp [low: $low, high: $high]" - if [ $temp -gt $high ]; then - debug_echo "SoC temp exceeds $high celsius, fan on" - fan_on - fi - - if [ $temp -lt $low ]; then - debug_echo "SoC temp below $low celsius, fan off" - fan_off - fi - - sleep $interval -done diff --git a/packages/sysutils/imx6-soc-fan/system.d/imx6-soc-fan-monitor.service b/packages/sysutils/imx6-soc-fan/system.d/imx6-soc-fan-monitor.service deleted file mode 100644 index 33053c75d9..0000000000 --- a/packages/sysutils/imx6-soc-fan/system.d/imx6-soc-fan-monitor.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=i.MX6 SoC fan monitor service - -[Service] -ExecStart=/bin/sh -c "exec /bin/sh /usr/lib/libreelec/imx6-soc-fan-monitor" -RestartPreventExitStatus=12 -TimeoutStopSec=5 -Restart=always -RestartSec=60 -StartLimitInterval=0 - -[Install] -WantedBy=multi-user.target