Hello Marek,
On 16-12-14 14:07, Marek Vasut wrote:
Add separate image type for the Wittenstein OpenRTOS .
Signed-off-by: Marek Vasut <ma...@denx.de>
Cc: Simon Glass <s...@chromium.org>
Cc: Tom Rini <tr...@ti.com>
---
common/bootm_os.c | 29 +++++++++++++++++++++++++++++
common/image.c | 4 ++++
include/image.h | 1 +
3 files changed, 34 insertions(+)
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);
You might consider adding a prepare function here, similar to e.g.
boot_prep_vxworks(images) which eventually calls cleanup_before_linux(),
so you end up jumping into the image with caches flushed and disabled
(at least on ARM). I don't know if this is needed in your case though...
+
+ /*
+ * OpenRTOS Parameters:
+ * None
+ */
+ (*entry_point)();
+
+ return 1;
+}
+#endif
Regards,
Jeroen
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot