[U-Boot] way to determine board dram size in boot script?

Tim Harvey tharvey at gateworks.com
Wed Jan 7 15:16:55 CET 2015


Is there a recommended way to determine a board's dram size in a boot script?

I need to pass in some specific kernel parameters for a GPU driver
memory allocation on boards below a certain amount of memory. I can
always do a:

char str[6];
sprintf(str, "%d", (int) (gd->ram_size >> 20));
setenv("mem_mb", str);

But I was hoping there was something already out there that I didn't know about.

Regards,

Tim


More information about the U-Boot mailing list