\r
**/\r
\r
-package org.tianocore.definitions;\r
+package org.tianocore.common.definitions;\r
\r
/**\r
This class includes the common EDK definitions.\r
\r
**/\r
\r
-package org.tianocore.definitions;\r
+package org.tianocore.common.definitions;\r
\r
import java.io.File;\r
\r
Abstract:\r
\r
--*/\r
-package org.tianocore.exception;\r
+\r
+package org.tianocore.common.exception;\r
\r
public class EdkException extends Exception {\r
static final long serialVersionUID = -8494188017252114029L;\r
\r
public EdkException(String message, boolean traceStack) {\r
super(message);\r
- \r
+\r
}\r
- \r
+\r
public EdkException(){\r
super();\r
}\r
- \r
+\r
public EdkException(Exception e, String message){\r
super("[EdkException]:" + message);\r
if (isPrintStack){\r
\r
--*/\r
\r
-package org.tianocore.logger;\r
+package org.tianocore.common.logger;\r
+\r
import java.util.logging.Level;\r
import java.util.logging.Logger;\r
\r
Abstract:\r
\r
--*/\r
-package org.tianocore.logger;\r
\r
-import org.tianocore.logger.LogMethod;\r
+package org.tianocore.common.logger;\r
\r
+import org.tianocore.common.logger.LogMethod;\r
\r
public class EdkLog {\r
private static final String error = "ERROR";\r
private static final String info = "INFO";\r
private static final String verbose = "VERBOSE";\r
private static final String debug = "DEBUG";\r
- \r
+\r
public static final int EDK_ERROR = 0;\r
public static final int EDK_WARNING = 1;\r
public static final int EDK_INFO = 2;\r
\r
public static void log(int level, String message) {\r
if (level <= logLevel){\r
- logger.putMessage(null, logLevel, message); \r
+ logger.putMessage(null, logLevel, message);\r
}\r
- \r
+\r
}\r
\r
public static void log(int logLevel, String message, Exception cause) {\r
public static void setLogger(LogMethod l) {\r
logger = l;\r
}\r
- \r
+\r
public static void setLogLevel (int level){\r
logLevel = level;\r
}\r
}\r
if (levelStr.equalsIgnoreCase(debug)){\r
logLevel = EDK_DEBUG;\r
- } \r
+ }\r
if (levelStr.equalsIgnoreCase(info)){\r
logLevel = EDK_INFO;\r
- } \r
+ }\r
if (levelStr.equalsIgnoreCase(verbose)){\r
logLevel = EDK_VERBOSE;\r
- } \r
+ }\r
if (levelStr.equalsIgnoreCase(warning)){\r
logLevel = EDK_WARNING;\r
- } \r
+ }\r
}\r
public static int getLogLevel (){\r
return logLevel;\r
Abstract:\r
\r
--*/\r
-package org.tianocore.logger;\r
\r
+package org.tianocore.common.logger;\r
\r
public interface LogMethod {\r
public void putMessage(Object msgSource, int msgLevel, String msg);\r
CreateMtFileTask class.\r
\r
CreateMtFileTask is used to call CreateMtFile.exe to create MT file.\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
CreateMtFileTask class.\r
\r
/**\r
* execute\r
- * \r
+ *\r
* StripTask execute function is to assemble tool command line & execute\r
* tool command line\r
- * \r
+ *\r
* @throws BuidException\r
*/\r
public void execute() throws BuildException {\r
File file = new File(outputFile);\r
if (!file.isAbsolute() && (!this.outputDir.equalsIgnoreCase(""))) {\r
argument = outputDir + File.separatorChar + outputFile + " " + this.fileSize;\r
- \r
+\r
} else {\r
argument = outputFile + " " + this.fileSize;\r
}\r
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
EdkLog.log(EdkLog.EDK_INFO, (new File(this.outputFile)).getName());\r
revl = runner.execute();\r
- \r
+\r
if (EFI_SUCCESS == revl) {\r
//\r
// command execution success\r
\r
/**\r
* getFileSize\r
- * \r
+ *\r
* This function is to get class member "fileSize".\r
- * \r
+ *\r
* @return fileSize string of file size.\r
*/\r
public String getFileSize() {\r
\r
/**\r
* setFileSize\r
- * \r
+ *\r
* This function is to set class member "fileSize".\r
- * \r
+ *\r
* @param fileSize\r
* string of file size value.\r
*/\r
\r
/**\r
* getOutputFile\r
- * \r
+ *\r
* This function is to get class member "outputFile"\r
- * \r
+ *\r
* @return outputFile string of output file name.\r
*/\r
public String getOutputFile() {\r
\r
/**\r
* setOutputFile\r
- * \r
+ *\r
* This function is to set class member "outputFile"\r
- * \r
+ *\r
* @param outputFile\r
* string of output file name.\r
*/\r
\r
/**\r
* getOutputDir\r
- * \r
+ *\r
* This function is to get class member "outputDir"\r
- * \r
+ *\r
* @return outputDir string of output directory.\r
*/\r
public String getOutputDir() {\r
\r
/**\r
* setOutputDir\r
- * \r
+ *\r
* This function is to set class member "outputDir"\r
- * \r
+ *\r
* @param outputDir\r
* string of output directory.\r
*/\r
EfiCompressTask class.\r
\r
EfiCompressTask is used to call EfiCompress.exe to strip input file.\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
EfiCompressTask class.\r
\r
/**\r
* execute\r
- * \r
+ *\r
* EfiCompressTask execute function is to assemble tool command line & execute\r
* tool command line\r
- * \r
+ *\r
* @throws BuidException\r
*/\r
public void execute() throws BuildException {\r
//\r
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());\r
- \r
+\r
revl = runner.execute();\r
- \r
+\r
if (EFI_SUCCESS == revl) {\r
//\r
// command execution success\r
\r
/**\r
* getInputFile\r
- * \r
+ *\r
* This function is to get class member "inputFile".\r
- * \r
+ *\r
* @return string of input file name.\r
*/\r
public String getInputFile() {\r
\r
/**\r
* setComponentType\r
- * \r
+ *\r
* This function is to set class member "inputFile".\r
- * \r
+ *\r
* @param inputFile\r
* string of input file name.\r
*/\r
\r
/**\r
* getOutputFile\r
- * \r
+ *\r
* This function is to get class member "outputFile"\r
- * \r
+ *\r
* @return outputFile string of output file name.\r
*/\r
public String getOutputFile() {\r
\r
/**\r
* setOutputFile\r
- * \r
+ *\r
* This function is to set class member "outputFile"\r
- * \r
+ *\r
* @param outputFile\r
* string of output file name.\r
*/\r
\r
/**\r
* getOutputDir\r
- * \r
+ *\r
* This function is to get class member "outputDir"\r
- * \r
+ *\r
* @return outputDir string of output directory.\r
*/\r
public String getOutputDir() {\r
\r
/**\r
* setOutputDir\r
- * \r
+ *\r
* This function is to set class member "outputDir"\r
- * \r
+ *\r
* @param outputDir\r
* string of output directory.\r
*/\r
EfiRomTask class.\r
\r
EfiRomTask is used to call FlashMap.exe to lay out the flash.\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.apache.tools.ant.Task;\r
import org.apache.tools.ant.Project;\r
import org.apache.tools.ant.BuildException;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
* SecFixupTask class.\r
- * \r
+ *\r
* SecFixupTask is used to call SecFixup.exe to fix up sec image.\r
*/\r
public class EfiRomTask extends Task implements EfiDefine {\r
/// tool name\r
///\r
private final String toolName = "EfiRom";\r
- \r
+\r
///\r
/// Flash default file\r
///\r
/// Flash device Image\r
///\r
private String deviceId = "";\r
- \r
+\r
///\r
/// MCI file\r
///\r
private String outputFile = "";\r
- \r
+\r
///\r
/// MCO file\r
///\r
private List<Input> binaryFileList = new ArrayList<Input>();\r
- \r
+\r
///\r
/// Efi PE32 image file\r
///\r
private List<Input> pe32FileList = new ArrayList<Input>();\r
- \r
+\r
///\r
/// Compress efi PE32 image file\r
///\r
private List<Input> pe32ComprFileList = new ArrayList<Input>();\r
- \r
+\r
///\r
/// Hex class code in the PCI data strutor header\r
///\r
private String classCode = "";\r
- \r
+\r
///\r
/// Hex revision in the PCI data header.\r
///\r
private String revision = "";\r
- \r
+\r
///\r
/// Dump the headers of an existing option rom image.\r
///\r
private String dump = "";\r
- \r
- \r
+\r
+\r
///\r
/// output directory\r
///\r
private String outputDir = ".";\r
- \r
- \r
+\r
+\r
///\r
/// command and argument list\r
///\r
LinkedList<String> argList = new LinkedList<String>();\r
/**\r
* execute\r
- * \r
+ *\r
* EfiRomTask execute function is to assemble tool command line & execute\r
* tool command line\r
- * \r
+ *\r
* @throws BuidException\r
*/\r
public void execute() throws BuildException {\r
command = path + File.separatorChar + toolName;\r
}\r
argList.addFirst(command);\r
- \r
+\r
//\r
// add microcode binary files\r
//\r
argList.add(((Input)binList.next()).getFile());\r
}\r
}\r
- \r
+\r
//\r
// add pe32 file\r
//\r
argList.add(((Input)pe32List.next()).getFile());\r
}\r
}\r
- \r
+\r
//\r
// add compressed pe32 file\r
//\r
}\r
}\r
}\r
- \r
+\r
/**\r
* getVerbose\r
- * \r
+ *\r
* This function is to get class member "verbose"\r
- * \r
+ *\r
* @return verbose for verbose output.\r
*/\r
public String getVerbose() {\r
return verbose;\r
}\r
- \r
+\r
/**\r
* setVerbose\r
- * \r
+ *\r
* This function is to set class member "verbose"\r
- * \r
+ *\r
* @param verbose for verbose output.\r
*/\r
public void setVerbose(boolean verbose) {\r
if (verbose){\r
this.verbose = "-p";\r
- argList.add(this.verbose); \r
+ argList.add(this.verbose);\r
}\r
}\r
- \r
+\r
/**\r
* getVenderId\r
- * \r
+ *\r
* This function is to get class member "venderId"\r
- * \r
+ *\r
* @return venderId String of venderId.\r
*/\r
public String getVenderId() {\r
return venderId;\r
}\r
- \r
+\r
/**\r
* setVenderId\r
- * \r
+ *\r
* This function is to set class member "venderId"\r
- * \r
+ *\r
* @param venderId String of venderId.\r
*/\r
public void setVenderId(String VenderId) {\r
argList.add("-v");\r
argList.add(this.venderId);\r
}\r
- \r
+\r
/**\r
* getDeviceId\r
- * \r
+ *\r
* This function is to get class member "deviceId"\r
- * \r
+ *\r
* @return deviceId String of device ID.\r
*/\r
public String getDeviceId() {\r
return this.deviceId;\r
}\r
- \r
+\r
/**\r
* setDeviceId\r
- * \r
+ *\r
* This function is to set class member "deviceId"\r
- * \r
+ *\r
* @param deviceId String of device ID.\r
*/\r
public void setDeviceId(String deviceId) {\r
argList.add(this.deviceId);\r
}\r
\r
- \r
+\r
/**\r
* getOutputFile\r
- * \r
+ *\r
* This function is to get class member "outputFile"\r
- * \r
+ *\r
* @return outputFile name of output directory.\r
*/\r
public String getOutputFile() {\r
return outputFile;\r
}\r
- \r
+\r
/**\r
* setOutputFile\r
- * \r
+ *\r
* This function is to set class member "dscFile"\r
- * \r
+ *\r
* @param outputFile name of DSC file\r
*/\r
public void setOutputFile(String outputFile) {\r
this.outputFile = outputFile;\r
- \r
+\r
}\r
- \r
+\r
/**\r
* getClassCode\r
- * \r
+ *\r
* This function is to get class member "classCode"\r
- * \r
+ *\r
* @return fdImage name of class code file.\r
*/\r
public String getClassCode() {\r
return classCode;\r
}\r
- \r
+\r
/**\r
* setclassCode\r
- * \r
+ *\r
* This function is to set class member "classCode"\r
- * \r
+ *\r
* @param fdImage name of class code file.\r
*/\r
public void setclassCode(String classCode) {\r
argList.add("-cc");\r
argList.add(this.classCode);\r
}\r
- \r
+\r
/**\r
* getRevision\r
- * \r
+ *\r
* This function is to get class member "revision".\r
- * \r
+ *\r
* @return revision hex revision in the PDI data header.\r
*/\r
public String getRevision() {\r
return revision;\r
}\r
- \r
+\r
/**\r
* setRevision\r
- * \r
+ *\r
* This function is to set class member "revision"\r
- * \r
+ *\r
* @param revision hex revision in the PDI data header.\r
*/\r
public void setRevision(String revision) {\r
argList.add("-rev");\r
argList.add(this.revision);\r
}\r
- \r
+\r
/**\r
* getFlashDeviceImage\r
- * \r
+ *\r
* This function is to get class member "dump"\r
- * \r
+ *\r
* @return flashDeviceImage name of flash device image\r
*/\r
public String getDump() {\r
return dump;\r
}\r
- \r
+\r
/**\r
* setFlashDeviceImage\r
- * \r
+ *\r
* This function is to set class member "dump"\r
- * \r
+ *\r
* @param flashDeviceImage name of flash device image\r
*/\r
public void setDump(boolean dump) {\r
\r
/**\r
* getOutputDir\r
- * \r
+ *\r
* This function is to get class member "outputDir"\r
- * \r
- * @return outputDir string of output directory \r
+ *\r
+ * @return outputDir string of output directory\r
*/\r
public String getOutputDir() {\r
return outputDir;\r
}\r
- \r
+\r
/**\r
* setOutputDir\r
- * \r
+ *\r
* This function is to set class member "outputDir"\r
- * \r
+ *\r
* @param outputDir string of output directory\r
*/\r
public void setOutputDir(String outputDir) {\r
}\r
/**\r
* addBinaryFile\r
- * \r
+ *\r
* This function is to add binary file to binaryFile list.\r
- * \r
+ *\r
* @param binaryFile name of binary file.\r
*/\r
public void addBinaryFile(Input binaryFile){\r
this.binaryFileList.add(binaryFile);\r
}\r
- \r
+\r
/**\r
* addPe32File\r
- * \r
- * This function is to add pe32 file to pe32File list. \r
- * \r
+ *\r
+ * This function is to add pe32 file to pe32File list.\r
+ *\r
* @param pe32File name of pe32 file.\r
*/\r
public void addPe32File(Input pe32File){\r
this.pe32FileList.add(pe32File);\r
}\r
- \r
+\r
/**\r
* addPe32ComprFile\r
- * \r
+ *\r
* This function os to add compressed pe32 file to pe32ComprFile list.\r
- * \r
+ *\r
* @param pe32ComprFile name of compressed pe32 file.\r
*/\r
public void addPe32ComprFile(Input pe32ComprFile){\r
FlashMapTask class.\r
\r
FlashMapTask is used to call FlashMap.exe to lay out the flash.\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.apache.tools.ant.Task;\r
import org.apache.tools.ant.Project;\r
import org.apache.tools.ant.BuildException;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
* FlashMapTask class.\r
- * \r
+ *\r
* FlashMapTask is used to call FlashMap.exe to generate flash map defition files and fd files.\r
*/\r
public class FlashMapTask extends Task implements EfiDefine {\r
\r
/**\r
* execute\r
- * \r
+ *\r
* FlashMapTask execute function is to assemble tool command line & execute\r
* tool command line\r
- * \r
+ *\r
* @throws BuidException\r
*/\r
public void execute() throws BuildException {\r
argList.add(this.inStrFile);\r
argList.add(this.outStrFile);\r
}\r
- \r
- \r
+\r
+\r
//\r
// add microcode binary files\r
//\r
\r
/**\r
* getFlashDefFile\r
- * \r
+ *\r
* This function is to get class member "flashDefFile"\r
- * \r
+ *\r
* @return flashDeFile Name of flash definition file.\r
*/\r
public String getFlashDefFile() {\r
\r
/**\r
* setFlashDefFile\r
- * \r
+ *\r
* This function is to set class member "flashDefFile"\r
- * \r
+ *\r
* @param flashDefFile\r
* Name of flash definition file.\r
*/\r
\r
/**\r
* getAligment\r
- * \r
+ *\r
* This function is to get class member "aligment"\r
- * \r
+ *\r
* @return aligment String of aligment value.\r
*/\r
public String getAligment() {\r
\r
/**\r
* setAligment\r
- * \r
+ *\r
* This function is to set class member "aligment"\r
- * \r
+ *\r
* @param aligment\r
* String of aligment value.\r
*/\r
\r
/**\r
* getAsmIncFile\r
- * \r
+ *\r
* This function is to get class member "asmIncFile"\r
- * \r
+ *\r
* @return asmIncFile String of ASM include file.\r
*/\r
public String getAsmIncFile() {\r
\r
/**\r
* setAsmIncFile\r
- * \r
+ *\r
* This function is to set class member "asmIncFile"\r
- * \r
+ *\r
* @param asmIncFile\r
* String of ASM include file.\r
*/\r
\r
/**\r
* getBaseAddr\r
- * \r
+ *\r
* This function is to get class member "baseAddr"\r
- * \r
+ *\r
* @return baseAddr String of base address value.\r
*/\r
public String getBaseAddr() {\r
\r
/**\r
* setBaseAddr\r
- * \r
+ *\r
* This function is to set class member "baseAddr"\r
- * \r
+ *\r
* @param baseAddr\r
* String of base address value.\r
*/\r
\r
/**\r
* getDscFile\r
- * \r
+ *\r
* This function is to get class member "dscFile"\r
- * \r
+ *\r
* @return dscFile name of DSC file\r
*/\r
public String getDscFile() {\r
\r
/**\r
* setDscFile\r
- * \r
+ *\r
* This function is to set class member "dscFile"\r
- * \r
+ *\r
* @param dscFile\r
* name of DSC file\r
*/\r
\r
/**\r
* getFdImage\r
- * \r
+ *\r
* This function is to get class member "fdImage"\r
- * \r
+ *\r
* @return fdImage name of input FDI image file.\r
*/\r
public String getFdImage() {\r
\r
/**\r
* setFdImage\r
- * \r
+ *\r
* This function is to set class member "fdImage"\r
- * \r
+ *\r
* @param fdImage\r
* name of input FDI image file.\r
*/\r
\r
/**\r
* getFlashDevice\r
- * \r
+ *\r
* This function is to get class member "flashDevice".\r
- * \r
+ *\r
* @return flashDevice name of flash device.\r
*/\r
public String getFlashDevice() {\r
\r
/**\r
* setFlashDevice\r
- * \r
+ *\r
* This function is to set class member "flashDevice"\r
- * \r
+ *\r
* @param flashDevice\r
* name of flash device.\r
*/\r
\r
/**\r
* getFlashDeviceImage\r
- * \r
+ *\r
* This function is to get class member "flashDeviceImage"\r
- * \r
+ *\r
* @return flashDeviceImage name of flash device image\r
*/\r
public String getFlashDeviceImage() {\r
\r
/**\r
* setFlashDeviceImage\r
- * \r
+ *\r
* This function is to set class member "flashDeviceImage"\r
- * \r
+ *\r
* @param flashDeviceImage\r
* name of flash device image\r
*/\r
\r
/**\r
* getHeaderFile\r
- * \r
+ *\r
* This function is to get class member "headerFile"\r
- * \r
+ *\r
* @return headerFile name of include file\r
*/\r
public String getHeaderFile() {\r
\r
/**\r
* setHeaderFile\r
- * \r
+ *\r
* This function is to set class member "headerFile"\r
- * \r
+ *\r
* @param headerFile\r
* name of include file\r
*/\r
\r
/**\r
* getImageOutFile\r
- * \r
+ *\r
* This function is to get class member "imageOutFile"\r
- * \r
+ *\r
* @return imageOutFile name of output image file\r
*/\r
public String getImageOutFile() {\r
\r
/**\r
* setImageOutFile\r
- * \r
+ *\r
* This function is to set class member "ImageOutFile"\r
- * \r
+ *\r
* @param imageOutFile\r
* name of output image file\r
*/\r
\r
/**\r
* getInStrFile\r
- * \r
+ *\r
* This function is to get class member "inStrFile"\r
- * \r
+ *\r
* @return inStrFile name of input file which used to replace symbol names.\r
*/\r
public String getInStrFile() {\r
\r
/**\r
* setInStrFile\r
- * \r
+ *\r
* This function is to set class member "inStrFile"\r
- * \r
+ *\r
* @param inStrFile\r
* name of input file which used to replace symbol names.\r
*/\r
\r
/**\r
* getMciFile\r
- * \r
+ *\r
* This function is to get class member "mciFile"\r
- * \r
+ *\r
* @return mciFile name of input microcode file\r
*/\r
public String getMciFile() {\r
\r
/**\r
* setMciFile\r
- * \r
+ *\r
* This function is to set class member "mciFile"\r
- * \r
+ *\r
* @param mciFile\r
* name of input microcode file\r
*/\r
\r
/**\r
* getMcoFile\r
- * \r
+ *\r
* This function is to get class member "mcoFile"\r
- * \r
+ *\r
* @return mcoFile name of output binary microcode image\r
*/\r
public String getMcoFile() {\r
\r
/**\r
* setMcoFile\r
- * \r
+ *\r
* This function is to set class member "mcoFile"\r
- * \r
+ *\r
* @param mcoFile\r
* name of output binary microcode image\r
*/\r
\r
/**\r
* getOutStrFile\r
- * \r
+ *\r
* This function is to get class member "outStrFile"\r
- * \r
+ *\r
* @return outStrFile name of output string substitution file\r
*/\r
public String getOutStrFile() {\r
\r
/**\r
* setOutStrFile\r
- * \r
+ *\r
* This function is to set class member "outStrFile"\r
- * \r
+ *\r
* @param outStrFile\r
* name of output string substitution file\r
*/\r
\r
/**\r
* getPadValue\r
- * \r
+ *\r
* This function is to get class member "padValue"\r
- * \r
+ *\r
* @return padValue string of byte value to use as padding\r
*/\r
public String getPadValue() {\r
\r
/**\r
* setPadValue\r
- * \r
+ *\r
* This function is to set class member "padValue"\r
- * \r
+ *\r
* @param padValue\r
* string of byte value to use as padding\r
*/\r
\r
/**\r
* addMciFile\r
- * \r
+ *\r
* This function is to add Microcode binary file\r
- * \r
+ *\r
* @param mciFile\r
* instance of input class\r
*/\r
\r
/**\r
* getOutputDir\r
- * \r
+ *\r
* This function is to get class member "outputDir"\r
- * \r
+ *\r
* @return outputDir string of output directory\r
*/\r
public String getOutputDir() {\r
\r
/**\r
* setOutputDir\r
- * \r
+ *\r
* This function is to set class member "outputDir"\r
- * \r
+ *\r
* @param outputDir\r
* string of output directory\r
*/\r
--*/\r
\r
package org.tianocore.framework.tasks;\r
+\r
import org.apache.tools.ant.Project;\r
-import org.tianocore.logger.LogMethod;\r
+\r
+import org.tianocore.common.logger.LogMethod;\r
\r
class FrameworkLogger implements LogMethod {\r
private Project project;\r
private String titleName;\r
public FrameworkLogger(Project project, String taskName) {\r
this.project = project;\r
- this.titleName = taskName; \r
+ this.titleName = taskName;\r
}\r
\r
- public void putMessage(Object msgSource, int msgLevel, String msg) { \r
+ public void putMessage(Object msgSource, int msgLevel, String msg) {\r
String frameworkMsg = " [" + this.titleName + "] " + msg;\r
this.project.log(frameworkMsg, Project.MSG_INFO);\r
}\r
FwImageTask class.\r
\r
FwImageTask is used to call FwImage.ext to generate the FwImage.\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
\r
/**\r
**/\r
public class FwImageTask extends Task implements EfiDefine{\r
///\r
- /// time&data \r
+ /// time&data\r
///\r
private String time = "";\r
///\r
/// input PE image\r
- /// \r
+ ///\r
private String peImage = "";\r
private String peImageName = "";\r
///\r
/// output EFI image\r
- /// \r
+ ///\r
private String outImage = "";\r
///\r
/// component type\r
\r
/**\r
* assemble tool command line & execute tool command line\r
- * \r
+ *\r
* @throws BuildException\r
*/\r
/**\r
- execute \r
- \r
+ execute\r
+\r
FwimageTask execute function is to assemble tool command line & execute\r
tool command line\r
- \r
+\r
@throws BuidException\r
**/\r
public void execute() throws BuildException {\r
\r
/**\r
setTime\r
- \r
+\r
This function is to set operation of class member "time".\r
- \r
+\r
@param time string of time\r
**/\r
public void setTime(String time) {\r
\r
/**\r
getTime\r
- \r
+\r
This function is to get class member "time"\r
@return time string of time\r
**/\r
\r
/**\r
getPeImage\r
- \r
+\r
This function is to get class member "peImage".\r
@return name of PE image\r
**/\r
\r
/**\r
setPeImage\r
- \r
+\r
This function is to set class member "peImage"\r
@param peImage name of PE image\r
**/\r
\r
/**\r
getOutImage\r
- \r
+\r
This function is to get class member "outImage".\r
@return name of output EFI image\r
**/\r
\r
/**\r
setOutImage\r
- \r
+\r
This function is to set class member "outImage".\r
@param outImage name of output EFI image\r
**/\r
\r
/**\r
getComponentType\r
- \r
+\r
This function is to get class member "componentType".\r
- \r
+\r
@return string of componentType\r
**/\r
public String getComponentType() {\r
\r
/**\r
setComponentType\r
- \r
+\r
This function is to set class member "componentType".\r
@param componentType string of component type\r
**/\r
GenAcpiTable class.\r
\r
GenAcpiTable is used to call GenAcpiTable.exe to generate ACPI Table image .\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
GenAcpiTable class.\r
\r
/**\r
* execute\r
- * \r
+ *\r
* StripTask execute function is to assemble tool command line & execute\r
* tool command line\r
- * \r
+ *\r
* @throws BuidException\r
*/\r
public void execute() throws BuildException {\r
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());\r
revl = runner.execute();\r
- \r
+\r
if (EFI_SUCCESS == revl) {\r
//\r
// command execution success\r
\r
/**\r
* getInputFile\r
- * \r
+ *\r
* This function is to get class member "inputFile".\r
- * \r
+ *\r
* @return string of input file name.\r
*/\r
public String getInputFile() {\r
\r
/**\r
* setComponentType\r
- * \r
+ *\r
* This function is to set class member "inputFile".\r
- * \r
+ *\r
* @param inputFile\r
* string of input file name.\r
*/\r
\r
/**\r
* getOutputFile\r
- * \r
+ *\r
* This function is to get class member "outputFile"\r
- * \r
+ *\r
* @return outputFile string of output file name.\r
*/\r
public String getOutputFile() {\r
\r
/**\r
* setOutputFile\r
- * \r
+ *\r
* This function is to set class member "outputFile"\r
- * \r
+ *\r
* @param outputFile\r
* string of output file name.\r
*/\r
\r
/**\r
* getOutputDir\r
- * \r
+ *\r
* This function is to get class member "outputDir"\r
- * \r
+ *\r
* @return outputDir string of output directory.\r
*/\r
public String getOutputDir() {\r
\r
/**\r
* setOutputDir\r
- * \r
+ *\r
* This function is to set class member "outputDir"\r
- * \r
+ *\r
* @param outputDir\r
* string of output directory.\r
*/\r
GenCapsuleHdrTask class.\r
\r
GenCapsuleHdrTask is used to call GenCapsuleHdr.exe to generate capsule.\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
GenCapsuleHdrTask class.\r
/// tool name\r
///\r
private String toolName = "GenCapsuleHdr";\r
- \r
+\r
///\r
/// script file\r
///\r
/// Dump flag\r
///\r
private String dump = "";\r
- \r
+\r
///\r
/// Split size\r
///\r
private String size = "";\r
- \r
+\r
///\r
/// capsule into one image flag\r
///\r
private String joinFlag = "";\r
- \r
+\r
///\r
/// capsule file\r
///\r
\r
/**\r
* execute\r
- * \r
+ *\r
* GenCapsuleHdrTask execute function is to assemble tool command line & execute\r
* tool command line\r
- * \r
+ *\r
* @throws BuidException\r
*/\r
public void execute() throws BuildException {\r
\r
/**\r
* getInputFile\r
- * \r
+ *\r
* This function is to get class member "scriptFile".\r
- * \r
+ *\r
* @return string of input file name.\r
*/\r
public String getScriptFile() {\r
\r
/**\r
* setComponentType\r
- * \r
+ *\r
* This function is to set class member "inputFile".\r
- * \r
+ *\r
* @param inputFile\r
* string of input file name.\r
*/\r
\r
/**\r
* getOutputFile\r
- * \r
+ *\r
* This function is to get class member "outputFile"\r
- * \r
+ *\r
* @return outputFile string of output file name.\r
*/\r
public String getOutputFile() {\r
\r
/**\r
* setOutputFile\r
- * \r
+ *\r
* This function is to set class member "outputFile"\r
- * \r
+ *\r
* @param outputFile\r
* string of output file name.\r
*/\r
\r
/**\r
* getOutputDir\r
- * \r
+ *\r
* This function is to get class member "outputDir"\r
- * \r
+ *\r
* @return outputDir string of output directory.\r
*/\r
public String getOutputDir() {\r
\r
/**\r
* setOutputDir\r
- * \r
+ *\r
* This function is to set class member "outputDir"\r
- * \r
+ *\r
* @param outputDir\r
* string of output directory.\r
*/\r
\r
/**\r
* getVerbose\r
- * \r
+ *\r
* This function is to get class member "verbose"\r
- * \r
+ *\r
* @return verbose the flag of verbose.\r
*/\r
public String getVerbose() {\r
\r
/**\r
* setVerbose\r
- * \r
+ *\r
* This function is to set class member "verbose"\r
- * \r
+ *\r
* @param verbose\r
* True or False.\r
*/\r
\r
/**\r
* getDump\r
- * \r
+ *\r
* This function is to get class member "dump"\r
- * \r
+ *\r
* @return verbose the flag of dump.\r
*/\r
public String getDump() {\r
\r
/**\r
* setDump\r
- * \r
+ *\r
* This function is to set class member "dump".\r
- * \r
+ *\r
* @param dump\r
* True or False.\r
*/\r
\r
/**\r
* getSize\r
- * \r
+ *\r
* This function is to set class member "size".\r
- * \r
+ *\r
* @return size string of size value\r
*/\r
public String getSize() {\r
\r
/**\r
* setSize\r
- * \r
+ *\r
* This function is to set class member "size".\r
- * \r
+ *\r
* @param size string of size value.\r
*/\r
public void setSize(String size) {\r
\r
/**\r
* getCapsuleFile\r
- * \r
+ *\r
* This function is to get class member "capsuleFile"\r
- * \r
+ *\r
* @return capsuleFile capsule file name\r
*/\r
public String getCapsuleFile() {\r
\r
/**\r
* setCapsuleFile\r
- * \r
+ *\r
* This function is to set class member "capsuleFile"\r
- * \r
+ *\r
* @param capsuleFile capsule file name\r
*/\r
public void setCapsuleFile(String capsuleFile) {\r
\r
/**\r
* isJoinFlag\r
- * \r
+ *\r
* This function is to get class member "joinFlag"\r
- * \r
- * @return joinFlag flag of if need to join split capsule images into \r
+ *\r
+ * @return joinFlag flag of if need to join split capsule images into\r
* a single image.\r
*/\r
public String getJoinFlag() {\r
\r
/**\r
* setJoinFlag\r
- * \r
+ *\r
* This function is to set class member "joinFlag"\r
- * \r
- * @param joinFlag flag of if need to join split capsule images into \r
- * a single image. \r
+ *\r
+ * @param joinFlag flag of if need to join split capsule images into\r
+ * a single image.\r
*/\r
public void setJoinFlag(boolean joinFlag) {\r
if (joinFlag){\r
- this.joinFlag = "-j "; \r
+ this.joinFlag = "-j ";\r
}\r
- \r
+\r
}\r
}\r
GenTeImageTask class.\r
\r
GenTeImageTask is used to call GenTEImage.exe to generate TE image .\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
* GenTeImageTask class.\r
- * \r
+ *\r
* GenTeImageTask is used to call GenAcpiTable.exe to generate ACPI Table image .\r
*/\r
public class GenTeImageTask extends Task implements EfiDefine {\r
\r
/**\r
* assemble tool command line & execute tool command line\r
- * \r
+ *\r
* @throws BuildException\r
*/\r
/**\r
* execute\r
- * \r
+ *\r
* GenTeImgaeTask execute function is to assemble tool command line & execute\r
* tool command line\r
- * \r
+ *\r
* @throws BuidException\r
*/\r
public void execute() throws BuildException {\r
\r
/**\r
* getInputFile\r
- * \r
+ *\r
* This function is to get class member "inputFile".\r
- * \r
+ *\r
* @return string of input file name.\r
*/\r
public String getInputFile() {\r
\r
/**\r
* setComponentType\r
- * \r
+ *\r
* This function is to set class member "inputFile".\r
- * \r
+ *\r
* @param inputFile\r
* string of input file name.\r
*/\r
\r
/**\r
* getOutputFile\r
- * \r
+ *\r
* This function is to get class member "outputFile"\r
- * \r
+ *\r
* @return outputFile string of output file name.\r
*/\r
public String getOutputFile() {\r
\r
/**\r
* setOutputFile\r
- * \r
+ *\r
* This function is to set class member "outputFile"\r
- * \r
+ *\r
* @param outputFile\r
* string of output file name.\r
*/\r
\r
/**\r
* getOutputDir\r
- * \r
+ *\r
* This function is to get class member "outputDir"\r
- * \r
+ *\r
* @return outputDir string of output directory.\r
*/\r
public String getOutputDir() {\r
\r
/**\r
* setOutputDir\r
- * \r
+ *\r
* This function is to set class member "outputDir"\r
- * \r
+ *\r
* @param outputDir\r
* string of output directory.\r
*/\r
\r
/**\r
* getVerbose\r
- * \r
+ *\r
* This function is to get class member "verbose"\r
- * \r
+ *\r
* @return verbose the flag of verbose.\r
*/\r
public String getVerbose() {\r
\r
/**\r
* setVerbose\r
- * \r
+ *\r
* This function is to set class member "verbose"\r
- * \r
+ *\r
* @param verbose\r
* True or False.\r
*/\r
\r
/**\r
* getDump\r
- * \r
+ *\r
* This function is to get class member "dump"\r
- * \r
+ *\r
* @return verbose the flag of dump.\r
*/\r
public String getDump() {\r
\r
/**\r
* setDump\r
- * \r
+ *\r
* This function is to set class member "dump"\r
- * \r
+ *\r
* @param dump\r
* True or False.\r
*/\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
import org.apache.tools.ant.types.Path;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
Class MakeDeps is used to wrap MakeDeps.exe as an ANT task.\r
\r
///\r
/// if there's no source files, we can do nothing about dependency\r
- /// \r
+ ///\r
if (inputFileList.size() == 0) {\r
throw new BuildException("No source files specified to scan");\r
}\r
\r
///\r
/// compose the final file content\r
- /// \r
+ ///\r
StringBuffer cleanedLines = new StringBuffer(40960);\r
Iterator<String> it = lineSet.iterator();\r
while (it.hasNext()) {\r
ModifyInfTask class.\r
\r
ModifyInfTask is used to call Modify.exe to generate inf file.\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
ModifyInfTask class.\r
/// tool name\r
///\r
private String toolName = "ModifyInf";\r
- \r
+\r
///\r
/// input FV inf file\r
///\r
\r
///\r
/// Output dir\r
- /// \r
+ ///\r
private String outputDir = "";\r
- \r
+\r
/**\r
* execute\r
- * \r
+ *\r
* ModifyInfTask execute function is to assemble tool command line & execute\r
* tool command line\r
- * \r
+ *\r
* @throws BuidException\r
*/\r
public void execute() throws BuildException {\r
File file = new File(outputFVInfFileName);\r
if (!file.isAbsolute() && (!this.outputDir.equalsIgnoreCase(""))) {\r
argument = this.inputFVInfFileName +\r
- this.outputDir + \r
+ this.outputDir +\r
File.separatorChar +\r
this.outputFVInfFileName +\r
this.patternStr;\r
} else {\r
- argument = this.inputFVInfFileName + \r
+ argument = this.inputFVInfFileName +\r
this.outputFVInfFileName +\r
this.patternStr;\r
}\r
\r
/**\r
* getinputFVInfFileName\r
- * \r
+ *\r
* This function is to get class member "inputFVInfFileName".\r
- * \r
+ *\r
* @return string of input inf file name.\r
*/\r
public String getinputFVInfFileName() {\r
\r
/**\r
* setinputFVInfFileName\r
- * \r
+ *\r
* This function is to set class member "inputFVInfFileName".\r
- * \r
+ *\r
* @param inputFile\r
* string of input inf file name.\r
*/\r
\r
/**\r
* getoutputFVInfFileName\r
- * \r
+ *\r
* This function is to get class member "outputFVInfFileName"\r
- * \r
+ *\r
* @return outputFVInfFileName string of output inf file name.\r
*/\r
public String getoutputFVInfFileName() {\r
\r
/**\r
* setoutputFVInfFileName\r
- * \r
+ *\r
* This function is to set class member "outputFVInfFileName"\r
- * \r
+ *\r
* @param outputFVInfFileName\r
* string of output inf file name.\r
*/\r
\r
/**\r
* getpatternStr\r
- * \r
+ *\r
* This function is to get class member "patternStr"\r
- * \r
+ *\r
* @return patternStr string of pattern.\r
*/\r
public String getpatternStr() {\r
\r
/**\r
* setpatternStr\r
- * \r
+ *\r
* This function is to set class member "patternStr"\r
- * \r
+ *\r
* @param patternStr\r
* string of patternStr.\r
*/\r
\r
/**\r
* getoutputDir\r
- * \r
+ *\r
* This function is to get class member "outputDir"\r
- * \r
+ *\r
* @return outputDir string of output directory.\r
*/\r
public String getoutputDir() {\r
\r
/**\r
* setoutputDir\r
- * \r
+ *\r
* This function is to set class member "outputDir"\r
- * \r
+ *\r
* @param patternStr\r
* string of output directory.\r
*/\r
PeiReBaseTask class.\r
\r
PeiReBaseTask is used to call PeiReBase.exe to rebase efi fv file.\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
PeiReBaseTask class.\r
// / Output directory, this variable is added by jave wrap\r
// /\r
private String outputDir = "";\r
- \r
+\r
///\r
/// Base address\r
///\r
private String baseAddr = "";\r
- \r
+\r
///\r
- /// Architecture \r
+ /// Architecture\r
///\r
private String arch = "";\r
- \r
+\r
/**\r
* execute\r
- * \r
+ *\r
* PeiReBaseTask execute function is to assemble tool command line & execute\r
* tool command line\r
- * \r
+ *\r
* @throws BuidException\r
*/\r
public void execute() throws BuildException {\r
FrameworkLogger logger = new FrameworkLogger(project, toolName.toLowerCase());\r
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));\r
EdkLog.setLogger(logger);\r
- \r
+\r
//\r
// absolute path of efi tools\r
//\r
if (path != null) {\r
command = path + File.separatorChar + command;\r
}\r
- \r
+\r
//\r
// argument of tools\r
//\r
} else {\r
argument = inputFile + " " + "-O " + outputFile + " " + this.baseAddr+ " " + "-M " + outputFile + ".map";\r
}\r
- \r
+\r
//\r
// return value of fwimage execution\r
//\r
//\r
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
EdkLog.log(EdkLog.EDK_INFO, this.inputFileName);\r
- \r
+\r
revl = runner.execute();\r
- \r
+\r
if (EFI_SUCCESS == revl) {\r
//\r
// command execution success\r
\r
/**\r
* getInputFile\r
- * \r
+ *\r
* This function is to get class member "inputFile".\r
- * \r
+ *\r
* @return string of input file name.\r
*/\r
public String getInputFile() {\r
\r
/**\r
* setComponentType\r
- * \r
+ *\r
* This function is to set class member "inputFile".\r
- * \r
+ *\r
* @param inputFile\r
* string of input file name.\r
*/\r
\r
/**\r
* getOutputFile\r
- * \r
+ *\r
* This function is to get class member "outputFile"\r
- * \r
+ *\r
* @return outputFile string of output file name.\r
*/\r
public String getOutputFile() {\r
\r
/**\r
* setOutputFile\r
- * \r
+ *\r
* This function is to set class member "outputFile"\r
- * \r
+ *\r
* @param outputFile\r
* string of output file name.\r
*/\r
\r
/**\r
* getOutputDir\r
- * \r
+ *\r
* This function is to get class member "outputDir"\r
- * \r
+ *\r
* @return outputDir string of output directory.\r
*/\r
public String getOutputDir() {\r
\r
/**\r
* setOutputDir\r
- * \r
+ *\r
* This function is to set class member "outputDir"\r
- * \r
+ *\r
* @param outputDir\r
* string of output directory.\r
*/\r
\r
/**\r
* getBaseAddr\r
- * \r
+ *\r
* This function is to get class member "baseAddr"\r
- * \r
+ *\r
* @return baseAddr string of base address.\r
*/\r
public String getBaseAddr() {\r
\r
/**\r
* setBaseAddr\r
- * \r
+ *\r
* This function is to set class member "baseAddr"\r
- * \r
+ *\r
* @param baseAddr string of base address\r
*/\r
public void setBaseAddr(String baseAddr) {\r
\r
/**\r
* getArch\r
- * \r
+ *\r
* This function is to get class member "arch".\r
- * \r
+ *\r
* @return arch Architecture\r
*/\r
public String getArch() {\r
\r
/**\r
* setArch\r
- * \r
- * This function is to set class member "arch" \r
- * \r
+ *\r
+ * This function is to set class member "arch"\r
+ *\r
* @param arch Architecture\r
*/\r
public void setArch(String arch) {\r
\r
SecApResetVectorFixupTask is used to call SecApResetVectorFixup.exe to place\r
Ap reset vector.\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
SecApResetVectorFixupTask class.\r
\r
/**\r
* execute\r
- * \r
+ *\r
* SecApResetVectorFixupTask execute function is to assemble tool command line & execute\r
* tool command line\r
- * \r
+ *\r
* @throws BuidException\r
*/\r
public void execute() throws BuildException {\r
//\r
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
EdkLog.log(EdkLog.EDK_INFO, (new File(this.fvInputFile)).getName());\r
- \r
+\r
revl = runner.execute();\r
- \r
+\r
if (EFI_SUCCESS == revl) {\r
//\r
// command execution success\r
\r
/**\r
* getInputFile\r
- * \r
+ *\r
* This function is to get class member "fvInputFile".\r
- * \r
+ *\r
* @return string of input file name.\r
*/\r
public String getfvInputFile() {\r
\r
/**\r
* setComponentType\r
- * \r
+ *\r
* This function is to set class member "fvInputFile".\r
- * \r
+ *\r
* @param inputFile\r
* string of input file name.\r
*/\r
\r
/**\r
* getOutputFile\r
- * \r
+ *\r
* This function is to get class member "fvOutputFile"\r
- * \r
+ *\r
* @return outputFile string of output file name.\r
*/\r
public String getOutputFile() {\r
\r
/**\r
* setOutputFile\r
- * \r
+ *\r
* This function is to set class member "fvOutputFile"\r
- * \r
+ *\r
* @param outputFile\r
* string of output file name.\r
*/\r
\r
/**\r
* getOutputDir\r
- * \r
+ *\r
* This function is to get class member "outputDir"\r
- * \r
+ *\r
* @return outputDir string of output directory.\r
*/\r
public String getOutputDir() {\r
\r
/**\r
* setOutputDir\r
- * \r
+ *\r
* This function is to set class member "outputDir"\r
- * \r
+ *\r
* @param outputDir\r
* string of output directory.\r
*/\r
SecFixupTask class.\r
\r
SecFixupTask is used to call SecFixup.exe to fix up sec image.\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
* SecFixupTask class.\r
- * \r
+ *\r
* SecFixupTask is used to call SecFixup.exe to fix up sec image.\r
*/\r
public class SecFixupTask extends Task implements EfiDefine {\r
\r
/**\r
* execute\r
- * \r
+ *\r
* SecFixupTask execute function is to assemble tool command line & execute\r
* tool command line\r
- * \r
+ *\r
* @throws BuidException\r
*/\r
public void execute() throws BuildException {\r
\r
/**\r
* getSecExeFile\r
- * \r
+ *\r
* This function is to get class member "secExeFile".\r
- * \r
+ *\r
* @return string of sectExe file name.\r
*/\r
public String getSecExeFile() {\r
\r
/**\r
* setSecExeFile\r
- * \r
+ *\r
* This function is to set class member "secExeFile".\r
- * \r
+ *\r
* @param secExeFile\r
* string of secExe file name.\r
*/\r
\r
/**\r
* getResetVectorDataFile\r
- * \r
+ *\r
* This function is to get class member "resetVectorDataFile"\r
- * \r
+ *\r
* @return resetVectorDataFile string of resetVectorData file name.\r
*/\r
public String getResetVectorDataFile() {\r
\r
/**\r
* setResetVectorDataFile\r
- * \r
+ *\r
* This function is to set class member "resetVectorDataFile"\r
- * \r
+ *\r
* @param resetVectorDataFile\r
* string of resetVectorData file name.\r
*/\r
\r
/**\r
* getOutputFile\r
- * \r
+ *\r
* This function is to get class member "outputFile"\r
- * \r
+ *\r
* @return outputFile string of output file name.\r
*/\r
public String getOutputFile() {\r
\r
/**\r
* setOutputFile\r
- * \r
+ *\r
* This function is to set class member "outputFile"\r
- * \r
+ *\r
* @param outputFile\r
* string of output file name.\r
*/\r
\r
/**\r
* getOutputDir\r
- * \r
+ *\r
* This function is to get class member "outputDir"\r
- * \r
+ *\r
* @return outputDir name of output directory\r
*/\r
public String getOutputDir() {\r
\r
/**\r
* setOutputDir\r
- * \r
+ *\r
* This function is to set class member "outputDir"\r
- * \r
+ *\r
* @param outputDir\r
* name of output directory\r
*/\r
/** @file\r
SplitfileTask class.\r
\r
- SplitfileTask is used to call splitfile.exe to split input file to 2 output \r
+ SplitfileTask is used to call splitfile.exe to split input file to 2 output\r
file.\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
SplitfileTask class.\r
\r
- SplitfileTask is used to call splitfile.exe to split input file to 2 output \r
+ SplitfileTask is used to call splitfile.exe to split input file to 2 output\r
file.\r
**/\r
public class SplitfileTask extends Task implements EfiDefine {\r
///\r
private String offset = "";\r
\r
- \r
+\r
/**\r
* execute\r
- * \r
+ *\r
* SplitfleTask execute function is to assemble tool command line & execute\r
* tool command line\r
- * \r
+ *\r
* @throws BuidException\r
*/\r
public void execute() throws BuildException {\r
\r
Project project = this.getOwningTarget().getProject();\r
- \r
+\r
//\r
// set Logger\r
//\r
FrameworkLogger logger = new FrameworkLogger(project, "splitfile");\r
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));\r
EdkLog.setLogger(logger);\r
- \r
+\r
//\r
// absolute path of efi tools\r
//\r
} else {\r
command = path + File.separatorChar + "SplitFile";\r
}\r
- \r
+\r
//\r
// argument of tools\r
//\r
argument = inputFile + " " + offset;\r
- \r
+\r
//\r
// return value of fwimage execution\r
//\r
\r
runner.setAntRun(project);\r
runner.setCommandline(cmdline.getCommandline());\r
- \r
+\r
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());\r
revl = runner.execute();\r
\r
/**\r
* getInputFile\r
- * \r
+ *\r
* This function is to get class member "inputFile".\r
- * \r
+ *\r
* @return string of input file name.\r
*/\r
public String getInputFile() {\r
\r
/**\r
* setComponentType\r
- * \r
+ *\r
* This function is to set class member "inputFile".\r
- * \r
+ *\r
* @param inputFile\r
* string of input file name.\r
*/\r
\r
/**\r
getOffset\r
- \r
+\r
This function is to get class member "offset"\r
- \r
+\r
@return offset value of string.\r
**/\r
public String getOffset() {\r
\r
/**\r
setOffset\r
- \r
+\r
This function is to set class member "offset"\r
- \r
+\r
@param offset\r
string of offset value.\r
**/\r
public void setOffset(String offset) {\r
this.offset = offset;\r
}\r
- \r
+\r
}\r
StripTask class.\r
\r
StripTask is used to call Strip.exe to strip input file.\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
StripTask class.\r
// /\r
private String outputDir = "";\r
\r
- \r
+\r
/**\r
* execute\r
- * \r
+ *\r
* StripTask execute function is to assemble tool command line & execute\r
* tool command line\r
- * \r
+ *\r
* @throws BuidException\r
*/\r
public void execute() throws BuildException {\r
//\r
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));\r
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());\r
- \r
+\r
revl = runner.execute();\r
- \r
+\r
if (EFI_SUCCESS == revl) {\r
//\r
// command execution success\r
\r
/**\r
* getInputFile\r
- * \r
+ *\r
* This function is to get class member "inputFile".\r
- * \r
+ *\r
* @return string of input file name.\r
*/\r
public String getInputFile() {\r
\r
/**\r
* setComponentType\r
- * \r
+ *\r
* This function is to set class member "inputFile".\r
- * \r
+ *\r
* @param inputFile\r
* string of input file name.\r
*/\r
\r
/**\r
* getOutputFile\r
- * \r
+ *\r
* This function is to get class member "outputFile"\r
- * \r
+ *\r
* @return outputFile string of output file name.\r
*/\r
public String getOutputFile() {\r
\r
/**\r
* setOutputFile\r
- * \r
+ *\r
* This function is to set class member "outputFile"\r
- * \r
+ *\r
* @param outputFile\r
* string of output file name.\r
*/\r
\r
/**\r
* getOutputDir\r
- * \r
+ *\r
* This function is to get class member "outputDir"\r
- * \r
+ *\r
* @return outputDir string of output directory.\r
*/\r
public String getOutputDir() {\r
\r
/**\r
* setOutputDir\r
- * \r
+ *\r
* This function is to set class member "outputDir"\r
- * \r
+ *\r
* @param outputDir\r
* string of output directory.\r
*/\r
ZeroDebugDataTask class.\r
\r
ZeroDebugDataTask is used to call ZeroDebugData.exe to remove debug data.\r
- \r
- \r
+\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.apache.tools.ant.taskdefs.Execute;\r
import org.apache.tools.ant.taskdefs.LogStreamHandler;\r
import org.apache.tools.ant.types.Commandline;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
ZeroDebugDataTask class.\r
\r
/**\r
* execute\r
- * \r
+ *\r
* ZeroDebugDataTask execute function is to assemble tool command line & execute\r
* tool command line\r
- * \r
+ *\r
* @throws BuidException\r
*/\r
public void execute() throws BuildException {\r
EdkLog.log(EdkLog.EDK_INFO, (new File(this.peFile)).getName());\r
\r
revl = runner.execute();\r
- \r
+\r
if (EFI_SUCCESS == revl) {\r
//\r
// command execution success\r
\r
/**\r
* getPeFile\r
- * \r
+ *\r
* This function is to get class member "inputFile".\r
- * \r
+ *\r
* @return string of input file name.\r
*/\r
public String getPeFile() {\r
\r
/**\r
* setPeFile\r
- * \r
+ *\r
* This function is to set class member "peFile".\r
- * \r
+ *\r
* @param peFile\r
* string of input file name.\r
*/\r
\r
/**\r
* getOutputFile\r
- * \r
+ *\r
* This function is to get class member "outputFile"\r
- * \r
+ *\r
* @return outputFile string of output file name.\r
*/\r
public String getOutputFile() {\r
\r
/**\r
* setOutputFile\r
- * \r
+ *\r
* This function is to set class member "outputFile"\r
- * \r
+ *\r
* @param outputFile\r
* string of output file name.\r
*/\r
\r
/**\r
* getOutputDir\r
- * \r
+ *\r
* This function is to get class member "outputDir"\r
- * \r
+ *\r
* @return outputDir string of output directory.\r
*/\r
public String getOutputDir() {\r
\r
/**\r
* setOutputDir\r
- * \r
+ *\r
* This function is to set class member "outputDir"\r
- * \r
+ *\r
* @param outputDir\r
* string of output directory.\r
*/\r
/** @file\r
- This file is ANT task GenBuild. \r
- \r
- The file is used to parse a specified Module, and generate its build time \r
+ This file is ANT task GenBuild.\r
+\r
+ The file is used to parse a specified Module, and generate its build time\r
ANT script build.xml, then call the the ANT script to build the module.\r
- \r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
import org.apache.tools.ant.taskdefs.Property;\r
import org.apache.xmlbeans.XmlObject;\r
\r
+import org.tianocore.common.exception.EdkException;\r
+import org.tianocore.common.logger.EdkLog;\r
import org.tianocore.build.autogen.AutoGen;\r
import org.tianocore.build.fpd.FpdParserTask;\r
import org.tianocore.build.global.GenBuildLogger;\r
import org.tianocore.build.id.PackageIdentification;\r
import org.tianocore.build.id.PlatformIdentification;\r
import org.tianocore.build.tools.ModuleItem;\r
-import org.tianocore.exception.EdkException;\r
-import org.tianocore.logger.EdkLog;\r
\r
/**\r
<p>\r
system. The main function of this task is to parse module's surface area,\r
then generate the corresponding <em>BaseName_build.xml</em> (the real ANT\r
build script) and call this to build the module. The whole process including:\r
- 1. generate AutoGen.c and AutoGen.h; 2. build all dependent library instances; \r
+ 1. generate AutoGen.c and AutoGen.h; 2. build all dependent library instances;\r
3. build all source files inlcude AutoGen.c; 4. generate sections;\r
- 5. generate FFS file if it is driver module while LIB file if it is Library module. \r
+ 5. generate FFS file if it is driver module while LIB file if it is Library module.\r
</p>\r
- \r
+\r
<p>\r
The usage is (take module <em>HelloWorld</em> for example):\r
</p>\r
- \r
+\r
<pre>\r
- <GenBuild \r
- msaFilename="HelloWorld.msa"/> \r
+ <GenBuild\r
+ msaFilename="HelloWorld.msa"/>\r
processTo="ALL"/>\r
</pre>\r
- \r
- <p><code>processTo</code> provides a way to customize the whole build process. \r
- processTo can be one value of ALL, AUTOGEN, FILES, LIBRARYINSTANCES, SECTIONS, NONE. \r
- Default is ALL, means whole \r
+\r
+ <p><code>processTo</code> provides a way to customize the whole build process.\r
+ processTo can be one value of ALL, AUTOGEN, FILES, LIBRARYINSTANCES, SECTIONS, NONE.\r
+ Default is ALL, means whole\r
</p>\r
- \r
+\r
<p>\r
This task calls <code>AutoGen</code> to generate <em>AutoGen.c</em> and\r
<em>AutoGen.h</em>. The task also parses the development environment\r
configuration files, such as collecting package information, setting compiler\r
flags and so on.\r
</p>\r
- \r
- \r
+\r
+\r
@since GenBuild 1.0\r
**/\r
public class GenBuildTask extends Ant {\r
- \r
+\r
///\r
/// Module surface area file.\r
///\r
File msaFile;\r
\r
///\r
- /// \r
+ ///\r
///\r
private String type = "all"; // = "build";\r
- \r
+\r
///\r
/// Module's Identification.\r
///\r
private Vector<Property> properties = new Vector<Property>();\r
\r
private static Stack<Hashtable> backupPropertiesStack = new Stack<Hashtable>();\r
- \r
+\r
private boolean isSingleModuleBuild = false;\r
- \r
+\r
/**\r
Public construct method. It is necessary for ANT task.\r
**/\r
}\r
\r
/**\r
- \r
+\r
@throws BuildException\r
From module build, exception from module surface area invalid.\r
**/\r
Property item = iter.next();\r
getProject().setProperty(item.getName(), item.getValue());\r
}\r
- \r
+\r
//\r
// GenBuild should specify either msaFile or moduleGuid & packageGuid\r
//\r
else {\r
moduleId.setLibrary(true);\r
}\r
- \r
+\r
//\r
// Judge whether it is single module build or not\r
//\r
PlatformIdentification platformId = GlobalData.getPlatform(filename);\r
getProject().setProperty("PLATFORM_DIR", platformId.getFpdFile().getParent().replaceAll("(\\\\)", "/"));\r
getProject().setProperty("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));\r
- \r
+\r
String packageGuid = getProject().getProperty("PACKAGE_GUID");\r
String packageVersion = getProject().getProperty("PACKAGE_VERSION");\r
PackageIdentification packageId = new PackageIdentification(packageGuid, packageVersion);\r
moduleId.setPackage(packageId);\r
}\r
- \r
+\r
//\r
// If single module : intersection MSA supported ARCHs and tools def!!\r
// else, get arch from pass down\r
//\r
- Set<String> archListSupByToolChain = new LinkedHashSet<String>(); \r
- String[] archs = GlobalData.getToolChainInfo().getArchs(); \r
- \r
+ Set<String> archListSupByToolChain = new LinkedHashSet<String>();\r
+ String[] archs = GlobalData.getToolChainInfo().getArchs();\r
+\r
for (int i = 0; i < archs.length; i ++) {\r
archListSupByToolChain.add(archs[i]);\r
}\r
- \r
+\r
Set<String> archSet = new LinkedHashSet<String>();\r
- \r
+\r
if ( getProject().getProperty("ARCH") != null) {\r
String[] fpdArchList = getProject().getProperty("ARCH").split(" ");\r
- \r
+\r
for (int i = 0; i < fpdArchList.length; i++) {\r
if (archListSupByToolChain.contains(fpdArchList[i])) {\r
archSet.add(fpdArchList[i]);\r
}\r
}\r
else {\r
- archSet = archListSupByToolChain; \r
+ archSet = archListSupByToolChain;\r
}\r
- \r
+\r
String[] archList = archSet.toArray(new String[archSet.size()]);\r
- \r
+\r
//\r
// Judge if arch is all supported by current module. If not, throw Exception.\r
//\r
}\r
}\r
}\r
- \r
+\r
for (int k = 0; k < archList.length; k++) {\r
- \r
+\r
getProject().setProperty("ARCH", archList[k]);\r
- \r
+\r
FpdModuleIdentification fpdModuleId = new FpdModuleIdentification(moduleId, archList[k]);\r
- \r
+\r
//\r
// Whether the module is built before\r
//\r
} else {\r
GlobalData.registerBuiltModule(fpdModuleId);\r
}\r
- \r
+\r
//\r
// For Every TOOLCHAIN, TARGET\r
//\r
//\r
// check if any tool is defined for current target + toolchain + arch\r
// don't do anything if no tools found\r
- // \r
+ //\r
if (GlobalData.isCommandSet(targetList[i], toolchainList[j], archList[k]) == false) {\r
System.out.println("Warning: No build issued. No tools were found for [target=" + targetList[i] + " toolchain=" + toolchainList[j] + " arch=" + archList[k] + "]\n");\r
continue;\r
System.out.println("Build " + moduleId + " start >>>");\r
System.out.println("Target: " + targetList[i] + " Tagname: " + toolchainList[j] + " Arch: " + archList[k]);\r
SurfaceAreaQuery.setDoc(GlobalData.getDoc(fpdModuleId));\r
- \r
+\r
//\r
// Prepare for all other common properties\r
// PACKAGE, PACKAGE_GUID, PACKAGE_VERSION, PACKAGE_DIR, PACKAGE_RELATIVE_DIR\r
// SUBSYSTEM, ENTRYPOINT, EBC_TOOL_LIB_PATH\r
//\r
setModuleCommonProperties(archList[k]);\r
- \r
+\r
//\r
- // OutputManage prepare for \r
+ // OutputManage prepare for\r
// BIN_DIR, DEST_DIR_DEBUG, DEST_DIR_OUTPUT, BUILD_DIR, FV_DIR\r
//\r
OutputManager.getInstance().update(getProject());\r
- \r
+\r
if (type.equalsIgnoreCase("all") || type.equalsIgnoreCase("build")) {\r
applyBuild(targetList[i], toolchainList[j], fpdModuleId);\r
}\r
}\r
\r
/**\r
- This method is used to prepare Platform-related information. \r
- \r
+ This method is used to prepare Platform-related information.\r
+\r
<p>In Single Module Build mode, platform-related information is not ready.\r
- The method read the system environment variable <code>ACTIVE_PLATFORM</code> \r
+ The method read the system environment variable <code>ACTIVE_PLATFORM</code>\r
and search in the Framework Database. Note that platform name in the Framework\r
Database must be unique. </p>\r
- \r
+\r
**/\r
private void prepareSingleModuleBuild(){\r
//\r
// TBD: Enhance it!!!!\r
//\r
PackageIdentification packageId = GlobalData.getPackageForModule(moduleId);\r
- \r
+\r
moduleId.setPackage(packageId);\r
- \r
+\r
//\r
// Read ACTIVE_PLATFORM's FPD file (Call FpdParserTask's method)\r
//\r
String filename = getProject().getProperty("PLATFORM_FILE");\r
- \r
+\r
if (filename == null){\r
throw new BuildException("Please set ACTIVE_PLATFORM in the file: Tools/Conf/target.txt if you want to build a single module!");\r
}\r
- \r
+\r
PlatformIdentification platformId = GlobalData.getPlatform(filename);\r
- \r
+\r
//\r
// Read FPD file\r
//\r
FpdParserTask fpdParser = new FpdParserTask();\r
fpdParser.setProject(getProject());\r
fpdParser.parseFpdFile(platformId.getFpdFile());\r
- \r
+\r
//\r
// Prepare for Platform related common properties\r
// PLATFORM, PLATFORM_DIR, PLATFORM_RELATIVE_DIR\r
getProject().setProperty("PACKAGE_VERSION", packageId.getVersion());\r
getProject().setProperty("PACKAGE_DIR", packageId.getPackageDir().replaceAll("(\\\\)", "/"));\r
getProject().setProperty("PACKAGE_RELATIVE_DIR", packageId.getPackageRelativeDir().replaceAll("(\\\\)", "/"));\r
- \r
+\r
//\r
// MODULE or BASE_NAME, GUID or FILE_GUID, VERSION, MODULE_TYPE\r
// MODULE_DIR, MODULE_RELATIVE_DIR\r
getProject().setProperty("MODULE_TYPE", moduleId.getModuleType());\r
getProject().setProperty("MODULE_DIR", moduleId.getMsaFile().getParent().replaceAll("(\\\\)", "/"));\r
getProject().setProperty("MODULE_RELATIVE_DIR", moduleId.getModuleRelativePath().replaceAll("(\\\\)", "/"));\r
- \r
+\r
//\r
// SUBSYSTEM\r
//\r
String[][] subsystemMap = { { "BASE", "EFI_BOOT_SERVICE_DRIVER"},\r
- { "SEC", "EFI_BOOT_SERVICE_DRIVER" }, \r
- { "PEI_CORE", "EFI_BOOT_SERVICE_DRIVER" }, \r
- { "PEIM", "EFI_BOOT_SERVICE_DRIVER" }, \r
+ { "SEC", "EFI_BOOT_SERVICE_DRIVER" },\r
+ { "PEI_CORE", "EFI_BOOT_SERVICE_DRIVER" },\r
+ { "PEIM", "EFI_BOOT_SERVICE_DRIVER" },\r
{ "DXE_CORE", "EFI_BOOT_SERVICE_DRIVER" },\r
- { "DXE_DRIVER", "EFI_BOOT_SERVICE_DRIVER" }, \r
- { "DXE_RUNTIME_DRIVER", "EFI_RUNTIME_DRIVER" }, \r
- { "DXE_SAL_DRIVER", "EFI_BOOT_SERVICE_DRIVER" }, \r
- { "DXE_SMM_DRIVER", "EFI_BOOT_SERVICE_DRIVER" }, \r
- { "TOOL", "EFI_BOOT_SERVICE_DRIVER" }, \r
+ { "DXE_DRIVER", "EFI_BOOT_SERVICE_DRIVER" },\r
+ { "DXE_RUNTIME_DRIVER", "EFI_RUNTIME_DRIVER" },\r
+ { "DXE_SAL_DRIVER", "EFI_BOOT_SERVICE_DRIVER" },\r
+ { "DXE_SMM_DRIVER", "EFI_BOOT_SERVICE_DRIVER" },\r
+ { "TOOL", "EFI_BOOT_SERVICE_DRIVER" },\r
{ "UEFI_DRIVER", "EFI_BOOT_SERVICE_DRIVER" },\r
- { "UEFI_APPLICATION", "EFI_APPLICATION" }, \r
- { "USER_DEFINED", "EFI_BOOT_SERVICE_DRIVER"} }; \r
- \r
+ { "UEFI_APPLICATION", "EFI_APPLICATION" },\r
+ { "USER_DEFINED", "EFI_BOOT_SERVICE_DRIVER"} };\r
+\r
String subsystem = "EFI_BOOT_SERVICE_DRIVER";\r
for (int i = 0; i < subsystemMap.length; i++) {\r
if (moduleId.getModuleType().equalsIgnoreCase(subsystemMap[i][0])) {\r
}\r
}\r
getProject().setProperty("SUBSYSTEM", subsystem);\r
- \r
+\r
//\r
// ENTRYPOINT\r
//\r
else {\r
getProject().setProperty("ENTRYPOINT", "_ModuleEntryPoint");\r
}\r
- \r
+\r
getProject().setProperty("OBJECTS", "");\r
}\r
\r
String cmdName = GlobalData.getCommandSetting(key, fpdModuleId);\r
File cmdFile = new File(cmdPath + File.separatorChar + cmdName);\r
getProject().setProperty(cmd[m], cmdFile.getPath().replaceAll("(\\\\)", "/"));\r
- \r
+\r
//\r
// set CC_FLAGS\r
//\r
Set<String> subset = new LinkedHashSet<String>();\r
putFlagsToSet(addset, cmdFlags);\r
getProject().setProperty(cmd[m] + "_FLAGS", getProject().replaceProperties(getFlags(addset, subset)));\r
- \r
+\r
//\r
// Set CC_EXT\r
//\r
else {\r
getProject().setProperty(cmd[m] + "_EXT", "");\r
}\r
- \r
+\r
//\r
// set CC_FAMILY\r
//\r
if (toolChainFamily != null) {\r
getProject().setProperty(cmd[m] + "_FAMILY", toolChainFamily);\r
}\r
- \r
+\r
//\r
// set CC_SPATH\r
//\r
else {\r
getProject().setProperty(cmd[m] + "_SPATH", "");\r
}\r
- \r
+\r
//\r
// set CC_DPATH\r
//\r
}\r
}\r
}\r
- \r
+\r
public void setMsaFile(File msaFile) {\r
this.msaFile = msaFile;\r
}\r
\r
/**\r
- Method is for ANT to initialize MSA file. \r
- \r
+ Method is for ANT to initialize MSA file.\r
+\r
@param msaFilename MSA file name\r
**/\r
public void setMsaFile(String msaFilename) {\r
String moduleDir = getProject().getProperty("MODULE_DIR");\r
- \r
+\r
//\r
// If is Single Module Build, then use the Base Dir defined in build.xml\r
//\r
}\r
msaFile = new File(moduleDir + File.separatorChar + msaFilename);\r
}\r
- \r
+\r
public void addConfiguredModuleItem(ModuleItem moduleItem) {\r
PackageIdentification packageId = new PackageIdentification(moduleItem.getPackageGuid(), moduleItem.getPackageVersion());\r
ModuleIdentification moduleId = new ModuleIdentification(moduleItem.getModuleGuid(), moduleItem.getModuleVersion());\r
moduleId.setPackage(packageId);\r
this.moduleId = moduleId;\r
}\r
- \r
+\r
/**\r
- Add a property. \r
- \r
+ Add a property.\r
+\r
@param p property\r
**/\r
public void addProperty(Property p) {\r
public void setType(String type) {\r
this.type = type;\r
}\r
- \r
+\r
private void applyBuild(String buildTarget, String buildTagname, FpdModuleIdentification fpdModuleId) throws EdkException{\r
//\r
// AutoGen\r
//\r
- \r
+\r
AutoGen autogen = new AutoGen(getProject().getProperty("FV_DIR"), getProject().getProperty("DEST_DIR_DEBUG"), fpdModuleId.getModule(),fpdModuleId.getArch());\r
autogen.genAutogen();\r
- \r
- \r
+\r
+\r
//\r
// Get compiler flags\r
//\r
getCompilerFlags(buildTarget, buildTagname, fpdModuleId);\r
- \r
+\r
//\r
// Prepare LIBS\r
//\r
propertyLibs += " " + getProject().getProperty("BIN_DIR") + File.separatorChar + libinstances[i].getName() + ".lib";\r
}\r
getProject().setProperty("LIBS", propertyLibs.replaceAll("(\\\\)", "/"));\r
- \r
+\r
//\r
// if it is CUSTOM_BUILD\r
// then call the exist BaseName_build.xml directly.\r
ant.execute();\r
return ;\r
}\r
- \r
+\r
//\r
// Generate ${BASE_NAME}_build.xml\r
// TBD\r
ModuleBuildFileGenerator fileGenerator = new ModuleBuildFileGenerator(getProject(), ffsKeyword, fpdModuleId);\r
String buildFilename = getProject().getProperty("DEST_DIR_OUTPUT") + File.separatorChar + moduleId.getName() + "_build.xml";\r
fileGenerator.genBuildFile(buildFilename);\r
- \r
+\r
//\r
// Ant call ${BASE_NAME}_build.xml\r
//\r
ant.init();\r
ant.execute();\r
}\r
- \r
+\r
private void applyClean(FpdModuleIdentification fpdModuleId){\r
//\r
// if it is CUSTOM_BUILD\r
ant.execute();\r
return ;\r
}\r
- \r
+\r
Ant ant = new Ant();\r
ant.setProject(getProject());\r
ant.setAntfile(getProject().getProperty("DEST_DIR_OUTPUT") + File.separatorChar + moduleId.getName() + "_build.xml");\r
ant.setInheritAll(true);\r
ant.init();\r
ant.execute();\r
- \r
+\r
//\r
// Delete current module's DEST_DIR_OUTPUT\r
// TBD\r
}\r
- \r
+\r
private void applyCleanall(FpdModuleIdentification fpdModuleId){\r
//\r
// if it is CUSTOM_BUILD\r
ant.execute();\r
return ;\r
}\r
- \r
+\r
Ant ant = new Ant();\r
ant.setProject(getProject());\r
ant.setAntfile(getProject().getProperty("DEST_DIR_OUTPUT") + File.separatorChar + moduleId.getName() + "_build.xml");\r
ant.setInheritAll(true);\r
ant.init();\r
ant.execute();\r
- \r
+\r
//\r
// Delete current module's DEST_DIR_OUTPUT\r
// TBD\r
\r
/**\r
Separate the string and instore in set.\r
- \r
- <p> String is separated by Java Regulation Expression \r
+\r
+ <p> String is separated by Java Regulation Expression\r
"[^\\\\]?(\".*?[^\\\\]\")[ \t,]+". </p>\r
- \r
+\r
<p>For example: </p>\r
- \r
+\r
<pre>\r
"/nologo", "/W3", "/WX"\r
"/C", "/DSTRING_DEFINES_FILE=\"BdsStrDefs.h\""\r
</pre>\r
- \r
+\r
@param set store the separated string\r
@param str string to separate\r
**/\r
set.add(item);\r
}\r
}\r
- \r
+\r
/**\r
- Generate the final flags string will be used by compile command. \r
- \r
+ Generate the final flags string will be used by compile command.\r
+\r
@param add the add flags set\r
@param sub the sub flags set\r
@return final flags after add set substract sub set\r
private void pushProperties() {\r
backupPropertiesStack.push(getProject().getProperties());\r
}\r
- \r
+\r
private void popProperties() {\r
Hashtable backupProperties = backupPropertiesStack.pop();\r
Set keys = backupProperties.keySet();\r
\r
This class is to generate Autogen.h and Autogen.c according to module surface area\r
or library surface area.\r
- \r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
import org.tianocore.build.id.ModuleIdentification;\r
import org.tianocore.build.id.PackageIdentification;\r
import org.tianocore.build.pcd.action.PCDAutoGenAction;\r
-import org.tianocore.logger.EdkLog;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
\r
/**\r
* This class is to generate Autogen.h and Autogen.c according to module surface\r
// / The output path of Autogen.h and Autogen.c\r
// /\r
private String outputPath;\r
- /// \r
- /// The name of FV directory \r
- /// \r
+ ///\r
+ /// The name of FV directory\r
+ ///\r
private String fvDir;\r
// /\r
// / The base name of module or library.\r
// / dependence on library instance surface area.\r
// /\r
private Set<String> mGuidList = new HashSet<String>();\r
- \r
+\r
//\r
// The dependence package list which recoreded in module or library surface\r
// area and it's dependence on library instance surface are.\r
private List<PackageIdentification> mDepPkgList = new LinkedList<PackageIdentification>();\r
\r
//\r
- // For non library module, add its library instance's construct and destructor to \r
+ // For non library module, add its library instance's construct and destructor to\r
// list.\r
- // \r
+ //\r
private List<String> libConstructList = new ArrayList<String>();\r
private List<String> libDestructList = new ArrayList<String>();\r
\r
//\r
- // List to store SetVirtalAddressMapCallBack, ExitBootServiceCallBack \r
- // \r
+ // List to store SetVirtalAddressMapCallBack, ExitBootServiceCallBack\r
+ //\r
private List<String> setVirtalAddList = new ArrayList<String>();\r
private List<String> exitBootServiceList = new ArrayList<String>();\r
\r
- \r
+\r
/**\r
* Construct function\r
- * \r
+ *\r
* This function mainly initialize some member variable.\r
- * \r
+ *\r
* @param outputPath\r
* Output path of AutoGen file.\r
* @param baseName\r
\r
/**\r
* saveFile function\r
- * \r
+ *\r
* This function save the content in stringBuffer to file.\r
- * \r
+ *\r
* @param fileName\r
* The name of file.\r
* @param fileBuffer\r
\r
/**\r
* genAutogen function\r
- * \r
+ *\r
* This function call libGenAutoGen or moduleGenAutogen function, which\r
* dependence on generate library autogen or module autogen.\r
- * \r
+ *\r
* @throws BuildException\r
* Failed to creat AutoGen.c & AutoGen.h.\r
*/\r
\r
/**\r
* moduleGenAutogen function\r
- * \r
+ *\r
* This function generates AutoGen.c & AutoGen.h for module.\r
- * \r
+ *\r
* @throws BuildException\r
* Faile to create module AutoGen.c & AutoGen.h.\r
*/\r
\r
/**\r
* libGenAutogen function\r
- * \r
+ *\r
* This function generates AutoGen.c & AutoGen.h for library.\r
- * \r
+ *\r
* @throws BuildException\r
* Faile to create library AutoGen.c & AutoGen.h\r
*/\r
\r
/**\r
* moduleGenAutogenH\r
- * \r
+ *\r
* This function generates AutoGen.h for module.\r
- * \r
+ *\r
* @throws BuildException\r
* Failed to generate AutoGen.h.\r
*/\r
fileBuffer.append("\r\n");\r
\r
//\r
- // If is TianoR8FlashMap, copy {Fv_DIR}/FlashMap.h to \r
+ // If is TianoR8FlashMap, copy {Fv_DIR}/FlashMap.h to\r
// {DEST_DIR_DRBUG}/FlashMap.h\r
- // \r
+ //\r
if (SurfaceAreaQuery.isHaveTianoR8FlashMap()) {\r
fileBuffer.append(CommonDefinition.include);\r
fileBuffer.append(" <");\r
\r
/**\r
* moduleGenAutogenC\r
- * \r
+ *\r
* This function generates AutoGen.c for module.\r
- * \r
+ *\r
* @throws BuildException\r
* Failed to generate AutoGen.c.\r
*/\r
// autogen.c\r
//\r
LibInstanceToAutogenC(fileBuffer);\r
- \r
+\r
//\r
// Get module dependent Package identification.\r
//\r
if (!this.mDepPkgList.contains(packages[i])){\r
this.mDepPkgList.add(packages[i]);\r
}\r
- \r
+\r
}\r
- \r
+\r
//\r
// Write consumed ppi, guid, protocol to autogen.c\r
//\r
GuidGuidToAutogenC(fileBuffer);\r
\r
//\r
- // Call pcd autogen. \r
+ // Call pcd autogen.\r
//\r
this.myPcdAutogen = new PCDAutoGenAction(moduleId, this.arch, false, null);\r
try {\r
} catch (Exception exp) {\r
throw new PcdAutogenException (exp.getMessage());\r
}\r
- \r
+\r
if (this.myPcdAutogen != null) {\r
fileBuffer.append("\r\n");\r
fileBuffer.append(this.myPcdAutogen.OutputC());\r
\r
/**\r
* libGenAutogenH\r
- * \r
+ *\r
* This function generates AutoGen.h for library.\r
- * \r
+ *\r
* @throws BuildException\r
* Failed to generate AutoGen.c.\r
*/\r
\r
//\r
// Write consumed package's mdouleInfo related *.h file to autogen.h.\r
- // \r
+ //\r
moduleType = SurfaceAreaQuery.getModuleType();\r
PackageIdentification[] cosumedPkglist = SurfaceAreaQuery\r
.getDependencePkg(this.arch);\r
fileBuffer.append("\r\n");\r
\r
//\r
- // If is TianoR8FlashMap, copy {Fv_DIR}/FlashMap.h to \r
+ // If is TianoR8FlashMap, copy {Fv_DIR}/FlashMap.h to\r
// {DEST_DIR_DRBUG}/FlashMap.h\r
- // \r
+ //\r
if (SurfaceAreaQuery.isHaveTianoR8FlashMap()) {\r
fileBuffer.append(CommonDefinition.include);\r
fileBuffer.append(" <");\r
\r
/**\r
* libGenAutogenC\r
- * \r
+ *\r
* This function generates AutoGen.h for library.\r
- * \r
+ *\r
* @throws BuildException\r
* Failed to generate AutoGen.c.\r
*/\r
fileBuffer.append("\r\n");\r
\r
//\r
- // Call pcd autogen. \r
+ // Call pcd autogen.\r
//\r
this.myPcdAutogen = new PCDAutoGenAction(this.moduleId,\r
this.arch,\r
- true, \r
+ true,\r
SurfaceAreaQuery.getModulePcdEntryNameArray());\r
try {\r
this.myPcdAutogen.execute();\r
\r
/**\r
* LibraryClassToAutogenH\r
- * \r
+ *\r
* This function returns *.h files declared by library classes which are\r
* consumed or produced by current build module or library.\r
- * \r
+ *\r
* @param libClassList\r
* List of library class which consumed or produce by current\r
* build module or library.\r
\r
/**\r
* IncludesToAutogenH\r
- * \r
+ *\r
* This function add include file in AutoGen.h file.\r
- * \r
+ *\r
* @param packageNameList\r
* List of module depended package.\r
* @param moduleType\r
\r
/**\r
* EntryPointToAutoGen\r
- * \r
+ *\r
* This function convert <ModuleEntryPoint> & <ModuleUnloadImage>\r
* information in mas to AutoGen.c\r
- * \r
+ *\r
* @param entryPointList\r
* List of entry point.\r
* @param fileBuffer\r
.append(" IN EFI_PEI_SERVICES **PeiServices\r\n");\r
fileBuffer.append(" );\r\n");\r
entryPointCount++;\r
- \r
+\r
}\r
\r
fileBuffer.append("EFI_STATUS\r\n");\r
fileBuffer.append(" )\r\n\r\n");\r
fileBuffer.append("{\r\n");\r
\r
- \r
+\r
for (int i = 0; i < entryPointList.length; i++) {\r
fileBuffer\r
.append(" if (SetJump (&mJumpContext) == 0) {\r\n");\r
fileBuffer.append(" (ImageHandle, SystemTable));\r\n");\r
fileBuffer.append(" ASSERT (FALSE);\r\n");\r
fileBuffer.append(" }\r\n");\r
- \r
+\r
}\r
fileBuffer.append(" return mDriverEntryPointStatus;\r\n");\r
fileBuffer.append("}\r\n\r\n");\r
fileBuffer.append(" LongJump (&mJumpContext, (UINTN)-1);\r\n");\r
fileBuffer.append(" ASSERT (FALSE);\r\n");\r
fileBuffer.append("}\r\n\r\n");\r
- \r
+\r
}\r
- \r
- \r
+\r
+\r
//\r
// Add "ModuleUnloadImage" for DxeSmmDriver module type;\r
//\r
fileBuffer.append("{\r\n");\r
fileBuffer.append(" return EFI_SUCCESS;\r\n");\r
fileBuffer.append("}\r\n");\r
- \r
+\r
}else {\r
for (int i = 0; i < entryPointList.length; i++) {\r
- \r
+\r
fileBuffer.append("EFI_STATUS\r\n");\r
fileBuffer.append("EFIAPI\r\n");\r
fileBuffer.append(entryPointList[i]);\r
fileBuffer.append("}\r\n\r\n");\r
\r
}\r
- \r
+\r
//\r
// Add ModuleUnloadImage for DxeDriver and UefiDriver module type.\r
//\r
\r
/**\r
* PpiGuidToAutogenc\r
- * \r
+ *\r
* This function gets GUIDs from SPD file accrodeing to <PPIs> information\r
* and write those GUIDs to AutoGen.c.\r
- * \r
+ *\r
* @param fileBuffer\r
* String Buffer for Autogen.c file.\r
* @throws BuildException\r
// Get the all PPI adn PPI Notify from MSA file,\r
// then add those PPI ,and PPI Notify name to list.\r
//\r
- \r
+\r
String[] ppiList = SurfaceAreaQuery.getPpiArray(this.arch);\r
for (int i = 0; i < ppiList.length; i++) {\r
this.mPpiList.add(ppiList[i]);\r
\r
/**\r
* ProtocolGuidToAutogenc\r
- * \r
+ *\r
* This function gets GUIDs from SPD file accrodeing to <Protocol>\r
* information and write those GUIDs to AutoGen.c.\r
- * \r
+ *\r
* @param fileBuffer\r
* String Buffer for Autogen.c file.\r
* @throws BuildException\r
//\r
Iterator protocolIterator = this.mProtocolList.iterator();\r
String protocolKeyWord = null;\r
- \r
- \r
+\r
+\r
while (protocolIterator.hasNext()) {\r
protocolKeyWord = protocolIterator.next().toString();\r
cNameGuid = GlobalData.getProtocolGuid(this.mDepPkgList, protocolKeyWord);\r
\r
/**\r
* GuidGuidToAutogenc\r
- * \r
+ *\r
* This function gets GUIDs from SPD file accrodeing to <Guids> information\r
* and write those GUIDs to AutoGen.c.\r
- * \r
+ *\r
* @param fileBuffer\r
* String Buffer for Autogen.c file.\r
- * \r
+ *\r
*/\r
void GuidGuidToAutogenC(StringBuffer fileBuffer) throws AutoGenException {\r
String[] cNameGuid = null;\r
\r
/**\r
* LibInstanceToAutogenC\r
- * \r
+ *\r
* This function adds dependent library instance to autogen.c,which\r
* includeing library's constructor, destructor, and library dependent ppi,\r
* protocol, guid, pcd information.\r
- * \r
+ *\r
* @param fileBuffer\r
* String buffer for AutoGen.c\r
* @throws BuildException\r
\r
/**\r
* LibConstructorToAutogenc\r
- * \r
+ *\r
* This function writes library constructor list to AutoGen.c. The library\r
* constructor's parameter and return value depend on module type.\r
- * \r
+ *\r
* @param libInstanceList\r
* List of library construct name.\r
* @param moduleType\r
\r
/**\r
* LibDestructorToAutogenc\r
- * \r
+ *\r
* This function writes library destructor list to AutoGen.c. The library\r
* destructor's parameter and return value depend on module type.\r
- * \r
+ *\r
* @param libInstanceList\r
* List of library destructor name.\r
* @param moduleType\r
//\r
// If no library destructor function, return EFI_SUCCESS.\r
//\r
- \r
+\r
for (int i = 0; i < libInstanceList.size(); i++) {\r
if (isFirst) {\r
fileBuffer.append(" EFI_STATUS Status;\r\n");\r
\r
/**\r
* ExternsDriverBindingToAutoGenC\r
- * \r
+ *\r
* This function is to write DRIVER_BINDING, COMPONENT_NAME,\r
* DRIVER_CONFIGURATION, DRIVER_DIAGNOSTIC in AutoGen.c.\r
- * \r
+ *\r
* @param fileBuffer\r
* String buffer for AutoGen.c\r
*/\r
\r
/**\r
* ExternCallBackToAutoGenC\r
- * \r
+ *\r
* This function adds <SetVirtualAddressMapCallBack> and\r
* <ExitBootServicesCallBack> infomation to AutoGen.c\r
- * \r
+ *\r
* @param fileBuffer\r
* String buffer for AutoGen.c\r
* @throws BuildException\r
void ExternCallBackToAutoGenC(StringBuffer fileBuffer)\r
throws BuildException {\r
//\r
- // Collect module's <SetVirtualAddressMapCallBack> and \r
- // <ExitBootServiceCallBack> and add to setVirtualAddList \r
+ // Collect module's <SetVirtualAddressMapCallBack> and\r
+ // <ExitBootServiceCallBack> and add to setVirtualAddList\r
// exitBootServiceList.\r
- // \r
+ //\r
String[] setVirtuals = SurfaceAreaQuery.getSetVirtualAddressMapCallBackArray();\r
String[] exitBoots = SurfaceAreaQuery.getExitBootServicesCallBackArray();\r
if (setVirtuals != null) {\r
}\r
//\r
// Add c code in autogen.c which relate to <SetVirtualAddressMapCallBack>\r
- // and <ExitBootServicesCallBack> \r
- // \r
+ // and <ExitBootServicesCallBack>\r
+ //\r
String moduleType = this.moduleId.getModuleType();\r
boolean UefiOrDxeModule = false;\r
int Count = 0;\r
}\r
//\r
// If module is not DXE_DRIVER, DXE_RUNTIME_DIRVER, UEFI_DRIVER\r
- // UEFI_APPLICATION and DXE_SAL_DRIVER add the NULL at the end of \r
- // _gDriverSetVirtualAddressMapEvent list. \r
+ // UEFI_APPLICATION and DXE_SAL_DRIVER add the NULL at the end of\r
+ // _gDriverSetVirtualAddressMapEvent list.\r
//\r
if (!UefiOrDxeModule) {\r
fileBuffer.append(",\r\n NULL");\r
}\r
\r
private void copyFlashMapHToDebugDir() throws AutoGenException{\r
- \r
+\r
File inFile = new File(fvDir + File.separatorChar + CommonDefinition.flashMapH);\r
int size = (int)inFile.length();\r
byte[] buffer = new byte[size];\r
File outFile = new File (this.outputPath + File.separatorChar + CommonDefinition.tianoR8FlashMapH);\r
//\r
- // If TianoR8FlashMap.h existed and the flashMap.h don't change, \r
+ // If TianoR8FlashMap.h existed and the flashMap.h don't change,\r
// do nothing.\r
- // \r
+ //\r
if ((!outFile.exists()) ||(inFile.lastModified() - outFile.lastModified()) >= 0) {\r
try{\r
if (inFile.exists()) {\r
}\r
}\r
}\r
- \r
+\r
/**\r
*This function first order the library instances, then collect\r
*library instance 's PPI, Protocol, GUID,\r
.getLibDestructorName();\r
\r
//\r
- // Collect SetVirtualAddressMapCallBack and \r
+ // Collect SetVirtualAddressMapCallBack and\r
// ExitBootServiceCallBack.\r
- // \r
+ //\r
setVirtuals = SurfaceAreaQuery.getSetVirtualAddressMapCallBackArray();\r
exitBoots = SurfaceAreaQuery.getExitBootServicesCallBackArray();\r
if (setVirtuals != null) {\r
GenBuildException class.\r
\r
The class handle the exception throwed by entity class.\r
- \r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-**/ \r
+**/\r
package org.tianocore.build.exception;\r
\r
-import org.tianocore.exception.EdkException;\r
+import org.tianocore.common.exception.EdkException;\r
\r
/**\r
The class handle the exception throwed by entity class.\r
static final long serialVersionUID = -8034897190740066937L;\r
/**\r
Constructure function\r
- \r
+\r
@param expStr exception message string.\r
**/\r
public GenBuildException(String expStr) {\r
super("[GenBuildException]:" + expStr);\r
}\r
- \r
+\r
public GenBuildException() {\r
super();\r
}\r
TianoToolsException class.\r
\r
The class handle the exception throwed by entity class.\r
- \r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. 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
http://opensource.org/licenses/bsd-license.php\r
- \r
+\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-**/ \r
+**/\r
package org.tianocore.build.exception;\r
\r
-import org.tianocore.exception.EdkException;\r
+import org.tianocore.common.exception.EdkException;\r
\r
/**\r
The class handle the exception throwed by entity class.\r
static final long serialVersionUID = -8034897190740066935L;\r
/**\r
Constructure function\r
- \r
+\r
@param expStr exception message string.\r
**/\r
public TianoToolsException(String expStr) {\r
super("[TianoToolsException]:" + expStr);\r
}\r
- \r
+\r
public TianoToolsException() {\r
super();\r
}\r
- \r
+\r
public TianoToolsException (Exception e, String message){\r
super(e, message);\r
}\r
/** @file\r
- This file is ANT task FpdParserTask. \r
- \r
+ This file is ANT task FpdParserTask.\r
+\r
FpdParserTask is used to parse FPD (Framework Platform Description) and generate\r
- build.out.xml. It is for Package or Platform build use. \r
- \r
+ build.out.xml. It is for Package or Platform build use.\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
import org.apache.tools.ant.taskdefs.Property;\r
import org.apache.xmlbeans.XmlObject;\r
\r
+import org.tianocore.common.exception.EdkException;\r
+import org.tianocore.pcd.action.ActionMessage;\r
import org.tianocore.build.global.GlobalData;\r
import org.tianocore.build.global.OutputManager;\r
import org.tianocore.build.global.SurfaceAreaQuery;\r
import org.tianocore.build.id.FpdModuleIdentification;\r
import org.tianocore.build.id.ModuleIdentification;\r
import org.tianocore.build.id.PlatformIdentification;\r
-import org.tianocore.pcd.action.ActionMessage;\r
import org.tianocore.build.pcd.action.PlatformPcdPreprocessActionForBuilding;\r
import org.tianocore.build.toolchain.ToolChainAttribute;\r
import org.tianocore.build.toolchain.ToolChainElement;\r
import org.tianocore.build.toolchain.ToolChainMap;\r
-import org.tianocore.exception.EdkException;\r
\r
/**\r
<code>FpdParserTask</code> is an ANT task. The main function is parsing Framework\r
- Platform Descritpion (FPD) XML file and generating its ANT build script for \r
- corresponding platform. \r
+ Platform Descritpion (FPD) XML file and generating its ANT build script for\r
+ corresponding platform.\r
\r
<p>The task sets global properties PLATFORM, PLATFORM_DIR, PLATFORM_RELATIVE_DIR\r
and BUILD_DIR. </p>\r
- \r
+\r
<p>The task generates ${PLATFORM}_build.xml file which will be called by top level\r
- build.xml. The task also generate Fv.inf files (File is for Tool GenFvImage) \r
+ build.xml. The task also generate Fv.inf files (File is for Tool GenFvImage)\r
and flash definition file (File is for Tool FlashMap) if necessary. </p>\r
- \r
+\r
<p>FpdParserTask task stores all FPD information to GlobalData. And parse\r
tools definition file to set up compiler options for different Target and\r
different ToolChainTag. </p>\r
- \r
+\r
<p>The method parseFpdFile is also prepared for single module build. </p>\r
- \r
+\r
<p>The usage is (take NT32 Platform for example):</p>\r
\r
<pre>\r
<FPDParser platformName="Nt32" />\r
</pre>\r
\r
- <p>The task will initialize all information through parsing Framework Database, \r
+ <p>The task will initialize all information through parsing Framework Database,\r
SPD, Tool chain configuration files. </p>\r
\r
@since GenBuild 1.0\r
**/\r
public class FpdParserTask extends Task {\r
- \r
+\r
private String platformName;\r
\r
private File fpdFile = null;\r
- \r
+\r
private PlatformIdentification platformId;\r
- \r
+\r
+ ///\r
///\r
- /// \r
///\r
private String type;\r
- \r
+\r
///\r
/// Mapping from modules identification to out put file name\r
///\r
private Map<String, Set<FpdModuleIdentification>> fvs = new HashMap<String, Set<FpdModuleIdentification>>();\r
\r
///\r
- /// FpdParserTask can specify some ANT properties. \r
+ /// FpdParserTask can specify some ANT properties.\r
///\r
private Vector<Property> properties = new Vector<Property>();\r
- \r
+\r
private boolean isUnified = true;\r
\r
\r
}\r
\r
/**\r
- ANT task's entry method. The main steps is described as following: \r
- \r
+ ANT task's entry method. The main steps is described as following:\r
+\r
<ul>\r
- <li>Initialize global information (Framework DB, SPD files and all MSA files \r
+ <li>Initialize global information (Framework DB, SPD files and all MSA files\r
listed in SPD). This step will execute only once in whole build process;</li>\r
<li>Parse specified FPD file; </li>\r
<li>Generate FV.inf files; </li>\r
<li>Generate PlatformName_build.xml file for Flatform build; </li>\r
<li>Collect PCD information. </li>\r
</ul>\r
- \r
+\r
@throws BuildException\r
- Surface area is not valid. \r
+ Surface area is not valid.\r
**/\r
public void execute() throws BuildException {\r
// Remove !!\r
platformId = GlobalData.getPlatformByName(platformName);\r
fpdFile = platformId.getFpdFile();\r
}\r
- \r
+\r
//\r
// Parse FPD file\r
//\r
parseFpdFile();\r
- \r
+\r
//\r
// Prepare BUILD_DIR\r
//\r
isUnified = OutputManager.getInstance().prepareBuildDir(getProject());\r
- \r
+\r
//\r
// For every Target and ToolChain\r
//\r
//\r
// Prepare FV_DIR\r
//\r
- String ffsCommonDir = getProject().getProperty("BUILD_DIR") + File.separatorChar \r
- + targetList[i] + File.separatorChar \r
+ String ffsCommonDir = getProject().getProperty("BUILD_DIR") + File.separatorChar\r
+ + targetList[i] + File.separatorChar\r
+ toolchainList[j];\r
File fvDir = new File(ffsCommonDir + File.separatorChar + "FV");\r
fvDir.mkdirs();\r
getProject().setProperty("FV_DIR", fvDir.getPath().replaceAll("(\\\\)", "/"));\r
- \r
+\r
//\r
// Gen Fv.inf files\r
//\r
//\r
PlatformBuildFileGenerator fileGenerator = new PlatformBuildFileGenerator(getProject(), outfiles, isUnified);\r
fileGenerator.genBuildFile();\r
- \r
+\r
//\r
// Ant call ${PLATFORM}_build.xml\r
//\r
- \r
+\r
Ant ant = new Ant();\r
ant.setProject(getProject());\r
ant.setAntfile(platformId.getFpdFile().getParent() + File.separatorChar + platformId.getName() + "_build.xml");\r
ant.setInheritAll(true);\r
ant.init();\r
ant.execute();\r
- \r
+\r
// GlobalData.log.info("Fpd build end. ");\r
}\r
\r
/**\r
- Generate Fv.inf files. The Fv.inf file is composed with four \r
- parts: Options, Attributes, Components and Files. The Fv.inf files \r
+ Generate Fv.inf files. The Fv.inf file is composed with four\r
+ parts: Options, Attributes, Components and Files. The Fv.inf files\r
will be under FV_DIR.\r
- \r
+\r
@throws BuildException\r
- File write FV.inf files error. \r
+ File write FV.inf files error.\r
**/\r
private void genFvInfFiles(String ffsCommonDir) throws BuildException {\r
String[] validFv = SurfaceAreaQuery.getFpdValidImageNames();\r
}\r
\r
getProject().setProperty("FV_FILENAME", validFv[i]);\r
- \r
+\r
File fvFile = new File(getProject().replaceProperties( getProject().getProperty("FV_DIR") + File.separatorChar + validFv[i] + ".inf"));\r
fvFile.getParentFile().mkdirs();\r
\r
try {\r
FileWriter fw = new FileWriter(fvFile);\r
BufferedWriter bw = new BufferedWriter(fw);\r
- \r
+\r
//\r
// Options\r
//\r
}\r
bw.newLine();\r
}\r
- \r
+\r
//\r
// Attributes;\r
//\r
}\r
bw.newLine();\r
}\r
- \r
+\r
//\r
// Components\r
//\r
}\r
bw.newLine();\r
}\r
- \r
+\r
//\r
// Files\r
//\r
}\r
/**\r
This method is used for Single Module Build.\r
- \r
- \r
+\r
+\r
@throws BuildException\r
- FPD file is not valid. \r
+ FPD file is not valid.\r
**/\r
public void parseFpdFile(File fpdFile) throws BuildException {\r
this.fpdFile = fpdFile;\r
}\r
\r
/**\r
- Parse FPD file. \r
- \r
+ Parse FPD file.\r
+\r
@throws BuildException\r
- FPD file is not valid. \r
+ FPD file is not valid.\r
**/\r
private void parseFpdFile() throws BuildException {\r
try {\r
XmlObject doc = XmlObject.Factory.parse(fpdFile);\r
- \r
+\r
if (!doc.validate()) {\r
throw new BuildException("Platform Surface Area file [" + fpdFile.getPath() + "] format is invalid!");\r
}\r
- \r
+\r
Map<String, XmlObject> map = new HashMap<String, XmlObject>();\r
map.put("PlatformSurfaceArea", doc);\r
SurfaceAreaQuery.setDoc(map);\r
getProject().setProperty("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));\r
\r
//\r
- // Build mode. User-defined output dir. \r
+ // Build mode. User-defined output dir.\r
//\r
String buildMode = SurfaceAreaQuery.getFpdIntermediateDirectories();\r
String userDefinedOutputDir = SurfaceAreaQuery.getFpdOutputDirectory();\r
// TBD. Deal PCD and BuildOption related Info\r
//\r
GlobalData.setFpdBuildOptions(SurfaceAreaQuery.getFpdBuildOptions());\r
- \r
+\r
GlobalData.setToolChainPlatformInfo(SurfaceAreaQuery.getFpdToolChainInfo());\r
- \r
+\r
//\r
// Parse all list modules SA\r
//\r
parseToolChainOptions();\r
\r
SurfaceAreaQuery.setDoc(map);\r
- \r
+\r
//\r
// Pcd Collection. Call CollectPCDAction to collect pcd info.\r
//\r
}\r
\r
\r
- \r
+\r
/**\r
- Parse all modules listed in FPD file. \r
+ Parse all modules listed in FPD file.\r
**/\r
private void parseModuleSAFiles() throws EdkException{\r
Map<FpdModuleIdentification, Map<String, XmlObject>> moduleSAs = SurfaceAreaQuery.getFpdModules();\r
Iterator iter = keys.iterator();\r
while (iter.hasNext()) {\r
FpdModuleIdentification fpdModuleId = (FpdModuleIdentification) iter.next();\r
- \r
+\r
//\r
- // Judge if Module is existed? \r
+ // Judge if Module is existed?\r
// TBD\r
- \r
+\r
GlobalData.registerFpdModuleSA(fpdModuleId, moduleSAs.get(fpdModuleId));\r
\r
//\r
\r
fpdModuleId.setFvBinding(fvBinding);\r
updateFvs(fvBinding, fpdModuleId);\r
- \r
+\r
//\r
// Prepare for out put file name\r
//\r
if (baseName == null) {\r
baseName = moduleId.getName();\r
}\r
- outfiles.put(fpdModuleId, fpdModuleId.getArch() + File.separatorChar \r
- + moduleId.getGuid() + "-" + baseName \r
+ outfiles.put(fpdModuleId, fpdModuleId.getArch() + File.separatorChar\r
+ + moduleId.getGuid() + "-" + baseName\r
+ getSuffix(moduleId.getModuleType()));\r
\r
//\r
// parse module build options, if any\r
- // \r
+ //\r
SurfaceAreaQuery.push(GlobalData.getDoc(fpdModuleId));\r
GlobalData.addModuleToolChainOption(fpdModuleId, parseModuleBuildOptions(false));\r
GlobalData.addModuleToolChainFamilyOption(fpdModuleId, parseModuleBuildOptions(true));\r
}\r
return parseOptions(options);\r
}\r
- \r
+\r
private ToolChainMap parsePlatformBuildOptions(boolean toolChainFamilyFlag) throws EdkException {\r
String[][] options = SurfaceAreaQuery.getPlatformBuildOptions(toolChainFamilyFlag);\r
if (options == null || options.length == 0) {\r
\r
return map;\r
}\r
- \r
+\r
private void parseToolChainFamilyOptions() throws EdkException {\r
GlobalData.setPlatformToolChainFamilyOption(parsePlatformBuildOptions(true));\r
}\r
}\r
\r
/**\r
- Add the current module to corresponding FV. \r
- \r
+ Add the current module to corresponding FV.\r
+\r
@param fvName current FV name\r
@param moduleName current module identification\r
**/\r
}\r
\r
/**\r
- Get the suffix based on module type. Current relationship are listed: \r
- \r
+ Get the suffix based on module type. Current relationship are listed:\r
+\r
<pre>\r
<b>ModuleType</b> <b>Suffix</b>\r
BASE .FFS\r
UEFI_APPLICATION .APP\r
USER_DEFINED .FFS\r
</pre>\r
- \r
+\r
@param moduleType module type\r
@return\r
@throws BuildException\r
}\r
\r
String[][] suffix = { { "BASE", ".FFS"},\r
- { "SEC", ".SEC" }, { "PEI_CORE", ".PEI" }, \r
+ { "SEC", ".SEC" }, { "PEI_CORE", ".PEI" },\r
{ "PEIM", ".PEI" }, { "DXE_CORE", ".DXE" },\r
- { "DXE_DRIVER", ".DXE" }, { "DXE_RUNTIME_DRIVER", ".DXE" }, \r
- { "DXE_SAL_DRIVER", ".DXE" }, { "DXE_SMM_DRIVER", ".DXE" }, \r
+ { "DXE_DRIVER", ".DXE" }, { "DXE_RUNTIME_DRIVER", ".DXE" },\r
+ { "DXE_SAL_DRIVER", ".DXE" }, { "DXE_SMM_DRIVER", ".DXE" },\r
{ "TOOL", ".FFS" }, { "UEFI_DRIVER", ".DXE" },\r
{ "UEFI_APPLICATION", ".APP" }, { "USER_DEFINED", ".FFS" } };\r
- \r
+\r
for (int i = 0; i < suffix.length; i++) {\r
if (suffix[i][0].equalsIgnoreCase(moduleType)) {\r
return suffix[i][1];\r
return ".FFS";\r
}\r
/**\r
- Add a property. \r
- \r
+ Add a property.\r
+\r
@param p property\r
**/\r
public void addProperty(Property p) {\r
public void setType(String type) {\r
this.type = type;\r
}\r
- \r
+\r
\r
}\r
--*/\r
\r
package org.tianocore.build.global;\r
+\r
import org.apache.tools.ant.Project;\r
-import org.tianocore.logger.LogMethod;\r
+\r
+import org.tianocore.common.logger.LogMethod;\r
\r
public class GenBuildLogger implements LogMethod {\r
private Project project;\r
public GenBuildLogger(Project project) {\r
this.project = project;\r
- \r
+\r
}\r
\r
public void putMessage(Object msgSource, int msgLevel, String msg) {\r
if (this.project != null){\r
this.project.log(msg, Project.MSG_INFO);\r
}\r
- \r
+\r
}\r
}
\ No newline at end of file
/** @file\r
- GlobalData class. \r
- \r
+ GlobalData class.\r
+\r
GlobalData provide initializing, instoring, querying and update global data.\r
It is a bridge to intercommunicate between multiple component, such as AutoGen,\r
- PCD and so on. \r
- \r
+ PCD and so on.\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
\r
import org.apache.tools.ant.BuildException;\r
import org.apache.xmlbeans.XmlObject;\r
+\r
+import org.tianocore.common.exception.EdkException;\r
+import org.tianocore.common.logger.EdkLog;\r
+import org.tianocore.pcd.entity.MemoryDatabaseManager;\r
import org.tianocore.DbPathAndFilename;\r
import org.tianocore.FrameworkDatabaseDocument;\r
import org.tianocore.ModuleSurfaceAreaDocument;\r
import org.tianocore.build.id.ModuleIdentification;\r
import org.tianocore.build.id.PackageIdentification;\r
import org.tianocore.build.id.PlatformIdentification;\r
-import org.tianocore.pcd.entity.MemoryDatabaseManager;\r
import org.tianocore.build.toolchain.ToolChainAttribute;\r
import org.tianocore.build.toolchain.ToolChainConfig;\r
import org.tianocore.build.toolchain.ToolChainElement;\r
import org.tianocore.build.toolchain.ToolChainInfo;\r
import org.tianocore.build.toolchain.ToolChainKey;\r
import org.tianocore.build.toolchain.ToolChainMap;\r
-import org.tianocore.exception.EdkException;\r
-import org.tianocore.logger.EdkLog;\r
\r
/**\r
GlobalData provide initializing, instoring, querying and update global data.\r
It is a bridge to intercommunicate between multiple component, such as AutoGen,\r
- PCD and so on. \r
- \r
- <p>Note that all global information are initialized incrementally. All data will \r
+ PCD and so on.\r
+\r
+ <p>Note that all global information are initialized incrementally. All data will\r
parse and record only of necessary during build time. </p>\r
- \r
+\r
@since GenBuild 1.0\r
**/\r
public class GlobalData {\r
\r
public static Logger log = Logger.getAnonymousLogger();\r
- \r
+\r
///\r
/// Record current WORKSPACE Directory\r
///\r
private static String workspaceDir = "";\r
- \r
+\r
///\r
/// Be used to ensure Global data will be initialized only once.\r
///\r
private static boolean globalFlag = false;\r
- \r
+\r
///\r
/// Framework Database information: package list and platform list\r
///\r
- private static Set<PackageIdentification> packageList = new HashSet<PackageIdentification>(); \r
+ private static Set<PackageIdentification> packageList = new HashSet<PackageIdentification>();\r
\r
private static Set<PlatformIdentification> platformList = new HashSet<PlatformIdentification>();\r
\r
private static XmlObject fpdBuildOptions;\r
\r
private static XmlObject fpdDynamicPcds;\r
- \r
+\r
///\r
/// Parsed modules list\r
///\r
private static Map<FpdModuleIdentification, Map<String, XmlObject>> parsedModules = new HashMap<FpdModuleIdentification, Map<String, XmlObject>>();\r
- \r
+\r
///\r
/// built modules list with ARCH, TARGET, TOOLCHAIN\r
///\r
private static Set<FpdModuleIdentification> builtModules = new HashSet<FpdModuleIdentification>();\r
- \r
+\r
///\r
/// PCD memory database stored all PCD information which collected from FPD,MSA and SPD.\r
///\r
/// toolsDef - build tool program information\r
/// fpdBuildOption - all modules's build options for tool tag or tool chain families\r
/// moduleSaBuildOption - build options for a specific module\r
- /// \r
+ ///\r
private static ToolChainConfig toolsDef;\r
\r
private static ToolChainInfo toolChainInfo;\r
/**\r
Parse framework database (DB) and all SPD files listed in DB to initialize\r
the environment for next build. This method will only be executed only once\r
- in the whole build process. \r
- \r
+ in the whole build process.\r
+\r
@param workspaceDatabaseFile the file name of framework database\r
@param workspaceDir current workspace directory path\r
@throws BuildException\r
}\r
globalFlag = true;\r
\r
- // \r
+ //\r
// Backup workspace directory. It will be used by other method\r
//\r
GlobalData.workspaceDir = workspaceDir.replaceAll("(\\\\)", "/");\r
- \r
+\r
//\r
// Parse tools definition file\r
//\r
File toolsDefFile = new File(workspaceDir + File.separatorChar + toolsDefFilename);\r
System.out.println("Using tool definiton file [" + toolsDefFile.getPath() + "].");\r
toolsDef = new ToolChainConfig(toolsDefFile);\r
- \r
+\r
//\r
// Parse Framework Database\r
//\r
throw new BuildException("Parse WORKSPACE Database file [" + dbFile.getPath() + "] Error.\n" + e.getMessage());\r
}\r
}\r
- \r
+\r
/**\r
- Get the current WORKSPACE Directory. \r
- \r
+ Get the current WORKSPACE Directory.\r
+\r
@return current workspace directory\r
**/\r
public synchronized static String getWorkspacePath() {\r
public synchronized static File getMsaFile(ModuleIdentification moduleId) throws BuildException {\r
File msaFile = null;\r
//\r
- // TBD. Do only when package is null. \r
+ // TBD. Do only when package is null.\r
//\r
Iterator iter = packageList.iterator();\r
while (iter.hasNext()) {\r
if (moduleId.getPackage() != null) {\r
return moduleId.getPackage();\r
}\r
- \r
+\r
PackageIdentification packageId = null;\r
Iterator iter = packageList.iterator();\r
while (iter.hasNext()) {\r
return packageId;\r
}\r
}\r
- \r
+\r
/**\r
Difference between build and parse: ToolChain and Target\r
**/\r
public synchronized static boolean isModuleBuilt(FpdModuleIdentification moduleId) {\r
return builtModules.contains(moduleId);\r
}\r
- \r
+\r
public synchronized static void registerBuiltModule(FpdModuleIdentification fpdModuleId) {\r
builtModules.add(fpdModuleId);\r
}\r
\r
- \r
+\r
public synchronized static void registerFpdModuleSA(FpdModuleIdentification fpdModuleId, Map<String, XmlObject> doc) {\r
Map<String, XmlObject> result = new HashMap<String, XmlObject>();\r
Set keySet = doc.keySet();\r
\r
/**\r
Query overrided module surface area information. If current is Package\r
- or Platform build, also include the information from FPD file. \r
- \r
- <p>Note that surface area parsing is incremental. That means the method will \r
+ or Platform build, also include the information from FPD file.\r
+\r
+ <p>Note that surface area parsing is incremental. That means the method will\r
only parse the MSA and MBD files if necessary. </p>\r
- \r
+\r
@param moduleName the base name of the module\r
@return the overrided module surface area information\r
@throws BuildException\r
// First part: get the MSA files info\r
//\r
doc.putAll(getNativeMsa(moduleId));\r
- \r
+\r
//\r
// Second part: put build options\r
//\r
doc.put("BuildOptions", fpdBuildOptions);\r
- \r
+\r
//\r
// Third part: get Module info from FPD, such as Library instances, PCDs\r
//\r
return getDoc(fpdModuleId);\r
}\r
/**\r
- Query the native MSA information with module base name. \r
- \r
- <p>Note that MSA parsing is incremental. That means the method will \r
+ Query the native MSA information with module base name.\r
+\r
+ <p>Note that MSA parsing is incremental. That means the method will\r
only to parse the MSA files when never parsed before. </p>\r
- \r
+\r
@param moduleName the base name of the module\r
@return the native MSA information\r
@throws BuildException\r
nativeMsa.put(moduleId, msaMap);\r
return msaMap;\r
}\r
- \r
+\r
public synchronized static Map<String, XmlObject> getNativeMsa(File msaFile) throws BuildException {\r
if (! msaFile.exists()) {\r
throw new BuildException("Module Surface Area file [" + msaFile.getPath() + "] can't be found!");\r
throw new BuildException(ex.getMessage());\r
}\r
}\r
- \r
+\r
public static Map<String, XmlObject> getFpdBuildOptions() {\r
Map<String, XmlObject> map = new HashMap<String, XmlObject>();\r
map.put("BuildOptions", fpdBuildOptions);\r
return map;\r
}\r
- \r
+\r
public static void setFpdBuildOptions(XmlObject fpdBuildOptions) {\r
GlobalData.fpdBuildOptions = cloneXmlObject(fpdBuildOptions, true);\r
}\r
\r
//////////////////////////////////////////////\r
//////////////////////////////////////////////\r
- \r
+\r
public static Set<ModuleIdentification> getModules(PackageIdentification packageId){\r
Spd spd = spdTable.get(packageId);\r
if (spd == null ) {\r
return null;\r
\r
}\r
- \r
+\r
public synchronized static PlatformIdentification getPlatformByName(String name) throws BuildException {\r
Iterator iter = platformList.iterator();\r
while(iter.hasNext()){\r
}\r
throw new BuildException("Can't find platform [" + name + "] in the current WORKSPACE database!");\r
}\r
- \r
+\r
public synchronized static PlatformIdentification getPlatform(String filename) throws BuildException {\r
File file = new File(workspaceDir + File.separatorChar + filename);\r
Iterator iter = platformList.iterator();\r
}\r
throw new BuildException("Can't find platform file [" + filename + "] in the current WORKSPACE database!");\r
}\r
- \r
+\r
public synchronized static PackageIdentification refreshPackageIdentification(PackageIdentification packageId) throws BuildException {\r
Iterator iter = packageList.iterator();\r
while(iter.hasNext()){\r
}\r
throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " in the current workspace!");\r
}\r
- \r
+\r
public synchronized static ModuleIdentification refreshModuleIdentification(ModuleIdentification moduleId) throws BuildException {\r
// System.out.println("1");\r
// System.out.println("##" + moduleId.getGuid());\r
}\r
throw new BuildException("Can't find module GUID value " + moduleId.getGuid() + " in package, " + packageId + ", in the current workspace!");\r
}\r
- \r
+\r
public synchronized static Set<PackageIdentification> getPackageList(){\r
return packageList;\r
}\r
\r
public static String getCommandSetting(String[] commandDescription, FpdModuleIdentification fpdModuleId) throws EdkException {\r
ToolChainKey toolChainKey = new ToolChainKey(commandDescription);\r
- ToolChainMap toolChainConfig = toolsDef.getConfig(); \r
+ ToolChainMap toolChainConfig = toolsDef.getConfig();\r
String setting = null;\r
\r
if (!commandDescription[ToolChainElement.ATTRIBUTE.value].equals(ToolChainAttribute.FLAGS.toString())) {\r
toolChainFamilyKey.setKey(ToolChainAttribute.FLAGS.toString(), ToolChainElement.ATTRIBUTE.value);\r
\r
option = moduleToolChainFamilyOption.get(fpdModuleId);\r
- if (option != null) { \r
+ if (option != null) {\r
setting = option.get(toolChainFamilyKey);\r
}\r
}\r
\r
return setting;\r
}\r
- \r
+\r
public static void setToolChainEnvInfo(ToolChainInfo envInfo) {\r
toolChainEnvInfo = envInfo;\r
}\r
//\r
// For PCD\r
//\r
- public synchronized static Map<FpdModuleIdentification, XmlObject> \r
+ public synchronized static Map<FpdModuleIdentification, XmlObject>\r
getFpdModuleSaXmlObject(String xmlObjectName) {\r
Set<FpdModuleIdentification> fpdModuleSASet = fpdModuleSA.keySet();\r
Iterator item = fpdModuleSASet.iterator();\r
- \r
+\r
\r
Map<FpdModuleIdentification, XmlObject> SAPcdBuildDef = new HashMap<FpdModuleIdentification, XmlObject>();\r
Map<String, XmlObject> SANode = new HashMap<String, XmlObject>();\r
FpdModuleIdentification moduleId;\r
while (item.hasNext()) {\r
- \r
+\r
moduleId = (FpdModuleIdentification) item.next();\r
SANode = fpdModuleSA.get(moduleId);\r
try{\r
import java.util.regex.Matcher;\r
import java.util.regex.Pattern;\r
\r
+import org.w3c.dom.Node;\r
+\r
import org.apache.xmlbeans.XmlObject;\r
import org.apache.xmlbeans.XmlString;\r
+\r
import org.tianocore.BuildOptionsDocument;\r
import org.tianocore.CNameType;\r
import org.tianocore.ExternsDocument;\r
import org.tianocore.MsaHeaderDocument.MsaHeader;\r
import org.tianocore.ProtocolsDocument.Protocols.Protocol;\r
import org.tianocore.ProtocolsDocument.Protocols.ProtocolNotify;\r
+\r
+import org.tianocore.common.logger.EdkLog;\r
import org.tianocore.build.id.FpdModuleIdentification;\r
import org.tianocore.build.id.ModuleIdentification;\r
import org.tianocore.build.id.PackageIdentification;\r
import org.tianocore.build.id.PlatformIdentification;\r
import org.tianocore.build.toolchain.ToolChainInfo;\r
-import org.tianocore.logger.EdkLog;\r
-import org.w3c.dom.Node;\r
\r
/**\r
* SurfaceAreaQuery class is used to query Surface Area information from msa,\r
* mbd, spd and fpd files.\r
- * \r
+ *\r
* This class should not instantiated. All the public interfaces is static.\r
- * \r
+ *\r
* @since GenBuild 1.0\r
*/\r
public class SurfaceAreaQuery {\r
\r
/**\r
* Set a Surface Area document for query later\r
- * \r
+ *\r
* @param map\r
* A Surface Area document in TopLevelElementName/XmlObject\r
* format.\r
* Push current used Surface Area document into query stack. The given new\r
* document will be used for any immediately followed getXXX() callings,\r
* untill pop() is called.\r
- * \r
+ *\r
* @param newMap\r
* The TopLevelElementName/XmlObject format of a Surface Area\r
* document.\r
/**\r
* Search all XML documents stored in "map" for the specified xPath, using\r
* relative path (starting with '$this')\r
- * \r
+ *\r
* @param xPath\r
* xpath query string array\r
* @returns An array of XmlObject if elements are found at the specified\r
/**\r
* Search XML documents named by "rootName" for the given xPath, using\r
* relative path (starting with '$this')\r
- * \r
+ *\r
* @param rootName\r
* The top level element name\r
* @param xPath\r
\r
/**\r
* Retrieve SourceFiles/Filename for specified ARCH type\r
- * \r
+ *\r
* @param arch\r
* architecture name\r
* @returns An 2 dimension string array if elements are found at the known\r
outputList.add(new String[] {sourceFileNames[i].getToolCode(),sourceFileNames[i].getStringValue()});\r
}\r
}\r
- \r
+\r
String[][] outputString = new String[outputList.size()][2];\r
for (int index = 0; index < outputList.size(); index++) {\r
outputString[index][0] = outputList.get(index)[0];\r
\r
/**\r
* Retrieve /PlatformDefinitions/OutputDirectory from FPD\r
- * \r
+ *\r
* @returns Directory names array if elements are found at the known xpath\r
* @returns Empty if nothing is found at the known xpath\r
*/\r
}\r
PlatformDefinitionsDocument.PlatformDefinitions item = (PlatformDefinitionsDocument.PlatformDefinitions)returns[0];\r
if(item.getIntermediateDirectories() == null) {\r
- return null; \r
+ return null;\r
}\r
else {\r
return item.getIntermediateDirectories().toString();\r
ModuleSaBuildOptionsDocument.ModuleSaBuildOptions item = (ModuleSaBuildOptionsDocument.ModuleSaBuildOptions)returns[0];\r
return item.getFfsFormatKey();\r
}\r
- \r
+\r
public static String getModuleFvBindingKeyword() {\r
String[] xPath = new String[] { "/" };\r
\r
ModuleSaBuildOptionsDocument.ModuleSaBuildOptions item = (ModuleSaBuildOptionsDocument.ModuleSaBuildOptions)returns[0];\r
return item.getFvBinding();\r
}\r
- \r
+\r
public static List getModuleSupportedArchs() {\r
String[] xPath = new String[] { "/" };\r
\r
ModuleDefinitionsDocument.ModuleDefinitions item = (ModuleDefinitionsDocument.ModuleDefinitions)returns[0];\r
return item.getSupportedArchitectures();\r
}\r
- \r
+\r
public static BuildOptionsDocument.BuildOptions.Ffs[] getFpdFfs() {\r
String[] xPath = new String[] {"/Ffs"};\r
- \r
+\r
Object[] returns = get("BuildOptions", xPath);\r
if (returns == null || returns.length == 0) {\r
return new BuildOptionsDocument.BuildOptions.Ffs[0];\r
}\r
return (BuildOptionsDocument.BuildOptions.Ffs[])returns;\r
}\r
- \r
+\r
public static String getModuleOutputFileBasename() {\r
String[] xPath = new String[] { "/" };\r
\r
ModuleDefinitionsDocument.ModuleDefinitions item = (ModuleDefinitionsDocument.ModuleDefinitions)returns[0];\r
return item.getOutputFileBasename();\r
}\r
- \r
+\r
/**\r
* Retrieve BuildOptions/Option or Arch/Option\r
- * \r
+ *\r
* @param toolChainFamilyFlag\r
* if true, retrieve options for toolchain family; otherwise for\r
* toolchain\r
- * \r
+ *\r
* @returns String[][5] name, target, toolchain, arch, coommand of options\r
* if elements are found at the known xpath. String[0][] if dont\r
* find element.\r
- * \r
+ *\r
* @returns Empty array if nothing is there\r
*/\r
public static String[][] getOptions(String from, String[] xPath, boolean toolChainFamilyFlag) {\r
}\r
\r
archList = new ArrayList<String>();\r
- List archEnumList = option.getSupArchList(); \r
+ List archEnumList = option.getSupArchList();\r
if (archEnumList == null) {\r
archList.add(null);\r
} else {\r
\r
public static String[][] getModuleBuildOptions(boolean toolChainFamilyFlag) {\r
String[] xPath;\r
- \r
+\r
if (toolChainFamilyFlag == true) {\r
xPath = new String[] {\r
"/Options/Option[not(@ToolChainFamily) and not(@TagName)]",\r
"/Options/Option[@TagName]", };\r
}\r
return getOptions("ModuleSaBuildOptions", xPath, toolChainFamilyFlag);\r
- } \r
- \r
+ }\r
+\r
public static String[][] getPlatformBuildOptions(boolean toolChainFamilyFlag) {\r
String[] xPath;\r
\r
if (returns == null || returns.length == 0) {\r
return null;\r
}\r
- \r
+\r
PlatformDefinitionsDocument.PlatformDefinitions item = (PlatformDefinitionsDocument.PlatformDefinitions)returns[0];\r
ToolChainInfo toolChainInfo = new ToolChainInfo();\r
toolChainInfo.addTargets(item.getBuildTargets().toString());\r
\r
/**\r
* Retrieve <xxxHeader>/ModuleType\r
- * \r
+ *\r
* @returns The module type name if elements are found at the known xpath\r
* @returns null if nothing is there\r
*/\r
\r
/**\r
* Retrieve PackageDependencies/Package\r
- * \r
+ *\r
* @param arch\r
* Architecture name\r
- * \r
+ *\r
* @returns package name list if elements are found at the known xpath\r
* @returns null if nothing is there\r
*/\r
String packageGuid = null;\r
String packageVersion = null;\r
\r
- \r
+\r
xPath = new String[] { "/Package" };\r
- \r
+\r
Object[] returns = get("PackageDependencies", xPath);\r
if (returns == null) {\r
return new PackageIdentification[0];\r
}\r
\r
//\r
- // Get packageIdentification \r
- // \r
+ // Get packageIdentification\r
+ //\r
List<PackageIdentification> packageIdList = new ArrayList<PackageIdentification>();\r
for (int i = 0; i < returns.length; i++) {\r
PackageDependenciesDocument.PackageDependencies.Package item = (PackageDependenciesDocument.PackageDependencies.Package) returns[i];\r
\r
//\r
// transfer packageIdentification list to array.\r
- // \r
+ //\r
PackageIdentification[] packageIdArray = new PackageIdentification[packageIdList.size()];\r
for (int i = 0; i < packageIdList.size(); i++) {\r
packageIdArray[i] = new PackageIdentification(null, packageIdList.get(i).getGuid(),packageIdList.get(i).getVersion());\r
\r
/**\r
* Retrieve LibraryClassDefinitions/LibraryClass for specified usage\r
- * \r
+ *\r
* @param usage\r
* Library class usage\r
- * \r
+ *\r
* @returns LibraryClass objects list if elements are found at the known\r
* xpath\r
* @returns null if nothing is there\r
List<String> libraryClassName = new ArrayList<String>();\r
for (int i = 0; i < libraryClassList.length; i++) {\r
List archList = libraryClassList[i].getSupArchList();\r
- \r
+\r
if (arch == null || contains(archList, arch)) {\r
libraryClassName.add(libraryClassList[i].getKeyword());\r
}\r
\r
/**\r
* Retrieve ModuleEntryPoint names\r
- * \r
+ *\r
* @returns ModuleEntryPoint name list if elements are found at the known\r
* xpath\r
* @returns null if nothing is there\r
\r
/**\r
* retrieve Protocol for specified usage\r
- * \r
+ *\r
* @param usage\r
* Protocol usage arch Architecture\r
- * \r
+ *\r
* @returns Protocol String list if elements are found at the known xpath\r
* @returns String[0] if nothing is there\r
*/\r
\r
/**\r
* retrieve Protocol for specified usage\r
- * \r
+ *\r
* @param arch\r
* Architecture\r
- * \r
+ *\r
* @returns Protocol String list if elements are found at the known xpath\r
* @returns String[0] if nothing is there\r
*/\r
Protocol[] returnlList = (Protocol[]) returns;\r
\r
List<String> protocolList = new ArrayList<String>();\r
- \r
+\r
for (int i = 0; i < returns.length; i++) {\r
List archList = returnlList[i].getSupArchList();\r
if (archList == null || contains(archList, arch)){\r
\r
/**\r
* Retrieve ProtocolNotify for specified usage\r
- * \r
+ *\r
* @param usage\r
* ProtocolNotify usage\r
- * \r
+ *\r
* @returns String[] if elements are found at the known xpath\r
* @returns String[0] if nothing is there\r
*/\r
}\r
\r
List<String> protocolNotifyList = new ArrayList<String>();\r
- \r
+\r
for (int i = 0; i < returns.length; i++) {\r
List archList = ((ProtocolNotify) returns[i]).getSupArchList();\r
if (archList == null || contains(archList, arch)){\r
protocolNotifyList.add(((ProtocolNotify) returns[i]).getProtocolNotifyCName());\r
}\r
- \r
+\r
}\r
String[] protocolNotifyArray = new String[protocolNotifyList.size()];\r
for (int i = 0; i < protocolNotifyList.size(); i++) {\r
\r
/**\r
* Retrieve ProtocolNotify for specified usage\r
- * \r
+ *\r
* @param usage\r
* ProtocolNotify usage\r
- * \r
+ *\r
* @returns String[] if elements are found at the known xpath\r
* @returns String[0] if nothing is there\r
*/\r
\r
/**\r
* Retrieve ModuleUnloadImage names\r
- * \r
+ *\r
* @returns ModuleUnloadImage name list if elements are found at the known\r
* xpath\r
* @returns null if nothing is there\r
\r
/**\r
* Retrieve Extern\r
- * \r
+ *\r
* @returns Extern objects list if elements are found at the known xpath\r
* @returns null if nothing is there\r
*/\r
\r
/**\r
* Retrieve PpiNotify for specified arch\r
- * \r
+ *\r
* @param arch\r
* PpiNotify arch\r
- * \r
+ *\r
* @returns String[] if elements are found at the known xpath\r
* @returns String[0] if nothing is there\r
*/\r
return new String[0];\r
}\r
\r
- \r
+\r
List<String> ppiNotifyList = new ArrayList<String>();\r
for (int i = 0; i < returns.length; i++) {\r
List archList = ((PPIsDocument.PPIs.PpiNotify) returns[i]).getSupArchList();\r
if (archList == null || contains(archList, arch)){\r
- ppiNotifyList.add(((PPIsDocument.PPIs.PpiNotify) returns[i]).getPpiNotifyCName()); \r
+ ppiNotifyList.add(((PPIsDocument.PPIs.PpiNotify) returns[i]).getPpiNotifyCName());\r
}\r
- \r
+\r
}\r
String[] ppiNotifyArray = new String[ppiNotifyList.size()];\r
for (int i = 0; i < ppiNotifyList.size(); i++) {\r
\r
/**\r
* Retrieve PpiNotify for specified usage and arch\r
- * \r
+ *\r
* @param arch\r
* PpiNotify arch usage PpiNotify usage\r
- * \r
- * \r
+ *\r
+ *\r
* @returns String[] if elements are found at the known xpath\r
* @returns String[0] if nothing is there\r
*/\r
\r
/**\r
* Retrieve Ppi for specified arch\r
- * \r
+ *\r
* @param arch\r
* Ppi arch\r
- * \r
+ *\r
* @returns String[] if elements are found at the known xpath\r
* @returns String[0] if nothing is there\r
*/\r
for (int i = 0; i < returns.length; i++) {\r
List archList = ((PPIsDocument.PPIs.Ppi) returns[i]).getSupArchList();\r
if (archList == null || contains(archList, arch)){\r
- ppiList.add(((PPIsDocument.PPIs.Ppi) returns[i]).getPpiCName()); \r
+ ppiList.add(((PPIsDocument.PPIs.Ppi) returns[i]).getPpiCName());\r
}\r
- \r
+\r
}\r
String[] ppiArray = new String[ppiList.size()];\r
for (int i = 0; i < ppiList.size(); i++) {\r
\r
/**\r
* Retrieve PpiNotify for specified usage and arch\r
- * \r
+ *\r
* @param arch\r
* PpiNotify arch usage PpiNotify usage\r
- * \r
- * \r
+ *\r
+ *\r
* @returns String[] if elements are found at the known xpath\r
* @returns String[0] if nothing is there\r
*/\r
\r
/**\r
* Retrieve GuidEntry information for specified usage\r
- * \r
+ *\r
* @param arch\r
* GuidEntry arch\r
- * \r
+ *\r
* @returns GuidEntry objects list if elements are found at the known xpath\r
* @returns null if nothing is there\r
*/\r
for (int i = 0; i < returns.length; i++) {\r
List archList = ((GuidsDocument.Guids.GuidCNames) returns[i]).getSupArchList();\r
if (archList == null || contains(archList, arch)){\r
- guidList.add(((GuidsDocument.Guids.GuidCNames) returns[i]).getGuidCName()); \r
+ guidList.add(((GuidsDocument.Guids.GuidCNames) returns[i]).getGuidCName());\r
}\r
- \r
+\r
}\r
String[] guidArray = new String[guidList.size()];\r
for (int i = 0; i < guidList.size(); i++) {\r
\r
/**\r
* Retrieve GuidEntry information for specified usage\r
- * \r
+ *\r
* @param arch\r
* GuidEntry arch usage GuidEntry usage\r
- * \r
+ *\r
* @returns GuidEntry objects list if elements are found at the known xpath\r
* @returns null if nothing is there\r
*/\r
\r
/**\r
* Retrieve Library instance information\r
- * \r
+ *\r
* @param arch\r
* Architecture name\r
* @param usage\r
* Library instance usage\r
- * \r
+ *\r
* @returns library instance name list if elements are found at the known\r
* xpath\r
* @returns null if nothing is there\r
xPath = new String[] { "/Instance" };\r
} else {\r
//\r
- // Since Schema don't have SupArchList now, so the follow Xpath is \r
+ // Since Schema don't have SupArchList now, so the follow Xpath is\r
// equal to "/Instance" and [not(@SupArchList) or @SupArchList= arch]\r
// don't have effect.\r
//\r
\r
/**\r
* Retrive library's constructor name\r
- * \r
+ *\r
* @returns constructor name list if elements are found at the known xpath\r
* @returns null if nothing is there\r
*/\r
\r
/**\r
* Retrive library's destructor name\r
- * \r
+ *\r
* @returns destructor name list if elements are found at the known xpath\r
* @returns null if nothing is there\r
*/\r
\r
/**\r
* Retrive DriverBinding names\r
- * \r
+ *\r
* @returns DriverBinding name list if elements are found at the known xpath\r
* @returns null if nothing is there\r
*/\r
\r
/**\r
* Retrive ComponentName names\r
- * \r
+ *\r
* @returns ComponentName name list if elements are found at the known xpath\r
* @returns null if nothing is there\r
*/\r
\r
/**\r
* Retrive DriverConfig names\r
- * \r
+ *\r
* @returns DriverConfig name list if elements are found at the known xpath\r
* @returns null if nothing is there\r
*/\r
\r
/**\r
* Retrive DriverDiag names\r
- * \r
+ *\r
* @returns DriverDiag name list if elements are found at the known xpath\r
* @returns null if nothing is there\r
*/\r
\r
/**\r
* Retrive SetVirtualAddressMapCallBack names\r
- * \r
+ *\r
* @returns SetVirtualAddressMapCallBack name list if elements are found at\r
* the known xpath\r
* @returns null if nothing is there\r
\r
/**\r
* Retrive ExitBootServicesCallBack names\r
- * \r
+ *\r
* @returns ExitBootServicesCallBack name list if elements are found at the\r
* known xpath\r
* @returns null if nothing is there\r
\r
/**\r
* Retrieve module surface area file information\r
- * \r
+ *\r
* @returns ModuleSA objects list if elements are found at the known xpath\r
* @returns Empty ModuleSA list if nothing is there\r
*/\r
}\r
for (int j = 0; j < archList.length; j++) {\r
FpdModuleIdentification fpdSaId = new FpdModuleIdentification(saId, archList[j]);\r
- \r
+\r
if (fvBinding != null) {\r
fpdSaId.setFvBinding(fvBinding);\r
}\r
- \r
+\r
//\r
// Put element to Map<FpdModuleIdentification, Map<String,\r
// Object>>.\r
\r
/**\r
* Retrieve valid image names\r
- * \r
+ *\r
* @returns valid iamges name list if elements are found at the known xpath\r
* @returns empty list if nothing is there\r
*/\r
\r
return result;\r
}\r
- \r
+\r
public static Node getFpdUserExtensionPreBuild() {\r
- String[] xPath = new String[] { "/UserExtensions[@UserID='TianoCore' and @Identifier='0']" }; \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
+