From 43faccc5042fa8d4832423f68e2da9dafdf4286b Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Wed, 14 Nov 2012 23:41:20 +0200 Subject: rpi-config: Add variables to set memory split for 256/512 models GPU_MEM gpu_mem - GPU memory in megabyte. Sets the memory split between the ARM and GPU. ARM gets the remaining memory. Min 16. Default 64 GPU_MEM_256 gpu_mem_256 -GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by the 512MB RP. Overrides gpu_mem. Max 192. GPU_MEM_512 gpu_mem_512 -GPU memory in megabyte for the 512MB Raspberry Pi. Ignored by the 256MB RP. Overrides gpu_mem. Max 448. Signed-off-by: Andrei Gherzan --- recipes-bcm/bootfiles/rpi-config_0.1.bb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/recipes-bcm/bootfiles/rpi-config_0.1.bb b/recipes-bcm/bootfiles/rpi-config_0.1.bb index 705edc2..a8938dc 100644 --- a/recipes-bcm/bootfiles/rpi-config_0.1.bb +++ b/recipes-bcm/bootfiles/rpi-config_0.1.bb @@ -13,7 +13,7 @@ SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \ S = "${WORKDIR}/git" -PR = "r2" +PR = "r3" addtask deploy before do_package after do_install @@ -41,6 +41,17 @@ do_deploy() { if [ -n "${OVER_VOLTAGE}" ]; then sed -i '/#over_voltage/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt fi + + # GPU memory + if [ -n "${GPU_MEM}" ]; then + sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt + fi + if [ -n "${GPU_MEM_256}" ]; then + sed -i '/#gpu_mem_256/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt + fi + if [ -n "${GPU_MEM_512}" ]; then + sed -i '/#gpu_mem_512/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt + fi } PACKAGE_ARCH = "${MACHINE_ARCH}" -- cgit v1.2.3-54-g00ecf