String toolchainFamily = null;\r
List<String> archList = null;\r
String cmd = null;\r
- String targetName = null;\r
String optionName = null;\r
\r
Object[] returns = get(from, xPath);\r
ObjectMap.put("Libraries", moduleSA.getLibraries());\r
}\r
if (((ModuleSADocument.ModuleSA) result[i]).getPcdBuildDefinition() != null) {\r
- ObjectMap.put("PcdBuildDefinition", moduleSA\r
- .getPcdBuildDefinition());\r
+ ObjectMap.put("PcdBuildDefinition", moduleSA.getPcdBuildDefinition());\r
}\r
- if (((ModuleSADocument.ModuleSA) result[i])\r
- .getModuleSaBuildOptions() != null) {\r
- ObjectMap.put("ModuleSaBuildOptions", moduleSA\r
- .getModuleSaBuildOptions());\r
+ if (((ModuleSADocument.ModuleSA) result[i]).getModuleSaBuildOptions() != null) {\r
+ ObjectMap.put("ModuleSaBuildOptions", moduleSA.getModuleSaBuildOptions());\r
}\r
\r
//\r
// Get Fpd SA Module attribute and create FpdMoudleIdentification.\r
//\r
- arch = moduleSA.getSupArchList().toString();\r
+ if (moduleSA.isSetSupArchList()) {\r
+ arch = moduleSA.getSupArchList().toString();\r
+ } else {\r
+ arch = null;\r
+ }\r
\r
// TBD\r
fvBinding = null;\r
- saVersion = ((ModuleSADocument.ModuleSA) result[i])\r
- .getModuleVersion();\r
+ saVersion = ((ModuleSADocument.ModuleSA) result[i]).getModuleVersion();\r
\r
saGuid = moduleSA.getModuleGuid();\r
pkgGuid = moduleSA.getPackageGuid();\r
// Create Module Identification which have class member of package\r
// identification.\r
//\r
- PackageIdentification pkgId = new PackageIdentification(null,\r
- pkgGuid, pkgVersion);\r
- ModuleIdentification saId = new ModuleIdentification(null, saGuid,\r
- saVersion);\r
+ PackageIdentification pkgId = new PackageIdentification(null, pkgGuid, pkgVersion);\r
+ ModuleIdentification saId = new ModuleIdentification(null, saGuid, saVersion);\r
\r
saId.setPackage(pkgId);\r
\r
// Create FpdModule Identification which have class member of module\r
// identification\r
//\r
- if (arch != null) {\r
- String[] archList = arch.split(" ");\r
- for (int j = 0; j < archList.length; j++) {\r
- FpdModuleIdentification fpdSaId = new FpdModuleIdentification(saId, archList[j]);\r
- \r
- if (fvBinding != null) {\r
- fpdSaId.setFvBinding(fvBinding);\r
- }\r
- \r
- //\r
- // Put element to Map<FpdModuleIdentification, Map<String,\r
- // Object>>.\r
- //\r
- fpdModuleMap.put(fpdSaId, ObjectMap);\r
+ String[] archList = new String[0];\r
+ if (arch == null || arch.trim().length() == 0) {\r
+ archList = GlobalData.getToolChainInfo().getArchs();\r
+ } else {\r
+ archList = arch.split(" ");\r
+ }\r
+ for (int j = 0; j < archList.length; j++) {\r
+ FpdModuleIdentification fpdSaId = new FpdModuleIdentification(saId, archList[j]);\r
+ \r
+ if (fvBinding != null) {\r
+ fpdSaId.setFvBinding(fvBinding);\r
}\r
+ \r
+ //\r
+ // Put element to Map<FpdModuleIdentification, Map<String,\r
+ // Object>>.\r
+ //\r
+ fpdModuleMap.put(fpdSaId, ObjectMap);\r
}\r
}\r
return fpdModuleMap;\r
return result;\r
}\r
\r
- public static Node getFpdUserExtension() {\r
- String[] xPath = new String[] { "/UserExtensions[@UserID='TianoCore']" }; \r
+ public static Node getFpdUserExtensionPreBuild() {\r
+ String[] xPath = new String[] { "/UserExtensions[@UserID='TianoCore' and @Identifier='0']" }; \r
+\r
+ Object[] queryResult = get("PlatformSurfaceArea", xPath);\r
+ if (queryResult == null || queryResult.length == 0) {\r
+ return null;\r
+ }\r
+ UserExtensionsDocument.UserExtensions a = (UserExtensionsDocument.UserExtensions)queryResult[0];\r
+ \r
+ return a.getDomNode();\r
+ }\r
+ \r
+ public static Node getFpdUserExtensionPostBuild() {\r
+ String[] xPath = new String[] { "/UserExtensions[@UserID='TianoCore' and @Identifier='1']" }; \r
\r
Object[] queryResult = get("PlatformSurfaceArea", xPath);\r
if (queryResult == null || queryResult.length == 0) {\r
*/\r
public static String[][] getFpdOptions(String fvName) {\r
String[] xPath = new String[] { "/Flash/FvImages/FvImage[@Type='Options' and ./FvImageNames='"\r
- + fvName.toUpperCase() + "']/FvImageOptions" };\r
+ + fvName + "']/FvImageOptions" };\r
Object[] queryResult = get("PlatformSurfaceArea", xPath);\r
if (queryResult == null) {\r
return new String[0][];\r
*/\r
public static String[][] getFpdAttributes(String fvName) {\r
String[] xPath = new String[] { "/Flash/FvImages/FvImage[@Type='Attributes' and ./FvImageNames='"\r
- + fvName.toUpperCase() + "']/FvImageOptions" };\r
+ + fvName + "']/FvImageOptions" };\r
Object[] queryResult = get("PlatformSurfaceArea", xPath);\r
if (queryResult == null) {\r
return new String[0][];\r
* @returns empty list if nothing is there\r
*/\r
public static String[][] getFpdComponents(String fvName) {\r
- String[] xPath = new String[] { "/Flash/FvImages/FvImage[@Type='Components' and ./FvImageNames='"+ fvName.toUpperCase() + "']/FvImageOptions" };\r
+ String[] xPath = new String[] { "/Flash/FvImages/FvImage[@Type='Components' and ./FvImageNames='"+ fvName + "']/FvImageOptions" };\r
Object[] queryResult = get("PlatformSurfaceArea", xPath);\r
if (queryResult == null) {\r
return new String[0][];\r
String[] guidPair = new String[2];\r
guidPair[0] = entry.getCName();\r
guidPair[1] = entry.getGuidValue();\r
- guidDeclMap.put(entry.getName(), guidPair);\r
+ guidDeclMap.put(entry.getCName(), guidPair);\r
EdkLog.log(EdkLog.EDK_VERBOSE, entry.getName());\r
EdkLog.log(EdkLog.EDK_VERBOSE, guidPair[0]);\r
EdkLog.log(EdkLog.EDK_VERBOSE, guidPair[1]);\r
\r
protocolPair[0] = entry.getCName();\r
protocolPair[1] = entry.getGuidValue();\r
- protoclMap.put(entry.getName(), protocolPair);\r
+ protoclMap.put(entry.getCName(), protocolPair);\r
EdkLog.log(EdkLog.EDK_VERBOSE, entry.getName());\r
EdkLog.log(EdkLog.EDK_VERBOSE, protocolPair[0]);\r
EdkLog.log(EdkLog.EDK_VERBOSE, protocolPair[1]);\r
String[] ppiPair = new String[2];\r
ppiPair[0] = entry.getCName();\r
ppiPair[1] = entry.getGuidValue();\r
- ppiMap.put(entry.getName(), ppiPair);\r
+ ppiMap.put(entry.getCName(), ppiPair);\r
}\r
return ppiMap;\r
}\r
\r
return false;\r
}\r
+\r
+ public static boolean isHaveTianoR8FlashMap(){\r
+ String[] xPath = new String[] {"/"};\r
+ Object[] returns = get ("Externs", xPath);\r
+\r
+ if (returns == null) {\r
+ return false;\r
+ }\r
+\r
+ ExternsDocument.Externs ext = (ExternsDocument.Externs)returns[0];\r
+ \r
+ if (ext.getTianoR8FlashMapH()){\r
+ return true;\r
+ }else {\r
+ return false;\r
+ }\r
+ }\r
}\r