|
|
|
@ -54,7 +54,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], |
|
|
|
|
char *commandline = getenv ("bootargs"); |
|
|
|
|
char env_buf[12]; |
|
|
|
|
int ret; |
|
|
|
|
const char *cp; |
|
|
|
|
char *cp; |
|
|
|
|
|
|
|
|
|
/* find kernel entry point */ |
|
|
|
|
if (images->legacy_hdr_valid) { |
|
|
|
@ -89,15 +89,11 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], |
|
|
|
|
linux_params_init (UNCACHED_SDRAM (gd->bd->bi_boot_params), commandline); |
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_MEMSIZE_IN_BYTES |
|
|
|
|
sprintf (env_buf, "%lu", gd->ram_size); |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
printf ("## Giving linux memsize in bytes, %lu\n", gd->ram_size); |
|
|
|
|
#endif |
|
|
|
|
sprintf (env_buf, "%lu", (ulong)gd->ram_size); |
|
|
|
|
debug ("## Giving linux memsize in bytes, %lu\n", (ulong)gd->ram_size); |
|
|
|
|
#else |
|
|
|
|
sprintf (env_buf, "%lu", gd->ram_size >> 20); |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
printf ("## Giving linux memsize in MB, %lu\n", gd->ram_size >> 20); |
|
|
|
|
#endif |
|
|
|
|
sprintf (env_buf, "%lu", (ulong)(gd->ram_size >> 20)); |
|
|
|
|
debug ("## Giving linux memsize in MB, %lu\n", (ulong)(gd->ram_size >> 20)); |
|
|
|
|
#endif /* CONFIG_MEMSIZE_IN_BYTES */ |
|
|
|
|
|
|
|
|
|
linux_env_set ("memsize", env_buf); |
|
|
|
|