]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/bootm_os.c
net: fec_mxc: use some more appropriate return values
[karo-tx-uboot.git] / common / bootm_os.c
index f7769ac853b7a49ed142316fd803c23f24425b8a..72477f0b810b154c58fb7e581e89c905cc95cd06 100644 (file)
@@ -404,6 +404,32 @@ static int do_bootm_integrity(int flag, int argc, char * const argv[],
 }
 #endif
 
+#ifdef CONFIG_BOOTM_OPENRTOS
+static int do_bootm_openrtos(int flag, int argc, char * const argv[],
+                          bootm_headers_t *images)
+{
+       void (*entry_point)(void);
+
+       if (flag != BOOTM_STATE_OS_GO)
+               return 0;
+
+       entry_point = (void (*)(void))images->ep;
+
+       printf("## Transferring control to OpenRTOS (at address %08lx) ...\n",
+               (ulong)entry_point);
+
+       bootstage_mark(BOOTSTAGE_ID_RUN_OS);
+
+       /*
+        * OpenRTOS Parameters:
+        *   None
+        */
+       (*entry_point)();
+
+       return 1;
+}
+#endif
+
 static boot_os_fn *boot_os[] = {
        [IH_OS_U_BOOT] = do_bootm_standalone,
 #ifdef CONFIG_BOOTM_LINUX
@@ -434,14 +460,16 @@ static boot_os_fn *boot_os[] = {
 #ifdef CONFIG_INTEGRITY
        [IH_OS_INTEGRITY] = do_bootm_integrity,
 #endif
+#ifdef CONFIG_BOOTM_OPENRTOS
+       [IH_OS_OPENRTOS] = do_bootm_openrtos,
+#endif
 };
 
 /* Allow for arch specific config before we boot */
-static void __arch_preboot_os(void)
+__weak void arch_preboot_os(void)
 {
        /* please define platform specific arch_preboot_os() */
 }
-void arch_preboot_os(void) __attribute__((weak, alias("__arch_preboot_os")));
 
 int boot_selected_os(int argc, char * const argv[], int state,
                     bootm_headers_t *images, boot_os_fn *boot_fn)