Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/distrib/utils/embedded/conf Pull up following revision(s)...
details: https://anonhg.NetBSD.org/src/rev/4d1b2f694e2f
branches: netbsd-7
changeset: 798962:4d1b2f694e2f
user: snj <snj%NetBSD.org@localhost>
date: Sun Feb 08 22:09:27 2015 +0000
description:
Pull up following revision(s) (requested by jmcneill in ticket #496):
distrib/utils/embedded/conf/rpi.conf: revision 1.25
By default, RPI firmware sets the max CPU frequency to 600MHz. This can be
overridden by setting arm_freq in config.txt, but the default freq at boot
is still 600MHz.
Add logic to rc.local to compare the current vs. max CPU frequency; if they
differ, set the target frequency to the maximum.
diffstat:
distrib/utils/embedded/conf/rpi.conf | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diffs (32 lines):
diff -r 7b41696bdac3 -r 4d1b2f694e2f distrib/utils/embedded/conf/rpi.conf
--- a/distrib/utils/embedded/conf/rpi.conf Sun Feb 08 22:05:55 2015 +0000
+++ b/distrib/utils/embedded/conf/rpi.conf Sun Feb 08 22:09:27 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rpi.conf,v 1.24 2013/11/28 13:39:18 skrll Exp $
+# $NetBSD: rpi.conf,v 1.24.4.1 2015/02/08 22:09:27 snj Exp $
# Raspberry Pi customization script used by mkimage
#
@@ -29,6 +29,22 @@
devpubd=YES
EOF
+ #
+ # If arm_freq is specified in config.txt, set CPU frequency
+ # to match at boot time.
+ #
+ cp ${release}/etc/rc.local ${mnt}/etc/rc.local
+ cat > /tmp/a << EOF
+if /sbin/sysctl -q machdep.cpu.frequency.max; then
+ cpufreq_max=\$(/sbin/sysctl -n machdep.cpu.frequency.max)
+ cpufreq_cur=\$(/sbin/sysctl -n machdep.cpu.frequency.current)
+ if [ ! "\$cpufreq_max" = "\$cpufreq_cur" ]; then
+ /sbin/sysctl -w machdep.cpu.frequency.target=\$cpufreq_max
+ fi
+fi
+EOF
+ echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" \
+ >> "$tmp/selected_sets"
}
populate() {
Home |
Main Index |
Thread Index |
Old Index