]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - lib_arm/bootm.c
USB: descriptor handling
[karo-tx-uboot.git] / lib_arm / bootm.c
index 4849c8ab0b512702a2d88f3efc3f63420bae5588..7dbde7df5cebef36dc349d4d3189d111bd940cf6 100644 (file)
@@ -43,9 +43,6 @@ static void setup_memory_tags (bd_t *bd);
 # endif
 static void setup_commandline_tag (bd_t *bd, char *commandline);
 
-#if 0
-static void setup_ramdisk_tag (bd_t *bd);
-#endif
 # ifdef CONFIG_INITRD_TAG
 static void setup_initrd_tag (bd_t *bd, ulong initrd_start,
                              ulong initrd_end);
@@ -59,13 +56,8 @@ 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 verify)
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
 {
-       ulong   initrd_start, initrd_end;
-       ulong   ep = 0;
        bd_t    *bd = gd->bd;
        char    *s;
        int     machid = bd->bi_arch_number;
@@ -75,19 +67,10 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
        char *commandline = getenv ("bootargs");
 #endif
 
-       /* find kernel entry point */
-       if (images->legacy_hdr_valid) {
-               ep = image_get_ep (images->legacy_hdr_os);
-#if defined(CONFIG_FIT)
-       } else if (images->fit_uname_os) {
-               fit_unsupported_reset ("ARM linux bootm");
-               do_reset (cmdtp, flag, argc, argv);
-#endif
-       } else {
-               puts ("Could not find kernel entry point!\n");
-               do_reset (cmdtp, flag, argc, argv);
-       }
-       theKernel = (void (*)(int, int, uint))ep;
+       if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
+               return 1;
+
+       theKernel = (void (*)(int, int, uint))images->ep;
 
        s = getenv ("machid");
        if (s) {
@@ -95,9 +78,6 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
                printf ("Using machid 0x%x from environment\n", machid);
        }
 
-       get_ramdisk (cmdtp, flag, argc, argv, images, verify,
-                       IH_ARCH_ARM, &initrd_start, &initrd_end);
-
        show_boot_progress (15);
 
        debug ("## Transferring control to Linux (at address %08lx) ...\n",
@@ -124,8 +104,8 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
        setup_commandline_tag (bd, commandline);
 #endif
 #ifdef CONFIG_INITRD_TAG
-       if (initrd_start && initrd_end)
-               setup_initrd_tag (bd, initrd_start, initrd_end);
+       if (images->rd_start && images->rd_end)
+               setup_initrd_tag (bd, images->rd_start, images->rd_end);
 #endif
 #if defined (CONFIG_VFD) || defined (CONFIG_LCD)
        setup_videolfb_tag ((gd_t *) gd);
@@ -146,6 +126,9 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
        cleanup_before_linux ();
 
        theKernel (0, machid, bd->bi_boot_params);
+       /* does not return */
+
+       return 1;
 }