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:

1$ dmesg | grep -i "MB total"
2[    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:

CaptionMemory size
K4P4G324EB-AGC1512 MB
K4P2G324ED-AGC1256 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:

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

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

1$ dmesg | grep -i "MB total"
2[    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:

1# grep -v "^#" /boot/config.txt |grep -v "^$"
2arm_freq=950
3gpu_mem=64
4core_freq=250
5sdram_freq=450
6over_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:

1...
2#gpu_mem_256=128
3#gpu_mem_512=256
4gpu_mem=196
5gpu_mem_256=128
6gpu_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.

Translations: