X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=lib_microblaze%2Fbootm.c;h=e97aae6881e39880079643d23f12bbed760d378c;hb=b3061b40db691245a7bb9a55354b4edacbf3902d;hp=30a03ef35908b2c31000d9c4eeb9dd7166947aa7;hpb=4b7a6dd89633d60dc4b58476d5ce48247f82a3ca;p=u-boot diff --git a/lib_microblaze/bootm.c b/lib_microblaze/bootm.c index 30a03ef359..e97aae6881 100644 --- a/lib_microblaze/bootm.c +++ b/lib_microblaze/bootm.c @@ -32,33 +32,16 @@ DECLARE_GLOBAL_DATA_PTR; -extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); - -void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], - bootm_headers_t *images) +int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) { /* First parameter is mapped to $r5 for kernel boot args */ void (*theKernel) (char *); char *commandline = getenv ("bootargs"); - ulong ep = 0; - /* find kernel entry point */ - if (images->legacy_hdr_valid) { - ep = image_get_ep (&images->legacy_hdr_os_copy); -#if defined(CONFIG_FIT) - } else if (images->fit_uname_os) { - int 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"); - goto error; - } - theKernel = (void (*)(char *))ep; + if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) + return 1; + + theKernel = (void (*)(char *))images->ep; show_boot_progress (15); @@ -67,15 +50,8 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], (ulong) theKernel); #endif - if (!images->autostart) - return ; - theKernel (commandline); /* does not return */ - return; -error: - if (images->autostart) - do_reset (cmdtp, flag, argc, argv); - return; + return 1; }