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:
30
recipes-angstrom/angstrom/cpufreq-tweaks.bb
Normal file
30
recipes-angstrom/angstrom/cpufreq-tweaks.bb
Normal 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"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=Switch to ondemand CPU-freq governor
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/cpufreq-set -g ondemand
|
||||
10
recipes-angstrom/angstrom/cpufreq-tweaks/cpu-ondemand.timer
Normal file
10
recipes-angstrom/angstrom/cpufreq-tweaks/cpu-ondemand.timer
Normal 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
|
||||
Reference in New Issue
Block a user