mirror of https://github.com/acidanthera/audk.git
Polished the build tools' screen output to be in a more coherent form
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@916 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
c06913ffea
commit
219e224747
|
@ -148,6 +148,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
|
||||
<sequential>
|
||||
<shellscript shell="cmd.exe" tmpsuffix=".cmd" >
|
||||
<arg line="/q"/>
|
||||
<arg line="/c"/>
|
||||
<arg line="call"/>
|
||||
"${DLINK}" /LIBPATH:"${env.MSVCDir}\Lib" /LIBPATH:"${env.MSVCDir}\PlatformSdk\Lib" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib ${OBJECTS} ${LIBS} /base:0x10000000 /out:${BIN_DIR}\SecMain.exe /pdb:${DEST_DIR_DEBUG}\SecMain.pdb
|
||||
|
|
|
@ -108,24 +108,21 @@ public class CreateMtFileTask extends Task implements EfiDefine {
|
|||
//
|
||||
// Set debug log information.
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
||||
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.outputFile)).getName());
|
||||
revl = runner.execute();
|
||||
|
||||
if (EFI_SUCCESS == revl) {
|
||||
//
|
||||
// command execution success
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO,"CreateMtFile succeeded!");
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, "CreateMtFile succeeded!");
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_ERROR, "CreateMtFile failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
throw new BuildException("CreateMtFile failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
|
||||
EdkLog.log(EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));
|
||||
throw new BuildException("CreateMtFile failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
|
|
@ -104,7 +104,8 @@ public class EfiCompressTask extends Task implements EfiDefine {
|
|||
//
|
||||
// Set debug log information.
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
||||
|
||||
revl = runner.execute();
|
||||
|
||||
|
@ -112,15 +113,13 @@ public class EfiCompressTask extends Task implements EfiDefine {
|
|||
//
|
||||
// command execution success
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO,"EfiCompress succeeded!");
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, "EfiCompress succeeded!");
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_ERROR, "EfiCompress failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
throw new BuildException("Strip failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||
throw new BuildException("Strip failed!");
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -161,8 +161,10 @@ public class EfiRomTask extends Task implements EfiDefine {
|
|||
argList.add(((Input)pe32ComprList.next()).getFile());
|
||||
}
|
||||
}
|
||||
EdkLog.log(EdkLog.EDK_INFO, argList.toString().replaceAll(",",""));
|
||||
|
||||
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, argList.toString().replaceAll(",",""));
|
||||
EdkLog.log(EdkLog.EDK_INFO, " ");
|
||||
|
||||
//
|
||||
// lauch the program
|
||||
//
|
||||
|
@ -177,15 +179,15 @@ public class EfiRomTask extends Task implements EfiDefine {
|
|||
exitCode = cmdProc.waitFor();
|
||||
if (exitCode != 0) {
|
||||
int len = cmdOut.read(buf, 0, 1024);
|
||||
EdkLog.log(EdkLog.EDK_ERROR,new String(buf, 0, len));
|
||||
EdkLog.log(EdkLog.EDK_INFO, new String(buf, 0, len));
|
||||
} else {
|
||||
EdkLog.log(EdkLog.EDK_INFO, "FlashMap succeed!");
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, "EfiRom succeeded!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
} finally {
|
||||
if (exitCode != 0) {
|
||||
//throw new BuildException("GenFvImage: failed to generate FV file!");
|
||||
throw new BuildException("EfiRom failed!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,9 +29,9 @@ import org.apache.tools.ant.BuildException;
|
|||
import org.tianocore.logger.EdkLog;
|
||||
|
||||
/**
|
||||
* SecFixupTask class.
|
||||
* FlashMapTask class.
|
||||
*
|
||||
* SecFixupTask is used to call SecFixup.exe to fix up sec image.
|
||||
* FlashMapTask is used to call FlashMap.exe to generate flash map defition files and fd files.
|
||||
*/
|
||||
public class FlashMapTask extends Task implements EfiDefine {
|
||||
// /
|
||||
|
@ -40,7 +40,7 @@ public class FlashMapTask extends Task implements EfiDefine {
|
|||
private final String toolName = "FlashMap";
|
||||
|
||||
// /
|
||||
// / Flash default file
|
||||
// / Flash definition file
|
||||
// /
|
||||
private String flashDefFile = "";
|
||||
|
||||
|
@ -181,7 +181,6 @@ public class FlashMapTask extends Task implements EfiDefine {
|
|||
}
|
||||
}
|
||||
|
||||
EdkLog.log(EdkLog.EDK_INFO, argList.toString().replace(",",""));
|
||||
//
|
||||
// lauch the program
|
||||
//
|
||||
|
@ -198,19 +197,19 @@ public class FlashMapTask extends Task implements EfiDefine {
|
|||
//
|
||||
// log command line string.
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, cmdProc.getOutputStream().toString());
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, cmdProc.getOutputStream().toString());
|
||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.flashDefFile)).getName());
|
||||
if (exitCode != 0) {
|
||||
int len = cmdOut.read(buf, 0, 1024);
|
||||
EdkLog.log(EdkLog.EDK_ERROR, new String(buf, 0, len));
|
||||
EdkLog.log(EdkLog.EDK_INFO, new String(buf, 0, len));
|
||||
} else {
|
||||
EdkLog.log(EdkLog.EDK_INFO, "FlashMap succeed!");
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, "FlashMap succeeded!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
} finally {
|
||||
if (exitCode != 0) {
|
||||
// throw new BuildException("GenFvImage: failed to generate FV
|
||||
// file!");
|
||||
throw new BuildException("FlashMap failed!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,13 +25,10 @@ class FrameworkLogger implements LogMethod {
|
|||
private String titleName;
|
||||
public FrameworkLogger(Project project, String taskName) {
|
||||
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;
|
||||
this.project.log(frameworkMsg, Project.MSG_INFO);
|
||||
}
|
||||
|
|
|
@ -16,12 +16,15 @@
|
|||
**/
|
||||
package org.tianocore.framework.tasks;
|
||||
|
||||
import org.apache.tools.ant.Task;
|
||||
import org.apache.tools.ant.Project;
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Project;
|
||||
import org.apache.tools.ant.Task;
|
||||
import org.apache.tools.ant.taskdefs.Execute;
|
||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||
import org.apache.tools.ant.types.Commandline;
|
||||
import org.tianocore.logger.EdkLog;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -38,6 +41,7 @@ public class FwImageTask extends Task implements EfiDefine{
|
|||
/// input PE image
|
||||
///
|
||||
private String peImage = "";
|
||||
private String peImageName = "";
|
||||
///
|
||||
/// output EFI image
|
||||
///
|
||||
|
@ -93,24 +97,18 @@ public class FwImageTask extends Task implements EfiDefine{
|
|||
|
||||
runner.setAntRun(project);
|
||||
runner.setCommandline(cmdline.getCommandline());
|
||||
//System.out.println(Commandline.toString(cmdline.getCommandline()));
|
||||
//GenBuildTask.myLogger.log(Commandline.toString(cmdline.getCommandline()),0);
|
||||
//getProject().log(Commandline.toString(cmdline.getCommandline()));
|
||||
|
||||
log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);
|
||||
log(this.peImageName);
|
||||
revl = runner.execute();
|
||||
if (EFI_SUCCESS == revl) {
|
||||
//
|
||||
// command execution success
|
||||
//
|
||||
System.out.println("fwimage succeeded!");
|
||||
log("fwimage succeeded!", Project.MSG_VERBOSE);
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
System.out.println("fwimage failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
throw new BuildException("fwimage failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
|
||||
log("ERROR = " + Integer.toHexString(revl));
|
||||
throw new BuildException("fwimage failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
@ -155,6 +153,7 @@ public class FwImageTask extends Task implements EfiDefine{
|
|||
@param peImage name of PE image
|
||||
**/
|
||||
public void setPeImage(String peImage) {
|
||||
this.peImageName = (new File(peImage)).getName();
|
||||
this.peImage = " " + peImage;
|
||||
}
|
||||
|
||||
|
|
|
@ -104,24 +104,21 @@ public class GenAcpiTableTask extends Task implements EfiDefine {
|
|||
//
|
||||
// Set debug log information.
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
||||
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
||||
revl = runner.execute();
|
||||
|
||||
if (EFI_SUCCESS == revl) {
|
||||
//
|
||||
// command execution success
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO,"GenAcpiTable successed!");
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, "GenAcpiTable succeeded!");
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_ERROR, "GenAcpiTable failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
throw new BuildException("GenAcpiTable failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
|
||||
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||
throw new BuildException("GenAcpiTable failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
|
|
@ -89,29 +89,23 @@ public class GenCRC32SectionTask extends Task implements EfiDefine{
|
|||
|
||||
runner.setAntRun(project);
|
||||
runner.setCommandline(cmdline.getCommandline());
|
||||
System.out.println(Commandline.toString(cmdline.getCommandline()));
|
||||
|
||||
log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);
|
||||
log(" ");
|
||||
revl = runner.execute();
|
||||
if (EFI_SUCCESS == revl){
|
||||
//
|
||||
// command execution success
|
||||
//
|
||||
System.out.println("gencrc32section succeeded!");
|
||||
}
|
||||
else
|
||||
{
|
||||
log("gencrc32section succeeded!", Project.MSG_VERBOSE);
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
System.out.println("gencrc32section failed. (error=" +
|
||||
Integer.toHexString(revl) +
|
||||
")"
|
||||
);
|
||||
log("ERROR = " + Integer.toHexString(revl));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -137,25 +137,21 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
|
|||
//
|
||||
// Set debug log information.
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline
|
||||
.getCommandline()));
|
||||
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_INFO, (new File(scriptFile)).getName());
|
||||
revl = runner.execute();
|
||||
|
||||
if (EFI_SUCCESS == revl) {
|
||||
//
|
||||
// command execution success
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, "GenCapsuleHdr succeeded!");
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, "GenCapsuleHdr succeeded!");
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_ERROR, "GenCapsuleHdr failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
throw new BuildException("GenCapsuleHdr failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
|
||||
EdkLog.log(EdkLog.EDK_ERROR, "ERROR = " + Integer.toHexString(revl));
|
||||
throw new BuildException("GenCapsuleHdr failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
**/
|
||||
package org.tianocore.framework.tasks;
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Project;
|
||||
import org.apache.tools.ant.Task;
|
||||
|
@ -35,6 +37,7 @@ public class GenDepexTask extends Task implements EfiDefine {
|
|||
/// input pre-processed dependency text files name
|
||||
///
|
||||
private String inputFile = "";
|
||||
private String inputFileName = "";
|
||||
///
|
||||
/// padding integer value
|
||||
///
|
||||
|
@ -79,24 +82,17 @@ public class GenDepexTask extends Task implements EfiDefine {
|
|||
runner.setAntRun(project);
|
||||
runner.setCommandline(commandLine.getCommandline());
|
||||
|
||||
System.out.println(Commandline.toString(commandLine
|
||||
.getCommandline()));
|
||||
|
||||
log(Commandline.toString(commandLine.getCommandline()), Project.MSG_VERBOSE);
|
||||
log(inputFileName);
|
||||
returnVal = runner.execute();
|
||||
if (EFI_SUCCESS == returnVal) {
|
||||
//
|
||||
// command execution success
|
||||
//
|
||||
System.out.println("GenDepex execute succeeded!");
|
||||
|
||||
log("GenDepex succeeded!", Project.MSG_VERBOSE);
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
System.out.println("GenDepex failed. (error="
|
||||
+ Integer.toHexString(returnVal) + ")");
|
||||
throw new BuildException("GenDepex failed. (error="
|
||||
+ Integer.toHexString(returnVal) + ")");
|
||||
log("ERROR = " + Integer.toHexString(returnVal));
|
||||
throw new BuildException("GenDepex failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
@ -131,6 +127,7 @@ public class GenDepexTask extends Task implements EfiDefine {
|
|||
@param inputFileName name of inputFile
|
||||
**/
|
||||
public void setInputFile(String inputFileName) {
|
||||
this.inputFileName = (new File(inputFileName)).getName();
|
||||
this.inputFile = " -I " + inputFileName;
|
||||
}
|
||||
|
||||
|
|
|
@ -169,17 +169,16 @@ public class GenFfsFileTask extends Task implements EfiDefine, FfsTypes {
|
|||
|
||||
}
|
||||
|
||||
ffsFile = new File (outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix);
|
||||
System.out.print("General Ffs file: file name is:\n");
|
||||
System.out.print(outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix);
|
||||
System.out.print("\n");
|
||||
|
||||
String ffsFilePath = outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix;
|
||||
ffsFile = new File (ffsFilePath);
|
||||
//
|
||||
// Create ffs ORG file. fileName = FfsFileGuid + BaseName + ffsSuffix +
|
||||
// ".org".
|
||||
//
|
||||
ffsOrgFile = new File(outputPath + this.ffsFileGuid + '-' + this.baseName + ffsSuffix + ".org");
|
||||
ffsOrgFile = new File(ffsFilePath + ".org");
|
||||
|
||||
log(ffsFile.getName());
|
||||
log(ffsOrgFile.getName());
|
||||
try {
|
||||
//
|
||||
// Create file output stream -- dataBuffer.
|
||||
|
@ -428,8 +427,8 @@ public class GenFfsFileTask extends Task implements EfiDefine, FfsTypes {
|
|||
//
|
||||
ffsBuffer.close();
|
||||
orgFfsBuffer.close();
|
||||
System.out.print ("Successful create ffs file!\n");
|
||||
} catch (Exception e) {
|
||||
log("genffsfile failed!");
|
||||
throw new BuildException (e.getMessage());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ public class GenFvImageTask extends Task implements EfiDefine{
|
|||
ProcessBuilder pb = new ProcessBuilder(argList);
|
||||
pb.directory(new File(outputDir));
|
||||
int exitCode = 0;
|
||||
log((new File(this.infFile)).getName());
|
||||
try {
|
||||
Process cmdProc = pb.start();
|
||||
InputStreamReader cmdOut = new InputStreamReader(cmdProc.getInputStream());
|
||||
|
@ -86,9 +87,9 @@ public class GenFvImageTask extends Task implements EfiDefine{
|
|||
exitCode = cmdProc.waitFor();
|
||||
if (exitCode != 0) {
|
||||
int len = cmdOut.read(buf, 0, 1024);
|
||||
log(new String(buf, 0, len), Project.MSG_ERR);
|
||||
log(new String(buf, 0, len));
|
||||
} else {
|
||||
log("GenFvImage - DONE!", Project.MSG_VERBOSE);
|
||||
log("GenFvImage succeeded!", Project.MSG_VERBOSE);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
|
|
@ -16,9 +16,11 @@
|
|||
|
||||
package org.tianocore.framework.tasks;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Project;
|
||||
import org.apache.tools.ant.Task;
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.taskdefs.Execute;
|
||||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||
import org.apache.tools.ant.types.Commandline;
|
||||
|
@ -29,6 +31,10 @@ public class GenSectionTask extends Task implements EfiDefine {
|
|||
///
|
||||
private String inputFile = "";
|
||||
///
|
||||
///
|
||||
///
|
||||
private String inputFileName = "";
|
||||
///
|
||||
/// outputfile name
|
||||
///
|
||||
private String outputFile = "";
|
||||
|
@ -86,22 +92,18 @@ public class GenSectionTask extends Task implements EfiDefine {
|
|||
|
||||
runner.setAntRun(project);
|
||||
runner.setCommandline(cmdline.getCommandline());
|
||||
System.out.println(Commandline.toString(cmdline.getCommandline()));
|
||||
|
||||
log(inputFileName);
|
||||
log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);
|
||||
revl = runner.execute();
|
||||
if (EFI_SUCCESS == revl) {
|
||||
//
|
||||
// command execution success
|
||||
//
|
||||
System.out.println("gensection succeeded!");
|
||||
log("gensection succeeded!", Project.MSG_VERBOSE);
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
System.out.println("gensection failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
throw new BuildException("gensection failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
log("ERROR = " + Integer.toHexString(revl));
|
||||
throw new BuildException("gensection failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
@ -127,6 +129,7 @@ public class GenSectionTask extends Task implements EfiDefine {
|
|||
@param inputFile name of input file
|
||||
**/
|
||||
public void setInputFile(String inputFile) {
|
||||
this.inputFileName = (new File(inputFile)).getName();
|
||||
this.inputFile = " -i " + inputFile;
|
||||
}
|
||||
|
||||
|
|
|
@ -125,8 +125,8 @@ public class GenTeImageTask extends Task implements EfiDefine {
|
|||
//
|
||||
// Set debug log information.
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline
|
||||
.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
||||
|
||||
revl = runner.execute();
|
||||
|
||||
|
@ -134,16 +134,13 @@ public class GenTeImageTask extends Task implements EfiDefine {
|
|||
//
|
||||
// command execution success
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, "GenTeImage succeeded!");
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, "GenTeImage succeeded!");
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_ERROR, "GenTeImage failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
throw new BuildException("GenTeImage failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
|
||||
EdkLog.log(EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));
|
||||
throw new BuildException("GenTeImage failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
|
|
@ -113,7 +113,7 @@ public class GuidChkTask extends Task implements EfiDefine{
|
|||
printGuiDef +
|
||||
printAllGuid;
|
||||
try {
|
||||
System.out.println(command + " " + argument);
|
||||
log(command + " " + argument, Project.MSG_VERBOSE);
|
||||
//
|
||||
// execute command line
|
||||
//
|
||||
|
@ -134,17 +134,13 @@ public class GuidChkTask extends Task implements EfiDefine{
|
|||
else {
|
||||
BufferedReader bin = new BufferedReader(new InputStreamReader(proc.getInputStream()));
|
||||
String line = bin.readLine();
|
||||
System.out.println(line);
|
||||
while (line != null ){
|
||||
System.out.print(line);
|
||||
line = bin.readLine();
|
||||
}
|
||||
}
|
||||
System.out.println("GuidChkTask Success!");
|
||||
log("GuidChkTask Succeeded!", Project.MSG_VERBOSE);
|
||||
} catch (Exception e) {
|
||||
System.out.println("GuidChkTask failed!");
|
||||
System.out.println(e.getMessage());
|
||||
|
||||
throw new BuildException("GuidChkTask failed!");
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -35,6 +35,7 @@ import org.apache.tools.ant.taskdefs.Execute;
|
|||
import org.apache.tools.ant.taskdefs.LogStreamHandler;
|
||||
import org.apache.tools.ant.types.Commandline;
|
||||
import org.apache.tools.ant.types.Path;
|
||||
import org.tianocore.logger.EdkLog;
|
||||
|
||||
/**
|
||||
Class MakeDeps is used to wrap MakeDeps.exe as an ANT task.
|
||||
|
@ -77,6 +78,10 @@ public class MakeDeps extends Task {
|
|||
|
||||
Project prj = this.getOwningTarget().getProject();
|
||||
String toolPath = prj.getProperty("env.FRAMEWORK_TOOLS_PATH");
|
||||
FrameworkLogger logger = new FrameworkLogger(prj, "makedeps");
|
||||
EdkLog.setLogLevel(prj.getProperty("env.LOGLEVEL"));
|
||||
EdkLog.setLogger(logger);
|
||||
|
||||
///
|
||||
/// compose full tool path
|
||||
///
|
||||
|
@ -118,8 +123,9 @@ public class MakeDeps extends Task {
|
|||
Iterator iterator = inputFileList.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
Input inputFile = (Input)iterator.next();
|
||||
String inputFileString = cleanupPathName(inputFile.getFile());
|
||||
args.append(" -f ");
|
||||
args.append(cleanupPathName(inputFile.getFile()));
|
||||
args.append(inputFileString);
|
||||
}
|
||||
|
||||
///
|
||||
|
@ -165,6 +171,9 @@ public class MakeDeps extends Task {
|
|||
runner.setAntRun(prj);
|
||||
runner.setCommandline(cmd.getCommandline());
|
||||
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmd.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_INFO, " ");
|
||||
|
||||
int result = 0;
|
||||
try {
|
||||
result = runner.execute();
|
||||
|
@ -173,7 +182,7 @@ public class MakeDeps extends Task {
|
|||
}
|
||||
|
||||
if (result != 0) {
|
||||
log ("MakeDeps failed");
|
||||
EdkLog.log(EdkLog.EDK_INFO, "MakeDeps failed!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,25 +119,21 @@ public class ModifyInfTask extends Task implements EfiDefine {
|
|||
//
|
||||
// Set debug log information.
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline
|
||||
.getCommandline()));
|
||||
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFVInfFileName)).getName());
|
||||
revl = runner.execute();
|
||||
|
||||
if (EFI_SUCCESS == revl) {
|
||||
//
|
||||
// command execution success
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, "ModifyInfTask succeeded!");
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, "ModifyInfTask succeeded!");
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_ERROR, "ModifyInfTask failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
throw new BuildException("ModifyInfTask failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
|
||||
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||
throw new BuildException("ModifyInfTask failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
|
|
@ -40,7 +40,7 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
|||
// / Input file
|
||||
// /
|
||||
private String inputFile = "";
|
||||
|
||||
private String inputFileName = "";
|
||||
// /
|
||||
// / Output file
|
||||
// /
|
||||
|
@ -128,7 +128,8 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
|||
//
|
||||
// Set debug log information.
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_INFO, this.inputFileName);
|
||||
|
||||
revl = runner.execute();
|
||||
|
||||
|
@ -136,16 +137,13 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
|||
//
|
||||
// command execution success
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO,"PeiBase succeeded!");
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, "PeiReBase succeeded!");
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_ERROR, "PeiBase failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
throw new BuildException("PeiBase failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
|
||||
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||
throw new BuildException("PeiReBase failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
@ -172,6 +170,7 @@ public class PeiReBaseTask extends Task implements EfiDefine {
|
|||
* string of input file name.
|
||||
*/
|
||||
public void setInputFile(String inputFile) {
|
||||
this.inputFileName = (new File(inputFile)).getName();
|
||||
this.inputFile = "-I " + inputFile;
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,8 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
|
|||
//
|
||||
// Set debug log information.
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.fvInputFile)).getName());
|
||||
|
||||
revl = runner.execute();
|
||||
|
||||
|
@ -119,16 +120,13 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
|
|||
//
|
||||
// command execution success
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO,"SecApResetVectorFixup succeeded!");
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, "SecApResetVectorFixup succeeded!");
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_ERROR, "SecApResetVectorFixup failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
throw new BuildException("SecApResetVectorFixup failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
|
||||
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||
throw new BuildException("SecApResetVectorFixup failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
|
|
@ -116,8 +116,7 @@ public class SecFixupTask extends Task implements EfiDefine {
|
|||
//
|
||||
// Set debug log information.
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline
|
||||
.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||
|
||||
revl = runner.execute();
|
||||
|
||||
|
@ -125,16 +124,13 @@ public class SecFixupTask extends Task implements EfiDefine {
|
|||
//
|
||||
// command execution success
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, "SecFixup succeeded!");
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, "SecFixup succeeded!");
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_ERROR, "SecFixup failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
throw new BuildException("SecFixup failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
|
||||
EdkLog.log(EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));
|
||||
throw new BuildException("SecFixup failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
|
|
@ -13,6 +13,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
**/
|
||||
package org.tianocore.framework.tasks;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Project;
|
||||
import org.apache.tools.ant.Task;
|
||||
|
@ -74,23 +76,18 @@ public class SetStampTask extends Task implements EfiDefine {
|
|||
runner.setAntRun(project);
|
||||
runner.setCommandline(commandLine.getCommandline());
|
||||
|
||||
System.out.println(Commandline.toString(commandLine
|
||||
.getCommandline()));
|
||||
log(Commandline.toString(commandLine.getCommandline()), Project.MSG_VERBOSE);
|
||||
log((new File(this.peFile)).getName());
|
||||
|
||||
returnVal = runner.execute();
|
||||
if (EFI_SUCCESS == returnVal) {
|
||||
///
|
||||
/// command execution success
|
||||
///
|
||||
System.out.println("SetStamp execute succeeded!");
|
||||
log("SetStamp succeeded!", Project.MSG_VERBOSE);
|
||||
} else {
|
||||
///
|
||||
/// command execution fail
|
||||
///
|
||||
System.out.println("SetStamp failed. (error="
|
||||
+ Integer.toHexString(returnVal) + ")");
|
||||
throw new BuildException("SetStamp failed. (error="
|
||||
+ Integer.toHexString(returnVal) + ")");
|
||||
log("ERROR = " + Integer.toHexString(returnVal));
|
||||
throw new BuildException("SetStamp failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
|
|
@ -98,22 +98,20 @@ public class SplitfileTask extends Task implements EfiDefine {
|
|||
runner.setAntRun(project);
|
||||
runner.setCommandline(cmdline.getCommandline());
|
||||
|
||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
||||
revl = runner.execute();
|
||||
if (EFI_SUCCESS == revl) {
|
||||
//
|
||||
// command execution success
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, "splitfile succeeded!");
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, "splitfile succeeded!");
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_ERROR, "splitfile failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
throw new BuildException("splitfile failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
|
||||
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||
throw new BuildException("splitfile failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
|
|
@ -148,22 +148,18 @@ public class StrGatherTask extends Task implements EfiDefine {
|
|||
|
||||
runner.setAntRun(project);
|
||||
runner.setCommandline(cmdline.getCommandline());
|
||||
System.out.println(Commandline.toString(cmdline.getCommandline()));
|
||||
|
||||
log(Commandline.toString(cmdline.getCommandline()), Project.MSG_VERBOSE);
|
||||
log(this.commandType.substring(2));
|
||||
revl = runner.execute();
|
||||
if (EFI_SUCCESS == revl) {
|
||||
///
|
||||
/// command execution success
|
||||
///
|
||||
System.out.println("strgather succeeded!");
|
||||
log("strgather succeeded!", Project.MSG_VERBOSE);
|
||||
} else {
|
||||
///
|
||||
/// command execution fail
|
||||
///
|
||||
System.out.println("strgather failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
throw new BuildException("strgather failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
log("ERROR = " + Integer.toHexString(revl));
|
||||
throw new BuildException("strgather failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
|
|
@ -105,7 +105,8 @@ public class StripTask extends Task implements EfiDefine {
|
|||
//
|
||||
// Set debug log information.
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
|
||||
|
||||
revl = runner.execute();
|
||||
|
||||
|
@ -113,16 +114,13 @@ public class StripTask extends Task implements EfiDefine {
|
|||
//
|
||||
// command execution success
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO,"Strip succeeded!");
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, "Strip succeeded!");
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_ERROR, "Strip failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
throw new BuildException("Strip failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
|
||||
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||
throw new BuildException("Strip failed!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
|
|
|
@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
**/
|
||||
package org.tianocore.framework.tasks;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -39,7 +40,8 @@ public class VfrCompilerTask extends Task implements EfiDefine {
|
|||
private String outPutDir = "";
|
||||
private String createIfrBinFile = "";
|
||||
private String processerArg ="";
|
||||
private String vfrFile;
|
||||
private String vfrFile = "";
|
||||
private String vfrFileName = "";
|
||||
|
||||
private List<Object> includepathList = new ArrayList<Object>();
|
||||
|
||||
|
@ -116,6 +118,7 @@ public class VfrCompilerTask extends Task implements EfiDefine {
|
|||
@param vfrFile The name of VFR file
|
||||
**/
|
||||
public void setVfrFile(String vfrFile) {
|
||||
this.vfrFileName = (new File(vfrFile)).getName();
|
||||
this.vfrFile = " " + vfrFile;
|
||||
}
|
||||
|
||||
|
@ -203,17 +206,15 @@ public class VfrCompilerTask extends Task implements EfiDefine {
|
|||
runner.setAntRun(project);
|
||||
runner.setCommandline(commandLine.getCommandline());
|
||||
|
||||
System.out.println(Commandline.toString(commandLine.getCommandline()));
|
||||
log(Commandline.toString(commandLine.getCommandline()), Project.MSG_VERBOSE);
|
||||
log(vfrFileName);
|
||||
int returnVal = runner.execute();
|
||||
if (EFI_SUCCESS == returnVal) {
|
||||
System.out.println("VfrCompiler execution succeeded!");
|
||||
log("VfrCompiler succeeded!", Project.MSG_VERBOSE);
|
||||
} else {
|
||||
System.out.println("VfrCompiler failed. (error=" +
|
||||
Integer.toHexString(returnVal) + ")");
|
||||
throw new BuildException("VfrCompiler failed. (error=" +
|
||||
Integer.toHexString(returnVal) + ")");
|
||||
log("ERROR = " + Integer.toHexString(returnVal));
|
||||
throw new BuildException("VfrCompiler failed!");
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
throw new BuildException(e.getMessage());
|
||||
}
|
||||
|
|
|
@ -105,23 +105,22 @@ public class ZeroDebugDataTask extends Task implements EfiDefine {
|
|||
//
|
||||
// Set debug log information.
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO, Commandline.toString(cmdline.getCommandline()));
|
||||
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
|
||||
EdkLog.log(EdkLog.EDK_INFO, (new File(this.peFile)).getName());
|
||||
|
||||
revl = runner.execute();
|
||||
|
||||
if (EFI_SUCCESS == revl) {
|
||||
//
|
||||
// command execution success
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_INFO,"ZeroDebug succeeded!");
|
||||
EdkLog.log(EdkLog.EDK_VERBOSE, "ZeroDebugData succeeded!");
|
||||
} else {
|
||||
//
|
||||
// command execution fail
|
||||
//
|
||||
EdkLog.log(EdkLog.EDK_ERROR, "ZeroDebug failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
throw new BuildException("ZeroDebug failed. (error="
|
||||
+ Integer.toHexString(revl) + ")");
|
||||
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
|
||||
throw new BuildException("ZeroDebugData failed!");
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -854,16 +854,6 @@ Returns:
|
|||
Output_Flag = FALSE;
|
||||
Pad_Flag = FALSE;
|
||||
|
||||
//
|
||||
// Output the calling arguments
|
||||
//
|
||||
printf ("\n\n");
|
||||
for (Index = 0; Index < argc; Index++) {
|
||||
printf ("%s ", argv[Index]);
|
||||
}
|
||||
|
||||
printf ("\n\n");
|
||||
|
||||
if (argc < 5) {
|
||||
printf ("Not enough arguments\n");
|
||||
PrintGenDepexUsageInfo ();
|
||||
|
|
Loading…
Reference in New Issue