]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Sample/Tools/Source/FwImage/fwimage.c
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / FwImage / fwimage.c
index eb23dc7637934a2a4e850a38126a779c2567ccd2..d5f2ecee0aa4859b36f1cf028ebb604796aa4917 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -29,7 +29,8 @@ Abstract:
 #include "EfiImage.h"\r
 #include "EfiUtilityMsgs.c"\r
 \r
-#define UTILITY_NAME  "FwImage"\r
+#define UTILITY_NAME    "FwImage"\r
+#define UTILITY_VERSION "v1.0"\r
 \r
 typedef union {\r
   IMAGE_NT_HEADERS32 PeHeader32;\r
@@ -41,10 +42,33 @@ Usage (
   VOID\r
   )\r
 {\r
-  printf ("Usage: " UTILITY_NAME "  {-t time-date} {-e} {-r} [APPLICATION|BS_DRIVER|RT_DRIVER|SAL_RT_DRIVER|COMBINED_PEIM_DRIVER|SECURITY_CORE|PEI_CORE|PE32_PEIM|RELOCATABLE_PEIM] peimage [outimage]\n");\r
-  printf ("  -t: Add Time Stamp for output image\n");\r
-  printf ("  -e: Not clear ExceptionTable for output image\n");\r
-  printf ("  -r: Not strip zero pending of .reloc for output image\n");\r
+  int         Index;\r
+  const char  *Str[] = {\r
+    UTILITY_NAME" "UTILITY_VERSION" - Intel Firmware Image Utility",\r
+    "  Copyright (C), 2004 - 2008 Intel Corporation",\r
+\r
+#if ( defined(UTILITY_BUILD) && defined(UTILITY_VENDOR) )\r
+    "  Built from "UTILITY_BUILD", project of "UTILITY_VENDOR,\r
+#endif\r
+\r
+    "",\r
+    "Usage:",\r
+    "  "UTILITY_NAME" [OPTION]... FWTYPE SOURCE [DEST]",\r
+    "Description:",\r
+    "  Converts a pe32/pe32+ SOURCE to DEST with FWTYPE image type.",\r
+    "Options:",\r
+    "  FWTYPE        Can be one of APPLICATION, BS_DRIVER, RT_DRIVER, SAL_RT_DRIVER,",\r
+    "                COMBINED_PEIM_DRIVER, SECURITY_CORE, PEI_CORE, PE32_PEIM and",\r
+    "                RELOCATABLE_PEIM",\r
+    "  -t time-date  Add Time Stamp for output image",\r
+    "  -e            Not clear ExceptionTable for output image",\r
+    "  -r            Not strip zero pending of .reloc for output image",\r
+    NULL\r
+  };\r
+\r
+  for (Index = 0; Str[Index] != NULL; Index++) {\r
+    fprintf (stdout, "%s\n", Str[Index]);\r
+  }  \r
 }\r
 \r
 static\r