From 46aacb3003a7c58452a7a0b75eb1fa79ac4dab09 Mon Sep 17 00:00:00 2001 From: Alex Bradbury Date: Mon, 16 Dec 2013 21:09:43 +0000 Subject: [PATCH] when enabling camera, only set gpu mem if it is currently set below 128MiB --- raspi-config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/raspi-config b/raspi-config index 3817556..c9f7f00 100755 --- a/raspi-config +++ b/raspi-config @@ -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