When we call fdt_chosen in bootm we get a dummy mem reserve added for the ramdisk location before its relocated. We need to delete that mem reserve before we call fdt_initrd() for the final fixup.
Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> --- lib_ppc/bootm.c | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/lib_ppc/bootm.c b/lib_ppc/bootm.c index 348421f..c801021 100644 --- a/lib_ppc/bootm.c +++ b/lib_ppc/bootm.c @@ -180,8 +180,22 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) #if defined(CONFIG_OF_LIBFDT) /* fixup the initrd now that we know where it should be */ - if ((of_flat_tree) && (initrd_start && initrd_end)) + if ((of_flat_tree) && (initrd_start && initrd_end)) { + uint64_t addr, size; + int total = fdt_num_mem_rsv(of_flat_tree); + int j; + + /* The call to fdt_chosen created a dummy mem rsv, delete it */ + for (j = 0; j < total; j++) { + fdt_get_mem_rsv(of_flat_tree, j, &addr, &size); + if (addr == images->rd_start) { + fdt_del_mem_rsv(of_flat_tree, j); + break; + } + } + fdt_initrd(of_flat_tree, initrd_start, initrd_end, 1); + } #endif debug ("## Transferring control to Linux (at address %08lx) ...\n", (ulong)kernel); -- 1.5.5.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot