summaryrefslogtreecommitdiff
path: root/common/bootm_os.c
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2014-12-16 14:07:21 +0100
committerTom Rini <trini@ti.com>2015-01-14 11:37:39 -0500
commit67ddd955fc7a10c3808503a98838a3501ffafece (patch)
tree2b2325015eea70b69dea064c735f68d45111bf3f /common/bootm_os.c
parent9637c4b2dd5e84418f7367e5361ba9ff6726e377 (diff)
downloadu-boot-imx-67ddd955fc7a10c3808503a98838a3501ffafece.zip
u-boot-imx-67ddd955fc7a10c3808503a98838a3501ffafece.tar.gz
u-boot-imx-67ddd955fc7a10c3808503a98838a3501ffafece.tar.bz2
image: bootm: Add OpenRTOS image type
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>
Diffstat (limited to 'common/bootm_os.c')
-rw-r--r--common/bootm_os.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/common/bootm_os.c b/common/bootm_os.c
index 5be4467..72477f0 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -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 */