mirror of
https://github.com/brain-hackers/brain-config.git
synced 2025-01-03 18:10:07 +09:00
raspi-config modified to remove config variables rather than set default values when overclocking
This commit is contained in:
parent
7c93afa251
commit
f2f919f0db
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -1,3 +1,10 @@
|
|||||||
|
raspi-config (20151117) jessie; urgency=medium
|
||||||
|
|
||||||
|
* raspi-config modified to remove config variables rather than set default
|
||||||
|
values when overclocking
|
||||||
|
|
||||||
|
-- Serge Schneider <serge@raspberrypi.org> Tue, 17 Nov 2015 11:35:14 +0000
|
||||||
|
|
||||||
raspi-config (20151019) jessie; urgency=medium
|
raspi-config (20151019) jessie; urgency=medium
|
||||||
|
|
||||||
* Add alsa-utils dependency
|
* Add alsa-utils dependency
|
||||||
|
29
raspi-config
29
raspi-config
@ -152,6 +152,21 @@ EOF
|
|||||||
mv "$3.bak" "$3"
|
mv "$3.bak" "$3"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clear_config_var() {
|
||||||
|
lua - "$1" "$2" <<EOF > "$2.bak"
|
||||||
|
local key=assert(arg[1])
|
||||||
|
local fn=assert(arg[2])
|
||||||
|
local file=assert(io.open(fn))
|
||||||
|
for line in file:lines() do
|
||||||
|
if line:match("^%s*"..key.."=.*$") then
|
||||||
|
line="#"..line
|
||||||
|
end
|
||||||
|
print(line)
|
||||||
|
end
|
||||||
|
EOF
|
||||||
|
mv "$2.bak" "$2"
|
||||||
|
}
|
||||||
|
|
||||||
get_config_var() {
|
get_config_var() {
|
||||||
lua - "$1" "$2" <<EOF
|
lua - "$1" "$2" <<EOF
|
||||||
local key=assert(arg[1])
|
local key=assert(arg[1])
|
||||||
@ -332,7 +347,7 @@ See http://elinux.org/RPi_Overclocking for more information.\
|
|||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
case "$OVERCLOCK" in
|
case "$OVERCLOCK" in
|
||||||
None)
|
None)
|
||||||
set_overclock None 700 250 400 0
|
clear_overclock
|
||||||
;;
|
;;
|
||||||
Modest)
|
Modest)
|
||||||
set_overclock Modest 800 250 400 0
|
set_overclock Modest 800 250 400 0
|
||||||
@ -350,7 +365,7 @@ See http://elinux.org/RPi_Overclocking for more information.\
|
|||||||
set_overclock Pi2 1000 500 500 2
|
set_overclock Pi2 1000 500 500 2
|
||||||
;;
|
;;
|
||||||
Pi2None)
|
Pi2None)
|
||||||
set_overclock Medium 900 250 450 0
|
clear_overclock
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
whiptail --msgbox "Programmer error, unrecognised overclock preset" 20 60 2
|
whiptail --msgbox "Programmer error, unrecognised overclock preset" 20 60 2
|
||||||
@ -371,6 +386,16 @@ set_overclock() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clear_overclock () {
|
||||||
|
clear_config_var arm_freq $CONFIG &&
|
||||||
|
clear_config_var core_freq $CONFIG &&
|
||||||
|
clear_config_var sdram_freq $CONFIG &&
|
||||||
|
clear_config_var over_voltage $CONFIG &&
|
||||||
|
if [ "$INTERACTIVE" = True ]; then
|
||||||
|
whiptail --msgbox "Set overclock to preset 'None'" 20 60 2
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
do_ssh() {
|
do_ssh() {
|
||||||
if [ -e /var/log/regen_ssh_keys.log ] && ! grep -q "^finished" /var/log/regen_ssh_keys.log; then
|
if [ -e /var/log/regen_ssh_keys.log ] && ! grep -q "^finished" /var/log/regen_ssh_keys.log; then
|
||||||
whiptail --msgbox "Initial ssh key generation still running. Please wait and try again." 20 60 2
|
whiptail --msgbox "Initial ssh key generation still running. Please wait and try again." 20 60 2
|
||||||
|
Loading…
Reference in New Issue
Block a user