Firmware update for Raspberry Pi 512 MB

It is quite possible that a brand-new Raspberry Pi only comes with 256 MB memory after the first boot:

$ dmesg | grep -i "MB total"
[    0.000000] Memory: 256MB = 256MB total

A misdelivery does not necessarily have to be the reason for this effect. It is rather important which of the following codes is noted on the memory chip of the Raspberry Pi:

Caption Memory size
K4P4G324EB-AGC1 512 MB
K4P2G324ED-AGC1 256 MB

If the chip caption is correct, a outdated firmware version might be the reason for the limited memory amount. The firmware isn’t saved on the Pi itself, but on the SD card – because of this, newer distributions (like Raspian Wheezy, etc.) shall not be affected by this problem. If you’re using an older distro (e.g. Raspian Squeeze) you can update your firmware using a tool named¬† rpi-update. The tool is available through a git web mirror – but it needs some other tools which need to be installed before:

# sudo apt-get install ca-certificates git-core binutils
# sudo wget --no-check-certificate http://goo.gl/1BOfJ -O /usr/bin/rpi-update 
# sudo chmod +x /usr/bin/rpi-update
# sudo rpi-update
Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS
Performing self-update
ARM/GPU split is now defined in /boot/config.txt using the gpu_mem option!
We're running for the first time
Setting up firmware (this will take a few minutes)
Using HardFP libraries
If no errors appeared, your firmware was successfully setup
A reboot is needed to activate the new firmware

With a bit of luck, the doubled memory size is recognized after a reboot:

$ dmesg | grep -i "MB total"
[    0.000000] Memory: 448MB = 448MB total

The memory size allocation is also based on the value of the setting gpu_mem in the file /boot/config.txt – in this case 64:

# grep -v "^#" /boot/config.txt |grep -v "^$"
arm_freq=950
gpu_mem=64
core_freq=250
sdram_freq=450
over_voltage=6

Explanation: 512 MB – 64 MB = 448 MB. Under Raspbmc the “excessive” memory is used for the GPU to provide better video playback and “smoother” themes. Depending on your application it might be useful to have more memory. In this case you’ll have to modify the file /boot/config.txt:

...
#gpu_mem_256=128
#gpu_mem_512=256
gpu_mem=196
gpu_mem_256=128
gpu_mem_512=196

It is important that the value gpu_mem is not too low – otherwise 1080p playback might not work as expected. In my setup a value of 196 has become obvious to be a good setting.

Sharing is caring

Leave a Reply