Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kodi: use project specific cputemp scripts for all projects #3077

Merged
merged 1 commit into from
Nov 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.