mirror of
https://github.com/brain-hackers/brain-config.git
synced 2025-01-03 10:00:07 +09:00
Update camera switching for bullseye
This commit is contained in:
parent
e8d0a860ec
commit
64d5c2c25d
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
||||
raspi-config (20210827) bullseye; urgency=medium
|
||||
|
||||
* Add switching for new camera detection in firmware
|
||||
|
||||
-- Simon Long <simon@raspberrypi.com> Fri, 27 Aug 2021 16:13:49 +0100
|
||||
|
||||
raspi-config (20210816) bullseye; urgency=medium
|
||||
|
||||
* Enable xcompmgr with full KMS as well as fKMS on all platforms
|
||||
|
23
raspi-config
23
raspi-config
@ -1644,16 +1644,29 @@ EOF
|
||||
}
|
||||
|
||||
get_camera() {
|
||||
if [ $(deb_ver) -le 10 ]; then
|
||||
CAM=$(get_config_var start_x $CONFIG)
|
||||
if [ $CAM -eq 1 ]; then
|
||||
echo 0
|
||||
else
|
||||
echo 1
|
||||
fi
|
||||
else
|
||||
if grep -q camera_auto_detect $CONFIG ; then
|
||||
CAM=$(get_config_var camera_auto_detect $CONFIG)
|
||||
if [ $CAM -eq 1 ]; then
|
||||
echo 0
|
||||
else
|
||||
echo 1
|
||||
fi
|
||||
else
|
||||
echo 0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
do_camera() {
|
||||
if [ ! -e /boot/start_x.elf ]; then
|
||||
if [ $(deb_ver) -le 10 ] && [ ! -e /boot/start_x.elf ]; then
|
||||
whiptail --msgbox "Your firmware appears to be out of date (no start_x.elf). Please update" 20 60 2
|
||||
return 1
|
||||
fi
|
||||
@ -1676,15 +1689,23 @@ do_camera() {
|
||||
ASK_TO_REBOOT=1
|
||||
fi
|
||||
if [ $RET -eq 0 ]; then
|
||||
if [ $(deb_ver) -le 10 ] ; then
|
||||
set_config_var start_x 1 $CONFIG
|
||||
CUR_GPU_MEM=$(get_config_var gpu_mem $CONFIG)
|
||||
if [ -z "$CUR_GPU_MEM" ] || [ "$CUR_GPU_MEM" -lt 128 ]; then
|
||||
set_config_var gpu_mem 128 $CONFIG
|
||||
fi
|
||||
else
|
||||
set_config_var camera_auto_detect 1 $CONFIG
|
||||
fi
|
||||
STATUS=enabled
|
||||
elif [ $RET -eq 1 ]; then
|
||||
if [ $(deb_ver) -le 10 ] ; then
|
||||
set_config_var start_x 0 $CONFIG
|
||||
sed $CONFIG -i -e "s/^start_file/#start_file/"
|
||||
else
|
||||
set_config_var camera_auto_detect 0 $CONFIG
|
||||
fi
|
||||
STATUS=disabled
|
||||
else
|
||||
return $RET
|
||||
|
Loading…
Reference in New Issue
Block a user