Hi,
Am 26.06.2019 um 16:55 schrieb aTc atc@k-n-p.org:
On 6/26/19 4:49 PM, H. Nikolaus Schaller wrote:
Am 26.06.2019 um 16:28 schrieb aTc atc@k-n-p.org:
Is there a more official method of detecting if a pyra is a 2 or 4gb model from linux, other than just looking at /proc/meminfo MemTotal ?
Yes, that is the official way. It is robust and independent of specific hardware. Like on x86 systems where you can insert new memory modules and the new memory is magically found. But which problem do you want to solve by this detection from user-space? The only area where it seems to make sense is for system information which reports available and used memory size or for Installers.
I was working on the emmc installer script, and want to automatically select the right bootloader.
Ah, ok. I see. Yes, that is one of the very specific areas where it is required (Installer).
Although I think the plan was to eventually have a single uboot version that handles both ?
Well, it is even only the SPL which differs and does different setup of the EMIF. U-Boot is the same for both.
Hm. There is some additional complexity. You will only see more than 2GB MemTotal if an LPAE kernel is running. If you use the correct SPL for 4GB and run a non-LPAE kernel it will simply ignore the additional RAM.
Ok, this case would indeed be more precisely described by the Pyra model.
But what stops us from copying the SPL from the installation SD card to the boot partition of eMMC? If it can boot from SD it should be the right one...
Just some idea.