]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
imx: ventana: add mem_mb dynamic env var
authorTim Harvey <tharvey@gateworks.com>
Wed, 8 Apr 2015 19:54:51 +0000 (12:54 -0700)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 12:42:49 +0000 (14:42 +0200)
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>
board/gateworks/gw_ventana/gw_ventana.c

index 2906dccf466ff0d08b4f0e1353fe8b8e6068036e..307ffa583e2be440874fe3fdc32a79e01739058e 100644 (file)
@@ -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);
        }