X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=lib_mips%2Fbootm.c;h=f813fc583100a9a15a3e1dc6fe1cea21a8d8ef2d;hb=08c5fabe181d663eec0feba5ecd02c0b78934a52;hp=39869c18008bee9d9ce381290bb31b05b0700074;hpb=e18489e8c27e843e337258fb00f2652ff0f43b92;p=u-boot diff --git a/lib_mips/bootm.c b/lib_mips/bootm.c index 39869c1800..f813fc5831 100644 --- a/lib_mips/bootm.c +++ b/lib_mips/bootm.c @@ -53,23 +53,30 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], void (*theKernel) (int, char **, char **, int *); char *commandline = getenv ("bootargs"); char env_buf[12]; + int ret; /* 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) { - fit_unsupported_reset ("MIPS linux bootm"); - do_reset (cmdtp, flag, argc, argv); + ret = fit_image_get_entry (images->fit_hdr_os, + images->fit_noffset_os, &ep); + if (ret) { + puts ("Can't get entry point property!\n"); + goto error; + } #endif } else { puts ("Could not find kernel entry point!\n"); - do_reset (cmdtp, flag, argc, argv); + goto error; } theKernel = (void (*)(int, char **, char **, int *))ep; - get_ramdisk (cmdtp, flag, argc, argv, images, - IH_ARCH_MIPS, &initrd_start, &initrd_end); + ret = boot_get_ramdisk (argc, argv, images, IH_ARCH_MIPS, + &initrd_start, &initrd_end); + if (ret) + goto error; show_boot_progress (15); @@ -113,6 +120,13 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], printf ("\nStarting kernel ...\n\n"); theKernel (linux_argc, linux_argv, linux_env, 0); + /* does not return */ + return; + +error: + if (images->autostart) + do_reset (cmdtp, flag, argc, argv); + return; } static void linux_params_init (ulong start, char *line)