Skip to content

Commit 60ebdf6

Browse files
authored
v7.5
+ DietPi-FirstBoot | RPi: Adjust only actual commented overclocking settings. Before there was one unintended line changed as well.
1 parent d1f08be commit 60ebdf6

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

rootfs/var/lib/dietpi/services/dietpi-firstboot.bash

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,58 +33,58 @@
3333
# RPi Zero
3434
if [[ $G_HW_MODEL_NAME == *'Zero'* ]]
3535
then
36-
sed -i '/over_voltage=/c\#over_voltage=0' /boot/config.txt
37-
sed -i '/arm_freq=/c\#arm_freq=1000' /boot/config.txt
38-
sed -i '/core_freq=/c\#core_freq=400' /boot/config.txt
39-
sed -i '/sdram_freq=/c\#sdram_freq=450' /boot/config.txt
36+
sed -i '/#over_voltage=/c\#over_voltage=0' /boot/config.txt
37+
sed -i '/#arm_freq=/c\#arm_freq=1000' /boot/config.txt
38+
sed -i '/#core_freq=/c\#core_freq=400' /boot/config.txt
39+
sed -i '/#sdram_freq=/c\#sdram_freq=450' /boot/config.txt
4040

4141
# RPi 1: Apply safe overclock mode
4242
elif (( $G_HW_MODEL < 2 ))
4343
then
4444
G_CONFIG_INJECT 'over_voltage=' 'over_voltage=2' /boot/config.txt
4545
G_CONFIG_INJECT 'arm_freq=' 'arm_freq=900' /boot/config.txt
46-
sed -i '/core_freq=/c\#core_freq=250' /boot/config.txt
47-
sed -i '/sdram_freq=/c\#sdram_freq=400' /boot/config.txt
46+
sed -i '/#core_freq=/c\#core_freq=250' /boot/config.txt
47+
sed -i '/#sdram_freq=/c\#sdram_freq=400' /boot/config.txt
4848

4949
# RPi 2
5050
elif (( $G_HW_MODEL == 2 ))
5151
then
52-
sed -i '/over_voltage=/c\#over_voltage=0' /boot/config.txt
53-
sed -i '/arm_freq=/c\#arm_freq=900' /boot/config.txt
54-
sed -i '/core_freq=/c\#core_freq=250' /boot/config.txt
55-
sed -i '/sdram_freq=/c\#sdram_freq=450' /boot/config.txt
52+
sed -i '/#over_voltage=/c\#over_voltage=0' /boot/config.txt
53+
sed -i '/#arm_freq=/c\#arm_freq=900' /boot/config.txt
54+
sed -i '/#core_freq=/c\#core_freq=250' /boot/config.txt
55+
sed -i '/#sdram_freq=/c\#sdram_freq=450' /boot/config.txt
5656

5757
# RPi 3
5858
elif (( $G_HW_MODEL == 3 ))
5959
then
60-
sed -i '/over_voltage=/c\#over_voltage=0' /boot/config.txt
61-
sed -i '/core_freq=/c\#core_freq=400' /boot/config.txt
60+
sed -i '/#over_voltage=/c\#over_voltage=0' /boot/config.txt
61+
sed -i '/#core_freq=/c\#core_freq=400' /boot/config.txt
6262
G_CONFIG_INJECT 'temp_limit=' 'temp_limit=75' /boot/config.txt # https://github.com/MichaIng/DietPi/issues/356
6363

6464
# A+/B+
6565
if [[ $G_HW_MODEL_NAME == *'+'* ]]
6666
then
67-
sed -i '/arm_freq=/c\#arm_freq=1400' /boot/config.txt
68-
sed -i '/sdram_freq=/c\#sdram_freq=500' /boot/config.txt
67+
sed -i '/#arm_freq=/c\#arm_freq=1400' /boot/config.txt
68+
sed -i '/#sdram_freq=/c\#sdram_freq=500' /boot/config.txt
6969
else
70-
sed -i '/arm_freq=/c\#arm_freq=1200' /boot/config.txt
71-
sed -i '/sdram_freq=/c\#sdram_freq=450' /boot/config.txt
70+
sed -i '/#arm_freq=/c\#arm_freq=1200' /boot/config.txt
71+
sed -i '/#sdram_freq=/c\#sdram_freq=450' /boot/config.txt
7272
fi
7373

7474
# RPi 4
7575
elif (( $G_HW_MODEL == 4 ))
7676
then
77-
sed -i '/over_voltage=/c\#over_voltage=0' /boot/config.txt
78-
sed -i '/core_freq=/c\#core_freq=500' /boot/config.txt
79-
sed -i '/sdram_freq=/d' /boot/config.txt # Not supported on RPi4, defaults to 3200 MHz
77+
sed -i '/#over_voltage=/c\#over_voltage=0' /boot/config.txt
78+
sed -i '/#core_freq=/c\#core_freq=500' /boot/config.txt
79+
sed -i '/#sdram_freq=/d' /boot/config.txt # Not supported on RPi4, defaults to 3200 MHz
8080
G_CONFIG_INJECT 'temp_limit=' 'temp_limit=75' /boot/config.txt # https://github.com/MichaIng/DietPi/issues/3019
8181

8282
# 400
8383
if [[ $G_HW_MODEL_NAME == *'400'* ]]
8484
then
85-
sed -i '/arm_freq=/c\#arm_freq=1800' /boot/config.txt
85+
sed -i '/#arm_freq=/c\#arm_freq=1800' /boot/config.txt
8686
else
87-
sed -i '/arm_freq=/c\#arm_freq=1500' /boot/config.txt
87+
sed -i '/#arm_freq=/c\#arm_freq=1500' /boot/config.txt
8888
fi
8989
fi
9090
}

0 commit comments

Comments
 (0)