]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
image: bootm: Add OpenRTOS image type
authorMarek Vasut <marex@denx.de>
Tue, 16 Dec 2014 13:07:21 +0000 (14:07 +0100)
committerTom Rini <trini@ti.com>
Wed, 14 Jan 2015 16:37:39 +0000 (11:37 -0500)
Add separate image type for the Wittenstein OpenRTOS .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/bootm_os.c
common/image.c
include/image.h

index 5be4467a1c2618d4552e1cbbcf715c6885aa2eb6..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,6 +460,9 @@ 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 */
index e691a517894c32d15f5c321711c4f4ddd919f3bd..ad7a46d08d827fb18f7005132342d19c7d97cf5d 100644 (file)
@@ -120,6 +120,10 @@ static const table_entry_t uimage_os[] = {
        {       IH_OS_SOLARIS,  "solaris",      "Solaris",              },
        {       IH_OS_SVR4,     "svr4",         "SVR4",                 },
 #endif
+#if defined(CONFIG_BOOTM_OPENRTOS) || defined(USE_HOSTCC)
+       {       IH_OS_OPENRTOS, "openrtos",     "OpenRTOS",             },
+#endif
+
        {       -1,             "",             "",                     },
 };
 
index af30d601585e3bf0124b590a41a3cf863e494a31..ee3afe35670a9b460921ba0b2f5218df5a76b0c0 100644 (file)
@@ -152,6 +152,7 @@ struct lmb;
 #define IH_OS_INTEGRITY                21      /* INTEGRITY    */
 #define IH_OS_OSE              22      /* OSE          */
 #define IH_OS_PLAN9            23      /* Plan 9       */
+#define IH_OS_OPENRTOS         24      /* OpenRTOS     */
 
 /*
  * CPU Architecture Codes (supported by Linux)