diff options
Diffstat (limited to 'common/image.c')
-rw-r--r-- | common/image.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/common/image.c b/common/image.c index 6d8833e..fcb938b 100644 --- a/common/image.c +++ b/common/image.c @@ -433,17 +433,23 @@ ulong getenv_bootm_low(void) phys_size_t getenv_bootm_size(void) { + phys_size_t tmp; char *s = getenv ("bootm_size"); if (s) { - phys_size_t tmp; tmp = (phys_size_t)simple_strtoull (s, NULL, 16); return tmp; } + s = getenv("bootm_low"); + if (s) + tmp = (phys_size_t)simple_strtoull (s, NULL, 16); + else + tmp = 0; + #if defined(CONFIG_ARM) - return gd->bd->bi_dram[0].size; + return gd->bd->bi_dram[0].size - tmp; #else - return gd->bd->bi_memsize; + return gd->bd->bi_memsize - tmp; #endif } @@ -1178,6 +1184,7 @@ static int fit_check_fdt (const void *fit, int fdt_noffset, int verify) * 0 - success * 1 - failure */ +#if defined(CONFIG_SYS_BOOTMAPSZ) int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base, char **of_flat_tree, ulong *of_size) { @@ -1257,6 +1264,7 @@ int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base, error: return 1; } +#endif /* CONFIG_SYS_BOOTMAPSZ */ /** * boot_get_fdt - main fdt handling routine |