Distinguish PEIM entrypoint and driver entrypoint
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 21 Sep 2006 03:16:26 +0000 (03:16 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 21 Sep 2006 03:16:26 +0000 (03:16 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1583 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java
Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java

index 41c27a6..dc32fb9 100644 (file)
@@ -102,7 +102,6 @@ public final class ModuleReader implements Common.ForDoAll {
                 while (mtrinfequation.find()) {\r
                     if (mtrinfequation.group(1).matches("IMAGE_ENTRY_POINT")) {\r
                         mi.entrypoint = mtrinfequation.group(2);\r
-                        mi.hashrequiredr9libs.add("EntryPointLib");\r
                     }\r
                     if (mtrinfequation.group(1).matches("DPX_SOURCE")) {\r
                         if (!mi.localmodulesources.contains(mtrinfequation.group(2))) {\r
index 62de225..23ea8b2 100644 (file)
@@ -88,13 +88,6 @@ public class MsaWriter {
         msaheader.setGuidValue(mi.guidvalue);\r
         if (mi.moduletype != null) {\r
             msaheader.setModuleType(ModuleTypeDef.Enum.forString(mi.getModuleType()));\r
-            /*\r
-            if (mi.moduletype.contains("PEI")) {\r
-                msaheader.setModuleType(ModuleTypeDef.Enum.forString("PEIM"));\r
-            } else {\r
-                msaheader.setModuleType(ModuleTypeDef.Enum.forString("DXE_DRIVER"));\r
-            }\r
-            */\r
         } else {\r
             msaheader.setModuleType(ModuleTypeDef.Enum.forString(mi.moduletype = Query("Guid Value Not Found!  Please Input Guid Value")));\r
         }\r
@@ -126,8 +119,16 @@ public class MsaWriter {
         pd.addNewPackage().setPackageGuid("68169ab0-d41b-4009-9060-292c253ac43d");\r
         externs.addNewSpecification().setStringValue("EFI_SPECIFICATION_VERSION 0x00020000");\r
         externs.addNewSpecification().setStringValue("EDK_RELEASE_VERSION 0x00020000");\r
-        externs.addNewExtern().setModuleEntryPoint(mi.entrypoint);\r
-        \r
+        if (mi.entrypoint != null) {\r
+          externs.addNewExtern().setModuleEntryPoint(mi.entrypoint);\r
+          org.tianocore.ModuleTypeDef.Enum moduleType = msaheader.getModuleType();\r
+          if (moduleType == ModuleTypeDef.PEIM) {\r
+              mi.hashrequiredr9libs.add("PeimEntryPoint");\r
+          } else {\r
+              mi.hashrequiredr9libs.add("UefiDriverEntryPoint");\r
+          }\r
+        }\r
+       \r
         it = mi.localmodulesources.iterator();\r
         while (it.hasNext()) {\r
             addSourceFiles(it.next());\r