mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-22 20:20:06 +09:00
fixes #18: enable and disable camera prevents 16M split
The 'startx' parameter in config.txt (nothing to do with startx in Linux) handles switching to start_cd if gpu_mem is set to 16M just fine, so let's just use that.
This commit is contained in:
parent
5ff5501e90
commit
f4259fa00e
10
raspi-config
10
raspi-config
@ -433,12 +433,14 @@ set_camera() {
|
||||
[ -e /boot/config.txt ] || touch /boot/config.txt
|
||||
|
||||
if [ "$1" -eq 0 ]; then # disable camera
|
||||
set_config_var start_file start.elf /boot/config.txt
|
||||
set_config_var fixup_file fixup.dat /boot/config.txt
|
||||
set_config_var startx 0 /boot/config.txt
|
||||
sed /boot/config.txt -i -e "s/^start_file/#start_file/"
|
||||
sed /boot/config.txt -i -e "s/^fixup_file/#fixup_file/"
|
||||
else # enable camera
|
||||
set_config_var start_file start_x.elf /boot/config.txt
|
||||
set_config_var fixup_file fixup_x.dat /boot/config.txt
|
||||
set_config_var startx 1 /boot/config.txt
|
||||
set_config_var gpu_mem 128 /boot/config.txt
|
||||
sed /boot/config.txt -i -e "s/^start_file/#start_file/"
|
||||
sed /boot/config.txt -i -e "s/^fixup_file/#fixup_file/"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user