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:
Stephan Raue 2010-09-16 18:03:16 +02:00
parent de0cab4d9c
commit 243ceece41
4 changed files with 63 additions and 1 deletions

View File

@ -46,6 +46,8 @@ amdGpuType=$(lspci -nn | grep 'VGA' | grep 1002)
cat > $HOME/.xbmc/userdata/advancedsettings.xml << EOF
<advancedsettings>
<useddsfanart>true</useddsfanart>
<cputempcommand>cputemp</cputempcommand>
<gputempcommand>gputemp</gputempcommand>
</advancedsettings>
EOF
fi

View File

@ -5,7 +5,7 @@
PYTHON_LIBDIR="`ls -d $INSTALL/usr/lib/python*`"
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
mkdir -p $INSTALL/usr/lib/xbmc

View 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"

View 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"