Raspberry pi and ram split
-
- Offline
- 2 years 3 weeks ago
- 2016-03-05
I successfully installed Alpine on my RaspberryPI.
It is a RasPi B rev1, so it has only 256MB of ram. The default memory split configuration, which Alpine is using, is to give 64MB to the GPU, and 182MB for the CPU.
As I plan to use my RasPi as a headless server, I want to change this split to 16MB for the GPU and 240MB for the CPU.
But when I try to add the option gpu_mem=16 to my config.txt file, as mentionned in the official RasPi config.txt documentation, Alpine doesn't start anymore. In fact, the ACT led is blinking 4 times every few seconds, which means, I guess, that something went wrong.
I also tried to add the option to the userconfig.txt, but then nothing changes and the RAM split remains the same.
This option works perfectly with a raspian or a picore image.
Does anybody have an idea of how I can perform the split change ?
By the way, I don't understand why with 182MB of RAM available, my root partition is only 91MB.
Of course, I'm stuck for hours with this problem, and right after I ask for help in a forum I find the solution ...
I took the fixup*.dat and start*.elf files from a picore image, and replaced the alpine one.
These files seem to be the GPU firmware files.
With that, I could add the gpu_mem=16 option.
But I still have the other problem : why my rootfs size is half the available RAM size ?
How can I make it grow to use most of the RAM like in piCore for example ?
EDIT: The actual fix was to copy fixup_cd.dat and start_cd.elf, which remove some GPU features, useless for headless systems. When adding gpu_mem=16, the bootloader will seek those files instead of the usual fixup.dat and start.elf.
Hello Grumph,
I have the same problem on a Raspberry pi 2. But unfortunately the method you found doesnt help on a RPI2 .
I tried with the original Alpine fixup.bat and start.elf, I also replaced these files with the one of a picore7.0, same result by just adding the fixup_* and start.* files. No way to modify the memory I get from the RPI2. It always stays at 744Mb of ram (total) in Alpine whatever I put in the usercfg for gpu_mem.
As you seem to have spend a lot of time to debug this, can you maybe give me some hints so I can look further on the RPI2 ?
Or maybe does any Alpine Guru have an idea ?
Thanks in advance.
Regards,
Hi nschmerber,
I had the same problem with my RPI3 and the following "solution" also works for the RPI2.
The Problem should be solved in a more general way, but it solves the problem for now.
before
after
script
Regards,
Roger Newman
Thank you roger.newman this works perfectly ! .
Regards,