cpufreq-tweaks: tweak cpufreq governor after boot

Defaults to 'ondemand' governor after 10 minutes

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Koen Kooi
2013-03-21 11:14:40 +01:00
parent 66b865d681
commit b64b93e129
3 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
DESCRIPTION = "CPU-freq tweaks for angstrom"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
inherit allarch systemd
#PV = "${DISTRO_VERSION}"
SRC_URI = "file://cpu-ondemand.timer \
file://cpu-ondemand.service \
"
do_compile() {
:
}
do_install () {
install -d ${D}/${base_libdir}/systemd/system
install -m 0644 ${WORKDIR}/cpu-ondemand.* ${D}/${base_libdir}/systemd/system/
}
NATIVE_SYSTEMD_SUPPORT = "1"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "cpu-ondemand.timer"
FILES_${PN} += "${base_libdir}/systemd"
RDEPENDS_${PN} = "cpufrequtils"

View File

@@ -0,0 +1,6 @@
[Unit]
Description=Switch to ondemand CPU-freq governor
[Service]
Type=oneshot
ExecStart=/usr/bin/cpufreq-set -g ondemand

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Switches to ondemand CPU-freq governor 10 minutes after boot
[Timer]
# Time to wait after booting before we run first time
OnBootSec=10min
Unit=cpu-ondemand.service
[Install]
WantedBy=multi-user.target