mirror of
https://github.com/brain-hackers/brain-config.git
synced 2025-01-03 18:10:07 +09:00
when enabling camera, only set gpu mem if it is currently set below 128MiB
This commit is contained in:
parent
b194c2e2cd
commit
46aacb3003
@ -549,7 +549,10 @@ set_camera() {
|
||||
sed /boot/config.txt -i -e "s/^fixup_file/#fixup_file/"
|
||||
else # enable camera
|
||||
set_config_var start_x 1 /boot/config.txt
|
||||
set_config_var gpu_mem 128 /boot/config.txt
|
||||
CUR_GPU_MEM=$(get_config_var gpu_mem /boot/config.txt)
|
||||
if [ -z "$CUR_GPU_MEM" ] || [ "$CUR_GPU_MEM" -lt 128 ]; then
|
||||
set_config_var gpu_mem 128 /boot/config.txt
|
||||
fi
|
||||
sed /boot/config.txt -i -e "s/^startx/#startx/"
|
||||
sed /boot/config.txt -i -e "s/^fixup_file/#fixup_file/"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user