aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorGravatar Gaël PORTAY <gael.portay@savoirfairelinux.com>2017-09-23 19:30:06 -0400
committerGravatar Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2017-09-27 22:08:03 +0200
commitf9ccd2a186e6307fb40b90f96491c6f0b0ab8847 (patch)
treefec5f92731aba7165b662b358f535bbd54452a11 /board
parent39576d0f735108dbbd48a5aa517ed01c053abc4b (diff)
downloadbuildroot-f9ccd2a186e6307fb40b90f96491c6f0b0ab8847.tar.gz
buildroot-f9ccd2a186e6307fb40b90f96491c6f0b0ab8847.tar.bz2
raspberrypi: post-image.sh add new gpu_mem option
The amount of GPU memory can be set using the new option --gpu_mem_XXX (where XXX is the total amount of memory available on the board). Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Diffstat (limited to 'board')
-rwxr-xr-xboard/raspberrypi/post-image.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh
index 3900a15727..a2d6a98e79 100755
--- a/board/raspberrypi/post-image.sh
+++ b/board/raspberrypi/post-image.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
BOARD_DIR="$(dirname $0)"
BOARD_NAME="$(basename ${BOARD_DIR})"
@@ -38,6 +38,11 @@ enable_uart=1
__EOF__
fi
;;
+ --gpu_mem_256=*|--gpu_mem_512=*|--gpu_mem_1024=*)
+ # Set GPU memory
+ gpu_mem="${1:2}"
+ sed -e "/^${gpu_mem%=*}=/s,=.*,=${gpu_mem##*=}," -i "${BINARIES_DIR}/rpi-firmware/config.txt"
+ ;;
esac
done