droorzn
Posts: 9
Joined: Sat Oct 20, 2012 3:37 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Sat Oct 20, 2012 3:54 pm

[quote="dom"]Updated firmware pushed:
Removed plethora of start.elf files.
Now uses start.elf and fixup.dat.
Add config.txt parameter gpu_mem to select GPU mem and ARM gets the remainder. E.g.
[code]gpu_mem=64[/code]
Should handle 256M and 512M parts. The start_cd.elf and fixup_cd.dat will be used when gpu_mem=16.
loader.bin is no longer needed.
I've also switched to compressed kernel images.

Unfortunately rpi-update doesn't understand this yet, so after running rpi-update, run
[code]sudo sh -c 'cp /root/.rpi-firmware/* /boot'[/code]
and then reboot. [edit: corrected]

Feel free to:
[code]sudo rm /boot/arm*_start.elf[/code][/quote]

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6505
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Test Whether Raspberry Pi Has 512MB RAM

Sat Oct 20, 2012 4:26 pm

droorzn wrote: 1. What the differences of start.elf and fixup.dat with start_cd.elf and fixup_cd.dat?
2. What is this code means?
3. What is "*" in arm*_start.elf? in my SD card there are arm_128_start.elf,arm_192_start.elf,arm_224_start.elf and arm_240_start.elf?
1. The latter are cutdown versions without opengles/openmax/openvg/codec etc built in. They are used when gpu_mem=16.
2. copies files in /root/.rpi-firmware to /boot as root user.
3. "*" is a wildcard. If you just type it in, it will delete all of: arm_128_start.elf,arm_192_start.elf,arm_224_start.elf and arm_240_start.elf.

If you wait a couple of days there will be a blog post, and easier ways of doing this - this is really for testers at the moment.

W. H. Heydt
Posts: 16179
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Test Whether Raspberry Pi Has 512MB RAM

Sat Oct 20, 2012 4:54 pm

dom wrote: 1. The latter are cutdown versions without opengles/openmax/openvg/codec etc built in. They are used when gpu_mem=16.
Since there was a post noting that the gpu_mem resolution really is 1MB, is the 16MB graphics the actual value to use the smaller footprint files, or is it, say, anything under 32MB?

Or to put in another way....what is the threshold below which the smaller files would be triggered?

droorzn
Posts: 9
Joined: Sat Oct 20, 2012 3:37 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Sat Oct 20, 2012 6:54 pm

2 More:
1. Can i push the latest firmware by downloading from https://github.com/raspberrypi/firmware ... aster/boot and copying to my SD Card with Windows PC ( I only use drag and drop)
2. How do i check my memory split is already 512MB memory split? when i run rpi-update it show my memory is 240/16 and error code arm240.elf is not found

davedriver
Posts: 2
Joined: Sat Oct 20, 2012 6:50 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Sat Oct 20, 2012 6:57 pm

The new firmware isn't working correctly for me on my 512MB Pi. With gpu_mem=32, I only have 256MB of ARM memory available. free reports this as

Code: Select all

             total       used       free     shared    buffers     cached
Mem:        255356     184064      71292          0      43360      58912
This seems to be the same for any value of gpu_mem less than 256.

It seems to work OK on my 256MB Pi, showing lower amounts of memory available.

Any ideas?

droorzn
Posts: 9
Joined: Sat Oct 20, 2012 3:37 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Sat Oct 20, 2012 7:00 pm

dom wrote: 1. The latter are cutdown versions without opengles/openmax/openvg/codec etc built in. They are used when gpu_mem=16.
2. copies files in /root/.rpi-firmware to /boot as root user.
3. "*" is a wildcard. If you just type it in, it will delete all of: arm_128_start.elf,arm_192_start.elf,arm_224_start.elf and arm_240_start.elf.

If you wait a couple of days there will be a blog post, and easier ways of doing this - this is really for testers at the moment.
number 2, only copies files? where the destination?
Easier way don't help me understanding this.
I just want to learn more, thanks for your answer. :D

droorzn
Posts: 9
Joined: Sat Oct 20, 2012 3:37 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Sat Oct 20, 2012 7:14 pm

