]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Add support for booting of INTEGRITY operating system uImages
authorPeter Tyser <ptyser@xes-inc.com>
Mon, 8 Sep 2008 19:56:49 +0000 (14:56 -0500)
committerWolfgang Denk <wd@denx.de>
Tue, 9 Sep 2008 13:54:10 +0000 (15:54 +0200)
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
README
common/cmd_bootm.c
common/image.c
doc/uImage.FIT/source_file_format.txt
include/image.h

diff --git a/README b/README
index 402ded303ca86b9b5b08c16d9f99415ef6cc7cb4..b5e40862b9940da24b1474595a532fe6c6e43095 100644 (file)
--- a/README
+++ b/README
@@ -3030,8 +3030,9 @@ details; basically, the header defines the following image properties:
 
 * Target Operating System (Provisions for OpenBSD, NetBSD, FreeBSD,
   4.4BSD, Linux, SVR4, Esix, Solaris, Irix, SCO, Dell, NCR, VxWorks,
-  LynxOS, pSOS, QNX, RTEMS;
-  Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, LynxOS).
+  LynxOS, pSOS, QNX, RTEMS, INTEGRITY;
+  Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, LynxOS,
+  INTEGRITY).
 * Target CPU Architecture (Provisions for Alpha, ARM, AVR32, Intel x86,
   IA64, MIPS, NIOS, PowerPC, IBM S390, SuperH, Sparc, Sparc 64 Bit;
   Currently supported: ARM, AVR32, Intel x86, MIPS, NIOS, PowerPC).
index 08a014f4484d3035835b937fd7200aa9e1e14140..b023e2635e18dc0400a16a39761875e6c9cb9e9c 100644 (file)
@@ -108,6 +108,9 @@ static boot_os_fn do_bootm_qnxelf;
 int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 #endif
+#if defined(CONFIG_INTEGRITY)
+static boot_os_fn do_bootm_integrity;
+#endif
 
 ulong load_addr = CFG_LOAD_ADDR;       /* Default Load Address */
 static bootm_headers_t images;         /* pointers to os/initrd/fdt images */
@@ -452,6 +455,11 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
            break;
 #endif
 
+#ifdef CONFIG_INTEGRITY
+       case IH_OS_INTEGRITY:
+           do_bootm_integrity (0, argc, argv, &images);
+           break;
+#endif
        }
 
        show_boot_progress (-9);
@@ -1144,3 +1152,33 @@ static int do_bootm_qnxelf(int flag, int argc, char *argv[],
        return 1;
 }
 #endif
+
+#ifdef CONFIG_INTEGRITY
+static int do_bootm_integrity (int flag, int argc, char *argv[],
+                          bootm_headers_t *images)
+{
+       void (*entry_point)(void);
+
+#if defined(CONFIG_FIT)
+       if (!images->legacy_hdr_valid) {
+               fit_unsupported_reset ("INTEGRITY");
+               return 1;
+       }
+#endif
+
+       entry_point = (void (*)(void))images->ep;
+
+       printf ("## Transferring control to INTEGRITY (at address %08lx) ...\n",
+               (ulong)entry_point);
+
+       show_boot_progress (15);
+
+       /*
+        * INTEGRITY Parameters:
+        *   None
+        */
+       (*entry_point)();
+
+       return 1;
+}
+#endif
index 78efe2ebb73ddd4d69e19b4ce323d3ab9ccb3244..b0119327b5f78773febae5319d9fd1ab0f14e3e5 100644 (file)
@@ -116,6 +116,9 @@ static table_entry_t uimage_os[] = {
        {       IH_OS_QNX,      "qnx",          "QNX",                  },
        {       IH_OS_VXWORKS,  "vxworks",      "VxWorks",              },
 #endif
+#if defined(CONFIG_INTEGRITY) || defined(USE_HOSTCC)
+       {       IH_OS_INTEGRITY,"integrity",    "INTEGRITY",            },
+#endif
 #ifdef USE_HOSTCC
        {       IH_OS_4_4BSD,   "4_4bsd",       "4_4BSD",               },
        {       IH_OS_DELL,     "dell",         "Dell",                 },
index 1e30d22005aad0d3e32c3a1c7022478087e19ad2..157936ed531506829c3fc3e75368508b9129bcfa 100644 (file)
@@ -169,7 +169,7 @@ the '/images' node should have the following layout:
   - os : OS name, mandatory for type="kernel", valid OS names are: "openbsd",
     "netbsd", "freebsd", "4_4bsd", "linux", "svr4", "esix", "solaris", "irix",
     "sco", "dell", "ncr", "lynxos", "vxworks", "psos", "qnx", "u_boot",
-    "rtems", "unity".
+    "rtems", "unity", "integrity".
   - arch : Architecture name, mandatory for types: "standalone", "kernel",
     "firmware", "ramdisk" and "fdt". Valid architecture names are: "alpha",
     "arm", "i386", "ia64", "mips", "mips64", "ppc", "s390", "sh", "sparc",
index 9be806e12d7533033c7bd1f7b3358f8c11b1ed37..46544858c86106f70be9cb8c9231c15991d75ad0 100644 (file)
@@ -85,6 +85,7 @@
 #define IH_OS_RTEMS            18      /* RTEMS        */
 #define IH_OS_ARTOS            19      /* ARTOS        */
 #define IH_OS_UNITY            20      /* Unity OS     */
+#define IH_OS_INTEGRITY                21      /* INTEGRITY    */
 
 /*
  * CPU Architecture Codes (supported by Linux)