diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 306412114309fb3dd7528208c5677ef355412fb5..4c3e2fe7956434bb59648492e21c321675c63efe 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -253,7 +253,7 @@ static int boot_body_linux(bootm_headers_t *images) if (ret) return ret; -#if defined(CONFIG_OF_LIBFDT) +#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_SYS_BOOTMAPSZ) ret = boot_relocate_fdt(lmb, bootmap_base, of_flat_tree, &of_size); if (ret) return ret; @@ -292,7 +292,7 @@ static int boot_body_linux(bootm_headers_t *images) if (*initrd_start && *initrd_end) fdt_initrd(*of_flat_tree, *initrd_start, *initrd_end, 1); } -#endif /* CONFIG_OF_LIBFDT */ +#endif /* CONFIG_OF_LIBFDT && CONFIG_SYS_BOOTMAPSZ */ return 0; } diff --git a/common/image.c b/common/image.c index ea5973086140930d9f995924aab60dcd3c319447..fcb938b08e3839d3809e514b1b0188d34690a8a2 100644 --- a/common/image.c +++ b/common/image.c @@ -1184,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) { @@ -1263,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