X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=lib_microblaze%2Fbootm.c;h=30a03ef35908b2c31000d9c4eeb9dd7166947aa7;hb=c14eefcc48212af2f3314809605698dd8393a90a;hp=1f3e77707ac45ff5c6efd8df447ef5c60cc0af1d;hpb=5ad03eb3854c162684222a718b44c0716ea0db03;p=u-boot diff --git a/lib_microblaze/bootm.c b/lib_microblaze/bootm.c index 1f3e77707a..30a03ef359 100644 --- a/lib_microblaze/bootm.c +++ b/lib_microblaze/bootm.c @@ -32,19 +32,33 @@ 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[], - image_header_t *hdr, int verify) + bootm_headers_t *images) { - ulong initrd_start, initrd_end; - /* First parameter is mapped to $r5 for kernel boot args */ - void (*theKernel) (char *); - char *commandline = getenv ("bootargs"); - - theKernel = (void (*)(char *))image_get_ep (hdr); + void (*theKernel) (char *); + char *commandline = getenv ("bootargs"); + ulong ep = 0; - get_ramdisk (cmdtp, flag, argc, argv, hdr, verify, - IH_ARCH_MICROBLAZE, &initrd_start, &initrd_end); + /* 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; show_boot_progress (15); @@ -53,5 +67,15 @@ 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; }