mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 06:00:43 +00:00
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>
This commit is contained in:
parent
16e369f5ec
commit
e7329174c8
1 changed files with 4 additions and 0 deletions
|
@ -1498,6 +1498,10 @@ int misc_init_r(void)
|
||||||
/* board serial-number */
|
/* board serial-number */
|
||||||
sprintf(str, "%6d", info->serial);
|
sprintf(str, "%6d", info->serial);
|
||||||
setenv("serial#", str);
|
setenv("serial#", str);
|
||||||
|
|
||||||
|
/* memory MB */
|
||||||
|
sprintf(str, "%d", (int) (gd->ram_size >> 20));
|
||||||
|
setenv("mem_mb", str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue