mirror of
https://github.com/brain-hackers/brain-config.git
synced 2025-01-03 18:10:07 +09:00
adjust last commit for personal taste
This commit is contained in:
parent
44bd55d2e8
commit
8f792cc4e4
19
raspi-config
19
raspi-config
@ -151,17 +151,16 @@ do_memory_split() {
|
|||||||
if ! mountpoint -q /boot; then
|
if ! mountpoint -q /boot; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
local CURRENT_MEMSPLIT AVAILABLE_SPLITS
|
|
||||||
AVAILABLE_SPLITS="128 192 224 240"
|
AVAILABLE_SPLITS="128 192 224 240"
|
||||||
CURRENT_MEMSPLIT=$(
|
MEMSPLIT_DESCRIPTION=""
|
||||||
for SPLIT in $AVAILABLE_SPLITS;do
|
for SPLIT in $AVAILABLE_SPLITS;do
|
||||||
if cmp /boot/arm${SPLIT}_start.elf /boot/start.elf >/dev/null 2>&1;then
|
if [ -e /boot/arm${SPLIT}_start.elf ] && cmp /boot/arm${SPLIT}_start.elf /boot/start.elf >/dev/null 2>&1;then
|
||||||
echo $SPLIT
|
CURRENT_MEMSPLIT=$SPLIT
|
||||||
exit 0
|
MEMSPLIT_DESCRIPTION="Current: ${CURRENT_MEMSPLIT}MiB for ARM, $((256 - $CURRENT_MEMSPLIT))MiB for VideoCore"
|
||||||
fi
|
break
|
||||||
done
|
fi
|
||||||
)
|
done
|
||||||
MEMSPLIT=$(whiptail --menu "Set memory split.\nCurrent: ${CURRENT_MEMSPLIT}MiB for ARM, $((256 - $CURRENT_MEMSPLIT))MiB for VideoCore" 20 60 10 \
|
MEMSPLIT=$(whiptail --menu "Set memory split.\n$MEMSPLIT_DESCRIPTION" 20 60 10 \
|
||||||
"240" "240MiB for ARM, 16MiB for VideoCore" \
|
"240" "240MiB for ARM, 16MiB for VideoCore" \
|
||||||
"224" "224MiB for ARM, 32MiB for VideoCore" \
|
"224" "224MiB for ARM, 32MiB for VideoCore" \
|
||||||
"192" "192MiB for ARM, 64MiB for VideoCore" \
|
"192" "192MiB for ARM, 64MiB for VideoCore" \
|
||||||
|
Loading…
Reference in New Issue
Block a user