mirror of https://github.com/acidanthera/audk.git
moved exception and logger classes to org.tianocore.common package
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1269 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
2f62848a85
commit
ff225cbbae
|
@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
package org.tianocore.definitions;
|
package org.tianocore.common.definitions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This class includes the common EDK definitions.
|
This class includes the common EDK definitions.
|
||||||
|
|
|
@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
package org.tianocore.definitions;
|
package org.tianocore.common.definitions;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,8 @@ Module Name:
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
package org.tianocore.exception;
|
|
||||||
|
package org.tianocore.common.exception;
|
||||||
|
|
||||||
public class EdkException extends Exception {
|
public class EdkException extends Exception {
|
||||||
static final long serialVersionUID = -8494188017252114029L;
|
static final long serialVersionUID = -8494188017252114029L;
|
||||||
|
@ -28,13 +29,13 @@ public class EdkException extends Exception {
|
||||||
|
|
||||||
public EdkException(String message, boolean traceStack) {
|
public EdkException(String message, boolean traceStack) {
|
||||||
super(message);
|
super(message);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public EdkException(){
|
public EdkException(){
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public EdkException(Exception e, String message){
|
public EdkException(Exception e, String message){
|
||||||
super("[EdkException]:" + message);
|
super("[EdkException]:" + message);
|
||||||
if (isPrintStack){
|
if (isPrintStack){
|
||||||
|
|
|
@ -16,7 +16,8 @@ Abstract:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
|
||||||
package org.tianocore.logger;
|
package org.tianocore.common.logger;
|
||||||
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,10 @@ Module Name:
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
package org.tianocore.logger;
|
|
||||||
|
|
||||||
import org.tianocore.logger.LogMethod;
|
package org.tianocore.common.logger;
|
||||||
|
|
||||||
|
import org.tianocore.common.logger.LogMethod;
|
||||||
|
|
||||||
public class EdkLog {
|
public class EdkLog {
|
||||||
private static final String error = "ERROR";
|
private static final String error = "ERROR";
|
||||||
|
@ -26,7 +26,7 @@ public class EdkLog {
|
||||||
private static final String info = "INFO";
|
private static final String info = "INFO";
|
||||||
private static final String verbose = "VERBOSE";
|
private static final String verbose = "VERBOSE";
|
||||||
private static final String debug = "DEBUG";
|
private static final String debug = "DEBUG";
|
||||||
|
|
||||||
public static final int EDK_ERROR = 0;
|
public static final int EDK_ERROR = 0;
|
||||||
public static final int EDK_WARNING = 1;
|
public static final int EDK_WARNING = 1;
|
||||||
public static final int EDK_INFO = 2;
|
public static final int EDK_INFO = 2;
|
||||||
|
@ -38,9 +38,9 @@ public class EdkLog {
|
||||||
|
|
||||||
public static void log(int level, String message) {
|
public static void log(int level, String message) {
|
||||||
if (level <= logLevel){
|
if (level <= logLevel){
|
||||||
logger.putMessage(null, logLevel, message);
|
logger.putMessage(null, logLevel, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void log(int logLevel, String message, Exception cause) {
|
public static void log(int logLevel, String message, Exception cause) {
|
||||||
|
@ -58,7 +58,7 @@ public class EdkLog {
|
||||||
public static void setLogger(LogMethod l) {
|
public static void setLogger(LogMethod l) {
|
||||||
logger = l;
|
logger = l;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setLogLevel (int level){
|
public static void setLogLevel (int level){
|
||||||
logLevel = level;
|
logLevel = level;
|
||||||
}
|
}
|
||||||
|
@ -72,16 +72,16 @@ public class EdkLog {
|
||||||
}
|
}
|
||||||
if (levelStr.equalsIgnoreCase(debug)){
|
if (levelStr.equalsIgnoreCase(debug)){
|
||||||
logLevel = EDK_DEBUG;
|
logLevel = EDK_DEBUG;
|
||||||
}
|
}
|
||||||
if (levelStr.equalsIgnoreCase(info)){
|
if (levelStr.equalsIgnoreCase(info)){
|
||||||
logLevel = EDK_INFO;
|
logLevel = EDK_INFO;
|
||||||
}
|
}
|
||||||
if (levelStr.equalsIgnoreCase(verbose)){
|
if (levelStr.equalsIgnoreCase(verbose)){
|
||||||
logLevel = EDK_VERBOSE;
|
logLevel = EDK_VERBOSE;
|
||||||
}
|
}
|
||||||
if (levelStr.equalsIgnoreCase(warning)){
|
if (levelStr.equalsIgnoreCase(warning)){
|
||||||
logLevel = EDK_WARNING;
|
logLevel = EDK_WARNING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static int getLogLevel (){
|
public static int getLogLevel (){
|
||||||
return logLevel;
|
return logLevel;
|
||||||
|
|
|
@ -15,8 +15,8 @@ Module Name:
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
package org.tianocore.logger;
|
|
||||||
|
|
||||||
|
package org.tianocore.common.logger;
|
||||||
|
|
||||||
public interface LogMethod {
|
public interface LogMethod {
|
||||||
public void putMessage(Object msgSource, int msgLevel, String msg);
|
public void putMessage(Object msgSource, int msgLevel, String msg);
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
CreateMtFileTask class.
|
CreateMtFileTask class.
|
||||||
|
|
||||||
CreateMtFileTask is used to call CreateMtFile.exe to create MT file.
|
CreateMtFileTask is used to call CreateMtFile.exe to create MT file.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.taskdefs.Execute;
|
import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
CreateMtFileTask class.
|
CreateMtFileTask class.
|
||||||
|
@ -53,10 +54,10 @@ public class CreateMtFileTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* execute
|
* execute
|
||||||
*
|
*
|
||||||
* StripTask execute function is to assemble tool command line & execute
|
* StripTask execute function is to assemble tool command line & execute
|
||||||
* tool command line
|
* tool command line
|
||||||
*
|
*
|
||||||
* @throws BuidException
|
* @throws BuidException
|
||||||
*/
|
*/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
|
@ -85,7 +86,7 @@ public class CreateMtFileTask extends Task implements EfiDefine {
|
||||||
File file = new File(outputFile);
|
File file = new File(outputFile);
|
||||||
if (!file.isAbsolute() && (!this.outputDir.equalsIgnoreCase(""))) {
|
if (!file.isAbsolute() && (!this.outputDir.equalsIgnoreCase(""))) {
|
||||||
argument = outputDir + File.separatorChar + outputFile + " " + this.fileSize;
|
argument = outputDir + File.separatorChar + outputFile + " " + this.fileSize;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
argument = outputFile + " " + this.fileSize;
|
argument = outputFile + " " + this.fileSize;
|
||||||
}
|
}
|
||||||
|
@ -111,7 +112,7 @@ public class CreateMtFileTask extends Task implements EfiDefine {
|
||||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.outputFile)).getName());
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.outputFile)).getName());
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
if (EFI_SUCCESS == revl) {
|
if (EFI_SUCCESS == revl) {
|
||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
|
@ -131,9 +132,9 @@ public class CreateMtFileTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getFileSize
|
* getFileSize
|
||||||
*
|
*
|
||||||
* This function is to get class member "fileSize".
|
* This function is to get class member "fileSize".
|
||||||
*
|
*
|
||||||
* @return fileSize string of file size.
|
* @return fileSize string of file size.
|
||||||
*/
|
*/
|
||||||
public String getFileSize() {
|
public String getFileSize() {
|
||||||
|
@ -142,9 +143,9 @@ public class CreateMtFileTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setFileSize
|
* setFileSize
|
||||||
*
|
*
|
||||||
* This function is to set class member "fileSize".
|
* This function is to set class member "fileSize".
|
||||||
*
|
*
|
||||||
* @param fileSize
|
* @param fileSize
|
||||||
* string of file size value.
|
* string of file size value.
|
||||||
*/
|
*/
|
||||||
|
@ -154,9 +155,9 @@ public class CreateMtFileTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputFile
|
* getOutputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputFile"
|
* This function is to get class member "outputFile"
|
||||||
*
|
*
|
||||||
* @return outputFile string of output file name.
|
* @return outputFile string of output file name.
|
||||||
*/
|
*/
|
||||||
public String getOutputFile() {
|
public String getOutputFile() {
|
||||||
|
@ -165,9 +166,9 @@ public class CreateMtFileTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputFile
|
* setOutputFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputFile"
|
* This function is to set class member "outputFile"
|
||||||
*
|
*
|
||||||
* @param outputFile
|
* @param outputFile
|
||||||
* string of output file name.
|
* string of output file name.
|
||||||
*/
|
*/
|
||||||
|
@ -177,9 +178,9 @@ public class CreateMtFileTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputDir
|
* getOutputDir
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputDir"
|
* This function is to get class member "outputDir"
|
||||||
*
|
*
|
||||||
* @return outputDir string of output directory.
|
* @return outputDir string of output directory.
|
||||||
*/
|
*/
|
||||||
public String getOutputDir() {
|
public String getOutputDir() {
|
||||||
|
@ -188,9 +189,9 @@ public class CreateMtFileTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputDir
|
* setOutputDir
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputDir"
|
* This function is to set class member "outputDir"
|
||||||
*
|
*
|
||||||
* @param outputDir
|
* @param outputDir
|
||||||
* string of output directory.
|
* string of output directory.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
EfiCompressTask class.
|
EfiCompressTask class.
|
||||||
|
|
||||||
EfiCompressTask is used to call EfiCompress.exe to strip input file.
|
EfiCompressTask is used to call EfiCompress.exe to strip input file.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.taskdefs.Execute;
|
import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
EfiCompressTask class.
|
EfiCompressTask class.
|
||||||
|
@ -49,10 +50,10 @@ public class EfiCompressTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* execute
|
* execute
|
||||||
*
|
*
|
||||||
* EfiCompressTask execute function is to assemble tool command line & execute
|
* EfiCompressTask execute function is to assemble tool command line & execute
|
||||||
* tool command line
|
* tool command line
|
||||||
*
|
*
|
||||||
* @throws BuidException
|
* @throws BuidException
|
||||||
*/
|
*/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
|
@ -106,9 +107,9 @@ public class EfiCompressTask extends Task implements EfiDefine {
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
||||||
|
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
if (EFI_SUCCESS == revl) {
|
if (EFI_SUCCESS == revl) {
|
||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
|
@ -129,9 +130,9 @@ public class EfiCompressTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getInputFile
|
* getInputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "inputFile".
|
* This function is to get class member "inputFile".
|
||||||
*
|
*
|
||||||
* @return string of input file name.
|
* @return string of input file name.
|
||||||
*/
|
*/
|
||||||
public String getInputFile() {
|
public String getInputFile() {
|
||||||
|
@ -140,9 +141,9 @@ public class EfiCompressTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setComponentType
|
* setComponentType
|
||||||
*
|
*
|
||||||
* This function is to set class member "inputFile".
|
* This function is to set class member "inputFile".
|
||||||
*
|
*
|
||||||
* @param inputFile
|
* @param inputFile
|
||||||
* string of input file name.
|
* string of input file name.
|
||||||
*/
|
*/
|
||||||
|
@ -152,9 +153,9 @@ public class EfiCompressTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputFile
|
* getOutputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputFile"
|
* This function is to get class member "outputFile"
|
||||||
*
|
*
|
||||||
* @return outputFile string of output file name.
|
* @return outputFile string of output file name.
|
||||||
*/
|
*/
|
||||||
public String getOutputFile() {
|
public String getOutputFile() {
|
||||||
|
@ -163,9 +164,9 @@ public class EfiCompressTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputFile
|
* setOutputFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputFile"
|
* This function is to set class member "outputFile"
|
||||||
*
|
*
|
||||||
* @param outputFile
|
* @param outputFile
|
||||||
* string of output file name.
|
* string of output file name.
|
||||||
*/
|
*/
|
||||||
|
@ -175,9 +176,9 @@ public class EfiCompressTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputDir
|
* getOutputDir
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputDir"
|
* This function is to get class member "outputDir"
|
||||||
*
|
*
|
||||||
* @return outputDir string of output directory.
|
* @return outputDir string of output directory.
|
||||||
*/
|
*/
|
||||||
public String getOutputDir() {
|
public String getOutputDir() {
|
||||||
|
@ -186,9 +187,9 @@ public class EfiCompressTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputDir
|
* setOutputDir
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputDir"
|
* This function is to set class member "outputDir"
|
||||||
*
|
*
|
||||||
* @param outputDir
|
* @param outputDir
|
||||||
* string of output directory.
|
* string of output directory.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
EfiRomTask class.
|
EfiRomTask class.
|
||||||
|
|
||||||
EfiRomTask is used to call FlashMap.exe to lay out the flash.
|
EfiRomTask is used to call FlashMap.exe to lay out the flash.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -26,11 +26,12 @@ import java.util.List;
|
||||||
import org.apache.tools.ant.Task;
|
import org.apache.tools.ant.Task;
|
||||||
import org.apache.tools.ant.Project;
|
import org.apache.tools.ant.Project;
|
||||||
import org.apache.tools.ant.BuildException;
|
import org.apache.tools.ant.BuildException;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SecFixupTask class.
|
* SecFixupTask class.
|
||||||
*
|
*
|
||||||
* SecFixupTask is used to call SecFixup.exe to fix up sec image.
|
* SecFixupTask is used to call SecFixup.exe to fix up sec image.
|
||||||
*/
|
*/
|
||||||
public class EfiRomTask extends Task implements EfiDefine {
|
public class EfiRomTask extends Task implements EfiDefine {
|
||||||
|
@ -38,7 +39,7 @@ public class EfiRomTask extends Task implements EfiDefine {
|
||||||
/// tool name
|
/// tool name
|
||||||
///
|
///
|
||||||
private final String toolName = "EfiRom";
|
private final String toolName = "EfiRom";
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Flash default file
|
/// Flash default file
|
||||||
///
|
///
|
||||||
|
@ -53,59 +54,59 @@ public class EfiRomTask extends Task implements EfiDefine {
|
||||||
/// Flash device Image
|
/// Flash device Image
|
||||||
///
|
///
|
||||||
private String deviceId = "";
|
private String deviceId = "";
|
||||||
|
|
||||||
///
|
///
|
||||||
/// MCI file
|
/// MCI file
|
||||||
///
|
///
|
||||||
private String outputFile = "";
|
private String outputFile = "";
|
||||||
|
|
||||||
///
|
///
|
||||||
/// MCO file
|
/// MCO file
|
||||||
///
|
///
|
||||||
private List<Input> binaryFileList = new ArrayList<Input>();
|
private List<Input> binaryFileList = new ArrayList<Input>();
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Efi PE32 image file
|
/// Efi PE32 image file
|
||||||
///
|
///
|
||||||
private List<Input> pe32FileList = new ArrayList<Input>();
|
private List<Input> pe32FileList = new ArrayList<Input>();
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Compress efi PE32 image file
|
/// Compress efi PE32 image file
|
||||||
///
|
///
|
||||||
private List<Input> pe32ComprFileList = new ArrayList<Input>();
|
private List<Input> pe32ComprFileList = new ArrayList<Input>();
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Hex class code in the PCI data strutor header
|
/// Hex class code in the PCI data strutor header
|
||||||
///
|
///
|
||||||
private String classCode = "";
|
private String classCode = "";
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Hex revision in the PCI data header.
|
/// Hex revision in the PCI data header.
|
||||||
///
|
///
|
||||||
private String revision = "";
|
private String revision = "";
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Dump the headers of an existing option rom image.
|
/// Dump the headers of an existing option rom image.
|
||||||
///
|
///
|
||||||
private String dump = "";
|
private String dump = "";
|
||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// output directory
|
/// output directory
|
||||||
///
|
///
|
||||||
private String outputDir = ".";
|
private String outputDir = ".";
|
||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// command and argument list
|
/// command and argument list
|
||||||
///
|
///
|
||||||
LinkedList<String> argList = new LinkedList<String>();
|
LinkedList<String> argList = new LinkedList<String>();
|
||||||
/**
|
/**
|
||||||
* execute
|
* execute
|
||||||
*
|
*
|
||||||
* EfiRomTask execute function is to assemble tool command line & execute
|
* EfiRomTask execute function is to assemble tool command line & execute
|
||||||
* tool command line
|
* tool command line
|
||||||
*
|
*
|
||||||
* @throws BuidException
|
* @throws BuidException
|
||||||
*/
|
*/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
|
@ -128,7 +129,7 @@ public class EfiRomTask extends Task implements EfiDefine {
|
||||||
command = path + File.separatorChar + toolName;
|
command = path + File.separatorChar + toolName;
|
||||||
}
|
}
|
||||||
argList.addFirst(command);
|
argList.addFirst(command);
|
||||||
|
|
||||||
//
|
//
|
||||||
// add microcode binary files
|
// add microcode binary files
|
||||||
//
|
//
|
||||||
|
@ -139,7 +140,7 @@ public class EfiRomTask extends Task implements EfiDefine {
|
||||||
argList.add(((Input)binList.next()).getFile());
|
argList.add(((Input)binList.next()).getFile());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// add pe32 file
|
// add pe32 file
|
||||||
//
|
//
|
||||||
|
@ -150,7 +151,7 @@ public class EfiRomTask extends Task implements EfiDefine {
|
||||||
argList.add(((Input)pe32List.next()).getFile());
|
argList.add(((Input)pe32List.next()).getFile());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// add compressed pe32 file
|
// add compressed pe32 file
|
||||||
//
|
//
|
||||||
|
@ -191,48 +192,48 @@ public class EfiRomTask extends Task implements EfiDefine {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getVerbose
|
* getVerbose
|
||||||
*
|
*
|
||||||
* This function is to get class member "verbose"
|
* This function is to get class member "verbose"
|
||||||
*
|
*
|
||||||
* @return verbose for verbose output.
|
* @return verbose for verbose output.
|
||||||
*/
|
*/
|
||||||
public String getVerbose() {
|
public String getVerbose() {
|
||||||
return verbose;
|
return verbose;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setVerbose
|
* setVerbose
|
||||||
*
|
*
|
||||||
* This function is to set class member "verbose"
|
* This function is to set class member "verbose"
|
||||||
*
|
*
|
||||||
* @param verbose for verbose output.
|
* @param verbose for verbose output.
|
||||||
*/
|
*/
|
||||||
public void setVerbose(boolean verbose) {
|
public void setVerbose(boolean verbose) {
|
||||||
if (verbose){
|
if (verbose){
|
||||||
this.verbose = "-p";
|
this.verbose = "-p";
|
||||||
argList.add(this.verbose);
|
argList.add(this.verbose);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getVenderId
|
* getVenderId
|
||||||
*
|
*
|
||||||
* This function is to get class member "venderId"
|
* This function is to get class member "venderId"
|
||||||
*
|
*
|
||||||
* @return venderId String of venderId.
|
* @return venderId String of venderId.
|
||||||
*/
|
*/
|
||||||
public String getVenderId() {
|
public String getVenderId() {
|
||||||
return venderId;
|
return venderId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setVenderId
|
* setVenderId
|
||||||
*
|
*
|
||||||
* This function is to set class member "venderId"
|
* This function is to set class member "venderId"
|
||||||
*
|
*
|
||||||
* @param venderId String of venderId.
|
* @param venderId String of venderId.
|
||||||
*/
|
*/
|
||||||
public void setVenderId(String VenderId) {
|
public void setVenderId(String VenderId) {
|
||||||
|
@ -240,23 +241,23 @@ public class EfiRomTask extends Task implements EfiDefine {
|
||||||
argList.add("-v");
|
argList.add("-v");
|
||||||
argList.add(this.venderId);
|
argList.add(this.venderId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getDeviceId
|
* getDeviceId
|
||||||
*
|
*
|
||||||
* This function is to get class member "deviceId"
|
* This function is to get class member "deviceId"
|
||||||
*
|
*
|
||||||
* @return deviceId String of device ID.
|
* @return deviceId String of device ID.
|
||||||
*/
|
*/
|
||||||
public String getDeviceId() {
|
public String getDeviceId() {
|
||||||
return this.deviceId;
|
return this.deviceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setDeviceId
|
* setDeviceId
|
||||||
*
|
*
|
||||||
* This function is to set class member "deviceId"
|
* This function is to set class member "deviceId"
|
||||||
*
|
*
|
||||||
* @param deviceId String of device ID.
|
* @param deviceId String of device ID.
|
||||||
*/
|
*/
|
||||||
public void setDeviceId(String deviceId) {
|
public void setDeviceId(String deviceId) {
|
||||||
|
@ -265,46 +266,46 @@ public class EfiRomTask extends Task implements EfiDefine {
|
||||||
argList.add(this.deviceId);
|
argList.add(this.deviceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputFile
|
* getOutputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputFile"
|
* This function is to get class member "outputFile"
|
||||||
*
|
*
|
||||||
* @return outputFile name of output directory.
|
* @return outputFile name of output directory.
|
||||||
*/
|
*/
|
||||||
public String getOutputFile() {
|
public String getOutputFile() {
|
||||||
return outputFile;
|
return outputFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputFile
|
* setOutputFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "dscFile"
|
* This function is to set class member "dscFile"
|
||||||
*
|
*
|
||||||
* @param outputFile name of DSC file
|
* @param outputFile name of DSC file
|
||||||
*/
|
*/
|
||||||
public void setOutputFile(String outputFile) {
|
public void setOutputFile(String outputFile) {
|
||||||
this.outputFile = outputFile;
|
this.outputFile = outputFile;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getClassCode
|
* getClassCode
|
||||||
*
|
*
|
||||||
* This function is to get class member "classCode"
|
* This function is to get class member "classCode"
|
||||||
*
|
*
|
||||||
* @return fdImage name of class code file.
|
* @return fdImage name of class code file.
|
||||||
*/
|
*/
|
||||||
public String getClassCode() {
|
public String getClassCode() {
|
||||||
return classCode;
|
return classCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setclassCode
|
* setclassCode
|
||||||
*
|
*
|
||||||
* This function is to set class member "classCode"
|
* This function is to set class member "classCode"
|
||||||
*
|
*
|
||||||
* @param fdImage name of class code file.
|
* @param fdImage name of class code file.
|
||||||
*/
|
*/
|
||||||
public void setclassCode(String classCode) {
|
public void setclassCode(String classCode) {
|
||||||
|
@ -312,23 +313,23 @@ public class EfiRomTask extends Task implements EfiDefine {
|
||||||
argList.add("-cc");
|
argList.add("-cc");
|
||||||
argList.add(this.classCode);
|
argList.add(this.classCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getRevision
|
* getRevision
|
||||||
*
|
*
|
||||||
* This function is to get class member "revision".
|
* This function is to get class member "revision".
|
||||||
*
|
*
|
||||||
* @return revision hex revision in the PDI data header.
|
* @return revision hex revision in the PDI data header.
|
||||||
*/
|
*/
|
||||||
public String getRevision() {
|
public String getRevision() {
|
||||||
return revision;
|
return revision;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setRevision
|
* setRevision
|
||||||
*
|
*
|
||||||
* This function is to set class member "revision"
|
* This function is to set class member "revision"
|
||||||
*
|
*
|
||||||
* @param revision hex revision in the PDI data header.
|
* @param revision hex revision in the PDI data header.
|
||||||
*/
|
*/
|
||||||
public void setRevision(String revision) {
|
public void setRevision(String revision) {
|
||||||
|
@ -336,23 +337,23 @@ public class EfiRomTask extends Task implements EfiDefine {
|
||||||
argList.add("-rev");
|
argList.add("-rev");
|
||||||
argList.add(this.revision);
|
argList.add(this.revision);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getFlashDeviceImage
|
* getFlashDeviceImage
|
||||||
*
|
*
|
||||||
* This function is to get class member "dump"
|
* This function is to get class member "dump"
|
||||||
*
|
*
|
||||||
* @return flashDeviceImage name of flash device image
|
* @return flashDeviceImage name of flash device image
|
||||||
*/
|
*/
|
||||||
public String getDump() {
|
public String getDump() {
|
||||||
return dump;
|
return dump;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setFlashDeviceImage
|
* setFlashDeviceImage
|
||||||
*
|
*
|
||||||
* This function is to set class member "dump"
|
* This function is to set class member "dump"
|
||||||
*
|
*
|
||||||
* @param flashDeviceImage name of flash device image
|
* @param flashDeviceImage name of flash device image
|
||||||
*/
|
*/
|
||||||
public void setDump(boolean dump) {
|
public void setDump(boolean dump) {
|
||||||
|
@ -364,20 +365,20 @@ public class EfiRomTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputDir
|
* getOutputDir
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputDir"
|
* This function is to get class member "outputDir"
|
||||||
*
|
*
|
||||||
* @return outputDir string of output directory
|
* @return outputDir string of output directory
|
||||||
*/
|
*/
|
||||||
public String getOutputDir() {
|
public String getOutputDir() {
|
||||||
return outputDir;
|
return outputDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputDir
|
* setOutputDir
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputDir"
|
* This function is to set class member "outputDir"
|
||||||
*
|
*
|
||||||
* @param outputDir string of output directory
|
* @param outputDir string of output directory
|
||||||
*/
|
*/
|
||||||
public void setOutputDir(String outputDir) {
|
public void setOutputDir(String outputDir) {
|
||||||
|
@ -385,31 +386,31 @@ public class EfiRomTask extends Task implements EfiDefine {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* addBinaryFile
|
* addBinaryFile
|
||||||
*
|
*
|
||||||
* This function is to add binary file to binaryFile list.
|
* This function is to add binary file to binaryFile list.
|
||||||
*
|
*
|
||||||
* @param binaryFile name of binary file.
|
* @param binaryFile name of binary file.
|
||||||
*/
|
*/
|
||||||
public void addBinaryFile(Input binaryFile){
|
public void addBinaryFile(Input binaryFile){
|
||||||
this.binaryFileList.add(binaryFile);
|
this.binaryFileList.add(binaryFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* addPe32File
|
* addPe32File
|
||||||
*
|
*
|
||||||
* This function is to add pe32 file to pe32File list.
|
* This function is to add pe32 file to pe32File list.
|
||||||
*
|
*
|
||||||
* @param pe32File name of pe32 file.
|
* @param pe32File name of pe32 file.
|
||||||
*/
|
*/
|
||||||
public void addPe32File(Input pe32File){
|
public void addPe32File(Input pe32File){
|
||||||
this.pe32FileList.add(pe32File);
|
this.pe32FileList.add(pe32File);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* addPe32ComprFile
|
* addPe32ComprFile
|
||||||
*
|
*
|
||||||
* This function os to add compressed pe32 file to pe32ComprFile list.
|
* This function os to add compressed pe32 file to pe32ComprFile list.
|
||||||
*
|
*
|
||||||
* @param pe32ComprFile name of compressed pe32 file.
|
* @param pe32ComprFile name of compressed pe32 file.
|
||||||
*/
|
*/
|
||||||
public void addPe32ComprFile(Input pe32ComprFile){
|
public void addPe32ComprFile(Input pe32ComprFile){
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
FlashMapTask class.
|
FlashMapTask class.
|
||||||
|
|
||||||
FlashMapTask is used to call FlashMap.exe to lay out the flash.
|
FlashMapTask is used to call FlashMap.exe to lay out the flash.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -26,11 +26,12 @@ import java.util.List;
|
||||||
import org.apache.tools.ant.Task;
|
import org.apache.tools.ant.Task;
|
||||||
import org.apache.tools.ant.Project;
|
import org.apache.tools.ant.Project;
|
||||||
import org.apache.tools.ant.BuildException;
|
import org.apache.tools.ant.BuildException;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FlashMapTask class.
|
* FlashMapTask class.
|
||||||
*
|
*
|
||||||
* FlashMapTask is used to call FlashMap.exe to generate flash map defition files and fd files.
|
* FlashMapTask is used to call FlashMap.exe to generate flash map defition files and fd files.
|
||||||
*/
|
*/
|
||||||
public class FlashMapTask extends Task implements EfiDefine {
|
public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
@ -131,10 +132,10 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* execute
|
* execute
|
||||||
*
|
*
|
||||||
* FlashMapTask execute function is to assemble tool command line & execute
|
* FlashMapTask execute function is to assemble tool command line & execute
|
||||||
* tool command line
|
* tool command line
|
||||||
*
|
*
|
||||||
* @throws BuidException
|
* @throws BuidException
|
||||||
*/
|
*/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
|
@ -168,8 +169,8 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
argList.add(this.inStrFile);
|
argList.add(this.inStrFile);
|
||||||
argList.add(this.outStrFile);
|
argList.add(this.outStrFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// add microcode binary files
|
// add microcode binary files
|
||||||
//
|
//
|
||||||
|
@ -216,9 +217,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getFlashDefFile
|
* getFlashDefFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "flashDefFile"
|
* This function is to get class member "flashDefFile"
|
||||||
*
|
*
|
||||||
* @return flashDeFile Name of flash definition file.
|
* @return flashDeFile Name of flash definition file.
|
||||||
*/
|
*/
|
||||||
public String getFlashDefFile() {
|
public String getFlashDefFile() {
|
||||||
|
@ -227,9 +228,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setFlashDefFile
|
* setFlashDefFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "flashDefFile"
|
* This function is to set class member "flashDefFile"
|
||||||
*
|
*
|
||||||
* @param flashDefFile
|
* @param flashDefFile
|
||||||
* Name of flash definition file.
|
* Name of flash definition file.
|
||||||
*/
|
*/
|
||||||
|
@ -241,9 +242,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getAligment
|
* getAligment
|
||||||
*
|
*
|
||||||
* This function is to get class member "aligment"
|
* This function is to get class member "aligment"
|
||||||
*
|
*
|
||||||
* @return aligment String of aligment value.
|
* @return aligment String of aligment value.
|
||||||
*/
|
*/
|
||||||
public String getAligment() {
|
public String getAligment() {
|
||||||
|
@ -252,9 +253,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setAligment
|
* setAligment
|
||||||
*
|
*
|
||||||
* This function is to set class member "aligment"
|
* This function is to set class member "aligment"
|
||||||
*
|
*
|
||||||
* @param aligment
|
* @param aligment
|
||||||
* String of aligment value.
|
* String of aligment value.
|
||||||
*/
|
*/
|
||||||
|
@ -266,9 +267,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getAsmIncFile
|
* getAsmIncFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "asmIncFile"
|
* This function is to get class member "asmIncFile"
|
||||||
*
|
*
|
||||||
* @return asmIncFile String of ASM include file.
|
* @return asmIncFile String of ASM include file.
|
||||||
*/
|
*/
|
||||||
public String getAsmIncFile() {
|
public String getAsmIncFile() {
|
||||||
|
@ -277,9 +278,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setAsmIncFile
|
* setAsmIncFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "asmIncFile"
|
* This function is to set class member "asmIncFile"
|
||||||
*
|
*
|
||||||
* @param asmIncFile
|
* @param asmIncFile
|
||||||
* String of ASM include file.
|
* String of ASM include file.
|
||||||
*/
|
*/
|
||||||
|
@ -291,9 +292,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getBaseAddr
|
* getBaseAddr
|
||||||
*
|
*
|
||||||
* This function is to get class member "baseAddr"
|
* This function is to get class member "baseAddr"
|
||||||
*
|
*
|
||||||
* @return baseAddr String of base address value.
|
* @return baseAddr String of base address value.
|
||||||
*/
|
*/
|
||||||
public String getBaseAddr() {
|
public String getBaseAddr() {
|
||||||
|
@ -302,9 +303,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setBaseAddr
|
* setBaseAddr
|
||||||
*
|
*
|
||||||
* This function is to set class member "baseAddr"
|
* This function is to set class member "baseAddr"
|
||||||
*
|
*
|
||||||
* @param baseAddr
|
* @param baseAddr
|
||||||
* String of base address value.
|
* String of base address value.
|
||||||
*/
|
*/
|
||||||
|
@ -316,9 +317,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getDscFile
|
* getDscFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "dscFile"
|
* This function is to get class member "dscFile"
|
||||||
*
|
*
|
||||||
* @return dscFile name of DSC file
|
* @return dscFile name of DSC file
|
||||||
*/
|
*/
|
||||||
public String getDscFile() {
|
public String getDscFile() {
|
||||||
|
@ -327,9 +328,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setDscFile
|
* setDscFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "dscFile"
|
* This function is to set class member "dscFile"
|
||||||
*
|
*
|
||||||
* @param dscFile
|
* @param dscFile
|
||||||
* name of DSC file
|
* name of DSC file
|
||||||
*/
|
*/
|
||||||
|
@ -341,9 +342,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getFdImage
|
* getFdImage
|
||||||
*
|
*
|
||||||
* This function is to get class member "fdImage"
|
* This function is to get class member "fdImage"
|
||||||
*
|
*
|
||||||
* @return fdImage name of input FDI image file.
|
* @return fdImage name of input FDI image file.
|
||||||
*/
|
*/
|
||||||
public String getFdImage() {
|
public String getFdImage() {
|
||||||
|
@ -352,9 +353,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setFdImage
|
* setFdImage
|
||||||
*
|
*
|
||||||
* This function is to set class member "fdImage"
|
* This function is to set class member "fdImage"
|
||||||
*
|
*
|
||||||
* @param fdImage
|
* @param fdImage
|
||||||
* name of input FDI image file.
|
* name of input FDI image file.
|
||||||
*/
|
*/
|
||||||
|
@ -366,9 +367,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getFlashDevice
|
* getFlashDevice
|
||||||
*
|
*
|
||||||
* This function is to get class member "flashDevice".
|
* This function is to get class member "flashDevice".
|
||||||
*
|
*
|
||||||
* @return flashDevice name of flash device.
|
* @return flashDevice name of flash device.
|
||||||
*/
|
*/
|
||||||
public String getFlashDevice() {
|
public String getFlashDevice() {
|
||||||
|
@ -377,9 +378,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setFlashDevice
|
* setFlashDevice
|
||||||
*
|
*
|
||||||
* This function is to set class member "flashDevice"
|
* This function is to set class member "flashDevice"
|
||||||
*
|
*
|
||||||
* @param flashDevice
|
* @param flashDevice
|
||||||
* name of flash device.
|
* name of flash device.
|
||||||
*/
|
*/
|
||||||
|
@ -391,9 +392,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getFlashDeviceImage
|
* getFlashDeviceImage
|
||||||
*
|
*
|
||||||
* This function is to get class member "flashDeviceImage"
|
* This function is to get class member "flashDeviceImage"
|
||||||
*
|
*
|
||||||
* @return flashDeviceImage name of flash device image
|
* @return flashDeviceImage name of flash device image
|
||||||
*/
|
*/
|
||||||
public String getFlashDeviceImage() {
|
public String getFlashDeviceImage() {
|
||||||
|
@ -402,9 +403,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setFlashDeviceImage
|
* setFlashDeviceImage
|
||||||
*
|
*
|
||||||
* This function is to set class member "flashDeviceImage"
|
* This function is to set class member "flashDeviceImage"
|
||||||
*
|
*
|
||||||
* @param flashDeviceImage
|
* @param flashDeviceImage
|
||||||
* name of flash device image
|
* name of flash device image
|
||||||
*/
|
*/
|
||||||
|
@ -417,9 +418,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getHeaderFile
|
* getHeaderFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "headerFile"
|
* This function is to get class member "headerFile"
|
||||||
*
|
*
|
||||||
* @return headerFile name of include file
|
* @return headerFile name of include file
|
||||||
*/
|
*/
|
||||||
public String getHeaderFile() {
|
public String getHeaderFile() {
|
||||||
|
@ -428,9 +429,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setHeaderFile
|
* setHeaderFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "headerFile"
|
* This function is to set class member "headerFile"
|
||||||
*
|
*
|
||||||
* @param headerFile
|
* @param headerFile
|
||||||
* name of include file
|
* name of include file
|
||||||
*/
|
*/
|
||||||
|
@ -442,9 +443,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getImageOutFile
|
* getImageOutFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "imageOutFile"
|
* This function is to get class member "imageOutFile"
|
||||||
*
|
*
|
||||||
* @return imageOutFile name of output image file
|
* @return imageOutFile name of output image file
|
||||||
*/
|
*/
|
||||||
public String getImageOutFile() {
|
public String getImageOutFile() {
|
||||||
|
@ -453,9 +454,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setImageOutFile
|
* setImageOutFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "ImageOutFile"
|
* This function is to set class member "ImageOutFile"
|
||||||
*
|
*
|
||||||
* @param imageOutFile
|
* @param imageOutFile
|
||||||
* name of output image file
|
* name of output image file
|
||||||
*/
|
*/
|
||||||
|
@ -467,9 +468,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getInStrFile
|
* getInStrFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "inStrFile"
|
* This function is to get class member "inStrFile"
|
||||||
*
|
*
|
||||||
* @return inStrFile name of input file which used to replace symbol names.
|
* @return inStrFile name of input file which used to replace symbol names.
|
||||||
*/
|
*/
|
||||||
public String getInStrFile() {
|
public String getInStrFile() {
|
||||||
|
@ -478,9 +479,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setInStrFile
|
* setInStrFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "inStrFile"
|
* This function is to set class member "inStrFile"
|
||||||
*
|
*
|
||||||
* @param inStrFile
|
* @param inStrFile
|
||||||
* name of input file which used to replace symbol names.
|
* name of input file which used to replace symbol names.
|
||||||
*/
|
*/
|
||||||
|
@ -490,9 +491,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getMciFile
|
* getMciFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "mciFile"
|
* This function is to get class member "mciFile"
|
||||||
*
|
*
|
||||||
* @return mciFile name of input microcode file
|
* @return mciFile name of input microcode file
|
||||||
*/
|
*/
|
||||||
public String getMciFile() {
|
public String getMciFile() {
|
||||||
|
@ -501,9 +502,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setMciFile
|
* setMciFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "mciFile"
|
* This function is to set class member "mciFile"
|
||||||
*
|
*
|
||||||
* @param mciFile
|
* @param mciFile
|
||||||
* name of input microcode file
|
* name of input microcode file
|
||||||
*/
|
*/
|
||||||
|
@ -515,9 +516,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getMcoFile
|
* getMcoFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "mcoFile"
|
* This function is to get class member "mcoFile"
|
||||||
*
|
*
|
||||||
* @return mcoFile name of output binary microcode image
|
* @return mcoFile name of output binary microcode image
|
||||||
*/
|
*/
|
||||||
public String getMcoFile() {
|
public String getMcoFile() {
|
||||||
|
@ -526,9 +527,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setMcoFile
|
* setMcoFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "mcoFile"
|
* This function is to set class member "mcoFile"
|
||||||
*
|
*
|
||||||
* @param mcoFile
|
* @param mcoFile
|
||||||
* name of output binary microcode image
|
* name of output binary microcode image
|
||||||
*/
|
*/
|
||||||
|
@ -540,9 +541,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutStrFile
|
* getOutStrFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "outStrFile"
|
* This function is to get class member "outStrFile"
|
||||||
*
|
*
|
||||||
* @return outStrFile name of output string substitution file
|
* @return outStrFile name of output string substitution file
|
||||||
*/
|
*/
|
||||||
public String getOutStrFile() {
|
public String getOutStrFile() {
|
||||||
|
@ -551,9 +552,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutStrFile
|
* setOutStrFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "outStrFile"
|
* This function is to set class member "outStrFile"
|
||||||
*
|
*
|
||||||
* @param outStrFile
|
* @param outStrFile
|
||||||
* name of output string substitution file
|
* name of output string substitution file
|
||||||
*/
|
*/
|
||||||
|
@ -563,9 +564,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getPadValue
|
* getPadValue
|
||||||
*
|
*
|
||||||
* This function is to get class member "padValue"
|
* This function is to get class member "padValue"
|
||||||
*
|
*
|
||||||
* @return padValue string of byte value to use as padding
|
* @return padValue string of byte value to use as padding
|
||||||
*/
|
*/
|
||||||
public String getPadValue() {
|
public String getPadValue() {
|
||||||
|
@ -574,9 +575,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setPadValue
|
* setPadValue
|
||||||
*
|
*
|
||||||
* This function is to set class member "padValue"
|
* This function is to set class member "padValue"
|
||||||
*
|
*
|
||||||
* @param padValue
|
* @param padValue
|
||||||
* string of byte value to use as padding
|
* string of byte value to use as padding
|
||||||
*/
|
*/
|
||||||
|
@ -588,9 +589,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* addMciFile
|
* addMciFile
|
||||||
*
|
*
|
||||||
* This function is to add Microcode binary file
|
* This function is to add Microcode binary file
|
||||||
*
|
*
|
||||||
* @param mciFile
|
* @param mciFile
|
||||||
* instance of input class
|
* instance of input class
|
||||||
*/
|
*/
|
||||||
|
@ -600,9 +601,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputDir
|
* getOutputDir
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputDir"
|
* This function is to get class member "outputDir"
|
||||||
*
|
*
|
||||||
* @return outputDir string of output directory
|
* @return outputDir string of output directory
|
||||||
*/
|
*/
|
||||||
public String getOutputDir() {
|
public String getOutputDir() {
|
||||||
|
@ -611,9 +612,9 @@ public class FlashMapTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputDir
|
* setOutputDir
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputDir"
|
* This function is to set class member "outputDir"
|
||||||
*
|
*
|
||||||
* @param outputDir
|
* @param outputDir
|
||||||
* string of output directory
|
* string of output directory
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -17,18 +17,20 @@ Abstract:
|
||||||
--*/
|
--*/
|
||||||
|
|
||||||
package org.tianocore.framework.tasks;
|
package org.tianocore.framework.tasks;
|
||||||
|
|
||||||
import org.apache.tools.ant.Project;
|
import org.apache.tools.ant.Project;
|
||||||
import org.tianocore.logger.LogMethod;
|
|
||||||
|
import org.tianocore.common.logger.LogMethod;
|
||||||
|
|
||||||
class FrameworkLogger implements LogMethod {
|
class FrameworkLogger implements LogMethod {
|
||||||
private Project project;
|
private Project project;
|
||||||
private String titleName;
|
private String titleName;
|
||||||
public FrameworkLogger(Project project, String taskName) {
|
public FrameworkLogger(Project project, String taskName) {
|
||||||
this.project = project;
|
this.project = project;
|
||||||
this.titleName = taskName;
|
this.titleName = taskName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void putMessage(Object msgSource, int msgLevel, String msg) {
|
public void putMessage(Object msgSource, int msgLevel, String msg) {
|
||||||
String frameworkMsg = " [" + this.titleName + "] " + msg;
|
String frameworkMsg = " [" + this.titleName + "] " + msg;
|
||||||
this.project.log(frameworkMsg, Project.MSG_INFO);
|
this.project.log(frameworkMsg, Project.MSG_INFO);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
FwImageTask class.
|
FwImageTask class.
|
||||||
|
|
||||||
FwImageTask is used to call FwImage.ext to generate the FwImage.
|
FwImageTask is used to call FwImage.ext to generate the FwImage.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ import org.apache.tools.ant.Task;
|
||||||
import org.apache.tools.ant.taskdefs.Execute;
|
import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,17 +35,17 @@ import org.tianocore.logger.EdkLog;
|
||||||
**/
|
**/
|
||||||
public class FwImageTask extends Task implements EfiDefine{
|
public class FwImageTask extends Task implements EfiDefine{
|
||||||
///
|
///
|
||||||
/// time&data
|
/// time&data
|
||||||
///
|
///
|
||||||
private String time = "";
|
private String time = "";
|
||||||
///
|
///
|
||||||
/// input PE image
|
/// input PE image
|
||||||
///
|
///
|
||||||
private String peImage = "";
|
private String peImage = "";
|
||||||
private String peImageName = "";
|
private String peImageName = "";
|
||||||
///
|
///
|
||||||
/// output EFI image
|
/// output EFI image
|
||||||
///
|
///
|
||||||
private String outImage = "";
|
private String outImage = "";
|
||||||
///
|
///
|
||||||
/// component type
|
/// component type
|
||||||
|
@ -53,15 +54,15 @@ public class FwImageTask extends Task implements EfiDefine{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* assemble tool command line & execute tool command line
|
* assemble tool command line & execute tool command line
|
||||||
*
|
*
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
execute
|
execute
|
||||||
|
|
||||||
FwimageTask execute function is to assemble tool command line & execute
|
FwimageTask execute function is to assemble tool command line & execute
|
||||||
tool command line
|
tool command line
|
||||||
|
|
||||||
@throws BuidException
|
@throws BuidException
|
||||||
**/
|
**/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
|
@ -117,9 +118,9 @@ public class FwImageTask extends Task implements EfiDefine{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
setTime
|
setTime
|
||||||
|
|
||||||
This function is to set operation of class member "time".
|
This function is to set operation of class member "time".
|
||||||
|
|
||||||
@param time string of time
|
@param time string of time
|
||||||
**/
|
**/
|
||||||
public void setTime(String time) {
|
public void setTime(String time) {
|
||||||
|
@ -128,7 +129,7 @@ public class FwImageTask extends Task implements EfiDefine{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
getTime
|
getTime
|
||||||
|
|
||||||
This function is to get class member "time"
|
This function is to get class member "time"
|
||||||
@return time string of time
|
@return time string of time
|
||||||
**/
|
**/
|
||||||
|
@ -138,7 +139,7 @@ public class FwImageTask extends Task implements EfiDefine{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
getPeImage
|
getPeImage
|
||||||
|
|
||||||
This function is to get class member "peImage".
|
This function is to get class member "peImage".
|
||||||
@return name of PE image
|
@return name of PE image
|
||||||
**/
|
**/
|
||||||
|
@ -148,7 +149,7 @@ public class FwImageTask extends Task implements EfiDefine{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
setPeImage
|
setPeImage
|
||||||
|
|
||||||
This function is to set class member "peImage"
|
This function is to set class member "peImage"
|
||||||
@param peImage name of PE image
|
@param peImage name of PE image
|
||||||
**/
|
**/
|
||||||
|
@ -159,7 +160,7 @@ public class FwImageTask extends Task implements EfiDefine{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
getOutImage
|
getOutImage
|
||||||
|
|
||||||
This function is to get class member "outImage".
|
This function is to get class member "outImage".
|
||||||
@return name of output EFI image
|
@return name of output EFI image
|
||||||
**/
|
**/
|
||||||
|
@ -169,7 +170,7 @@ public class FwImageTask extends Task implements EfiDefine{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
setOutImage
|
setOutImage
|
||||||
|
|
||||||
This function is to set class member "outImage".
|
This function is to set class member "outImage".
|
||||||
@param outImage name of output EFI image
|
@param outImage name of output EFI image
|
||||||
**/
|
**/
|
||||||
|
@ -179,9 +180,9 @@ public class FwImageTask extends Task implements EfiDefine{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
getComponentType
|
getComponentType
|
||||||
|
|
||||||
This function is to get class member "componentType".
|
This function is to get class member "componentType".
|
||||||
|
|
||||||
@return string of componentType
|
@return string of componentType
|
||||||
**/
|
**/
|
||||||
public String getComponentType() {
|
public String getComponentType() {
|
||||||
|
@ -190,7 +191,7 @@ public class FwImageTask extends Task implements EfiDefine{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
setComponentType
|
setComponentType
|
||||||
|
|
||||||
This function is to set class member "componentType".
|
This function is to set class member "componentType".
|
||||||
@param componentType string of component type
|
@param componentType string of component type
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
GenAcpiTable class.
|
GenAcpiTable class.
|
||||||
|
|
||||||
GenAcpiTable is used to call GenAcpiTable.exe to generate ACPI Table image .
|
GenAcpiTable is used to call GenAcpiTable.exe to generate ACPI Table image .
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.taskdefs.Execute;
|
import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
GenAcpiTable class.
|
GenAcpiTable class.
|
||||||
|
@ -49,10 +50,10 @@ public class GenAcpiTableTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* execute
|
* execute
|
||||||
*
|
*
|
||||||
* StripTask execute function is to assemble tool command line & execute
|
* StripTask execute function is to assemble tool command line & execute
|
||||||
* tool command line
|
* tool command line
|
||||||
*
|
*
|
||||||
* @throws BuidException
|
* @throws BuidException
|
||||||
*/
|
*/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
|
@ -107,7 +108,7 @@ public class GenAcpiTableTask extends Task implements EfiDefine {
|
||||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
if (EFI_SUCCESS == revl) {
|
if (EFI_SUCCESS == revl) {
|
||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
|
@ -127,9 +128,9 @@ public class GenAcpiTableTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getInputFile
|
* getInputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "inputFile".
|
* This function is to get class member "inputFile".
|
||||||
*
|
*
|
||||||
* @return string of input file name.
|
* @return string of input file name.
|
||||||
*/
|
*/
|
||||||
public String getInputFile() {
|
public String getInputFile() {
|
||||||
|
@ -138,9 +139,9 @@ public class GenAcpiTableTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setComponentType
|
* setComponentType
|
||||||
*
|
*
|
||||||
* This function is to set class member "inputFile".
|
* This function is to set class member "inputFile".
|
||||||
*
|
*
|
||||||
* @param inputFile
|
* @param inputFile
|
||||||
* string of input file name.
|
* string of input file name.
|
||||||
*/
|
*/
|
||||||
|
@ -150,9 +151,9 @@ public class GenAcpiTableTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputFile
|
* getOutputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputFile"
|
* This function is to get class member "outputFile"
|
||||||
*
|
*
|
||||||
* @return outputFile string of output file name.
|
* @return outputFile string of output file name.
|
||||||
*/
|
*/
|
||||||
public String getOutputFile() {
|
public String getOutputFile() {
|
||||||
|
@ -161,9 +162,9 @@ public class GenAcpiTableTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputFile
|
* setOutputFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputFile"
|
* This function is to set class member "outputFile"
|
||||||
*
|
*
|
||||||
* @param outputFile
|
* @param outputFile
|
||||||
* string of output file name.
|
* string of output file name.
|
||||||
*/
|
*/
|
||||||
|
@ -173,9 +174,9 @@ public class GenAcpiTableTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputDir
|
* getOutputDir
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputDir"
|
* This function is to get class member "outputDir"
|
||||||
*
|
*
|
||||||
* @return outputDir string of output directory.
|
* @return outputDir string of output directory.
|
||||||
*/
|
*/
|
||||||
public String getOutputDir() {
|
public String getOutputDir() {
|
||||||
|
@ -184,9 +185,9 @@ public class GenAcpiTableTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputDir
|
* setOutputDir
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputDir"
|
* This function is to set class member "outputDir"
|
||||||
*
|
*
|
||||||
* @param outputDir
|
* @param outputDir
|
||||||
* string of output directory.
|
* string of output directory.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
GenCapsuleHdrTask class.
|
GenCapsuleHdrTask class.
|
||||||
|
|
||||||
GenCapsuleHdrTask is used to call GenCapsuleHdr.exe to generate capsule.
|
GenCapsuleHdrTask is used to call GenCapsuleHdr.exe to generate capsule.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.taskdefs.Execute;
|
import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
GenCapsuleHdrTask class.
|
GenCapsuleHdrTask class.
|
||||||
|
@ -36,7 +37,7 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
/// tool name
|
/// tool name
|
||||||
///
|
///
|
||||||
private String toolName = "GenCapsuleHdr";
|
private String toolName = "GenCapsuleHdr";
|
||||||
|
|
||||||
///
|
///
|
||||||
/// script file
|
/// script file
|
||||||
///
|
///
|
||||||
|
@ -61,17 +62,17 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
/// Dump flag
|
/// Dump flag
|
||||||
///
|
///
|
||||||
private String dump = "";
|
private String dump = "";
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Split size
|
/// Split size
|
||||||
///
|
///
|
||||||
private String size = "";
|
private String size = "";
|
||||||
|
|
||||||
///
|
///
|
||||||
/// capsule into one image flag
|
/// capsule into one image flag
|
||||||
///
|
///
|
||||||
private String joinFlag = "";
|
private String joinFlag = "";
|
||||||
|
|
||||||
///
|
///
|
||||||
/// capsule file
|
/// capsule file
|
||||||
///
|
///
|
||||||
|
@ -80,10 +81,10 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* execute
|
* execute
|
||||||
*
|
*
|
||||||
* GenCapsuleHdrTask execute function is to assemble tool command line & execute
|
* GenCapsuleHdrTask execute function is to assemble tool command line & execute
|
||||||
* tool command line
|
* tool command line
|
||||||
*
|
*
|
||||||
* @throws BuidException
|
* @throws BuidException
|
||||||
*/
|
*/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
|
@ -160,9 +161,9 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getInputFile
|
* getInputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "scriptFile".
|
* This function is to get class member "scriptFile".
|
||||||
*
|
*
|
||||||
* @return string of input file name.
|
* @return string of input file name.
|
||||||
*/
|
*/
|
||||||
public String getScriptFile() {
|
public String getScriptFile() {
|
||||||
|
@ -171,9 +172,9 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setComponentType
|
* setComponentType
|
||||||
*
|
*
|
||||||
* This function is to set class member "inputFile".
|
* This function is to set class member "inputFile".
|
||||||
*
|
*
|
||||||
* @param inputFile
|
* @param inputFile
|
||||||
* string of input file name.
|
* string of input file name.
|
||||||
*/
|
*/
|
||||||
|
@ -183,9 +184,9 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputFile
|
* getOutputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputFile"
|
* This function is to get class member "outputFile"
|
||||||
*
|
*
|
||||||
* @return outputFile string of output file name.
|
* @return outputFile string of output file name.
|
||||||
*/
|
*/
|
||||||
public String getOutputFile() {
|
public String getOutputFile() {
|
||||||
|
@ -194,9 +195,9 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputFile
|
* setOutputFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputFile"
|
* This function is to set class member "outputFile"
|
||||||
*
|
*
|
||||||
* @param outputFile
|
* @param outputFile
|
||||||
* string of output file name.
|
* string of output file name.
|
||||||
*/
|
*/
|
||||||
|
@ -206,9 +207,9 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputDir
|
* getOutputDir
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputDir"
|
* This function is to get class member "outputDir"
|
||||||
*
|
*
|
||||||
* @return outputDir string of output directory.
|
* @return outputDir string of output directory.
|
||||||
*/
|
*/
|
||||||
public String getOutputDir() {
|
public String getOutputDir() {
|
||||||
|
@ -217,9 +218,9 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputDir
|
* setOutputDir
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputDir"
|
* This function is to set class member "outputDir"
|
||||||
*
|
*
|
||||||
* @param outputDir
|
* @param outputDir
|
||||||
* string of output directory.
|
* string of output directory.
|
||||||
*/
|
*/
|
||||||
|
@ -229,9 +230,9 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getVerbose
|
* getVerbose
|
||||||
*
|
*
|
||||||
* This function is to get class member "verbose"
|
* This function is to get class member "verbose"
|
||||||
*
|
*
|
||||||
* @return verbose the flag of verbose.
|
* @return verbose the flag of verbose.
|
||||||
*/
|
*/
|
||||||
public String getVerbose() {
|
public String getVerbose() {
|
||||||
|
@ -240,9 +241,9 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setVerbose
|
* setVerbose
|
||||||
*
|
*
|
||||||
* This function is to set class member "verbose"
|
* This function is to set class member "verbose"
|
||||||
*
|
*
|
||||||
* @param verbose
|
* @param verbose
|
||||||
* True or False.
|
* True or False.
|
||||||
*/
|
*/
|
||||||
|
@ -254,9 +255,9 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getDump
|
* getDump
|
||||||
*
|
*
|
||||||
* This function is to get class member "dump"
|
* This function is to get class member "dump"
|
||||||
*
|
*
|
||||||
* @return verbose the flag of dump.
|
* @return verbose the flag of dump.
|
||||||
*/
|
*/
|
||||||
public String getDump() {
|
public String getDump() {
|
||||||
|
@ -265,9 +266,9 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setDump
|
* setDump
|
||||||
*
|
*
|
||||||
* This function is to set class member "dump".
|
* This function is to set class member "dump".
|
||||||
*
|
*
|
||||||
* @param dump
|
* @param dump
|
||||||
* True or False.
|
* True or False.
|
||||||
*/
|
*/
|
||||||
|
@ -279,9 +280,9 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getSize
|
* getSize
|
||||||
*
|
*
|
||||||
* This function is to set class member "size".
|
* This function is to set class member "size".
|
||||||
*
|
*
|
||||||
* @return size string of size value
|
* @return size string of size value
|
||||||
*/
|
*/
|
||||||
public String getSize() {
|
public String getSize() {
|
||||||
|
@ -290,9 +291,9 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setSize
|
* setSize
|
||||||
*
|
*
|
||||||
* This function is to set class member "size".
|
* This function is to set class member "size".
|
||||||
*
|
*
|
||||||
* @param size string of size value.
|
* @param size string of size value.
|
||||||
*/
|
*/
|
||||||
public void setSize(String size) {
|
public void setSize(String size) {
|
||||||
|
@ -301,9 +302,9 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getCapsuleFile
|
* getCapsuleFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "capsuleFile"
|
* This function is to get class member "capsuleFile"
|
||||||
*
|
*
|
||||||
* @return capsuleFile capsule file name
|
* @return capsuleFile capsule file name
|
||||||
*/
|
*/
|
||||||
public String getCapsuleFile() {
|
public String getCapsuleFile() {
|
||||||
|
@ -312,9 +313,9 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setCapsuleFile
|
* setCapsuleFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "capsuleFile"
|
* This function is to set class member "capsuleFile"
|
||||||
*
|
*
|
||||||
* @param capsuleFile capsule file name
|
* @param capsuleFile capsule file name
|
||||||
*/
|
*/
|
||||||
public void setCapsuleFile(String capsuleFile) {
|
public void setCapsuleFile(String capsuleFile) {
|
||||||
|
@ -323,10 +324,10 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* isJoinFlag
|
* isJoinFlag
|
||||||
*
|
*
|
||||||
* This function is to get class member "joinFlag"
|
* This function is to get class member "joinFlag"
|
||||||
*
|
*
|
||||||
* @return joinFlag flag of if need to join split capsule images into
|
* @return joinFlag flag of if need to join split capsule images into
|
||||||
* a single image.
|
* a single image.
|
||||||
*/
|
*/
|
||||||
public String getJoinFlag() {
|
public String getJoinFlag() {
|
||||||
|
@ -335,16 +336,16 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setJoinFlag
|
* setJoinFlag
|
||||||
*
|
*
|
||||||
* This function is to set class member "joinFlag"
|
* This function is to set class member "joinFlag"
|
||||||
*
|
*
|
||||||
* @param joinFlag flag of if need to join split capsule images into
|
* @param joinFlag flag of if need to join split capsule images into
|
||||||
* a single image.
|
* a single image.
|
||||||
*/
|
*/
|
||||||
public void setJoinFlag(boolean joinFlag) {
|
public void setJoinFlag(boolean joinFlag) {
|
||||||
if (joinFlag){
|
if (joinFlag){
|
||||||
this.joinFlag = "-j ";
|
this.joinFlag = "-j ";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
GenTeImageTask class.
|
GenTeImageTask class.
|
||||||
|
|
||||||
GenTeImageTask is used to call GenTEImage.exe to generate TE image .
|
GenTeImageTask is used to call GenTEImage.exe to generate TE image .
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -24,11 +24,12 @@ import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.taskdefs.Execute;
|
import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GenTeImageTask class.
|
* GenTeImageTask class.
|
||||||
*
|
*
|
||||||
* GenTeImageTask is used to call GenAcpiTable.exe to generate ACPI Table image .
|
* GenTeImageTask is used to call GenAcpiTable.exe to generate ACPI Table image .
|
||||||
*/
|
*/
|
||||||
public class GenTeImageTask extends Task implements EfiDefine {
|
public class GenTeImageTask extends Task implements EfiDefine {
|
||||||
|
@ -63,15 +64,15 @@ public class GenTeImageTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* assemble tool command line & execute tool command line
|
* assemble tool command line & execute tool command line
|
||||||
*
|
*
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* execute
|
* execute
|
||||||
*
|
*
|
||||||
* GenTeImgaeTask execute function is to assemble tool command line & execute
|
* GenTeImgaeTask execute function is to assemble tool command line & execute
|
||||||
* tool command line
|
* tool command line
|
||||||
*
|
*
|
||||||
* @throws BuidException
|
* @throws BuidException
|
||||||
*/
|
*/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
|
@ -149,9 +150,9 @@ public class GenTeImageTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getInputFile
|
* getInputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "inputFile".
|
* This function is to get class member "inputFile".
|
||||||
*
|
*
|
||||||
* @return string of input file name.
|
* @return string of input file name.
|
||||||
*/
|
*/
|
||||||
public String getInputFile() {
|
public String getInputFile() {
|
||||||
|
@ -160,9 +161,9 @@ public class GenTeImageTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setComponentType
|
* setComponentType
|
||||||
*
|
*
|
||||||
* This function is to set class member "inputFile".
|
* This function is to set class member "inputFile".
|
||||||
*
|
*
|
||||||
* @param inputFile
|
* @param inputFile
|
||||||
* string of input file name.
|
* string of input file name.
|
||||||
*/
|
*/
|
||||||
|
@ -172,9 +173,9 @@ public class GenTeImageTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputFile
|
* getOutputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputFile"
|
* This function is to get class member "outputFile"
|
||||||
*
|
*
|
||||||
* @return outputFile string of output file name.
|
* @return outputFile string of output file name.
|
||||||
*/
|
*/
|
||||||
public String getOutputFile() {
|
public String getOutputFile() {
|
||||||
|
@ -183,9 +184,9 @@ public class GenTeImageTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputFile
|
* setOutputFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputFile"
|
* This function is to set class member "outputFile"
|
||||||
*
|
*
|
||||||
* @param outputFile
|
* @param outputFile
|
||||||
* string of output file name.
|
* string of output file name.
|
||||||
*/
|
*/
|
||||||
|
@ -195,9 +196,9 @@ public class GenTeImageTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputDir
|
* getOutputDir
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputDir"
|
* This function is to get class member "outputDir"
|
||||||
*
|
*
|
||||||
* @return outputDir string of output directory.
|
* @return outputDir string of output directory.
|
||||||
*/
|
*/
|
||||||
public String getOutputDir() {
|
public String getOutputDir() {
|
||||||
|
@ -206,9 +207,9 @@ public class GenTeImageTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputDir
|
* setOutputDir
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputDir"
|
* This function is to set class member "outputDir"
|
||||||
*
|
*
|
||||||
* @param outputDir
|
* @param outputDir
|
||||||
* string of output directory.
|
* string of output directory.
|
||||||
*/
|
*/
|
||||||
|
@ -218,9 +219,9 @@ public class GenTeImageTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getVerbose
|
* getVerbose
|
||||||
*
|
*
|
||||||
* This function is to get class member "verbose"
|
* This function is to get class member "verbose"
|
||||||
*
|
*
|
||||||
* @return verbose the flag of verbose.
|
* @return verbose the flag of verbose.
|
||||||
*/
|
*/
|
||||||
public String getVerbose() {
|
public String getVerbose() {
|
||||||
|
@ -229,9 +230,9 @@ public class GenTeImageTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setVerbose
|
* setVerbose
|
||||||
*
|
*
|
||||||
* This function is to set class member "verbose"
|
* This function is to set class member "verbose"
|
||||||
*
|
*
|
||||||
* @param verbose
|
* @param verbose
|
||||||
* True or False.
|
* True or False.
|
||||||
*/
|
*/
|
||||||
|
@ -243,9 +244,9 @@ public class GenTeImageTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getDump
|
* getDump
|
||||||
*
|
*
|
||||||
* This function is to get class member "dump"
|
* This function is to get class member "dump"
|
||||||
*
|
*
|
||||||
* @return verbose the flag of dump.
|
* @return verbose the flag of dump.
|
||||||
*/
|
*/
|
||||||
public String getDump() {
|
public String getDump() {
|
||||||
|
@ -254,9 +255,9 @@ public class GenTeImageTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setDump
|
* setDump
|
||||||
*
|
*
|
||||||
* This function is to set class member "dump"
|
* This function is to set class member "dump"
|
||||||
*
|
*
|
||||||
* @param dump
|
* @param dump
|
||||||
* True or False.
|
* True or False.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -35,7 +35,8 @@ import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
import org.apache.tools.ant.types.Path;
|
import org.apache.tools.ant.types.Path;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Class MakeDeps is used to wrap MakeDeps.exe as an ANT task.
|
Class MakeDeps is used to wrap MakeDeps.exe as an ANT task.
|
||||||
|
@ -112,7 +113,7 @@ public class MakeDeps extends Task {
|
||||||
|
|
||||||
///
|
///
|
||||||
/// if there's no source files, we can do nothing about dependency
|
/// if there's no source files, we can do nothing about dependency
|
||||||
///
|
///
|
||||||
if (inputFileList.size() == 0) {
|
if (inputFileList.size() == 0) {
|
||||||
throw new BuildException("No source files specified to scan");
|
throw new BuildException("No source files specified to scan");
|
||||||
}
|
}
|
||||||
|
@ -375,7 +376,7 @@ public class MakeDeps extends Task {
|
||||||
|
|
||||||
///
|
///
|
||||||
/// compose the final file content
|
/// compose the final file content
|
||||||
///
|
///
|
||||||
StringBuffer cleanedLines = new StringBuffer(40960);
|
StringBuffer cleanedLines = new StringBuffer(40960);
|
||||||
Iterator<String> it = lineSet.iterator();
|
Iterator<String> it = lineSet.iterator();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
ModifyInfTask class.
|
ModifyInfTask class.
|
||||||
|
|
||||||
ModifyInfTask is used to call Modify.exe to generate inf file.
|
ModifyInfTask is used to call Modify.exe to generate inf file.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.taskdefs.Execute;
|
import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
ModifyInfTask class.
|
ModifyInfTask class.
|
||||||
|
@ -36,7 +37,7 @@ public class ModifyInfTask extends Task implements EfiDefine {
|
||||||
/// tool name
|
/// tool name
|
||||||
///
|
///
|
||||||
private String toolName = "ModifyInf";
|
private String toolName = "ModifyInf";
|
||||||
|
|
||||||
///
|
///
|
||||||
/// input FV inf file
|
/// input FV inf file
|
||||||
///
|
///
|
||||||
|
@ -54,15 +55,15 @@ public class ModifyInfTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Output dir
|
/// Output dir
|
||||||
///
|
///
|
||||||
private String outputDir = "";
|
private String outputDir = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* execute
|
* execute
|
||||||
*
|
*
|
||||||
* ModifyInfTask execute function is to assemble tool command line & execute
|
* ModifyInfTask execute function is to assemble tool command line & execute
|
||||||
* tool command line
|
* tool command line
|
||||||
*
|
*
|
||||||
* @throws BuidException
|
* @throws BuidException
|
||||||
*/
|
*/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
|
@ -91,12 +92,12 @@ public class ModifyInfTask extends Task implements EfiDefine {
|
||||||
File file = new File(outputFVInfFileName);
|
File file = new File(outputFVInfFileName);
|
||||||
if (!file.isAbsolute() && (!this.outputDir.equalsIgnoreCase(""))) {
|
if (!file.isAbsolute() && (!this.outputDir.equalsIgnoreCase(""))) {
|
||||||
argument = this.inputFVInfFileName +
|
argument = this.inputFVInfFileName +
|
||||||
this.outputDir +
|
this.outputDir +
|
||||||
File.separatorChar +
|
File.separatorChar +
|
||||||
this.outputFVInfFileName +
|
this.outputFVInfFileName +
|
||||||
this.patternStr;
|
this.patternStr;
|
||||||
} else {
|
} else {
|
||||||
argument = this.inputFVInfFileName +
|
argument = this.inputFVInfFileName +
|
||||||
this.outputFVInfFileName +
|
this.outputFVInfFileName +
|
||||||
this.patternStr;
|
this.patternStr;
|
||||||
}
|
}
|
||||||
|
@ -142,9 +143,9 @@ public class ModifyInfTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getinputFVInfFileName
|
* getinputFVInfFileName
|
||||||
*
|
*
|
||||||
* This function is to get class member "inputFVInfFileName".
|
* This function is to get class member "inputFVInfFileName".
|
||||||
*
|
*
|
||||||
* @return string of input inf file name.
|
* @return string of input inf file name.
|
||||||
*/
|
*/
|
||||||
public String getinputFVInfFileName() {
|
public String getinputFVInfFileName() {
|
||||||
|
@ -153,9 +154,9 @@ public class ModifyInfTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setinputFVInfFileName
|
* setinputFVInfFileName
|
||||||
*
|
*
|
||||||
* This function is to set class member "inputFVInfFileName".
|
* This function is to set class member "inputFVInfFileName".
|
||||||
*
|
*
|
||||||
* @param inputFile
|
* @param inputFile
|
||||||
* string of input inf file name.
|
* string of input inf file name.
|
||||||
*/
|
*/
|
||||||
|
@ -165,9 +166,9 @@ public class ModifyInfTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getoutputFVInfFileName
|
* getoutputFVInfFileName
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputFVInfFileName"
|
* This function is to get class member "outputFVInfFileName"
|
||||||
*
|
*
|
||||||
* @return outputFVInfFileName string of output inf file name.
|
* @return outputFVInfFileName string of output inf file name.
|
||||||
*/
|
*/
|
||||||
public String getoutputFVInfFileName() {
|
public String getoutputFVInfFileName() {
|
||||||
|
@ -176,9 +177,9 @@ public class ModifyInfTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setoutputFVInfFileName
|
* setoutputFVInfFileName
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputFVInfFileName"
|
* This function is to set class member "outputFVInfFileName"
|
||||||
*
|
*
|
||||||
* @param outputFVInfFileName
|
* @param outputFVInfFileName
|
||||||
* string of output inf file name.
|
* string of output inf file name.
|
||||||
*/
|
*/
|
||||||
|
@ -188,9 +189,9 @@ public class ModifyInfTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getpatternStr
|
* getpatternStr
|
||||||
*
|
*
|
||||||
* This function is to get class member "patternStr"
|
* This function is to get class member "patternStr"
|
||||||
*
|
*
|
||||||
* @return patternStr string of pattern.
|
* @return patternStr string of pattern.
|
||||||
*/
|
*/
|
||||||
public String getpatternStr() {
|
public String getpatternStr() {
|
||||||
|
@ -199,9 +200,9 @@ public class ModifyInfTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setpatternStr
|
* setpatternStr
|
||||||
*
|
*
|
||||||
* This function is to set class member "patternStr"
|
* This function is to set class member "patternStr"
|
||||||
*
|
*
|
||||||
* @param patternStr
|
* @param patternStr
|
||||||
* string of patternStr.
|
* string of patternStr.
|
||||||
*/
|
*/
|
||||||
|
@ -211,9 +212,9 @@ public class ModifyInfTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getoutputDir
|
* getoutputDir
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputDir"
|
* This function is to get class member "outputDir"
|
||||||
*
|
*
|
||||||
* @return outputDir string of output directory.
|
* @return outputDir string of output directory.
|
||||||
*/
|
*/
|
||||||
public String getoutputDir() {
|
public String getoutputDir() {
|
||||||
|
@ -222,9 +223,9 @@ public class ModifyInfTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setoutputDir
|
* setoutputDir
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputDir"
|
* This function is to set class member "outputDir"
|
||||||
*
|
*
|
||||||
* @param patternStr
|
* @param patternStr
|
||||||
* string of output directory.
|
* string of output directory.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
PeiReBaseTask class.
|
PeiReBaseTask class.
|
||||||
|
|
||||||
PeiReBaseTask is used to call PeiReBase.exe to rebase efi fv file.
|
PeiReBaseTask is used to call PeiReBase.exe to rebase efi fv file.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.taskdefs.Execute;
|
import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
PeiReBaseTask class.
|
PeiReBaseTask class.
|
||||||
|
@ -50,23 +51,23 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
||||||
// / Output directory, this variable is added by jave wrap
|
// / Output directory, this variable is added by jave wrap
|
||||||
// /
|
// /
|
||||||
private String outputDir = "";
|
private String outputDir = "";
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Base address
|
/// Base address
|
||||||
///
|
///
|
||||||
private String baseAddr = "";
|
private String baseAddr = "";
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Architecture
|
/// Architecture
|
||||||
///
|
///
|
||||||
private String arch = "";
|
private String arch = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* execute
|
* execute
|
||||||
*
|
*
|
||||||
* PeiReBaseTask execute function is to assemble tool command line & execute
|
* PeiReBaseTask execute function is to assemble tool command line & execute
|
||||||
* tool command line
|
* tool command line
|
||||||
*
|
*
|
||||||
* @throws BuidException
|
* @throws BuidException
|
||||||
*/
|
*/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
|
@ -78,7 +79,7 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
||||||
FrameworkLogger logger = new FrameworkLogger(project, toolName.toLowerCase());
|
FrameworkLogger logger = new FrameworkLogger(project, toolName.toLowerCase());
|
||||||
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
|
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
|
||||||
EdkLog.setLogger(logger);
|
EdkLog.setLogger(logger);
|
||||||
|
|
||||||
//
|
//
|
||||||
// absolute path of efi tools
|
// absolute path of efi tools
|
||||||
//
|
//
|
||||||
|
@ -97,7 +98,7 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
||||||
if (path != null) {
|
if (path != null) {
|
||||||
command = path + File.separatorChar + command;
|
command = path + File.separatorChar + command;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// argument of tools
|
// argument of tools
|
||||||
//
|
//
|
||||||
|
@ -109,7 +110,7 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
||||||
} else {
|
} else {
|
||||||
argument = inputFile + " " + "-O " + outputFile + " " + this.baseAddr+ " " + "-M " + outputFile + ".map";
|
argument = inputFile + " " + "-O " + outputFile + " " + this.baseAddr+ " " + "-M " + outputFile + ".map";
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// return value of fwimage execution
|
// return value of fwimage execution
|
||||||
//
|
//
|
||||||
|
@ -131,9 +132,9 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
EdkLog.log(EdkLog.EDK_INFO, this.inputFileName);
|
EdkLog.log(EdkLog.EDK_INFO, this.inputFileName);
|
||||||
|
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
if (EFI_SUCCESS == revl) {
|
if (EFI_SUCCESS == revl) {
|
||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
|
@ -153,9 +154,9 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getInputFile
|
* getInputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "inputFile".
|
* This function is to get class member "inputFile".
|
||||||
*
|
*
|
||||||
* @return string of input file name.
|
* @return string of input file name.
|
||||||
*/
|
*/
|
||||||
public String getInputFile() {
|
public String getInputFile() {
|
||||||
|
@ -164,9 +165,9 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setComponentType
|
* setComponentType
|
||||||
*
|
*
|
||||||
* This function is to set class member "inputFile".
|
* This function is to set class member "inputFile".
|
||||||
*
|
*
|
||||||
* @param inputFile
|
* @param inputFile
|
||||||
* string of input file name.
|
* string of input file name.
|
||||||
*/
|
*/
|
||||||
|
@ -177,9 +178,9 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputFile
|
* getOutputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputFile"
|
* This function is to get class member "outputFile"
|
||||||
*
|
*
|
||||||
* @return outputFile string of output file name.
|
* @return outputFile string of output file name.
|
||||||
*/
|
*/
|
||||||
public String getOutputFile() {
|
public String getOutputFile() {
|
||||||
|
@ -188,9 +189,9 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputFile
|
* setOutputFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputFile"
|
* This function is to set class member "outputFile"
|
||||||
*
|
*
|
||||||
* @param outputFile
|
* @param outputFile
|
||||||
* string of output file name.
|
* string of output file name.
|
||||||
*/
|
*/
|
||||||
|
@ -200,9 +201,9 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputDir
|
* getOutputDir
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputDir"
|
* This function is to get class member "outputDir"
|
||||||
*
|
*
|
||||||
* @return outputDir string of output directory.
|
* @return outputDir string of output directory.
|
||||||
*/
|
*/
|
||||||
public String getOutputDir() {
|
public String getOutputDir() {
|
||||||
|
@ -211,9 +212,9 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputDir
|
* setOutputDir
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputDir"
|
* This function is to set class member "outputDir"
|
||||||
*
|
*
|
||||||
* @param outputDir
|
* @param outputDir
|
||||||
* string of output directory.
|
* string of output directory.
|
||||||
*/
|
*/
|
||||||
|
@ -223,9 +224,9 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getBaseAddr
|
* getBaseAddr
|
||||||
*
|
*
|
||||||
* This function is to get class member "baseAddr"
|
* This function is to get class member "baseAddr"
|
||||||
*
|
*
|
||||||
* @return baseAddr string of base address.
|
* @return baseAddr string of base address.
|
||||||
*/
|
*/
|
||||||
public String getBaseAddr() {
|
public String getBaseAddr() {
|
||||||
|
@ -234,9 +235,9 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setBaseAddr
|
* setBaseAddr
|
||||||
*
|
*
|
||||||
* This function is to set class member "baseAddr"
|
* This function is to set class member "baseAddr"
|
||||||
*
|
*
|
||||||
* @param baseAddr string of base address
|
* @param baseAddr string of base address
|
||||||
*/
|
*/
|
||||||
public void setBaseAddr(String baseAddr) {
|
public void setBaseAddr(String baseAddr) {
|
||||||
|
@ -245,9 +246,9 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getArch
|
* getArch
|
||||||
*
|
*
|
||||||
* This function is to get class member "arch".
|
* This function is to get class member "arch".
|
||||||
*
|
*
|
||||||
* @return arch Architecture
|
* @return arch Architecture
|
||||||
*/
|
*/
|
||||||
public String getArch() {
|
public String getArch() {
|
||||||
|
@ -256,9 +257,9 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setArch
|
* setArch
|
||||||
*
|
*
|
||||||
* This function is to set class member "arch"
|
* This function is to set class member "arch"
|
||||||
*
|
*
|
||||||
* @param arch Architecture
|
* @param arch Architecture
|
||||||
*/
|
*/
|
||||||
public void setArch(String arch) {
|
public void setArch(String arch) {
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
|
|
||||||
SecApResetVectorFixupTask is used to call SecApResetVectorFixup.exe to place
|
SecApResetVectorFixupTask is used to call SecApResetVectorFixup.exe to place
|
||||||
Ap reset vector.
|
Ap reset vector.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -25,7 +25,8 @@ import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.taskdefs.Execute;
|
import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
SecApResetVectorFixupTask class.
|
SecApResetVectorFixupTask class.
|
||||||
|
@ -56,10 +57,10 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* execute
|
* execute
|
||||||
*
|
*
|
||||||
* SecApResetVectorFixupTask execute function is to assemble tool command line & execute
|
* SecApResetVectorFixupTask execute function is to assemble tool command line & execute
|
||||||
* tool command line
|
* tool command line
|
||||||
*
|
*
|
||||||
* @throws BuidException
|
* @throws BuidException
|
||||||
*/
|
*/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
|
@ -113,9 +114,9 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.fvInputFile)).getName());
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.fvInputFile)).getName());
|
||||||
|
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
if (EFI_SUCCESS == revl) {
|
if (EFI_SUCCESS == revl) {
|
||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
|
@ -135,9 +136,9 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getInputFile
|
* getInputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "fvInputFile".
|
* This function is to get class member "fvInputFile".
|
||||||
*
|
*
|
||||||
* @return string of input file name.
|
* @return string of input file name.
|
||||||
*/
|
*/
|
||||||
public String getfvInputFile() {
|
public String getfvInputFile() {
|
||||||
|
@ -146,9 +147,9 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setComponentType
|
* setComponentType
|
||||||
*
|
*
|
||||||
* This function is to set class member "fvInputFile".
|
* This function is to set class member "fvInputFile".
|
||||||
*
|
*
|
||||||
* @param inputFile
|
* @param inputFile
|
||||||
* string of input file name.
|
* string of input file name.
|
||||||
*/
|
*/
|
||||||
|
@ -158,9 +159,9 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputFile
|
* getOutputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "fvOutputFile"
|
* This function is to get class member "fvOutputFile"
|
||||||
*
|
*
|
||||||
* @return outputFile string of output file name.
|
* @return outputFile string of output file name.
|
||||||
*/
|
*/
|
||||||
public String getOutputFile() {
|
public String getOutputFile() {
|
||||||
|
@ -169,9 +170,9 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputFile
|
* setOutputFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "fvOutputFile"
|
* This function is to set class member "fvOutputFile"
|
||||||
*
|
*
|
||||||
* @param outputFile
|
* @param outputFile
|
||||||
* string of output file name.
|
* string of output file name.
|
||||||
*/
|
*/
|
||||||
|
@ -181,9 +182,9 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputDir
|
* getOutputDir
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputDir"
|
* This function is to get class member "outputDir"
|
||||||
*
|
*
|
||||||
* @return outputDir string of output directory.
|
* @return outputDir string of output directory.
|
||||||
*/
|
*/
|
||||||
public String getOutputDir() {
|
public String getOutputDir() {
|
||||||
|
@ -192,9 +193,9 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputDir
|
* setOutputDir
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputDir"
|
* This function is to set class member "outputDir"
|
||||||
*
|
*
|
||||||
* @param outputDir
|
* @param outputDir
|
||||||
* string of output directory.
|
* string of output directory.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
SecFixupTask class.
|
SecFixupTask class.
|
||||||
|
|
||||||
SecFixupTask is used to call SecFixup.exe to fix up sec image.
|
SecFixupTask is used to call SecFixup.exe to fix up sec image.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -24,11 +24,12 @@ import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.taskdefs.Execute;
|
import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SecFixupTask class.
|
* SecFixupTask class.
|
||||||
*
|
*
|
||||||
* SecFixupTask is used to call SecFixup.exe to fix up sec image.
|
* SecFixupTask is used to call SecFixup.exe to fix up sec image.
|
||||||
*/
|
*/
|
||||||
public class SecFixupTask extends Task implements EfiDefine {
|
public class SecFixupTask extends Task implements EfiDefine {
|
||||||
|
@ -59,10 +60,10 @@ public class SecFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* execute
|
* execute
|
||||||
*
|
*
|
||||||
* SecFixupTask execute function is to assemble tool command line & execute
|
* SecFixupTask execute function is to assemble tool command line & execute
|
||||||
* tool command line
|
* tool command line
|
||||||
*
|
*
|
||||||
* @throws BuidException
|
* @throws BuidException
|
||||||
*/
|
*/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
|
@ -139,9 +140,9 @@ public class SecFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getSecExeFile
|
* getSecExeFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "secExeFile".
|
* This function is to get class member "secExeFile".
|
||||||
*
|
*
|
||||||
* @return string of sectExe file name.
|
* @return string of sectExe file name.
|
||||||
*/
|
*/
|
||||||
public String getSecExeFile() {
|
public String getSecExeFile() {
|
||||||
|
@ -150,9 +151,9 @@ public class SecFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setSecExeFile
|
* setSecExeFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "secExeFile".
|
* This function is to set class member "secExeFile".
|
||||||
*
|
*
|
||||||
* @param secExeFile
|
* @param secExeFile
|
||||||
* string of secExe file name.
|
* string of secExe file name.
|
||||||
*/
|
*/
|
||||||
|
@ -162,9 +163,9 @@ public class SecFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getResetVectorDataFile
|
* getResetVectorDataFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "resetVectorDataFile"
|
* This function is to get class member "resetVectorDataFile"
|
||||||
*
|
*
|
||||||
* @return resetVectorDataFile string of resetVectorData file name.
|
* @return resetVectorDataFile string of resetVectorData file name.
|
||||||
*/
|
*/
|
||||||
public String getResetVectorDataFile() {
|
public String getResetVectorDataFile() {
|
||||||
|
@ -173,9 +174,9 @@ public class SecFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setResetVectorDataFile
|
* setResetVectorDataFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "resetVectorDataFile"
|
* This function is to set class member "resetVectorDataFile"
|
||||||
*
|
*
|
||||||
* @param resetVectorDataFile
|
* @param resetVectorDataFile
|
||||||
* string of resetVectorData file name.
|
* string of resetVectorData file name.
|
||||||
*/
|
*/
|
||||||
|
@ -185,9 +186,9 @@ public class SecFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputFile
|
* getOutputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputFile"
|
* This function is to get class member "outputFile"
|
||||||
*
|
*
|
||||||
* @return outputFile string of output file name.
|
* @return outputFile string of output file name.
|
||||||
*/
|
*/
|
||||||
public String getOutputFile() {
|
public String getOutputFile() {
|
||||||
|
@ -196,9 +197,9 @@ public class SecFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputFile
|
* setOutputFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputFile"
|
* This function is to set class member "outputFile"
|
||||||
*
|
*
|
||||||
* @param outputFile
|
* @param outputFile
|
||||||
* string of output file name.
|
* string of output file name.
|
||||||
*/
|
*/
|
||||||
|
@ -208,9 +209,9 @@ public class SecFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputDir
|
* getOutputDir
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputDir"
|
* This function is to get class member "outputDir"
|
||||||
*
|
*
|
||||||
* @return outputDir name of output directory
|
* @return outputDir name of output directory
|
||||||
*/
|
*/
|
||||||
public String getOutputDir() {
|
public String getOutputDir() {
|
||||||
|
@ -219,9 +220,9 @@ public class SecFixupTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputDir
|
* setOutputDir
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputDir"
|
* This function is to set class member "outputDir"
|
||||||
*
|
*
|
||||||
* @param outputDir
|
* @param outputDir
|
||||||
* name of output directory
|
* name of output directory
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
/** @file
|
/** @file
|
||||||
SplitfileTask class.
|
SplitfileTask class.
|
||||||
|
|
||||||
SplitfileTask is used to call splitfile.exe to split input file to 2 output
|
SplitfileTask is used to call splitfile.exe to split input file to 2 output
|
||||||
file.
|
file.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -25,12 +25,13 @@ import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.taskdefs.Execute;
|
import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
SplitfileTask class.
|
SplitfileTask class.
|
||||||
|
|
||||||
SplitfileTask is used to call splitfile.exe to split input file to 2 output
|
SplitfileTask is used to call splitfile.exe to split input file to 2 output
|
||||||
file.
|
file.
|
||||||
**/
|
**/
|
||||||
public class SplitfileTask extends Task implements EfiDefine {
|
public class SplitfileTask extends Task implements EfiDefine {
|
||||||
|
@ -44,26 +45,26 @@ public class SplitfileTask extends Task implements EfiDefine {
|
||||||
///
|
///
|
||||||
private String offset = "";
|
private String offset = "";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* execute
|
* execute
|
||||||
*
|
*
|
||||||
* SplitfleTask execute function is to assemble tool command line & execute
|
* SplitfleTask execute function is to assemble tool command line & execute
|
||||||
* tool command line
|
* tool command line
|
||||||
*
|
*
|
||||||
* @throws BuidException
|
* @throws BuidException
|
||||||
*/
|
*/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
|
|
||||||
Project project = this.getOwningTarget().getProject();
|
Project project = this.getOwningTarget().getProject();
|
||||||
|
|
||||||
//
|
//
|
||||||
// set Logger
|
// set Logger
|
||||||
//
|
//
|
||||||
FrameworkLogger logger = new FrameworkLogger(project, "splitfile");
|
FrameworkLogger logger = new FrameworkLogger(project, "splitfile");
|
||||||
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
|
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
|
||||||
EdkLog.setLogger(logger);
|
EdkLog.setLogger(logger);
|
||||||
|
|
||||||
//
|
//
|
||||||
// absolute path of efi tools
|
// absolute path of efi tools
|
||||||
//
|
//
|
||||||
|
@ -75,12 +76,12 @@ public class SplitfileTask extends Task implements EfiDefine {
|
||||||
} else {
|
} else {
|
||||||
command = path + File.separatorChar + "SplitFile";
|
command = path + File.separatorChar + "SplitFile";
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// argument of tools
|
// argument of tools
|
||||||
//
|
//
|
||||||
argument = inputFile + " " + offset;
|
argument = inputFile + " " + offset;
|
||||||
|
|
||||||
//
|
//
|
||||||
// return value of fwimage execution
|
// return value of fwimage execution
|
||||||
//
|
//
|
||||||
|
@ -97,7 +98,7 @@ public class SplitfileTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
runner.setAntRun(project);
|
runner.setAntRun(project);
|
||||||
runner.setCommandline(cmdline.getCommandline());
|
runner.setCommandline(cmdline.getCommandline());
|
||||||
|
|
||||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
@ -120,9 +121,9 @@ public class SplitfileTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getInputFile
|
* getInputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "inputFile".
|
* This function is to get class member "inputFile".
|
||||||
*
|
*
|
||||||
* @return string of input file name.
|
* @return string of input file name.
|
||||||
*/
|
*/
|
||||||
public String getInputFile() {
|
public String getInputFile() {
|
||||||
|
@ -131,9 +132,9 @@ public class SplitfileTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setComponentType
|
* setComponentType
|
||||||
*
|
*
|
||||||
* This function is to set class member "inputFile".
|
* This function is to set class member "inputFile".
|
||||||
*
|
*
|
||||||
* @param inputFile
|
* @param inputFile
|
||||||
* string of input file name.
|
* string of input file name.
|
||||||
*/
|
*/
|
||||||
|
@ -143,9 +144,9 @@ public class SplitfileTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
getOffset
|
getOffset
|
||||||
|
|
||||||
This function is to get class member "offset"
|
This function is to get class member "offset"
|
||||||
|
|
||||||
@return offset value of string.
|
@return offset value of string.
|
||||||
**/
|
**/
|
||||||
public String getOffset() {
|
public String getOffset() {
|
||||||
|
@ -154,14 +155,14 @@ public class SplitfileTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
setOffset
|
setOffset
|
||||||
|
|
||||||
This function is to set class member "offset"
|
This function is to set class member "offset"
|
||||||
|
|
||||||
@param offset
|
@param offset
|
||||||
string of offset value.
|
string of offset value.
|
||||||
**/
|
**/
|
||||||
public void setOffset(String offset) {
|
public void setOffset(String offset) {
|
||||||
this.offset = offset;
|
this.offset = offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
StripTask class.
|
StripTask class.
|
||||||
|
|
||||||
StripTask is used to call Strip.exe to strip input file.
|
StripTask is used to call Strip.exe to strip input file.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.taskdefs.Execute;
|
import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
StripTask class.
|
StripTask class.
|
||||||
|
@ -47,13 +48,13 @@ public class StripTask extends Task implements EfiDefine {
|
||||||
// /
|
// /
|
||||||
private String outputDir = "";
|
private String outputDir = "";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* execute
|
* execute
|
||||||
*
|
*
|
||||||
* StripTask execute function is to assemble tool command line & execute
|
* StripTask execute function is to assemble tool command line & execute
|
||||||
* tool command line
|
* tool command line
|
||||||
*
|
*
|
||||||
* @throws BuidException
|
* @throws BuidException
|
||||||
*/
|
*/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
|
@ -107,9 +108,9 @@ public class StripTask extends Task implements EfiDefine {
|
||||||
//
|
//
|
||||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
||||||
|
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
if (EFI_SUCCESS == revl) {
|
if (EFI_SUCCESS == revl) {
|
||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
|
@ -129,9 +130,9 @@ public class StripTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getInputFile
|
* getInputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "inputFile".
|
* This function is to get class member "inputFile".
|
||||||
*
|
*
|
||||||
* @return string of input file name.
|
* @return string of input file name.
|
||||||
*/
|
*/
|
||||||
public String getInputFile() {
|
public String getInputFile() {
|
||||||
|
@ -140,9 +141,9 @@ public class StripTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setComponentType
|
* setComponentType
|
||||||
*
|
*
|
||||||
* This function is to set class member "inputFile".
|
* This function is to set class member "inputFile".
|
||||||
*
|
*
|
||||||
* @param inputFile
|
* @param inputFile
|
||||||
* string of input file name.
|
* string of input file name.
|
||||||
*/
|
*/
|
||||||
|
@ -152,9 +153,9 @@ public class StripTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputFile
|
* getOutputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputFile"
|
* This function is to get class member "outputFile"
|
||||||
*
|
*
|
||||||
* @return outputFile string of output file name.
|
* @return outputFile string of output file name.
|
||||||
*/
|
*/
|
||||||
public String getOutputFile() {
|
public String getOutputFile() {
|
||||||
|
@ -163,9 +164,9 @@ public class StripTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputFile
|
* setOutputFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputFile"
|
* This function is to set class member "outputFile"
|
||||||
*
|
*
|
||||||
* @param outputFile
|
* @param outputFile
|
||||||
* string of output file name.
|
* string of output file name.
|
||||||
*/
|
*/
|
||||||
|
@ -175,9 +176,9 @@ public class StripTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputDir
|
* getOutputDir
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputDir"
|
* This function is to get class member "outputDir"
|
||||||
*
|
*
|
||||||
* @return outputDir string of output directory.
|
* @return outputDir string of output directory.
|
||||||
*/
|
*/
|
||||||
public String getOutputDir() {
|
public String getOutputDir() {
|
||||||
|
@ -186,9 +187,9 @@ public class StripTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputDir
|
* setOutputDir
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputDir"
|
* This function is to set class member "outputDir"
|
||||||
*
|
*
|
||||||
* @param outputDir
|
* @param outputDir
|
||||||
* string of output directory.
|
* string of output directory.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
ZeroDebugDataTask class.
|
ZeroDebugDataTask class.
|
||||||
|
|
||||||
ZeroDebugDataTask is used to call ZeroDebugData.exe to remove debug data.
|
ZeroDebugDataTask is used to call ZeroDebugData.exe to remove debug data.
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.tools.ant.taskdefs.Execute;
|
import org.apache.tools.ant.taskdefs.Execute;
|
||||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||||
import org.apache.tools.ant.types.Commandline;
|
import org.apache.tools.ant.types.Commandline;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
ZeroDebugDataTask class.
|
ZeroDebugDataTask class.
|
||||||
|
@ -50,10 +51,10 @@ public class ZeroDebugDataTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* execute
|
* execute
|
||||||
*
|
*
|
||||||
* ZeroDebugDataTask execute function is to assemble tool command line & execute
|
* ZeroDebugDataTask execute function is to assemble tool command line & execute
|
||||||
* tool command line
|
* tool command line
|
||||||
*
|
*
|
||||||
* @throws BuidException
|
* @throws BuidException
|
||||||
*/
|
*/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
|
@ -109,7 +110,7 @@ public class ZeroDebugDataTask extends Task implements EfiDefine {
|
||||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.peFile)).getName());
|
EdkLog.log(EdkLog.EDK_INFO, (new File(this.peFile)).getName());
|
||||||
|
|
||||||
revl = runner.execute();
|
revl = runner.execute();
|
||||||
|
|
||||||
if (EFI_SUCCESS == revl) {
|
if (EFI_SUCCESS == revl) {
|
||||||
//
|
//
|
||||||
// command execution success
|
// command execution success
|
||||||
|
@ -130,9 +131,9 @@ public class ZeroDebugDataTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getPeFile
|
* getPeFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "inputFile".
|
* This function is to get class member "inputFile".
|
||||||
*
|
*
|
||||||
* @return string of input file name.
|
* @return string of input file name.
|
||||||
*/
|
*/
|
||||||
public String getPeFile() {
|
public String getPeFile() {
|
||||||
|
@ -141,9 +142,9 @@ public class ZeroDebugDataTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setPeFile
|
* setPeFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "peFile".
|
* This function is to set class member "peFile".
|
||||||
*
|
*
|
||||||
* @param peFile
|
* @param peFile
|
||||||
* string of input file name.
|
* string of input file name.
|
||||||
*/
|
*/
|
||||||
|
@ -153,9 +154,9 @@ public class ZeroDebugDataTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputFile
|
* getOutputFile
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputFile"
|
* This function is to get class member "outputFile"
|
||||||
*
|
*
|
||||||
* @return outputFile string of output file name.
|
* @return outputFile string of output file name.
|
||||||
*/
|
*/
|
||||||
public String getOutputFile() {
|
public String getOutputFile() {
|
||||||
|
@ -164,9 +165,9 @@ public class ZeroDebugDataTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputFile
|
* setOutputFile
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputFile"
|
* This function is to set class member "outputFile"
|
||||||
*
|
*
|
||||||
* @param outputFile
|
* @param outputFile
|
||||||
* string of output file name.
|
* string of output file name.
|
||||||
*/
|
*/
|
||||||
|
@ -176,9 +177,9 @@ public class ZeroDebugDataTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getOutputDir
|
* getOutputDir
|
||||||
*
|
*
|
||||||
* This function is to get class member "outputDir"
|
* This function is to get class member "outputDir"
|
||||||
*
|
*
|
||||||
* @return outputDir string of output directory.
|
* @return outputDir string of output directory.
|
||||||
*/
|
*/
|
||||||
public String getOutputDir() {
|
public String getOutputDir() {
|
||||||
|
@ -187,9 +188,9 @@ public class ZeroDebugDataTask extends Task implements EfiDefine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setOutputDir
|
* setOutputDir
|
||||||
*
|
*
|
||||||
* This function is to set class member "outputDir"
|
* This function is to set class member "outputDir"
|
||||||
*
|
*
|
||||||
* @param outputDir
|
* @param outputDir
|
||||||
* string of output directory.
|
* string of output directory.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/** @file
|
/** @file
|
||||||
This file is ANT task GenBuild.
|
This file is ANT task GenBuild.
|
||||||
|
|
||||||
The file is used to parse a specified Module, and generate its build time
|
The file is used to parse a specified Module, and generate its build time
|
||||||
ANT script build.xml, then call the the ANT script to build the module.
|
ANT script build.xml, then call the the ANT script to build the module.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
@ -32,6 +32,8 @@ import org.apache.tools.ant.taskdefs.Ant;
|
||||||
import org.apache.tools.ant.taskdefs.Property;
|
import org.apache.tools.ant.taskdefs.Property;
|
||||||
import org.apache.xmlbeans.XmlObject;
|
import org.apache.xmlbeans.XmlObject;
|
||||||
|
|
||||||
|
import org.tianocore.common.exception.EdkException;
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
import org.tianocore.build.autogen.AutoGen;
|
import org.tianocore.build.autogen.AutoGen;
|
||||||
import org.tianocore.build.fpd.FpdParserTask;
|
import org.tianocore.build.fpd.FpdParserTask;
|
||||||
import org.tianocore.build.global.GenBuildLogger;
|
import org.tianocore.build.global.GenBuildLogger;
|
||||||
|
@ -43,8 +45,6 @@ import org.tianocore.build.id.ModuleIdentification;
|
||||||
import org.tianocore.build.id.PackageIdentification;
|
import org.tianocore.build.id.PackageIdentification;
|
||||||
import org.tianocore.build.id.PlatformIdentification;
|
import org.tianocore.build.id.PlatformIdentification;
|
||||||
import org.tianocore.build.tools.ModuleItem;
|
import org.tianocore.build.tools.ModuleItem;
|
||||||
import org.tianocore.exception.EdkException;
|
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
<p>
|
<p>
|
||||||
|
@ -52,48 +52,48 @@ import org.tianocore.logger.EdkLog;
|
||||||
system. The main function of this task is to parse module's surface area,
|
system. The main function of this task is to parse module's surface area,
|
||||||
then generate the corresponding <em>BaseName_build.xml</em> (the real ANT
|
then generate the corresponding <em>BaseName_build.xml</em> (the real ANT
|
||||||
build script) and call this to build the module. The whole process including:
|
build script) and call this to build the module. The whole process including:
|
||||||
1. generate AutoGen.c and AutoGen.h; 2. build all dependent library instances;
|
1. generate AutoGen.c and AutoGen.h; 2. build all dependent library instances;
|
||||||
3. build all source files inlcude AutoGen.c; 4. generate sections;
|
3. build all source files inlcude AutoGen.c; 4. generate sections;
|
||||||
5. generate FFS file if it is driver module while LIB file if it is Library module.
|
5. generate FFS file if it is driver module while LIB file if it is Library module.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The usage is (take module <em>HelloWorld</em> for example):
|
The usage is (take module <em>HelloWorld</em> for example):
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<GenBuild
|
<GenBuild
|
||||||
msaFilename="HelloWorld.msa"/>
|
msaFilename="HelloWorld.msa"/>
|
||||||
processTo="ALL"/>
|
processTo="ALL"/>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p><code>processTo</code> provides a way to customize the whole build process.
|
<p><code>processTo</code> provides a way to customize the whole build process.
|
||||||
processTo can be one value of ALL, AUTOGEN, FILES, LIBRARYINSTANCES, SECTIONS, NONE.
|
processTo can be one value of ALL, AUTOGEN, FILES, LIBRARYINSTANCES, SECTIONS, NONE.
|
||||||
Default is ALL, means whole
|
Default is ALL, means whole
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
This task calls <code>AutoGen</code> to generate <em>AutoGen.c</em> and
|
This task calls <code>AutoGen</code> to generate <em>AutoGen.c</em> and
|
||||||
<em>AutoGen.h</em>. The task also parses the development environment
|
<em>AutoGen.h</em>. The task also parses the development environment
|
||||||
configuration files, such as collecting package information, setting compiler
|
configuration files, such as collecting package information, setting compiler
|
||||||
flags and so on.
|
flags and so on.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
@since GenBuild 1.0
|
@since GenBuild 1.0
|
||||||
**/
|
**/
|
||||||
public class GenBuildTask extends Ant {
|
public class GenBuildTask extends Ant {
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Module surface area file.
|
/// Module surface area file.
|
||||||
///
|
///
|
||||||
File msaFile;
|
File msaFile;
|
||||||
|
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
private String type = "all"; // = "build";
|
private String type = "all"; // = "build";
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Module's Identification.
|
/// Module's Identification.
|
||||||
///
|
///
|
||||||
|
@ -102,9 +102,9 @@ public class GenBuildTask extends Ant {
|
||||||
private Vector<Property> properties = new Vector<Property>();
|
private Vector<Property> properties = new Vector<Property>();
|
||||||
|
|
||||||
private static Stack<Hashtable> backupPropertiesStack = new Stack<Hashtable>();
|
private static Stack<Hashtable> backupPropertiesStack = new Stack<Hashtable>();
|
||||||
|
|
||||||
private boolean isSingleModuleBuild = false;
|
private boolean isSingleModuleBuild = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Public construct method. It is necessary for ANT task.
|
Public construct method. It is necessary for ANT task.
|
||||||
**/
|
**/
|
||||||
|
@ -112,7 +112,7 @@ public class GenBuildTask extends Ant {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
@throws BuildException
|
@throws BuildException
|
||||||
From module build, exception from module surface area invalid.
|
From module build, exception from module surface area invalid.
|
||||||
**/
|
**/
|
||||||
|
@ -134,7 +134,7 @@ public class GenBuildTask extends Ant {
|
||||||
Property item = iter.next();
|
Property item = iter.next();
|
||||||
getProject().setProperty(item.getName(), item.getValue());
|
getProject().setProperty(item.getName(), item.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// GenBuild should specify either msaFile or moduleGuid & packageGuid
|
// GenBuild should specify either msaFile or moduleGuid & packageGuid
|
||||||
//
|
//
|
||||||
|
@ -165,7 +165,7 @@ public class GenBuildTask extends Ant {
|
||||||
else {
|
else {
|
||||||
moduleId.setLibrary(true);
|
moduleId.setLibrary(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Judge whether it is single module build or not
|
// Judge whether it is single module build or not
|
||||||
//
|
//
|
||||||
|
@ -183,29 +183,29 @@ public class GenBuildTask extends Ant {
|
||||||
PlatformIdentification platformId = GlobalData.getPlatform(filename);
|
PlatformIdentification platformId = GlobalData.getPlatform(filename);
|
||||||
getProject().setProperty("PLATFORM_DIR", platformId.getFpdFile().getParent().replaceAll("(\\\\)", "/"));
|
getProject().setProperty("PLATFORM_DIR", platformId.getFpdFile().getParent().replaceAll("(\\\\)", "/"));
|
||||||
getProject().setProperty("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));
|
getProject().setProperty("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));
|
||||||
|
|
||||||
String packageGuid = getProject().getProperty("PACKAGE_GUID");
|
String packageGuid = getProject().getProperty("PACKAGE_GUID");
|
||||||
String packageVersion = getProject().getProperty("PACKAGE_VERSION");
|
String packageVersion = getProject().getProperty("PACKAGE_VERSION");
|
||||||
PackageIdentification packageId = new PackageIdentification(packageGuid, packageVersion);
|
PackageIdentification packageId = new PackageIdentification(packageGuid, packageVersion);
|
||||||
moduleId.setPackage(packageId);
|
moduleId.setPackage(packageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// If single module : intersection MSA supported ARCHs and tools def!!
|
// If single module : intersection MSA supported ARCHs and tools def!!
|
||||||
// else, get arch from pass down
|
// else, get arch from pass down
|
||||||
//
|
//
|
||||||
Set<String> archListSupByToolChain = new LinkedHashSet<String>();
|
Set<String> archListSupByToolChain = new LinkedHashSet<String>();
|
||||||
String[] archs = GlobalData.getToolChainInfo().getArchs();
|
String[] archs = GlobalData.getToolChainInfo().getArchs();
|
||||||
|
|
||||||
for (int i = 0; i < archs.length; i ++) {
|
for (int i = 0; i < archs.length; i ++) {
|
||||||
archListSupByToolChain.add(archs[i]);
|
archListSupByToolChain.add(archs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<String> archSet = new LinkedHashSet<String>();
|
Set<String> archSet = new LinkedHashSet<String>();
|
||||||
|
|
||||||
if ( getProject().getProperty("ARCH") != null) {
|
if ( getProject().getProperty("ARCH") != null) {
|
||||||
String[] fpdArchList = getProject().getProperty("ARCH").split(" ");
|
String[] fpdArchList = getProject().getProperty("ARCH").split(" ");
|
||||||
|
|
||||||
for (int i = 0; i < fpdArchList.length; i++) {
|
for (int i = 0; i < fpdArchList.length; i++) {
|
||||||
if (archListSupByToolChain.contains(fpdArchList[i])) {
|
if (archListSupByToolChain.contains(fpdArchList[i])) {
|
||||||
archSet.add(fpdArchList[i]);
|
archSet.add(fpdArchList[i]);
|
||||||
|
@ -213,11 +213,11 @@ public class GenBuildTask extends Ant {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
archSet = archListSupByToolChain;
|
archSet = archListSupByToolChain;
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] archList = archSet.toArray(new String[archSet.size()]);
|
String[] archList = archSet.toArray(new String[archSet.size()]);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Judge if arch is all supported by current module. If not, throw Exception.
|
// Judge if arch is all supported by current module. If not, throw Exception.
|
||||||
//
|
//
|
||||||
|
@ -229,13 +229,13 @@ public class GenBuildTask extends Ant {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int k = 0; k < archList.length; k++) {
|
for (int k = 0; k < archList.length; k++) {
|
||||||
|
|
||||||
getProject().setProperty("ARCH", archList[k]);
|
getProject().setProperty("ARCH", archList[k]);
|
||||||
|
|
||||||
FpdModuleIdentification fpdModuleId = new FpdModuleIdentification(moduleId, archList[k]);
|
FpdModuleIdentification fpdModuleId = new FpdModuleIdentification(moduleId, archList[k]);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Whether the module is built before
|
// Whether the module is built before
|
||||||
//
|
//
|
||||||
|
@ -247,7 +247,7 @@ public class GenBuildTask extends Ant {
|
||||||
} else {
|
} else {
|
||||||
GlobalData.registerBuiltModule(fpdModuleId);
|
GlobalData.registerBuiltModule(fpdModuleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// For Every TOOLCHAIN, TARGET
|
// For Every TOOLCHAIN, TARGET
|
||||||
//
|
//
|
||||||
|
@ -263,7 +263,7 @@ public class GenBuildTask extends Ant {
|
||||||
//
|
//
|
||||||
// check if any tool is defined for current target + toolchain + arch
|
// check if any tool is defined for current target + toolchain + arch
|
||||||
// don't do anything if no tools found
|
// don't do anything if no tools found
|
||||||
//
|
//
|
||||||
if (GlobalData.isCommandSet(targetList[i], toolchainList[j], archList[k]) == false) {
|
if (GlobalData.isCommandSet(targetList[i], toolchainList[j], archList[k]) == false) {
|
||||||
System.out.println("Warning: No build issued. No tools were found for [target=" + targetList[i] + " toolchain=" + toolchainList[j] + " arch=" + archList[k] + "]\n");
|
System.out.println("Warning: No build issued. No tools were found for [target=" + targetList[i] + " toolchain=" + toolchainList[j] + " arch=" + archList[k] + "]\n");
|
||||||
continue;
|
continue;
|
||||||
|
@ -278,7 +278,7 @@ public class GenBuildTask extends Ant {
|
||||||
System.out.println("Build " + moduleId + " start >>>");
|
System.out.println("Build " + moduleId + " start >>>");
|
||||||
System.out.println("Target: " + targetList[i] + " Tagname: " + toolchainList[j] + " Arch: " + archList[k]);
|
System.out.println("Target: " + targetList[i] + " Tagname: " + toolchainList[j] + " Arch: " + archList[k]);
|
||||||
SurfaceAreaQuery.setDoc(GlobalData.getDoc(fpdModuleId));
|
SurfaceAreaQuery.setDoc(GlobalData.getDoc(fpdModuleId));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Prepare for all other common properties
|
// Prepare for all other common properties
|
||||||
// PACKAGE, PACKAGE_GUID, PACKAGE_VERSION, PACKAGE_DIR, PACKAGE_RELATIVE_DIR
|
// PACKAGE, PACKAGE_GUID, PACKAGE_VERSION, PACKAGE_DIR, PACKAGE_RELATIVE_DIR
|
||||||
|
@ -287,13 +287,13 @@ public class GenBuildTask extends Ant {
|
||||||
// SUBSYSTEM, ENTRYPOINT, EBC_TOOL_LIB_PATH
|
// SUBSYSTEM, ENTRYPOINT, EBC_TOOL_LIB_PATH
|
||||||
//
|
//
|
||||||
setModuleCommonProperties(archList[k]);
|
setModuleCommonProperties(archList[k]);
|
||||||
|
|
||||||
//
|
//
|
||||||
// OutputManage prepare for
|
// OutputManage prepare for
|
||||||
// BIN_DIR, DEST_DIR_DEBUG, DEST_DIR_OUTPUT, BUILD_DIR, FV_DIR
|
// BIN_DIR, DEST_DIR_DEBUG, DEST_DIR_OUTPUT, BUILD_DIR, FV_DIR
|
||||||
//
|
//
|
||||||
OutputManager.getInstance().update(getProject());
|
OutputManager.getInstance().update(getProject());
|
||||||
|
|
||||||
if (type.equalsIgnoreCase("all") || type.equalsIgnoreCase("build")) {
|
if (type.equalsIgnoreCase("all") || type.equalsIgnoreCase("build")) {
|
||||||
applyBuild(targetList[i], toolchainList[j], fpdModuleId);
|
applyBuild(targetList[i], toolchainList[j], fpdModuleId);
|
||||||
}
|
}
|
||||||
|
@ -313,13 +313,13 @@ public class GenBuildTask extends Ant {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method is used to prepare Platform-related information.
|
This method is used to prepare Platform-related information.
|
||||||
|
|
||||||
<p>In Single Module Build mode, platform-related information is not ready.
|
<p>In Single Module Build mode, platform-related information is not ready.
|
||||||
The method read the system environment variable <code>ACTIVE_PLATFORM</code>
|
The method read the system environment variable <code>ACTIVE_PLATFORM</code>
|
||||||
and search in the Framework Database. Note that platform name in the Framework
|
and search in the Framework Database. Note that platform name in the Framework
|
||||||
Database must be unique. </p>
|
Database must be unique. </p>
|
||||||
|
|
||||||
**/
|
**/
|
||||||
private void prepareSingleModuleBuild(){
|
private void prepareSingleModuleBuild(){
|
||||||
//
|
//
|
||||||
|
@ -327,27 +327,27 @@ public class GenBuildTask extends Ant {
|
||||||
// TBD: Enhance it!!!!
|
// TBD: Enhance it!!!!
|
||||||
//
|
//
|
||||||
PackageIdentification packageId = GlobalData.getPackageForModule(moduleId);
|
PackageIdentification packageId = GlobalData.getPackageForModule(moduleId);
|
||||||
|
|
||||||
moduleId.setPackage(packageId);
|
moduleId.setPackage(packageId);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Read ACTIVE_PLATFORM's FPD file (Call FpdParserTask's method)
|
// Read ACTIVE_PLATFORM's FPD file (Call FpdParserTask's method)
|
||||||
//
|
//
|
||||||
String filename = getProject().getProperty("PLATFORM_FILE");
|
String filename = getProject().getProperty("PLATFORM_FILE");
|
||||||
|
|
||||||
if (filename == null){
|
if (filename == null){
|
||||||
throw new BuildException("Please set ACTIVE_PLATFORM in the file: Tools/Conf/target.txt if you want to build a single module!");
|
throw new BuildException("Please set ACTIVE_PLATFORM in the file: Tools/Conf/target.txt if you want to build a single module!");
|
||||||
}
|
}
|
||||||
|
|
||||||
PlatformIdentification platformId = GlobalData.getPlatform(filename);
|
PlatformIdentification platformId = GlobalData.getPlatform(filename);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Read FPD file
|
// Read FPD file
|
||||||
//
|
//
|
||||||
FpdParserTask fpdParser = new FpdParserTask();
|
FpdParserTask fpdParser = new FpdParserTask();
|
||||||
fpdParser.setProject(getProject());
|
fpdParser.setProject(getProject());
|
||||||
fpdParser.parseFpdFile(platformId.getFpdFile());
|
fpdParser.parseFpdFile(platformId.getFpdFile());
|
||||||
|
|
||||||
//
|
//
|
||||||
// Prepare for Platform related common properties
|
// Prepare for Platform related common properties
|
||||||
// PLATFORM, PLATFORM_DIR, PLATFORM_RELATIVE_DIR
|
// PLATFORM, PLATFORM_DIR, PLATFORM_RELATIVE_DIR
|
||||||
|
@ -372,7 +372,7 @@ public class GenBuildTask extends Ant {
|
||||||
getProject().setProperty("PACKAGE_VERSION", packageId.getVersion());
|
getProject().setProperty("PACKAGE_VERSION", packageId.getVersion());
|
||||||
getProject().setProperty("PACKAGE_DIR", packageId.getPackageDir().replaceAll("(\\\\)", "/"));
|
getProject().setProperty("PACKAGE_DIR", packageId.getPackageDir().replaceAll("(\\\\)", "/"));
|
||||||
getProject().setProperty("PACKAGE_RELATIVE_DIR", packageId.getPackageRelativeDir().replaceAll("(\\\\)", "/"));
|
getProject().setProperty("PACKAGE_RELATIVE_DIR", packageId.getPackageRelativeDir().replaceAll("(\\\\)", "/"));
|
||||||
|
|
||||||
//
|
//
|
||||||
// MODULE or BASE_NAME, GUID or FILE_GUID, VERSION, MODULE_TYPE
|
// MODULE or BASE_NAME, GUID or FILE_GUID, VERSION, MODULE_TYPE
|
||||||
// MODULE_DIR, MODULE_RELATIVE_DIR
|
// MODULE_DIR, MODULE_RELATIVE_DIR
|
||||||
|
@ -391,24 +391,24 @@ public class GenBuildTask extends Ant {
|
||||||
getProject().setProperty("MODULE_TYPE", moduleId.getModuleType());
|
getProject().setProperty("MODULE_TYPE", moduleId.getModuleType());
|
||||||
getProject().setProperty("MODULE_DIR", moduleId.getMsaFile().getParent().replaceAll("(\\\\)", "/"));
|
getProject().setProperty("MODULE_DIR", moduleId.getMsaFile().getParent().replaceAll("(\\\\)", "/"));
|
||||||
getProject().setProperty("MODULE_RELATIVE_DIR", moduleId.getModuleRelativePath().replaceAll("(\\\\)", "/"));
|
getProject().setProperty("MODULE_RELATIVE_DIR", moduleId.getModuleRelativePath().replaceAll("(\\\\)", "/"));
|
||||||
|
|
||||||
//
|
//
|
||||||
// SUBSYSTEM
|
// SUBSYSTEM
|
||||||
//
|
//
|
||||||
String[][] subsystemMap = { { "BASE", "EFI_BOOT_SERVICE_DRIVER"},
|
String[][] subsystemMap = { { "BASE", "EFI_BOOT_SERVICE_DRIVER"},
|
||||||
{ "SEC", "EFI_BOOT_SERVICE_DRIVER" },
|
{ "SEC", "EFI_BOOT_SERVICE_DRIVER" },
|
||||||
{ "PEI_CORE", "EFI_BOOT_SERVICE_DRIVER" },
|
{ "PEI_CORE", "EFI_BOOT_SERVICE_DRIVER" },
|
||||||
{ "PEIM", "EFI_BOOT_SERVICE_DRIVER" },
|
{ "PEIM", "EFI_BOOT_SERVICE_DRIVER" },
|
||||||
{ "DXE_CORE", "EFI_BOOT_SERVICE_DRIVER" },
|
{ "DXE_CORE", "EFI_BOOT_SERVICE_DRIVER" },
|
||||||
{ "DXE_DRIVER", "EFI_BOOT_SERVICE_DRIVER" },
|
{ "DXE_DRIVER", "EFI_BOOT_SERVICE_DRIVER" },
|
||||||
{ "DXE_RUNTIME_DRIVER", "EFI_RUNTIME_DRIVER" },
|
{ "DXE_RUNTIME_DRIVER", "EFI_RUNTIME_DRIVER" },
|
||||||
{ "DXE_SAL_DRIVER", "EFI_BOOT_SERVICE_DRIVER" },
|
{ "DXE_SAL_DRIVER", "EFI_BOOT_SERVICE_DRIVER" },
|
||||||
{ "DXE_SMM_DRIVER", "EFI_BOOT_SERVICE_DRIVER" },
|
{ "DXE_SMM_DRIVER", "EFI_BOOT_SERVICE_DRIVER" },
|
||||||
{ "TOOL", "EFI_BOOT_SERVICE_DRIVER" },
|
{ "TOOL", "EFI_BOOT_SERVICE_DRIVER" },
|
||||||
{ "UEFI_DRIVER", "EFI_BOOT_SERVICE_DRIVER" },
|
{ "UEFI_DRIVER", "EFI_BOOT_SERVICE_DRIVER" },
|
||||||
{ "UEFI_APPLICATION", "EFI_APPLICATION" },
|
{ "UEFI_APPLICATION", "EFI_APPLICATION" },
|
||||||
{ "USER_DEFINED", "EFI_BOOT_SERVICE_DRIVER"} };
|
{ "USER_DEFINED", "EFI_BOOT_SERVICE_DRIVER"} };
|
||||||
|
|
||||||
String subsystem = "EFI_BOOT_SERVICE_DRIVER";
|
String subsystem = "EFI_BOOT_SERVICE_DRIVER";
|
||||||
for (int i = 0; i < subsystemMap.length; i++) {
|
for (int i = 0; i < subsystemMap.length; i++) {
|
||||||
if (moduleId.getModuleType().equalsIgnoreCase(subsystemMap[i][0])) {
|
if (moduleId.getModuleType().equalsIgnoreCase(subsystemMap[i][0])) {
|
||||||
|
@ -417,7 +417,7 @@ public class GenBuildTask extends Ant {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getProject().setProperty("SUBSYSTEM", subsystem);
|
getProject().setProperty("SUBSYSTEM", subsystem);
|
||||||
|
|
||||||
//
|
//
|
||||||
// ENTRYPOINT
|
// ENTRYPOINT
|
||||||
//
|
//
|
||||||
|
@ -427,7 +427,7 @@ public class GenBuildTask extends Ant {
|
||||||
else {
|
else {
|
||||||
getProject().setProperty("ENTRYPOINT", "_ModuleEntryPoint");
|
getProject().setProperty("ENTRYPOINT", "_ModuleEntryPoint");
|
||||||
}
|
}
|
||||||
|
|
||||||
getProject().setProperty("OBJECTS", "");
|
getProject().setProperty("OBJECTS", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -444,7 +444,7 @@ public class GenBuildTask extends Ant {
|
||||||
String cmdName = GlobalData.getCommandSetting(key, fpdModuleId);
|
String cmdName = GlobalData.getCommandSetting(key, fpdModuleId);
|
||||||
File cmdFile = new File(cmdPath + File.separatorChar + cmdName);
|
File cmdFile = new File(cmdPath + File.separatorChar + cmdName);
|
||||||
getProject().setProperty(cmd[m], cmdFile.getPath().replaceAll("(\\\\)", "/"));
|
getProject().setProperty(cmd[m], cmdFile.getPath().replaceAll("(\\\\)", "/"));
|
||||||
|
|
||||||
//
|
//
|
||||||
// set CC_FLAGS
|
// set CC_FLAGS
|
||||||
//
|
//
|
||||||
|
@ -454,7 +454,7 @@ public class GenBuildTask extends Ant {
|
||||||
Set<String> subset = new LinkedHashSet<String>();
|
Set<String> subset = new LinkedHashSet<String>();
|
||||||
putFlagsToSet(addset, cmdFlags);
|
putFlagsToSet(addset, cmdFlags);
|
||||||
getProject().setProperty(cmd[m] + "_FLAGS", getProject().replaceProperties(getFlags(addset, subset)));
|
getProject().setProperty(cmd[m] + "_FLAGS", getProject().replaceProperties(getFlags(addset, subset)));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set CC_EXT
|
// Set CC_EXT
|
||||||
//
|
//
|
||||||
|
@ -466,7 +466,7 @@ public class GenBuildTask extends Ant {
|
||||||
else {
|
else {
|
||||||
getProject().setProperty(cmd[m] + "_EXT", "");
|
getProject().setProperty(cmd[m] + "_EXT", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// set CC_FAMILY
|
// set CC_FAMILY
|
||||||
//
|
//
|
||||||
|
@ -475,7 +475,7 @@ public class GenBuildTask extends Ant {
|
||||||
if (toolChainFamily != null) {
|
if (toolChainFamily != null) {
|
||||||
getProject().setProperty(cmd[m] + "_FAMILY", toolChainFamily);
|
getProject().setProperty(cmd[m] + "_FAMILY", toolChainFamily);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// set CC_SPATH
|
// set CC_SPATH
|
||||||
//
|
//
|
||||||
|
@ -487,7 +487,7 @@ public class GenBuildTask extends Ant {
|
||||||
else {
|
else {
|
||||||
getProject().setProperty(cmd[m] + "_SPATH", "");
|
getProject().setProperty(cmd[m] + "_SPATH", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// set CC_DPATH
|
// set CC_DPATH
|
||||||
//
|
//
|
||||||
|
@ -501,19 +501,19 @@ public class GenBuildTask extends Ant {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMsaFile(File msaFile) {
|
public void setMsaFile(File msaFile) {
|
||||||
this.msaFile = msaFile;
|
this.msaFile = msaFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Method is for ANT to initialize MSA file.
|
Method is for ANT to initialize MSA file.
|
||||||
|
|
||||||
@param msaFilename MSA file name
|
@param msaFilename MSA file name
|
||||||
**/
|
**/
|
||||||
public void setMsaFile(String msaFilename) {
|
public void setMsaFile(String msaFilename) {
|
||||||
String moduleDir = getProject().getProperty("MODULE_DIR");
|
String moduleDir = getProject().getProperty("MODULE_DIR");
|
||||||
|
|
||||||
//
|
//
|
||||||
// If is Single Module Build, then use the Base Dir defined in build.xml
|
// If is Single Module Build, then use the Base Dir defined in build.xml
|
||||||
//
|
//
|
||||||
|
@ -522,17 +522,17 @@ public class GenBuildTask extends Ant {
|
||||||
}
|
}
|
||||||
msaFile = new File(moduleDir + File.separatorChar + msaFilename);
|
msaFile = new File(moduleDir + File.separatorChar + msaFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addConfiguredModuleItem(ModuleItem moduleItem) {
|
public void addConfiguredModuleItem(ModuleItem moduleItem) {
|
||||||
PackageIdentification packageId = new PackageIdentification(moduleItem.getPackageGuid(), moduleItem.getPackageVersion());
|
PackageIdentification packageId = new PackageIdentification(moduleItem.getPackageGuid(), moduleItem.getPackageVersion());
|
||||||
ModuleIdentification moduleId = new ModuleIdentification(moduleItem.getModuleGuid(), moduleItem.getModuleVersion());
|
ModuleIdentification moduleId = new ModuleIdentification(moduleItem.getModuleGuid(), moduleItem.getModuleVersion());
|
||||||
moduleId.setPackage(packageId);
|
moduleId.setPackage(packageId);
|
||||||
this.moduleId = moduleId;
|
this.moduleId = moduleId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Add a property.
|
Add a property.
|
||||||
|
|
||||||
@param p property
|
@param p property
|
||||||
**/
|
**/
|
||||||
public void addProperty(Property p) {
|
public void addProperty(Property p) {
|
||||||
|
@ -542,21 +542,21 @@ public class GenBuildTask extends Ant {
|
||||||
public void setType(String type) {
|
public void setType(String type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void applyBuild(String buildTarget, String buildTagname, FpdModuleIdentification fpdModuleId) throws EdkException{
|
private void applyBuild(String buildTarget, String buildTagname, FpdModuleIdentification fpdModuleId) throws EdkException{
|
||||||
//
|
//
|
||||||
// AutoGen
|
// AutoGen
|
||||||
//
|
//
|
||||||
|
|
||||||
AutoGen autogen = new AutoGen(getProject().getProperty("FV_DIR"), getProject().getProperty("DEST_DIR_DEBUG"), fpdModuleId.getModule(),fpdModuleId.getArch());
|
AutoGen autogen = new AutoGen(getProject().getProperty("FV_DIR"), getProject().getProperty("DEST_DIR_DEBUG"), fpdModuleId.getModule(),fpdModuleId.getArch());
|
||||||
autogen.genAutogen();
|
autogen.genAutogen();
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get compiler flags
|
// Get compiler flags
|
||||||
//
|
//
|
||||||
getCompilerFlags(buildTarget, buildTagname, fpdModuleId);
|
getCompilerFlags(buildTarget, buildTagname, fpdModuleId);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Prepare LIBS
|
// Prepare LIBS
|
||||||
//
|
//
|
||||||
|
@ -566,7 +566,7 @@ public class GenBuildTask extends Ant {
|
||||||
propertyLibs += " " + getProject().getProperty("BIN_DIR") + File.separatorChar + libinstances[i].getName() + ".lib";
|
propertyLibs += " " + getProject().getProperty("BIN_DIR") + File.separatorChar + libinstances[i].getName() + ".lib";
|
||||||
}
|
}
|
||||||
getProject().setProperty("LIBS", propertyLibs.replaceAll("(\\\\)", "/"));
|
getProject().setProperty("LIBS", propertyLibs.replaceAll("(\\\\)", "/"));
|
||||||
|
|
||||||
//
|
//
|
||||||
// if it is CUSTOM_BUILD
|
// if it is CUSTOM_BUILD
|
||||||
// then call the exist BaseName_build.xml directly.
|
// then call the exist BaseName_build.xml directly.
|
||||||
|
@ -581,7 +581,7 @@ public class GenBuildTask extends Ant {
|
||||||
ant.execute();
|
ant.execute();
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Generate ${BASE_NAME}_build.xml
|
// Generate ${BASE_NAME}_build.xml
|
||||||
// TBD
|
// TBD
|
||||||
|
@ -590,7 +590,7 @@ public class GenBuildTask extends Ant {
|
||||||
ModuleBuildFileGenerator fileGenerator = new ModuleBuildFileGenerator(getProject(), ffsKeyword, fpdModuleId);
|
ModuleBuildFileGenerator fileGenerator = new ModuleBuildFileGenerator(getProject(), ffsKeyword, fpdModuleId);
|
||||||
String buildFilename = getProject().getProperty("DEST_DIR_OUTPUT") + File.separatorChar + moduleId.getName() + "_build.xml";
|
String buildFilename = getProject().getProperty("DEST_DIR_OUTPUT") + File.separatorChar + moduleId.getName() + "_build.xml";
|
||||||
fileGenerator.genBuildFile(buildFilename);
|
fileGenerator.genBuildFile(buildFilename);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Ant call ${BASE_NAME}_build.xml
|
// Ant call ${BASE_NAME}_build.xml
|
||||||
//
|
//
|
||||||
|
@ -601,7 +601,7 @@ public class GenBuildTask extends Ant {
|
||||||
ant.init();
|
ant.init();
|
||||||
ant.execute();
|
ant.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void applyClean(FpdModuleIdentification fpdModuleId){
|
private void applyClean(FpdModuleIdentification fpdModuleId){
|
||||||
//
|
//
|
||||||
// if it is CUSTOM_BUILD
|
// if it is CUSTOM_BUILD
|
||||||
|
@ -618,7 +618,7 @@ public class GenBuildTask extends Ant {
|
||||||
ant.execute();
|
ant.execute();
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ant ant = new Ant();
|
Ant ant = new Ant();
|
||||||
ant.setProject(getProject());
|
ant.setProject(getProject());
|
||||||
ant.setAntfile(getProject().getProperty("DEST_DIR_OUTPUT") + File.separatorChar + moduleId.getName() + "_build.xml");
|
ant.setAntfile(getProject().getProperty("DEST_DIR_OUTPUT") + File.separatorChar + moduleId.getName() + "_build.xml");
|
||||||
|
@ -626,12 +626,12 @@ public class GenBuildTask extends Ant {
|
||||||
ant.setInheritAll(true);
|
ant.setInheritAll(true);
|
||||||
ant.init();
|
ant.init();
|
||||||
ant.execute();
|
ant.execute();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Delete current module's DEST_DIR_OUTPUT
|
// Delete current module's DEST_DIR_OUTPUT
|
||||||
// TBD
|
// TBD
|
||||||
}
|
}
|
||||||
|
|
||||||
private void applyCleanall(FpdModuleIdentification fpdModuleId){
|
private void applyCleanall(FpdModuleIdentification fpdModuleId){
|
||||||
//
|
//
|
||||||
// if it is CUSTOM_BUILD
|
// if it is CUSTOM_BUILD
|
||||||
|
@ -648,7 +648,7 @@ public class GenBuildTask extends Ant {
|
||||||
ant.execute();
|
ant.execute();
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ant ant = new Ant();
|
Ant ant = new Ant();
|
||||||
ant.setProject(getProject());
|
ant.setProject(getProject());
|
||||||
ant.setAntfile(getProject().getProperty("DEST_DIR_OUTPUT") + File.separatorChar + moduleId.getName() + "_build.xml");
|
ant.setAntfile(getProject().getProperty("DEST_DIR_OUTPUT") + File.separatorChar + moduleId.getName() + "_build.xml");
|
||||||
|
@ -656,7 +656,7 @@ public class GenBuildTask extends Ant {
|
||||||
ant.setInheritAll(true);
|
ant.setInheritAll(true);
|
||||||
ant.init();
|
ant.init();
|
||||||
ant.execute();
|
ant.execute();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Delete current module's DEST_DIR_OUTPUT
|
// Delete current module's DEST_DIR_OUTPUT
|
||||||
// TBD
|
// TBD
|
||||||
|
@ -667,17 +667,17 @@ public class GenBuildTask extends Ant {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Separate the string and instore in set.
|
Separate the string and instore in set.
|
||||||
|
|
||||||
<p> String is separated by Java Regulation Expression
|
<p> String is separated by Java Regulation Expression
|
||||||
"[^\\\\]?(\".*?[^\\\\]\")[ \t,]+". </p>
|
"[^\\\\]?(\".*?[^\\\\]\")[ \t,]+". </p>
|
||||||
|
|
||||||
<p>For example: </p>
|
<p>For example: </p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
"/nologo", "/W3", "/WX"
|
"/nologo", "/W3", "/WX"
|
||||||
"/C", "/DSTRING_DEFINES_FILE=\"BdsStrDefs.h\""
|
"/C", "/DSTRING_DEFINES_FILE=\"BdsStrDefs.h\""
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
@param set store the separated string
|
@param set store the separated string
|
||||||
@param str string to separate
|
@param str string to separate
|
||||||
**/
|
**/
|
||||||
|
@ -693,10 +693,10 @@ public class GenBuildTask extends Ant {
|
||||||
set.add(item);
|
set.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Generate the final flags string will be used by compile command.
|
Generate the final flags string will be used by compile command.
|
||||||
|
|
||||||
@param add the add flags set
|
@param add the add flags set
|
||||||
@param sub the sub flags set
|
@param sub the sub flags set
|
||||||
@return final flags after add set substract sub set
|
@return final flags after add set substract sub set
|
||||||
|
@ -715,7 +715,7 @@ public class GenBuildTask extends Ant {
|
||||||
private void pushProperties() {
|
private void pushProperties() {
|
||||||
backupPropertiesStack.push(getProject().getProperties());
|
backupPropertiesStack.push(getProject().getProperties());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void popProperties() {
|
private void popProperties() {
|
||||||
Hashtable backupProperties = backupPropertiesStack.pop();
|
Hashtable backupProperties = backupPropertiesStack.pop();
|
||||||
Set keys = backupProperties.keySet();
|
Set keys = backupProperties.keySet();
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
|
|
||||||
This class is to generate Autogen.h and Autogen.c according to module surface area
|
This class is to generate Autogen.h and Autogen.c according to module surface area
|
||||||
or library surface area.
|
or library surface area.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
@ -44,7 +44,8 @@ import org.tianocore.build.global.SurfaceAreaQuery;
|
||||||
import org.tianocore.build.id.ModuleIdentification;
|
import org.tianocore.build.id.ModuleIdentification;
|
||||||
import org.tianocore.build.id.PackageIdentification;
|
import org.tianocore.build.id.PackageIdentification;
|
||||||
import org.tianocore.build.pcd.action.PCDAutoGenAction;
|
import org.tianocore.build.pcd.action.PCDAutoGenAction;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is to generate Autogen.h and Autogen.c according to module surface
|
* This class is to generate Autogen.h and Autogen.c according to module surface
|
||||||
|
@ -55,9 +56,9 @@ public class AutoGen {
|
||||||
// / The output path of Autogen.h and Autogen.c
|
// / The output path of Autogen.h and Autogen.c
|
||||||
// /
|
// /
|
||||||
private String outputPath;
|
private String outputPath;
|
||||||
///
|
///
|
||||||
/// The name of FV directory
|
/// The name of FV directory
|
||||||
///
|
///
|
||||||
private String fvDir;
|
private String fvDir;
|
||||||
// /
|
// /
|
||||||
// / The base name of module or library.
|
// / The base name of module or library.
|
||||||
|
@ -92,7 +93,7 @@ public class AutoGen {
|
||||||
// / dependence on library instance surface area.
|
// / dependence on library instance surface area.
|
||||||
// /
|
// /
|
||||||
private Set<String> mGuidList = new HashSet<String>();
|
private Set<String> mGuidList = new HashSet<String>();
|
||||||
|
|
||||||
//
|
//
|
||||||
// The dependence package list which recoreded in module or library surface
|
// The dependence package list which recoreded in module or library surface
|
||||||
// area and it's dependence on library instance surface are.
|
// area and it's dependence on library instance surface are.
|
||||||
|
@ -100,24 +101,24 @@ public class AutoGen {
|
||||||
private List<PackageIdentification> mDepPkgList = new LinkedList<PackageIdentification>();
|
private List<PackageIdentification> mDepPkgList = new LinkedList<PackageIdentification>();
|
||||||
|
|
||||||
//
|
//
|
||||||
// For non library module, add its library instance's construct and destructor to
|
// For non library module, add its library instance's construct and destructor to
|
||||||
// list.
|
// list.
|
||||||
//
|
//
|
||||||
private List<String> libConstructList = new ArrayList<String>();
|
private List<String> libConstructList = new ArrayList<String>();
|
||||||
private List<String> libDestructList = new ArrayList<String>();
|
private List<String> libDestructList = new ArrayList<String>();
|
||||||
|
|
||||||
//
|
//
|
||||||
// List to store SetVirtalAddressMapCallBack, ExitBootServiceCallBack
|
// List to store SetVirtalAddressMapCallBack, ExitBootServiceCallBack
|
||||||
//
|
//
|
||||||
private List<String> setVirtalAddList = new ArrayList<String>();
|
private List<String> setVirtalAddList = new ArrayList<String>();
|
||||||
private List<String> exitBootServiceList = new ArrayList<String>();
|
private List<String> exitBootServiceList = new ArrayList<String>();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct function
|
* Construct function
|
||||||
*
|
*
|
||||||
* This function mainly initialize some member variable.
|
* This function mainly initialize some member variable.
|
||||||
*
|
*
|
||||||
* @param outputPath
|
* @param outputPath
|
||||||
* Output path of AutoGen file.
|
* Output path of AutoGen file.
|
||||||
* @param baseName
|
* @param baseName
|
||||||
|
@ -135,9 +136,9 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* saveFile function
|
* saveFile function
|
||||||
*
|
*
|
||||||
* This function save the content in stringBuffer to file.
|
* This function save the content in stringBuffer to file.
|
||||||
*
|
*
|
||||||
* @param fileName
|
* @param fileName
|
||||||
* The name of file.
|
* The name of file.
|
||||||
* @param fileBuffer
|
* @param fileBuffer
|
||||||
|
@ -176,10 +177,10 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* genAutogen function
|
* genAutogen function
|
||||||
*
|
*
|
||||||
* This function call libGenAutoGen or moduleGenAutogen function, which
|
* This function call libGenAutoGen or moduleGenAutogen function, which
|
||||||
* dependence on generate library autogen or module autogen.
|
* dependence on generate library autogen or module autogen.
|
||||||
*
|
*
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
* Failed to creat AutoGen.c & AutoGen.h.
|
* Failed to creat AutoGen.c & AutoGen.h.
|
||||||
*/
|
*/
|
||||||
|
@ -210,9 +211,9 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* moduleGenAutogen function
|
* moduleGenAutogen function
|
||||||
*
|
*
|
||||||
* This function generates AutoGen.c & AutoGen.h for module.
|
* This function generates AutoGen.c & AutoGen.h for module.
|
||||||
*
|
*
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
* Faile to create module AutoGen.c & AutoGen.h.
|
* Faile to create module AutoGen.c & AutoGen.h.
|
||||||
*/
|
*/
|
||||||
|
@ -231,9 +232,9 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* libGenAutogen function
|
* libGenAutogen function
|
||||||
*
|
*
|
||||||
* This function generates AutoGen.c & AutoGen.h for library.
|
* This function generates AutoGen.c & AutoGen.h for library.
|
||||||
*
|
*
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
* Faile to create library AutoGen.c & AutoGen.h
|
* Faile to create library AutoGen.c & AutoGen.h
|
||||||
*/
|
*/
|
||||||
|
@ -250,9 +251,9 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* moduleGenAutogenH
|
* moduleGenAutogenH
|
||||||
*
|
*
|
||||||
* This function generates AutoGen.h for module.
|
* This function generates AutoGen.h for module.
|
||||||
*
|
*
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
* Failed to generate AutoGen.h.
|
* Failed to generate AutoGen.h.
|
||||||
*/
|
*/
|
||||||
|
@ -340,9 +341,9 @@ public class AutoGen {
|
||||||
fileBuffer.append("\r\n");
|
fileBuffer.append("\r\n");
|
||||||
|
|
||||||
//
|
//
|
||||||
// If is TianoR8FlashMap, copy {Fv_DIR}/FlashMap.h to
|
// If is TianoR8FlashMap, copy {Fv_DIR}/FlashMap.h to
|
||||||
// {DEST_DIR_DRBUG}/FlashMap.h
|
// {DEST_DIR_DRBUG}/FlashMap.h
|
||||||
//
|
//
|
||||||
if (SurfaceAreaQuery.isHaveTianoR8FlashMap()) {
|
if (SurfaceAreaQuery.isHaveTianoR8FlashMap()) {
|
||||||
fileBuffer.append(CommonDefinition.include);
|
fileBuffer.append(CommonDefinition.include);
|
||||||
fileBuffer.append(" <");
|
fileBuffer.append(" <");
|
||||||
|
@ -372,9 +373,9 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* moduleGenAutogenC
|
* moduleGenAutogenC
|
||||||
*
|
*
|
||||||
* This function generates AutoGen.c for module.
|
* This function generates AutoGen.c for module.
|
||||||
*
|
*
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
* Failed to generate AutoGen.c.
|
* Failed to generate AutoGen.c.
|
||||||
*/
|
*/
|
||||||
|
@ -452,7 +453,7 @@ public class AutoGen {
|
||||||
// autogen.c
|
// autogen.c
|
||||||
//
|
//
|
||||||
LibInstanceToAutogenC(fileBuffer);
|
LibInstanceToAutogenC(fileBuffer);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get module dependent Package identification.
|
// Get module dependent Package identification.
|
||||||
//
|
//
|
||||||
|
@ -461,9 +462,9 @@ public class AutoGen {
|
||||||
if (!this.mDepPkgList.contains(packages[i])){
|
if (!this.mDepPkgList.contains(packages[i])){
|
||||||
this.mDepPkgList.add(packages[i]);
|
this.mDepPkgList.add(packages[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Write consumed ppi, guid, protocol to autogen.c
|
// Write consumed ppi, guid, protocol to autogen.c
|
||||||
//
|
//
|
||||||
|
@ -472,7 +473,7 @@ public class AutoGen {
|
||||||
GuidGuidToAutogenC(fileBuffer);
|
GuidGuidToAutogenC(fileBuffer);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Call pcd autogen.
|
// Call pcd autogen.
|
||||||
//
|
//
|
||||||
this.myPcdAutogen = new PCDAutoGenAction(moduleId, this.arch, false, null);
|
this.myPcdAutogen = new PCDAutoGenAction(moduleId, this.arch, false, null);
|
||||||
try {
|
try {
|
||||||
|
@ -480,7 +481,7 @@ public class AutoGen {
|
||||||
} catch (Exception exp) {
|
} catch (Exception exp) {
|
||||||
throw new PcdAutogenException (exp.getMessage());
|
throw new PcdAutogenException (exp.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.myPcdAutogen != null) {
|
if (this.myPcdAutogen != null) {
|
||||||
fileBuffer.append("\r\n");
|
fileBuffer.append("\r\n");
|
||||||
fileBuffer.append(this.myPcdAutogen.OutputC());
|
fileBuffer.append(this.myPcdAutogen.OutputC());
|
||||||
|
@ -494,9 +495,9 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* libGenAutogenH
|
* libGenAutogenH
|
||||||
*
|
*
|
||||||
* This function generates AutoGen.h for library.
|
* This function generates AutoGen.h for library.
|
||||||
*
|
*
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
* Failed to generate AutoGen.c.
|
* Failed to generate AutoGen.c.
|
||||||
*/
|
*/
|
||||||
|
@ -537,7 +538,7 @@ public class AutoGen {
|
||||||
|
|
||||||
//
|
//
|
||||||
// Write consumed package's mdouleInfo related *.h file to autogen.h.
|
// Write consumed package's mdouleInfo related *.h file to autogen.h.
|
||||||
//
|
//
|
||||||
moduleType = SurfaceAreaQuery.getModuleType();
|
moduleType = SurfaceAreaQuery.getModuleType();
|
||||||
PackageIdentification[] cosumedPkglist = SurfaceAreaQuery
|
PackageIdentification[] cosumedPkglist = SurfaceAreaQuery
|
||||||
.getDependencePkg(this.arch);
|
.getDependencePkg(this.arch);
|
||||||
|
@ -571,9 +572,9 @@ public class AutoGen {
|
||||||
fileBuffer.append("\r\n");
|
fileBuffer.append("\r\n");
|
||||||
|
|
||||||
//
|
//
|
||||||
// If is TianoR8FlashMap, copy {Fv_DIR}/FlashMap.h to
|
// If is TianoR8FlashMap, copy {Fv_DIR}/FlashMap.h to
|
||||||
// {DEST_DIR_DRBUG}/FlashMap.h
|
// {DEST_DIR_DRBUG}/FlashMap.h
|
||||||
//
|
//
|
||||||
if (SurfaceAreaQuery.isHaveTianoR8FlashMap()) {
|
if (SurfaceAreaQuery.isHaveTianoR8FlashMap()) {
|
||||||
fileBuffer.append(CommonDefinition.include);
|
fileBuffer.append(CommonDefinition.include);
|
||||||
fileBuffer.append(" <");
|
fileBuffer.append(" <");
|
||||||
|
@ -604,9 +605,9 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* libGenAutogenC
|
* libGenAutogenC
|
||||||
*
|
*
|
||||||
* This function generates AutoGen.h for library.
|
* This function generates AutoGen.h for library.
|
||||||
*
|
*
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
* Failed to generate AutoGen.c.
|
* Failed to generate AutoGen.c.
|
||||||
*/
|
*/
|
||||||
|
@ -622,11 +623,11 @@ public class AutoGen {
|
||||||
fileBuffer.append("\r\n");
|
fileBuffer.append("\r\n");
|
||||||
|
|
||||||
//
|
//
|
||||||
// Call pcd autogen.
|
// Call pcd autogen.
|
||||||
//
|
//
|
||||||
this.myPcdAutogen = new PCDAutoGenAction(this.moduleId,
|
this.myPcdAutogen = new PCDAutoGenAction(this.moduleId,
|
||||||
this.arch,
|
this.arch,
|
||||||
true,
|
true,
|
||||||
SurfaceAreaQuery.getModulePcdEntryNameArray());
|
SurfaceAreaQuery.getModulePcdEntryNameArray());
|
||||||
try {
|
try {
|
||||||
this.myPcdAutogen.execute();
|
this.myPcdAutogen.execute();
|
||||||
|
@ -646,10 +647,10 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LibraryClassToAutogenH
|
* LibraryClassToAutogenH
|
||||||
*
|
*
|
||||||
* This function returns *.h files declared by library classes which are
|
* This function returns *.h files declared by library classes which are
|
||||||
* consumed or produced by current build module or library.
|
* consumed or produced by current build module or library.
|
||||||
*
|
*
|
||||||
* @param libClassList
|
* @param libClassList
|
||||||
* List of library class which consumed or produce by current
|
* List of library class which consumed or produce by current
|
||||||
* build module or library.
|
* build module or library.
|
||||||
|
@ -689,9 +690,9 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IncludesToAutogenH
|
* IncludesToAutogenH
|
||||||
*
|
*
|
||||||
* This function add include file in AutoGen.h file.
|
* This function add include file in AutoGen.h file.
|
||||||
*
|
*
|
||||||
* @param packageNameList
|
* @param packageNameList
|
||||||
* List of module depended package.
|
* List of module depended package.
|
||||||
* @param moduleType
|
* @param moduleType
|
||||||
|
@ -727,10 +728,10 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EntryPointToAutoGen
|
* EntryPointToAutoGen
|
||||||
*
|
*
|
||||||
* This function convert <ModuleEntryPoint> & <ModuleUnloadImage>
|
* This function convert <ModuleEntryPoint> & <ModuleUnloadImage>
|
||||||
* information in mas to AutoGen.c
|
* information in mas to AutoGen.c
|
||||||
*
|
*
|
||||||
* @param entryPointList
|
* @param entryPointList
|
||||||
* List of entry point.
|
* List of entry point.
|
||||||
* @param fileBuffer
|
* @param fileBuffer
|
||||||
|
@ -833,7 +834,7 @@ public class AutoGen {
|
||||||
.append(" IN EFI_PEI_SERVICES **PeiServices\r\n");
|
.append(" IN EFI_PEI_SERVICES **PeiServices\r\n");
|
||||||
fileBuffer.append(" );\r\n");
|
fileBuffer.append(" );\r\n");
|
||||||
entryPointCount++;
|
entryPointCount++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fileBuffer.append("EFI_STATUS\r\n");
|
fileBuffer.append("EFI_STATUS\r\n");
|
||||||
|
@ -918,7 +919,7 @@ public class AutoGen {
|
||||||
fileBuffer.append(" )\r\n\r\n");
|
fileBuffer.append(" )\r\n\r\n");
|
||||||
fileBuffer.append("{\r\n");
|
fileBuffer.append("{\r\n");
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < entryPointList.length; i++) {
|
for (int i = 0; i < entryPointList.length; i++) {
|
||||||
fileBuffer
|
fileBuffer
|
||||||
.append(" if (SetJump (&mJumpContext) == 0) {\r\n");
|
.append(" if (SetJump (&mJumpContext) == 0) {\r\n");
|
||||||
|
@ -927,7 +928,7 @@ public class AutoGen {
|
||||||
fileBuffer.append(" (ImageHandle, SystemTable));\r\n");
|
fileBuffer.append(" (ImageHandle, SystemTable));\r\n");
|
||||||
fileBuffer.append(" ASSERT (FALSE);\r\n");
|
fileBuffer.append(" ASSERT (FALSE);\r\n");
|
||||||
fileBuffer.append(" }\r\n");
|
fileBuffer.append(" }\r\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
fileBuffer.append(" return mDriverEntryPointStatus;\r\n");
|
fileBuffer.append(" return mDriverEntryPointStatus;\r\n");
|
||||||
fileBuffer.append("}\r\n\r\n");
|
fileBuffer.append("}\r\n\r\n");
|
||||||
|
@ -945,10 +946,10 @@ public class AutoGen {
|
||||||
fileBuffer.append(" LongJump (&mJumpContext, (UINTN)-1);\r\n");
|
fileBuffer.append(" LongJump (&mJumpContext, (UINTN)-1);\r\n");
|
||||||
fileBuffer.append(" ASSERT (FALSE);\r\n");
|
fileBuffer.append(" ASSERT (FALSE);\r\n");
|
||||||
fileBuffer.append("}\r\n\r\n");
|
fileBuffer.append("}\r\n\r\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Add "ModuleUnloadImage" for DxeSmmDriver module type;
|
// Add "ModuleUnloadImage" for DxeSmmDriver module type;
|
||||||
//
|
//
|
||||||
|
@ -1034,10 +1035,10 @@ public class AutoGen {
|
||||||
fileBuffer.append("{\r\n");
|
fileBuffer.append("{\r\n");
|
||||||
fileBuffer.append(" return EFI_SUCCESS;\r\n");
|
fileBuffer.append(" return EFI_SUCCESS;\r\n");
|
||||||
fileBuffer.append("}\r\n");
|
fileBuffer.append("}\r\n");
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
for (int i = 0; i < entryPointList.length; i++) {
|
for (int i = 0; i < entryPointList.length; i++) {
|
||||||
|
|
||||||
fileBuffer.append("EFI_STATUS\r\n");
|
fileBuffer.append("EFI_STATUS\r\n");
|
||||||
fileBuffer.append("EFIAPI\r\n");
|
fileBuffer.append("EFIAPI\r\n");
|
||||||
fileBuffer.append(entryPointList[i]);
|
fileBuffer.append(entryPointList[i]);
|
||||||
|
@ -1114,7 +1115,7 @@ public class AutoGen {
|
||||||
fileBuffer.append("}\r\n\r\n");
|
fileBuffer.append("}\r\n\r\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Add ModuleUnloadImage for DxeDriver and UefiDriver module type.
|
// Add ModuleUnloadImage for DxeDriver and UefiDriver module type.
|
||||||
//
|
//
|
||||||
|
@ -1184,10 +1185,10 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PpiGuidToAutogenc
|
* PpiGuidToAutogenc
|
||||||
*
|
*
|
||||||
* This function gets GUIDs from SPD file accrodeing to <PPIs> information
|
* This function gets GUIDs from SPD file accrodeing to <PPIs> information
|
||||||
* and write those GUIDs to AutoGen.c.
|
* and write those GUIDs to AutoGen.c.
|
||||||
*
|
*
|
||||||
* @param fileBuffer
|
* @param fileBuffer
|
||||||
* String Buffer for Autogen.c file.
|
* String Buffer for Autogen.c file.
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
|
@ -1200,7 +1201,7 @@ public class AutoGen {
|
||||||
// Get the all PPI adn PPI Notify from MSA file,
|
// Get the all PPI adn PPI Notify from MSA file,
|
||||||
// then add those PPI ,and PPI Notify name to list.
|
// then add those PPI ,and PPI Notify name to list.
|
||||||
//
|
//
|
||||||
|
|
||||||
String[] ppiList = SurfaceAreaQuery.getPpiArray(this.arch);
|
String[] ppiList = SurfaceAreaQuery.getPpiArray(this.arch);
|
||||||
for (int i = 0; i < ppiList.length; i++) {
|
for (int i = 0; i < ppiList.length; i++) {
|
||||||
this.mPpiList.add(ppiList[i]);
|
this.mPpiList.add(ppiList[i]);
|
||||||
|
@ -1238,10 +1239,10 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ProtocolGuidToAutogenc
|
* ProtocolGuidToAutogenc
|
||||||
*
|
*
|
||||||
* This function gets GUIDs from SPD file accrodeing to <Protocol>
|
* This function gets GUIDs from SPD file accrodeing to <Protocol>
|
||||||
* information and write those GUIDs to AutoGen.c.
|
* information and write those GUIDs to AutoGen.c.
|
||||||
*
|
*
|
||||||
* @param fileBuffer
|
* @param fileBuffer
|
||||||
* String Buffer for Autogen.c file.
|
* String Buffer for Autogen.c file.
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
|
@ -1271,8 +1272,8 @@ public class AutoGen {
|
||||||
//
|
//
|
||||||
Iterator protocolIterator = this.mProtocolList.iterator();
|
Iterator protocolIterator = this.mProtocolList.iterator();
|
||||||
String protocolKeyWord = null;
|
String protocolKeyWord = null;
|
||||||
|
|
||||||
|
|
||||||
while (protocolIterator.hasNext()) {
|
while (protocolIterator.hasNext()) {
|
||||||
protocolKeyWord = protocolIterator.next().toString();
|
protocolKeyWord = protocolIterator.next().toString();
|
||||||
cNameGuid = GlobalData.getProtocolGuid(this.mDepPkgList, protocolKeyWord);
|
cNameGuid = GlobalData.getProtocolGuid(this.mDepPkgList, protocolKeyWord);
|
||||||
|
@ -1295,13 +1296,13 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GuidGuidToAutogenc
|
* GuidGuidToAutogenc
|
||||||
*
|
*
|
||||||
* This function gets GUIDs from SPD file accrodeing to <Guids> information
|
* This function gets GUIDs from SPD file accrodeing to <Guids> information
|
||||||
* and write those GUIDs to AutoGen.c.
|
* and write those GUIDs to AutoGen.c.
|
||||||
*
|
*
|
||||||
* @param fileBuffer
|
* @param fileBuffer
|
||||||
* String Buffer for Autogen.c file.
|
* String Buffer for Autogen.c file.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void GuidGuidToAutogenC(StringBuffer fileBuffer) throws AutoGenException {
|
void GuidGuidToAutogenC(StringBuffer fileBuffer) throws AutoGenException {
|
||||||
String[] cNameGuid = null;
|
String[] cNameGuid = null;
|
||||||
|
@ -1339,11 +1340,11 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LibInstanceToAutogenC
|
* LibInstanceToAutogenC
|
||||||
*
|
*
|
||||||
* This function adds dependent library instance to autogen.c,which
|
* This function adds dependent library instance to autogen.c,which
|
||||||
* includeing library's constructor, destructor, and library dependent ppi,
|
* includeing library's constructor, destructor, and library dependent ppi,
|
||||||
* protocol, guid, pcd information.
|
* protocol, guid, pcd information.
|
||||||
*
|
*
|
||||||
* @param fileBuffer
|
* @param fileBuffer
|
||||||
* String buffer for AutoGen.c
|
* String buffer for AutoGen.c
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
|
@ -1367,10 +1368,10 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LibConstructorToAutogenc
|
* LibConstructorToAutogenc
|
||||||
*
|
*
|
||||||
* This function writes library constructor list to AutoGen.c. The library
|
* This function writes library constructor list to AutoGen.c. The library
|
||||||
* constructor's parameter and return value depend on module type.
|
* constructor's parameter and return value depend on module type.
|
||||||
*
|
*
|
||||||
* @param libInstanceList
|
* @param libInstanceList
|
||||||
* List of library construct name.
|
* List of library construct name.
|
||||||
* @param moduleType
|
* @param moduleType
|
||||||
|
@ -1508,10 +1509,10 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LibDestructorToAutogenc
|
* LibDestructorToAutogenc
|
||||||
*
|
*
|
||||||
* This function writes library destructor list to AutoGen.c. The library
|
* This function writes library destructor list to AutoGen.c. The library
|
||||||
* destructor's parameter and return value depend on module type.
|
* destructor's parameter and return value depend on module type.
|
||||||
*
|
*
|
||||||
* @param libInstanceList
|
* @param libInstanceList
|
||||||
* List of library destructor name.
|
* List of library destructor name.
|
||||||
* @param moduleType
|
* @param moduleType
|
||||||
|
@ -1588,7 +1589,7 @@ public class AutoGen {
|
||||||
//
|
//
|
||||||
// If no library destructor function, return EFI_SUCCESS.
|
// If no library destructor function, return EFI_SUCCESS.
|
||||||
//
|
//
|
||||||
|
|
||||||
for (int i = 0; i < libInstanceList.size(); i++) {
|
for (int i = 0; i < libInstanceList.size(); i++) {
|
||||||
if (isFirst) {
|
if (isFirst) {
|
||||||
fileBuffer.append(" EFI_STATUS Status;\r\n");
|
fileBuffer.append(" EFI_STATUS Status;\r\n");
|
||||||
|
@ -1608,10 +1609,10 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ExternsDriverBindingToAutoGenC
|
* ExternsDriverBindingToAutoGenC
|
||||||
*
|
*
|
||||||
* This function is to write DRIVER_BINDING, COMPONENT_NAME,
|
* This function is to write DRIVER_BINDING, COMPONENT_NAME,
|
||||||
* DRIVER_CONFIGURATION, DRIVER_DIAGNOSTIC in AutoGen.c.
|
* DRIVER_CONFIGURATION, DRIVER_DIAGNOSTIC in AutoGen.c.
|
||||||
*
|
*
|
||||||
* @param fileBuffer
|
* @param fileBuffer
|
||||||
* String buffer for AutoGen.c
|
* String buffer for AutoGen.c
|
||||||
*/
|
*/
|
||||||
|
@ -1762,10 +1763,10 @@ public class AutoGen {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ExternCallBackToAutoGenC
|
* ExternCallBackToAutoGenC
|
||||||
*
|
*
|
||||||
* This function adds <SetVirtualAddressMapCallBack> and
|
* This function adds <SetVirtualAddressMapCallBack> and
|
||||||
* <ExitBootServicesCallBack> infomation to AutoGen.c
|
* <ExitBootServicesCallBack> infomation to AutoGen.c
|
||||||
*
|
*
|
||||||
* @param fileBuffer
|
* @param fileBuffer
|
||||||
* String buffer for AutoGen.c
|
* String buffer for AutoGen.c
|
||||||
* @throws BuildException
|
* @throws BuildException
|
||||||
|
@ -1773,10 +1774,10 @@ public class AutoGen {
|
||||||
void ExternCallBackToAutoGenC(StringBuffer fileBuffer)
|
void ExternCallBackToAutoGenC(StringBuffer fileBuffer)
|
||||||
throws BuildException {
|
throws BuildException {
|
||||||
//
|
//
|
||||||
// Collect module's <SetVirtualAddressMapCallBack> and
|
// Collect module's <SetVirtualAddressMapCallBack> and
|
||||||
// <ExitBootServiceCallBack> and add to setVirtualAddList
|
// <ExitBootServiceCallBack> and add to setVirtualAddList
|
||||||
// exitBootServiceList.
|
// exitBootServiceList.
|
||||||
//
|
//
|
||||||
String[] setVirtuals = SurfaceAreaQuery.getSetVirtualAddressMapCallBackArray();
|
String[] setVirtuals = SurfaceAreaQuery.getSetVirtualAddressMapCallBackArray();
|
||||||
String[] exitBoots = SurfaceAreaQuery.getExitBootServicesCallBackArray();
|
String[] exitBoots = SurfaceAreaQuery.getExitBootServicesCallBackArray();
|
||||||
if (setVirtuals != null) {
|
if (setVirtuals != null) {
|
||||||
|
@ -1791,8 +1792,8 @@ public class AutoGen {
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Add c code in autogen.c which relate to <SetVirtualAddressMapCallBack>
|
// Add c code in autogen.c which relate to <SetVirtualAddressMapCallBack>
|
||||||
// and <ExitBootServicesCallBack>
|
// and <ExitBootServicesCallBack>
|
||||||
//
|
//
|
||||||
String moduleType = this.moduleId.getModuleType();
|
String moduleType = this.moduleId.getModuleType();
|
||||||
boolean UefiOrDxeModule = false;
|
boolean UefiOrDxeModule = false;
|
||||||
int Count = 0;
|
int Count = 0;
|
||||||
|
@ -1879,8 +1880,8 @@ public class AutoGen {
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// If module is not DXE_DRIVER, DXE_RUNTIME_DIRVER, UEFI_DRIVER
|
// If module is not DXE_DRIVER, DXE_RUNTIME_DIRVER, UEFI_DRIVER
|
||||||
// UEFI_APPLICATION and DXE_SAL_DRIVER add the NULL at the end of
|
// UEFI_APPLICATION and DXE_SAL_DRIVER add the NULL at the end of
|
||||||
// _gDriverSetVirtualAddressMapEvent list.
|
// _gDriverSetVirtualAddressMapEvent list.
|
||||||
//
|
//
|
||||||
if (!UefiOrDxeModule) {
|
if (!UefiOrDxeModule) {
|
||||||
fileBuffer.append(",\r\n NULL");
|
fileBuffer.append(",\r\n NULL");
|
||||||
|
@ -1966,15 +1967,15 @@ public class AutoGen {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void copyFlashMapHToDebugDir() throws AutoGenException{
|
private void copyFlashMapHToDebugDir() throws AutoGenException{
|
||||||
|
|
||||||
File inFile = new File(fvDir + File.separatorChar + CommonDefinition.flashMapH);
|
File inFile = new File(fvDir + File.separatorChar + CommonDefinition.flashMapH);
|
||||||
int size = (int)inFile.length();
|
int size = (int)inFile.length();
|
||||||
byte[] buffer = new byte[size];
|
byte[] buffer = new byte[size];
|
||||||
File outFile = new File (this.outputPath + File.separatorChar + CommonDefinition.tianoR8FlashMapH);
|
File outFile = new File (this.outputPath + File.separatorChar + CommonDefinition.tianoR8FlashMapH);
|
||||||
//
|
//
|
||||||
// If TianoR8FlashMap.h existed and the flashMap.h don't change,
|
// If TianoR8FlashMap.h existed and the flashMap.h don't change,
|
||||||
// do nothing.
|
// do nothing.
|
||||||
//
|
//
|
||||||
if ((!outFile.exists()) ||(inFile.lastModified() - outFile.lastModified()) >= 0) {
|
if ((!outFile.exists()) ||(inFile.lastModified() - outFile.lastModified()) >= 0) {
|
||||||
try{
|
try{
|
||||||
if (inFile.exists()) {
|
if (inFile.exists()) {
|
||||||
|
@ -1992,7 +1993,7 @@ public class AutoGen {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*This function first order the library instances, then collect
|
*This function first order the library instances, then collect
|
||||||
*library instance 's PPI, Protocol, GUID,
|
*library instance 's PPI, Protocol, GUID,
|
||||||
|
@ -2094,9 +2095,9 @@ public class AutoGen {
|
||||||
.getLibDestructorName();
|
.getLibDestructorName();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Collect SetVirtualAddressMapCallBack and
|
// Collect SetVirtualAddressMapCallBack and
|
||||||
// ExitBootServiceCallBack.
|
// ExitBootServiceCallBack.
|
||||||
//
|
//
|
||||||
setVirtuals = SurfaceAreaQuery.getSetVirtualAddressMapCallBackArray();
|
setVirtuals = SurfaceAreaQuery.getSetVirtualAddressMapCallBackArray();
|
||||||
exitBoots = SurfaceAreaQuery.getExitBootServicesCallBackArray();
|
exitBoots = SurfaceAreaQuery.getExitBootServicesCallBackArray();
|
||||||
if (setVirtuals != null) {
|
if (setVirtuals != null) {
|
||||||
|
|
|
@ -2,20 +2,20 @@
|
||||||
GenBuildException class.
|
GenBuildException class.
|
||||||
|
|
||||||
The class handle the exception throwed by entity class.
|
The class handle the exception throwed by entity class.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
package org.tianocore.build.exception;
|
package org.tianocore.build.exception;
|
||||||
|
|
||||||
import org.tianocore.exception.EdkException;
|
import org.tianocore.common.exception.EdkException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The class handle the exception throwed by entity class.
|
The class handle the exception throwed by entity class.
|
||||||
|
@ -24,13 +24,13 @@ public class GenBuildException extends EdkException {
|
||||||
static final long serialVersionUID = -8034897190740066937L;
|
static final long serialVersionUID = -8034897190740066937L;
|
||||||
/**
|
/**
|
||||||
Constructure function
|
Constructure function
|
||||||
|
|
||||||
@param expStr exception message string.
|
@param expStr exception message string.
|
||||||
**/
|
**/
|
||||||
public GenBuildException(String expStr) {
|
public GenBuildException(String expStr) {
|
||||||
super("[GenBuildException]:" + expStr);
|
super("[GenBuildException]:" + expStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GenBuildException() {
|
public GenBuildException() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,20 +2,20 @@
|
||||||
TianoToolsException class.
|
TianoToolsException class.
|
||||||
|
|
||||||
The class handle the exception throwed by entity class.
|
The class handle the exception throwed by entity class.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
package org.tianocore.build.exception;
|
package org.tianocore.build.exception;
|
||||||
|
|
||||||
import org.tianocore.exception.EdkException;
|
import org.tianocore.common.exception.EdkException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The class handle the exception throwed by entity class.
|
The class handle the exception throwed by entity class.
|
||||||
|
@ -24,17 +24,17 @@ public class TianoToolsException extends EdkException {
|
||||||
static final long serialVersionUID = -8034897190740066935L;
|
static final long serialVersionUID = -8034897190740066935L;
|
||||||
/**
|
/**
|
||||||
Constructure function
|
Constructure function
|
||||||
|
|
||||||
@param expStr exception message string.
|
@param expStr exception message string.
|
||||||
**/
|
**/
|
||||||
public TianoToolsException(String expStr) {
|
public TianoToolsException(String expStr) {
|
||||||
super("[TianoToolsException]:" + expStr);
|
super("[TianoToolsException]:" + expStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TianoToolsException() {
|
public TianoToolsException() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TianoToolsException (Exception e, String message){
|
public TianoToolsException (Exception e, String message){
|
||||||
super(e, message);
|
super(e, message);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/** @file
|
/** @file
|
||||||
This file is ANT task FpdParserTask.
|
This file is ANT task FpdParserTask.
|
||||||
|
|
||||||
FpdParserTask is used to parse FPD (Framework Platform Description) and generate
|
FpdParserTask is used to parse FPD (Framework Platform Description) and generate
|
||||||
build.out.xml. It is for Package or Platform build use.
|
build.out.xml. It is for Package or Platform build use.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
@ -32,61 +32,61 @@ import org.apache.tools.ant.taskdefs.Ant;
|
||||||
import org.apache.tools.ant.taskdefs.Property;
|
import org.apache.tools.ant.taskdefs.Property;
|
||||||
import org.apache.xmlbeans.XmlObject;
|
import org.apache.xmlbeans.XmlObject;
|
||||||
|
|
||||||
|
import org.tianocore.common.exception.EdkException;
|
||||||
|
import org.tianocore.pcd.action.ActionMessage;
|
||||||
import org.tianocore.build.global.GlobalData;
|
import org.tianocore.build.global.GlobalData;
|
||||||
import org.tianocore.build.global.OutputManager;
|
import org.tianocore.build.global.OutputManager;
|
||||||
import org.tianocore.build.global.SurfaceAreaQuery;
|
import org.tianocore.build.global.SurfaceAreaQuery;
|
||||||
import org.tianocore.build.id.FpdModuleIdentification;
|
import org.tianocore.build.id.FpdModuleIdentification;
|
||||||
import org.tianocore.build.id.ModuleIdentification;
|
import org.tianocore.build.id.ModuleIdentification;
|
||||||
import org.tianocore.build.id.PlatformIdentification;
|
import org.tianocore.build.id.PlatformIdentification;
|
||||||
import org.tianocore.pcd.action.ActionMessage;
|
|
||||||
import org.tianocore.build.pcd.action.PlatformPcdPreprocessActionForBuilding;
|
import org.tianocore.build.pcd.action.PlatformPcdPreprocessActionForBuilding;
|
||||||
import org.tianocore.build.toolchain.ToolChainAttribute;
|
import org.tianocore.build.toolchain.ToolChainAttribute;
|
||||||
import org.tianocore.build.toolchain.ToolChainElement;
|
import org.tianocore.build.toolchain.ToolChainElement;
|
||||||
import org.tianocore.build.toolchain.ToolChainMap;
|
import org.tianocore.build.toolchain.ToolChainMap;
|
||||||
import org.tianocore.exception.EdkException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
<code>FpdParserTask</code> is an ANT task. The main function is parsing Framework
|
<code>FpdParserTask</code> is an ANT task. The main function is parsing Framework
|
||||||
Platform Descritpion (FPD) XML file and generating its ANT build script for
|
Platform Descritpion (FPD) XML file and generating its ANT build script for
|
||||||
corresponding platform.
|
corresponding platform.
|
||||||
|
|
||||||
<p>The task sets global properties PLATFORM, PLATFORM_DIR, PLATFORM_RELATIVE_DIR
|
<p>The task sets global properties PLATFORM, PLATFORM_DIR, PLATFORM_RELATIVE_DIR
|
||||||
and BUILD_DIR. </p>
|
and BUILD_DIR. </p>
|
||||||
|
|
||||||
<p>The task generates ${PLATFORM}_build.xml file which will be called by top level
|
<p>The task generates ${PLATFORM}_build.xml file which will be called by top level
|
||||||
build.xml. The task also generate Fv.inf files (File is for Tool GenFvImage)
|
build.xml. The task also generate Fv.inf files (File is for Tool GenFvImage)
|
||||||
and flash definition file (File is for Tool FlashMap) if necessary. </p>
|
and flash definition file (File is for Tool FlashMap) if necessary. </p>
|
||||||
|
|
||||||
<p>FpdParserTask task stores all FPD information to GlobalData. And parse
|
<p>FpdParserTask task stores all FPD information to GlobalData. And parse
|
||||||
tools definition file to set up compiler options for different Target and
|
tools definition file to set up compiler options for different Target and
|
||||||
different ToolChainTag. </p>
|
different ToolChainTag. </p>
|
||||||
|
|
||||||
<p>The method parseFpdFile is also prepared for single module build. </p>
|
<p>The method parseFpdFile is also prepared for single module build. </p>
|
||||||
|
|
||||||
<p>The usage is (take NT32 Platform for example):</p>
|
<p>The usage is (take NT32 Platform for example):</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<FPDParser platformName="Nt32" />
|
<FPDParser platformName="Nt32" />
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>The task will initialize all information through parsing Framework Database,
|
<p>The task will initialize all information through parsing Framework Database,
|
||||||
SPD, Tool chain configuration files. </p>
|
SPD, Tool chain configuration files. </p>
|
||||||
|
|
||||||
@since GenBuild 1.0
|
@since GenBuild 1.0
|
||||||
**/
|
**/
|
||||||
public class FpdParserTask extends Task {
|
public class FpdParserTask extends Task {
|
||||||
|
|
||||||
private String platformName;
|
private String platformName;
|
||||||
|
|
||||||
private File fpdFile = null;
|
private File fpdFile = null;
|
||||||
|
|
||||||
private PlatformIdentification platformId;
|
private PlatformIdentification platformId;
|
||||||
|
|
||||||
|
///
|
||||||
///
|
///
|
||||||
///
|
|
||||||
///
|
///
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Mapping from modules identification to out put file name
|
/// Mapping from modules identification to out put file name
|
||||||
///
|
///
|
||||||
|
@ -98,10 +98,10 @@ public class FpdParserTask extends Task {
|
||||||
private Map<String, Set<FpdModuleIdentification>> fvs = new HashMap<String, Set<FpdModuleIdentification>>();
|
private Map<String, Set<FpdModuleIdentification>> fvs = new HashMap<String, Set<FpdModuleIdentification>>();
|
||||||
|
|
||||||
///
|
///
|
||||||
/// FpdParserTask can specify some ANT properties.
|
/// FpdParserTask can specify some ANT properties.
|
||||||
///
|
///
|
||||||
private Vector<Property> properties = new Vector<Property>();
|
private Vector<Property> properties = new Vector<Property>();
|
||||||
|
|
||||||
private boolean isUnified = true;
|
private boolean isUnified = true;
|
||||||
|
|
||||||
|
|
||||||
|
@ -112,19 +112,19 @@ public class FpdParserTask extends Task {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
ANT task's entry method. The main steps is described as following:
|
ANT task's entry method. The main steps is described as following:
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Initialize global information (Framework DB, SPD files and all MSA files
|
<li>Initialize global information (Framework DB, SPD files and all MSA files
|
||||||
listed in SPD). This step will execute only once in whole build process;</li>
|
listed in SPD). This step will execute only once in whole build process;</li>
|
||||||
<li>Parse specified FPD file; </li>
|
<li>Parse specified FPD file; </li>
|
||||||
<li>Generate FV.inf files; </li>
|
<li>Generate FV.inf files; </li>
|
||||||
<li>Generate PlatformName_build.xml file for Flatform build; </li>
|
<li>Generate PlatformName_build.xml file for Flatform build; </li>
|
||||||
<li>Collect PCD information. </li>
|
<li>Collect PCD information. </li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@throws BuildException
|
@throws BuildException
|
||||||
Surface area is not valid.
|
Surface area is not valid.
|
||||||
**/
|
**/
|
||||||
public void execute() throws BuildException {
|
public void execute() throws BuildException {
|
||||||
// Remove !!
|
// Remove !!
|
||||||
|
@ -135,17 +135,17 @@ public class FpdParserTask extends Task {
|
||||||
platformId = GlobalData.getPlatformByName(platformName);
|
platformId = GlobalData.getPlatformByName(platformName);
|
||||||
fpdFile = platformId.getFpdFile();
|
fpdFile = platformId.getFpdFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Parse FPD file
|
// Parse FPD file
|
||||||
//
|
//
|
||||||
parseFpdFile();
|
parseFpdFile();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Prepare BUILD_DIR
|
// Prepare BUILD_DIR
|
||||||
//
|
//
|
||||||
isUnified = OutputManager.getInstance().prepareBuildDir(getProject());
|
isUnified = OutputManager.getInstance().prepareBuildDir(getProject());
|
||||||
|
|
||||||
//
|
//
|
||||||
// For every Target and ToolChain
|
// For every Target and ToolChain
|
||||||
//
|
//
|
||||||
|
@ -156,13 +156,13 @@ public class FpdParserTask extends Task {
|
||||||
//
|
//
|
||||||
// Prepare FV_DIR
|
// Prepare FV_DIR
|
||||||
//
|
//
|
||||||
String ffsCommonDir = getProject().getProperty("BUILD_DIR") + File.separatorChar
|
String ffsCommonDir = getProject().getProperty("BUILD_DIR") + File.separatorChar
|
||||||
+ targetList[i] + File.separatorChar
|
+ targetList[i] + File.separatorChar
|
||||||
+ toolchainList[j];
|
+ toolchainList[j];
|
||||||
File fvDir = new File(ffsCommonDir + File.separatorChar + "FV");
|
File fvDir = new File(ffsCommonDir + File.separatorChar + "FV");
|
||||||
fvDir.mkdirs();
|
fvDir.mkdirs();
|
||||||
getProject().setProperty("FV_DIR", fvDir.getPath().replaceAll("(\\\\)", "/"));
|
getProject().setProperty("FV_DIR", fvDir.getPath().replaceAll("(\\\\)", "/"));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Gen Fv.inf files
|
// Gen Fv.inf files
|
||||||
//
|
//
|
||||||
|
@ -175,11 +175,11 @@ public class FpdParserTask extends Task {
|
||||||
//
|
//
|
||||||
PlatformBuildFileGenerator fileGenerator = new PlatformBuildFileGenerator(getProject(), outfiles, isUnified);
|
PlatformBuildFileGenerator fileGenerator = new PlatformBuildFileGenerator(getProject(), outfiles, isUnified);
|
||||||
fileGenerator.genBuildFile();
|
fileGenerator.genBuildFile();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Ant call ${PLATFORM}_build.xml
|
// Ant call ${PLATFORM}_build.xml
|
||||||
//
|
//
|
||||||
|
|
||||||
Ant ant = new Ant();
|
Ant ant = new Ant();
|
||||||
ant.setProject(getProject());
|
ant.setProject(getProject());
|
||||||
ant.setAntfile(platformId.getFpdFile().getParent() + File.separatorChar + platformId.getName() + "_build.xml");
|
ant.setAntfile(platformId.getFpdFile().getParent() + File.separatorChar + platformId.getName() + "_build.xml");
|
||||||
|
@ -187,17 +187,17 @@ public class FpdParserTask extends Task {
|
||||||
ant.setInheritAll(true);
|
ant.setInheritAll(true);
|
||||||
ant.init();
|
ant.init();
|
||||||
ant.execute();
|
ant.execute();
|
||||||
|
|
||||||
// GlobalData.log.info("Fpd build end. ");
|
// GlobalData.log.info("Fpd build end. ");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Generate Fv.inf files. The Fv.inf file is composed with four
|
Generate Fv.inf files. The Fv.inf file is composed with four
|
||||||
parts: Options, Attributes, Components and Files. The Fv.inf files
|
parts: Options, Attributes, Components and Files. The Fv.inf files
|
||||||
will be under FV_DIR.
|
will be under FV_DIR.
|
||||||
|
|
||||||
@throws BuildException
|
@throws BuildException
|
||||||
File write FV.inf files error.
|
File write FV.inf files error.
|
||||||
**/
|
**/
|
||||||
private void genFvInfFiles(String ffsCommonDir) throws BuildException {
|
private void genFvInfFiles(String ffsCommonDir) throws BuildException {
|
||||||
String[] validFv = SurfaceAreaQuery.getFpdValidImageNames();
|
String[] validFv = SurfaceAreaQuery.getFpdValidImageNames();
|
||||||
|
@ -211,14 +211,14 @@ public class FpdParserTask extends Task {
|
||||||
}
|
}
|
||||||
|
|
||||||
getProject().setProperty("FV_FILENAME", validFv[i]);
|
getProject().setProperty("FV_FILENAME", validFv[i]);
|
||||||
|
|
||||||
File fvFile = new File(getProject().replaceProperties( getProject().getProperty("FV_DIR") + File.separatorChar + validFv[i] + ".inf"));
|
File fvFile = new File(getProject().replaceProperties( getProject().getProperty("FV_DIR") + File.separatorChar + validFv[i] + ".inf"));
|
||||||
fvFile.getParentFile().mkdirs();
|
fvFile.getParentFile().mkdirs();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
FileWriter fw = new FileWriter(fvFile);
|
FileWriter fw = new FileWriter(fvFile);
|
||||||
BufferedWriter bw = new BufferedWriter(fw);
|
BufferedWriter bw = new BufferedWriter(fw);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Options
|
// Options
|
||||||
//
|
//
|
||||||
|
@ -239,7 +239,7 @@ public class FpdParserTask extends Task {
|
||||||
}
|
}
|
||||||
bw.newLine();
|
bw.newLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Attributes;
|
// Attributes;
|
||||||
//
|
//
|
||||||
|
@ -260,7 +260,7 @@ public class FpdParserTask extends Task {
|
||||||
}
|
}
|
||||||
bw.newLine();
|
bw.newLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Components
|
// Components
|
||||||
//
|
//
|
||||||
|
@ -281,7 +281,7 @@ public class FpdParserTask extends Task {
|
||||||
}
|
}
|
||||||
bw.newLine();
|
bw.newLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Files
|
// Files
|
||||||
//
|
//
|
||||||
|
@ -306,10 +306,10 @@ public class FpdParserTask extends Task {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
This method is used for Single Module Build.
|
This method is used for Single Module Build.
|
||||||
|
|
||||||
|
|
||||||
@throws BuildException
|
@throws BuildException
|
||||||
FPD file is not valid.
|
FPD file is not valid.
|
||||||
**/
|
**/
|
||||||
public void parseFpdFile(File fpdFile) throws BuildException {
|
public void parseFpdFile(File fpdFile) throws BuildException {
|
||||||
this.fpdFile = fpdFile;
|
this.fpdFile = fpdFile;
|
||||||
|
@ -317,19 +317,19 @@ public class FpdParserTask extends Task {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Parse FPD file.
|
Parse FPD file.
|
||||||
|
|
||||||
@throws BuildException
|
@throws BuildException
|
||||||
FPD file is not valid.
|
FPD file is not valid.
|
||||||
**/
|
**/
|
||||||
private void parseFpdFile() throws BuildException {
|
private void parseFpdFile() throws BuildException {
|
||||||
try {
|
try {
|
||||||
XmlObject doc = XmlObject.Factory.parse(fpdFile);
|
XmlObject doc = XmlObject.Factory.parse(fpdFile);
|
||||||
|
|
||||||
if (!doc.validate()) {
|
if (!doc.validate()) {
|
||||||
throw new BuildException("Platform Surface Area file [" + fpdFile.getPath() + "] format is invalid!");
|
throw new BuildException("Platform Surface Area file [" + fpdFile.getPath() + "] format is invalid!");
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, XmlObject> map = new HashMap<String, XmlObject>();
|
Map<String, XmlObject> map = new HashMap<String, XmlObject>();
|
||||||
map.put("PlatformSurfaceArea", doc);
|
map.put("PlatformSurfaceArea", doc);
|
||||||
SurfaceAreaQuery.setDoc(map);
|
SurfaceAreaQuery.setDoc(map);
|
||||||
|
@ -345,7 +345,7 @@ public class FpdParserTask extends Task {
|
||||||
getProject().setProperty("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));
|
getProject().setProperty("PLATFORM_RELATIVE_DIR", platformId.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Build mode. User-defined output dir.
|
// Build mode. User-defined output dir.
|
||||||
//
|
//
|
||||||
String buildMode = SurfaceAreaQuery.getFpdIntermediateDirectories();
|
String buildMode = SurfaceAreaQuery.getFpdIntermediateDirectories();
|
||||||
String userDefinedOutputDir = SurfaceAreaQuery.getFpdOutputDirectory();
|
String userDefinedOutputDir = SurfaceAreaQuery.getFpdOutputDirectory();
|
||||||
|
@ -356,9 +356,9 @@ public class FpdParserTask extends Task {
|
||||||
// TBD. Deal PCD and BuildOption related Info
|
// TBD. Deal PCD and BuildOption related Info
|
||||||
//
|
//
|
||||||
GlobalData.setFpdBuildOptions(SurfaceAreaQuery.getFpdBuildOptions());
|
GlobalData.setFpdBuildOptions(SurfaceAreaQuery.getFpdBuildOptions());
|
||||||
|
|
||||||
GlobalData.setToolChainPlatformInfo(SurfaceAreaQuery.getFpdToolChainInfo());
|
GlobalData.setToolChainPlatformInfo(SurfaceAreaQuery.getFpdToolChainInfo());
|
||||||
|
|
||||||
//
|
//
|
||||||
// Parse all list modules SA
|
// Parse all list modules SA
|
||||||
//
|
//
|
||||||
|
@ -371,7 +371,7 @@ public class FpdParserTask extends Task {
|
||||||
parseToolChainOptions();
|
parseToolChainOptions();
|
||||||
|
|
||||||
SurfaceAreaQuery.setDoc(map);
|
SurfaceAreaQuery.setDoc(map);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Pcd Collection. Call CollectPCDAction to collect pcd info.
|
// Pcd Collection. Call CollectPCDAction to collect pcd info.
|
||||||
//
|
//
|
||||||
|
@ -383,9 +383,9 @@ public class FpdParserTask extends Task {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Parse all modules listed in FPD file.
|
Parse all modules listed in FPD file.
|
||||||
**/
|
**/
|
||||||
private void parseModuleSAFiles() throws EdkException{
|
private void parseModuleSAFiles() throws EdkException{
|
||||||
Map<FpdModuleIdentification, Map<String, XmlObject>> moduleSAs = SurfaceAreaQuery.getFpdModules();
|
Map<FpdModuleIdentification, Map<String, XmlObject>> moduleSAs = SurfaceAreaQuery.getFpdModules();
|
||||||
|
@ -397,11 +397,11 @@ public class FpdParserTask extends Task {
|
||||||
Iterator iter = keys.iterator();
|
Iterator iter = keys.iterator();
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
FpdModuleIdentification fpdModuleId = (FpdModuleIdentification) iter.next();
|
FpdModuleIdentification fpdModuleId = (FpdModuleIdentification) iter.next();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Judge if Module is existed?
|
// Judge if Module is existed?
|
||||||
// TBD
|
// TBD
|
||||||
|
|
||||||
GlobalData.registerFpdModuleSA(fpdModuleId, moduleSAs.get(fpdModuleId));
|
GlobalData.registerFpdModuleSA(fpdModuleId, moduleSAs.get(fpdModuleId));
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -413,7 +413,7 @@ public class FpdParserTask extends Task {
|
||||||
|
|
||||||
fpdModuleId.setFvBinding(fvBinding);
|
fpdModuleId.setFvBinding(fvBinding);
|
||||||
updateFvs(fvBinding, fpdModuleId);
|
updateFvs(fvBinding, fpdModuleId);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Prepare for out put file name
|
// Prepare for out put file name
|
||||||
//
|
//
|
||||||
|
@ -424,13 +424,13 @@ public class FpdParserTask extends Task {
|
||||||
if (baseName == null) {
|
if (baseName == null) {
|
||||||
baseName = moduleId.getName();
|
baseName = moduleId.getName();
|
||||||
}
|
}
|
||||||
outfiles.put(fpdModuleId, fpdModuleId.getArch() + File.separatorChar
|
outfiles.put(fpdModuleId, fpdModuleId.getArch() + File.separatorChar
|
||||||
+ moduleId.getGuid() + "-" + baseName
|
+ moduleId.getGuid() + "-" + baseName
|
||||||
+ getSuffix(moduleId.getModuleType()));
|
+ getSuffix(moduleId.getModuleType()));
|
||||||
|
|
||||||
//
|
//
|
||||||
// parse module build options, if any
|
// parse module build options, if any
|
||||||
//
|
//
|
||||||
SurfaceAreaQuery.push(GlobalData.getDoc(fpdModuleId));
|
SurfaceAreaQuery.push(GlobalData.getDoc(fpdModuleId));
|
||||||
GlobalData.addModuleToolChainOption(fpdModuleId, parseModuleBuildOptions(false));
|
GlobalData.addModuleToolChainOption(fpdModuleId, parseModuleBuildOptions(false));
|
||||||
GlobalData.addModuleToolChainFamilyOption(fpdModuleId, parseModuleBuildOptions(true));
|
GlobalData.addModuleToolChainFamilyOption(fpdModuleId, parseModuleBuildOptions(true));
|
||||||
|
@ -445,7 +445,7 @@ public class FpdParserTask extends Task {
|
||||||
}
|
}
|
||||||
return parseOptions(options);
|
return parseOptions(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ToolChainMap parsePlatformBuildOptions(boolean toolChainFamilyFlag) throws EdkException {
|
private ToolChainMap parsePlatformBuildOptions(boolean toolChainFamilyFlag) throws EdkException {
|
||||||
String[][] options = SurfaceAreaQuery.getPlatformBuildOptions(toolChainFamilyFlag);
|
String[][] options = SurfaceAreaQuery.getPlatformBuildOptions(toolChainFamilyFlag);
|
||||||
if (options == null || options.length == 0) {
|
if (options == null || options.length == 0) {
|
||||||
|
@ -469,7 +469,7 @@ public class FpdParserTask extends Task {
|
||||||
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void parseToolChainFamilyOptions() throws EdkException {
|
private void parseToolChainFamilyOptions() throws EdkException {
|
||||||
GlobalData.setPlatformToolChainFamilyOption(parsePlatformBuildOptions(true));
|
GlobalData.setPlatformToolChainFamilyOption(parsePlatformBuildOptions(true));
|
||||||
}
|
}
|
||||||
|
@ -479,8 +479,8 @@ public class FpdParserTask extends Task {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Add the current module to corresponding FV.
|
Add the current module to corresponding FV.
|
||||||
|
|
||||||
@param fvName current FV name
|
@param fvName current FV name
|
||||||
@param moduleName current module identification
|
@param moduleName current module identification
|
||||||
**/
|
**/
|
||||||
|
@ -506,8 +506,8 @@ public class FpdParserTask extends Task {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get the suffix based on module type. Current relationship are listed:
|
Get the suffix based on module type. Current relationship are listed:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<b>ModuleType</b> <b>Suffix</b>
|
<b>ModuleType</b> <b>Suffix</b>
|
||||||
BASE .FFS
|
BASE .FFS
|
||||||
|
@ -524,7 +524,7 @@ public class FpdParserTask extends Task {
|
||||||
UEFI_APPLICATION .APP
|
UEFI_APPLICATION .APP
|
||||||
USER_DEFINED .FFS
|
USER_DEFINED .FFS
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
@param moduleType module type
|
@param moduleType module type
|
||||||
@return
|
@return
|
||||||
@throws BuildException
|
@throws BuildException
|
||||||
|
@ -536,13 +536,13 @@ public class FpdParserTask extends Task {
|
||||||
}
|
}
|
||||||
|
|
||||||
String[][] suffix = { { "BASE", ".FFS"},
|
String[][] suffix = { { "BASE", ".FFS"},
|
||||||
{ "SEC", ".SEC" }, { "PEI_CORE", ".PEI" },
|
{ "SEC", ".SEC" }, { "PEI_CORE", ".PEI" },
|
||||||
{ "PEIM", ".PEI" }, { "DXE_CORE", ".DXE" },
|
{ "PEIM", ".PEI" }, { "DXE_CORE", ".DXE" },
|
||||||
{ "DXE_DRIVER", ".DXE" }, { "DXE_RUNTIME_DRIVER", ".DXE" },
|
{ "DXE_DRIVER", ".DXE" }, { "DXE_RUNTIME_DRIVER", ".DXE" },
|
||||||
{ "DXE_SAL_DRIVER", ".DXE" }, { "DXE_SMM_DRIVER", ".DXE" },
|
{ "DXE_SAL_DRIVER", ".DXE" }, { "DXE_SMM_DRIVER", ".DXE" },
|
||||||
{ "TOOL", ".FFS" }, { "UEFI_DRIVER", ".DXE" },
|
{ "TOOL", ".FFS" }, { "UEFI_DRIVER", ".DXE" },
|
||||||
{ "UEFI_APPLICATION", ".APP" }, { "USER_DEFINED", ".FFS" } };
|
{ "UEFI_APPLICATION", ".APP" }, { "USER_DEFINED", ".FFS" } };
|
||||||
|
|
||||||
for (int i = 0; i < suffix.length; i++) {
|
for (int i = 0; i < suffix.length; i++) {
|
||||||
if (suffix[i][0].equalsIgnoreCase(moduleType)) {
|
if (suffix[i][0].equalsIgnoreCase(moduleType)) {
|
||||||
return suffix[i][1];
|
return suffix[i][1];
|
||||||
|
@ -554,8 +554,8 @@ public class FpdParserTask extends Task {
|
||||||
return ".FFS";
|
return ".FFS";
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
Add a property.
|
Add a property.
|
||||||
|
|
||||||
@param p property
|
@param p property
|
||||||
**/
|
**/
|
||||||
public void addProperty(Property p) {
|
public void addProperty(Property p) {
|
||||||
|
@ -573,6 +573,6 @@ public class FpdParserTask extends Task {
|
||||||
public void setType(String type) {
|
public void setType(String type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,20 +17,22 @@ Abstract:
|
||||||
--*/
|
--*/
|
||||||
|
|
||||||
package org.tianocore.build.global;
|
package org.tianocore.build.global;
|
||||||
|
|
||||||
import org.apache.tools.ant.Project;
|
import org.apache.tools.ant.Project;
|
||||||
import org.tianocore.logger.LogMethod;
|
|
||||||
|
import org.tianocore.common.logger.LogMethod;
|
||||||
|
|
||||||
public class GenBuildLogger implements LogMethod {
|
public class GenBuildLogger implements LogMethod {
|
||||||
private Project project;
|
private Project project;
|
||||||
public GenBuildLogger(Project project) {
|
public GenBuildLogger(Project project) {
|
||||||
this.project = project;
|
this.project = project;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void putMessage(Object msgSource, int msgLevel, String msg) {
|
public void putMessage(Object msgSource, int msgLevel, String msg) {
|
||||||
if (this.project != null){
|
if (this.project != null){
|
||||||
this.project.log(msg, Project.MSG_INFO);
|
this.project.log(msg, Project.MSG_INFO);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
/** @file
|
/** @file
|
||||||
GlobalData class.
|
GlobalData class.
|
||||||
|
|
||||||
GlobalData provide initializing, instoring, querying and update global data.
|
GlobalData provide initializing, instoring, querying and update global data.
|
||||||
It is a bridge to intercommunicate between multiple component, such as AutoGen,
|
It is a bridge to intercommunicate between multiple component, such as AutoGen,
|
||||||
PCD and so on.
|
PCD and so on.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
@ -27,6 +27,10 @@ import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.apache.tools.ant.BuildException;
|
import org.apache.tools.ant.BuildException;
|
||||||
import org.apache.xmlbeans.XmlObject;
|
import org.apache.xmlbeans.XmlObject;
|
||||||
|
|
||||||
|
import org.tianocore.common.exception.EdkException;
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
|
import org.tianocore.pcd.entity.MemoryDatabaseManager;
|
||||||
import org.tianocore.DbPathAndFilename;
|
import org.tianocore.DbPathAndFilename;
|
||||||
import org.tianocore.FrameworkDatabaseDocument;
|
import org.tianocore.FrameworkDatabaseDocument;
|
||||||
import org.tianocore.ModuleSurfaceAreaDocument;
|
import org.tianocore.ModuleSurfaceAreaDocument;
|
||||||
|
@ -35,44 +39,41 @@ import org.tianocore.build.id.FpdModuleIdentification;
|
||||||
import org.tianocore.build.id.ModuleIdentification;
|
import org.tianocore.build.id.ModuleIdentification;
|
||||||
import org.tianocore.build.id.PackageIdentification;
|
import org.tianocore.build.id.PackageIdentification;
|
||||||
import org.tianocore.build.id.PlatformIdentification;
|
import org.tianocore.build.id.PlatformIdentification;
|
||||||
import org.tianocore.pcd.entity.MemoryDatabaseManager;
|
|
||||||
import org.tianocore.build.toolchain.ToolChainAttribute;
|
import org.tianocore.build.toolchain.ToolChainAttribute;
|
||||||
import org.tianocore.build.toolchain.ToolChainConfig;
|
import org.tianocore.build.toolchain.ToolChainConfig;
|
||||||
import org.tianocore.build.toolchain.ToolChainElement;
|
import org.tianocore.build.toolchain.ToolChainElement;
|
||||||
import org.tianocore.build.toolchain.ToolChainInfo;
|
import org.tianocore.build.toolchain.ToolChainInfo;
|
||||||
import org.tianocore.build.toolchain.ToolChainKey;
|
import org.tianocore.build.toolchain.ToolChainKey;
|
||||||
import org.tianocore.build.toolchain.ToolChainMap;
|
import org.tianocore.build.toolchain.ToolChainMap;
|
||||||
import org.tianocore.exception.EdkException;
|
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
GlobalData provide initializing, instoring, querying and update global data.
|
GlobalData provide initializing, instoring, querying and update global data.
|
||||||
It is a bridge to intercommunicate between multiple component, such as AutoGen,
|
It is a bridge to intercommunicate between multiple component, such as AutoGen,
|
||||||
PCD and so on.
|
PCD and so on.
|
||||||
|
|
||||||
<p>Note that all global information are initialized incrementally. All data will
|
<p>Note that all global information are initialized incrementally. All data will
|
||||||
parse and record only of necessary during build time. </p>
|
parse and record only of necessary during build time. </p>
|
||||||
|
|
||||||
@since GenBuild 1.0
|
@since GenBuild 1.0
|
||||||
**/
|
**/
|
||||||
public class GlobalData {
|
public class GlobalData {
|
||||||
|
|
||||||
public static Logger log = Logger.getAnonymousLogger();
|
public static Logger log = Logger.getAnonymousLogger();
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Record current WORKSPACE Directory
|
/// Record current WORKSPACE Directory
|
||||||
///
|
///
|
||||||
private static String workspaceDir = "";
|
private static String workspaceDir = "";
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Be used to ensure Global data will be initialized only once.
|
/// Be used to ensure Global data will be initialized only once.
|
||||||
///
|
///
|
||||||
private static boolean globalFlag = false;
|
private static boolean globalFlag = false;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Framework Database information: package list and platform list
|
/// Framework Database information: package list and platform list
|
||||||
///
|
///
|
||||||
private static Set<PackageIdentification> packageList = new HashSet<PackageIdentification>();
|
private static Set<PackageIdentification> packageList = new HashSet<PackageIdentification>();
|
||||||
|
|
||||||
private static Set<PlatformIdentification> platformList = new HashSet<PlatformIdentification>();
|
private static Set<PlatformIdentification> platformList = new HashSet<PlatformIdentification>();
|
||||||
|
|
||||||
|
@ -93,17 +94,17 @@ public class GlobalData {
|
||||||
private static XmlObject fpdBuildOptions;
|
private static XmlObject fpdBuildOptions;
|
||||||
|
|
||||||
private static XmlObject fpdDynamicPcds;
|
private static XmlObject fpdDynamicPcds;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Parsed modules list
|
/// Parsed modules list
|
||||||
///
|
///
|
||||||
private static Map<FpdModuleIdentification, Map<String, XmlObject>> parsedModules = new HashMap<FpdModuleIdentification, Map<String, XmlObject>>();
|
private static Map<FpdModuleIdentification, Map<String, XmlObject>> parsedModules = new HashMap<FpdModuleIdentification, Map<String, XmlObject>>();
|
||||||
|
|
||||||
///
|
///
|
||||||
/// built modules list with ARCH, TARGET, TOOLCHAIN
|
/// built modules list with ARCH, TARGET, TOOLCHAIN
|
||||||
///
|
///
|
||||||
private static Set<FpdModuleIdentification> builtModules = new HashSet<FpdModuleIdentification>();
|
private static Set<FpdModuleIdentification> builtModules = new HashSet<FpdModuleIdentification>();
|
||||||
|
|
||||||
///
|
///
|
||||||
/// PCD memory database stored all PCD information which collected from FPD,MSA and SPD.
|
/// PCD memory database stored all PCD information which collected from FPD,MSA and SPD.
|
||||||
///
|
///
|
||||||
|
@ -117,7 +118,7 @@ public class GlobalData {
|
||||||
/// toolsDef - build tool program information
|
/// toolsDef - build tool program information
|
||||||
/// fpdBuildOption - all modules's build options for tool tag or tool chain families
|
/// fpdBuildOption - all modules's build options for tool tag or tool chain families
|
||||||
/// moduleSaBuildOption - build options for a specific module
|
/// moduleSaBuildOption - build options for a specific module
|
||||||
///
|
///
|
||||||
private static ToolChainConfig toolsDef;
|
private static ToolChainConfig toolsDef;
|
||||||
|
|
||||||
private static ToolChainInfo toolChainInfo;
|
private static ToolChainInfo toolChainInfo;
|
||||||
|
@ -133,8 +134,8 @@ public class GlobalData {
|
||||||
/**
|
/**
|
||||||
Parse framework database (DB) and all SPD files listed in DB to initialize
|
Parse framework database (DB) and all SPD files listed in DB to initialize
|
||||||
the environment for next build. This method will only be executed only once
|
the environment for next build. This method will only be executed only once
|
||||||
in the whole build process.
|
in the whole build process.
|
||||||
|
|
||||||
@param workspaceDatabaseFile the file name of framework database
|
@param workspaceDatabaseFile the file name of framework database
|
||||||
@param workspaceDir current workspace directory path
|
@param workspaceDir current workspace directory path
|
||||||
@throws BuildException
|
@throws BuildException
|
||||||
|
@ -149,11 +150,11 @@ public class GlobalData {
|
||||||
}
|
}
|
||||||
globalFlag = true;
|
globalFlag = true;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Backup workspace directory. It will be used by other method
|
// Backup workspace directory. It will be used by other method
|
||||||
//
|
//
|
||||||
GlobalData.workspaceDir = workspaceDir.replaceAll("(\\\\)", "/");
|
GlobalData.workspaceDir = workspaceDir.replaceAll("(\\\\)", "/");
|
||||||
|
|
||||||
//
|
//
|
||||||
// Parse tools definition file
|
// Parse tools definition file
|
||||||
//
|
//
|
||||||
|
@ -164,7 +165,7 @@ public class GlobalData {
|
||||||
File toolsDefFile = new File(workspaceDir + File.separatorChar + toolsDefFilename);
|
File toolsDefFile = new File(workspaceDir + File.separatorChar + toolsDefFilename);
|
||||||
System.out.println("Using tool definiton file [" + toolsDefFile.getPath() + "].");
|
System.out.println("Using tool definiton file [" + toolsDefFile.getPath() + "].");
|
||||||
toolsDef = new ToolChainConfig(toolsDefFile);
|
toolsDef = new ToolChainConfig(toolsDefFile);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Parse Framework Database
|
// Parse Framework Database
|
||||||
//
|
//
|
||||||
|
@ -228,10 +229,10 @@ public class GlobalData {
|
||||||
throw new BuildException("Parse WORKSPACE Database file [" + dbFile.getPath() + "] Error.\n" + e.getMessage());
|
throw new BuildException("Parse WORKSPACE Database file [" + dbFile.getPath() + "] Error.\n" + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get the current WORKSPACE Directory.
|
Get the current WORKSPACE Directory.
|
||||||
|
|
||||||
@return current workspace directory
|
@return current workspace directory
|
||||||
**/
|
**/
|
||||||
public synchronized static String getWorkspacePath() {
|
public synchronized static String getWorkspacePath() {
|
||||||
|
@ -245,7 +246,7 @@ public class GlobalData {
|
||||||
public synchronized static File getMsaFile(ModuleIdentification moduleId) throws BuildException {
|
public synchronized static File getMsaFile(ModuleIdentification moduleId) throws BuildException {
|
||||||
File msaFile = null;
|
File msaFile = null;
|
||||||
//
|
//
|
||||||
// TBD. Do only when package is null.
|
// TBD. Do only when package is null.
|
||||||
//
|
//
|
||||||
Iterator iter = packageList.iterator();
|
Iterator iter = packageList.iterator();
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
|
@ -271,7 +272,7 @@ public class GlobalData {
|
||||||
if (moduleId.getPackage() != null) {
|
if (moduleId.getPackage() != null) {
|
||||||
return moduleId.getPackage();
|
return moduleId.getPackage();
|
||||||
}
|
}
|
||||||
|
|
||||||
PackageIdentification packageId = null;
|
PackageIdentification packageId = null;
|
||||||
Iterator iter = packageList.iterator();
|
Iterator iter = packageList.iterator();
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
|
@ -289,19 +290,19 @@ public class GlobalData {
|
||||||
return packageId;
|
return packageId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Difference between build and parse: ToolChain and Target
|
Difference between build and parse: ToolChain and Target
|
||||||
**/
|
**/
|
||||||
public synchronized static boolean isModuleBuilt(FpdModuleIdentification moduleId) {
|
public synchronized static boolean isModuleBuilt(FpdModuleIdentification moduleId) {
|
||||||
return builtModules.contains(moduleId);
|
return builtModules.contains(moduleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized static void registerBuiltModule(FpdModuleIdentification fpdModuleId) {
|
public synchronized static void registerBuiltModule(FpdModuleIdentification fpdModuleId) {
|
||||||
builtModules.add(fpdModuleId);
|
builtModules.add(fpdModuleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public synchronized static void registerFpdModuleSA(FpdModuleIdentification fpdModuleId, Map<String, XmlObject> doc) {
|
public synchronized static void registerFpdModuleSA(FpdModuleIdentification fpdModuleId, Map<String, XmlObject> doc) {
|
||||||
Map<String, XmlObject> result = new HashMap<String, XmlObject>();
|
Map<String, XmlObject> result = new HashMap<String, XmlObject>();
|
||||||
Set keySet = doc.keySet();
|
Set keySet = doc.keySet();
|
||||||
|
@ -320,11 +321,11 @@ public class GlobalData {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Query overrided module surface area information. If current is Package
|
Query overrided module surface area information. If current is Package
|
||||||
or Platform build, also include the information from FPD file.
|
or Platform build, also include the information from FPD file.
|
||||||
|
|
||||||
<p>Note that surface area parsing is incremental. That means the method will
|
<p>Note that surface area parsing is incremental. That means the method will
|
||||||
only parse the MSA and MBD files if necessary. </p>
|
only parse the MSA and MBD files if necessary. </p>
|
||||||
|
|
||||||
@param moduleName the base name of the module
|
@param moduleName the base name of the module
|
||||||
@return the overrided module surface area information
|
@return the overrided module surface area information
|
||||||
@throws BuildException
|
@throws BuildException
|
||||||
|
@ -340,12 +341,12 @@ public class GlobalData {
|
||||||
// First part: get the MSA files info
|
// First part: get the MSA files info
|
||||||
//
|
//
|
||||||
doc.putAll(getNativeMsa(moduleId));
|
doc.putAll(getNativeMsa(moduleId));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Second part: put build options
|
// Second part: put build options
|
||||||
//
|
//
|
||||||
doc.put("BuildOptions", fpdBuildOptions);
|
doc.put("BuildOptions", fpdBuildOptions);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Third part: get Module info from FPD, such as Library instances, PCDs
|
// Third part: get Module info from FPD, such as Library instances, PCDs
|
||||||
//
|
//
|
||||||
|
@ -365,11 +366,11 @@ public class GlobalData {
|
||||||
return getDoc(fpdModuleId);
|
return getDoc(fpdModuleId);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
Query the native MSA information with module base name.
|
Query the native MSA information with module base name.
|
||||||
|
|
||||||
<p>Note that MSA parsing is incremental. That means the method will
|
<p>Note that MSA parsing is incremental. That means the method will
|
||||||
only to parse the MSA files when never parsed before. </p>
|
only to parse the MSA files when never parsed before. </p>
|
||||||
|
|
||||||
@param moduleName the base name of the module
|
@param moduleName the base name of the module
|
||||||
@return the native MSA information
|
@return the native MSA information
|
||||||
@throws BuildException
|
@throws BuildException
|
||||||
|
@ -384,7 +385,7 @@ public class GlobalData {
|
||||||
nativeMsa.put(moduleId, msaMap);
|
nativeMsa.put(moduleId, msaMap);
|
||||||
return msaMap;
|
return msaMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized static Map<String, XmlObject> getNativeMsa(File msaFile) throws BuildException {
|
public synchronized static Map<String, XmlObject> getNativeMsa(File msaFile) throws BuildException {
|
||||||
if (! msaFile.exists()) {
|
if (! msaFile.exists()) {
|
||||||
throw new BuildException("Module Surface Area file [" + msaFile.getPath() + "] can't be found!");
|
throw new BuildException("Module Surface Area file [" + msaFile.getPath() + "] can't be found!");
|
||||||
|
@ -418,13 +419,13 @@ public class GlobalData {
|
||||||
throw new BuildException(ex.getMessage());
|
throw new BuildException(ex.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Map<String, XmlObject> getFpdBuildOptions() {
|
public static Map<String, XmlObject> getFpdBuildOptions() {
|
||||||
Map<String, XmlObject> map = new HashMap<String, XmlObject>();
|
Map<String, XmlObject> map = new HashMap<String, XmlObject>();
|
||||||
map.put("BuildOptions", fpdBuildOptions);
|
map.put("BuildOptions", fpdBuildOptions);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setFpdBuildOptions(XmlObject fpdBuildOptions) {
|
public static void setFpdBuildOptions(XmlObject fpdBuildOptions) {
|
||||||
GlobalData.fpdBuildOptions = cloneXmlObject(fpdBuildOptions, true);
|
GlobalData.fpdBuildOptions = cloneXmlObject(fpdBuildOptions, true);
|
||||||
}
|
}
|
||||||
|
@ -439,7 +440,7 @@ public class GlobalData {
|
||||||
|
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
|
||||||
public static Set<ModuleIdentification> getModules(PackageIdentification packageId){
|
public static Set<ModuleIdentification> getModules(PackageIdentification packageId){
|
||||||
Spd spd = spdTable.get(packageId);
|
Spd spd = spdTable.get(packageId);
|
||||||
if (spd == null ) {
|
if (spd == null ) {
|
||||||
|
@ -572,7 +573,7 @@ public class GlobalData {
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized static PlatformIdentification getPlatformByName(String name) throws BuildException {
|
public synchronized static PlatformIdentification getPlatformByName(String name) throws BuildException {
|
||||||
Iterator iter = platformList.iterator();
|
Iterator iter = platformList.iterator();
|
||||||
while(iter.hasNext()){
|
while(iter.hasNext()){
|
||||||
|
@ -583,7 +584,7 @@ public class GlobalData {
|
||||||
}
|
}
|
||||||
throw new BuildException("Can't find platform [" + name + "] in the current WORKSPACE database!");
|
throw new BuildException("Can't find platform [" + name + "] in the current WORKSPACE database!");
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized static PlatformIdentification getPlatform(String filename) throws BuildException {
|
public synchronized static PlatformIdentification getPlatform(String filename) throws BuildException {
|
||||||
File file = new File(workspaceDir + File.separatorChar + filename);
|
File file = new File(workspaceDir + File.separatorChar + filename);
|
||||||
Iterator iter = platformList.iterator();
|
Iterator iter = platformList.iterator();
|
||||||
|
@ -595,7 +596,7 @@ public class GlobalData {
|
||||||
}
|
}
|
||||||
throw new BuildException("Can't find platform file [" + filename + "] in the current WORKSPACE database!");
|
throw new BuildException("Can't find platform file [" + filename + "] in the current WORKSPACE database!");
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized static PackageIdentification refreshPackageIdentification(PackageIdentification packageId) throws BuildException {
|
public synchronized static PackageIdentification refreshPackageIdentification(PackageIdentification packageId) throws BuildException {
|
||||||
Iterator iter = packageList.iterator();
|
Iterator iter = packageList.iterator();
|
||||||
while(iter.hasNext()){
|
while(iter.hasNext()){
|
||||||
|
@ -608,7 +609,7 @@ public class GlobalData {
|
||||||
}
|
}
|
||||||
throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " in the current workspace!");
|
throw new BuildException("Can't find package GUID value " + packageId.getGuid() + " in the current workspace!");
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized static ModuleIdentification refreshModuleIdentification(ModuleIdentification moduleId) throws BuildException {
|
public synchronized static ModuleIdentification refreshModuleIdentification(ModuleIdentification moduleId) throws BuildException {
|
||||||
// System.out.println("1");
|
// System.out.println("1");
|
||||||
// System.out.println("##" + moduleId.getGuid());
|
// System.out.println("##" + moduleId.getGuid());
|
||||||
|
@ -632,7 +633,7 @@ public class GlobalData {
|
||||||
}
|
}
|
||||||
throw new BuildException("Can't find module GUID value " + moduleId.getGuid() + " in package, " + packageId + ", in the current workspace!");
|
throw new BuildException("Can't find module GUID value " + moduleId.getGuid() + " in package, " + packageId + ", in the current workspace!");
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized static Set<PackageIdentification> getPackageList(){
|
public synchronized static Set<PackageIdentification> getPackageList(){
|
||||||
return packageList;
|
return packageList;
|
||||||
}
|
}
|
||||||
|
@ -702,7 +703,7 @@ public class GlobalData {
|
||||||
|
|
||||||
public static String getCommandSetting(String[] commandDescription, FpdModuleIdentification fpdModuleId) throws EdkException {
|
public static String getCommandSetting(String[] commandDescription, FpdModuleIdentification fpdModuleId) throws EdkException {
|
||||||
ToolChainKey toolChainKey = new ToolChainKey(commandDescription);
|
ToolChainKey toolChainKey = new ToolChainKey(commandDescription);
|
||||||
ToolChainMap toolChainConfig = toolsDef.getConfig();
|
ToolChainMap toolChainConfig = toolsDef.getConfig();
|
||||||
String setting = null;
|
String setting = null;
|
||||||
|
|
||||||
if (!commandDescription[ToolChainElement.ATTRIBUTE.value].equals(ToolChainAttribute.FLAGS.toString())) {
|
if (!commandDescription[ToolChainElement.ATTRIBUTE.value].equals(ToolChainAttribute.FLAGS.toString())) {
|
||||||
|
@ -731,7 +732,7 @@ public class GlobalData {
|
||||||
toolChainFamilyKey.setKey(ToolChainAttribute.FLAGS.toString(), ToolChainElement.ATTRIBUTE.value);
|
toolChainFamilyKey.setKey(ToolChainAttribute.FLAGS.toString(), ToolChainElement.ATTRIBUTE.value);
|
||||||
|
|
||||||
option = moduleToolChainFamilyOption.get(fpdModuleId);
|
option = moduleToolChainFamilyOption.get(fpdModuleId);
|
||||||
if (option != null) {
|
if (option != null) {
|
||||||
setting = option.get(toolChainFamilyKey);
|
setting = option.get(toolChainFamilyKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -761,7 +762,7 @@ public class GlobalData {
|
||||||
|
|
||||||
return setting;
|
return setting;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setToolChainEnvInfo(ToolChainInfo envInfo) {
|
public static void setToolChainEnvInfo(ToolChainInfo envInfo) {
|
||||||
toolChainEnvInfo = envInfo;
|
toolChainEnvInfo = envInfo;
|
||||||
}
|
}
|
||||||
|
@ -803,17 +804,17 @@ public class GlobalData {
|
||||||
//
|
//
|
||||||
// For PCD
|
// For PCD
|
||||||
//
|
//
|
||||||
public synchronized static Map<FpdModuleIdentification, XmlObject>
|
public synchronized static Map<FpdModuleIdentification, XmlObject>
|
||||||
getFpdModuleSaXmlObject(String xmlObjectName) {
|
getFpdModuleSaXmlObject(String xmlObjectName) {
|
||||||
Set<FpdModuleIdentification> fpdModuleSASet = fpdModuleSA.keySet();
|
Set<FpdModuleIdentification> fpdModuleSASet = fpdModuleSA.keySet();
|
||||||
Iterator item = fpdModuleSASet.iterator();
|
Iterator item = fpdModuleSASet.iterator();
|
||||||
|
|
||||||
|
|
||||||
Map<FpdModuleIdentification, XmlObject> SAPcdBuildDef = new HashMap<FpdModuleIdentification, XmlObject>();
|
Map<FpdModuleIdentification, XmlObject> SAPcdBuildDef = new HashMap<FpdModuleIdentification, XmlObject>();
|
||||||
Map<String, XmlObject> SANode = new HashMap<String, XmlObject>();
|
Map<String, XmlObject> SANode = new HashMap<String, XmlObject>();
|
||||||
FpdModuleIdentification moduleId;
|
FpdModuleIdentification moduleId;
|
||||||
while (item.hasNext()) {
|
while (item.hasNext()) {
|
||||||
|
|
||||||
moduleId = (FpdModuleIdentification) item.next();
|
moduleId = (FpdModuleIdentification) item.next();
|
||||||
SANode = fpdModuleSA.get(moduleId);
|
SANode = fpdModuleSA.get(moduleId);
|
||||||
try{
|
try{
|
||||||
|
|
|
@ -23,8 +23,11 @@ import java.util.Stack;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import org.w3c.dom.Node;
|
||||||
|
|
||||||
import org.apache.xmlbeans.XmlObject;
|
import org.apache.xmlbeans.XmlObject;
|
||||||
import org.apache.xmlbeans.XmlString;
|
import org.apache.xmlbeans.XmlString;
|
||||||
|
|
||||||
import org.tianocore.BuildOptionsDocument;
|
import org.tianocore.BuildOptionsDocument;
|
||||||
import org.tianocore.CNameType;
|
import org.tianocore.CNameType;
|
||||||
import org.tianocore.ExternsDocument;
|
import org.tianocore.ExternsDocument;
|
||||||
|
@ -57,20 +60,20 @@ import org.tianocore.FilenameDocument.Filename;
|
||||||
import org.tianocore.MsaHeaderDocument.MsaHeader;
|
import org.tianocore.MsaHeaderDocument.MsaHeader;
|
||||||
import org.tianocore.ProtocolsDocument.Protocols.Protocol;
|
import org.tianocore.ProtocolsDocument.Protocols.Protocol;
|
||||||
import org.tianocore.ProtocolsDocument.Protocols.ProtocolNotify;
|
import org.tianocore.ProtocolsDocument.Protocols.ProtocolNotify;
|
||||||
|
|
||||||
|
import org.tianocore.common.logger.EdkLog;
|
||||||
import org.tianocore.build.id.FpdModuleIdentification;
|
import org.tianocore.build.id.FpdModuleIdentification;
|
||||||
import org.tianocore.build.id.ModuleIdentification;
|
import org.tianocore.build.id.ModuleIdentification;
|
||||||
import org.tianocore.build.id.PackageIdentification;
|
import org.tianocore.build.id.PackageIdentification;
|
||||||
import org.tianocore.build.id.PlatformIdentification;
|
import org.tianocore.build.id.PlatformIdentification;
|
||||||
import org.tianocore.build.toolchain.ToolChainInfo;
|
import org.tianocore.build.toolchain.ToolChainInfo;
|
||||||
import org.tianocore.logger.EdkLog;
|
|
||||||
import org.w3c.dom.Node;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SurfaceAreaQuery class is used to query Surface Area information from msa,
|
* SurfaceAreaQuery class is used to query Surface Area information from msa,
|
||||||
* mbd, spd and fpd files.
|
* mbd, spd and fpd files.
|
||||||
*
|
*
|
||||||
* This class should not instantiated. All the public interfaces is static.
|
* This class should not instantiated. All the public interfaces is static.
|
||||||
*
|
*
|
||||||
* @since GenBuild 1.0
|
* @since GenBuild 1.0
|
||||||
*/
|
*/
|
||||||
public class SurfaceAreaQuery {
|
public class SurfaceAreaQuery {
|
||||||
|
@ -105,7 +108,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a Surface Area document for query later
|
* Set a Surface Area document for query later
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* A Surface Area document in TopLevelElementName/XmlObject
|
* A Surface Area document in TopLevelElementName/XmlObject
|
||||||
* format.
|
* format.
|
||||||
|
@ -120,7 +123,7 @@ public class SurfaceAreaQuery {
|
||||||
* Push current used Surface Area document into query stack. The given new
|
* Push current used Surface Area document into query stack. The given new
|
||||||
* document will be used for any immediately followed getXXX() callings,
|
* document will be used for any immediately followed getXXX() callings,
|
||||||
* untill pop() is called.
|
* untill pop() is called.
|
||||||
*
|
*
|
||||||
* @param newMap
|
* @param newMap
|
||||||
* The TopLevelElementName/XmlObject format of a Surface Area
|
* The TopLevelElementName/XmlObject format of a Surface Area
|
||||||
* document.
|
* document.
|
||||||
|
@ -180,7 +183,7 @@ public class SurfaceAreaQuery {
|
||||||
/**
|
/**
|
||||||
* Search all XML documents stored in "map" for the specified xPath, using
|
* Search all XML documents stored in "map" for the specified xPath, using
|
||||||
* relative path (starting with '$this')
|
* relative path (starting with '$this')
|
||||||
*
|
*
|
||||||
* @param xPath
|
* @param xPath
|
||||||
* xpath query string array
|
* xpath query string array
|
||||||
* @returns An array of XmlObject if elements are found at the specified
|
* @returns An array of XmlObject if elements are found at the specified
|
||||||
|
@ -219,7 +222,7 @@ public class SurfaceAreaQuery {
|
||||||
/**
|
/**
|
||||||
* Search XML documents named by "rootName" for the given xPath, using
|
* Search XML documents named by "rootName" for the given xPath, using
|
||||||
* relative path (starting with '$this')
|
* relative path (starting with '$this')
|
||||||
*
|
*
|
||||||
* @param rootName
|
* @param rootName
|
||||||
* The top level element name
|
* The top level element name
|
||||||
* @param xPath
|
* @param xPath
|
||||||
|
@ -255,7 +258,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve SourceFiles/Filename for specified ARCH type
|
* Retrieve SourceFiles/Filename for specified ARCH type
|
||||||
*
|
*
|
||||||
* @param arch
|
* @param arch
|
||||||
* architecture name
|
* architecture name
|
||||||
* @returns An 2 dimension string array if elements are found at the known
|
* @returns An 2 dimension string array if elements are found at the known
|
||||||
|
@ -282,7 +285,7 @@ public class SurfaceAreaQuery {
|
||||||
outputList.add(new String[] {sourceFileNames[i].getToolCode(),sourceFileNames[i].getStringValue()});
|
outputList.add(new String[] {sourceFileNames[i].getToolCode(),sourceFileNames[i].getStringValue()});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String[][] outputString = new String[outputList.size()][2];
|
String[][] outputString = new String[outputList.size()][2];
|
||||||
for (int index = 0; index < outputList.size(); index++) {
|
for (int index = 0; index < outputList.size(); index++) {
|
||||||
outputString[index][0] = outputList.get(index)[0];
|
outputString[index][0] = outputList.get(index)[0];
|
||||||
|
@ -293,7 +296,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve /PlatformDefinitions/OutputDirectory from FPD
|
* Retrieve /PlatformDefinitions/OutputDirectory from FPD
|
||||||
*
|
*
|
||||||
* @returns Directory names array if elements are found at the known xpath
|
* @returns Directory names array if elements are found at the known xpath
|
||||||
* @returns Empty if nothing is found at the known xpath
|
* @returns Empty if nothing is found at the known xpath
|
||||||
*/
|
*/
|
||||||
|
@ -317,7 +320,7 @@ public class SurfaceAreaQuery {
|
||||||
}
|
}
|
||||||
PlatformDefinitionsDocument.PlatformDefinitions item = (PlatformDefinitionsDocument.PlatformDefinitions)returns[0];
|
PlatformDefinitionsDocument.PlatformDefinitions item = (PlatformDefinitionsDocument.PlatformDefinitions)returns[0];
|
||||||
if(item.getIntermediateDirectories() == null) {
|
if(item.getIntermediateDirectories() == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return item.getIntermediateDirectories().toString();
|
return item.getIntermediateDirectories().toString();
|
||||||
|
@ -334,7 +337,7 @@ public class SurfaceAreaQuery {
|
||||||
ModuleSaBuildOptionsDocument.ModuleSaBuildOptions item = (ModuleSaBuildOptionsDocument.ModuleSaBuildOptions)returns[0];
|
ModuleSaBuildOptionsDocument.ModuleSaBuildOptions item = (ModuleSaBuildOptionsDocument.ModuleSaBuildOptions)returns[0];
|
||||||
return item.getFfsFormatKey();
|
return item.getFfsFormatKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getModuleFvBindingKeyword() {
|
public static String getModuleFvBindingKeyword() {
|
||||||
String[] xPath = new String[] { "/" };
|
String[] xPath = new String[] { "/" };
|
||||||
|
|
||||||
|
@ -345,7 +348,7 @@ public class SurfaceAreaQuery {
|
||||||
ModuleSaBuildOptionsDocument.ModuleSaBuildOptions item = (ModuleSaBuildOptionsDocument.ModuleSaBuildOptions)returns[0];
|
ModuleSaBuildOptionsDocument.ModuleSaBuildOptions item = (ModuleSaBuildOptionsDocument.ModuleSaBuildOptions)returns[0];
|
||||||
return item.getFvBinding();
|
return item.getFvBinding();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List getModuleSupportedArchs() {
|
public static List getModuleSupportedArchs() {
|
||||||
String[] xPath = new String[] { "/" };
|
String[] xPath = new String[] { "/" };
|
||||||
|
|
||||||
|
@ -356,17 +359,17 @@ public class SurfaceAreaQuery {
|
||||||
ModuleDefinitionsDocument.ModuleDefinitions item = (ModuleDefinitionsDocument.ModuleDefinitions)returns[0];
|
ModuleDefinitionsDocument.ModuleDefinitions item = (ModuleDefinitionsDocument.ModuleDefinitions)returns[0];
|
||||||
return item.getSupportedArchitectures();
|
return item.getSupportedArchitectures();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static BuildOptionsDocument.BuildOptions.Ffs[] getFpdFfs() {
|
public static BuildOptionsDocument.BuildOptions.Ffs[] getFpdFfs() {
|
||||||
String[] xPath = new String[] {"/Ffs"};
|
String[] xPath = new String[] {"/Ffs"};
|
||||||
|
|
||||||
Object[] returns = get("BuildOptions", xPath);
|
Object[] returns = get("BuildOptions", xPath);
|
||||||
if (returns == null || returns.length == 0) {
|
if (returns == null || returns.length == 0) {
|
||||||
return new BuildOptionsDocument.BuildOptions.Ffs[0];
|
return new BuildOptionsDocument.BuildOptions.Ffs[0];
|
||||||
}
|
}
|
||||||
return (BuildOptionsDocument.BuildOptions.Ffs[])returns;
|
return (BuildOptionsDocument.BuildOptions.Ffs[])returns;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getModuleOutputFileBasename() {
|
public static String getModuleOutputFileBasename() {
|
||||||
String[] xPath = new String[] { "/" };
|
String[] xPath = new String[] { "/" };
|
||||||
|
|
||||||
|
@ -377,18 +380,18 @@ public class SurfaceAreaQuery {
|
||||||
ModuleDefinitionsDocument.ModuleDefinitions item = (ModuleDefinitionsDocument.ModuleDefinitions)returns[0];
|
ModuleDefinitionsDocument.ModuleDefinitions item = (ModuleDefinitionsDocument.ModuleDefinitions)returns[0];
|
||||||
return item.getOutputFileBasename();
|
return item.getOutputFileBasename();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve BuildOptions/Option or Arch/Option
|
* Retrieve BuildOptions/Option or Arch/Option
|
||||||
*
|
*
|
||||||
* @param toolChainFamilyFlag
|
* @param toolChainFamilyFlag
|
||||||
* if true, retrieve options for toolchain family; otherwise for
|
* if true, retrieve options for toolchain family; otherwise for
|
||||||
* toolchain
|
* toolchain
|
||||||
*
|
*
|
||||||
* @returns String[][5] name, target, toolchain, arch, coommand of options
|
* @returns String[][5] name, target, toolchain, arch, coommand of options
|
||||||
* if elements are found at the known xpath. String[0][] if dont
|
* if elements are found at the known xpath. String[0][] if dont
|
||||||
* find element.
|
* find element.
|
||||||
*
|
*
|
||||||
* @returns Empty array if nothing is there
|
* @returns Empty array if nothing is there
|
||||||
*/
|
*/
|
||||||
public static String[][] getOptions(String from, String[] xPath, boolean toolChainFamilyFlag) {
|
public static String[][] getOptions(String from, String[] xPath, boolean toolChainFamilyFlag) {
|
||||||
|
@ -441,7 +444,7 @@ public class SurfaceAreaQuery {
|
||||||
}
|
}
|
||||||
|
|
||||||
archList = new ArrayList<String>();
|
archList = new ArrayList<String>();
|
||||||
List archEnumList = option.getSupArchList();
|
List archEnumList = option.getSupArchList();
|
||||||
if (archEnumList == null) {
|
if (archEnumList == null) {
|
||||||
archList.add(null);
|
archList.add(null);
|
||||||
} else {
|
} else {
|
||||||
|
@ -477,7 +480,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
public static String[][] getModuleBuildOptions(boolean toolChainFamilyFlag) {
|
public static String[][] getModuleBuildOptions(boolean toolChainFamilyFlag) {
|
||||||
String[] xPath;
|
String[] xPath;
|
||||||
|
|
||||||
if (toolChainFamilyFlag == true) {
|
if (toolChainFamilyFlag == true) {
|
||||||
xPath = new String[] {
|
xPath = new String[] {
|
||||||
"/Options/Option[not(@ToolChainFamily) and not(@TagName)]",
|
"/Options/Option[not(@ToolChainFamily) and not(@TagName)]",
|
||||||
|
@ -488,8 +491,8 @@ public class SurfaceAreaQuery {
|
||||||
"/Options/Option[@TagName]", };
|
"/Options/Option[@TagName]", };
|
||||||
}
|
}
|
||||||
return getOptions("ModuleSaBuildOptions", xPath, toolChainFamilyFlag);
|
return getOptions("ModuleSaBuildOptions", xPath, toolChainFamilyFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String[][] getPlatformBuildOptions(boolean toolChainFamilyFlag) {
|
public static String[][] getPlatformBuildOptions(boolean toolChainFamilyFlag) {
|
||||||
String[] xPath;
|
String[] xPath;
|
||||||
|
|
||||||
|
@ -513,7 +516,7 @@ public class SurfaceAreaQuery {
|
||||||
if (returns == null || returns.length == 0) {
|
if (returns == null || returns.length == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlatformDefinitionsDocument.PlatformDefinitions item = (PlatformDefinitionsDocument.PlatformDefinitions)returns[0];
|
PlatformDefinitionsDocument.PlatformDefinitions item = (PlatformDefinitionsDocument.PlatformDefinitions)returns[0];
|
||||||
ToolChainInfo toolChainInfo = new ToolChainInfo();
|
ToolChainInfo toolChainInfo = new ToolChainInfo();
|
||||||
toolChainInfo.addTargets(item.getBuildTargets().toString());
|
toolChainInfo.addTargets(item.getBuildTargets().toString());
|
||||||
|
@ -524,7 +527,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve <xxxHeader>/ModuleType
|
* Retrieve <xxxHeader>/ModuleType
|
||||||
*
|
*
|
||||||
* @returns The module type name if elements are found at the known xpath
|
* @returns The module type name if elements are found at the known xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -542,10 +545,10 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve PackageDependencies/Package
|
* Retrieve PackageDependencies/Package
|
||||||
*
|
*
|
||||||
* @param arch
|
* @param arch
|
||||||
* Architecture name
|
* Architecture name
|
||||||
*
|
*
|
||||||
* @returns package name list if elements are found at the known xpath
|
* @returns package name list if elements are found at the known xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -554,17 +557,17 @@ public class SurfaceAreaQuery {
|
||||||
String packageGuid = null;
|
String packageGuid = null;
|
||||||
String packageVersion = null;
|
String packageVersion = null;
|
||||||
|
|
||||||
|
|
||||||
xPath = new String[] { "/Package" };
|
xPath = new String[] { "/Package" };
|
||||||
|
|
||||||
Object[] returns = get("PackageDependencies", xPath);
|
Object[] returns = get("PackageDependencies", xPath);
|
||||||
if (returns == null) {
|
if (returns == null) {
|
||||||
return new PackageIdentification[0];
|
return new PackageIdentification[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get packageIdentification
|
// Get packageIdentification
|
||||||
//
|
//
|
||||||
List<PackageIdentification> packageIdList = new ArrayList<PackageIdentification>();
|
List<PackageIdentification> packageIdList = new ArrayList<PackageIdentification>();
|
||||||
for (int i = 0; i < returns.length; i++) {
|
for (int i = 0; i < returns.length; i++) {
|
||||||
PackageDependenciesDocument.PackageDependencies.Package item = (PackageDependenciesDocument.PackageDependencies.Package) returns[i];
|
PackageDependenciesDocument.PackageDependencies.Package item = (PackageDependenciesDocument.PackageDependencies.Package) returns[i];
|
||||||
|
@ -579,7 +582,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
//
|
//
|
||||||
// transfer packageIdentification list to array.
|
// transfer packageIdentification list to array.
|
||||||
//
|
//
|
||||||
PackageIdentification[] packageIdArray = new PackageIdentification[packageIdList.size()];
|
PackageIdentification[] packageIdArray = new PackageIdentification[packageIdList.size()];
|
||||||
for (int i = 0; i < packageIdList.size(); i++) {
|
for (int i = 0; i < packageIdList.size(); i++) {
|
||||||
packageIdArray[i] = new PackageIdentification(null, packageIdList.get(i).getGuid(),packageIdList.get(i).getVersion());
|
packageIdArray[i] = new PackageIdentification(null, packageIdList.get(i).getGuid(),packageIdList.get(i).getVersion());
|
||||||
|
@ -589,10 +592,10 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve LibraryClassDefinitions/LibraryClass for specified usage
|
* Retrieve LibraryClassDefinitions/LibraryClass for specified usage
|
||||||
*
|
*
|
||||||
* @param usage
|
* @param usage
|
||||||
* Library class usage
|
* Library class usage
|
||||||
*
|
*
|
||||||
* @returns LibraryClass objects list if elements are found at the known
|
* @returns LibraryClass objects list if elements are found at the known
|
||||||
* xpath
|
* xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
|
@ -614,7 +617,7 @@ public class SurfaceAreaQuery {
|
||||||
List<String> libraryClassName = new ArrayList<String>();
|
List<String> libraryClassName = new ArrayList<String>();
|
||||||
for (int i = 0; i < libraryClassList.length; i++) {
|
for (int i = 0; i < libraryClassList.length; i++) {
|
||||||
List archList = libraryClassList[i].getSupArchList();
|
List archList = libraryClassList[i].getSupArchList();
|
||||||
|
|
||||||
if (arch == null || contains(archList, arch)) {
|
if (arch == null || contains(archList, arch)) {
|
||||||
libraryClassName.add(libraryClassList[i].getKeyword());
|
libraryClassName.add(libraryClassList[i].getKeyword());
|
||||||
}
|
}
|
||||||
|
@ -628,7 +631,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve ModuleEntryPoint names
|
* Retrieve ModuleEntryPoint names
|
||||||
*
|
*
|
||||||
* @returns ModuleEntryPoint name list if elements are found at the known
|
* @returns ModuleEntryPoint name list if elements are found at the known
|
||||||
* xpath
|
* xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
|
@ -653,10 +656,10 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* retrieve Protocol for specified usage
|
* retrieve Protocol for specified usage
|
||||||
*
|
*
|
||||||
* @param usage
|
* @param usage
|
||||||
* Protocol usage arch Architecture
|
* Protocol usage arch Architecture
|
||||||
*
|
*
|
||||||
* @returns Protocol String list if elements are found at the known xpath
|
* @returns Protocol String list if elements are found at the known xpath
|
||||||
* @returns String[0] if nothing is there
|
* @returns String[0] if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -693,10 +696,10 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* retrieve Protocol for specified usage
|
* retrieve Protocol for specified usage
|
||||||
*
|
*
|
||||||
* @param arch
|
* @param arch
|
||||||
* Architecture
|
* Architecture
|
||||||
*
|
*
|
||||||
* @returns Protocol String list if elements are found at the known xpath
|
* @returns Protocol String list if elements are found at the known xpath
|
||||||
* @returns String[0] if nothing is there
|
* @returns String[0] if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -716,7 +719,7 @@ public class SurfaceAreaQuery {
|
||||||
Protocol[] returnlList = (Protocol[]) returns;
|
Protocol[] returnlList = (Protocol[]) returns;
|
||||||
|
|
||||||
List<String> protocolList = new ArrayList<String>();
|
List<String> protocolList = new ArrayList<String>();
|
||||||
|
|
||||||
for (int i = 0; i < returns.length; i++) {
|
for (int i = 0; i < returns.length; i++) {
|
||||||
List archList = returnlList[i].getSupArchList();
|
List archList = returnlList[i].getSupArchList();
|
||||||
if (archList == null || contains(archList, arch)){
|
if (archList == null || contains(archList, arch)){
|
||||||
|
@ -732,10 +735,10 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve ProtocolNotify for specified usage
|
* Retrieve ProtocolNotify for specified usage
|
||||||
*
|
*
|
||||||
* @param usage
|
* @param usage
|
||||||
* ProtocolNotify usage
|
* ProtocolNotify usage
|
||||||
*
|
*
|
||||||
* @returns String[] if elements are found at the known xpath
|
* @returns String[] if elements are found at the known xpath
|
||||||
* @returns String[0] if nothing is there
|
* @returns String[0] if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -754,13 +757,13 @@ public class SurfaceAreaQuery {
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> protocolNotifyList = new ArrayList<String>();
|
List<String> protocolNotifyList = new ArrayList<String>();
|
||||||
|
|
||||||
for (int i = 0; i < returns.length; i++) {
|
for (int i = 0; i < returns.length; i++) {
|
||||||
List archList = ((ProtocolNotify) returns[i]).getSupArchList();
|
List archList = ((ProtocolNotify) returns[i]).getSupArchList();
|
||||||
if (archList == null || contains(archList, arch)){
|
if (archList == null || contains(archList, arch)){
|
||||||
protocolNotifyList.add(((ProtocolNotify) returns[i]).getProtocolNotifyCName());
|
protocolNotifyList.add(((ProtocolNotify) returns[i]).getProtocolNotifyCName());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
String[] protocolNotifyArray = new String[protocolNotifyList.size()];
|
String[] protocolNotifyArray = new String[protocolNotifyList.size()];
|
||||||
for (int i = 0; i < protocolNotifyList.size(); i++) {
|
for (int i = 0; i < protocolNotifyList.size(); i++) {
|
||||||
|
@ -771,10 +774,10 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve ProtocolNotify for specified usage
|
* Retrieve ProtocolNotify for specified usage
|
||||||
*
|
*
|
||||||
* @param usage
|
* @param usage
|
||||||
* ProtocolNotify usage
|
* ProtocolNotify usage
|
||||||
*
|
*
|
||||||
* @returns String[] if elements are found at the known xpath
|
* @returns String[] if elements are found at the known xpath
|
||||||
* @returns String[0] if nothing is there
|
* @returns String[0] if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -811,7 +814,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve ModuleUnloadImage names
|
* Retrieve ModuleUnloadImage names
|
||||||
*
|
*
|
||||||
* @returns ModuleUnloadImage name list if elements are found at the known
|
* @returns ModuleUnloadImage name list if elements are found at the known
|
||||||
* xpath
|
* xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
|
@ -836,7 +839,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve Extern
|
* Retrieve Extern
|
||||||
*
|
*
|
||||||
* @returns Extern objects list if elements are found at the known xpath
|
* @returns Extern objects list if elements are found at the known xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -853,10 +856,10 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve PpiNotify for specified arch
|
* Retrieve PpiNotify for specified arch
|
||||||
*
|
*
|
||||||
* @param arch
|
* @param arch
|
||||||
* PpiNotify arch
|
* PpiNotify arch
|
||||||
*
|
*
|
||||||
* @returns String[] if elements are found at the known xpath
|
* @returns String[] if elements are found at the known xpath
|
||||||
* @returns String[0] if nothing is there
|
* @returns String[0] if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -874,14 +877,14 @@ public class SurfaceAreaQuery {
|
||||||
return new String[0];
|
return new String[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
List<String> ppiNotifyList = new ArrayList<String>();
|
List<String> ppiNotifyList = new ArrayList<String>();
|
||||||
for (int i = 0; i < returns.length; i++) {
|
for (int i = 0; i < returns.length; i++) {
|
||||||
List archList = ((PPIsDocument.PPIs.PpiNotify) returns[i]).getSupArchList();
|
List archList = ((PPIsDocument.PPIs.PpiNotify) returns[i]).getSupArchList();
|
||||||
if (archList == null || contains(archList, arch)){
|
if (archList == null || contains(archList, arch)){
|
||||||
ppiNotifyList.add(((PPIsDocument.PPIs.PpiNotify) returns[i]).getPpiNotifyCName());
|
ppiNotifyList.add(((PPIsDocument.PPIs.PpiNotify) returns[i]).getPpiNotifyCName());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
String[] ppiNotifyArray = new String[ppiNotifyList.size()];
|
String[] ppiNotifyArray = new String[ppiNotifyList.size()];
|
||||||
for (int i = 0; i < ppiNotifyList.size(); i++) {
|
for (int i = 0; i < ppiNotifyList.size(); i++) {
|
||||||
|
@ -893,11 +896,11 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve PpiNotify for specified usage and arch
|
* Retrieve PpiNotify for specified usage and arch
|
||||||
*
|
*
|
||||||
* @param arch
|
* @param arch
|
||||||
* PpiNotify arch usage PpiNotify usage
|
* PpiNotify arch usage PpiNotify usage
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @returns String[] if elements are found at the known xpath
|
* @returns String[] if elements are found at the known xpath
|
||||||
* @returns String[0] if nothing is there
|
* @returns String[0] if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -934,10 +937,10 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve Ppi for specified arch
|
* Retrieve Ppi for specified arch
|
||||||
*
|
*
|
||||||
* @param arch
|
* @param arch
|
||||||
* Ppi arch
|
* Ppi arch
|
||||||
*
|
*
|
||||||
* @returns String[] if elements are found at the known xpath
|
* @returns String[] if elements are found at the known xpath
|
||||||
* @returns String[0] if nothing is there
|
* @returns String[0] if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -959,9 +962,9 @@ public class SurfaceAreaQuery {
|
||||||
for (int i = 0; i < returns.length; i++) {
|
for (int i = 0; i < returns.length; i++) {
|
||||||
List archList = ((PPIsDocument.PPIs.Ppi) returns[i]).getSupArchList();
|
List archList = ((PPIsDocument.PPIs.Ppi) returns[i]).getSupArchList();
|
||||||
if (archList == null || contains(archList, arch)){
|
if (archList == null || contains(archList, arch)){
|
||||||
ppiList.add(((PPIsDocument.PPIs.Ppi) returns[i]).getPpiCName());
|
ppiList.add(((PPIsDocument.PPIs.Ppi) returns[i]).getPpiCName());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
String[] ppiArray = new String[ppiList.size()];
|
String[] ppiArray = new String[ppiList.size()];
|
||||||
for (int i = 0; i < ppiList.size(); i++) {
|
for (int i = 0; i < ppiList.size(); i++) {
|
||||||
|
@ -972,11 +975,11 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve PpiNotify for specified usage and arch
|
* Retrieve PpiNotify for specified usage and arch
|
||||||
*
|
*
|
||||||
* @param arch
|
* @param arch
|
||||||
* PpiNotify arch usage PpiNotify usage
|
* PpiNotify arch usage PpiNotify usage
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @returns String[] if elements are found at the known xpath
|
* @returns String[] if elements are found at the known xpath
|
||||||
* @returns String[0] if nothing is there
|
* @returns String[0] if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -1013,10 +1016,10 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve GuidEntry information for specified usage
|
* Retrieve GuidEntry information for specified usage
|
||||||
*
|
*
|
||||||
* @param arch
|
* @param arch
|
||||||
* GuidEntry arch
|
* GuidEntry arch
|
||||||
*
|
*
|
||||||
* @returns GuidEntry objects list if elements are found at the known xpath
|
* @returns GuidEntry objects list if elements are found at the known xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -1038,9 +1041,9 @@ public class SurfaceAreaQuery {
|
||||||
for (int i = 0; i < returns.length; i++) {
|
for (int i = 0; i < returns.length; i++) {
|
||||||
List archList = ((GuidsDocument.Guids.GuidCNames) returns[i]).getSupArchList();
|
List archList = ((GuidsDocument.Guids.GuidCNames) returns[i]).getSupArchList();
|
||||||
if (archList == null || contains(archList, arch)){
|
if (archList == null || contains(archList, arch)){
|
||||||
guidList.add(((GuidsDocument.Guids.GuidCNames) returns[i]).getGuidCName());
|
guidList.add(((GuidsDocument.Guids.GuidCNames) returns[i]).getGuidCName());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
String[] guidArray = new String[guidList.size()];
|
String[] guidArray = new String[guidList.size()];
|
||||||
for (int i = 0; i < guidList.size(); i++) {
|
for (int i = 0; i < guidList.size(); i++) {
|
||||||
|
@ -1052,10 +1055,10 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve GuidEntry information for specified usage
|
* Retrieve GuidEntry information for specified usage
|
||||||
*
|
*
|
||||||
* @param arch
|
* @param arch
|
||||||
* GuidEntry arch usage GuidEntry usage
|
* GuidEntry arch usage GuidEntry usage
|
||||||
*
|
*
|
||||||
* @returns GuidEntry objects list if elements are found at the known xpath
|
* @returns GuidEntry objects list if elements are found at the known xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -1091,12 +1094,12 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve Library instance information
|
* Retrieve Library instance information
|
||||||
*
|
*
|
||||||
* @param arch
|
* @param arch
|
||||||
* Architecture name
|
* Architecture name
|
||||||
* @param usage
|
* @param usage
|
||||||
* Library instance usage
|
* Library instance usage
|
||||||
*
|
*
|
||||||
* @returns library instance name list if elements are found at the known
|
* @returns library instance name list if elements are found at the known
|
||||||
* xpath
|
* xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
|
@ -1112,7 +1115,7 @@ public class SurfaceAreaQuery {
|
||||||
xPath = new String[] { "/Instance" };
|
xPath = new String[] { "/Instance" };
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// Since Schema don't have SupArchList now, so the follow Xpath is
|
// Since Schema don't have SupArchList now, so the follow Xpath is
|
||||||
// equal to "/Instance" and [not(@SupArchList) or @SupArchList= arch]
|
// equal to "/Instance" and [not(@SupArchList) or @SupArchList= arch]
|
||||||
// don't have effect.
|
// don't have effect.
|
||||||
//
|
//
|
||||||
|
@ -1167,7 +1170,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrive library's constructor name
|
* Retrive library's constructor name
|
||||||
*
|
*
|
||||||
* @returns constructor name list if elements are found at the known xpath
|
* @returns constructor name list if elements are found at the known xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -1185,7 +1188,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrive library's destructor name
|
* Retrive library's destructor name
|
||||||
*
|
*
|
||||||
* @returns destructor name list if elements are found at the known xpath
|
* @returns destructor name list if elements are found at the known xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -1206,7 +1209,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrive DriverBinding names
|
* Retrive DriverBinding names
|
||||||
*
|
*
|
||||||
* @returns DriverBinding name list if elements are found at the known xpath
|
* @returns DriverBinding name list if elements are found at the known xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -1217,7 +1220,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrive ComponentName names
|
* Retrive ComponentName names
|
||||||
*
|
*
|
||||||
* @returns ComponentName name list if elements are found at the known xpath
|
* @returns ComponentName name list if elements are found at the known xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -1228,7 +1231,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrive DriverConfig names
|
* Retrive DriverConfig names
|
||||||
*
|
*
|
||||||
* @returns DriverConfig name list if elements are found at the known xpath
|
* @returns DriverConfig name list if elements are found at the known xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -1239,7 +1242,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrive DriverDiag names
|
* Retrive DriverDiag names
|
||||||
*
|
*
|
||||||
* @returns DriverDiag name list if elements are found at the known xpath
|
* @returns DriverDiag name list if elements are found at the known xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -1250,7 +1253,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrive SetVirtualAddressMapCallBack names
|
* Retrive SetVirtualAddressMapCallBack names
|
||||||
*
|
*
|
||||||
* @returns SetVirtualAddressMapCallBack name list if elements are found at
|
* @returns SetVirtualAddressMapCallBack name list if elements are found at
|
||||||
* the known xpath
|
* the known xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
|
@ -1262,7 +1265,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrive ExitBootServicesCallBack names
|
* Retrive ExitBootServicesCallBack names
|
||||||
*
|
*
|
||||||
* @returns ExitBootServicesCallBack name list if elements are found at the
|
* @returns ExitBootServicesCallBack name list if elements are found at the
|
||||||
* known xpath
|
* known xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
|
@ -1274,7 +1277,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve module surface area file information
|
* Retrieve module surface area file information
|
||||||
*
|
*
|
||||||
* @returns ModuleSA objects list if elements are found at the known xpath
|
* @returns ModuleSA objects list if elements are found at the known xpath
|
||||||
* @returns Empty ModuleSA list if nothing is there
|
* @returns Empty ModuleSA list if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -1348,11 +1351,11 @@ public class SurfaceAreaQuery {
|
||||||
}
|
}
|
||||||
for (int j = 0; j < archList.length; j++) {
|
for (int j = 0; j < archList.length; j++) {
|
||||||
FpdModuleIdentification fpdSaId = new FpdModuleIdentification(saId, archList[j]);
|
FpdModuleIdentification fpdSaId = new FpdModuleIdentification(saId, archList[j]);
|
||||||
|
|
||||||
if (fvBinding != null) {
|
if (fvBinding != null) {
|
||||||
fpdSaId.setFvBinding(fvBinding);
|
fpdSaId.setFvBinding(fvBinding);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Put element to Map<FpdModuleIdentification, Map<String,
|
// Put element to Map<FpdModuleIdentification, Map<String,
|
||||||
// Object>>.
|
// Object>>.
|
||||||
|
@ -1365,7 +1368,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve valid image names
|
* Retrieve valid image names
|
||||||
*
|
*
|
||||||
* @returns valid iamges name list if elements are found at the known xpath
|
* @returns valid iamges name list if elements are found at the known xpath
|
||||||
* @returns empty list if nothing is there
|
* @returns empty list if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -1384,37 +1387,37 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Node getFpdUserExtensionPreBuild() {
|
public static Node getFpdUserExtensionPreBuild() {
|
||||||
String[] xPath = new String[] { "/UserExtensions[@UserID='TianoCore' and @Identifier='0']" };
|
String[] xPath = new String[] { "/UserExtensions[@UserID='TianoCore' and @Identifier='0']" };
|
||||||
|
|
||||||
Object[] queryResult = get("PlatformSurfaceArea", xPath);
|
Object[] queryResult = get("PlatformSurfaceArea", xPath);
|
||||||
if (queryResult == null || queryResult.length == 0) {
|
if (queryResult == null || queryResult.length == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
UserExtensionsDocument.UserExtensions a = (UserExtensionsDocument.UserExtensions)queryResult[0];
|
UserExtensionsDocument.UserExtensions a = (UserExtensionsDocument.UserExtensions)queryResult[0];
|
||||||
|
|
||||||
return a.getDomNode();
|
return a.getDomNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Node getFpdUserExtensionPostBuild() {
|
public static Node getFpdUserExtensionPostBuild() {
|
||||||
String[] xPath = new String[] { "/UserExtensions[@UserID='TianoCore' and @Identifier='1']" };
|
String[] xPath = new String[] { "/UserExtensions[@UserID='TianoCore' and @Identifier='1']" };
|
||||||
|
|
||||||
Object[] queryResult = get("PlatformSurfaceArea", xPath);
|
Object[] queryResult = get("PlatformSurfaceArea", xPath);
|
||||||
if (queryResult == null || queryResult.length == 0) {
|
if (queryResult == null || queryResult.length == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
UserExtensionsDocument.UserExtensions a = (UserExtensionsDocument.UserExtensions)queryResult[0];
|
UserExtensionsDocument.UserExtensions a = (UserExtensionsDocument.UserExtensions)queryResult[0];
|
||||||
|
|
||||||
return a.getDomNode();
|
return a.getDomNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve FV image option information
|
* Retrieve FV image option information
|
||||||
*
|
*
|
||||||
* @param fvName
|
* @param fvName
|
||||||
* FV image name
|
* FV image name
|
||||||
*
|
*
|
||||||
* @returns option name/value list if elements are found at the known xpath
|
* @returns option name/value list if elements are found at the known xpath
|
||||||
* @returns empty list if nothing is there
|
* @returns empty list if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -1478,10 +1481,10 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve FV image attributes information
|
* Retrieve FV image attributes information
|
||||||
*
|
*
|
||||||
* @param fvName
|
* @param fvName
|
||||||
* FV image name
|
* FV image name
|
||||||
*
|
*
|
||||||
* @returns attribute name/value list if elements are found at the known
|
* @returns attribute name/value list if elements are found at the known
|
||||||
* xpath
|
* xpath
|
||||||
* @returns empty list if nothing is there
|
* @returns empty list if nothing is there
|
||||||
|
@ -1495,7 +1498,7 @@ public class SurfaceAreaQuery {
|
||||||
}
|
}
|
||||||
ArrayList<String[]> list = new ArrayList<String[]>();
|
ArrayList<String[]> list = new ArrayList<String[]>();
|
||||||
for (int i = 0; i < queryResult.length; i++) {
|
for (int i = 0; i < queryResult.length; i++) {
|
||||||
|
|
||||||
FvImagesDocument.FvImages.FvImage.FvImageOptions item = (FvImagesDocument.FvImages.FvImage.FvImageOptions) queryResult[i];
|
FvImagesDocument.FvImages.FvImage.FvImageOptions item = (FvImagesDocument.FvImages.FvImage.FvImageOptions) queryResult[i];
|
||||||
List<FvImagesDocument.FvImages.FvImage.FvImageOptions.NameValue> namevalues = item.getNameValueList();
|
List<FvImagesDocument.FvImages.FvImage.FvImageOptions.NameValue> namevalues = item.getNameValueList();
|
||||||
Iterator iter = namevalues.iterator();
|
Iterator iter = namevalues.iterator();
|
||||||
|
@ -1515,7 +1518,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve flash definition file name
|
* Retrieve flash definition file name
|
||||||
*
|
*
|
||||||
* @returns file name if elements are found at the known xpath
|
* @returns file name if elements are found at the known xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -1539,21 +1542,21 @@ public class SurfaceAreaQuery {
|
||||||
}
|
}
|
||||||
|
|
||||||
String[][] result = new String[queryResult.length][2];
|
String[][] result = new String[queryResult.length][2];
|
||||||
|
|
||||||
for (int i = 0; i < queryResult.length; i++) {
|
for (int i = 0; i < queryResult.length; i++) {
|
||||||
FvImagesDocument.FvImages.NameValue item = (FvImagesDocument.FvImages.NameValue)queryResult[i];
|
FvImagesDocument.FvImages.NameValue item = (FvImagesDocument.FvImages.NameValue)queryResult[i];
|
||||||
result[i][0] = item.getName();
|
result[i][0] = item.getName();
|
||||||
result[i][1] = item.getValue();
|
result[i][1] = item.getValue();
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve FV image component options
|
* Retrieve FV image component options
|
||||||
*
|
*
|
||||||
* @param fvName
|
* @param fvName
|
||||||
* FV image name
|
* FV image name
|
||||||
*
|
*
|
||||||
* @returns name/value pairs list if elements are found at the known xpath
|
* @returns name/value pairs list if elements are found at the known xpath
|
||||||
* @returns empty list if nothing is there
|
* @returns empty list if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -1580,12 +1583,12 @@ public class SurfaceAreaQuery {
|
||||||
result[i][0] = list.get(i)[0];
|
result[i][0] = list.get(i)[0];
|
||||||
result[i][1] = list.get(i)[1];
|
result[i][1] = list.get(i)[1];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve PCD tokens
|
* Retrieve PCD tokens
|
||||||
*
|
*
|
||||||
* @returns CName/ItemType pairs list if elements are found at the known
|
* @returns CName/ItemType pairs list if elements are found at the known
|
||||||
* xpath
|
* xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
|
@ -1603,7 +1606,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve MAS header
|
* Retrieve MAS header
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -1635,12 +1638,12 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve Extern Specification
|
* Retrieve Extern Specification
|
||||||
*
|
*
|
||||||
* @param
|
* @param
|
||||||
*
|
*
|
||||||
* @return String[] If have specification element in the <extern> String[0]
|
* @return String[] If have specification element in the <extern> String[0]
|
||||||
* If no specification element in the <extern>
|
* If no specification element in the <extern>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static String[] getExternSpecificaiton() {
|
public static String[] getExternSpecificaiton() {
|
||||||
|
@ -1661,7 +1664,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retreive MsaFile which in SPD
|
* Retreive MsaFile which in SPD
|
||||||
*
|
*
|
||||||
* @param
|
* @param
|
||||||
* @return String[][3] The string sequence is ModuleName, ModuleGuid,
|
* @return String[][3] The string sequence is ModuleName, ModuleGuid,
|
||||||
* ModuleVersion, MsaFile String[0][] If no msafile in SPD
|
* ModuleVersion, MsaFile String[0][] If no msafile in SPD
|
||||||
|
@ -1811,7 +1814,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getSpdPpi() Retrieve the SPD PPI Entry
|
* getSpdPpi() Retrieve the SPD PPI Entry
|
||||||
*
|
*
|
||||||
* @param
|
* @param
|
||||||
* @return Map<String, String[2]> if get the PPI entry from SPD. Key - PPI
|
* @return Map<String, String[2]> if get the PPI entry from SPD. Key - PPI
|
||||||
* Name String[0] - PPI CNAME String[1] - PPI Guid Null if no PPI
|
* Name String[0] - PPI CNAME String[1] - PPI Guid Null if no PPI
|
||||||
|
@ -1843,7 +1846,7 @@ public class SurfaceAreaQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve module Guid string
|
* Retrieve module Guid string
|
||||||
*
|
*
|
||||||
* @returns GUILD string if elements are found at the known xpath
|
* @returns GUILD string if elements are found at the known xpath
|
||||||
* @returns null if nothing is there
|
* @returns null if nothing is there
|
||||||
*/
|
*/
|
||||||
|
@ -1875,7 +1878,7 @@ public class SurfaceAreaQuery {
|
||||||
/**
|
/**
|
||||||
Get name array of PCD in a module. In one module, token space
|
Get name array of PCD in a module. In one module, token space
|
||||||
is same, and token name should not be conflicted.
|
is same, and token name should not be conflicted.
|
||||||
|
|
||||||
@return String[]
|
@return String[]
|
||||||
**/
|
**/
|
||||||
public static String[] getModulePcdEntryNameArray() {
|
public static String[] getModulePcdEntryNameArray() {
|
||||||
|
@ -1927,7 +1930,7 @@ public class SurfaceAreaQuery {
|
||||||
}
|
}
|
||||||
|
|
||||||
ExternsDocument.Externs ext = (ExternsDocument.Externs)returns[0];
|
ExternsDocument.Externs ext = (ExternsDocument.Externs)returns[0];
|
||||||
|
|
||||||
if (ext.getTianoR8FlashMapH()){
|
if (ext.getTianoR8FlashMapH()){
|
||||||
return true;
|
return true;
|
||||||
}else {
|
}else {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/** @file
|
/** @file
|
||||||
ConfigReader class.
|
ConfigReader class.
|
||||||
|
|
||||||
ConfigReader is used to read tool chain config file with flat format.
|
ConfigReader is used to read tool chain config file with flat format.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
**/
|
**/
|
||||||
package org.tianocore.build.toolchain;
|
package org.tianocore.build.toolchain;
|
||||||
|
|
||||||
import org.tianocore.exception.EdkException;
|
import org.tianocore.common.exception.EdkException;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -23,10 +23,10 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
ConfigReader is used to read tool chain config file with flat format. Comments
|
ConfigReader is used to read tool chain config file with flat format. Comments
|
||||||
is line starting with character '#'.
|
is line starting with character '#'.
|
||||||
|
|
||||||
@since GenBuild 1.0
|
@since GenBuild 1.0
|
||||||
**/
|
**/
|
||||||
public class ConfigReader {
|
public class ConfigReader {
|
||||||
|
@ -35,14 +35,14 @@ public class ConfigReader {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Public construct method.
|
Public construct method.
|
||||||
**/
|
**/
|
||||||
public ConfigReader () {
|
public ConfigReader () {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Default filepath is ".".
|
Default filepath is ".".
|
||||||
|
|
||||||
@param filename the config file name like "target.txt"
|
@param filename the config file name like "target.txt"
|
||||||
@return the variables defined in file
|
@return the variables defined in file
|
||||||
**/
|
**/
|
||||||
|
@ -52,8 +52,8 @@ public class ConfigReader {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get all variables defined in config file. the config file format is flat
|
Get all variables defined in config file. the config file format is flat
|
||||||
with "A=B". If line started with '#' looks as comments.
|
with "A=B". If line started with '#' looks as comments.
|
||||||
|
|
||||||
@param confPath the path of config file
|
@param confPath the path of config file
|
||||||
@param filename the file name of the config file
|
@param filename the file name of the config file
|
||||||
@return the variables defined in the config file
|
@return the variables defined in the config file
|
||||||
|
@ -78,7 +78,7 @@ public class ConfigReader {
|
||||||
// without '=', or start with '='
|
// without '=', or start with '='
|
||||||
//
|
//
|
||||||
int index;
|
int index;
|
||||||
if (str.length() == 0 || str.startsWith("#") ||
|
if (str.length() == 0 || str.startsWith("#") ||
|
||||||
(index = str.indexOf('=')) <= 0) {
|
(index = str.indexOf('=')) <= 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ public class ConfigReader {
|
||||||
|
|
||||||
public static synchronized ToolChainMap parseToolChainConfig(File ConfigFile) throws EdkException {
|
public static synchronized ToolChainMap parseToolChainConfig(File ConfigFile) throws EdkException {
|
||||||
ToolChainMap map = new ToolChainMap();
|
ToolChainMap map = new ToolChainMap();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
FileReader reader = new FileReader(ConfigFile);
|
FileReader reader = new FileReader(ConfigFile);
|
||||||
BufferedReader in = new BufferedReader(reader);
|
BufferedReader in = new BufferedReader(reader);
|
||||||
|
@ -114,7 +114,7 @@ public class ConfigReader {
|
||||||
// without '=', or start with '='
|
// without '=', or start with '='
|
||||||
//
|
//
|
||||||
int index;
|
int index;
|
||||||
if (str.length() == 0 || str.startsWith("#") ||
|
if (str.length() == 0 || str.startsWith("#") ||
|
||||||
(index = str.indexOf('=')) <= 0) {
|
(index = str.indexOf('=')) <= 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/** @file
|
/** @file
|
||||||
ToolChainConfig class.
|
ToolChainConfig class.
|
||||||
|
|
||||||
ToolChainFactory class parse all config files and get tool chain information.
|
ToolChainFactory class parse all config files and get tool chain information.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
@ -16,7 +16,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
package org.tianocore.build.toolchain;
|
package org.tianocore.build.toolchain;
|
||||||
|
|
||||||
import org.apache.tools.ant.BuildException;
|
import org.apache.tools.ant.BuildException;
|
||||||
import org.tianocore.exception.EdkException;
|
|
||||||
|
import org.tianocore.common.exception.EdkException;
|
||||||
import org.tianocore.build.toolchain.ToolChainKey;
|
import org.tianocore.build.toolchain.ToolChainKey;
|
||||||
import org.tianocore.build.toolchain.ToolChainMap;
|
import org.tianocore.build.toolchain.ToolChainMap;
|
||||||
|
|
||||||
|
@ -26,9 +27,9 @@ import java.util.Set;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
ToolChainFactory class parse all config files and get tool chain information.
|
ToolChainFactory class parse all config files and get tool chain information.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
public class ToolChainConfig {
|
public class ToolChainConfig {
|
||||||
///
|
///
|
||||||
|
@ -37,7 +38,7 @@ public class ToolChainConfig {
|
||||||
private ToolChainMap config = null;
|
private ToolChainMap config = null;
|
||||||
///
|
///
|
||||||
/// tool chain information (how many targets, archs, etc.)
|
/// tool chain information (how many targets, archs, etc.)
|
||||||
///
|
///
|
||||||
private ToolChainInfo info = new ToolChainInfo();
|
private ToolChainInfo info = new ToolChainInfo();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,7 +49,7 @@ public class ToolChainConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Public construct method.
|
Public construct method.
|
||||||
|
|
||||||
@param toolChainFile File object representing the tool chain configuration file
|
@param toolChainFile File object representing the tool chain configuration file
|
||||||
**/
|
**/
|
||||||
public ToolChainConfig (File toolChainFile) {
|
public ToolChainConfig (File toolChainFile) {
|
||||||
|
@ -64,7 +65,7 @@ public class ToolChainConfig {
|
||||||
/**
|
/**
|
||||||
Collect target, tool chain tag, arch and command information from key part
|
Collect target, tool chain tag, arch and command information from key part
|
||||||
of configuration
|
of configuration
|
||||||
|
|
||||||
@param toolChainDefKey The set of keys in tool chain configuration
|
@param toolChainDefKey The set of keys in tool chain configuration
|
||||||
**/
|
**/
|
||||||
private void parseToolChainDefKey (Set<ToolChainKey> toolChainDefKey) {
|
private void parseToolChainDefKey (Set<ToolChainKey> toolChainDefKey) {
|
||||||
|
@ -80,8 +81,8 @@ public class ToolChainConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Return the tool chain configuration information in a Map form
|
Return the tool chain configuration information in a Map form
|
||||||
|
|
||||||
@return ToolChainMap Tool chain configurations in a ToolChainMap
|
@return ToolChainMap Tool chain configurations in a ToolChainMap
|
||||||
**/
|
**/
|
||||||
public ToolChainMap getConfig() {
|
public ToolChainMap getConfig() {
|
||||||
|
@ -90,7 +91,7 @@ public class ToolChainConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Return the tool chain's target, arch, tag and commands information
|
Return the tool chain's target, arch, tag and commands information
|
||||||
|
|
||||||
@return ToolChainInfo
|
@return ToolChainInfo
|
||||||
**/
|
**/
|
||||||
public ToolChainInfo getConfigInfo() {
|
public ToolChainInfo getConfigInfo() {
|
||||||
|
@ -99,7 +100,7 @@ public class ToolChainConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
override toString()
|
override toString()
|
||||||
|
|
||||||
@return String The converted configuration string in name=value form
|
@return String The converted configuration string in name=value form
|
||||||
**/
|
**/
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|
|
@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
package org.tianocore.build.toolchain;
|
package org.tianocore.build.toolchain;
|
||||||
|
|
||||||
import org.tianocore.exception.EdkException;
|
import org.tianocore.common.exception.EdkException;
|
||||||
|
|
||||||
public class ToolChainKey implements java.io.Serializable, Comparable<ToolChainKey> {
|
public class ToolChainKey implements java.io.Serializable, Comparable<ToolChainKey> {
|
||||||
static final long serialVersionUID = -8034897190740066933L;
|
static final long serialVersionUID = -8034897190740066933L;
|
||||||
|
|
Loading…
Reference in New Issue