bcm2835-driver: convert cpu threshold setting to systemd

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-08-07 11:47:52 +02:00
parent 66b75c814b
commit 5708fe10c6
3 changed files with 15 additions and 6 deletions

View File

@ -78,6 +78,7 @@ makeinstall_target() {
}
post_install() {
enable_service bcm2835-threshold.service
enable_service framebuffer.service
enable_service vcfiled.service
}

View File

@ -0,0 +1,13 @@
[Unit]
Description=Set onedemand threshold
After=syslog.target
ConditionPathExists=/sys/devices/system/cpu/cpufreq/ondemand/up_threshold
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold'
[Install]
WantedBy=multi-user.target

View File

@ -28,11 +28,6 @@ progress "set cpu's to full power"
printf "performance" > $i
done 2>/dev/null
progress "set onedemand threshold"
if [ -f /sys/devices/system/cpu/cpufreq/ondemand/up_threshold ]; then
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
fi
(
usleep 40000000
progress "set cpu's to 'ondemand'"