mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-23 04:30:06 +09:00
Fix incorrect reboot flag when toggling GL driver on Pi 4
This commit is contained in:
parent
147daa3e5b
commit
bc5a153c02
12
raspi-config
12
raspi-config
@ -1580,17 +1580,29 @@ do_gldriver() {
|
|||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
case "$GLOPT" in
|
case "$GLOPT" in
|
||||||
G1*)
|
G1*)
|
||||||
|
if is_pifour ; then
|
||||||
if grep -q -E "^dtoverlay=vc4-f?kms-v3d" $CONFIG; then
|
if grep -q -E "^dtoverlay=vc4-f?kms-v3d" $CONFIG; then
|
||||||
ASK_TO_REBOOT=1
|
ASK_TO_REBOOT=1
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
if sed -n "/\[pi4\]/,/\[/ !p" $CONFIG | grep -q -E "^dtoverlay=vc4-f?kms-v3d" ; then
|
||||||
|
ASK_TO_REBOOT=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
sed $CONFIG -i -e "s/^dtoverlay=vc4-kms-v3d/#dtoverlay=vc4-kms-v3d/g"
|
sed $CONFIG -i -e "s/^dtoverlay=vc4-kms-v3d/#dtoverlay=vc4-kms-v3d/g"
|
||||||
sed $CONFIG -i -e "s/^dtoverlay=vc4-fkms-v3d/#dtoverlay=vc4-fkms-v3d/g"
|
sed $CONFIG -i -e "s/^dtoverlay=vc4-fkms-v3d/#dtoverlay=vc4-fkms-v3d/g"
|
||||||
STATUS="The GL driver is disabled."
|
STATUS="The GL driver is disabled."
|
||||||
;;
|
;;
|
||||||
G2*)
|
G2*)
|
||||||
|
if is_pifour ; then
|
||||||
|
if ! grep -q -E "^dtoverlay=vc4-fkms-v3d" $CONFIG; then
|
||||||
|
ASK_TO_REBOOT=1
|
||||||
|
fi
|
||||||
|
else
|
||||||
if ! sed -n "/\[pi4\]/,/\[/ !p" $CONFIG | grep -q "^dtoverlay=vc4-fkms-v3d" ; then
|
if ! sed -n "/\[pi4\]/,/\[/ !p" $CONFIG | grep -q "^dtoverlay=vc4-fkms-v3d" ; then
|
||||||
ASK_TO_REBOOT=1
|
ASK_TO_REBOOT=1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
sed $CONFIG -i -e "s/^dtoverlay=vc4-kms-v3d/#dtoverlay=vc4-kms-v3d/g"
|
sed $CONFIG -i -e "s/^dtoverlay=vc4-kms-v3d/#dtoverlay=vc4-kms-v3d/g"
|
||||||
sed $CONFIG -i -e "s/^#dtoverlay=vc4-fkms-v3d/dtoverlay=vc4-fkms-v3d/g"
|
sed $CONFIG -i -e "s/^#dtoverlay=vc4-fkms-v3d/dtoverlay=vc4-fkms-v3d/g"
|
||||||
if ! sed -n "/\[pi4\]/,/\[/ !p" $CONFIG | grep -q "^dtoverlay=vc4-fkms-v3d" ; then
|
if ! sed -n "/\[pi4\]/,/\[/ !p" $CONFIG | grep -q "^dtoverlay=vc4-fkms-v3d" ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user