summaryrefslogtreecommitdiff
path: root/board/gateworks
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2015-04-08 12:54:51 -0700
committerStefano Babic <sbabic@denx.de>2015-04-22 14:39:10 +0200
commite7329174c86a12f35f18f203e79481ad7f0b7f15 (patch)
tree7872549d47873120bde79f52c0e4afd42c1ee63d /board/gateworks
parent16e369f5ec2cce539f89e76e1d8a1010d2856dc0 (diff)
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 <tharvey@gateworks.com>
Diffstat (limited to 'board/gateworks')
-rw-r--r--board/gateworks/gw_ventana/gw_ventana.c4
1 files changed, 4 insertions, 0 deletions
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);
}