fdt relocate: have more attention to use a bootmap or not
PATCH 1/1 fdt relocate: have more attention to use a bootmap or not
Platforms with flat device tree support can use a bootmap to relocate the fdt_blob. This is not a must. That's why the relocation function boot_relocate_fdt() should be use only if CONFIG_OF_LIBFDT was defined together with CONFIG_SYS_BOOTMAPSZ (see common/cmd_bootm.c).
On MicroBlaze platforms there is no need to use a bootmap to relocate a fdt blob. So we need a more precise focus on the compilation and usage of boot_relocate_fdt().
In general it is valid to exclude the function boot_relocate_fdt() if the bootmap size CONFIG_SYS_BOOTMAPSZ is not defined.
--- arch/powerpc/lib/bootm.c | 4 ++-- common/image.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)
arch/powerpc/lib/bootm.c +2 -2
@@ -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 ; }
common/image.c +2 -0
@@ -1178,6 +1178,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 +1258,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
Signature · 1 line
1.6.0.4
Wolfgang Denk
AppliedPATCH 1/1 fdt relocate: have more attention to use a bootmap or not
Dear Stephan Linz,
Quoted 9 lines · In message <0ac40268094bc00a447aeb4f5775c670a79868e9.1277481856.git.linz@li-pro…
Platforms with flat device tree support can use a bootmap to relocate the
fdt_blob. This is not a must. That's why the relocation functionboot_relocate_fdt()should be use only ifCONFIG_OF_LIBFDTwas defined together withCONFIG_SYS_BOOTMAPSZ(seecommon/cmd_bootm.c).On MicroBlaze platforms there is no need to use a bootmap to relocate a fdt blob. So we need a more precise focus on the compilation and usage of
boot_relocate_fdt().
Quoted 8 lines
In general it is valid to exclude the function
boot_relocate_fdt()if the bootmap sizeCONFIG_SYS_BOOTMAPSZis not defined.Signed-off-by Stephan Linz <[email protected]>--- arch/powerpc/lib/bootm.c | 4 ++-- common/image.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Extended Epstein-Heisenberg Principle: In an R & D orbit, only 2 of the existing 3 parameters can be defined simultaneously. The parame- ters are: task, time and resources ($).