Added component type convertion from PE32_PEIM to PEIM for R8 modules
authorjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Mon, 24 Dec 2007 05:37:21 +0000 (05:37 +0000)
committerjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Mon, 24 Dec 2007 05:37:21 +0000 (05:37 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@927 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/Common/InfClassObject.py

index 1c54789..25a9057 100755 (executable)
@@ -32,6 +32,7 @@ gComponentType2ModuleType = {
     "COMBINED_PEIM_DRIVER"  :   "PEIM",\r
     "PIC_PEIM"              :   "PEIM",\r
     "RELOCATABLE_PEIM"      :   "PEIM",\r
+    "PE32_PEIM"             :   "PEIM",\r
     "BS_DRIVER"             :   "DXE_DRIVER",\r
     "RT_DRIVER"             :   "DXE_RUNTIME_DRIVER",\r
     "SAL_RT_DRIVER"         :   "DXE_SAL_DRIVER",\r
@@ -285,7 +286,11 @@ class Inf(InfObject):
             VersionString = self.Defines.DefinesDictionary[TAB_INF_DEFINES_VERSION_STRING][0]\r
             if VersionString == '' and VersionNumber != '':\r
                 VersionString = VersionNumber\r
-            self.Module.Header.ModuleType = gComponentType2ModuleType[self.Module.Header.ComponentType]\r
+            if self.Module.Header.ComponentType in gComponentType2ModuleType:\r
+                self.Module.Header.ModuleType = gComponentType2ModuleType[self.Module.Header.ComponentType]\r
+            else:\r
+                EdkLogger.error("Parser", PARSER_ERROR, "Unsupported R8 component type [%s]" % self.Module.Header.ComponentType,\r
+                                ExtraData=File)\r
         #\r
         # LibraryClass of Defines\r
         #\r