]> git.sur5r.net Git - u-boot/blobdiff - lib_arm/bootm.c
Merge branch 'master' of git://git.denx.de/u-boot-arm
[u-boot] / lib_arm / bootm.c
index f9f702fff75db015fe98677e929c710f5a9b490d..128b7e313cdfa6a11719716726dc6956ad5dd43b 100644 (file)
@@ -24,7 +24,7 @@
 #include <common.h>
 #include <command.h>
 #include <image.h>
-#include <zlib.h>
+#include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -56,21 +56,20 @@ static void setup_videolfb_tag (gd_t *gd);
 static struct tag *params;
 #endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */
 
-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)
 {
        bd_t    *bd = gd->bd;
        char    *s;
        int     machid = bd->bi_arch_number;
        void    (*theKernel)(int zero, int arch, uint params);
-       int     ret;
 
 #ifdef CONFIG_CMDLINE_TAG
        char *commandline = getenv ("bootargs");
 #endif
 
+       if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
+               return 1;
+
        theKernel = (void (*)(int, int, uint))images->ep;
 
        s = getenv ("machid");
@@ -128,11 +127,8 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
 
        theKernel (0, machid, bd->bi_boot_params);
        /* does not return */
-       return;
 
-error:
-       do_reset (cmdtp, flag, argc, argv);
-       return;
+       return 1;
 }