summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorkel Lundgren <torkel.lundgren@enea.com>2010-09-28 11:05:36 +0200
committerWolfgang Denk <wd@denx.de>2010-09-28 14:42:26 +0200
commit3df61957938586c512c17e72d83551d190400981 (patch)
treef11dca1ede144d58cf5c88b8bc67cb2b0cefa49e
parent6aa3d3bfaa986f1aff5e21a9b9f68d087715b1a9 (diff)
downloadu-boot-imx-3df61957938586c512c17e72d83551d190400981.zip
u-boot-imx-3df61957938586c512c17e72d83551d190400981.tar.gz
u-boot-imx-3df61957938586c512c17e72d83551d190400981.tar.bz2
Add support for operating system OSE
Add OSE as operating system for mkimage and bootm. Signed-off-by: Torkel Lundgren <torkel.lundgren@enea.com>
-rw-r--r--common/cmd_bootm.c39
-rw-r--r--common/image.c1
-rw-r--r--include/config_defaults.h1
-rw-r--r--include/image.h1
4 files changed, 42 insertions, 0 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 46efd77..db59e6f 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -119,6 +119,9 @@ extern void lynxkdi_boot (image_header_t *);
#ifdef CONFIG_BOOTM_RTEMS
static boot_os_fn do_bootm_rtems;
#endif
+#if defined(CONFIG_BOOTM_OSE)
+static boot_os_fn do_bootm_ose;
+#endif
#if defined(CONFIG_CMD_ELF)
static boot_os_fn do_bootm_vxworks;
static boot_os_fn do_bootm_qnxelf;
@@ -142,6 +145,9 @@ static boot_os_fn *boot_os[] = {
#ifdef CONFIG_BOOTM_RTEMS
[IH_OS_RTEMS] = do_bootm_rtems,
#endif
+#if defined(CONFIG_BOOTM_OSE)
+ [IH_OS_OSE] = do_bootm_ose,
+#endif
#if defined(CONFIG_CMD_ELF)
[IH_OS_VXWORKS] = do_bootm_vxworks,
[IH_OS_QNX] = do_bootm_qnxelf,
@@ -1383,6 +1389,39 @@ static int do_bootm_rtems (int flag, int argc, char * const argv[],
}
#endif /* CONFIG_BOOTM_RTEMS */
+#if defined(CONFIG_BOOTM_OSE)
+static int do_bootm_ose (int flag, int argc, char * const argv[],
+ bootm_headers_t *images)
+{
+ void (*entry_point)(void);
+
+ if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
+ return 1;
+
+#if defined(CONFIG_FIT)
+ if (!images->legacy_hdr_valid) {
+ fit_unsupported_reset ("OSE");
+ return 1;
+ }
+#endif
+
+ entry_point = (void (*)(void))images->ep;
+
+ printf ("## Transferring control to OSE (at address %08lx) ...\n",
+ (ulong)entry_point);
+
+ show_boot_progress (15);
+
+ /*
+ * OSE Parameters:
+ * None
+ */
+ (*entry_point)();
+
+ return 1;
+}
+#endif /* CONFIG_BOOTM_OSE */
+
#if defined(CONFIG_CMD_ELF)
static int do_bootm_vxworks (int flag, int argc, char * const argv[],
bootm_headers_t *images)
diff --git a/common/image.c b/common/image.c
index fcb938b..3a2f25e 100644
--- a/common/image.c
+++ b/common/image.c
@@ -103,6 +103,7 @@ static table_entry_t uimage_os[] = {
{ IH_OS_LYNXOS, "lynxos", "LynxOS", },
#endif
{ IH_OS_NETBSD, "netbsd", "NetBSD", },
+ { IH_OS_OSE, "ose", "Enea OSE", },
{ IH_OS_RTEMS, "rtems", "RTEMS", },
{ IH_OS_U_BOOT, "u-boot", "U-Boot", },
#if defined(CONFIG_CMD_ELF) || defined(USE_HOSTCC)
diff --git a/include/config_defaults.h b/include/config_defaults.h
index 0337163..abdf3be 100644
--- a/include/config_defaults.h
+++ b/include/config_defaults.h
@@ -12,6 +12,7 @@
/* Support bootm-ing different OSes */
#define CONFIG_BOOTM_LINUX 1
#define CONFIG_BOOTM_NETBSD 1
+#define CONFIG_BOOTM_OSE 1
#define CONFIG_BOOTM_RTEMS 1
#define CONFIG_GZIP 1
diff --git a/include/image.h b/include/image.h
index bcc08d1..18a9f0e 100644
--- a/include/image.h
+++ b/include/image.h
@@ -83,6 +83,7 @@
#define IH_OS_ARTOS 19 /* ARTOS */
#define IH_OS_UNITY 20 /* Unity OS */
#define IH_OS_INTEGRITY 21 /* INTEGRITY */
+#define IH_OS_OSE 22 /* OSE */
/*
* CPU Architecture Codes (supported by Linux)