From 37e5cd656db059c9b7f506aacd7ca0044f0b2388 Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Thu, 21 Sep 2006 03:16:26 +0000 Subject: [PATCH] Distinguish PEIM entrypoint and driver entrypoint git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1583 6f19259b-4bc3-4df7-8a09-765794883524 --- .../org/tianocore/migration/ModuleReader.java | 1 - .../org/tianocore/migration/MsaWriter.java | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java b/Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java index 41c27a680f..dc32fb9fc0 100644 --- a/Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java +++ b/Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java @@ -102,7 +102,6 @@ public final class ModuleReader implements Common.ForDoAll { while (mtrinfequation.find()) { if (mtrinfequation.group(1).matches("IMAGE_ENTRY_POINT")) { mi.entrypoint = mtrinfequation.group(2); - mi.hashrequiredr9libs.add("EntryPointLib"); } if (mtrinfequation.group(1).matches("DPX_SOURCE")) { if (!mi.localmodulesources.contains(mtrinfequation.group(2))) { diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java b/Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java index 62de225b5c..23ea8b27f6 100644 --- a/Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java +++ b/Tools/Source/MigrationTools/org/tianocore/migration/MsaWriter.java @@ -88,13 +88,6 @@ public class MsaWriter { msaheader.setGuidValue(mi.guidvalue); if (mi.moduletype != null) { msaheader.setModuleType(ModuleTypeDef.Enum.forString(mi.getModuleType())); - /* - if (mi.moduletype.contains("PEI")) { - msaheader.setModuleType(ModuleTypeDef.Enum.forString("PEIM")); - } else { - msaheader.setModuleType(ModuleTypeDef.Enum.forString("DXE_DRIVER")); - } - */ } else { msaheader.setModuleType(ModuleTypeDef.Enum.forString(mi.moduletype = Query("Guid Value Not Found! Please Input Guid Value"))); } @@ -126,8 +119,16 @@ public class MsaWriter { pd.addNewPackage().setPackageGuid("68169ab0-d41b-4009-9060-292c253ac43d"); externs.addNewSpecification().setStringValue("EFI_SPECIFICATION_VERSION 0x00020000"); externs.addNewSpecification().setStringValue("EDK_RELEASE_VERSION 0x00020000"); - externs.addNewExtern().setModuleEntryPoint(mi.entrypoint); - + if (mi.entrypoint != null) { + externs.addNewExtern().setModuleEntryPoint(mi.entrypoint); + org.tianocore.ModuleTypeDef.Enum moduleType = msaheader.getModuleType(); + if (moduleType == ModuleTypeDef.PEIM) { + mi.hashrequiredr9libs.add("PeimEntryPoint"); + } else { + mi.hashrequiredr9libs.add("UefiDriverEntryPoint"); + } + } + it = mi.localmodulesources.iterator(); while (it.hasNext()) { addSourceFiles(it.next());