Do the 512MB RPI's have a different board revision?
ie, can you just look at the revision in /proc/cpuinfo
to determine if you have
a 512MB RPi?
Otherwise what's the easiest way to check?
Do the 512MB RPI's have a different board revision?
ie, can you just look at the revision in /proc/cpuinfo
to determine if you have
a 512MB RPi?
Otherwise what's the easiest way to check?
As you said, the cat /proc/cpuinfo | grep Revision
command will give you the board revision. Please note the revision is an hexadecimal value. To display the decimal equivalent, run this command printf '%d\n' 0x#
, where #
is the hexadecimal value displayed with the previous command.
According to the following chart, the codes 13, 14 and 15 stand for the 512 MB board.
Model and revision Decimal code(s) Hexadecimal equivalent
Model B Revision 1.0 2 0x2
Model B Revision 1.0 + ECN0001 (no fuses, D14 removed) 3 0x3
Model B Revision 2.0 4, 5, 6 0x4, 0x5, 0x6
Model B Revision 2.0 (512 MB) 13, 14, 15 0xd, 0xe, 0xf
/proc/cpuinfo
says Revision : 0005
. I'm booting from an image in 2012-09-18-wheezy-raspbian.zip
from http://www.raspberrypi.org/downloads
– RedGrittyBrick
Oct 21 '12 at 16:20
cat /proc/cpuinfo
returns the revision 5. Isn't the revision hard-written in the SoC? Does Raspian need an update to "recognize" 512MB RAM version?
– Morgan Courbet
Oct 21 '12 at 16:26
Revision: 000f
. Probably a recent dist-upgrade
.
– Morgan Courbet
Nov 21 '12 at 13:18
In a modern operating system such as Linux, what you really need to check is how much memory has been made available for general purpose usage; that may be less than the total physically installed. So for example, a 512 MB pi running an installation intended for a 256 MB one would not make that memory available to you.
Then, on the pi there is the further issue of the CPU vs. GPU memory split - something substantially less than the present memory would even be available for the use of the ARM CPU by the time Linux boots, since the GPU bootup process has already claimed a substantial amount as determined the start.elf file used.
To answer the direct question, the first line of /proc/meminfo
or the free
command should tell you how much physical memory is available to Linux overall.
How much memory is available to a given application is again more complicated - the kernel, buffers, and other applications will claim memory. And while perhaps not commonly used with an SD card as the only "disk", a swap partition could make the available virtual memory exceed the physical RAM.