Okay, i'm checking my memory split with this

Code: Select all

 cat /proc/meminfo 
from one of your post dom
and the output

Code: Select all

MemTotal : 448996KB
The number higher than 512-64=448 thus lower than 512-16=496
Is this means my memory split is 496/16MB
How do I change that for different split?
I have no idea cause i write

Code: Select all

gpu_mem=64 

in my config,txt,

milhouse
Posts: 642
Joined: Mon Jan 16, 2012 12:59 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Sat Oct 20, 2012 7:16 pm

Edit config.txt and set gpu_mem to whatever amount of memory (in megabytes) that you want allocated to the GPU - the remainder will be allocated to the ARM (system). So set gpu_mem=16 if you only want 16MB GPU RAM, and the maximum amount of system memory for applications.

User avatar
dliloch
Posts: 173
Joined: Wed Jun 27, 2012 6:28 pm
Location: cleveland, ohio usa

Re: Test Whether Raspberry Pi Has 512MB RAM

Sat Oct 20, 2012 7:30 pm

not a big deal but with gpu_mem_256=32
my omxplayer will crash .. when I go to 64 all is ok ... this is
reproducible consistently @firmware 250 playing my cravendale cats video.mp4

User avatar
Dweeber
Posts: 606
Joined: Fri Aug 17, 2012 3:35 am
Location: Mesa, AZ

Re: Test Whether Raspberry Pi Has 512MB RAM

Sun Oct 21, 2012 1:42 am

Nice update... Just updated my master image and rolled it out to my current RPi's... including the new 512mb one.
Dweeber A.K.A. Kevin...
My RPI Info Pages including Current Setup - http://rpi.tnet.com

notarat
Posts: 106
Joined: Wed Sep 12, 2012 12:32 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Sun Oct 21, 2012 4:30 am

I tried the following steps on my new 512MB Pi with newly-created Wheezy SD

sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
(oops. needed to install that, so I did)
sudo rpi-update completed with no errors

cd /boot
sudo nano config.txt
# Following line sets GPU Mem value to 256
gpu_mem=256
ctrl-o
ctrl-x

Reboot
cat /proc/meminfo shows 128MB

Something's not right...

User avatar
Dweeber
Posts: 606
Joined: Fri Aug 17, 2012 3:35 am
Location: Mesa, AZ

Re: Test Whether Raspberry Pi Has 512MB RAM

Sun Oct 21, 2012 5:32 am

notarat wrote: Something's not right...
I did the rpi-update first...
Then the apt-get update/upgrade

