summaryrefslogtreecommitdiff
path: root/lib_nios2
diff options
context:
space:
mode:
Diffstat (limited to 'lib_nios2')
-rw-r--r--lib_nios2/bootm.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/lib_nios2/bootm.c b/lib_nios2/bootm.c
index 4b940cb..0c89e96 100644
--- a/lib_nios2/bootm.c
+++ b/lib_nios2/bootm.c
@@ -37,12 +37,16 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
ep = image_get_ep (images->legacy_hdr_os);
#if defined(CONFIG_FIT)
} else if (images->fit_uname_os) {
- fit_unsupported_reset ("NIOS2 linux bootm");
- do_reset (cmdtp, flag, argc, argv);
+ 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");
- do_reset (cmdtp, flag, argc, argv);
+ goto error;
}
void (*kernel)(void) = (void (*)(void))ep;
@@ -53,4 +57,11 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
* needs to be called ;-)
*/
kernel ();
+ /* does not return */
+ return;
+
+error:
+ if (images->autostart)
+ do_reset (cmdtp, flag, argc, argv);
+ return;
}