File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
recipes-support/arduino-ootb Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ SRC_URI = " \
1212 file://connection_status_led \
1313 file://ec200a-eu.service \
1414 file://compose-apps-aklite-offline-run.service \
15+ file://set_cpu_freq \
1516"
1617
1718inherit systemd
@@ -33,6 +34,11 @@ do_install() {
3334 install -m 0755 ${WORKDIR} /connection_status_led ${D}${bindir} /
3435}
3536
37+ do_install :append :lmp -base () {
38+ install -d ${D}${bindir}
39+ install -m 0755 ${WORKDIR} /set_cpu_freq ${D}${bindir} /
40+ }
41+
3642RDEPENDS :${PN} += "systemd udev-rules-portenta"
3743
3844FILES :${PN} += " \
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ CPU_FREQUENCIES=(200 400 600 1200 1600)
4+
5+ if [[ ! " ${CPU_FREQUENCIES[@]} " =~ " $1 " ]]; then
6+ echo " Error: Invalid min frequency. Must be one of: ${CPU_FREQUENCIES[@]} "
7+ exit 1
8+ fi
9+
10+ if [[ ! " ${CPU_FREQUENCIES[@]} " =~ " $2 " ]]; then
11+ echo " Error: Invalid max frequency. Must be one of: ${CPU_FREQUENCIES[@]} "
12+ exit 1
13+ fi
14+
15+ echo " Min $1 MHz, max $2 MHz"
16+ for i in /sys/devices/system/cpu/cpu* /cpufreq/scaling_governor; do echo " powersave" | sudo tee $i ; done
17+ for i in /sys/devices/system/cpu/cpu* /cpufreq/scaling_min_freq; do echo " ${1} 000" | sudo tee $i ; done
18+ for i in /sys/devices/system/cpu/cpu* /cpufreq/scaling_max_freq; do echo " ${2} 000" | sudo tee $i ; done
You can’t perform that action at this time.
0 commit comments