mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-02 15:37:49 +00:00
xbmc-dharma: add cputemp and gputemp and setup this on first boot
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
de0cab4d9c
commit
243ceece41
@ -46,6 +46,8 @@ amdGpuType=$(lspci -nn | grep 'VGA' | grep 1002)
|
|||||||
cat > $HOME/.xbmc/userdata/advancedsettings.xml << EOF
|
cat > $HOME/.xbmc/userdata/advancedsettings.xml << EOF
|
||||||
<advancedsettings>
|
<advancedsettings>
|
||||||
<useddsfanart>true</useddsfanart>
|
<useddsfanart>true</useddsfanart>
|
||||||
|
<cputempcommand>cputemp</cputempcommand>
|
||||||
|
<gputempcommand>gputemp</gputempcommand>
|
||||||
</advancedsettings>
|
</advancedsettings>
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
PYTHON_LIBDIR="`ls -d $INSTALL/usr/lib/python*`"
|
PYTHON_LIBDIR="`ls -d $INSTALL/usr/lib/python*`"
|
||||||
|
|
||||||
mkdir -p $INSTALL/usr/bin
|
mkdir -p $INSTALL/usr/bin
|
||||||
cp $PKG_DIR/scripts/xbmc $INSTALL/usr/bin
|
cp $PKG_DIR/scripts/* $INSTALL/usr/bin
|
||||||
cp $PKG_BUILD/tools/EventClients/Clients/XBMC\ Send/xbmc-send.py $INSTALL/usr/bin/xbmc-send
|
cp $PKG_BUILD/tools/EventClients/Clients/XBMC\ Send/xbmc-send.py $INSTALL/usr/bin/xbmc-send
|
||||||
|
|
||||||
mkdir -p $INSTALL/usr/lib/xbmc
|
mkdir -p $INSTALL/usr/lib/xbmc
|
||||||
|
31
packages/mediacenter/xbmc-dharma/scripts/cputemp
Executable file
31
packages/mediacenter/xbmc-dharma/scripts/cputemp
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Copyright (C) 2009-2010 OpenELEC.tv
|
||||||
|
# http://www.openelec.tv
|
||||||
|
#
|
||||||
|
# This Program 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, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This Program 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.tv; see the file COPYING. If not, write to
|
||||||
|
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
# http://www.gnu.org/copyleft/gpl.html
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
TEMP="0"
|
||||||
|
|
||||||
|
if [ -f /sys/class/thermal/thermal_zone0/temp ]; then
|
||||||
|
TEMP=`echo "$(cat /sys/class/thermal/thermal_zone0/temp)/1000" |bc`
|
||||||
|
elif [ -f /usr/bin/sensors ]; then
|
||||||
|
TEMP=`/usr/bin/sensors -u | head -6 |grep "temp1_input"| awk '{print $2 }' |awk '{printf("%d\n",$1 + 0.5);}'`
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${TEMP} C"
|
29
packages/mediacenter/xbmc-dharma/scripts/gputemp
Executable file
29
packages/mediacenter/xbmc-dharma/scripts/gputemp
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Copyright (C) 2009-2010 OpenELEC.tv
|
||||||
|
# http://www.openelec.tv
|
||||||
|
#
|
||||||
|
# This Program 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, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This Program 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.tv; see the file COPYING. If not, write to
|
||||||
|
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
# http://www.gnu.org/copyleft/gpl.html
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
TEMP="0"
|
||||||
|
|
||||||
|
if lspci -n | grep 0300 | grep -q 10de; then
|
||||||
|
[ -f /usr/bin/nvidia-smi ] && TEMP=`/usr/bin/nvidia-smi -a | grep 'Temperature' | awk '{print $3}'`
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${TEMP} C"
|
Loading…
x
Reference in New Issue
Block a user