From: Tim Harvey Date: Wed, 8 Apr 2015 19:54:51 +0000 (-0700) Subject: imx: ventana: add mem_mb dynamic env var X-Git-Tag: v2015.07-rc1~63^2~25 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e7329174c86a12f35f18f203e79481ad7f0b7f15;p=u-boot imx: ventana: add mem_mb dynamic env var Certain OS bootscripts need to know how much memory a board has to adjust kernel parameters (namely Android). This allows those boards to determine mem size in MB. Signed-off-by: Tim Harvey --- diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index 2906dccf46..307ffa583e 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -1498,6 +1498,10 @@ int misc_init_r(void) /* board serial-number */ sprintf(str, "%6d", info->serial); setenv("serial#", str); + + /* memory MB */ + sprintf(str, "%d", (int) (gd->ram_size >> 20)); + setenv("mem_mb", str); }