X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=lib_i386%2Fbootm.c;h=f96d7bd6daa329fb9fe8f9d663306f60ba3d97e9;hb=d91803826985bfdf151eed66543ce3b1a301682f;hp=107ebaaa67fe7262342cfbea61ff541a40931765;hpb=27f33e9f45ef7f9685cbdc65066a1828e85dde4f;p=u-boot diff --git a/lib_i386/bootm.c b/lib_i386/bootm.c index 107ebaaa67..f96d7bd6da 100644 --- a/lib_i386/bootm.c +++ b/lib_i386/bootm.c @@ -24,31 +24,24 @@ #include #include #include -#include +#include #include #include /*cmd_boot.c*/ -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) { void *base_ptr; ulong os_data, os_len; - ulong initrd_start, initrd_end; - ulong ep; image_header_t *hdr; - int ret; + #if defined(CONFIG_FIT) const void *data; size_t len; #endif - ret = boot_get_ramdisk (argc, argv, images, IH_ARCH_I386, - &initrd_start, &initrd_end); - if (ret) - goto error; + if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) + return 1; if (images->legacy_hdr_valid) { hdr = images->legacy_hdr_os; @@ -77,7 +70,7 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], } base_ptr = load_zimage ((void*)os_data, os_len, - initrd_start, initrd_end - initrd_start, 0); + images->rd_start, images->rd_end - images->rd_start, 0); if (NULL == base_ptr) { printf ("## Kernel loading failed ...\n"); @@ -85,9 +78,6 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], } - if (!images->autostart) - return ; - #ifdef DEBUG printf ("## Transferring control to Linux (at address %08x) ...\n", (u32)base_ptr); @@ -98,10 +88,7 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], boot_zimage(base_ptr); /* does not return */ - return; error: - if (images->autostart) - do_reset (cmdtp, flag, argc, argv); - return; + return 1; }