Then both... to get the changes where they need to be (rpi-update doesn't do this yet)

Code: Select all

sudo sh -c 'cp /root/.rpi-firmware/* /boot'

Code: Select all

sudo rm /boot/arm*_start.elf
Then Edited the /boot/config.txt (which you have already done)
Then reboot.
Dweeber A.K.A. Kevin...
My RPI Info Pages including Current Setup - http://rpi.tnet.com

davedriver
Posts: 2
Joined: Sat Oct 20, 2012 6:50 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Sun Oct 21, 2012 11:53 am

davedriver wrote:The new firmware isn't working correctly for me on my 512MB Pi.
Answering my own question, the problem wasn't the firmware, but my kernel. I am still not sure what kernel parameter was limiting the memory available, but I have now updated the sources to 3.2.27 and rebuilt, and now it shows the correct amount of ARM RAM.

So next I need to go through the kernel again and strip out all the bloat.

User avatar
dliloch
Posts: 173
Joined: Wed Jun 27, 2012 6:28 pm
Location: cleveland, ohio usa

Re: Test Whether Raspberry Pi Has 512MB RAM

Sun Oct 21, 2012 11:56 am

you used gpu_mem=256
don't you have to use gpu_mem_512=256
maybe it just ignored your statement?

milhouse
Posts: 642
Joined: Mon Jan 16, 2012 12:59 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Sun Oct 21, 2012 12:01 pm

dliloch wrote:you used gpu_mem=256
don't you have to use gpu_mem_512=256
maybe it just ignored your statement?
gpu_mem should work for both models, you only need gpu_mem_512 (or gpu_mem_256) if you want to set a gpu memory allocation specific to the respective model.

User avatar
dliloch
Posts: 173
Joined: Wed Jun 27, 2012 6:28 pm
Location: cleveland, ohio usa

Re: Test Whether Raspberry Pi Has 512MB RAM

Sun Oct 21, 2012 12:06 pm

thanks.. you have quite a setup .. I went to your website.. I see you use omxplayer..
did you try it with gpu set to 32mb... it crashes when I set it that low ..
also I associated omxplayer with mp4 and flv files so I can just click on them when under lxde...
however I don't seem to have key command control then...

LenReinhart
Posts: 33
Joined: Fri Sep 07, 2012 5:14 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Sun Oct 21, 2012 6:31 pm

The instructions work for me. I now have a 512MB running with 64MB for the gpu.

Eclipse java running the image analysis example (1600x1200 24bit image):

'top' shows:

KiB Mem: 448996 total, 437056 used, 11940 free, 10768 buffers
KiB Swap: 102396 total, 0 used, 102396 free, 115260 cached

Some of the examples did not run with the 256MB RPi, they run now.

User avatar
dliloch
Posts: 173
Joined: Wed Jun 27, 2012 6:28 pm
Location: cleveland, ohio usa

Re: Test Whether Raspberry Pi Has 512MB RAM

Sun Oct 21, 2012 7:52 pm

on my 512 board with 32 for gpu -- omxplayer only does audio but does not
crash system any longer.. @64mb all is well .. the overclock is still dodgy ..
I really thought it was working great then file corruption .. fortunately fsck worked
for me .. this is on the firmware #250 as of today 14a55da ...

LenReinhart
Posts: 33
Joined: Fri Sep 07, 2012 5:14 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Sun Oct 21, 2012 8:07 pm

I am using the overclock with the following:

arm_freq=1000
sdram_freq=500
qpu_freq=300
core_freq=500
force_turbo=0

over_voltages=6

It has been running for quite some time today and the temp is 44. It gets up to 52 under load. I have a TO-220 heat sink on the memory chip. The SD card is a SanDisk Ultra 10, 32GB. I have been running the overclock as above since turbo first came out, first with my 256MB and now with the 512MB and todate had no memory corruption event. I have the little read out, that when hovered over, shows the speed, so I watch it shift back and forth from 700MHz to 1000MHz.

User avatar
jojopi
Posts: 3737
Joined: Tue Oct 11, 2011 8:38 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Sun Oct 21, 2012 8:17 pm

W. H. Heydt wrote:Since there was a post noting that the gpu_mem resolution really is 1MB, is the 16MB graphics the actual value to use the smaller footprint files, or is it, say, anything under 32MB?

Or to put in another way....what is the threshold below which the smaller files would be triggered?
I was curious about this, and what fixup_cd is for, also.

It seems with the current implementation that gpu_ram=15 boots the _cd but does not attempt to cut its ram any further below 16. gpu_ram=17 fails to boot, suggesting it is trying to restrict the full start.elf. gpu_ram=31 works, using start.elf, but this is not very useful because it is already below the level where the gpu can do serious graphics acceleration. (So I still wonder what fixup_cd.dat is for.)

Given that there are already values that fail to boot, it might make more sense to allow gpu_ram<16 to interpolate start_cd.elf (which might work for very small framebuffers), and to set the threshold somewhere between 16 and 32.

Regardless, this is a very elegant hack, especially compared to the previous system of pre-boot fixed allocations. I actually prefer this to true dynamic allocation. So thanks to Dom and Eben.

jaromanda
Posts: 93
Joined: Wed Sep 12, 2012 12:33 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Mon Oct 22, 2012 12:55 am

One question about this new world order of firmware

How does this change the diagnostic flashes of the "OK/ACT" LED?

I was getting 3 flashes - according to wiki, this means missing loader.bin ... of course it's missing, it's not needed any more!!

Perhaps someone who:
a) knows what the flashes mean now; and
b) has access to the wiki
could update it, for completeness
I now own 2 RPi - does that mean I own a circumference?

notarat
Posts: 106
Joined: Wed Sep 12, 2012 12:32 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Mon Oct 22, 2012 3:11 am

