Merge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx
[platform/kernel/u-boot.git] / lib_ppc / bootm.c
index 2901607..9194fd8 100644 (file)
@@ -146,7 +146,7 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
 
        /* find kernel entry point */
        if (images->legacy_hdr_valid) {
-               ep = image_get_ep (images->legacy_hdr_os);
+               ep = image_get_ep (&images->legacy_hdr_os_copy);
 #if defined(CONFIG_FIT)
        } else if (images->fit_uname_os) {
                ret = fit_image_get_entry (images->fit_hdr_os,
@@ -626,9 +626,9 @@ static int boot_get_fdt (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
                                /*
                                 * FDT blob
                                 */
+                               fdt_blob = (char *)fdt_addr;
                                debug ("*  fdt: raw FDT blob\n");
                                printf ("## Flattened Device Tree blob at %08lx\n", fdt_blob);
-                               fdt_blob = (char *)fdt_addr;
                        }
                        break;
                default:
@@ -639,7 +639,7 @@ static int boot_get_fdt (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
                printf ("   Booting using the fdt blob at 0x%x\n", fdt_blob);
 
        } else if (images->legacy_hdr_valid &&
-                       image_check_type (images->legacy_hdr_os, IH_TYPE_MULTI)) {
+                       image_check_type (&images->legacy_hdr_os_copy, IH_TYPE_MULTI)) {
 
                ulong fdt_data, fdt_len;
 
@@ -667,9 +667,8 @@ static int boot_get_fdt (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
                                goto error;
                        }
                } else {
-                       fdt_error ("Did not find a Flattened Device Tree "
-                               "in a legacy multi-component image");
-                       goto error;
+                       debug ("## No Flattened Device Tree\n");
+                       return 0;
                }
        } else {
                debug ("## No Flattened Device Tree\n");