Skip to content

Commit

Permalink
Merge pull request #3077 from MilhouseVH/le90_fix_cputemp
Browse files Browse the repository at this point in the history
kodi: use project specific cputemp scripts for all projects
  • Loading branch information
CvH authored Nov 11, 2018
2 parents e8e2816 + 0af4984 commit fa55839
Show file tree
Hide file tree
Showing 18 changed files with 49 additions and 25 deletions.
3 changes: 3 additions & 0 deletions packages/mediacenter/kodi/config/advancedsettings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<advancedsettings>
<cputempcommand>/usr/bin/cputemp</cputempcommand>
<gputempcommand>/usr/bin/gputemp</gputempcommand>

<showexitbutton>false</showexitbutton>
<remotedelay>1</remotedelay>
<samba>
Expand Down
2 changes: 0 additions & 2 deletions packages/mediacenter/kodi/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,6 @@ post_makeinstall_target() {
cp $PKG_DIR/scripts/service-addon-wrapper $INSTALL/usr/sbin

mkdir -p $INSTALL/usr/bin
cp $PKG_DIR/scripts/cputemp $INSTALL/usr/bin
ln -sf cputemp $INSTALL/usr/bin/gputemp
cp $PKG_DIR/scripts/kodi-remote $INSTALL/usr/bin
cp $PKG_DIR/scripts/setwakeup.sh $INSTALL/usr/bin

Expand Down
8 changes: 8 additions & 0 deletions projects/Amlogic/filesystem/usr/bin/cputemp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)

TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
echo "$(( $TEMP / 1000 )) C"
1 change: 1 addition & 0 deletions projects/Amlogic/filesystem/usr/bin/gputemp
4 changes: 0 additions & 4 deletions projects/Amlogic/kodi/advancedsettings.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)

# inspired by
# https://github.com/xtranophilist/gnome-shell-extension-cpu-temperature/blob/master/extension.js

TEMP=0

if [ $(basename "$0") = "gputemp" -o "$1" = "gpu" ]; then
Expand All @@ -29,7 +26,6 @@ if [ $(basename "$0") = "gputemp" -o "$1" = "gpu" ]; then
done

TEMP="$(( $TEMP / 1000 ))"

fi
fi

Expand All @@ -50,11 +46,6 @@ if [ "$1" = "cpu" -o "$TEMP" = "0" ]; then
TEMP="$(cat /sys/class/hwmon/hwmon0/device/temp1_input)"
fi

# used on RaspberryPi and 3.14 kernel amlogic
if [ "$TEMP" = "0" -a -f /sys/class/thermal/thermal_zone0/temp ]; then
TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
fi

TEMP="$(( $TEMP / 1000 ))"
fi

Expand Down
1 change: 1 addition & 0 deletions projects/Generic/filesystem/usr/bin/gputemp
2 changes: 0 additions & 2 deletions projects/Generic/kodi/advancedsettings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<advancedsettings>
<cputempcommand>cputemp</cputempcommand>
<gputempcommand>gputemp</gputempcommand>
<video>
<latency>
<delay>0</delay>
Expand Down
8 changes: 8 additions & 0 deletions projects/RPi/filesystem/usr/bin/cputemp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)

TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
echo "$(( $TEMP / 1000 )) C"
1 change: 1 addition & 0 deletions projects/RPi/filesystem/usr/bin/gputemp
8 changes: 8 additions & 0 deletions projects/Rockchip/filesystem/usr/bin/cputemp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)

TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
echo "$(( $TEMP / 1000 )) C"
1 change: 1 addition & 0 deletions projects/Rockchip/filesystem/usr/bin/gputemp
8 changes: 8 additions & 0 deletions projects/WeTek_Core/filesystem/usr/bin/cputemp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)

TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
echo "$(( $TEMP / 1000 )) C"
1 change: 1 addition & 0 deletions projects/WeTek_Core/filesystem/usr/bin/gputemp
4 changes: 0 additions & 4 deletions projects/WeTek_Core/kodi/advancedsettings.xml

This file was deleted.

8 changes: 8 additions & 0 deletions projects/WeTek_Play/filesystem/usr/bin/cputemp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)

TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
echo "$(( $TEMP / 1000 )) C"
1 change: 1 addition & 0 deletions projects/WeTek_Play/filesystem/usr/bin/gputemp
4 changes: 0 additions & 4 deletions projects/WeTek_Play/kodi/advancedsettings.xml

This file was deleted.

0 comments on commit fa55839

Please sign in to comment.