Dweeber wrote:
notarat wrote: Something's not right...
I did the rpi-update first...
Then the apt-get update/upgrade

Then both... to get the changes where they need to be (rpi-update doesn't do this yet)

Code: Select all

sudo sh -c 'cp /root/.rpi-firmware/* /boot'

Code: Select all

sudo rm /boot/arm*_start.elf
Then Edited the /boot/config.txt (which you have already done)
Then reboot.
create new installation on spare SD
boot
change the following in raspi-config
·128mb split
·timezone set to my locale

Code: Select all

sudo apt-get update
sudo apt-get install git (Can't run rpi-update without it)
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update
sudo chmod +x /usr/bin/rpi-update
sudo rpi-update
completes without error

Code: Select all

sudo apt-get upgrade
cd /boot
sudo nano config.txt
add "gpu_mem_512=256"
save & exit
sudo reboot

log in

top still shows 256MB total

something still not right...

edited to add that I "did" do both steps below in the proper sequence...I just left them off the post when I copied and pasted the code..

Code: Select all

    sudo sh -c 'cp /root/.rpi-firmware/* /boot'
    sudo rm /boot/arm*_start.elf

jaromanda
Posts: 93
Joined: Wed Sep 12, 2012 12:33 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Mon Oct 22, 2012 3:26 am

notarat wrote:add "gpu_mem_512=256"
save & exit
sudo reboot

log in

top still shows 256MB total

something still not right...
so ... you have a 512MB Pi
you've told it, via config, to use a 256MB for the GPU (gpu_mem_512=256)
which means ... there's 512 - 256 = 256MB for the CPU
and top is telling you there's 256MB total (CPU) ram ...

where's the problem?


NOTE: top hasn't changed ... it's always told you how much CPU memory you have
I now own 2 RPi - does that mean I own a circumference?

notarat
Posts: 106
Joined: Wed Sep 12, 2012 12:32 pm

Re: Test Whether Raspberry Pi Has 512MB RAM

Mon Oct 22, 2012 4:15 am

jaromanda wrote:
notarat wrote:add "gpu_mem_512=256"
save & exit
sudo reboot

log in

top still shows 256MB total

something still not right...
so ... you have a 512MB Pi
you've told it, via config, to use a 256MB for the GPU (gpu_mem_512=256)
which means ... there's 512 - 256 = 256MB for the CPU
and top is telling you there's 256MB total (CPU) ram ...

where's the problem?


NOTE: top hasn't changed ... it's always told you how much CPU memory you have

Okay. I was sure top would report total ram. Thanks for confirmation that it's working as intended. :D

Just to confirm, I changed memory split to 384/128 and top reports
KiB Mem: 383972 total, 50200 used, 333772 free, 8012 buffers
KiB Swap: 102396 total, 0 used, 102396 free, 23884 cached


so...looks like there wasn't a problem with the second time I went through the process. (I left out a step my first time through, which is why I encountered the problem...)

Looks like my steps to build my other 512MB pi will be:

create new installation on spare SD
boot
change the following in raspi-config
· Resize partition (16GB SD Card)
· change password
· 128mb split
· timezone set to my locale
· update raspi-config
sudo reboot (to Resize partition)
sudo apt-get update
sudo apt-get install git (Can't run rpi-update without it)
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update
sudo chmod +x /usr/bin/rpi-update
sudo rpi-update
sudo apt-get upgrade
sudo sh -c 'cp /root/.rpi-firmware/* /boot'
cp: omitting directory `/root/.rpi-firmware/modules'
cp: omitting directory `/root/.rpi-firmware/vc'
sudo rm /boot/arm*_start.elf
cd /boot
sudo nano config.txt
Added "gpu_mem_512=XXX"
Added License Keys for MPEG & VC-1
Add overclocking settings (850/450/450)
Ctrl=O then Ctrl-X
sudo reboot

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6505
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Test Whether Raspberry Pi Has 512MB RAM

Mon Oct 22, 2012 7:58 pm

Hexxeh has updated rpi-update, so no need for the manual copy step afterwards.

Return to “General discussion”